Version 2.1.0-dev.4.0
Merge commit 'f2e6e7255abf9f85db1b9bf70905b01049747f24' into dev
diff --git a/.packages b/.packages
index b459b60..fe03169 100644
--- a/.packages
+++ b/.packages
@@ -10,6 +10,7 @@
analysis_server_client:pkg/analysis_server_client/lib
analyzer:pkg/analyzer/lib
analyzer_cli:pkg/analyzer_cli/lib
+analyzer_fe_comparison:pkg/analyzer_fe_comparison/lib
analyzer_plugin:pkg/analyzer_plugin/lib
args:third_party/pkg/args/lib
async:third_party/pkg/async/lib
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 672fc842..3b3a06d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,13 @@
+## 2.1.0-dev.4.0
+
+### Core library changes
+
+#### `dart:core`
+
+* Added missing methods to `UnmodifiableMapMixin`. Some maps intended to
+ be unmodifiable incorrectly allowed new methods added in Dart 2 to
+ succeed.
+
## 2.1.0-dev.3.1
### Tool Changes
@@ -11,8 +21,9 @@
### Core library changes
-* `dart:async`
- * Update `Stream.fromIterable` to send a done event after the error when the
+#### `dart:async`
+
+* Update `Stream.fromIterable` to send a done event after the error when the
iterator's `moveNext` throws, and handle if the `current` getter throws.
Issue [33431](http://dartbug.com/33431).
diff --git a/DEPS b/DEPS
index 8f5c4c4..0680c4b 100644
--- a/DEPS
+++ b/DEPS
@@ -37,7 +37,7 @@
"fuchsia_git": "https://fuchsia.googlesource.com",
"co19_rev": "9858ee7d79cf09b50d6b5bc13fb950ae5f357954",
- "co19_2_rev": "afadfe417b85037281a770b477f42c3786a8666a",
+ "co19_2_rev": "7514e576a02ced94a360ec51e0d26b32f9ebc82f",
# As Flutter does, we pull buildtools, including the clang toolchain, from
# Fuchsia. This revision should be kept up to date with the revision pulled
@@ -80,7 +80,7 @@
# For more details, see https://github.com/dart-lang/sdk/issues/30164
"dart_style_tag": "6f3efd209ff1828835936397b64be79265cc0c19", # Please see the note above before updating.
- "dartdoc_tag" : "v0.20.2",
+ "dartdoc_tag" : "v0.20.4",
"fixnum_tag": "0.10.8",
"func_rev": "25eec48146a58967d75330075ab376b3838b18a8",
"glob_tag": "1.1.7",
@@ -113,7 +113,7 @@
"protobuf_tag": "0.9.0",
"pub_rev": "9f00679ef47bc79cadc18e143720ade6c06c0100",
"pub_semver_tag": "1.4.2",
- "quiver_tag": "0.29.0+2",
+ "quiver_tag": "2.0.0+1",
"resource_rev": "2.1.5",
"root_certificates_rev": "16ef64be64c7dfdff2b9f4b910726e635ccc519e",
"shelf_static_rev": "v0.2.8",
@@ -403,20 +403,6 @@
],
},
{
- "name": "drt_resources",
- "pattern": ".",
- "action": [
- "download_from_google_storage",
- "--no_auth",
- "--no_resume",
- "--bucket",
- "dart-dependencies",
- "--platform=win32",
- "--directory",
- Var('dart_root') + "/third_party/drt_resources",
- ],
- },
- {
"name": "7zip",
"pattern": ".",
"action": [
diff --git a/docs/language/dartLangSpec.tex b/docs/language/dartLangSpec.tex
index 051d913..5284f7b 100644
--- a/docs/language/dartLangSpec.tex
+++ b/docs/language/dartLangSpec.tex
@@ -7840,7 +7840,7 @@
The expression of an expression statement is not allowed to begin with a \{.
\commentary{
This means that if some source text could otherwise be parsed as an expression
-followed by a \;, then this grammar production does not apply
+followed by a {\rm `$;$'}, then this grammar production does not apply
when the expression starts with a \{.
}
\rationale{
@@ -8754,11 +8754,6 @@
\LMHash{}
Executing a return statement with no expression, \code{\RETURN;} returns with no value (\ref{completion}).
-\LMHash{}
-% TODO(eernst): For integration of invalid_returns.md: We do allow that now, and
-% many other things, eg `void foo(bool b) { if (b) return; return print(''); }`.
-It is a compile-time error if a function contains both one or more explicit return statements of the form \code{\RETURN;} and one or more return statements of the form \code{\RETURN{} $e$;}.
-
\subsection{Labels}
\LMLabel{labels}
diff --git a/docs/language/informal/dynamic-members.md b/docs/language/informal/dynamic-members.md
index e60c925..bf53190 100644
--- a/docs/language/informal/dynamic-members.md
+++ b/docs/language/informal/dynamic-members.md
@@ -1,10 +1,10 @@
# Typing of members of dynamic
-Author: eernst@.
+**Author**: eernst@.
-Version: 0.1 (2018-03-13)
+**Version**: 0.2 (2018-09-04)
-Status: Under discussion.
+**Status**: Under discussion.
**This document** is a Dart 2 feature specification of the static typing
of instance members of a receiver whose static type is `dynamic`.
@@ -123,20 +123,37 @@
In this section, `Object` denotes the built-in class `Object`, and
`dynamic` denotes the built-in type `dynamic`.
-Let `e` be an expression of the form `d.g` where the static type of `d` is
-`dynamic` and `g` is a getter declared in `Object`; if the return type of
-`Object.g` is `T` then the static type of `e` is `T`.
+Let `e` be an expression of the form `d.m`, which is not followed by an
+argument part, where the static type of `d` is `dynamic`, and `m` is a
+getter declared in `Object`; if the return type of `Object.m` is `T` then
+the static type of `e` is `T`.
*For instance, `d.hashCode` has type `int` and `d.runtimeType` has type
`Type`.*
-Let `e` be an expression of the form `d.m` where the static type of `d` is
-`dynamic` and `m` is a method declared in `Object` whose method signature
-has type `F` (*which is a function type*). The static type of `e` is then
-`F`.
+Let `e` be an expression of the form `d.m`, which is not followed by an
+argument part, where the static type of `d` is `dynamic`, and `m` is a
+method declared in `Object` whose method signature has type `F` (*which is
+a function type*). The static type of `e` is then `F`.
*For instance, `d.toString` has type `String Function()`.*
+Let `e` be an expression of the form `d.m(arguments)` or
+`d.m<typeArguments>(arguments)` where the static type of `d` is `dynamic`,
+`m` is a getter declared in `Object` with return type `F`, `arguments` is
+an actual argument list, and `typeArguments` is a list of actual type
+arguments, if present. Static analysis will then process `e` as a function
+expression invocation where a function of static type `F` is applied to the
+given argument part.
+
+*So `d.runtimeType(42)` is a compile-time error, because it is checked as a
+function expression invocation where an entity of static type `Type` is
+invoked. Note that it could actually succeed: An overriding implementation
+of `runtimeType` could return an instance whose dynamic type is a subtype
+of `Type` that has a `call` method. We decided to make it an error because
+it is likely to be a mistake, especially in cases like `d.hashCode()` where
+a developer might have forgotten that `hashCode` is a getter.*
+
Let `e` be an expression of the form `d.m(arguments)` where the static type
of `d` is `dynamic`, `arguments` is an actual argument list, and `m` is a
method declared in `Object` whose method signature has type `F`. If the
@@ -152,36 +169,41 @@
Let `e` be an expression of the form `d.m<typeArguments>(arguments)` where
the static type of `d` is `dynamic`, `typeArguments` is a list of actual
-type arguments, `arguments` is an actual argument list, and `m` is a
-method declared in `Object` whose method signature has type `F`. The
-static type of `e` is then `dynamic`.
+type arguments, `arguments` is an actual argument list. It is a
+compile-time error if `m` is a non-generic method declared in `Object`.
-*We do not need to address the case `d.m(arguments)` where `m` is a getter
-declared in `Object` whose return type is a function type or a supertype
-thereof, because no such getters exist, but such a case would be covered in
-a generalization to support `dynamic(T)` for all `T`. Similarly, such a
-generalization would need to handle the case where the method is generic
-and no type arguments are passed, and the case where the method is
-generic and a wrong number of type arguments is passed, etc. Such a
-generalization is expected to be possible without invalidating the rules
-given in this document.*
+*No generic methods are declared in `Object`. Hence, we do not specify that
+there must be the statically required number of actual type arguments, and
+they must satisfy the bounds. That would otherwise be the consistent
+approach, because the invocation is guaranteed to fail when any of those
+requirements are violated, but generalizations of this mechanism would need
+to include such rules.*
For an instance method invocation `e` (including invocations of getters,
setters, and operators) where the receiver has static type `dynamic` and
`e` does not match any of the above cases, the static type of `e` is
`dynamic`.
-*Note that it is not possible for an instance method invocation with a
-receiver of type `dynamic` to be a compile-time error (except, of course,
-that some expressions like `x[1, 2]` are syntax errors even though they
-could also be considered "invocations", and except that subexpressions are
-checked separately, and any given actual argument could be a compile-time
-error). In general, any argument list shape could be handled via
+When a `cascadeSection` performs a getter or method invocation that
+corresponds to one of the cases above, the corresponding static analysis
+and compile-time errors apply.
+
+*For instance, `d..foobar(16)..hashCode()` is an error.*
+
+*Note that only very few forms of instance method invocation with a
+receiver of type `dynamic` can be a compile-time error. Of course,
+some expressions like `x[1, 2]` are syntax errors even though they
+could also be considered "invocations", and subexpressions are checked
+separately so any given actual argument could be a compile-time
+error. But almost any given argument list shape could be handled via
`noSuchMethod`, and an argument of any type could be accepted because any
formal parameter in an overriding declaration could have its type
annotation contravariantly changed to `Object`. So it is a natural
consequence of the principle mentioned in 'Motivation' that a `dynamic`
-receiver admits all instance method invocations.*
+receiver admits almost all instance method invocations. The few cases where
+an instance method invocation with a receiver of type `dynamic` is an error
+are either guaranteed to fail at run time, or they are very likely to be
+developer mistakes.*
## Dynamic Semantics
@@ -198,5 +220,9 @@
## Revisions
+- 0.2 (2018-09-04) Adjustment to make `d.hashCode()` and similar
+ expressions an error, cf.
+ [this github issue](https://github.com/dart-lang/sdk/issues/34320).
+
- 0.1 (2018-03-13) Initial version, based on discussions in
-[this github issue](https://github.com/dart-lang/sdk/issues/32414).
+ [this github issue](https://github.com/dart-lang/sdk/issues/32414).
diff --git a/docs/language/informal/int-to-double.md b/docs/language/informal/int-to-double.md
new file mode 100644
index 0000000..d9cd340
--- /dev/null
+++ b/docs/language/informal/int-to-double.md
@@ -0,0 +1,184 @@
+## Feature: Evaluating integer literals as double values
+
+**Author**: eernst@.
+
+**Version**: 0.4 (2018-08-14).
+
+**Status**: Background material, in language specification as of
+[d14b256](https://github.com/dart-lang/sdk/commit/d14b256e351464db352f361f1206e1415db65d9c).
+
+**This document** is a feature specification of the support in Dart 2 for
+evaluating integer literals occurring in a context where the expected type
+is `double` to a value of type `double`.
+
+
+## Motivation
+
+In a situation where a value of type `double` is required, e.g., as an
+actual argument to a constructor or function invocation, it may be
+convenient to write an integer literal because it is more concise, and
+the intention is clear. For instance:
+
+```dart
+double one = 1; // OK, would have to be `1.0` without this feature.
+```
+
+This mechanism only applies to integer literals, and only when the expected
+type is a type `T` such that `double` is assignable to `T` and `int` is not
+assignable to `T`; in particular, it applies when the expected type is
+`double`.
+
+That is, the result of a computation (say, `a + b` or even a lone variable
+like `a` of type `int`) will never be converted to a double value
+implicitly, and it also doesn't happen when the expected type is a type
+variable declared in an enclosing scope, no matter whether that type
+variable in a given situation at run time has the value `double`. The one
+case where conversion does happen when the expected type is a type variable
+is when its upper bound is a subtype of `double` (including `double`
+itself). For example:
+
+```dart
+class C<N extends num, NN extends double> {
+ X foo<X>(X x) => x;
+ double d1 = foo<double>(42); // OK.
+ double d2 = foo(42); // OK, type argument inferred as `double`.
+ num n1 = 42 as double; // OK, `42` evaluates to 42.0.
+ N n2 = 42; // Error, neither `int` nor `double` assignable to `N`.
+ NN n3 = 42; // OK, `int` not assignable, but `double` is.
+ FutureOr<double> n4 = 42; // OK, same reason.
+ N n5 = n1; // OK statically, dynamic error if `N` is `int`.
+}
+```
+
+
+## Syntax
+
+This feature has no effect on the grammar.
+
+
+## Static Analysis
+
+Let _i_ be a lexical token which is syntactically an _integer literal_ (as
+defined in the language specification section 16.3 Numbers). If _i_ occurs
+as an expression in a context where the expected type `T` is such that
+`double` is assignable to `T` and `int` is not assignable to `T` then we
+will say that _i_ is a _double valued integer literal_.
+
+The static type of a double valued integer literal is `double`.
+
+The _unbounded integer value_ of an integer literal _i_ is the mathematical
+integer (that is, unlimited in size and precision) that corresponds to the
+numeral consisting of the digits of _i_, using radix 16 when _i_ is prefixed
+by `0x` or `0X`, and radix 10 otherwise.
+
+It is a compile-time error if the unbounded integer value of a double
+valued integer literal is less than
+-(1−2<sup>−53</sup>) * 2<sup>1024</sup>
+and if it is greater
+than (1−2<sup>−53</sup>) * 2<sup>1024</sup>.
+
+It is a compile-time error if the unbounded integer value of a double
+valued integer literal cannot be represented exactly as an IEEE 754
+double-precision value, assuming that the mantissa is extended with zeros
+until the precision is sufficiently high to unambiguously specify a single
+integer value.
+
+*That is, we consider a IEEE 754 double-precision bit pattern to represent
+a specific number rather than an interval, namely the number which is
+obtained by extending the mantissa with zeros. In this case we are only
+interested in such bit patterns where the exponent part is large enough to
+make the represented number a whole number, which means that we will need
+to add a specific, finite number of zeros.*
+
+*Consequently,
+`double d = 18446744073709551614;`
+has no error and it will initialize `d` to have the double value
+represented as 0x43F0000000000000. But
+`int i = 18446744073709551614;`
+is a compile-time error because 18446744073709551614 is too large to be
+represented as a 64 bit 2's complement number, and
+`double d = 18446744073709551615;`
+is a compile-time error because it cannot be represented exactly using the
+IEEE 754 double-precision format.*
+
+
+## Dynamic Semantics
+
+At run time, evaluation of a double valued integer literal _i_ yields a
+value of type `double` which according to the IEEE 754 standard for
+double-precision numbers represents the unbounded integer value of _i_.
+
+Signed zeros in IEEE 754 present an ambiguity. It is resolved by
+evaluating an expression which is a unary minus applied to a double valued
+integer literal whose unbounded integer value is zero to the IEEE 754
+representation of `-0.0`, and other occurrences of a double valued integer
+literal whose unbounded integer value is zero to the representation of
+`0.0`.
+
+*We need not specify that the representation is extended with zeros as
+needed, because there is in any case only one IEEE 754 double-precision bit
+pattern that can be said to represent the given unbounded integer value: It
+would belong to the interval under any meaningful interpretation of such a
+bit pattern as an interval.*
+
+
+## Discussion
+
+We have chosen to make it an error when a double valued integer literal
+cannot be represented exactly by an IEEE 754 double-precision encoding. We
+could have chosen to allow for a certain deviation from that, such that it
+would be allowed to have a double valued integer literal whose unbounded
+integer value would differ "somewhat" from the nearest representable value.
+
+However, we felt that it would be misleading for developers to read a large
+double valued integer literal, probably assuming that every digit is
+contributing to the resulting double value, if in fact many of the digits
+are ignored, in the sense that they must be replaced by different digits in
+order to express the nearest representable IEEE double-precision value.
+
+For instance,
+11692013098647223344361828061502034755750757138432 is represented as
+0x4A20000000000000, but so is
+11692013098647223344638182605120307455757075314823, which means that
+the 29 least significant digits are replaced by completely different
+digits. The former corresponds to an extension of the IEEE representation
+with a suitable number of zeros in the mantissa which will translate back
+to exactly that number, and the latter is just some other number which is
+close enough to have the same IEEE representation as the nearest
+representable value.
+
+We expect such large double valued integer literals to occur very rarely,
+which means that such a situation will not arise very frequently. However,
+when it does arise it may be quite frustrating for developers to find a
+representable number, assuming that they start out with something like
+11692013098647223344638182605120307455757075314823. It is hence recommended
+that tools emit an error message where the nearest representable value is
+mentioned, such that a developer may copy it into the code in order to
+eliminate the error.
+
+Another alternative would be to accept only those double valued integer
+literals whose unbounded integer value can be represented as a 2's
+complement bit pattern in 64 bits or in an unsigned 64 bit representation,
+that is, only those which are also accepted as integer literals of type
+`int`. This would ensure that developers avoid the situation where a large
+number of digits are incorrectly taken to imply a very high precision.
+This is especially relevant with decimal double valued integer literals,
+because they do not end in a large number of zeros, which make them "look"
+like a high-precision number where every digit means something. However, we
+felt that this reduction of the expressive power brings so few benefits
+that we preferred the approach where also "large numbers" could be
+expressed using a double valued integer literal.
+
+
+## Updates
+
+* Version 0.4 (2018-08-14), adjusted rules to allow more expected types,
+ such as `FutureOr<double>`, for double valued integer literals.
+
+* Version 0.3 (2018-08-09), changed error rules such that it is now an
+ error for a double valued integer literal to have an unbounded
+ integer value which is not precisely representable.
+
+* Version 0.2 (2018-08-08), added short discussion section.
+
+* Version 0.1 (2018-08-07), initial version of this feature specification.
diff --git a/pkg/analysis_server/benchmark/benchmarks.dart b/pkg/analysis_server/benchmark/benchmarks.dart
index 15e1f81..713177c 100644
--- a/pkg/analysis_server/benchmark/benchmarks.dart
+++ b/pkg/analysis_server/benchmark/benchmarks.dart
@@ -70,9 +70,6 @@
help: 'Run a quick version of the benchmark. This is not useful for '
'gathering accurate times,\nbut can be used to validate that the '
'benchmark works.');
- argParser.addFlag('use-cfe',
- negatable: false,
- help: 'Benchmark against the Dart 2.0 front end implementation.');
argParser.addOption('repeat',
defaultsTo: '10', help: 'The number of times to repeat the benchmark.');
argParser.addFlag('verbose',
@@ -98,7 +95,6 @@
final String benchmarkId = argResults.rest.first;
final int repeatCount = int.parse(argResults['repeat'] as String);
final bool quick = argResults['quick'];
- final bool useCFE = argResults['use-cfe'];
final bool verbose = argResults['verbose'];
final Benchmark benchmark =
@@ -127,7 +123,6 @@
for (int iteration = 0; iteration < actualIterations; iteration++) {
BenchMarkResult newResult = await benchmark.run(
quick: quick,
- useCFE: useCFE,
verbose: verbose,
);
print(' $newResult');
@@ -166,7 +161,6 @@
Future<BenchMarkResult> run({
bool quick: false,
- bool useCFE: false,
bool verbose: false,
});
diff --git a/pkg/analysis_server/benchmark/perf/benchmarks_impl.dart b/pkg/analysis_server/benchmark/perf/benchmarks_impl.dart
index 940a344..0c460c2 100644
--- a/pkg/analysis_server/benchmark/perf/benchmarks_impl.dart
+++ b/pkg/analysis_server/benchmark/perf/benchmarks_impl.dart
@@ -28,7 +28,6 @@
@override
Future<BenchMarkResult> run({
bool quick: false,
- bool useCFE: false,
bool verbose: false,
}) async {
if (!quick) {
@@ -38,7 +37,7 @@
Stopwatch stopwatch = new Stopwatch()..start();
AnalysisServerMemoryUsageTest test = new AnalysisServerMemoryUsageTest();
- await test.setUp(useCFE: useCFE);
+ await test.setUp();
await test.subscribeToStatusNotifications();
await test.sendAnalysisSetAnalysisRoots(getProjectRoots(quick: quick), []);
await test.analysisFinished;
@@ -73,7 +72,6 @@
@override
Future<BenchMarkResult> run({
bool quick: false,
- bool useCFE: false,
bool verbose: false,
}) async {
Stopwatch stopwatch = new Stopwatch()..start();
@@ -82,7 +80,7 @@
if (verbose) {
test.debugStdio();
}
- await test.setUp(useCFE: useCFE);
+ await test.setUp();
await test.subscribeToStatusNotifications();
await test.sendAnalysisSetAnalysisRoots(getProjectRoots(quick: quick), []);
await test.analysisFinished;
diff --git a/pkg/analysis_server/benchmark/perf/flutter_analyze_benchmark.dart b/pkg/analysis_server/benchmark/perf/flutter_analyze_benchmark.dart
index 90fab47..3d0957e 100644
--- a/pkg/analysis_server/benchmark/perf/flutter_analyze_benchmark.dart
+++ b/pkg/analysis_server/benchmark/perf/flutter_analyze_benchmark.dart
@@ -63,7 +63,6 @@
@override
Future<BenchMarkResult> run({
bool quick: false,
- bool useCFE: false,
bool verbose: false,
}) async {
if (!quick) {
diff --git a/pkg/analysis_server/benchmark/perf/memory_tests.dart b/pkg/analysis_server/benchmark/perf/memory_tests.dart
index 4cb8b7f..ce762e8 100644
--- a/pkg/analysis_server/benchmark/perf/memory_tests.dart
+++ b/pkg/analysis_server/benchmark/perf/memory_tests.dart
@@ -65,7 +65,7 @@
* The server is automatically started before every test.
*/
@override
- Future setUp({bool useCFE: false}) {
+ Future setUp() {
onAnalysisErrors.listen((AnalysisErrorsParams params) {
currentAnalysisErrors[params.file] = params.errors;
});
@@ -78,7 +78,7 @@
outOfTestExpect(serverConnected.isCompleted, isFalse);
serverConnected.complete();
});
- return startServer(servicesPort: vmServicePort, cfe: useCFE).then((_) {
+ return startServer(servicesPort: vmServicePort).then((_) {
server.listenToOutput(dispatchNotification);
server.exitCode.then((_) {
skipShutdown = true;
diff --git a/pkg/analysis_server/bin/server.dart b/pkg/analysis_server/bin/server.dart
index f0d075f..8c669ff 100644
--- a/pkg/analysis_server/bin/server.dart
+++ b/pkg/analysis_server/bin/server.dart
@@ -7,7 +7,7 @@
/**
* Create and run an analysis server.
*/
-void main(List<String> args) {
+void main(List<String> args) async {
ServerStarter starter = new ServerStarter();
starter.start(args);
}
diff --git a/pkg/analysis_server/doc/api.html b/pkg/analysis_server/doc/api.html
index b4c45b6..5cfd272 100644
--- a/pkg/analysis_server/doc/api.html
+++ b/pkg/analysis_server/doc/api.html
@@ -109,7 +109,7 @@
<body>
<h1>Analysis Server API Specification</h1>
<h1 style="color:#999999">Version
- 1.20.5
+ 1.21.0
</h1>
<p>
This document contains a specification of the API provided by the
@@ -3248,6 +3248,12 @@
The name of the class enclosing this declaration. If the declaration
is not a class member, this field will be absent.
</p>
+ </dd><dt class="field"><b>mixinName: String<span style="color:#999999"> (optional)</span></b></dt><dd>
+
+ <p>
+ The name of the mixin enclosing this declaration. If the declaration
+ is not a mixin member, this field will be absent.
+ </p>
</dd><dt class="field"><b>parameters: String<span style="color:#999999"> (optional)</span></b></dt><dd>
<p>
@@ -3264,7 +3270,7 @@
An enumeration of the kinds of elements.
</p>
- <dl><dt class="value">CLASS</dt><dt class="value">CLASS_TYPE_ALIAS</dt><dt class="value">COMPILATION_UNIT</dt><dt class="value">CONSTRUCTOR</dt><dt class="value">CONSTRUCTOR_INVOCATION</dt><dt class="value">ENUM</dt><dt class="value">ENUM_CONSTANT</dt><dt class="value">FIELD</dt><dt class="value">FILE</dt><dt class="value">FUNCTION</dt><dt class="value">FUNCTION_INVOCATION</dt><dt class="value">FUNCTION_TYPE_ALIAS</dt><dt class="value">GETTER</dt><dt class="value">LABEL</dt><dt class="value">LIBRARY</dt><dt class="value">LOCAL_VARIABLE</dt><dt class="value">METHOD</dt><dt class="value">PARAMETER</dt><dt class="value">PREFIX</dt><dt class="value">SETTER</dt><dt class="value">TOP_LEVEL_VARIABLE</dt><dt class="value">TYPE_PARAMETER</dt><dt class="value">UNIT_TEST_GROUP</dt><dt class="value">UNIT_TEST_TEST</dt><dt class="value">UNKNOWN</dt></dl></dd><dt class="typeDefinition"><a name="type_ExecutableFile">ExecutableFile: object</a></dt><dd>
+ <dl><dt class="value">CLASS</dt><dt class="value">CLASS_TYPE_ALIAS</dt><dt class="value">COMPILATION_UNIT</dt><dt class="value">CONSTRUCTOR</dt><dt class="value">CONSTRUCTOR_INVOCATION</dt><dt class="value">ENUM</dt><dt class="value">ENUM_CONSTANT</dt><dt class="value">FIELD</dt><dt class="value">FILE</dt><dt class="value">FUNCTION</dt><dt class="value">FUNCTION_INVOCATION</dt><dt class="value">FUNCTION_TYPE_ALIAS</dt><dt class="value">GETTER</dt><dt class="value">LABEL</dt><dt class="value">LIBRARY</dt><dt class="value">LOCAL_VARIABLE</dt><dt class="value">METHOD</dt><dt class="value">MIXIN</dt><dt class="value">PARAMETER</dt><dt class="value">PREFIX</dt><dt class="value">SETTER</dt><dt class="value">TOP_LEVEL_VARIABLE</dt><dt class="value">TYPE_PARAMETER</dt><dt class="value">UNIT_TEST_GROUP</dt><dt class="value">UNIT_TEST_TEST</dt><dt class="value">UNKNOWN</dt></dl></dd><dt class="typeDefinition"><a name="type_ExecutableFile">ExecutableFile: object</a></dt><dd>
<p>
A description of an executable file.
</p>
diff --git a/pkg/analysis_server/lib/plugin/protocol/protocol_dart.dart b/pkg/analysis_server/lib/plugin/protocol/protocol_dart.dart
index 8ef13df..4d46fa6 100644
--- a/pkg/analysis_server/lib/plugin/protocol/protocol_dart.dart
+++ b/pkg/analysis_server/lib/plugin/protocol/protocol_dart.dart
@@ -100,8 +100,13 @@
* Return an [ElementKind] corresponding to the given [engine.Element].
*/
ElementKind convertElementToElementKind(engine.Element element) {
- if (element is engine.ClassElement && element.isEnum) {
- return ElementKind.ENUM;
+ if (element is engine.ClassElement) {
+ if (element.isEnum) {
+ return ElementKind.ENUM;
+ }
+ if (element.isMixin) {
+ return ElementKind.MIXIN;
+ }
}
if (element is engine.FieldElement &&
element.isEnumConstant &&
diff --git a/pkg/analysis_server/lib/protocol/protocol_generated.dart b/pkg/analysis_server/lib/protocol/protocol_generated.dart
index a1b9422..b1f5dce 100644
--- a/pkg/analysis_server/lib/protocol/protocol_generated.dart
+++ b/pkg/analysis_server/lib/protocol/protocol_generated.dart
@@ -9001,6 +9001,7 @@
* "codeOffset": int
* "codeLength": int
* "className": optional String
+ * "mixinName": optional String
* "parameters": optional String
* }
*
@@ -9025,6 +9026,8 @@
String _className;
+ String _mixinName;
+
String _parameters;
/**
@@ -9146,6 +9149,20 @@
}
/**
+ * The name of the mixin enclosing this declaration. If the declaration is
+ * not a mixin member, this field will be absent.
+ */
+ String get mixinName => _mixinName;
+
+ /**
+ * The name of the mixin enclosing this declaration. If the declaration is
+ * not a mixin member, this field will be absent.
+ */
+ void set mixinName(String value) {
+ this._mixinName = value;
+ }
+
+ /**
* The parameter list for the element. If the element is not a method or
* function this field will not be defined. If the element doesn't have
* parameters (e.g. getter), this field will not be defined. If the element
@@ -9169,7 +9186,7 @@
ElementDeclaration(String name, ElementKind kind, int fileIndex, int offset,
int line, int column, int codeOffset, int codeLength,
- {String className, String parameters}) {
+ {String className, String mixinName, String parameters}) {
this.name = name;
this.kind = kind;
this.fileIndex = fileIndex;
@@ -9179,6 +9196,7 @@
this.codeOffset = codeOffset;
this.codeLength = codeLength;
this.className = className;
+ this.mixinName = mixinName;
this.parameters = parameters;
}
@@ -9245,6 +9263,11 @@
className = jsonDecoder.decodeString(
jsonPath + ".className", json["className"]);
}
+ String mixinName;
+ if (json.containsKey("mixinName")) {
+ mixinName = jsonDecoder.decodeString(
+ jsonPath + ".mixinName", json["mixinName"]);
+ }
String parameters;
if (json.containsKey("parameters")) {
parameters = jsonDecoder.decodeString(
@@ -9252,7 +9275,7 @@
}
return new ElementDeclaration(
name, kind, fileIndex, offset, line, column, codeOffset, codeLength,
- className: className, parameters: parameters);
+ className: className, mixinName: mixinName, parameters: parameters);
} else {
throw jsonDecoder.mismatch(jsonPath, "ElementDeclaration", json);
}
@@ -9272,6 +9295,9 @@
if (className != null) {
result["className"] = className;
}
+ if (mixinName != null) {
+ result["mixinName"] = mixinName;
+ }
if (parameters != null) {
result["parameters"] = parameters;
}
@@ -9293,6 +9319,7 @@
codeOffset == other.codeOffset &&
codeLength == other.codeLength &&
className == other.className &&
+ mixinName == other.mixinName &&
parameters == other.parameters;
}
return false;
@@ -9310,6 +9337,7 @@
hash = JenkinsSmiHash.combine(hash, codeOffset.hashCode);
hash = JenkinsSmiHash.combine(hash, codeLength.hashCode);
hash = JenkinsSmiHash.combine(hash, className.hashCode);
+ hash = JenkinsSmiHash.combine(hash, mixinName.hashCode);
hash = JenkinsSmiHash.combine(hash, parameters.hashCode);
return JenkinsSmiHash.finish(hash);
}
diff --git a/pkg/analysis_server/lib/src/analysis_server.dart b/pkg/analysis_server/lib/src/analysis_server.dart
index 89d2fea..88d5252 100644
--- a/pkg/analysis_server/lib/src/analysis_server.dart
+++ b/pkg/analysis_server/lib/src/analysis_server.dart
@@ -366,9 +366,7 @@
new PluginWatcher(resourceProvider, pluginManager);
defaultContextOptions.generateImplicitErrors = false;
- defaultContextOptions.useFastaParser =
- options.useCFE || options.useFastaParser;
- defaultContextOptions.useCFE = options.useCFE;
+ defaultContextOptions.useFastaParser = options.useFastaParser;
{
String name = options.newAnalysisDriverLog;
@@ -1189,14 +1187,9 @@
CrashReportSender crashReportSender;
/**
- * Whether to enable the Dart 2.0 Common Front End implementation.
- */
- bool useCFE = false;
-
- /**
* Whether to enable parsing via the Fasta parser.
*/
- bool useFastaParser = false;
+ bool useFastaParser = true;
}
/**
@@ -1421,7 +1414,6 @@
builder.performanceLog = analysisServer._analysisPerformanceLogger;
builder.byteStore = analysisServer.byteStore;
builder.fileContentOverlay = analysisServer.fileContentOverlay;
- builder.useCFE = analysisServer.options.useCFE;
return builder;
}
diff --git a/pkg/analysis_server/lib/src/computer/computer_folding.dart b/pkg/analysis_server/lib/src/computer/computer_folding.dart
index 1a5a5c3..9488775 100644
--- a/pkg/analysis_server/lib/src/computer/computer_folding.dart
+++ b/pkg/analysis_server/lib/src/computer/computer_folding.dart
@@ -211,6 +211,15 @@
}
@override
+ Object visitMixinDeclaration(MixinDeclaration node) {
+ _computer._addRegionForAnnotations(node.metadata);
+ // TODO(brianwilkerson) Define `FoldingKind.MIXIN_BODY`?
+ _computer._addRegion(
+ node.leftBracket.end, node.rightBracket.offset, FoldingKind.CLASS_BODY);
+ return super.visitMixinDeclaration(node);
+ }
+
+ @override
Object visitPartDirective(PartDirective node) {
_computer._recordDirective(node);
return super.visitPartDirective(node);
diff --git a/pkg/analysis_server/lib/src/computer/computer_outline.dart b/pkg/analysis_server/lib/src/computer/computer_outline.dart
index 1d35cca..490f5b5 100644
--- a/pkg/analysis_server/lib/src/computer/computer_outline.dart
+++ b/pkg/analysis_server/lib/src/computer/computer_outline.dart
@@ -31,41 +31,19 @@
List<Outline> unitContents = <Outline>[];
for (CompilationUnitMember unitMember in unit.declarations) {
if (unitMember is ClassDeclaration) {
- ClassDeclaration classDeclaration = unitMember;
- List<Outline> classContents = <Outline>[];
- for (ClassMember classMember in classDeclaration.members) {
- if (classMember is ConstructorDeclaration) {
- ConstructorDeclaration constructorDeclaration = classMember;
- classContents.add(_newConstructorOutline(constructorDeclaration));
- }
- if (classMember is FieldDeclaration) {
- FieldDeclaration fieldDeclaration = classMember;
- VariableDeclarationList fields = fieldDeclaration.fields;
- if (fields != null) {
- TypeAnnotation fieldType = fields.type;
- String fieldTypeName = _safeToSource(fieldType);
- for (VariableDeclaration field in fields.variables) {
- classContents.add(_newVariableOutline(fieldTypeName,
- ElementKind.FIELD, field, fieldDeclaration.isStatic));
- }
- }
- }
- if (classMember is MethodDeclaration) {
- MethodDeclaration methodDeclaration = classMember;
- classContents.add(_newMethodOutline(methodDeclaration));
- }
- }
- unitContents.add(_newClassOutline(classDeclaration, classContents));
- }
- if (unitMember is EnumDeclaration) {
+ unitContents.add(_newClassOutline(
+ unitMember, _outlinesForMembers(unitMember.members)));
+ } else if (unitMember is MixinDeclaration) {
+ unitContents.add(_newMixinOutline(
+ unitMember, _outlinesForMembers(unitMember.members)));
+ } else if (unitMember is EnumDeclaration) {
EnumDeclaration enumDeclaration = unitMember;
List<Outline> constantOutlines = <Outline>[];
for (EnumConstantDeclaration constant in enumDeclaration.constants) {
constantOutlines.add(_newEnumConstant(constant));
}
unitContents.add(_newEnumOutline(enumDeclaration, constantOutlines));
- }
- if (unitMember is TopLevelVariableDeclaration) {
+ } else if (unitMember is TopLevelVariableDeclaration) {
TopLevelVariableDeclaration fieldDeclaration = unitMember;
VariableDeclarationList fields = fieldDeclaration.variables;
if (fields != null) {
@@ -76,16 +54,13 @@
fieldTypeName, ElementKind.TOP_LEVEL_VARIABLE, field, false));
}
}
- }
- if (unitMember is FunctionDeclaration) {
+ } else if (unitMember is FunctionDeclaration) {
FunctionDeclaration functionDeclaration = unitMember;
unitContents.add(_newFunctionOutline(functionDeclaration, true));
- }
- if (unitMember is ClassTypeAlias) {
+ } else if (unitMember is ClassTypeAlias) {
ClassTypeAlias alias = unitMember;
unitContents.add(_newClassTypeAlias(alias));
- }
- if (unitMember is FunctionTypeAlias) {
+ } else if (unitMember is FunctionTypeAlias) {
FunctionTypeAlias alias = unitMember;
unitContents.add(_newFunctionTypeAliasOutline(alias));
}
@@ -280,6 +255,21 @@
return _nodeOutline(method, element, contents);
}
+ Outline _newMixinOutline(MixinDeclaration node, List<Outline> mixinContents) {
+ node.firstTokenAfterCommentAndMetadata;
+ SimpleIdentifier nameNode = node.name;
+ String name = nameNode.name;
+ Element element = new Element(
+ ElementKind.MIXIN,
+ name,
+ Element.makeFlags(
+ isPrivate: Identifier.isPrivateName(name),
+ isDeprecated: _isDeprecated(node)),
+ location: _getLocationNode(nameNode),
+ typeParameters: _getTypeParametersStr(node.typeParameters));
+ return _nodeOutline(node, element, mixinContents);
+ }
+
Outline _newUnitOutline(List<Outline> unitContents) {
Element element = new Element(
ElementKind.COMPILATION_UNIT, '<unit>', Element.makeFlags(),
@@ -332,6 +322,33 @@
children: nullIfEmpty(children));
}
+ List<Outline> _outlinesForMembers(List<ClassMember> members) {
+ List<Outline> memberOutlines = <Outline>[];
+ for (ClassMember classMember in members) {
+ if (classMember is ConstructorDeclaration) {
+ ConstructorDeclaration constructorDeclaration = classMember;
+ memberOutlines.add(_newConstructorOutline(constructorDeclaration));
+ }
+ if (classMember is FieldDeclaration) {
+ FieldDeclaration fieldDeclaration = classMember;
+ VariableDeclarationList fields = fieldDeclaration.fields;
+ if (fields != null) {
+ TypeAnnotation fieldType = fields.type;
+ String fieldTypeName = _safeToSource(fieldType);
+ for (VariableDeclaration field in fields.variables) {
+ memberOutlines.add(_newVariableOutline(fieldTypeName,
+ ElementKind.FIELD, field, fieldDeclaration.isStatic));
+ }
+ }
+ }
+ if (classMember is MethodDeclaration) {
+ MethodDeclaration methodDeclaration = classMember;
+ memberOutlines.add(_newMethodOutline(methodDeclaration));
+ }
+ }
+ return memberOutlines;
+ }
+
static String _getTypeParametersStr(TypeParameterList parameters) {
if (parameters == null) {
return null;
diff --git a/pkg/analysis_server/lib/src/computer/computer_overrides.dart b/pkg/analysis_server/lib/src/computer/computer_overrides.dart
index aeefe45..92be0a4 100644
--- a/pkg/analysis_server/lib/src/computer/computer_overrides.dart
+++ b/pkg/analysis_server/lib/src/computer/computer_overrides.dart
@@ -136,14 +136,6 @@
_OverriddenElementsFinder(Element seed) {
_seed = seed;
_class = seed.enclosingElement;
- if (_class == null) {
- // TODO(brianwilkerson) Remove this code when the issue has been fixed
- // (https://github.com/dart-lang/sdk/issues/25884)
- Type type = seed.runtimeType;
- String name = seed.name;
- throw new ArgumentError(
- 'The $type named $name does not have an enclosing element');
- }
_library = _class.library;
_name = seed.displayName;
if (seed is MethodElement) {
diff --git a/pkg/analysis_server/lib/src/computer/computer_signature.dart b/pkg/analysis_server/lib/src/computer/computer_signature.dart
index 95ec45f..b213ef1 100644
--- a/pkg/analysis_server/lib/src/computer/computer_signature.dart
+++ b/pkg/analysis_server/lib/src/computer/computer_signature.dart
@@ -31,6 +31,11 @@
// Find the closest argument list.
var argsNode = _node;
while (argsNode != null && !(argsNode is ArgumentList)) {
+ // Certain nodes don't make sense to search above for an argument list
+ // (for example when inside a function epxression).
+ if (argsNode is FunctionExpression) {
+ return null;
+ }
argsNode = argsNode.parent;
}
diff --git a/pkg/analysis_server/lib/src/search/search_domain.dart b/pkg/analysis_server/lib/src/search/search_domain.dart
index 805344d..65be43a 100644
--- a/pkg/analysis_server/lib/src/search/search_domain.dart
+++ b/pkg/analysis_server/lib/src/search/search_domain.dart
@@ -180,6 +180,8 @@
return protocol.ElementKind.GETTER;
case search.DeclarationKind.METHOD:
return protocol.ElementKind.METHOD;
+ case search.DeclarationKind.MIXIN:
+ return protocol.ElementKind.MIXIN;
case search.DeclarationKind.SETTER:
return protocol.ElementKind.SETTER;
case search.DeclarationKind.VARIABLE:
@@ -216,6 +218,7 @@
declaration.codeOffset,
declaration.codeLength,
className: declaration.className,
+ mixinName: declaration.mixinName,
parameters: declaration.parameters);
}).toList();
diff --git a/pkg/analysis_server/lib/src/server/driver.dart b/pkg/analysis_server/lib/src/server/driver.dart
index 439c653..59a43f0 100644
--- a/pkg/analysis_server/lib/src/server/driver.dart
+++ b/pkg/analysis_server/lib/src/server/driver.dart
@@ -255,11 +255,6 @@
static const String CACHE_FOLDER = "cache";
/**
- * Whether to enable the Dart 2.0 Common Front End implementation.
- */
- static const String USE_CFE = "use-cfe";
-
- /**
* Whether to enable parsing via the Fasta parser.
*/
static const String USE_FASTA_PARSER = "use-fasta-parser";
@@ -312,7 +307,6 @@
analysisServerOptions.clientId = results[CLIENT_ID];
analysisServerOptions.clientVersion = results[CLIENT_VERSION];
analysisServerOptions.cacheFolder = results[CACHE_FOLDER];
- analysisServerOptions.useCFE = results[USE_CFE];
analysisServerOptions.useFastaParser = results[USE_FASTA_PARSER];
bool disableAnalyticsForSession = results[SUPPRESS_ANALYTICS_FLAG];
@@ -455,16 +449,14 @@
() async {
// We first analyze code with an empty driver cache.
- print('Analyzing${analysisServerOptions.useCFE ? ' using CFE' : ''} '
- 'with an empty driver cache:');
+ print('Analyzing with an empty driver cache:');
int exitCode = await devServer.processDirectories([trainDirectory]);
if (exitCode != 0) exit(exitCode);
print('');
// Then again with a populated cache.
- print('Analyzing${analysisServerOptions.useCFE ? ' using CFE' : ''} '
- 'with a populated driver cache:');
+ print('Analyzing with a populated driver cache:');
exitCode = await devServer.processDirectories([trainDirectory]);
if (exitCode != 0) exit(exitCode);
@@ -479,17 +471,7 @@
// ignore any exception
}
- if (!analysisServerOptions.useCFE) {
- print('');
-
- // And then run everything again with CFE to train both frontends.
- List<String> args = new List<String>.from(arguments);
- args.add("--use-cfe");
- ServerStarter starter = new ServerStarter();
- starter.start(args);
- } else {
- exit(exitCode);
- }
+ exit(exitCode);
}();
} else {
_captureExceptions(instrumentationService, () {
@@ -600,9 +582,8 @@
help: "[path] path to the location where to cache data");
parser.addFlag("preview-dart-2",
help: "Enable the Dart 2.0 preview (deprecated)", hide: true);
- parser.addFlag(USE_CFE,
- help: "Enable the Dart 2.0 Common Front End implementation");
parser.addFlag(USE_FASTA_PARSER,
+ defaultsTo: true,
help: "Whether to enable parsing via the Fasta parser");
parser.addOption(TRAIN_USING,
help: "Pass in a directory to analyze for purposes of training an "
diff --git a/pkg/analysis_server/lib/src/services/completion/dart/keyword_contributor.dart b/pkg/analysis_server/lib/src/services/completion/dart/keyword_contributor.dart
index 8079bf0..1db3c05 100644
--- a/pkg/analysis_server/lib/src/services/completion/dart/keyword_contributor.dart
+++ b/pkg/analysis_server/lib/src/services/completion/dart/keyword_contributor.dart
@@ -188,11 +188,20 @@
if (previousMember.leftBracket == null ||
previousMember.leftBracket.isSynthetic) {
// If the prior member is an unfinished class declaration
- // then the user is probably finishing that
+ // then the user is probably finishing that.
_addClassDeclarationKeywords(previousMember);
return;
}
}
+ if (previousMember is MixinDeclaration) {
+ if (previousMember.leftBracket == null ||
+ previousMember.leftBracket.isSynthetic) {
+ // If the prior member is an unfinished mixin declaration
+ // then the user is probably finishing that.
+ _addMixinDeclarationKeywords(previousMember);
+ return;
+ }
+ }
if (previousMember is ImportDirective) {
if (previousMember.semicolon == null ||
previousMember.semicolon.isSynthetic) {
@@ -464,6 +473,28 @@
}
@override
+ visitMixinDeclaration(MixinDeclaration node) {
+ // Don't suggest mixin name
+ if (entity == node.name) {
+ return;
+ }
+ if (entity == node.rightBracket) {
+ _addClassBodyKeywords();
+ } else if (entity is ClassMember) {
+ _addClassBodyKeywords();
+ int index = node.members.indexOf(entity);
+ ClassMember previous = index > 0 ? node.members[index - 1] : null;
+ if (previous is MethodDeclaration && isEmptyBody(previous.body)) {
+ _addSuggestion(Keyword.ASYNC);
+ _addSuggestion2(ASYNC_STAR);
+ _addSuggestion2(SYNC_STAR);
+ }
+ } else {
+ _addMixinDeclarationKeywords(node);
+ }
+ }
+
+ @override
visitNamedExpression(NamedExpression node) {
if (entity is SimpleIdentifier && entity == node.expression) {
_addExpressionKeywords(node);
@@ -644,6 +675,17 @@
}
}
+ void _addMixinDeclarationKeywords(MixinDeclaration node) {
+ // Very simplistic suggestion because analyzer will warn if
+ // the on / implements clauses are out of order
+ if (node.onClause == null) {
+ _addSuggestion(Keyword.ON, DART_RELEVANCE_HIGH);
+ }
+ if (node.implementsClause == null) {
+ _addSuggestion(Keyword.IMPLEMENTS, DART_RELEVANCE_HIGH);
+ }
+ }
+
void _addStatementKeywords(AstNode node) {
if (_inClassMemberBody(node)) {
_addSuggestions([Keyword.SUPER, Keyword.THIS]);
diff --git a/pkg/analysis_server/lib/src/services/completion/postfix/postfix_completion.dart b/pkg/analysis_server/lib/src/services/completion/postfix/postfix_completion.dart
index 9908d9b..12ebc38 100644
--- a/pkg/analysis_server/lib/src/services/completion/postfix/postfix_completion.dart
+++ b/pkg/analysis_server/lib/src/services/completion/postfix/postfix_completion.dart
@@ -547,6 +547,10 @@
}
Expression _findOuterExpression(AstNode start, InterfaceType builtInType) {
+ if (start is SimpleIdentifier && start.staticElement is PrefixElement) {
+ return null;
+ }
+
AstNode parent;
if (start is Expression) {
parent = start;
@@ -556,13 +560,16 @@
if (parent == null) {
return null;
}
+
var list = <Expression>[];
while (parent is Expression) {
list.add(parent);
parent = parent.parent;
}
+
Expression expr = list.firstWhere((expr) {
DartType type = expr.staticType;
+ if (type == null) return false;
if (type.isSubtypeOf(builtInType)) return true;
Element element = type.element;
if (element is TypeDefiningElement) {
diff --git a/pkg/analysis_server/lib/src/services/correction/assist.dart b/pkg/analysis_server/lib/src/services/correction/assist.dart
index 7767e39..5e797f0 100644
--- a/pkg/analysis_server/lib/src/services/correction/assist.dart
+++ b/pkg/analysis_server/lib/src/services/correction/assist.dart
@@ -84,6 +84,8 @@
const AssistKind('dart.assist.flutter.wrap.center', 30, "Center widget");
static const FLUTTER_WRAP_COLUMN = const AssistKind(
'dart.assist.flutter.wrap.column', 30, "Wrap with Column");
+ static const FLUTTER_WRAP_CONTAINER = const AssistKind(
+ 'dart.assist.flutter.wrap.container', 30, "Wrap with Container");
static const FLUTTER_WRAP_GENERIC = const AssistKind(
'dart.assist.flutter.wrap.generic', 30, "Wrap with new widget");
static const FLUTTER_WRAP_PADDING =
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 78aecdb..4768ba4 100644
--- a/pkg/analysis_server/lib/src/services/correction/assist_internal.dart
+++ b/pkg/analysis_server/lib/src/services/correction/assist_internal.dart
@@ -1827,6 +1827,13 @@
return !flutter.isExactWidgetTypeCenter(expr.staticType);
});
await _addProposal_flutterWrapWidgetImpl(
+ kind: DartAssistKind.FLUTTER_WRAP_CONTAINER,
+ parentLibraryUri: flutter.WIDGETS_LIBRARY_URI,
+ parentClassName: 'Container',
+ widgetValidator: (expr) {
+ return !flutter.isExactWidgetTypeContainer(expr.staticType);
+ });
+ await _addProposal_flutterWrapWidgetImpl(
kind: DartAssistKind.FLUTTER_WRAP_PADDING,
parentLibraryUri: flutter.WIDGETS_LIBRARY_URI,
parentClassName: 'Padding',
diff --git a/pkg/analysis_server/lib/src/status/diagnostics.dart b/pkg/analysis_server/lib/src/status/diagnostics.dart
index b4fc191..7fc00fd 100644
--- a/pkg/analysis_server/lib/src/status/diagnostics.dart
+++ b/pkg/analysis_server/lib/src/status/diagnostics.dart
@@ -1305,8 +1305,6 @@
h3('Status');
buf.writeln(writeOption('Use fasta parser',
diagnosticsSite.socketServer.analysisServerOptions.useFastaParser));
- buf.writeln(writeOption('Use common front end',
- diagnosticsSite.socketServer.analysisServerOptions.useCFE));
buf.writeln(writeOption('Instrumentation enabled',
AnalysisEngine.instance.instrumentationService.isActive));
buf.writeln(writeOption('Server process ID', pid));
diff --git a/pkg/analysis_server/lib/src/utilities/flutter.dart b/pkg/analysis_server/lib/src/utilities/flutter.dart
index ce4d959..db72512 100644
--- a/pkg/analysis_server/lib/src/utilities/flutter.dart
+++ b/pkg/analysis_server/lib/src/utilities/flutter.dart
@@ -13,6 +13,8 @@
const _BASIC_URI = "package:flutter/src/widgets/basic.dart";
const _CENTER_NAME = "Center";
+const _CONTAINER_NAME = "Container";
+const _CONTAINER_URI = "package:flutter/src/widgets/container.dart";
const _PADDING_NAME = "Padding";
const _STATE_NAME = "State";
const _STATEFUL_WIDGET_NAME = "StatefulWidget";
@@ -283,6 +285,14 @@
}
/**
+ * Return `true` if the given [type] is the Flutter class `Container`.
+ */
+bool isExactWidgetTypeContainer(DartType type) {
+ return type is InterfaceType &&
+ _isExactWidget(type.element, _CONTAINER_NAME, _CONTAINER_URI);
+}
+
+/**
* Return `true` if the given [type] is the Flutter class `Padding`.
*/
bool isExactWidgetTypePadding(DartType type) {
diff --git a/pkg/analysis_server/test/abstract_context.dart b/pkg/analysis_server/test/abstract_context.dart
index 9f91783..40a157d 100644
--- a/pkg/analysis_server/test/abstract_context.dart
+++ b/pkg/analysis_server/test/abstract_context.dart
@@ -15,6 +15,7 @@
import 'package:analyzer/src/file_system/file_system.dart';
import 'package:analyzer/src/generated/engine.dart';
import 'package:analyzer/src/generated/engine.dart' as engine;
+import 'package:analyzer/src/generated/parser.dart' as analyzer;
import 'package:analyzer/src/generated/sdk.dart';
import 'package:analyzer/src/generated/source_io.dart';
import 'package:analyzer/src/source/package_map_resolver.dart';
@@ -58,11 +59,6 @@
AnalysisDriver get driver => _driver;
- /**
- * Return `true` to enable the Dart 2.0 Common Front End.
- */
- bool get useCFE => false;
-
void addFlutterPackage() {
addMetaPackageSource();
Folder libFolder = configureFlutterPackage(resourceProvider);
@@ -153,8 +149,7 @@
new ContextRoot(resourceProvider.convertPath('/project'), [],
pathContext: resourceProvider.pathContext),
sourceFactory,
- new AnalysisOptionsImpl()..useFastaParser = useCFE,
- useCFE: useCFE);
+ new AnalysisOptionsImpl()..useFastaParser = analyzer.Parser.useFasta);
scheduler.start();
AnalysisEngine.instance.logger = PrintLogger.instance;
}
diff --git a/pkg/analysis_server/test/analysis/get_errors_test.dart b/pkg/analysis_server/test/analysis/get_errors_test.dart
index a99cf1c..8649fcc 100644
--- a/pkg/analysis_server/test/analysis/get_errors_test.dart
+++ b/pkg/analysis_server/test/analysis/get_errors_test.dart
@@ -16,7 +16,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(GetErrorsTest);
- defineReflectiveTests(GetErrorsTest_UseCFE);
});
}
@@ -149,19 +148,3 @@
return new AnalysisGetErrorsResult.fromResponse(response).errors;
}
}
-
-@reflectiveTest
-class GetErrorsTest_UseCFE extends GetErrorsTest {
- @override
- bool get useCFE => true;
-
- @failingTest
- @override
- test_errorInPart() => super.test_errorInPart();
-
- @override
- test_fileDoesNotExist() => super.test_fileDoesNotExist();
-
- @override
- test_removeContextAfterRequest() => super.test_removeContextAfterRequest();
-}
diff --git a/pkg/analysis_server/test/analysis/get_hover_test.dart b/pkg/analysis_server/test/analysis/get_hover_test.dart
index ef203c77..e2e60a6 100644
--- a/pkg/analysis_server/test/analysis/get_hover_test.dart
+++ b/pkg/analysis_server/test/analysis/get_hover_test.dart
@@ -14,7 +14,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(AnalysisHoverTest);
- defineReflectiveTests(AnalysisHoverTest_UseCFE);
});
}
@@ -613,9 +612,3 @@
expect(hover, isNull);
}
}
-
-@reflectiveTest
-class AnalysisHoverTest_UseCFE extends AnalysisHoverTest {
- @override
- bool get useCFE => true;
-}
diff --git a/pkg/analysis_server/test/analysis/get_navigation_test.dart b/pkg/analysis_server/test/analysis/get_navigation_test.dart
index 7d7cc7b..c2d0241 100644
--- a/pkg/analysis_server/test/analysis/get_navigation_test.dart
+++ b/pkg/analysis_server/test/analysis/get_navigation_test.dart
@@ -14,7 +14,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(GetNavigationTest);
- defineReflectiveTests(GetNavigationTest_UseCFE);
});
}
@@ -247,9 +246,3 @@
regions = result.regions;
}
}
-
-@reflectiveTest
-class GetNavigationTest_UseCFE extends GetNavigationTest {
- @override
- bool get useCFE => true;
-}
diff --git a/pkg/analysis_server/test/analysis/get_signature_test.dart b/pkg/analysis_server/test/analysis/get_signature_test.dart
index 12b1174..fdf651e 100644
--- a/pkg/analysis_server/test/analysis/get_signature_test.dart
+++ b/pkg/analysis_server/test/analysis/get_signature_test.dart
@@ -15,7 +15,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(AnalysisSignatureTest);
- defineReflectiveTests(AnalysisSignatureTest_UseCFE);
});
}
@@ -439,29 +438,19 @@
expect(result.parameters[1],
equals(new ParameterInfo(ParameterKind.NAMED, "length", "int")));
}
+
+ test_does_not_walk_up_over_closure() async {
+ addTestFile('''
+one(String name, int length) {}
+main() {
+ one("Danny", () {
+ /*^*/
+ });
}
-
-@reflectiveTest
-class AnalysisSignatureTest_UseCFE extends AnalysisSignatureTest {
- @override
- bool get useCFE => true;
-
- @failingTest
- @override
- test_error_file_not_analyzed() async => super.test_error_file_not_analyzed();
-
- @failingTest
- @override
- test_function_named_with_default_int() async =>
- super.test_function_named_with_default_int();
-
- @failingTest
- @override
- test_function_named_with_default_string() async =>
- super.test_function_named_with_default_string();
-
- @failingTest
- @override
- test_function_optional_with_default() async =>
- super.test_function_optional_with_default();
+''');
+ var result = await prepareRawSignature('/*^*/');
+ expect(result.error, isNotNull);
+ expect(result.error.code,
+ equals(RequestErrorCode.GET_SIGNATURE_UNKNOWN_FUNCTION));
+ }
}
diff --git a/pkg/analysis_server/test/analysis/notification_analysis_options_test.dart b/pkg/analysis_server/test/analysis/notification_analysis_options_test.dart
index 0749064..90b04f2 100644
--- a/pkg/analysis_server/test/analysis/notification_analysis_options_test.dart
+++ b/pkg/analysis_server/test/analysis/notification_analysis_options_test.dart
@@ -18,9 +18,7 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(NewAnalysisOptionsFileNotificationTest);
- defineReflectiveTests(NewAnalysisOptionsFileNotificationTest_UseCFE);
defineReflectiveTests(OldAnalysisOptionsFileNotificationTest);
- defineReflectiveTests(OldAnalysisOptionsFileNotificationTest_UseCFE);
});
}
@@ -271,22 +269,8 @@
}
@reflectiveTest
-class NewAnalysisOptionsFileNotificationTest_UseCFE
- extends NewAnalysisOptionsFileNotificationTest {
- @override
- bool get useCFE => true;
-}
-
-@reflectiveTest
class OldAnalysisOptionsFileNotificationTest
extends AnalysisOptionsFileNotificationTest {
@override
String get optionsFilePath => '$projectPath/.analysis_options';
}
-
-@reflectiveTest
-class OldAnalysisOptionsFileNotificationTest_UseCFE
- extends OldAnalysisOptionsFileNotificationTest {
- @override
- bool get useCFE => true;
-}
diff --git a/pkg/analysis_server/test/analysis/notification_analyzedFiles_test.dart b/pkg/analysis_server/test/analysis/notification_analyzedFiles_test.dart
index 7227629..56b2399 100644
--- a/pkg/analysis_server/test/analysis/notification_analyzedFiles_test.dart
+++ b/pkg/analysis_server/test/analysis/notification_analyzedFiles_test.dart
@@ -16,7 +16,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(AnalysisNotificationAnalyzedFilesTest);
- defineReflectiveTests(AnalysisNotificationAnalyzedFilesTest_UseCFE);
});
}
@@ -129,10 +128,3 @@
removeGeneralAnalysisSubscription(GeneralAnalysisService.ANALYZED_FILES);
}
}
-
-@reflectiveTest
-class AnalysisNotificationAnalyzedFilesTest_UseCFE
- extends AnalysisNotificationAnalyzedFilesTest {
- @override
- bool get useCFE => true;
-}
diff --git a/pkg/analysis_server/test/analysis/notification_closingLabels_test.dart b/pkg/analysis_server/test/analysis/notification_closingLabels_test.dart
index a4e64be..d09ef04 100644
--- a/pkg/analysis_server/test/analysis/notification_closingLabels_test.dart
+++ b/pkg/analysis_server/test/analysis/notification_closingLabels_test.dart
@@ -15,7 +15,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(AnalysisNotificationClosingLabelsTest);
- defineReflectiveTests(AnalysisNotificationClosingLabelsTest_UseCFE);
});
}
@@ -100,10 +99,3 @@
return _labelsReceived.future;
}
}
-
-@reflectiveTest
-class AnalysisNotificationClosingLabelsTest_UseCFE
- extends AnalysisNotificationClosingLabelsTest {
- @override
- bool get useCFE => true;
-}
diff --git a/pkg/analysis_server/test/analysis/notification_errors_test.dart b/pkg/analysis_server/test/analysis/notification_errors_test.dart
index c953e2c..e281b04 100644
--- a/pkg/analysis_server/test/analysis/notification_errors_test.dart
+++ b/pkg/analysis_server/test/analysis/notification_errors_test.dart
@@ -20,7 +20,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(NotificationErrorsTest);
- defineReflectiveTests(NotificationErrorsTest_UseCFE);
});
}
@@ -198,17 +197,7 @@
List<AnalysisError> errors = filesErrors[testFile];
expect(errors, hasLength(1));
AnalysisError error = errors[0];
- expect(error.severity, AnalysisErrorSeverity.WARNING);
+ expect(error.severity, AnalysisErrorSeverity.ERROR);
expect(error.type, AnalysisErrorType.STATIC_WARNING);
}
}
-
-@reflectiveTest
-class NotificationErrorsTest_UseCFE extends NotificationErrorsTest {
- @override
- bool get useCFE => true;
-
- @failingTest
- @override
- test_importError() async => super.test_importError();
-}
diff --git a/pkg/analysis_server/test/analysis/notification_folding_test.dart b/pkg/analysis_server/test/analysis/notification_folding_test.dart
index c9a8816..3adbf5b 100644
--- a/pkg/analysis_server/test/analysis/notification_folding_test.dart
+++ b/pkg/analysis_server/test/analysis/notification_folding_test.dart
@@ -16,7 +16,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(AnalysisNotificationFoldingTest);
- defineReflectiveTests(AnalysisNotificationFoldingTest_UseCFE);
});
}
@@ -97,10 +96,3 @@
return _regionsReceived.future;
}
}
-
-@reflectiveTest
-class AnalysisNotificationFoldingTest_UseCFE
- extends AnalysisNotificationFoldingTest {
- @override
- bool get useCFE => true;
-}
diff --git a/pkg/analysis_server/test/analysis/notification_highlights_test.dart b/pkg/analysis_server/test/analysis/notification_highlights_test.dart
index c15d95f..a23abb2 100644
--- a/pkg/analysis_server/test/analysis/notification_highlights_test.dart
+++ b/pkg/analysis_server/test/analysis/notification_highlights_test.dart
@@ -12,12 +12,10 @@
import 'package:test_reflective_loader/test_reflective_loader.dart';
import '../analysis_abstract.dart';
-import '../test_utilities/utillities.dart';
main() {
defineReflectiveSuite(() {
defineReflectiveTests(AnalysisNotificationHighlightsTest);
- defineReflectiveTests(AnalysisNotificationHighlightsTest_UseCFE);
defineReflectiveTests(HighlightTypeTest);
});
}
@@ -966,60 +964,6 @@
}
@reflectiveTest
-class AnalysisNotificationHighlightsTest_UseCFE
- extends AnalysisNotificationHighlightsTest {
- @override
- bool get useCFE => true;
-
- @failingTest
- @override
- test_BUILT_IN_hide() async {
- fail('Timeout');
-// return callFailingTest(super.test_BUILT_IN_hide);
- }
-
- @failingTest
- @override
- test_BUILT_IN_import() async {
- fail('Timeout');
-// return callFailingTest(super.test_BUILT_IN_import);
- }
-
- @failingTest
- @override
- test_BUILT_IN_native() async {
- fail('Timeout');
-// return callFailingTest(super.test_BUILT_IN_native);
- }
-
- @failingTest
- @override
- test_BUILT_IN_show() async {
- fail('Timeout');
-// return callFailingTest(super.test_BUILT_IN_show);
- }
-
- @failingTest
- @override
- test_DIRECTIVE() async {
- fail('Timeout');
-// return callFailingTest(super.test_DIRECTIVE);
- }
-
- @failingTest
- @override
- test_TOP_LEVEL_VARIABLE() async =>
- callFailingTest(super.test_TOP_LEVEL_VARIABLE);
-
- @failingTest
- @override
- test_TYPE_NAME_DYNAMIC() async {
- fail('Timeout');
-// return callFailingTest(super.test_TYPE_NAME_DYNAMIC);
- }
-}
-
-@reflectiveTest
class HighlightTypeTest {
void test_constructor() {
expect(HighlightRegionType.CLASS,
diff --git a/pkg/analysis_server/test/analysis/notification_highlights_test2.dart b/pkg/analysis_server/test/analysis/notification_highlights_test2.dart
index 9bde8f4..4fef09a 100644
--- a/pkg/analysis_server/test/analysis/notification_highlights_test2.dart
+++ b/pkg/analysis_server/test/analysis/notification_highlights_test2.dart
@@ -16,7 +16,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(AnalysisNotificationHighlightsTest);
- defineReflectiveTests(AnalysisNotificationHighlightsTest_UseCFE);
defineReflectiveTests(HighlightTypeTest);
});
}
@@ -1116,55 +1115,6 @@
}
@reflectiveTest
-class AnalysisNotificationHighlightsTest_UseCFE
- extends AnalysisNotificationHighlightsTest {
- @override
- bool get useCFE => true;
-
- @failingTest
- @override
- test_BUILT_IN_hide() async {
- fail('Timeout');
-// return callFailingTest(super.test_BUILT_IN_hide);
- }
-
- @failingTest
- @override
- test_BUILT_IN_import() async {
- fail('Timeout');
-// return callFailingTest(super.test_BUILT_IN_import);
- }
-
- @failingTest
- @override
- test_BUILT_IN_native() async {
- fail('Timeout');
-// return callFailingTest(super.test_BUILT_IN_native);
- }
-
- @failingTest
- @override
- test_BUILT_IN_show() async {
- fail('Timeout');
-// return callFailingTest(super.test_BUILT_IN_show);
- }
-
- @failingTest
- @override
- test_DIRECTIVE() async {
- fail('Timeout');
-// return callFailingTest(super.test_DIRECTIVE);
- }
-
- @failingTest
- @override
- test_TYPE_NAME_DYNAMIC() async {
- fail('Timeout');
-// return callFailingTest(super.test_TYPE_NAME_DYNAMIC);
- }
-}
-
-@reflectiveTest
class HighlightTypeTest {
void test_constructor() {
expect(HighlightRegionType.CLASS,
diff --git a/pkg/analysis_server/test/analysis/notification_implemented_test.dart b/pkg/analysis_server/test/analysis/notification_implemented_test.dart
index 7066b02..ebcd3a7 100644
--- a/pkg/analysis_server/test/analysis/notification_implemented_test.dart
+++ b/pkg/analysis_server/test/analysis/notification_implemented_test.dart
@@ -16,7 +16,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(AnalysisNotificationImplementedTest);
- defineReflectiveTests(AnalysisNotificationImplementedTest_UseCFE);
});
}
@@ -430,10 +429,3 @@
return waitForNotification(30000);
}
}
-
-@reflectiveTest
-class AnalysisNotificationImplementedTest_UseCFE
- extends AnalysisNotificationImplementedTest {
- @override
- bool get useCFE => true;
-}
diff --git a/pkg/analysis_server/test/analysis/notification_navigation_test.dart b/pkg/analysis_server/test/analysis/notification_navigation_test.dart
index 890f511..8035395 100644
--- a/pkg/analysis_server/test/analysis/notification_navigation_test.dart
+++ b/pkg/analysis_server/test/analysis/notification_navigation_test.dart
@@ -16,7 +16,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(AnalysisNotificationNavigationTest);
- defineReflectiveTests(AnalysisNotificationNavigationTest_UseCFE);
});
}
@@ -1031,58 +1030,3 @@
assertNoRegionAt('var');
}
}
-
-@reflectiveTest
-class AnalysisNotificationNavigationTest_UseCFE
- extends AnalysisNotificationNavigationTest {
- @override
- bool get useCFE => true;
-
- @failingTest
- @override
- test_inComment() async => super.test_inComment();
-
- @failingTest
- @override
- test_library() async => super.test_library();
-
- @failingTest
- @override
- test_multiplyDefinedElement() async {
- fail('Timeout');
-// return callFailingTest(super.test_multiplyDefinedElement);
- }
-
- @failingTest
- @override
- test_partOf() async => super.test_partOf();
-
- @failingTest
- @override
- test_string_export() async => super.test_string_export();
-
- @failingTest
- @override
- test_string_export_unresolvedUri() async {
- fail('Timeout');
-// return callFailingTest(super.test_string_export_unresolvedUri);
- }
-
- @failingTest
- @override
- test_string_import() async => super.test_string_import();
-
- @failingTest
- @override
- test_string_import_unresolvedUri() async {
- fail('Timeout');
-// return callFailingTest(super.test_string_import_unresolvedUri);
- }
-
- @failingTest
- @override
- test_string_part_unresolvedUri() async {
- fail('Timeout');
-// return callFailingTest(super.test_string_part_unresolvedUri);
- }
-}
diff --git a/pkg/analysis_server/test/analysis/notification_occurrences_test.dart b/pkg/analysis_server/test/analysis/notification_occurrences_test.dart
index 33cf3b4..df66d76 100644
--- a/pkg/analysis_server/test/analysis/notification_occurrences_test.dart
+++ b/pkg/analysis_server/test/analysis/notification_occurrences_test.dart
@@ -16,7 +16,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(AnalysisNotificationOccurrencesTest);
- defineReflectiveTests(AnalysisNotificationOccurrencesTest_UseCFE);
});
}
@@ -256,10 +255,3 @@
findRegion(offset, 'void'.length, false);
}
}
-
-@reflectiveTest
-class AnalysisNotificationOccurrencesTest_UseCFE
- extends AnalysisNotificationOccurrencesTest {
- @override
- bool get useCFE => true;
-}
diff --git a/pkg/analysis_server/test/analysis/notification_outline_test.dart b/pkg/analysis_server/test/analysis/notification_outline_test.dart
index c3b4118..a358bba 100644
--- a/pkg/analysis_server/test/analysis/notification_outline_test.dart
+++ b/pkg/analysis_server/test/analysis/notification_outline_test.dart
@@ -16,7 +16,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(AnalysisNotificationOutlineTest);
- defineReflectiveTests(AnalysisNotificationOutlineTest_UseCFE);
});
}
@@ -134,24 +133,3 @@
expect(outline.children, hasLength(2));
}
}
-
-@reflectiveTest
-class AnalysisNotificationOutlineTest_UseCFE
- extends AnalysisNotificationOutlineTest {
- @override
- bool get useCFE => true;
-
- @failingTest
- @override
- test_libraryName_hasLibraryPartOfDirectives() async {
- fail('Timeout');
-// return callFailingTest(super.test_libraryName_hasLibraryPartOfDirectives);
- }
-
- @failingTest
- @override
- test_libraryName_hasPartOfDirective() async {
- fail('Timeout');
-// return callFailingTest(super.test_libraryName_hasPartOfDirective);
- }
-}
diff --git a/pkg/analysis_server/test/analysis/notification_overrides_test.dart b/pkg/analysis_server/test/analysis/notification_overrides_test.dart
index 5942c7c..aa9a69d 100644
--- a/pkg/analysis_server/test/analysis/notification_overrides_test.dart
+++ b/pkg/analysis_server/test/analysis/notification_overrides_test.dart
@@ -15,7 +15,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(AnalysisNotificationOverridesTest);
- defineReflectiveTests(AnalysisNotificationOverridesTest_UseCFE);
});
}
@@ -625,17 +624,3 @@
assertNoInterfaceMembers();
}
}
-
-@reflectiveTest
-class AnalysisNotificationOverridesTest_UseCFE
- extends AnalysisNotificationOverridesTest {
- @override
- bool get useCFE => true;
-
- @failingTest
- @override
- test_super_method_superTypeCycle() async {
- fail('Timeout');
-// return callFailingTest(super.test_super_method_superTypeCycle);
- }
-}
diff --git a/pkg/analysis_server/test/analysis/reanalyze_test.dart b/pkg/analysis_server/test/analysis/reanalyze_test.dart
index 1110cf1..886b200 100644
--- a/pkg/analysis_server/test/analysis/reanalyze_test.dart
+++ b/pkg/analysis_server/test/analysis/reanalyze_test.dart
@@ -16,7 +16,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(ReanalyzeTest);
- defineReflectiveTests(ReanalyzeTest_UseCFE);
});
}
@@ -74,9 +73,3 @@
}
}
}
-
-@reflectiveTest
-class ReanalyzeTest_UseCFE extends ReanalyzeTest {
- @override
- bool get useCFE => true;
-}
diff --git a/pkg/analysis_server/test/analysis/set_priority_files_test.dart b/pkg/analysis_server/test/analysis/set_priority_files_test.dart
index 176326a..993fb07 100644
--- a/pkg/analysis_server/test/analysis/set_priority_files_test.dart
+++ b/pkg/analysis_server/test/analysis/set_priority_files_test.dart
@@ -16,7 +16,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(SetPriorityFilesTest);
- defineReflectiveTests(SetPriorityFilesTest_UseCFE);
});
}
@@ -130,9 +129,3 @@
expect(prioritySources, [path]);
}
}
-
-@reflectiveTest
-class SetPriorityFilesTest_UseCFE extends SetPriorityFilesTest {
- @override
- bool get useCFE => true;
-}
diff --git a/pkg/analysis_server/test/analysis/update_content_test.dart b/pkg/analysis_server/test/analysis/update_content_test.dart
index 0a61b91..44161349 100644
--- a/pkg/analysis_server/test/analysis/update_content_test.dart
+++ b/pkg/analysis_server/test/analysis/update_content_test.dart
@@ -18,7 +18,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(UpdateContentTest);
- defineReflectiveTests(UpdateContentTest_UseCFE);
});
}
@@ -264,9 +263,3 @@
return sources;
}
}
-
-@reflectiveTest
-class UpdateContentTest_UseCFE extends UpdateContentTest {
- @override
- bool get useCFE => true;
-}
diff --git a/pkg/analysis_server/test/analysis_abstract.dart b/pkg/analysis_server/test/analysis_abstract.dart
index 4ab0fdd..3610b68 100644
--- a/pkg/analysis_server/test/analysis_abstract.dart
+++ b/pkg/analysis_server/test/analysis_abstract.dart
@@ -73,12 +73,6 @@
AnalysisDriver get testDiver => server.getAnalysisDriver(testFile);
- /**
- * Return `true` if the CFE should be used to perform analysis. Subclasses
- * can override the getter to change the default behavior.
- */
- bool get useCFE => false;
-
void addAnalysisSubscription(AnalysisService service, String file) {
// add file to subscription
var files = analysisSubscriptions[service];
@@ -121,8 +115,7 @@
//
// Create server
//
- AnalysisServerOptions options = new AnalysisServerOptions()
- ..useCFE = useCFE;
+ AnalysisServerOptions options = new AnalysisServerOptions();
return new AnalysisServer(
serverChannel,
resourceProvider,
diff --git a/pkg/analysis_server/test/benchmarks_test.dart b/pkg/analysis_server/test/benchmarks_test.dart
index 355a0e9..96c4c0f 100644
--- a/pkg/analysis_server/test/benchmarks_test.dart
+++ b/pkg/analysis_server/test/benchmarks_test.dart
@@ -46,25 +46,6 @@
expect(r.exitCode, 0,
reason: 'exit: ${r.exitCode}\n${r.stdout}\n${r.stderr}');
});
-
- // TODO(scheglov): Restore similar test coverage when the front-end API
- // allows it. See https://github.com/dart-lang/sdk/issues/33520.
- // test('$benchmarkId-use-cfe', () {
- // ProcessResult r = Process.runSync(
- // Platform.resolvedExecutable,
- // [
- // path.join('benchmark', 'benchmarks.dart'),
- // 'run',
- // '--repeat=1',
- // '--quick',
- // '--use-cfe',
- // benchmarkId
- // ],
- // workingDirectory: _serverSourcePath,
- // );
- // expect(r.exitCode, 0,
- // reason: 'exit: ${r.exitCode}\n${r.stdout}\n${r.stderr}');
- // });
}
});
}
diff --git a/pkg/analysis_server/test/completion_test.dart b/pkg/analysis_server/test/completion_test.dart
index 2b9adb9b..5bed630 100644
--- a/pkg/analysis_server/test/completion_test.dart
+++ b/pkg/analysis_server/test/completion_test.dart
@@ -56,12 +56,9 @@
class Date { static Date JUN, JUL;}class X { m() { return Da!1te.JU!2L; }}''',
<String>["1+Date", "2+JUN", "2+JUL"]);
- buildTests(
- 'testCommentSnippets007',
- '''
+ buildTests('testCommentSnippets007', '''
class C {mth(Map x, !1) {}mtf(!2, Map x) {}m() {for (in!3t i=0; i<5; i++); A!4 x;}}class int{}class Arrays{}''',
- <String>["1+bool", "2+bool", "3+int", "4+Arrays"],
- cfeFailingTests: '1234');
+ <String>["1+bool", "2+bool", "3+int", "4+Arrays"]);
buildTests('testCommentSnippets008', '''
class Date{}final num M = Dat!1''', <String>["1+Date"]);
@@ -81,16 +78,11 @@
"6-Map",
"6+implements"
],
- cfeFailingTests: '123456',
failingTests: '46');
// space, char, eol are important
- buildTests(
- 'testCommentSnippets010',
- '''
-class x implements !1{}''',
- <String>["1+Map"],
- cfeFailingTests: '1');
+ buildTests('testCommentSnippets010', '''
+class x implements !1{}''', <String>["1+Map"]);
// space, char, eol are important
buildTests('testCommentSnippets011', '''
@@ -152,37 +144,30 @@
class q {num m() {var q; num x=!1 q!3 + !2/**/;}}''',
<String>["1+q", "2+q", "3+q"]);
- buildTests(
- 'testCommentSnippets026',
- '''
-class List{}class a implements !1{}''',
- <String>["1+List"],
- cfeFailingTests: '1');
+ buildTests('testCommentSnippets026', '''
+class List{}class a implements !1{}''', <String>["1+List"]);
buildTests('testCommentSnippets027', '''
class String{}class List{}class test <X extends !1String!2> {}''',
<String>["1+List", "2+String", "2-List"]);
- buildTests(
- 'testCommentSnippets028',
- '''
+ buildTests('testCommentSnippets028', '''
class String{}class List{}class DateTime{}typedef T Y<T extends !1>(List input);''',
- <String>["1+DateTime", "1+String"],
- cfeFailingTests: '1');
+ <String>["1+DateTime", "1+String"]);
+ // https://github.com/dart-lang/sdk/issues/33992
buildTests(
'testCommentSnippets029',
'''
interface A<X> default B<X extends !1List!2> {}''',
<String>["1+DateTime", "2+List"],
- cfeFailingTests: '12');
+ failingTests: '12');
buildTests(
'testCommentSnippets030',
'''
class Bar<T extends Foo> {const Bar(!1T!2 k);T!3 m(T!4 a, T!5 b){}final T!6 f = null;}''',
<String>["1+T", "2+T", "3+T", "4+T", "5+T", "6+T"],
- cfeFailingTests: '123456',
failingTests: '123456');
buildTests(
@@ -190,7 +175,6 @@
'''
class Bar<T extends Foo> {m(x){if (x is !1) return;if (x is!!!2)}}''',
<String>["1+Bar", "1+T", "2+T", "2+Bar"],
- cfeFailingTests: '12',
failingTests: '12');
buildTests(
@@ -198,7 +182,6 @@
'''
class Fit{}class Bar<T extends Fooa> {const !2F!1ara();}''',
<String>["1+Fit", "1+Fara", "1-Bar", "2+Fit"],
- cfeFailingTests: '1',
failingTests: '1');
// Type propagation
@@ -214,12 +197,9 @@
buildTests('testCommentSnippets036', '''
class List{}t3() {var x=new List!1}''', <String>["1+List"]);
- buildTests(
- 'testCommentSnippets037',
- '''
+ buildTests('testCommentSnippets037', '''
class List{factory List.from(){}}t3() {var x=new List.!1}''',
- <String>["1+from"],
- cfeFailingTests: '1');
+ <String>["1+from"]);
buildTests('testCommentSnippets038', '''
f(){int xa; String s = '\$x!1';}''', <String>["1+xa"]);
@@ -337,7 +317,6 @@
x(!1);
}''',
<String>["1+v", "2+void"],
- cfeFailingTests: '2',
failingTests: '2');
buildTests('testCommentSnippets059', '''
@@ -617,9 +596,9 @@
'''
class Foo {this.!1}''',
<String>["1-Object"],
- cfeFailingTests: '1',
failingTests: '1');
+ // https://github.com/dart-lang/sdk/issues/33992
buildTests(
'testCommentSnippets082',
'''
@@ -629,7 +608,7 @@
var v = (HttpRequest req, HttpResp!1)
}''',
<String>["1+HttpResponse"],
- cfeFailingTests: '1');
+ failingTests: '1');
buildTests('testCommentSnippets083', '''
main() {(.!1)}''', <String>["1-toString"]);
@@ -649,7 +628,6 @@
'''
class Q{f(){xy() {!2};x!1y();}}''',
<String>["1+xy", "2+f", "2-xy"],
- cfeFailingTests: '2',
failingTests: '2');
buildTests('testCommentSnippets087', '''
@@ -723,7 +701,6 @@
"5-xyb",
"5-xza"
],
- cfeFailingTests: '123',
failingTests: '123');
buildTests('testCommentSnippets090', '''
@@ -749,7 +726,6 @@
"1+aaa",
"1+bbb"
],
- cfeFailingTests: '1',
failingTests: '1');
buildTests(
@@ -763,24 +739,19 @@
main() {
}''',
<String>["1+fooConst", "1-fooNotConst", "1-bar"],
- cfeFailingTests: '1',
failingTests: '1');
- buildTests(
- 'testCompletion_annotation_type',
- '''
+ buildTests('testCompletion_annotation_type', '''
class AAA {
const AAA({int a, int b});
const AAA.nnn(int c, int d);
}
@AAA!1
main() {
-}''',
- <String>[
- "1+AAA" /*":" + ProposalKind.CONSTRUCTOR*/,
- "1+AAA.nnn" /*":" + ProposalKind.CONSTRUCTOR*/
- ],
- cfeFailingTests: '1');
+}''', <String>[
+ "1+AAA" /*":" + ProposalKind.CONSTRUCTOR*/,
+ "1+AAA.nnn" /*":" + ProposalKind.CONSTRUCTOR*/
+ ]);
buildTests('testCompletion_annotation_type_inClass_withoutMember', '''
class AAA {
@@ -789,7 +760,9 @@
class C {
@A!1
-}''', <String>["1+AAA" /*":" + ProposalKind.CONSTRUCTOR*/]);
+}''', <String>[
+ "1+AAA" /*":" + ProposalKind.CONSTRUCTOR*/
+ ]);
buildTests('testCompletion_argument_typeName', '''
class Enum {
@@ -869,7 +842,6 @@
'''
class X { X(this.field); int f!1ield;}''',
<String>["1+field"],
- cfeFailingTests: '1',
failingTests: '1');
buildTests(
@@ -883,7 +855,6 @@
new A.first(!1);
}''',
<String>["1+A.first", "1-A.second"],
- cfeFailingTests: '1',
failingTests: '1');
buildTests(
@@ -894,7 +865,6 @@
new m.Random(!1);
}''',
<String>["1+Random:ARGUMENT_LIST"],
- cfeFailingTests: '1',
failingTests: '1');
buildTests('testCompletion_dartDoc_reference_forClass', '''
@@ -936,7 +906,6 @@
"3+functionB",
"3-int"
],
- cfeFailingTests: '1',
failingTests: '1');
buildTests(
@@ -958,7 +927,6 @@
"3+FunctionB",
"3-int"
],
- cfeFailingTests: '1',
failingTests: '1');
buildTests('testCompletion_dartDoc_reference_forMethod', '''
@@ -1031,20 +999,16 @@
"3+str" /*",rel=" + (CompletionProposal.RELEVANCE_DEFAULT + 0)*/
]);
- buildTests(
- 'testCompletion_export_dart',
- '''
+ buildTests('testCompletion_export_dart', '''
import 'dart:math
import 'dart:_chrome
import 'dart:_collection.dev
-export 'dart:!1''',
- <String>[
- "1+dart:core",
- "1+dart:math",
- "1-dart:_chrome",
- "1-dart:_collection.dev"
- ],
- cfeFailingTests: '1');
+export 'dart:!1''', <String>[
+ "1+dart:core",
+ "1+dart:math",
+ "1-dart:_chrome",
+ "1-dart:_collection.dev"
+ ]);
buildTests(
'testCompletion_export_noStringLiteral_noSemicolon',
@@ -1053,26 +1017,23 @@
class A {}''',
<String>["1+'dart:!';", "1+'package:!';"],
- cfeFailingTests: '1',
failingTests: '1');
buildTests('testCompletion_forStmt_vars', '''
class int{}class Foo { mth() { for (in!1t i = 0; i!2 < 5; i!3++); }}''',
<String>["1+int", "2+i", "3+i"]);
- buildTests(
- 'testCompletion_function',
- '''
+ buildTests('testCompletion_function', '''
class Foo { int boo = 7; mth() { PNGS.sort((String a, Str!1) => a.compareTo(b)); }}''',
- <String>["1+String"],
- cfeFailingTests: '1');
+ <String>["1+String"]);
+ // https://github.com/dart-lang/sdk/issues/33992
buildTests(
'testCompletion_function_partial',
'''
class Foo { int boo = 7; mth() { PNGS.sort((String a, Str!1)); }}''',
<String>["1+String"],
- cfeFailingTests: '1');
+ failingTests: '1');
buildTests(
'testCompletion_functionTypeParameter_namedArgument',
@@ -1082,7 +1043,6 @@
fff(1, 2, !1)!2;
}''',
<String>["1+x1", "2-x2"],
- cfeFailingTests: '1',
failingTests: '1');
buildTests('testCompletion_ifStmt_field1', '''
@@ -1128,7 +1088,6 @@
x.!1;
}''',
<String>["1+a", "1+x", "1+y"],
- cfeFailingTests: '1',
failingTests: '1');
buildTests(
@@ -1147,26 +1106,21 @@
x.!1;
}''',
<String>["1+a", "1-x", "1-y"],
- cfeFailingTests: '1',
failingTests: '1');
buildTests('testCompletion_import', '''
import '!1';''', <String>["1+dart:!", "1+package:!"]);
- buildTests(
- 'testCompletion_import_dart',
- '''
+ buildTests('testCompletion_import_dart', '''
import 'dart:math
import 'dart:_chrome
import 'dart:_collection.dev
-import 'dart:!1''',
- <String>[
- "1+dart:core",
- "1+dart:math",
- "1-dart:_chrome",
- "1-dart:_collection.dev"
- ],
- cfeFailingTests: '1');
+import 'dart:!1''', <String>[
+ "1+dart:core",
+ "1+dart:math",
+ "1-dart:_chrome",
+ "1-dart:_collection.dev"
+ ]);
buildTests('testCompletion_import_hasStringLiteral_noSemicolon', '''
import '!1'
@@ -1178,7 +1132,6 @@
'''
import!1''',
<String>["1+ 'dart:!';", "1+ 'package:!';"],
- cfeFailingTests: '1',
failingTests: '1');
buildTests(
@@ -1186,7 +1139,6 @@
'''
import !1;''',
<String>["1+'dart:!'", "1+'package:!'"],
- cfeFailingTests: '1',
failingTests: '1');
buildTests(
@@ -1196,7 +1148,6 @@
class A {}''',
<String>["1+'dart:!';", "1+'package:!';"],
- cfeFailingTests: '1',
failingTests: '1');
buildTests('testCompletion_incompleteClassMember', '''
@@ -1222,7 +1173,6 @@
1 + 2 * str.!3.length;
}''',
<String>["1+codeUnits", "2+codeUnits", "3+codeUnits"],
- cfeFailingTests: '123',
failingTests: '123');
// no checks, but no exceptions
@@ -1240,12 +1190,9 @@
import '!1''',
<String>["1+my_lib.dart"],
extraFiles: <String, String>{"/my_lib.dart": ""},
- cfeFailingTests: '1',
failingTests: '1');
- buildTests(
- 'testCompletion_is',
- '''
+ buildTests('testCompletion_is', '''
class MyClass {}
main(p) {
var isVariable;
@@ -1253,17 +1200,16 @@
var v1 = p is MyCla!2;
var v2 = p is !3;
var v2 = p is!4;
-}''',
- <String>[
- "1+MyClass",
- "2+MyClass",
- "3+MyClass",
- "3-v1",
- "4+is",
- "4-isVariable"
- ],
- cfeFailingTests: '1234');
+}''', <String>[
+ "1+MyClass",
+ "2+MyClass",
+ "3+MyClass",
+ "3-v1",
+ "4+is",
+ "4-isVariable"
+ ]);
+ // https://github.com/dart-lang/sdk/issues/33992
buildTests(
'testCompletion_is_asIdentifierStart',
'''
@@ -1273,7 +1219,7 @@
var v2 = is!2
}''',
<String>["1+isVisible", "2+isVisible"],
- cfeFailingTests: '12');
+ failingTests: '12');
buildTests('testCompletion_is_asPrefixedIdentifierStart', '''
class A {
@@ -1331,7 +1277,6 @@
"1+myFuncInt" /*":" + ProposalKind.METHOD_NAME*/,
"1-myFuncDouble" /*":" + ProposalKind.METHOD_NAME*/
],
- cfeFailingTests: '1',
failingTests: '1');
buildTests(
@@ -1349,7 +1294,6 @@
"1+myFunc" /*":" + ProposalKind.METHOD*/,
"1-myFunc" /*":" + ProposalKind.METHOD_NAME*/
],
- cfeFailingTests: '1',
failingTests: '1');
buildTests('testCompletion_methodRef_asArg_ofFunctionType', '''
@@ -1364,19 +1308,14 @@
"1+myFunc" /*":" + ProposalKind.METHOD_NAME*/
]);
- buildTests(
- 'testCompletion_namedArgument_alreadyUsed',
- '''
-func({foo}) {} main() { func(foo: 0, fo!1); }''',
- <String>["1-foo"],
- cfeFailingTests: '1');
+ buildTests('testCompletion_namedArgument_alreadyUsed', '''
+func({foo}) {} main() { func(foo: 0, fo!1); }''', <String>["1-foo"]);
buildTests(
'testCompletion_namedArgument_constructor',
'''
class A {A({foo, bar}) {}} main() { new A(fo!1); }''',
<String>["1+foo", "1-bar"],
- cfeFailingTests: '1',
failingTests: '1');
buildTests(
@@ -1387,7 +1326,6 @@
"1+foo" /*":" + ProposalKind.NAMED_ARGUMENT*/,
"1-foo" /*":" + ProposalKind.OPTIONAL_ARGUMENT*/
],
- cfeFailingTests: '1',
failingTests: '1');
buildTests(
@@ -1395,7 +1333,6 @@
'''
func({foo, bar}) {} main() { func(fo!1); }''',
<String>["1+foo", "1-bar"],
- cfeFailingTests: '1',
failingTests: '1');
buildTests('testCompletion_namedArgument_notNamed', '''
@@ -1437,7 +1374,6 @@
"2+bar" /*":"
+ ProposalKind.OPTIONAL_ARGUMENT*/
],
- cfeFailingTests: '12',
failingTests: '12');
buildTests(
@@ -1455,7 +1391,6 @@
"2+bar" /*":"
+ ProposalKind.OPTIONAL_ARGUMENT*/
],
- cfeFailingTests: '12',
failingTests: '12');
buildTests(
@@ -1476,21 +1411,16 @@
"1-bar,potential=false,declaringType=B",
"1+bar,potential=true,declaringType=B"
],
- cfeFailingTests: '1',
failingTests: '1');
- buildTests(
- 'testCompletion_privateElement_sameLibrary_constructor',
- '''
+ buildTests('testCompletion_privateElement_sameLibrary_constructor', '''
class A {
A._c();
A.c();
}
main() {
new A.!1
-}''',
- <String>["1+_c", "1+c"],
- cfeFailingTests: '1');
+}''', <String>["1+_c", "1+c"]);
buildTests('testCompletion_privateElement_sameLibrary_member', '''
class A {
@@ -1549,9 +1479,7 @@
class num{}class Sunflower {static final n!2um MAX_D = 300;nu!3m xc, yc;Sun!4flower() {x!Xc = y!Yc = MA!1 }}''',
<String>["1+MAX_D", "X+xc", "Y+yc", "2+num", "3+num", "4+Sunflower"]);
- buildTests(
- 'testCompletion_super_superType',
- '''
+ buildTests('testCompletion_super_superType', '''
class A {
var fa;
ma() {}
@@ -1562,9 +1490,7 @@
main() {
super.!1
}
-}''',
- <String>["1+fa", "1-fb", "1+ma", "1-mb"],
- cfeFailingTests: '1');
+}''', <String>["1+fa", "1-fb", "1+ma", "1-mb"]);
buildTests(
'testCompletion_superConstructorInvocation_noNamePrefix',
@@ -1578,7 +1504,6 @@
B() : super.!1
}''',
<String>["1+fooA", "1+fooB", "1+bar"],
- cfeFailingTests: '1',
failingTests: '1');
buildTests(
@@ -1593,7 +1518,6 @@
B() : super.f!1
}''',
<String>["1+fooA", "1+fooB", "1-bar"],
- cfeFailingTests: '1',
failingTests: '1');
buildTests(
@@ -1604,7 +1528,6 @@
A() : f = this.!1;
}''',
<String>["1-toString"],
- cfeFailingTests: '1',
failingTests: '1');
buildTests(
@@ -1614,7 +1537,6 @@
var f = this.!1;
}''',
<String>["1-toString"],
- cfeFailingTests: '1',
failingTests: '1');
buildTests(
@@ -1626,7 +1548,6 @@
}
}''',
<String>["1-toString"],
- cfeFailingTests: '1',
failingTests: '1');
buildTests(
@@ -1636,7 +1557,6 @@
this.!1;
}''',
<String>["1-toString"],
- cfeFailingTests: '1',
failingTests: '1');
buildTests(
@@ -1644,7 +1564,6 @@
'''
var v = this.!1;''',
<String>["1-toString"],
- cfeFailingTests: '1',
failingTests: '1');
buildTests('testCompletion_this_OK_inConstructorBody', '''
@@ -1701,7 +1620,6 @@
}''',
<String>["1+cos", "1-sin", "1+libFunction"],
extraFiles: sources,
- cfeFailingTests: '1',
failingTests: '1');
buildTests('test_importPrefix_hideCombinator', '''
@@ -1733,7 +1651,6 @@
}''',
<String>["1+foo"],
extraFiles: sources,
- cfeFailingTests: '1',
failingTests: '1');
sources.clear();
@@ -1751,7 +1668,6 @@
new A.!1
}''',
<String>["1-_c", "1+c"],
- cfeFailingTests: '1',
failingTests: '1');
sources.clear();
@@ -1770,7 +1686,6 @@
}''',
<String>["1-_f", "1+f"],
extraFiles: sources,
- cfeFailingTests: '1',
failingTests: '1');
sources.clear();
@@ -1787,7 +1702,6 @@
throw new Seria!1lizationException();}''',
<String>["1+SerializationException"],
extraFiles: sources,
- cfeFailingTests: '1',
failingTests: '1');
// Type propagation.
@@ -1796,13 +1710,12 @@
'testLibrary002',
'''t2() {var q=[0],z=q.!1length;q.!2clear();}''',
<String>["1+length", "1+isEmpty", "2+clear"],
- cfeFailingTests: '1',
failingTests: '1');
// TODO Include corelib analysis
buildTests('testLibrary003', '''class X{var q; f() {q.!1a!2}}''',
<String>["1+end", "2+abs", "2-end"],
- cfeFailingTests: '12', failingTests: '12');
+ failingTests: '12');
// TODO Include corelib analysis
// Resolving dart:html takes between 2.5s and 30s; json, about 0.12s
@@ -1825,7 +1738,7 @@
// TODO Include corelib analysis
buildTests('testLibrary005',
'''var PHI;main(){PHI=5.3;PHI.abs().!1 Object x;}''', <String>["1+abs"],
- cfeFailingTests: '1', failingTests: '1');
+ failingTests: '1');
// Exercise import and export handling.
// Libraries are defined in partial order of increasing dependency.
@@ -1862,7 +1775,6 @@
}''',
<String>["1+i1", "1+i2", "1+e1a", "1+e2a", "1+e1b"],
extraFiles: sources,
- cfeFailingTests: '1',
failingTests: '1');
// Exercise import and export handling.
@@ -1881,7 +1793,6 @@
}''',
<String>["1+l1t", "1-_l1t", "2-_l1t"],
extraFiles: sources,
- cfeFailingTests: '12',
failingTests: '1');
// Check private library exclusion
@@ -1912,7 +1823,6 @@
}''',
<String>["1-privateMethod", "1+publicMethod"],
extraFiles: sources,
- cfeFailingTests: '1',
failingTests: '1');
// Exercise library prefixes.
@@ -1953,7 +1863,6 @@
"4-X"
],
extraFiles: sources,
- cfeFailingTests: '1234',
failingTests: '1234');
}
@@ -1993,7 +1902,6 @@
g() => new A.!3c();
}''',
<String>["1+x", "2+b", "3+c"],
- cfeFailingTests: '12',
failingTests: '12');
buildTests(
@@ -2027,7 +1935,6 @@
"3+vim",
"3-A"
],
- cfeFailingTests: '1',
failingTests: '1');
buildTests('test006', '''
@@ -2063,7 +1970,6 @@
"7-Dclass",
"7-Ctype",
],
- cfeFailingTests: '2346',
failingTests: '2346');
// keywords
@@ -2085,7 +1991,6 @@
"6+num",
"7+typedef"
],
- cfeFailingTests: '1234',
failingTests: '1234');
buildTests(
@@ -2114,13 +2019,12 @@
"D-List",
"D-test"
],
- cfeFailingTests: '23',
failingTests: '23');
// name generation with conflicts
buildTests('test011', '''r2(var object, Object object1, Object !1);''',
<String>["1+object2"],
- cfeFailingTests: '1', failingTests: '1');
+ failingTests: '1');
// reserved words
buildTests(
@@ -2141,7 +2045,6 @@
"3+true",
"4+toString"
],
- cfeFailingTests: '123',
failingTests: '123');
// conditions & operators
@@ -2176,7 +2079,6 @@
"9+==",
"0+k"
],
- cfeFailingTests: '689',
failingTests: '689');
// keywords
@@ -2223,19 +2125,17 @@
"K+else",
"L+return"
],
- cfeFailingTests: '123456789ABCDEFGHJKL',
failingTests: '3CK');
// operators in function
buildTests('test015', '''f(a,b,c) => a + b * c !1;''', <String>["1+=="],
- cfeFailingTests: '1', failingTests: '1');
+ failingTests: '1');
// operators in return
buildTests(
'test016',
'''class X {dynamic f(a,b,c) {return a + b * c !1;}}''',
<String>["1+=="],
- cfeFailingTests: '1',
failingTests: '1');
// keywords
@@ -2255,13 +2155,12 @@
"7+show",
"8-null"
],
- cfeFailingTests: '12345678',
failingTests: '234567'); //TODO(jwren) 234 failing as correct selection
// offset assertions can't be passed into buildTests(..)
// keywords
buildTests('test018', '''!1part !2of foo;''', <String>["1+part", "2+of"],
- cfeFailingTests: '12', failingTests: '12');
+ failingTests: '12');
buildTests('test019', '''
var truefalse = 0;
@@ -2288,17 +2187,13 @@
}''', <String>["1+getKeys", "2+getKeys"]);
// Note lack of semicolon following completion location
- buildTests(
- 'test024',
- '''
+ buildTests('test024', '''
class List{factory List.from(Iterable other) {}}
class F {
f() {
new List.!1
}
-}''',
- <String>["1+from"],
- cfeFailingTests: '1');
+}''', <String>["1+from"]);
buildTests('test025', '''
class R {
@@ -2355,8 +2250,9 @@
buildTests(
'test027', '''m(){try{}catch(eeee,ssss){s!1}''', <String>["1+ssss"]);
+ // https://github.com/dart-lang/sdk/issues/33992
buildTests('test028', '''m(){var isX=3;if(is!1)''', <String>["1+isX"],
- cfeFailingTests: '1');
+ failingTests: '1');
buildTests('test029', '''m(){[1].forEach((x)=>!1x);}''', <String>["1+x"]);
@@ -2396,7 +2292,6 @@
'test033',
'''class A{}class B extends A{b(){}}class C implements A {c(){}}class X{x(){A f;f.!1}}''',
<String>["1+b", "1-c"],
- cfeFailingTests: '1',
failingTests: '1');
// TODO(scheglov) decide what to do with Type for untyped field (not
@@ -2429,7 +2324,6 @@
}
}''',
<String>["1+top", "2+top"],
- cfeFailingTests: '12',
failingTests: '12');
// test analysis of untyped fields and top-level vars
@@ -2455,7 +2349,6 @@
a.field.!2
}''',
<String>["1+round", "2+round"],
- cfeFailingTests: '12',
failingTests: '12');
buildTests(
@@ -2467,7 +2360,6 @@
new HtS!1
}''',
<String>["1+HttpServer", "1-HttpClient"],
- cfeFailingTests: '1',
failingTests: '1');
buildTests(
@@ -2488,7 +2380,6 @@
}
}''',
<String>["1+y", "1-x", "2+x", "2-y"],
- cfeFailingTests: '2',
failingTests: '2');
// test analysis of untyped fields and top-level vars
@@ -2498,17 +2389,17 @@
// test arg lists with named params
buildTests('test040', '''m(){f(a, b, {x1, x2, y}) {};f(1, 2, !1)!2;}''',
<String>["1+x1", "2-x2"],
- cfeFailingTests: '1', failingTests: '1');
+ failingTests: '1');
// test arg lists with named params
buildTests('test041', '''m(){f(a, b, {x1, x2, y}) {};f(1, 2, !1''',
<String>["1+x1", "1+x2", "1+y"],
- cfeFailingTests: '1', failingTests: '1');
+ failingTests: '1');
// test arg lists with named params
buildTests('test042', '''m(){f(a, b, {x1, x2, y}) {};f(1, 2, !1;!2''',
<String>["1+x1", "1+x2", "2-y"],
- cfeFailingTests: '1', failingTests: '1');
+ failingTests: '1');
}
void buildOtherTests() {
@@ -2538,13 +2429,11 @@
*
* Optional argument [failingTests], if given, is a string, each character of
* which corresponds to an X in the [originalSource] for which the test is
- * expected to fail. This sould be used to mark known completion bugs that
+ * expected to fail. This should be used to mark known completion bugs that
* have not yet been fixed.
*/
void buildTests(String baseName, String originalSource, List<String> results,
- {String cfeFailingTests: '',
- Map<String, String> extraFiles,
- String failingTests: ''}) {
+ {Map<String, String> extraFiles, String failingTests: ''}) {
List<LocationSpec> completionTests =
LocationSpec.from(originalSource, results);
completionTests.sort((LocationSpec first, LocationSpec second) {
@@ -2568,7 +2457,6 @@
}
for (LocationSpec spec in completionTests) {
String testName = '$baseName-${spec.id}';
- // Non-CFE
if (failingTests.contains(spec.id)) {
++expectedFailCount;
test("$testName (expected failure $expectedFailCount)", () {
@@ -2584,27 +2472,6 @@
return test.runTest(spec, extraFiles);
});
}
- // CFE
- if (cfeFailingTests.contains(spec.id)) {
- ++expectedFailCount;
- // TODO(brianwilkerson) Many of the failing tests are failing because of
- // server-side errors, and these are not being caught by the `onError`
- // block below (meaning that the test fails even though we're expecting
- // it to fail. Figure out how to re-enable the running of failing cfe
- // tests.
-// test("$testName-cfe (expected failure $expectedFailCount)", () {
-// CompletionTestCase test = new CompletionTestCase_UseCFE();
-// return new Future(() => test.runTest(spec, extraFiles)).then((_) {
-// fail('Test passed - expected to fail.');
-// }, onError: (_) {});
-// });
- } else {
- ++expectedPassCount;
- test('$testName-cfe', () {
- CompletionTestCase test = new CompletionTestCase_UseCFE();
- return test.runTest(spec, extraFiles);
- });
- }
}
}
}
diff --git a/pkg/analysis_server/test/completion_test_support.dart b/pkg/analysis_server/test/completion_test_support.dart
index 23f652b..06829ed 100644
--- a/pkg/analysis_server/test/completion_test_support.dart
+++ b/pkg/analysis_server/test/completion_test_support.dart
@@ -103,11 +103,6 @@
}
}
-class CompletionTestCase_UseCFE extends CompletionTestCase {
- @override
- bool get useCFE => true;
-}
-
/**
* A specification of the completion results expected at a given location.
*/
diff --git a/pkg/analysis_server/test/context_manager_test.dart b/pkg/analysis_server/test/context_manager_test.dart
index 93b60d0..6d4af90 100644
--- a/pkg/analysis_server/test/context_manager_test.dart
+++ b/pkg/analysis_server/test/context_manager_test.dart
@@ -40,11 +40,8 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(AbstractContextManagerTest);
- defineReflectiveTests(AbstractContextManagerTest_UseCFE);
defineReflectiveTests(ContextManagerWithNewOptionsTest);
- defineReflectiveTests(ContextManagerWithNewOptionsTest_UseCFE);
defineReflectiveTests(ContextManagerWithOldOptionsTest);
- defineReflectiveTests(ContextManagerWithOldOptionsTest_UseCFE);
});
}
@@ -1647,12 +1644,6 @@
}
}
-@reflectiveTest
-class AbstractContextManagerTest_UseCFE extends AbstractContextManagerTest {
- @override
- bool get useCFE => true;
-}
-
abstract class ContextManagerTest extends Object with ResourceProviderMixin {
/**
* The name of the 'bin' directory.
@@ -1729,11 +1720,6 @@
SourceFactory get sourceFactory => callbacks.sourceFactory;
- /**
- * Return `true` to enable the Dart 2.0 Common Front End.
- */
- bool get useCFE => false;
-
Map<String, List<Folder>> get _currentPackageMap => _packageMap(projPath);
/**
@@ -1770,8 +1756,7 @@
PerformanceLog logger = new PerformanceLog(new NullStringSink());
AnalysisDriverScheduler scheduler = new AnalysisDriverScheduler(logger);
callbacks = new TestContextManagerCallbacks(
- resourceProvider, sdkManager, logger, scheduler,
- useCFE: useCFE);
+ resourceProvider, sdkManager, logger, scheduler);
manager.callbacks = callbacks;
}
@@ -1808,24 +1793,10 @@
}
@reflectiveTest
-class ContextManagerWithNewOptionsTest_UseCFE
- extends ContextManagerWithNewOptionsTest {
- @override
- bool get useCFE => true;
-}
-
-@reflectiveTest
class ContextManagerWithOldOptionsTest extends ContextManagerWithOptionsTest {
String get optionsFileName => AnalysisEngine.ANALYSIS_OPTIONS_FILE;
}
-@reflectiveTest
-class ContextManagerWithOldOptionsTest_UseCFE
- extends ContextManagerWithOldOptionsTest {
- @override
- bool get useCFE => true;
-}
-
abstract class ContextManagerWithOptionsTest extends ContextManagerTest {
String get optionsFileName;
@@ -2033,7 +2004,7 @@
String sdkExtPath = '$projPath/sdk_ext';
newFile('$projPath/test', content: 'test.dart');
newFile('$sdkExtPath/entry.dart');
- List<int> bytes = new SummaryBuilder([], null, true).build();
+ List<int> bytes = new SummaryBuilder([], null).build();
newFileWithBytes('$projPath/sdk.ds', bytes);
// Setup _embedder.yaml.
newFile('$libPath/_embedder.yaml', content: r'''
@@ -2505,11 +2476,6 @@
final AnalysisDriverScheduler scheduler;
/**
- * A flag indicating whether to enable the Dart 2.0 Common Front End.
- */
- final bool useCFE;
-
- /**
* The list of `flushedFiles` in the last [removeContext] invocation.
*/
List<String> lastFlushedFiles;
@@ -2523,8 +2489,7 @@
NotificationManager notificationManager = new TestNotificationManager();
TestContextManagerCallbacks(
- this.resourceProvider, this.sdkManager, this.logger, this.scheduler,
- {this.useCFE = false});
+ this.resourceProvider, this.sdkManager, this.logger, this.scheduler);
/**
* Return the current set of analysis options.
@@ -2577,8 +2542,7 @@
new FileContentOverlay(),
contextRoot,
sourceFactory,
- analysisOptions,
- useCFE: useCFE);
+ analysisOptions);
driverMap[path] = currentDriver;
currentDriver.exceptions.listen((ExceptionResult result) {
AnalysisEngine.instance.logger
diff --git a/pkg/analysis_server/test/domain_analysis_test.dart b/pkg/analysis_server/test/domain_analysis_test.dart
index a4b7902..6bb6343 100644
--- a/pkg/analysis_server/test/domain_analysis_test.dart
+++ b/pkg/analysis_server/test/domain_analysis_test.dart
@@ -26,11 +26,8 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(AnalysisDomainTest);
- defineReflectiveTests(AnalysisDomainTest_UseCFE);
defineReflectiveTests(AnalysisDomainHandlerTest);
- defineReflectiveTests(AnalysisDomainHandlerTest_UseCFE);
defineReflectiveTests(SetSubscriptionsTest);
- defineReflectiveTests(SetSubscriptionsTest_UseCFE);
});
}
@@ -305,12 +302,6 @@
}
@reflectiveTest
-class AnalysisDomainHandlerTest_UseCFE extends AnalysisDomainHandlerTest {
- @override
- bool get useCFE => true;
-}
-
-@reflectiveTest
class AnalysisDomainTest extends AbstractAnalysisTest {
Map<String, List<AnalysisError>> filesErrors = {};
@@ -344,12 +335,6 @@
}
}
-@reflectiveTest
-class AnalysisDomainTest_UseCFE extends AnalysisDomainTest {
- @override
- bool get useCFE => true;
-}
-
/**
* A helper to test 'analysis.*' requests.
*/
@@ -716,16 +701,3 @@
expect(files, [testFile]);
}
}
-
-@reflectiveTest
-class SetSubscriptionsTest_UseCFE extends SetSubscriptionsTest {
- @override
- bool get useCFE => true;
-
- @failingTest
- @override
- test_afterAnalysis_noSuchFile() async {
- fail('Timeout');
-// return callFailingTest(super.test_afterAnalysis_noSuchFile);
- }
-}
diff --git a/pkg/analysis_server/test/domain_completion_test.dart b/pkg/analysis_server/test/domain_completion_test.dart
index a3dde6c..48b395c 100644
--- a/pkg/analysis_server/test/domain_completion_test.dart
+++ b/pkg/analysis_server/test/domain_completion_test.dart
@@ -23,7 +23,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(CompletionDomainHandlerTest);
- defineReflectiveTests(CompletionDomainHandlerTest_UseCFE);
});
}
@@ -181,6 +180,7 @@
expect(suggestions, hasLength(2));
}
+ @FailingTest(issue: 'https://github.com/dart-lang/sdk/issues/33992')
test_constructor() async {
addTestFile('class A {bool foo; A() : ^;}');
await getSuggestions();
@@ -190,6 +190,7 @@
relevance: DART_RELEVANCE_LOCAL_FIELD);
}
+ @FailingTest(issue: 'https://github.com/dart-lang/sdk/issues/33992')
test_constructor2() async {
addTestFile('class A {bool foo; A() : s^;}');
await getSuggestions();
@@ -199,6 +200,7 @@
relevance: DART_RELEVANCE_LOCAL_FIELD);
}
+ @FailingTest(issue: 'https://github.com/dart-lang/sdk/issues/33992')
test_constructor3() async {
addTestFile('class A {bool foo; A() : a=7,^;}');
await getSuggestions();
@@ -208,6 +210,7 @@
relevance: DART_RELEVANCE_LOCAL_FIELD);
}
+ @FailingTest(issue: 'https://github.com/dart-lang/sdk/issues/33992')
test_constructor4() async {
addTestFile('class A {bool foo; A() : a=7,s^;}');
await getSuggestions();
@@ -217,6 +220,7 @@
relevance: DART_RELEVANCE_LOCAL_FIELD);
}
+ @FailingTest(issue: 'https://github.com/dart-lang/sdk/issues/33992')
test_constructor5() async {
addTestFile('class A {bool foo; A() : a=7,s^}');
await getSuggestions();
@@ -226,6 +230,7 @@
relevance: DART_RELEVANCE_LOCAL_FIELD);
}
+ @FailingTest(issue: 'https://github.com/dart-lang/sdk/issues/33992')
test_constructor6() async {
addTestFile('class A {bool foo; A() : a=7,^ void bar() {}}');
await getSuggestions();
@@ -533,6 +538,7 @@
relevance: DART_RELEVANCE_LOCAL_FUNCTION);
}
+ @FailingTest(issue: 'https://github.com/dart-lang/sdk/issues/33992')
test_inherited() {
newFile('/libA.dart', content: 'class A {m() {}}');
addTestFile('''
@@ -842,57 +848,6 @@
}
}
-@reflectiveTest
-class CompletionDomainHandlerTest_UseCFE extends CompletionDomainHandlerTest {
- @override
- bool get useCFE => true;
-
- @failingTest
- @override
- test_constructor() async => super.test_constructor();
-
- @failingTest
- @override
- test_constructor2() async => super.test_constructor2();
-
- @failingTest
- @override
- test_constructor3() async => super.test_constructor3();
-
- @failingTest
- @override
- test_constructor4() async => super.test_constructor4();
-
- @failingTest
- @override
- test_constructor5() async => super.test_constructor5();
-
- @failingTest
- @override
- test_constructor6() async => super.test_constructor6();
-
- @failingTest
- @override
- test_import_uri_with_trailing() async =>
- super.test_import_uri_with_trailing();
-
- @failingTest
- @override
- test_imports_incremental() async => super.test_imports_incremental();
-
- @failingTest
- @override
- test_imports_partial() async => super.test_imports_partial();
-
- @failingTest
- @override
- test_inherited() async => super.test_inherited();
-
- @failingTest
- @override
- test_local_named_constructor() async => super.test_local_named_constructor();
-}
-
class MockRelevancySorter implements DartContributionSorter {
bool enabled = true;
diff --git a/pkg/analysis_server/test/domain_diagnostic_test.dart b/pkg/analysis_server/test/domain_diagnostic_test.dart
index 09fc344..7601a5e 100644
--- a/pkg/analysis_server/test/domain_diagnostic_test.dart
+++ b/pkg/analysis_server/test/domain_diagnostic_test.dart
@@ -12,7 +12,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(DiagnosticDomainTest);
- defineReflectiveTests(DiagnosticDomainTest_UseCFE);
});
}
@@ -56,9 +55,3 @@
expect(result.contexts, isEmpty);
}
}
-
-@reflectiveTest
-class DiagnosticDomainTest_UseCFE extends DiagnosticDomainTest {
- @override
- bool get useCFE => true;
-}
diff --git a/pkg/analysis_server/test/domain_execution_test.dart b/pkg/analysis_server/test/domain_execution_test.dart
index 96015d5..1370637 100644
--- a/pkg/analysis_server/test/domain_execution_test.dart
+++ b/pkg/analysis_server/test/domain_execution_test.dart
@@ -21,7 +21,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(ExecutionDomainTest);
- defineReflectiveTests(ExecutionDomainTest_UseCFE);
});
group('ExecutionDomainHandler', () {
MemoryResourceProvider provider = new MemoryResourceProvider();
@@ -261,12 +260,6 @@
}
}
-@reflectiveTest
-class ExecutionDomainTest_UseCFE extends ExecutionDomainTest {
- @override
- bool get useCFE => true;
-}
-
/**
* A [Source] that knows it's [fullName].
*/
diff --git a/pkg/analysis_server/test/edit/assists_test.dart b/pkg/analysis_server/test/edit/assists_test.dart
index 39b10d2..399706d 100644
--- a/pkg/analysis_server/test/edit/assists_test.dart
+++ b/pkg/analysis_server/test/edit/assists_test.dart
@@ -20,7 +20,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(AssistsTest);
- defineReflectiveTests(AssistsTest_UseCFE);
});
}
@@ -133,9 +132,3 @@
fail("Expected to find |$message| in\n" + changes.join('\n'));
}
}
-
-@reflectiveTest
-class AssistsTest_UseCFE extends AssistsTest {
- @override
- bool get useCFE => true;
-}
diff --git a/pkg/analysis_server/test/edit/fixes_test.dart b/pkg/analysis_server/test/edit/fixes_test.dart
index 971400e..1be66ae 100644
--- a/pkg/analysis_server/test/edit/fixes_test.dart
+++ b/pkg/analysis_server/test/edit/fixes_test.dart
@@ -20,7 +20,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(FixesTest);
- defineReflectiveTests(FixesTest_UseCFE);
});
}
@@ -170,9 +169,3 @@
expect(fixes.fixes, hasLength(1));
}
}
-
-@reflectiveTest
-class FixesTest_UseCFE extends FixesTest {
- @override
- bool get useCFE => true;
-}
diff --git a/pkg/analysis_server/test/edit/format_test.dart b/pkg/analysis_server/test/edit/format_test.dart
index a2b583b..ced5eab 100644
--- a/pkg/analysis_server/test/edit/format_test.dart
+++ b/pkg/analysis_server/test/edit/format_test.dart
@@ -17,7 +17,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(FormatTest);
- defineReflectiveTests(FormatTest_UseCFE);
});
}
@@ -124,9 +123,3 @@
return new EditFormatResult.fromResponse(response);
}
}
-
-@reflectiveTest
-class FormatTest_UseCFE extends FormatTest {
- @override
- bool get useCFE => true;
-}
diff --git a/pkg/analysis_server/test/edit/organize_directives_test.dart b/pkg/analysis_server/test/edit/organize_directives_test.dart
index 585e45c..9ca4c06 100644
--- a/pkg/analysis_server/test/edit/organize_directives_test.dart
+++ b/pkg/analysis_server/test/edit/organize_directives_test.dart
@@ -17,7 +17,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(OrganizeDirectivesTest);
- defineReflectiveTests(OrganizeDirectivesTest_UseCFE);
});
}
@@ -167,17 +166,3 @@
fileEdit = result.edit;
}
}
-
-@reflectiveTest
-class OrganizeDirectivesTest_UseCFE extends OrganizeDirectivesTest {
- @override
- bool get useCFE => true;
-
- @override
- test_BAD_doesNotExist() async => super.test_BAD_doesNotExist();
-
- @failingTest
- @override
- test_OK_remove_unresolvedDirectives() async =>
- super.test_OK_remove_unresolvedDirectives();
-}
diff --git a/pkg/analysis_server/test/edit/postfix_completion_test.dart b/pkg/analysis_server/test/edit/postfix_completion_test.dart
index 844ac9b..7a64a92 100644
--- a/pkg/analysis_server/test/edit/postfix_completion_test.dart
+++ b/pkg/analysis_server/test/edit/postfix_completion_test.dart
@@ -14,7 +14,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(PostfixCompletionTest);
- defineReflectiveTests(PostfixCompletionTest_UseCFE);
});
}
@@ -92,9 +91,3 @@
change = result.change;
}
}
-
-@reflectiveTest
-class PostfixCompletionTest_UseCFE extends PostfixCompletionTest {
- @override
- bool get useCFE => true;
-}
diff --git a/pkg/analysis_server/test/edit/refactoring_test.dart b/pkg/analysis_server/test/edit/refactoring_test.dart
index 7a60834..e3a0a33 100644
--- a/pkg/analysis_server/test/edit/refactoring_test.dart
+++ b/pkg/analysis_server/test/edit/refactoring_test.dart
@@ -18,26 +18,17 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(ConvertGetterMethodToMethodTest);
- defineReflectiveTests(ConvertGetterMethodToMethodTest_UseCFE);
defineReflectiveTests(ConvertMethodToGetterTest);
- defineReflectiveTests(ConvertMethodToGetterTest_UseCFE);
defineReflectiveTests(ExtractLocalVariableTest);
- defineReflectiveTests(ExtractLocalVariableTest_UseCFE);
defineReflectiveTests(ExtractMethodTest);
- defineReflectiveTests(ExtractMethodTest_UseCFE);
defineReflectiveTests(GetAvailableRefactoringsTest);
- defineReflectiveTests(GetAvailableRefactoringsTest_UseCFE);
defineReflectiveTests(InlineLocalTest);
- defineReflectiveTests(InlineLocalTest_UseCFE);
defineReflectiveTests(InlineMethodTest);
- defineReflectiveTests(InlineMethodTest_UseCFE);
defineReflectiveTests(MoveFileTest);
- defineReflectiveTests(MoveFileTest_UseCFE);
// TODO(brianwilkerson) Re-enable these tests. They were commented out
// because they are non-deterministic under the new driver. I suspect that
// there is a future that isn't being waited for.
// defineReflectiveTests(RenameTest);
-// defineReflectiveTests(RenameTest_UseCFE);
});
}
@@ -146,13 +137,6 @@
}
@reflectiveTest
-class ConvertGetterMethodToMethodTest_UseCFE
- extends ConvertGetterMethodToMethodTest {
- @override
- bool get useCFE => true;
-}
-
-@reflectiveTest
class ConvertMethodToGetterTest extends _AbstractGetRefactoring_Test {
test_function() {
addTestFile('''
@@ -265,12 +249,6 @@
}
@reflectiveTest
-class ConvertMethodToGetterTest_UseCFE extends ConvertMethodToGetterTest {
- @override
- bool get useCFE => true;
-}
-
-@reflectiveTest
class ExtractLocalVariableTest extends _AbstractGetRefactoring_Test {
Future<Response> sendExtractRequest(
int offset, int length, String name, bool extractAll) {
@@ -585,12 +563,6 @@
}
@reflectiveTest
-class ExtractLocalVariableTest_UseCFE extends ExtractLocalVariableTest {
- @override
- bool get useCFE => true;
-}
-
-@reflectiveTest
class ExtractMethodTest extends _AbstractGetRefactoring_Test {
int offset;
int length;
@@ -815,12 +787,6 @@
}
@reflectiveTest
-class ExtractMethodTest_UseCFE extends ExtractMethodTest {
- @override
- bool get useCFE => true;
-}
-
-@reflectiveTest
class GetAvailableRefactoringsTest extends AbstractAnalysisTest {
List<RefactoringKind> kinds;
@@ -1056,19 +1022,6 @@
}
@reflectiveTest
-class GetAvailableRefactoringsTest_UseCFE extends GetAvailableRefactoringsTest {
- @override
- bool get useCFE => true;
-
- @failingTest
- @override
- test_extractWidget() async {
-// return callFailingTest(super.test_extractWidget());
- fail('Test times out even when wrapped.');
- }
-}
-
-@reflectiveTest
class InlineLocalTest extends _AbstractGetRefactoring_Test {
test_analysis_onlyOneFile() async {
shouldWaitForFullAnalysis = false;
@@ -1177,12 +1130,6 @@
}
@reflectiveTest
-class InlineLocalTest_UseCFE extends InlineLocalTest {
- @override
- bool get useCFE => true;
-}
-
-@reflectiveTest
class InlineMethodTest extends _AbstractGetRefactoring_Test {
InlineMethodOptions options = new InlineMethodOptions(true, true);
@@ -1309,12 +1256,6 @@
}
@reflectiveTest
-class InlineMethodTest_UseCFE extends InlineMethodTest {
- @override
- bool get useCFE => true;
-}
-
-@reflectiveTest
class MoveFileTest extends _AbstractGetRefactoring_Test {
MoveFileOptions options;
@@ -1349,12 +1290,6 @@
}
@reflectiveTest
-class MoveFileTest_UseCFE extends MoveFileTest {
- @override
- bool get useCFE => true;
-}
-
-@reflectiveTest
class RenameTest extends _AbstractGetRefactoring_Test {
Future<Response> sendRenameRequest(String search, String newName,
{String id: '0', bool validateOnly: false}) {
@@ -2065,12 +2000,6 @@
}
@reflectiveTest
-class RenameTest_UseCFE extends RenameTest {
- @override
- bool get useCFE => true;
-}
-
-@reflectiveTest
class _AbstractGetRefactoring_Test extends AbstractAnalysisTest {
bool shouldWaitForFullAnalysis = true;
diff --git a/pkg/analysis_server/test/edit/sort_members_test.dart b/pkg/analysis_server/test/edit/sort_members_test.dart
index c1915b3..d6b70c1 100644
--- a/pkg/analysis_server/test/edit/sort_members_test.dart
+++ b/pkg/analysis_server/test/edit/sort_members_test.dart
@@ -17,7 +17,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(SortMembersTest);
- defineReflectiveTests(SortMembersTest_UseCFE);
});
}
@@ -255,9 +254,3 @@
fileEdit = result.edit;
}
}
-
-@reflectiveTest
-class SortMembersTest_UseCFE extends SortMembersTest {
- @override
- bool get useCFE => true;
-}
diff --git a/pkg/analysis_server/test/edit/statement_completion_test.dart b/pkg/analysis_server/test/edit/statement_completion_test.dart
index ea75b9b..7df82ba 100644
--- a/pkg/analysis_server/test/edit/statement_completion_test.dart
+++ b/pkg/analysis_server/test/edit/statement_completion_test.dart
@@ -14,7 +14,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(StatementCompletionTest);
- defineReflectiveTests(StatementCompletionTest_UseCFE);
});
}
@@ -121,9 +120,3 @@
change = result.change;
}
}
-
-@reflectiveTest
-class StatementCompletionTest_UseCFE extends StatementCompletionTest {
- @override
- bool get useCFE => true;
-}
diff --git a/pkg/analysis_server/test/integration/analysis/analysis_options_test.dart b/pkg/analysis_server/test/integration/analysis/analysis_options_test.dart
index b9c0748..f7114c5 100644
--- a/pkg/analysis_server/test/integration/analysis/analysis_options_test.dart
+++ b/pkg/analysis_server/test/integration/analysis/analysis_options_test.dart
@@ -12,7 +12,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(OptionsIntegrationTest);
- defineReflectiveTests(OptionsIntegrationTest_UseCFE);
});
}
@@ -89,9 +88,3 @@
expect(error.location.startColumn, 7);
}
}
-
-@reflectiveTest
-class OptionsIntegrationTest_UseCFE extends OptionsIntegrationTest {
- @override
- bool get useCFE => true;
-}
diff --git a/pkg/analysis_server/test/integration/analysis/error_test.dart b/pkg/analysis_server/test/integration/analysis/error_test.dart
index 9af229f..1c32caa 100644
--- a/pkg/analysis_server/test/integration/analysis/error_test.dart
+++ b/pkg/analysis_server/test/integration/analysis/error_test.dart
@@ -12,7 +12,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(AnalysisErrorIntegrationTest);
- defineReflectiveTests(AnalysisErrorIntegrationTest_UseCFE);
});
}
@@ -99,21 +98,3 @@
expect(errors, isEmpty);
}
}
-
-@reflectiveTest
-class AnalysisErrorIntegrationTest_UseCFE extends AnalysisErrorIntegrationTest {
- @override
- bool get useCFE => true;
-
- @override
- @failingTest
- test_super_mixins_disabled() {
- // Disabling super mixins is not supported in the new FE.
- return super.test_super_mixins_disabled();
- }
-
- @override
- test_super_mixins_enabled() {
- return super.test_super_mixins_enabled();
- }
-}
diff --git a/pkg/analysis_server/test/integration/analysis/get_errors_nonStandard_sdk.dart b/pkg/analysis_server/test/integration/analysis/get_errors_nonStandard_sdk.dart
index d58a043..be6e77a 100644
--- a/pkg/analysis_server/test/integration/analysis/get_errors_nonStandard_sdk.dart
+++ b/pkg/analysis_server/test/integration/analysis/get_errors_nonStandard_sdk.dart
@@ -17,7 +17,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(AnalysisDomainGetErrorsTest);
- defineReflectiveTests(AnalysisDomainGetErrorsTest_UseCFE);
});
}
@@ -70,13 +69,12 @@
}
@override
- Future startServer({int diagnosticPort, int servicesPort, bool cfe: false}) {
+ Future startServer({int diagnosticPort, int servicesPort}) {
String sdkPath = createNonStandardSdk();
return server.start(
diagnosticPort: diagnosticPort,
sdkPath: sdkPath,
- servicesPort: servicesPort,
- useCFE: cfe);
+ servicesPort: servicesPort);
}
Future test_getErrors() async {
@@ -93,9 +91,3 @@
expect(errors[0].code, 'unused_import');
}
}
-
-@reflectiveTest
-class AnalysisDomainGetErrorsTest_UseCFE extends AnalysisDomainGetErrorsTest {
- @override
- bool get useCFE => true;
-}
diff --git a/pkg/analysis_server/test/integration/analysis/get_errors_test.dart b/pkg/analysis_server/test/integration/analysis/get_errors_test.dart
index 5c6b2e0..d549e9e 100644
--- a/pkg/analysis_server/test/integration/analysis/get_errors_test.dart
+++ b/pkg/analysis_server/test/integration/analysis/get_errors_test.dart
@@ -11,7 +11,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(GetErrorsTest);
- defineReflectiveTests(GetErrorsTest_UseCFE);
});
}
@@ -30,9 +29,3 @@
expect(result.errors, equals(currentAnalysisErrors[pathname]));
}
}
-
-@reflectiveTest
-class GetErrorsTest_UseCFE extends GetErrorsTest {
- @override
- bool get useCFE => true;
-}
diff --git a/pkg/analysis_server/test/integration/analysis/get_hover_test.dart b/pkg/analysis_server/test/integration/analysis/get_hover_test.dart
index f69ee37..8c179cc 100644
--- a/pkg/analysis_server/test/integration/analysis/get_hover_test.dart
+++ b/pkg/analysis_server/test/integration/analysis/get_hover_test.dart
@@ -14,7 +14,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(AnalysisGetHoverIntegrationTest);
- defineReflectiveTests(AnalysisGetHoverIntegrationTest_UseCFE);
});
}
@@ -192,10 +191,3 @@
});
}
}
-
-@reflectiveTest
-class AnalysisGetHoverIntegrationTest_UseCFE
- extends AnalysisGetHoverIntegrationTest {
- @override
- bool get useCFE => true;
-}
diff --git a/pkg/analysis_server/test/integration/analysis/get_imported_elements_test.dart b/pkg/analysis_server/test/integration/analysis/get_imported_elements_test.dart
index 3e2fad7..65deb3b 100644
--- a/pkg/analysis_server/test/integration/analysis/get_imported_elements_test.dart
+++ b/pkg/analysis_server/test/integration/analysis/get_imported_elements_test.dart
@@ -15,7 +15,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(AnalysisGetImportedElementsIntegrationTest);
- defineReflectiveTests(AnalysisGetImportedElementsIntegrationTest_UseCFE);
});
}
@@ -139,10 +138,3 @@
}
}
}
-
-@reflectiveTest
-class AnalysisGetImportedElementsIntegrationTest_UseCFE
- extends AnalysisGetImportedElementsIntegrationTest {
- @override
- bool get useCFE => true;
-}
diff --git a/pkg/analysis_server/test/integration/analysis/get_library_dependencies_test.dart b/pkg/analysis_server/test/integration/analysis/get_library_dependencies_test.dart
index 318f244..51a7659 100644
--- a/pkg/analysis_server/test/integration/analysis/get_library_dependencies_test.dart
+++ b/pkg/analysis_server/test/integration/analysis/get_library_dependencies_test.dart
@@ -11,7 +11,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(GetLibraryDependenciesTest);
- defineReflectiveTests(GetLibraryDependenciesTest_UseCFE);
});
}
@@ -46,9 +45,3 @@
expect(map.keys, isEmpty);
}
}
-
-@reflectiveTest
-class GetLibraryDependenciesTest_UseCFE extends GetLibraryDependenciesTest {
- @override
- bool get useCFE => true;
-}
diff --git a/pkg/analysis_server/test/integration/analysis/get_navigation_test.dart b/pkg/analysis_server/test/integration/analysis/get_navigation_test.dart
index 8901f8e..9725e58 100644
--- a/pkg/analysis_server/test/integration/analysis/get_navigation_test.dart
+++ b/pkg/analysis_server/test/integration/analysis/get_navigation_test.dart
@@ -12,7 +12,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(GetNavigationTest);
- defineReflectiveTests(GetNavigationTest_UseCFE);
});
}
@@ -66,13 +65,3 @@
expect(result.targets, isEmpty);
}
}
-
-@reflectiveTest
-class GetNavigationTest_UseCFE extends GetNavigationTest {
- @override
- bool get useCFE => true;
-
- @override
- @failingTest
- test_navigation_no_result() => super.test_navigation_no_result();
-}
diff --git a/pkg/analysis_server/test/integration/analysis/get_reachable_sources_test.dart b/pkg/analysis_server/test/integration/analysis/get_reachable_sources_test.dart
index 7142da9..150c67f 100644
--- a/pkg/analysis_server/test/integration/analysis/get_reachable_sources_test.dart
+++ b/pkg/analysis_server/test/integration/analysis/get_reachable_sources_test.dart
@@ -13,7 +13,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(GetReachableSourcesTest);
- defineReflectiveTests(GetReachableSourcesTest_UseCFE);
});
}
@@ -48,9 +47,3 @@
expect(sources[url], contains('dart:core'));
}
}
-
-@reflectiveTest
-class GetReachableSourcesTest_UseCFE extends GetReachableSourcesTest {
- @override
- bool get useCFE => true;
-}
diff --git a/pkg/analysis_server/test/integration/analysis/highlights_test.dart b/pkg/analysis_server/test/integration/analysis/highlights_test.dart
index 5fb8afa..3c9d09b 100644
--- a/pkg/analysis_server/test/integration/analysis/highlights_test.dart
+++ b/pkg/analysis_server/test/integration/analysis/highlights_test.dart
@@ -12,7 +12,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(AnalysisHighlightsTest);
- defineReflectiveTests(AnalysisHighlightsTest_UseCFE);
});
}
@@ -145,9 +144,3 @@
});
}
}
-
-@reflectiveTest
-class AnalysisHighlightsTest_UseCFE extends AnalysisHighlightsTest {
- @override
- bool get useCFE => true;
-}
diff --git a/pkg/analysis_server/test/integration/analysis/highlights_test2.dart b/pkg/analysis_server/test/integration/analysis/highlights_test2.dart
index 86e5917..ce16391 100644
--- a/pkg/analysis_server/test/integration/analysis/highlights_test2.dart
+++ b/pkg/analysis_server/test/integration/analysis/highlights_test2.dart
@@ -14,7 +14,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(AnalysisHighlightsTest);
- defineReflectiveTests(AnalysisHighlightsTest_UseCFE);
});
}
@@ -23,13 +22,11 @@
Future startServer({
int diagnosticPort,
int servicesPort,
- bool cfe: false,
}) {
return server.start(
diagnosticPort: diagnosticPort,
servicesPort: servicesPort,
- useAnalysisHighlight2: true,
- useCFE: cfe);
+ useAnalysisHighlight2: true);
}
test_highlights() {
@@ -163,9 +160,3 @@
});
}
}
-
-@reflectiveTest
-class AnalysisHighlightsTest_UseCFE extends AnalysisHighlightsTest {
- @override
- bool get useCFE => true;
-}
diff --git a/pkg/analysis_server/test/integration/analysis/lint_test.dart b/pkg/analysis_server/test/integration/analysis/lint_test.dart
index d217042..699b43b 100644
--- a/pkg/analysis_server/test/integration/analysis/lint_test.dart
+++ b/pkg/analysis_server/test/integration/analysis/lint_test.dart
@@ -12,7 +12,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(LintIntegrationTest);
- defineReflectiveTests(LintIntegrationTest_UseCFE);
});
}
@@ -82,9 +81,3 @@
expect(error.type, AnalysisErrorType.LINT);
}
}
-
-@reflectiveTest
-class LintIntegrationTest_UseCFE extends LintIntegrationTest {
- @override
- bool get useCFE => true;
-}
diff --git a/pkg/analysis_server/test/integration/analysis/navigation_test.dart b/pkg/analysis_server/test/integration/analysis/navigation_test.dart
index 0337b72..1302b67 100644
--- a/pkg/analysis_server/test/integration/analysis/navigation_test.dart
+++ b/pkg/analysis_server/test/integration/analysis/navigation_test.dart
@@ -12,7 +12,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(AnalysisNavigationTest);
- defineReflectiveTests(AnalysisNavigationTest_UseCFE);
});
}
@@ -134,9 +133,3 @@
'TypeParameter field;', 'TypeParameter>', ElementKind.TYPE_PARAMETER);
}
}
-
-@reflectiveTest
-class AnalysisNavigationTest_UseCFE extends AnalysisNavigationTest {
- @override
- bool get useCFE => true;
-}
diff --git a/pkg/analysis_server/test/integration/analysis/occurrences_test.dart b/pkg/analysis_server/test/integration/analysis/occurrences_test.dart
index 5174ef4..35a9416 100644
--- a/pkg/analysis_server/test/integration/analysis/occurrences_test.dart
+++ b/pkg/analysis_server/test/integration/analysis/occurrences_test.dart
@@ -12,7 +12,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(OccurrencesTest);
- defineReflectiveTests(OccurrencesTest_UseCFE);
});
}
@@ -66,9 +65,3 @@
});
}
}
-
-@reflectiveTest
-class OccurrencesTest_UseCFE extends OccurrencesTest {
- @override
- bool get useCFE => true;
-}
diff --git a/pkg/analysis_server/test/integration/analysis/outline_test.dart b/pkg/analysis_server/test/integration/analysis/outline_test.dart
index 5a4a07f..eafefe8 100644
--- a/pkg/analysis_server/test/integration/analysis/outline_test.dart
+++ b/pkg/analysis_server/test/integration/analysis/outline_test.dart
@@ -12,7 +12,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(OutlineTest);
- defineReflectiveTests(OutlineTest_UseCFE);
});
}
@@ -70,9 +69,3 @@
});
}
}
-
-@reflectiveTest
-class OutlineTest_UseCFE extends OutlineTest {
- @override
- bool get useCFE => true;
-}
diff --git a/pkg/analysis_server/test/integration/analysis/overrides_test.dart b/pkg/analysis_server/test/integration/analysis/overrides_test.dart
index 39c4bb4..32c238c 100644
--- a/pkg/analysis_server/test/integration/analysis/overrides_test.dart
+++ b/pkg/analysis_server/test/integration/analysis/overrides_test.dart
@@ -11,7 +11,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(OverridesTest);
- defineReflectiveTests(OverridesTest_UseCFE);
});
}
@@ -121,9 +120,3 @@
});
}
}
-
-@reflectiveTest
-class OverridesTest_UseCFE extends OverridesTest {
- @override
- bool get useCFE => true;
-}
diff --git a/pkg/analysis_server/test/integration/analysis/package_root_test.dart b/pkg/analysis_server/test/integration/analysis/package_root_test.dart
index 813a048..0491f9b 100644
--- a/pkg/analysis_server/test/integration/analysis/package_root_test.dart
+++ b/pkg/analysis_server/test/integration/analysis/package_root_test.dart
@@ -15,7 +15,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(SetAnalysisRootsTest);
- defineReflectiveTests(SetAnalysisRootsTest_UseCFE);
});
}
@@ -87,9 +86,3 @@
expect(found, isTrue);
}
}
-
-@reflectiveTest
-class SetAnalysisRootsTest_UseCFE extends SetAnalysisRootsTest {
- @override
- bool get useCFE => true;
-}
diff --git a/pkg/analysis_server/test/integration/analysis/reanalyze_concurrent_test.dart b/pkg/analysis_server/test/integration/analysis/reanalyze_concurrent_test.dart
index 2ee347d..cb707e2 100644
--- a/pkg/analysis_server/test/integration/analysis/reanalyze_concurrent_test.dart
+++ b/pkg/analysis_server/test/integration/analysis/reanalyze_concurrent_test.dart
@@ -18,7 +18,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(ReanalyzeTest);
- defineReflectiveTests(ReanalyzeTest_UseCFE);
});
}
@@ -50,9 +49,3 @@
});
}
}
-
-@reflectiveTest
-class ReanalyzeTest_UseCFE extends ReanalyzeTest {
- @override
- bool get useCFE => true;
-}
diff --git a/pkg/analysis_server/test/integration/analysis/reanalyze_test.dart b/pkg/analysis_server/test/integration/analysis/reanalyze_test.dart
index 319a4a4..8740ef0 100644
--- a/pkg/analysis_server/test/integration/analysis/reanalyze_test.dart
+++ b/pkg/analysis_server/test/integration/analysis/reanalyze_test.dart
@@ -11,7 +11,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(ReanalyzeTest);
- defineReflectiveTests(ReanalyzeTest_UseCFE);
});
}
@@ -39,9 +38,3 @@
});
}
}
-
-@reflectiveTest
-class ReanalyzeTest_UseCFE extends ReanalyzeTest {
- @override
- bool get useCFE => true;
-}
diff --git a/pkg/analysis_server/test/integration/analysis/set_analysis_roots_test.dart b/pkg/analysis_server/test/integration/analysis/set_analysis_roots_test.dart
index f9ebcb0..f6c1d61 100644
--- a/pkg/analysis_server/test/integration/analysis/set_analysis_roots_test.dart
+++ b/pkg/analysis_server/test/integration/analysis/set_analysis_roots_test.dart
@@ -10,7 +10,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(SetAnalysisRootsTest);
- defineReflectiveTests(SetAnalysisRootsTest_UseCFE);
});
}
@@ -31,9 +30,3 @@
expect(currentAnalysisErrors[pathname], isEmpty);
}
}
-
-@reflectiveTest
-class SetAnalysisRootsTest_UseCFE extends SetAnalysisRootsTest {
- @override
- bool get useCFE => true;
-}
diff --git a/pkg/analysis_server/test/integration/analysis/set_general_subscriptions_test.dart b/pkg/analysis_server/test/integration/analysis/set_general_subscriptions_test.dart
index c75655b..ce90165 100644
--- a/pkg/analysis_server/test/integration/analysis/set_general_subscriptions_test.dart
+++ b/pkg/analysis_server/test/integration/analysis/set_general_subscriptions_test.dart
@@ -12,7 +12,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(SetGeneralSubscriptionsTest);
- defineReflectiveTests(SetGeneralSubscriptionsTest_UseCFE);
});
}
@@ -41,9 +40,3 @@
true);
}
}
-
-@reflectiveTest
-class SetGeneralSubscriptionsTest_UseCFE extends SetGeneralSubscriptionsTest {
- @override
- bool get useCFE => true;
-}
diff --git a/pkg/analysis_server/test/integration/analysis/set_priority_files_test.dart b/pkg/analysis_server/test/integration/analysis/set_priority_files_test.dart
index 7d86706..10cb1a0 100644
--- a/pkg/analysis_server/test/integration/analysis/set_priority_files_test.dart
+++ b/pkg/analysis_server/test/integration/analysis/set_priority_files_test.dart
@@ -11,7 +11,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(SetPriorityFilesTest);
- defineReflectiveTests(SetPriorityFilesTest_UseCFE);
});
}
@@ -29,9 +28,3 @@
expect(status.analysis.isAnalyzing, false);
}
}
-
-@reflectiveTest
-class SetPriorityFilesTest_UseCFE extends SetPriorityFilesTest {
- @override
- bool get useCFE => true;
-}
diff --git a/pkg/analysis_server/test/integration/analysis/set_subscriptions_test.dart b/pkg/analysis_server/test/integration/analysis/set_subscriptions_test.dart
index 02dcd05..9524b4d 100644
--- a/pkg/analysis_server/test/integration/analysis/set_subscriptions_test.dart
+++ b/pkg/analysis_server/test/integration/analysis/set_subscriptions_test.dart
@@ -10,7 +10,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(SetSubscriptionsTest);
- defineReflectiveTests(SetSubscriptionsTest_UseCFE);
});
}
@@ -31,9 +30,3 @@
expect(currentAnalysisErrors[pathname], isEmpty);
}
}
-
-@reflectiveTest
-class SetSubscriptionsTest_UseCFE extends SetSubscriptionsTest {
- @override
- bool get useCFE => true;
-}
diff --git a/pkg/analysis_server/test/integration/analysis/update_content_list_test.dart b/pkg/analysis_server/test/integration/analysis/update_content_list_test.dart
index c66c18b..d44cce7 100644
--- a/pkg/analysis_server/test/integration/analysis/update_content_list_test.dart
+++ b/pkg/analysis_server/test/integration/analysis/update_content_list_test.dart
@@ -11,7 +11,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(UpdateContentTest);
- defineReflectiveTests(UpdateContentTest_UseCFE);
});
}
@@ -51,13 +50,3 @@
});
}
}
-
-@reflectiveTest
-class UpdateContentTest_UseCFE extends UpdateContentTest {
- @override
- bool get useCFE => true;
-
- @override
- @failingTest
- test_updateContent_list() => super.test_updateContent_list();
-}
diff --git a/pkg/analysis_server/test/integration/analysis/update_content_test.dart b/pkg/analysis_server/test/integration/analysis/update_content_test.dart
index 8174832..cc4ceae 100644
--- a/pkg/analysis_server/test/integration/analysis/update_content_test.dart
+++ b/pkg/analysis_server/test/integration/analysis/update_content_test.dart
@@ -11,7 +11,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(UpdateContentTest);
- defineReflectiveTests(UpdateContentTest_UseCFE);
});
}
@@ -105,9 +104,3 @@
expect(errors2[0].location.file, equals(pathname));
}
}
-
-@reflectiveTest
-class UpdateContentTest_UseCFE extends UpdateContentTest {
- @override
- bool get useCFE => true;
-}
diff --git a/pkg/analysis_server/test/integration/analysis/update_options_test.dart b/pkg/analysis_server/test/integration/analysis/update_options_test.dart
index 5d6b548..1172d78 100644
--- a/pkg/analysis_server/test/integration/analysis/update_options_test.dart
+++ b/pkg/analysis_server/test/integration/analysis/update_options_test.dart
@@ -11,7 +11,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(UpdateOptionsTest);
- defineReflectiveTests(UpdateOptionsTest_UseCFE);
});
}
@@ -46,9 +45,3 @@
expect(getErrors(pathname), hasLength(1));
}
}
-
-@reflectiveTest
-class UpdateOptionsTest_UseCFE extends UpdateOptionsTest {
- @override
- bool get useCFE => true;
-}
diff --git a/pkg/analysis_server/test/integration/analytics/enable_test.dart b/pkg/analysis_server/test/integration/analytics/enable_test.dart
index 0c1dbc0a..72e261d 100644
--- a/pkg/analysis_server/test/integration/analytics/enable_test.dart
+++ b/pkg/analysis_server/test/integration/analytics/enable_test.dart
@@ -11,7 +11,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(EnableTest);
- defineReflectiveTests(EnableTest_UseCFE);
});
}
@@ -33,9 +32,3 @@
await sendAnalyticsEnable(result1.enabled);
}
}
-
-@reflectiveTest
-class EnableTest_UseCFE extends EnableTest {
- @override
- bool get useCFE => true;
-}
diff --git a/pkg/analysis_server/test/integration/analytics/is_enabled_test.dart b/pkg/analysis_server/test/integration/analytics/is_enabled_test.dart
index 712a050..8e2ffd5 100644
--- a/pkg/analysis_server/test/integration/analytics/is_enabled_test.dart
+++ b/pkg/analysis_server/test/integration/analytics/is_enabled_test.dart
@@ -11,7 +11,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(IsEnabledTest);
- defineReflectiveTests(IsEnabledTest_UseCFE);
});
}
@@ -25,9 +24,3 @@
expect(result, isNotNull);
}
}
-
-@reflectiveTest
-class IsEnabledTest_UseCFE extends IsEnabledTest {
- @override
- bool get useCFE => true;
-}
diff --git a/pkg/analysis_server/test/integration/analytics/send_event_test.dart b/pkg/analysis_server/test/integration/analytics/send_event_test.dart
index 250790e..fbeb48a 100644
--- a/pkg/analysis_server/test/integration/analytics/send_event_test.dart
+++ b/pkg/analysis_server/test/integration/analytics/send_event_test.dart
@@ -10,7 +10,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(SendEventTest);
- defineReflectiveTests(SendEventTest_UseCFE);
});
}
@@ -30,9 +29,3 @@
await sendAnalyticsEnable(result1.enabled);
}
}
-
-@reflectiveTest
-class SendEventTest_UseCFE extends SendEventTest {
- @override
- bool get useCFE => true;
-}
diff --git a/pkg/analysis_server/test/integration/analytics/send_timing_test.dart b/pkg/analysis_server/test/integration/analytics/send_timing_test.dart
index ee8d812..fb65d8a 100644
--- a/pkg/analysis_server/test/integration/analytics/send_timing_test.dart
+++ b/pkg/analysis_server/test/integration/analytics/send_timing_test.dart
@@ -10,7 +10,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(SendTimingTest);
- defineReflectiveTests(SendTimingTest_UseCFE);
});
}
@@ -30,9 +29,3 @@
await sendAnalyticsEnable(result1.enabled);
}
}
-
-@reflectiveTest
-class SendTimingTest_UseCFE extends SendTimingTest {
- @override
- bool get useCFE => true;
-}
diff --git a/pkg/analysis_server/test/integration/completion/get_suggestions_test.dart b/pkg/analysis_server/test/integration/completion/get_suggestions_test.dart
index 27d3996..cf031cf 100644
--- a/pkg/analysis_server/test/integration/completion/get_suggestions_test.dart
+++ b/pkg/analysis_server/test/integration/completion/get_suggestions_test.dart
@@ -12,7 +12,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(GetSuggestionsTest);
- defineReflectiveTests(GetSuggestionsTest_UseCFE);
});
}
@@ -116,9 +115,3 @@
});
}
}
-
-@reflectiveTest
-class GetSuggestionsTest_UseCFE extends GetSuggestionsTest {
- @override
- bool get useCFE => true;
-}
diff --git a/pkg/analysis_server/test/integration/diagnostic/get_diagnostics_test.dart b/pkg/analysis_server/test/integration/diagnostic/get_diagnostics_test.dart
index 897113f..e8bf76e 100644
--- a/pkg/analysis_server/test/integration/diagnostic/get_diagnostics_test.dart
+++ b/pkg/analysis_server/test/integration/diagnostic/get_diagnostics_test.dart
@@ -11,7 +11,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(GetDiagnosticsTest);
- defineReflectiveTests(GetDiagnosticsTest_UseCFE);
});
}
@@ -29,9 +28,3 @@
expect(context.name, isNotEmpty);
}
}
-
-@reflectiveTest
-class GetDiagnosticsTest_UseCFE extends GetDiagnosticsTest {
- @override
- bool get useCFE => true;
-}
diff --git a/pkg/analysis_server/test/integration/diagnostic/get_server_port_test.dart b/pkg/analysis_server/test/integration/diagnostic/get_server_port_test.dart
index 80b25b0..37efe2c 100644
--- a/pkg/analysis_server/test/integration/diagnostic/get_server_port_test.dart
+++ b/pkg/analysis_server/test/integration/diagnostic/get_server_port_test.dart
@@ -14,7 +14,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(GetServerPortTest);
- defineReflectiveTests(GetServerPortTest_UseCFE);
});
}
@@ -36,9 +35,3 @@
expect(responseBody, contains('<title>Analysis Server</title>'));
}
}
-
-@reflectiveTest
-class GetServerPortTest_UseCFE extends GetServerPortTest {
- @override
- bool get useCFE => true;
-}
diff --git a/pkg/analysis_server/test/integration/edit/format_test.dart b/pkg/analysis_server/test/integration/edit/format_test.dart
index 9b161ba..8906109 100644
--- a/pkg/analysis_server/test/integration/edit/format_test.dart
+++ b/pkg/analysis_server/test/integration/edit/format_test.dart
@@ -11,7 +11,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(FormatTest);
- defineReflectiveTests(FormatTest_UseCFE);
});
}
@@ -79,9 +78,3 @@
}
}
}
-
-@reflectiveTest
-class FormatTest_UseCFE extends FormatTest {
- @override
- bool get useCFE => true;
-}
diff --git a/pkg/analysis_server/test/integration/edit/get_assists_test.dart b/pkg/analysis_server/test/integration/edit/get_assists_test.dart
index e0ff926..69e10f0 100644
--- a/pkg/analysis_server/test/integration/edit/get_assists_test.dart
+++ b/pkg/analysis_server/test/integration/edit/get_assists_test.dart
@@ -12,7 +12,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(GetAssistsTest);
- defineReflectiveTests(GetAssistsTest_UseCFE);
});
}
@@ -49,9 +48,3 @@
expect(currentAnalysisErrors[pathname], isEmpty);
}
}
-
-@reflectiveTest
-class GetAssistsTest_UseCFE extends GetAssistsTest {
- @override
- bool get useCFE => true;
-}
diff --git a/pkg/analysis_server/test/integration/edit/get_available_refactorings_test.dart b/pkg/analysis_server/test/integration/edit/get_available_refactorings_test.dart
index 0d359f6..820b586 100644
--- a/pkg/analysis_server/test/integration/edit/get_available_refactorings_test.dart
+++ b/pkg/analysis_server/test/integration/edit/get_available_refactorings_test.dart
@@ -11,7 +11,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(GetAvailableRefactoringsTest);
- defineReflectiveTests(GetAvailableRefactoringsTest_UseCFE);
});
}
@@ -36,9 +35,3 @@
expect(result.kinds, isNotEmpty);
}
}
-
-@reflectiveTest
-class GetAvailableRefactoringsTest_UseCFE extends GetAvailableRefactoringsTest {
- @override
- bool get useCFE => true;
-}
diff --git a/pkg/analysis_server/test/integration/edit/get_fixes_test.dart b/pkg/analysis_server/test/integration/edit/get_fixes_test.dart
index 4d916df..c9e80c4 100644
--- a/pkg/analysis_server/test/integration/edit/get_fixes_test.dart
+++ b/pkg/analysis_server/test/integration/edit/get_fixes_test.dart
@@ -12,7 +12,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(GetFixesTest);
- defineReflectiveTests(GetFixesTest_UseCFE);
});
}
@@ -32,17 +31,9 @@
EditGetFixesResult result =
await sendEditGetFixes(pathname, text.indexOf('Future f'));
- AnalysisErrorFixes fix;
- if (useCFE) {
- // TODO(scheglov) We have to filter errors, because two are reported.
- // https://github.com/dart-lang/sdk/issues/34124
- fix = result.fixes
- .singleWhere((fix) => fix.error.code == 'undefined_class');
- } else {
- expect(result.fixes, hasLength(1));
- fix = result.fixes.first;
- expect(fix.error.code, 'undefined_class');
- }
+ expect(result.fixes, hasLength(1));
+ AnalysisErrorFixes fix = result.fixes.first;
+ expect(fix.error.code, 'undefined_class');
// expect a suggestion to add the dart:async import
expect(fix.fixes, isNotEmpty);
@@ -68,9 +59,3 @@
expect(result.fixes, isEmpty);
}
}
-
-@reflectiveTest
-class GetFixesTest_UseCFE extends GetFixesTest {
- @override
- bool get useCFE => true;
-}
diff --git a/pkg/analysis_server/test/integration/edit/get_postfix_completion_test.dart b/pkg/analysis_server/test/integration/edit/get_postfix_completion_test.dart
index d7c5fd3..598b4c0 100644
--- a/pkg/analysis_server/test/integration/edit/get_postfix_completion_test.dart
+++ b/pkg/analysis_server/test/integration/edit/get_postfix_completion_test.dart
@@ -12,7 +12,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(GetPostfixCompletionTest);
- defineReflectiveTests(GetPostfixCompletionTest_UseCFE);
});
}
@@ -52,9 +51,3 @@
expect(currentAnalysisErrors[pathname], isEmpty);
}
}
-
-@reflectiveTest
-class GetPostfixCompletionTest_UseCFE extends GetPostfixCompletionTest {
- @override
- bool get useCFE => true;
-}
diff --git a/pkg/analysis_server/test/integration/edit/get_refactoring_test.dart b/pkg/analysis_server/test/integration/edit/get_refactoring_test.dart
index 1786ee6..c3e5553 100644
--- a/pkg/analysis_server/test/integration/edit/get_refactoring_test.dart
+++ b/pkg/analysis_server/test/integration/edit/get_refactoring_test.dart
@@ -12,7 +12,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(GetRefactoringTest);
- defineReflectiveTests(GetRefactoringTest_UseCFE);
});
}
@@ -65,9 +64,3 @@
expect(currentAnalysisErrors[pathname], isEmpty);
}
}
-
-@reflectiveTest
-class GetRefactoringTest_UseCFE extends GetRefactoringTest {
- @override
- bool get useCFE => true;
-}
diff --git a/pkg/analysis_server/test/integration/edit/get_statement_completion_test.dart b/pkg/analysis_server/test/integration/edit/get_statement_completion_test.dart
index 4582519..610ece0 100644
--- a/pkg/analysis_server/test/integration/edit/get_statement_completion_test.dart
+++ b/pkg/analysis_server/test/integration/edit/get_statement_completion_test.dart
@@ -12,7 +12,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(GetStatementCompletionTest);
- defineReflectiveTests(GetStatementCompletionTest_UseCFE);
});
}
@@ -52,9 +51,3 @@
expect(currentAnalysisErrors[pathname], isEmpty);
}
}
-
-@reflectiveTest
-class GetStatementCompletionTest_UseCFE extends GetStatementCompletionTest {
- @override
- bool get useCFE => true;
-}
diff --git a/pkg/analysis_server/test/integration/edit/import_elements_test.dart b/pkg/analysis_server/test/integration/edit/import_elements_test.dart
index c2b6972..9beed5a 100644
--- a/pkg/analysis_server/test/integration/edit/import_elements_test.dart
+++ b/pkg/analysis_server/test/integration/edit/import_elements_test.dart
@@ -16,7 +16,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(AnalysisGetImportElementsIntegrationTest);
- defineReflectiveTests(AnalysisGetImportElementsIntegrationTest_UseCFE);
});
}
@@ -136,10 +135,3 @@
], expectedFile: libName);
}
}
-
-@reflectiveTest
-class AnalysisGetImportElementsIntegrationTest_UseCFE
- extends AnalysisGetImportElementsIntegrationTest {
- @override
- bool get useCFE => true;
-}
diff --git a/pkg/analysis_server/test/integration/edit/is_postfix_completion_applicable_test.dart b/pkg/analysis_server/test/integration/edit/is_postfix_completion_applicable_test.dart
index 32f59cb..be1ff11 100644
--- a/pkg/analysis_server/test/integration/edit/is_postfix_completion_applicable_test.dart
+++ b/pkg/analysis_server/test/integration/edit/is_postfix_completion_applicable_test.dart
@@ -11,7 +11,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(IsPostfixCompletionApplicableTest);
- defineReflectiveTests(IsPostfixCompletionApplicableTest_UseCFE);
});
}
@@ -40,10 +39,3 @@
expect(result.value, isTrue);
}
}
-
-@reflectiveTest
-class IsPostfixCompletionApplicableTest_UseCFE
- extends IsPostfixCompletionApplicableTest {
- @override
- bool get useCFE => true;
-}
diff --git a/pkg/analysis_server/test/integration/edit/list_postfix_completion_templates_test.dart b/pkg/analysis_server/test/integration/edit/list_postfix_completion_templates_test.dart
index 3caf5f80..f248e06 100644
--- a/pkg/analysis_server/test/integration/edit/list_postfix_completion_templates_test.dart
+++ b/pkg/analysis_server/test/integration/edit/list_postfix_completion_templates_test.dart
@@ -11,7 +11,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(ListPostfixCompletionTemplatesTest);
- defineReflectiveTests(ListPostfixCompletionTemplatesTest_UseCFE);
});
}
@@ -40,10 +39,3 @@
expect(result.templates[0].runtimeType, PostfixTemplateDescriptor);
}
}
-
-@reflectiveTest
-class ListPostfixCompletionTemplatesTest_UseCFE
- extends ListPostfixCompletionTemplatesTest {
- @override
- bool get useCFE => true;
-}
diff --git a/pkg/analysis_server/test/integration/edit/organize_directives_test.dart b/pkg/analysis_server/test/integration/edit/organize_directives_test.dart
index 4d519e9..0e372f4 100644
--- a/pkg/analysis_server/test/integration/edit/organize_directives_test.dart
+++ b/pkg/analysis_server/test/integration/edit/organize_directives_test.dart
@@ -12,7 +12,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(OrganizeDirectivesTest);
- defineReflectiveTests(OrganizeDirectivesTest_UseCFE);
});
}
@@ -75,9 +74,3 @@
}
}
}
-
-@reflectiveTest
-class OrganizeDirectivesTest_UseCFE extends OrganizeDirectivesTest {
- @override
- bool get useCFE => true;
-}
diff --git a/pkg/analysis_server/test/integration/edit/sort_members_test.dart b/pkg/analysis_server/test/integration/edit/sort_members_test.dart
index da09496..3ff78a7 100644
--- a/pkg/analysis_server/test/integration/edit/sort_members_test.dart
+++ b/pkg/analysis_server/test/integration/edit/sort_members_test.dart
@@ -12,7 +12,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(SortMembersTest);
- defineReflectiveTests(SortMembersTest_UseCFE);
});
}
@@ -63,9 +62,3 @@
}
}
}
-
-@reflectiveTest
-class SortMembersTest_UseCFE extends SortMembersTest {
- @override
- bool get useCFE => true;
-}
diff --git a/pkg/analysis_server/test/integration/execution/create_context_test.dart b/pkg/analysis_server/test/integration/execution/create_context_test.dart
index 2604eab..6564810 100644
--- a/pkg/analysis_server/test/integration/execution/create_context_test.dart
+++ b/pkg/analysis_server/test/integration/execution/create_context_test.dart
@@ -10,7 +10,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(CreateContextTest);
- defineReflectiveTests(CreateContextTest_UseCFE);
});
}
@@ -23,9 +22,3 @@
expect(contextId, isNotNull);
}
}
-
-@reflectiveTest
-class CreateContextTest_UseCFE extends CreateContextTest {
- @override
- bool get useCFE => true;
-}
diff --git a/pkg/analysis_server/test/integration/execution/delete_context_test.dart b/pkg/analysis_server/test/integration/execution/delete_context_test.dart
index 3cf0e19..c807fa5 100644
--- a/pkg/analysis_server/test/integration/execution/delete_context_test.dart
+++ b/pkg/analysis_server/test/integration/execution/delete_context_test.dart
@@ -11,7 +11,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(DeleteContextTest);
- defineReflectiveTests(DeleteContextTest_UseCFE);
});
}
@@ -42,9 +41,3 @@
}
}
}
-
-@reflectiveTest
-class DeleteContextTest_UseCFE extends DeleteContextTest {
- @override
- bool get useCFE => true;
-}
diff --git a/pkg/analysis_server/test/integration/execution/map_uri_test.dart b/pkg/analysis_server/test/integration/execution/map_uri_test.dart
index 9990a23..f5abbc0 100644
--- a/pkg/analysis_server/test/integration/execution/map_uri_test.dart
+++ b/pkg/analysis_server/test/integration/execution/map_uri_test.dart
@@ -11,7 +11,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(MapUriTest);
- defineReflectiveTests(MapUriTest_UseCFE);
});
}
@@ -39,9 +38,3 @@
}
}
}
-
-@reflectiveTest
-class MapUriTest_UseCFE extends MapUriTest {
- @override
- bool get useCFE => true;
-}
diff --git a/pkg/analysis_server/test/integration/execution/set_subscriptions_test.dart b/pkg/analysis_server/test/integration/execution/set_subscriptions_test.dart
index a715edd..441093b 100644
--- a/pkg/analysis_server/test/integration/execution/set_subscriptions_test.dart
+++ b/pkg/analysis_server/test/integration/execution/set_subscriptions_test.dart
@@ -10,7 +10,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(SetSubscriptionsTest);
- defineReflectiveTests(SetSubscriptionsTest_UseCFE);
});
}
@@ -22,9 +21,3 @@
await sendExecutionSetSubscriptions([ExecutionService.LAUNCH_DATA]);
}
}
-
-@reflectiveTest
-class SetSubscriptionsTest_UseCFE extends SetSubscriptionsTest {
- @override
- bool get useCFE => true;
-}
diff --git a/pkg/analysis_server/test/integration/kythe/get_kythe_entries_test.dart b/pkg/analysis_server/test/integration/kythe/get_kythe_entries_test.dart
index 823ac4d..ccd3c49 100644
--- a/pkg/analysis_server/test/integration/kythe/get_kythe_entries_test.dart
+++ b/pkg/analysis_server/test/integration/kythe/get_kythe_entries_test.dart
@@ -11,7 +11,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(GetKytheEntriesTest);
- defineReflectiveTests(GetKytheEntriesTest_UseCFE);
});
}
@@ -38,9 +37,3 @@
expect(result.files, isEmpty);
}
}
-
-@reflectiveTest
-class GetKytheEntriesTest_UseCFE extends GetKytheEntriesTest {
- @override
- bool get useCFE => true;
-}
diff --git a/pkg/analysis_server/test/integration/search/find_element_references_test.dart b/pkg/analysis_server/test/integration/search/find_element_references_test.dart
index 59ca4f2..10bfbfa 100644
--- a/pkg/analysis_server/test/integration/search/find_element_references_test.dart
+++ b/pkg/analysis_server/test/integration/search/find_element_references_test.dart
@@ -8,13 +8,11 @@
import 'package:test/test.dart';
import 'package:test_reflective_loader/test_reflective_loader.dart';
-import '../../test_utilities/utillities.dart';
import '../support/integration_tests.dart';
main() {
defineReflectiveSuite(() {
defineReflectiveTests(FindElementReferencesTest);
- defineReflectiveTests(FindElementReferencesTest_UseCFE);
});
}
@@ -72,14 +70,3 @@
return searchParams.results;
}
}
-
-@reflectiveTest
-class FindElementReferencesTest_UseCFE extends FindElementReferencesTest {
- @override
- bool get useCFE => true;
-
- @override
- @failingTest
- // TimeoutException
- test_findReferences() => callFailingTest(super.test_findReferences());
-}
diff --git a/pkg/analysis_server/test/integration/search/find_member_declarations_test.dart b/pkg/analysis_server/test/integration/search/find_member_declarations_test.dart
index 38f0c67..81148c0 100644
--- a/pkg/analysis_server/test/integration/search/find_member_declarations_test.dart
+++ b/pkg/analysis_server/test/integration/search/find_member_declarations_test.dart
@@ -11,7 +11,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(FindMemberDeclarationsTest);
- defineReflectiveTests(FindMemberDeclarationsTest_UseCFE);
});
}
@@ -50,9 +49,3 @@
expect(result.path.first.name, 'bar');
}
}
-
-@reflectiveTest
-class FindMemberDeclarationsTest_UseCFE extends FindMemberDeclarationsTest {
- @override
- bool get useCFE => true;
-}
diff --git a/pkg/analysis_server/test/integration/search/find_member_references_test.dart b/pkg/analysis_server/test/integration/search/find_member_references_test.dart
index e8265fe..36fccbc 100644
--- a/pkg/analysis_server/test/integration/search/find_member_references_test.dart
+++ b/pkg/analysis_server/test/integration/search/find_member_references_test.dart
@@ -6,13 +6,11 @@
import 'package:test/test.dart';
import 'package:test_reflective_loader/test_reflective_loader.dart';
-import '../../test_utilities/utillities.dart';
import '../support/integration_tests.dart';
main() {
defineReflectiveSuite(() {
defineReflectiveTests(FindMemberReferencesTest);
- defineReflectiveTests(FindMemberReferencesTest_UseCFE);
});
}
@@ -52,15 +50,3 @@
expect(result.path.first.name, 'baz');
}
}
-
-@reflectiveTest
-class FindMemberReferencesTest_UseCFE extends FindMemberReferencesTest {
- @override
- bool get useCFE => true;
-
- @override
- @failingTest
- // TimeoutException
- test_findMemberReferences() =>
- callFailingTest(super.test_findMemberReferences());
-}
diff --git a/pkg/analysis_server/test/integration/search/find_top_level_declarations_test.dart b/pkg/analysis_server/test/integration/search/find_top_level_declarations_test.dart
index 4a2a41d..66352f8 100644
--- a/pkg/analysis_server/test/integration/search/find_top_level_declarations_test.dart
+++ b/pkg/analysis_server/test/integration/search/find_top_level_declarations_test.dart
@@ -11,7 +11,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(FindTopLevelDeclarationsTest);
- defineReflectiveTests(FindTopLevelDeclarationsTest_UseCFE);
});
}
@@ -55,9 +54,3 @@
fail('No result for $pathname');
}
}
-
-@reflectiveTest
-class FindTopLevelDeclarationsTest_UseCFE extends FindTopLevelDeclarationsTest {
- @override
- bool get useCFE => true;
-}
diff --git a/pkg/analysis_server/test/integration/search/get_type_hierarchy_test.dart b/pkg/analysis_server/test/integration/search/get_type_hierarchy_test.dart
index 9f5ef14..da44055 100644
--- a/pkg/analysis_server/test/integration/search/get_type_hierarchy_test.dart
+++ b/pkg/analysis_server/test/integration/search/get_type_hierarchy_test.dart
@@ -14,7 +14,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(GetTypeHierarchyTest);
- defineReflectiveTests(GetTypeHierarchyTest_UseCFE);
});
}
@@ -230,19 +229,6 @@
}
}
-@reflectiveTest
-class GetTypeHierarchyTest_UseCFE extends GetTypeHierarchyTest {
- @override
- bool get useCFE => true;
-
- @override
- @failingTest
- test_getTypeHierarchy() {
- fail('Timeout');
-// return callFailingTest(super.test_getTypeHierarchy);
- }
-}
-
/**
* Results of a getTypeHierarchy request, processed for easier testing.
*/
diff --git a/pkg/analysis_server/test/integration/server/get_version_test.dart b/pkg/analysis_server/test/integration/server/get_version_test.dart
index 2a85544..c3dc407 100644
--- a/pkg/analysis_server/test/integration/server/get_version_test.dart
+++ b/pkg/analysis_server/test/integration/server/get_version_test.dart
@@ -9,7 +9,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(GetVersionTest);
- defineReflectiveTests(GetVersionTest_UseCFE);
});
}
@@ -19,9 +18,3 @@
return sendServerGetVersion();
}
}
-
-@reflectiveTest
-class GetVersionTest_UseCFE extends GetVersionTest {
- @override
- bool get useCFE => true;
-}
diff --git a/pkg/analysis_server/test/integration/server/set_subscriptions_invalid_service_test.dart b/pkg/analysis_server/test/integration/server/set_subscriptions_invalid_service_test.dart
index 1dbb9db..c95e046 100644
--- a/pkg/analysis_server/test/integration/server/set_subscriptions_invalid_service_test.dart
+++ b/pkg/analysis_server/test/integration/server/set_subscriptions_invalid_service_test.dart
@@ -10,7 +10,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(SetSubscriptionsInvalidTest);
- defineReflectiveTests(SetSubscriptionsInvalidTest_UseCFE);
});
}
@@ -29,9 +28,3 @@
});
}
}
-
-@reflectiveTest
-class SetSubscriptionsInvalidTest_UseCFE extends SetSubscriptionsInvalidTest {
- @override
- bool get useCFE => true;
-}
diff --git a/pkg/analysis_server/test/integration/server/set_subscriptions_test.dart b/pkg/analysis_server/test/integration/server/set_subscriptions_test.dart
index afae71b..d6de65b 100644
--- a/pkg/analysis_server/test/integration/server/set_subscriptions_test.dart
+++ b/pkg/analysis_server/test/integration/server/set_subscriptions_test.dart
@@ -13,7 +13,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(SetSubscriptionsTest);
- defineReflectiveTests(SetSubscriptionsTest_UseCFE);
});
}
@@ -72,9 +71,3 @@
});
}
}
-
-@reflectiveTest
-class SetSubscriptionsTest_UseCFE extends SetSubscriptionsTest {
- @override
- bool get useCFE => true;
-}
diff --git a/pkg/analysis_server/test/integration/server/shutdown_test.dart b/pkg/analysis_server/test/integration/server/shutdown_test.dart
index a68bf82..8478d48 100644
--- a/pkg/analysis_server/test/integration/server/shutdown_test.dart
+++ b/pkg/analysis_server/test/integration/server/shutdown_test.dart
@@ -12,7 +12,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(ShutdownTest);
- defineReflectiveTests(ShutdownTest_UseCFE);
});
}
@@ -30,9 +29,3 @@
});
}
}
-
-@reflectiveTest
-class ShutdownTest_UseCFE extends ShutdownTest {
- @override
- bool get useCFE => true;
-}
diff --git a/pkg/analysis_server/test/integration/server/status_test.dart b/pkg/analysis_server/test/integration/server/status_test.dart
index dab8eaa..72163c3 100644
--- a/pkg/analysis_server/test/integration/server/status_test.dart
+++ b/pkg/analysis_server/test/integration/server/status_test.dart
@@ -13,7 +13,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(StatusTest);
- defineReflectiveTests(StatusTest_UseCFE);
});
}
@@ -49,9 +48,3 @@
});
}
}
-
-@reflectiveTest
-class StatusTest_UseCFE extends StatusTest {
- @override
- bool get useCFE => true;
-}
diff --git a/pkg/analysis_server/test/integration/support/integration_tests.dart b/pkg/analysis_server/test/integration/support/integration_tests.dart
index bc9a1be..d38cc56 100644
--- a/pkg/analysis_server/test/integration/support/integration_tests.dart
+++ b/pkg/analysis_server/test/integration/support/integration_tests.dart
@@ -159,12 +159,6 @@
}
/**
- * Whether to run integration tests with the --use-cfe flag.
- */
- // TODO(devoncarew): Remove this when --use-cfe goes away.
- bool get useCFE => false;
-
- /**
* Print out any messages exchanged with the server. If some messages have
* already been exchanged with the server, they are printed out immediately.
*/
@@ -265,12 +259,9 @@
Future startServer({
int diagnosticPort,
int servicesPort,
- bool cfe: false,
}) {
return server.start(
- diagnosticPort: diagnosticPort,
- servicesPort: servicesPort,
- useCFE: cfe || useCFE);
+ diagnosticPort: diagnosticPort, servicesPort: servicesPort);
}
/**
@@ -677,7 +668,6 @@
bool profileServer: false,
String sdkPath,
int servicesPort,
- bool useCFE: false,
bool useAnalysisHighlight2: false,
}) async {
if (_process != null) {
@@ -745,9 +735,6 @@
if (useAnalysisHighlight2) {
arguments.add('--useAnalysisHighlight2');
}
- if (useCFE) {
- arguments.add('--use-cfe');
- }
_process = await Process.start(dartBinary, arguments);
_process.exitCode.then((int code) {
if (code != 0) {
diff --git a/pkg/analysis_server/test/integration/support/protocol_matchers.dart b/pkg/analysis_server/test/integration/support/protocol_matchers.dart
index ad53598..11b741a 100644
--- a/pkg/analysis_server/test/integration/support/protocol_matchers.dart
+++ b/pkg/analysis_server/test/integration/support/protocol_matchers.dart
@@ -335,6 +335,7 @@
* "codeOffset": int
* "codeLength": int
* "className": optional String
+ * "mixinName": optional String
* "parameters": optional String
* }
*/
@@ -350,6 +351,7 @@
"codeLength": isInt
}, optionalFields: {
"className": isString,
+ "mixinName": isString,
"parameters": isString
}));
@@ -374,6 +376,7 @@
* LIBRARY
* LOCAL_VARIABLE
* METHOD
+ * MIXIN
* PARAMETER
* PREFIX
* SETTER
@@ -402,6 +405,7 @@
"LIBRARY",
"LOCAL_VARIABLE",
"METHOD",
+ "MIXIN",
"PARAMETER",
"PREFIX",
"SETTER",
diff --git a/pkg/analysis_server/test/mock_sdk.dart b/pkg/analysis_server/test/mock_sdk.dart
index cb8e5e1..2178be8 100644
--- a/pkg/analysis_server/test/mock_sdk.dart
+++ b/pkg/analysis_server/test/mock_sdk.dart
@@ -301,8 +301,6 @@
if (generateSummaryFiles) {
List<int> bytes = _computeLinkedBundleBytes();
provider.newFileWithBytes(
- provider.convertPath('/lib/_internal/spec.sum'), bytes);
- provider.newFileWithBytes(
provider.convertPath('/lib/_internal/strong.sum'), bytes);
}
}
@@ -369,7 +367,7 @@
PackageBundle getLinkedBundle() {
if (_bundle == null) {
resource.File summaryFile =
- provider.getFile(provider.convertPath('/lib/_internal/spec.sum'));
+ provider.getFile(provider.convertPath('/lib/_internal/strong.sum'));
List<int> bytes;
if (summaryFile.exists) {
bytes = summaryFile.readAsBytesSync();
@@ -420,7 +418,7 @@
List<Source> librarySources = sdkLibraries
.map((SdkLibrary library) => mapDartUri(library.shortName))
.toList();
- return new SummaryBuilder(librarySources, context, true).build();
+ return new SummaryBuilder(librarySources, context).build();
}
}
diff --git a/pkg/analysis_server/test/plugin/protocol_dart_test.dart b/pkg/analysis_server/test/plugin/protocol_dart_test.dart
index 2640347..5799565 100644
--- a/pkg/analysis_server/test/plugin/protocol_dart_test.dart
+++ b/pkg/analysis_server/test/plugin/protocol_dart_test.dart
@@ -22,7 +22,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(ElementTest);
- defineReflectiveTests(ElementTest_UseCFE);
defineReflectiveTests(ElementKindTest);
});
}
@@ -185,7 +184,7 @@
expect(element.parameters, '(int a, {@required int c, int b})');
}
- // Verify parameter re-ordering for required params
+ /// Verify parameter re-ordering for required params
test_fromElement_CONSTRUCTOR_required_parameters_2() async {
addMetaPackageSource();
engine.Source source = addSource('/test.dart', '''
@@ -203,7 +202,7 @@
'(int a, {@required int d, @required int c, int b})');
}
- // Verify parameter re-ordering for required params
+ /// Verify parameter re-ordering for required params
test_fromElement_CONSTRUCTOR_required_parameters_3() async {
addMetaPackageSource();
engine.Source source = addSource('/test.dart', '''
@@ -487,6 +486,31 @@
expect(element.flags, Element.FLAG_STATIC);
}
+ test_fromElement_MIXIN() async {
+ engine.Source source = addSource('/test.dart', '''
+mixin A {}
+''');
+ engine.CompilationUnit unit = await resolveLibraryUnit(source);
+ {
+ engine.ClassElement engineElement = findElementInUnit(unit, 'A');
+ // create notification Element
+ Element element = convertElement(engineElement);
+ expect(element.kind, ElementKind.MIXIN);
+ expect(element.name, 'A');
+ expect(element.typeParameters, isNull);
+ {
+ Location location = element.location;
+ expect(location.file, convertPath('/test.dart'));
+ expect(location.offset, 6);
+ expect(location.length, 'A'.length);
+ expect(location.startLine, 1);
+ expect(location.startColumn, 7);
+ }
+ expect(element.parameters, isNull);
+ expect(element.flags, 0);
+ }
+ }
+
test_fromElement_SETTER() async {
engine.Source source = addSource('/test.dart', '''
class A {
@@ -512,13 +536,3 @@
expect(element.flags, 0);
}
}
-
-@reflectiveTest
-class ElementTest_UseCFE extends ElementTest {
- @override
- bool get useCFE => true;
-
- @failingTest
- @override
- test_fromElement_LABEL() => super.test_fromElement_LABEL();
-}
diff --git a/pkg/analysis_server/test/search/declarations_test.dart b/pkg/analysis_server/test/search/declarations_test.dart
index d6a495d..8af7bf4 100644
--- a/pkg/analysis_server/test/search/declarations_test.dart
+++ b/pkg/analysis_server/test/search/declarations_test.dart
@@ -15,7 +15,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(DeclarationsTest);
- defineReflectiveTests(DeclarationsTest_UseCFE);
});
}
@@ -24,12 +23,13 @@
SearchGetElementDeclarationsResult declarationsResult;
ElementDeclaration assertHas(String name, ElementKind kind,
- {String className}) {
+ {String className, String mixinName}) {
return declarationsResult.declarations.singleWhere((ElementDeclaration d) =>
declarationsResult.files[d.fileIndex] == testFile &&
d.name == name &&
d.kind == kind &&
- d.className == className);
+ d.className == className &&
+ d.mixinName == mixinName);
}
void assertNo(String name) {
@@ -98,6 +98,24 @@
expect(declarationsResult.declarations, hasLength(4));
}
+ test_mixin() async {
+ addTestFile(r'''
+mixin M {
+ int f;
+ int get g => 0;
+ void set s(_) {}
+ void m() {}
+}
+''');
+ await _getDeclarations();
+
+ assertHas('M', ElementKind.MIXIN);
+ assertHas('f', ElementKind.FIELD, mixinName: 'M');
+ assertHas('g', ElementKind.GETTER, mixinName: 'M');
+ assertHas('s', ElementKind.SETTER, mixinName: 'M');
+ assertHas('m', ElementKind.METHOD, mixinName: 'M');
+ }
+
test_multipleFiles() async {
var a = newFile(join(testFolder, 'a.dart'), content: 'class A {}').path;
var b = newFile(join(testFolder, 'b.dart'), content: 'class B {}').path;
@@ -197,9 +215,3 @@
new SearchGetElementDeclarationsResult.fromResponse(response);
}
}
-
-@reflectiveTest
-class DeclarationsTest_UseCFE extends DeclarationsTest {
- @override
- bool get useCFE => true;
-}
diff --git a/pkg/analysis_server/test/search/element_references_test.dart b/pkg/analysis_server/test/search/element_references_test.dart
index 5450ed7..fb3aa88 100644
--- a/pkg/analysis_server/test/search/element_references_test.dart
+++ b/pkg/analysis_server/test/search/element_references_test.dart
@@ -15,7 +15,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(ElementReferencesTest);
- defineReflectiveTests(ElementReferencesTest_UseCFE);
});
}
@@ -409,6 +408,17 @@
assertHasResult(SearchResultKind.REFERENCE, 'mmm);');
}
+ Future<void> test_mixin() async {
+ addTestFile('''
+mixin A {}
+class B extends Object with A {} // B
+''');
+ await findElementReferences('A {}', false);
+ expect(searchElement.kind, ElementKind.MIXIN);
+ expect(results, hasLength(1));
+ assertHasResult(SearchResultKind.REFERENCE, 'A {} // B');
+ }
+
Future<void> test_noElement() async {
addTestFile('''
main() {
@@ -697,226 +707,3 @@
assertHasResult(SearchResultKind.REFERENCE, 'T m()');
}
}
-
-@reflectiveTest
-class ElementReferencesTest_UseCFE extends ElementReferencesTest {
- @override
- bool get useCFE => true;
-
- @failingTest
- @override
- test_constructor_named() async {
- fail('Timeout');
-// return callFailingTest(super.test_constructor_named);
- }
-
- @failingTest
- @override
- test_constructor_named_potential() async {
- fail('Timeout');
-// return callFailingTest(super.test_constructor_named_potential);
- }
-
- @failingTest
- @override
- test_constructor_unnamed() async {
- fail('Timeout');
-// return callFailingTest(super.test_constructor_unnamed);
- }
-
- @failingTest
- @override
- test_constructor_unnamed_potential() async {
- fail('Timeout');
-// return callFailingTest(super.test_constructor_unnamed_potential);
- }
-
- @failingTest
- @override
- test_field_explicit() async {
- fail('Timeout');
-// return callFailingTest(super.test_field_explicit);
- }
-
- @failingTest
- @override
- test_field_implicit() async {
- fail('Timeout');
-// return callFailingTest(super.test_field_implicit);
- }
-
- @failingTest
- @override
- test_field_inFormalParameter() async {
- fail('Timeout');
-// return callFailingTest(super.test_field_inFormalParameter);
- }
-
- @failingTest
- @override
- test_function() async {
- fail('Timeout');
-// return callFailingTest(super.test_function);
- }
-
- @failingTest
- @override
- test_hierarchy_field_explicit() async {
- fail('Timeout');
-// return callFailingTest(super.test_hierarchy_field_explicit);
- }
-
- @failingTest
- @override
- test_hierarchy_method() async {
- fail('Timeout');
-// return callFailingTest(super.test_hierarchy_method);
- }
-
- @failingTest
- @override
- test_hierarchy_method_static() async {
- fail('Timeout');
-// return callFailingTest(super.test_hierarchy_method_static);
- }
-
- @failingTest
- @override
- test_hierarchy_namedParameter() async {
- fail('Timeout');
-// return callFailingTest(super.test_hierarchy_namedParameter);
- }
-
- @failingTest
- @override
- test_label() async {
- fail('Timeout');
-// return callFailingTest(super.test_label);
- }
-
- @failingTest
- @override
- test_localVariable() async {
- fail('Timeout');
-// return callFailingTest(super.test_localVariable);
- }
-
- @failingTest
- @override
- test_method() async {
- fail('Timeout');
-// return callFailingTest(super.test_method);
- }
-
- @failingTest
- @override
- test_method_propagatedType() async {
- fail('Timeout');
-// return callFailingTest(super.test_method_propagatedType);
- }
-
- @failingTest
- @override
- test_oneUnit_zeroLibraries() async {
- fail('Timeout');
-// return callFailingTest(super.test_oneUnit_zeroLibraries);
- }
-
- @failingTest
- @override
- test_parameter() async {
- fail('Timeout');
-// return callFailingTest(super.test_parameter);
- }
-
- @failingTest
- @override
- test_path_inConstructor_named() async {
- fail('Timeout');
-// return callFailingTest(super.test_path_inConstructor_named);
- }
-
- @failingTest
- @override
- test_path_inConstructor_unnamed() async {
- fail('Timeout');
-// return callFailingTest(super.test_path_inConstructor_unnamed);
- }
-
- @failingTest
- @override
- test_path_inFunction() async {
- fail('Timeout');
-// return callFailingTest(super.test_path_inFunction);
- }
-
- @failingTest
- @override
- test_potential_disabled() async {
- fail('Timeout');
-// return callFailingTest(super.test_potential_disabled);
- }
-
- @failingTest
- @override
- test_potential_field() async {
- fail('Timeout');
-// return callFailingTest(super.test_potential_field);
- }
-
- @failingTest
- @override
- test_potential_method() async {
- fail('Timeout');
-// return callFailingTest(super.test_potential_method);
- }
-
- @failingTest
- @override
- test_potential_method_definedInSubclass() async {
- fail('Timeout');
-// return callFailingTest(super.test_potential_method_definedInSubclass);
- }
-
- @failingTest
- @override
- test_prefix() async {
- fail('Timeout');
-// return callFailingTest(super.test_prefix);
- }
-
- @failingTest
- @override
- test_topLevelVariable_explicit() async {
- fail('Timeout');
-// return callFailingTest(super.test_topLevelVariable_explicit);
- }
-
- @failingTest
- @override
- test_topLevelVariable_implicit() async {
- fail('Timeout');
-// return callFailingTest(super.test_topLevelVariable_implicit);
- }
-
- @failingTest
- @override
- test_typeReference_class() async {
- fail('Timeout');
-// return callFailingTest(super.test_typeReference_class);
- }
-
- @failingTest
- @override
- test_typeReference_functionType() async {
- fail('Timeout');
-// return callFailingTest(super.test_typeReference_functionType);
- }
-
- @failingTest
- @override
- test_typeReference_typeVariable() async {
- fail('Timeout');
-// return callFailingTest(super.test_typeReference_typeVariable);
- }
-}
diff --git a/pkg/analysis_server/test/search/member_declarations_test.dart b/pkg/analysis_server/test/search/member_declarations_test.dart
index e5cddfb..644912e 100644
--- a/pkg/analysis_server/test/search/member_declarations_test.dart
+++ b/pkg/analysis_server/test/search/member_declarations_test.dart
@@ -15,7 +15,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(MemberDeclarationsTest);
- defineReflectiveTests(MemberDeclarationsTest_UseCFE);
});
}
@@ -156,9 +155,3 @@
assertHasDeclaration(ElementKind.SETTER, 'B');
}
}
-
-@reflectiveTest
-class MemberDeclarationsTest_UseCFE extends MemberDeclarationsTest {
- @override
- bool get useCFE => true;
-}
diff --git a/pkg/analysis_server/test/search/member_references_test.dart b/pkg/analysis_server/test/search/member_references_test.dart
index bb899b4..3f29142 100644
--- a/pkg/analysis_server/test/search/member_references_test.dart
+++ b/pkg/analysis_server/test/search/member_references_test.dart
@@ -14,7 +14,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(MemberReferencesTest);
- defineReflectiveTests(MemberReferencesTest_UseCFE);
});
}
@@ -113,30 +112,3 @@
assertHasRef(SearchResultKind.INVOCATION, 'foo(20)', true);
}
}
-
-@reflectiveTest
-class MemberReferencesTest_UseCFE extends MemberReferencesTest {
- @override
- bool get useCFE => true;
-
- @failingTest
- @override
- test_fields_explicit() async {
- fail('Timeout');
-// return callFailingTest(super.test_fields_explicit);
- }
-
- @failingTest
- @override
- test_fields_implicit() async {
- fail('Timeout');
-// return callFailingTest(super.test_fields_implicit);
- }
-
- @failingTest
- @override
- test_methods() async {
- fail('Timeout');
-// return callFailingTest(super.test_methods);
- }
-}
diff --git a/pkg/analysis_server/test/search/top_level_declarations_test.dart b/pkg/analysis_server/test/search/top_level_declarations_test.dart
index 48a48ef..5e46628 100644
--- a/pkg/analysis_server/test/search/top_level_declarations_test.dart
+++ b/pkg/analysis_server/test/search/top_level_declarations_test.dart
@@ -15,7 +15,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(TopLevelDeclarationsTest);
- defineReflectiveTests(TopLevelDeclarationsTest_UseCFE);
});
}
@@ -81,9 +80,3 @@
assertNoDeclaration(ElementKind.CLASS, 'ABC');
}
}
-
-@reflectiveTest
-class TopLevelDeclarationsTest_UseCFE extends TopLevelDeclarationsTest {
- @override
- bool get useCFE => true;
-}
diff --git a/pkg/analysis_server/test/search/type_hierarchy_test.dart b/pkg/analysis_server/test/search/type_hierarchy_test.dart
index 0331546..f993d47 100644
--- a/pkg/analysis_server/test/search/type_hierarchy_test.dart
+++ b/pkg/analysis_server/test/search/type_hierarchy_test.dart
@@ -16,7 +16,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(GetTypeHierarchyTest);
- defineReflectiveTests(GetTypeHierarchyTest_UseCFE);
});
}
@@ -1052,132 +1051,3 @@
}).toSet();
}
}
-
-@reflectiveTest
-class GetTypeHierarchyTest_UseCFE extends GetTypeHierarchyTest {
- @override
- bool get useCFE => true;
-
- @failingTest
- @override
- test_bad_recursion() => super.test_bad_recursion();
-
- @failingTest
- @override
- test_class_double_subclass() {
- fail('Timeout');
-// return callFailingTest(super.test_class_double_subclass);
- }
-
- @failingTest
- @override
- test_class_extends_fileAndPackageUris() {
- fail('Timeout');
-// return callFailingTest(super.test_class_extends_fileAndPackageUris);
- }
-
- @failingTest
- @override
- test_class_extendsTypeA() {
- fail('Timeout');
-// return callFailingTest(super.test_class_extendsTypeA);
- }
-
- @failingTest
- @override
- test_class_extendsTypeB() {
- fail('Timeout');
-// return callFailingTest(super.test_class_extendsTypeB);
- }
-
- @failingTest
- @override
- test_fromField_toMixinGetter() {
- fail('Timeout');
-// return callFailingTest(super.test_fromField_toMixinGetter);
- }
-
- @failingTest
- @override
- test_fromField_toMixinSetter() {
- fail('Timeout');
-// return callFailingTest(super.test_fromField_toMixinSetter);
- }
-
- @failingTest
- @override
- test_member_getter() {
- fail('Timeout');
-// return callFailingTest(super.test_member_getter);
- }
-
- @failingTest
- @override
- test_member_method() {
- fail('Timeout');
-// return callFailingTest(super.test_member_method);
- }
-
- @failingTest
- @override
- test_member_method_private_differentLib() {
- fail('Timeout');
-// return callFailingTest(super.test_member_method_private_differentLib);
- }
-
- @failingTest
- @override
- test_member_method_private_sameLib() {
- fail('Timeout');
-// return callFailingTest(super.test_member_method_private_sameLib);
- }
-
- @failingTest
- @override
- test_member_ofMixin2_method() {
- fail('Timeout');
-// return callFailingTest(super.test_member_ofMixin2_method);
- }
-
- @failingTest
- @override
- test_member_ofMixin_getter() {
- fail('Timeout');
-// return callFailingTest(super.test_member_ofMixin_getter);
- }
-
- @failingTest
- @override
- test_member_ofMixin_method() {
- fail('Timeout');
-// return callFailingTest(super.test_member_ofMixin_method);
- }
-
- @failingTest
- @override
- test_member_ofMixin_setter() {
- fail('Timeout');
-// return callFailingTest(super.test_member_ofMixin_setter);
- }
-
- @failingTest
- @override
- test_member_operator() {
- fail('Timeout');
-// return callFailingTest(super.test_member_operator);
- }
-
- @failingTest
- @override
- test_member_setter() {
- fail('Timeout');
-// return callFailingTest(super.test_member_setter);
- }
-
- @failingTest
- @override
- test_superOnly_fileDoesNotExist() {
- fail('Timeout');
-// return callFailingTest(super.test_superOnly_fileDoesNotExist);
- }
-}
diff --git a/pkg/analysis_server/test/services/completion/dart/arglist_contributor_test.dart b/pkg/analysis_server/test/services/completion/dart/arglist_contributor_test.dart
index abb74ac..2353870 100644
--- a/pkg/analysis_server/test/services/completion/dart/arglist_contributor_test.dart
+++ b/pkg/analysis_server/test/services/completion/dart/arglist_contributor_test.dart
@@ -13,7 +13,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(ArgListContributorTest);
- defineReflectiveTests(ArgListContributorTest_UseCFE);
});
}
@@ -1056,9 +1055,3 @@
assertSuggestArgumentList(['arg', 'blat'], ['dynamic', 'int']);
}
}
-
-@reflectiveTest
-class ArgListContributorTest_UseCFE extends ArgListContributorTest {
- @override
- bool get useCFE => true;
-}
diff --git a/pkg/analysis_server/test/services/completion/dart/combinator_contributor_test.dart b/pkg/analysis_server/test/services/completion/dart/combinator_contributor_test.dart
index 28d92cc..ac4c454 100644
--- a/pkg/analysis_server/test/services/completion/dart/combinator_contributor_test.dart
+++ b/pkg/analysis_server/test/services/completion/dart/combinator_contributor_test.dart
@@ -12,7 +12,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(CombinatorContributorTest);
- defineReflectiveTests(CombinatorContributorTest_UseCFE);
});
}
@@ -170,13 +169,3 @@
kind: CompletionSuggestionKind.IDENTIFIER);
}
}
-
-@reflectiveTest
-class CombinatorContributorTest_UseCFE extends CombinatorContributorTest {
- @override
- bool get useCFE => true;
-
- @failingTest
- @override
- test_Block_inherited_local() => super.test_Block_inherited_local();
-}
diff --git a/pkg/analysis_server/test/services/completion/dart/common_usage_sorter_test.dart b/pkg/analysis_server/test/services/completion/dart/common_usage_sorter_test.dart
index 9b2c734..0809c6e 100644
--- a/pkg/analysis_server/test/services/completion/dart/common_usage_sorter_test.dart
+++ b/pkg/analysis_server/test/services/completion/dart/common_usage_sorter_test.dart
@@ -16,7 +16,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(CommonUsageSorterTest);
- defineReflectiveTests(CommonUsageSorterTest_UseCFE);
});
}
@@ -166,9 +165,3 @@
assertNoResult('A');
}
}
-
-@reflectiveTest
-class CommonUsageSorterTest_UseCFE extends CommonUsageSorterTest {
- @override
- bool get useCFE => true;
-}
diff --git a/pkg/analysis_server/test/services/completion/dart/completion_contributor_util.dart b/pkg/analysis_server/test/services/completion/dart/completion_contributor_util.dart
index b243c9d..015c377 100644
--- a/pkg/analysis_server/test/services/completion/dart/completion_contributor_util.dart
+++ b/pkg/analysis_server/test/services/completion/dart/completion_contributor_util.dart
@@ -47,7 +47,7 @@
*/
bool get suggestConstructorsWithoutNew => true;
- bool get usingFastaParser => useCFE || analyzer.Parser.useFasta;
+ bool get usingFastaParser => analyzer.Parser.useFasta;
void addTestSource(String content) {
expect(completionOffset, isNull, reason: 'Call addTestUnit exactly once');
diff --git a/pkg/analysis_server/test/services/completion/dart/completion_manager_test.dart b/pkg/analysis_server/test/services/completion/dart/completion_manager_test.dart
index cc4ea95..b9546e7 100644
--- a/pkg/analysis_server/test/services/completion/dart/completion_manager_test.dart
+++ b/pkg/analysis_server/test/services/completion/dart/completion_manager_test.dart
@@ -19,7 +19,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(CompletionManagerTest);
- defineReflectiveTests(CompletionManagerTest_UseCFE);
});
}
@@ -87,9 +86,3 @@
assertImportedLib('libA.dart');
}
}
-
-@reflectiveTest
-class CompletionManagerTest_UseCFE extends CompletionManagerTest {
- @override
- bool get useCFE => true;
-}
diff --git a/pkg/analysis_server/test/services/completion/dart/field_formal_contributor_test.dart b/pkg/analysis_server/test/services/completion/dart/field_formal_contributor_test.dart
index 7fefb4d..28fcdbe 100644
--- a/pkg/analysis_server/test/services/completion/dart/field_formal_contributor_test.dart
+++ b/pkg/analysis_server/test/services/completion/dart/field_formal_contributor_test.dart
@@ -12,7 +12,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(FieldFormalContributorTest);
- defineReflectiveTests(FieldFormalContributorTest_UseCFE);
});
}
@@ -196,9 +195,3 @@
assertNotSuggested('x');
}
}
-
-@reflectiveTest
-class FieldFormalContributorTest_UseCFE extends FieldFormalContributorTest {
- @override
- bool get useCFE => true;
-}
diff --git a/pkg/analysis_server/test/services/completion/dart/imported_reference_contributor_test.dart b/pkg/analysis_server/test/services/completion/dart/imported_reference_contributor_test.dart
index 654b9eaa..556616f 100644
--- a/pkg/analysis_server/test/services/completion/dart/imported_reference_contributor_test.dart
+++ b/pkg/analysis_server/test/services/completion/dart/imported_reference_contributor_test.dart
@@ -15,7 +15,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(ImportedReferenceContributorTest);
- defineReflectiveTests(ImportedReferenceContributorTest_UseCFE);
});
}
@@ -4458,93 +4457,3 @@
assertNotSuggested('e');
}
}
-
-@reflectiveTest
-class ImportedReferenceContributorTest_UseCFE
- extends ImportedReferenceContributorTest {
- @override
- bool get useCFE => true;
-
- @failingTest
- @override
- test_AsExpression() => super.test_AsExpression();
-
- @failingTest
- @override
- test_Block_inherited_imported() => super.test_Block_inherited_imported();
-
- @failingTest
- @override
- test_Block_inherited_local() => super.test_Block_inherited_local();
-
- @failingTest
- @override
- test_Block_partial_results() => super.test_Block_partial_results();
-
- @failingTest
- @override
- test_CatchClause_onType() => super.test_CatchClause_onType();
-
- @failingTest
- @override
- test_CatchClause_onType_noBrackets() =>
- super.test_CatchClause_onType_noBrackets();
-
- @failingTest
- @override
- test_CatchClause_typed() => super.test_CatchClause_typed();
-
- @failingTest
- @override
- test_Combinator_hide() => super.test_Combinator_hide();
-
- @failingTest
- @override
- test_Combinator_show() => super.test_Combinator_show();
-
- @failingTest
- @override
- test_ConditionalExpression_partial_thenExpression_empty() =>
- super.test_ConditionalExpression_partial_thenExpression_empty();
-
- @failingTest
- @override
- test_DefaultFormalParameter_named_expression() =>
- super.test_DefaultFormalParameter_named_expression();
-
- @failingTest
- @override
- test_ForEachStatement_body_untyped() =>
- super.test_ForEachStatement_body_untyped();
-
- @failingTest
- @override
- test_ForEachStatement_loopVariable_type() =>
- super.test_ForEachStatement_loopVariable_type();
-
- @failingTest
- @override
- test_ForStatement_initializer() => super.test_ForStatement_initializer();
-
- @failingTest
- @override
- test_ImportDirective_dart() => super.test_ImportDirective_dart();
-
- @failingTest
- @override
- test_InstanceCreationExpression() => super.test_InstanceCreationExpression();
-
- @failingTest
- @override
- test_InstanceCreationExpression_unimported() =>
- super.test_InstanceCreationExpression_unimported();
-
- @failingTest
- @override
- test_multiple_contexts() => super.test_multiple_contexts();
-
- @failingTest
- @override
- test_PrefixedIdentifier_class_const() =>
- super.test_PrefixedIdentifier_class_const();
-}
diff --git a/pkg/analysis_server/test/services/completion/dart/inherited_reference_contributor_test.dart b/pkg/analysis_server/test/services/completion/dart/inherited_reference_contributor_test.dart
index 936cb79..be6cb0a 100644
--- a/pkg/analysis_server/test/services/completion/dart/inherited_reference_contributor_test.dart
+++ b/pkg/analysis_server/test/services/completion/dart/inherited_reference_contributor_test.dart
@@ -14,7 +14,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(InheritedReferenceContributorTest);
- defineReflectiveTests(InheritedReferenceContributorTest_UseCFE);
});
}
@@ -676,18 +675,3 @@
expect(cs.hasNamedParameters, isNull);
}
}
-
-@reflectiveTest
-class InheritedReferenceContributorTest_UseCFE
- extends InheritedReferenceContributorTest {
- @override
- bool get useCFE => true;
-
- @failingTest
- @override
- test_Block_inherited_imported() => super.test_Block_inherited_imported();
-
- @failingTest
- @override
- test_Block_inherited_local() => super.test_Block_inherited_local();
-}
diff --git a/pkg/analysis_server/test/services/completion/dart/keyword_contributor_test.dart b/pkg/analysis_server/test/services/completion/dart/keyword_contributor_test.dart
index c010d63..f2e2ba2 100644
--- a/pkg/analysis_server/test/services/completion/dart/keyword_contributor_test.dart
+++ b/pkg/analysis_server/test/services/completion/dart/keyword_contributor_test.dart
@@ -14,7 +14,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(KeywordContributorTest);
- defineReflectiveTests(KeywordContributorTest_UseCFE);
});
}
@@ -1669,6 +1668,19 @@
assertSuggestKeywords(EXPRESSION_START_NO_INSTANCE);
}
+ test_mixin() async {
+ addTestSource('mixin M o^ { }');
+ await computeSuggestions();
+ assertSuggestKeywords([Keyword.ON, Keyword.IMPLEMENTS],
+ relevance: DART_RELEVANCE_HIGH);
+ }
+
+ test_mixin_afterOnClause() async {
+ addTestSource('mixin M on A i^ { } class A {}');
+ await computeSuggestions();
+ assertSuggestKeywords([Keyword.IMPLEMENTS], relevance: DART_RELEVANCE_HIGH);
+ }
+
test_named_constructor_invocation() async {
addTestSource('void main() {new Future.^}');
await computeSuggestions();
@@ -1870,181 +1882,3 @@
return true;
}
}
-
-@reflectiveTest
-class KeywordContributorTest_UseCFE extends KeywordContributorTest {
- @override
- bool get useCFE => true;
-
- @failingTest
- @override
- test_after_import() => super.test_after_import();
-
- @failingTest
- @override
- test_after_import2() => super.test_after_import2();
-
- @failingTest
- @override
- test_class_extends_name() => super.test_class_extends_name();
-
- @failingTest
- @override
- test_class_implements2() => super.test_class_implements2();
-
- @failingTest
- @override
- test_class_implements3() => super.test_class_implements3();
-
- @failingTest
- @override
- test_class_implements_name() => super.test_class_implements_name();
-
- @failingTest
- @override
- test_class_with_name() => super.test_class_with_name();
-
- @failingTest
- @override
- test_for_initialization_var() => super.test_for_initialization_var();
-
- @failingTest
- @override
- test_function_async4() => super.test_function_async4();
-
- @failingTest
- @override
- test_import() => super.test_import();
-
- @failingTest
- @override
- test_import_as() => super.test_import_as();
-
- @failingTest
- @override
- test_import_as2() => super.test_import_as2();
-
- @failingTest
- @override
- test_import_as3() => super.test_import_as3();
-
- @failingTest
- @override
- test_import_deferred() => super.test_import_deferred();
-
- @failingTest
- @override
- test_import_deferred2() => super.test_import_deferred2();
-
- @failingTest
- @override
- test_import_deferred3() => super.test_import_deferred3();
-
- @failingTest
- @override
- test_import_deferred4() => super.test_import_deferred4();
-
- @failingTest
- @override
- test_import_deferred5() => super.test_import_deferred5();
-
- @failingTest
- @override
- test_import_deferred6() => super.test_import_deferred6();
-
- @failingTest
- @override
- test_import_deferred_as() => super.test_import_deferred_as();
-
- @failingTest
- @override
- test_import_deferred_as2() => super.test_import_deferred_as2();
-
- @failingTest
- @override
- test_import_deferred_as3() => super.test_import_deferred_as3();
-
- @failingTest
- @override
- test_import_deferred_as4() => super.test_import_deferred_as4();
-
- @failingTest
- @override
- test_import_deferred_as5() => super.test_import_deferred_as5();
-
- @failingTest
- @override
- test_import_deferred_not() => super.test_import_deferred_not();
-
- @failingTest
- @override
- test_import_deferred_partial() => super.test_import_deferred_partial();
-
- @failingTest
- @override
- test_import_partial() => super.test_import_partial();
-
- @failingTest
- @override
- test_import_partial2() => super.test_import_partial2();
-
- @failingTest
- @override
- test_import_partial3() => super.test_import_partial3();
-
- @failingTest
- @override
- test_import_partial4() => super.test_import_partial4();
-
- @failingTest
- @override
- test_import_partial5() => super.test_import_partial5();
-
- @failingTest
- @override
- test_import_partial6() => super.test_import_partial6();
-
- @failingTest
- @override
- test_method_async4() => super.test_method_async4();
-
- @failingTest
- @override
- test_method_async5() => super.test_method_async5();
-
- @failingTest
- @override
- test_method_async6() => super.test_method_async6();
-
- @failingTest
- @override
- test_method_async7() => super.test_method_async7();
-
- @failingTest
- @override
- test_method_async8() => super.test_method_async8();
-
- @failingTest
- @override
- test_method_body3() => super.test_method_body3();
-
- @failingTest
- @override
- test_method_body_async3() => super.test_method_body_async3();
-
- @failingTest
- @override
- test_method_body_expression1() => super.test_method_body_expression1();
-
- @failingTest
- @override
- test_newInstance2() => super.test_newInstance2();
-
- @failingTest
- @override
- test_part_of() => super.test_part_of();
-
- @failingTest
- @override
- test_prefixed_library() => super.test_prefixed_library();
-}
diff --git a/pkg/analysis_server/test/services/completion/dart/label_contributor_test.dart b/pkg/analysis_server/test/services/completion/dart/label_contributor_test.dart
index 2bbf534..0cd2068 100644
--- a/pkg/analysis_server/test/services/completion/dart/label_contributor_test.dart
+++ b/pkg/analysis_server/test/services/completion/dart/label_contributor_test.dart
@@ -13,7 +13,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(LabelContributorTest);
- defineReflectiveTests(LabelContributorTest_UseCFE);
});
}
@@ -319,26 +318,3 @@
assertSuggestLabel('foo');
}
}
-
-@reflectiveTest
-class LabelContributorTest_UseCFE extends LabelContributorTest {
- @override
- bool get useCFE => true;
-
- @failingTest
- @override
- test_continue_to_earlier_case() => super.test_continue_to_earlier_case();
-
- @failingTest
- @override
- test_continue_to_enclosing_switch() =>
- super.test_continue_to_enclosing_switch();
-
- @failingTest
- @override
- test_continue_to_later_case() => super.test_continue_to_later_case();
-
- @failingTest
- @override
- test_continue_to_same_case() => super.test_continue_to_same_case();
-}
diff --git a/pkg/analysis_server/test/services/completion/dart/library_member_contributor_test.dart b/pkg/analysis_server/test/services/completion/dart/library_member_contributor_test.dart
index 1601e63..3f3f9fc 100644
--- a/pkg/analysis_server/test/services/completion/dart/library_member_contributor_test.dart
+++ b/pkg/analysis_server/test/services/completion/dart/library_member_contributor_test.dart
@@ -12,7 +12,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(LibraryMemberContributorTest);
- defineReflectiveTests(LibraryMemberContributorTest_UseCFE);
});
}
@@ -286,18 +285,3 @@
assertNoSuggestions();
}
}
-
-@reflectiveTest
-class LibraryMemberContributorTest_UseCFE extends LibraryMemberContributorTest {
- @override
- bool get useCFE => true;
-
- @failingTest
- @override
- test_libraryPrefix_deferred() => super.test_libraryPrefix_deferred();
-
- @failingTest
- @override
- test_libraryPrefix_deferred_inPart() =>
- super.test_libraryPrefix_deferred_inPart();
-}
diff --git a/pkg/analysis_server/test/services/completion/dart/library_prefix_contributor_test.dart b/pkg/analysis_server/test/services/completion/dart/library_prefix_contributor_test.dart
index 070aeed..5fb24d4 100644
--- a/pkg/analysis_server/test/services/completion/dart/library_prefix_contributor_test.dart
+++ b/pkg/analysis_server/test/services/completion/dart/library_prefix_contributor_test.dart
@@ -13,7 +13,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(LibraryPrefixContributorTest);
- defineReflectiveTests(LibraryPrefixContributorTest_UseCFE);
});
}
@@ -328,23 +327,3 @@
assertNoSuggestions();
}
}
-
-@reflectiveTest
-class LibraryPrefixContributorTest_UseCFE extends LibraryPrefixContributorTest {
- @override
- bool get useCFE => true;
-
- @failingTest
- @override
- test_InstanceCreationExpression() => super.test_InstanceCreationExpression();
-
- @failingTest
- @override
- test_InstanceCreationExpression_inPart() =>
- super.test_InstanceCreationExpression_inPart();
-
- @failingTest
- @override
- test_InstanceCreationExpression_inPart_detached() =>
- super.test_InstanceCreationExpression_inPart_detached();
-}
diff --git a/pkg/analysis_server/test/services/completion/dart/local_constructor_contributor_test.dart b/pkg/analysis_server/test/services/completion/dart/local_constructor_contributor_test.dart
index f832fca..d361dc9 100644
--- a/pkg/analysis_server/test/services/completion/dart/local_constructor_contributor_test.dart
+++ b/pkg/analysis_server/test/services/completion/dart/local_constructor_contributor_test.dart
@@ -13,7 +13,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(LocalConstructorContributorTest);
- defineReflectiveTests(LocalConstructorContributorTest_UseCFE);
});
}
@@ -4182,77 +4181,3 @@
assertNotSuggested('e');
}
}
-
-@reflectiveTest
-class LocalConstructorContributorTest_UseCFE
- extends LocalConstructorContributorTest {
- @override
- bool get useCFE => true;
-
- @failingTest
- @override
- test_AsExpression() => super.test_AsExpression();
-
- @failingTest
- @override
- test_Block_inherited_imported() => super.test_Block_inherited_imported();
-
- @failingTest
- @override
- test_Block_inherited_local() => super.test_Block_inherited_local();
-
- @failingTest
- @override
- test_CatchClause_onType() => super.test_CatchClause_onType();
-
- @failingTest
- @override
- test_CatchClause_onType_noBrackets() =>
- super.test_CatchClause_onType_noBrackets();
-
- @failingTest
- @override
- test_CatchClause_typed() => super.test_CatchClause_typed();
-
- @failingTest
- @override
- test_ConditionalExpression_partial_thenExpression_empty() =>
- super.test_ConditionalExpression_partial_thenExpression_empty();
-
- @failingTest
- @override
- test_DefaultFormalParameter_named_expression() =>
- super.test_DefaultFormalParameter_named_expression();
-
- @failingTest
- @override
- test_ForEachStatement_body_untyped() =>
- super.test_ForEachStatement_body_untyped();
-
- @failingTest
- @override
- test_ForEachStatement_loopVariable_type() =>
- super.test_ForEachStatement_loopVariable_type();
-
- @failingTest
- @override
- test_ForStatement_initializer() => super.test_ForStatement_initializer();
-
- @failingTest
- @override
- test_ImportDirective_dart() => super.test_ImportDirective_dart();
-
- @failingTest
- @override
- test_InstanceCreationExpression() => super.test_InstanceCreationExpression();
-
- @failingTest
- @override
- test_InstanceCreationExpression_unimported() =>
- super.test_InstanceCreationExpression_unimported();
-
- @failingTest
- @override
- test_PrefixedIdentifier_class_const() =>
- super.test_PrefixedIdentifier_class_const();
-}
diff --git a/pkg/analysis_server/test/services/completion/dart/local_library_contributor_test.dart b/pkg/analysis_server/test/services/completion/dart/local_library_contributor_test.dart
index 54a4284..e3d07b2 100644
--- a/pkg/analysis_server/test/services/completion/dart/local_library_contributor_test.dart
+++ b/pkg/analysis_server/test/services/completion/dart/local_library_contributor_test.dart
@@ -12,7 +12,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(LocalLibraryContributorTest);
- defineReflectiveTests(LocalLibraryContributorTest_UseCFE);
});
}
@@ -291,9 +290,3 @@
assertNotSuggested('m');
}
}
-
-@reflectiveTest
-class LocalLibraryContributorTest_UseCFE extends LocalLibraryContributorTest {
- @override
- bool get useCFE => true;
-}
diff --git a/pkg/analysis_server/test/services/completion/dart/local_reference_contributor_test.dart b/pkg/analysis_server/test/services/completion/dart/local_reference_contributor_test.dart
index ecf6d6a..3987353 100644
--- a/pkg/analysis_server/test/services/completion/dart/local_reference_contributor_test.dart
+++ b/pkg/analysis_server/test/services/completion/dart/local_reference_contributor_test.dart
@@ -13,7 +13,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(LocalReferenceContributorTest);
- defineReflectiveTests(LocalReferenceContributorTest_UseCFE);
});
}
@@ -4680,82 +4679,3 @@
assertNotSuggested('e');
}
}
-
-@reflectiveTest
-class LocalReferenceContributorTest_UseCFE
- extends LocalReferenceContributorTest {
- @override
- bool get useCFE => true;
-
- @failingTest
- @override
- test_AsExpression_type() => super.test_AsExpression_type();
-
- @failingTest
- @override
- test_Block_inherited_imported() => super.test_Block_inherited_imported();
-
- @failingTest
- @override
- test_Block_inherited_local() => super.test_Block_inherited_local();
-
- @failingTest
- @override
- test_CatchClause_onType() => super.test_CatchClause_onType();
-
- @failingTest
- @override
- test_CatchClause_onType_noBrackets() =>
- super.test_CatchClause_onType_noBrackets();
-
- @failingTest
- @override
- test_CatchClause_typed() => super.test_CatchClause_typed();
-
- @failingTest
- @override
- test_ConditionalExpression_partial_thenExpression_empty() =>
- super.test_ConditionalExpression_partial_thenExpression_empty();
-
- @failingTest
- @override
- test_DefaultFormalParameter_named_expression() =>
- super.test_DefaultFormalParameter_named_expression();
-
- @failingTest
- @override
- test_ForEachStatement_body_untyped() =>
- super.test_ForEachStatement_body_untyped();
-
- @failingTest
- @override
- test_ForEachStatement_loopVariable_type() =>
- super.test_ForEachStatement_loopVariable_type();
-
- @failingTest
- @override
- test_ForStatement_initializer() => super.test_ForStatement_initializer();
-
- @failingTest
- @override
- test_FunctionExpression_body_function() =>
- super.test_FunctionExpression_body_function();
-
- @failingTest
- @override
- test_ImportDirective_dart() => super.test_ImportDirective_dart();
-
- @failingTest
- @override
- test_InstanceCreationExpression() => super.test_InstanceCreationExpression();
-
- @failingTest
- @override
- test_InstanceCreationExpression_unimported() =>
- super.test_InstanceCreationExpression_unimported();
-
- @failingTest
- @override
- test_PrefixedIdentifier_class_const() =>
- super.test_PrefixedIdentifier_class_const();
-}
diff --git a/pkg/analysis_server/test/services/completion/dart/named_constructor_contributor_test.dart b/pkg/analysis_server/test/services/completion/dart/named_constructor_contributor_test.dart
index 38feb77e..499eb2b 100644
--- a/pkg/analysis_server/test/services/completion/dart/named_constructor_contributor_test.dart
+++ b/pkg/analysis_server/test/services/completion/dart/named_constructor_contributor_test.dart
@@ -13,7 +13,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(NamedConstructorContributorTest);
- defineReflectiveTests(NamedConstructorContributorTest_UseCFE);
});
}
@@ -170,34 +169,3 @@
assertNotSuggested('m');
}
}
-
-@reflectiveTest
-class NamedConstructorContributorTest_UseCFE
- extends NamedConstructorContributorTest {
- @override
- bool get useCFE => true;
-
- @failingTest
- @override
- test_ConstructorName_importedClass() =>
- super.test_ConstructorName_importedClass();
-
- @failingTest
- @override
- test_ConstructorName_importedClass_unresolved() =>
- super.test_ConstructorName_importedClass_unresolved();
-
- @failingTest
- @override
- test_ConstructorName_importedFactory() =>
- super.test_ConstructorName_importedFactory();
-
- @failingTest
- @override
- test_ConstructorName_localClass() => super.test_ConstructorName_localClass();
-
- @failingTest
- @override
- test_ConstructorName_localFactory() =>
- super.test_ConstructorName_localFactory();
-}
diff --git a/pkg/analysis_server/test/services/completion/dart/override_contributor_test.dart b/pkg/analysis_server/test/services/completion/dart/override_contributor_test.dart
index 9458709..61a9a87c 100644
--- a/pkg/analysis_server/test/services/completion/dart/override_contributor_test.dart
+++ b/pkg/analysis_server/test/services/completion/dart/override_contributor_test.dart
@@ -12,7 +12,6 @@
main() {
defineReflectiveTests(OverrideContributorTest);
- defineReflectiveTests(OverrideContributorTest_UseCFE);
}
@reflectiveTest
@@ -247,9 +246,3 @@
return cs;
}
}
-
-@reflectiveTest
-class OverrideContributorTest_UseCFE extends OverrideContributorTest {
- @override
- bool get useCFE => true;
-}
diff --git a/pkg/analysis_server/test/services/completion/dart/static_member_contributor_test.dart b/pkg/analysis_server/test/services/completion/dart/static_member_contributor_test.dart
index 20897dd..2987710 100644
--- a/pkg/analysis_server/test/services/completion/dart/static_member_contributor_test.dart
+++ b/pkg/analysis_server/test/services/completion/dart/static_member_contributor_test.dart
@@ -12,7 +12,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(StaticMemberContributorTest);
- defineReflectiveTests(StaticMemberContributorTest_UseCFE);
});
}
@@ -306,14 +305,3 @@
assertNotSuggested('==');
}
}
-
-@reflectiveTest
-class StaticMemberContributorTest_UseCFE extends StaticMemberContributorTest {
- @override
- bool get useCFE => true;
-
- @failingTest
- @override
- test_PrefixedIdentifier_class_const() =>
- super.test_PrefixedIdentifier_class_const();
-}
diff --git a/pkg/analysis_server/test/services/completion/dart/type_member_contributor_test.dart b/pkg/analysis_server/test/services/completion/dart/type_member_contributor_test.dart
index d6266ba..ea5d2cc 100644
--- a/pkg/analysis_server/test/services/completion/dart/type_member_contributor_test.dart
+++ b/pkg/analysis_server/test/services/completion/dart/type_member_contributor_test.dart
@@ -15,7 +15,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(TypeMemberContributorTest);
- defineReflectiveTests(TypeMemberContributorTest_UseCFE);
});
}
@@ -4026,100 +4025,3 @@
assertNotSuggested('e');
}
}
-
-@reflectiveTest
-class TypeMemberContributorTest_UseCFE extends TypeMemberContributorTest {
- @override
- bool get useCFE => true;
-
- @failingTest
- @override
- test_AsExpression() => super.test_AsExpression();
-
- @failingTest
- @override
- test_Block_inherited_imported() => super.test_Block_inherited_imported();
-
- @failingTest
- @override
- test_Block_inherited_local() => super.test_Block_inherited_local();
-
- @failingTest
- @override
- test_CatchClause_onType() => super.test_CatchClause_onType();
-
- @failingTest
- @override
- test_CatchClause_onType_noBrackets() =>
- super.test_CatchClause_onType_noBrackets();
-
- @failingTest
- @override
- test_CatchClause_typed() => super.test_CatchClause_typed();
-
- @failingTest
- @override
- test_ConditionalExpression_partial_thenExpression_empty() =>
- super.test_ConditionalExpression_partial_thenExpression_empty();
-
- @failingTest
- @override
- test_DefaultFormalParameter_named_expression() =>
- super.test_DefaultFormalParameter_named_expression();
-
- @failingTest
- @override
- test_ForEachStatement_body_untyped() =>
- super.test_ForEachStatement_body_untyped();
-
- @failingTest
- @override
- test_ForEachStatement_loopVariable_type() =>
- super.test_ForEachStatement_loopVariable_type();
-
- @failingTest
- @override
- test_ForStatement_initializer() => super.test_ForStatement_initializer();
-
- @failingTest
- @override
- test_ImportDirective_dart() => super.test_ImportDirective_dart();
-
- @failingTest
- @override
- test_InstanceCreationExpression_unimported() =>
- super.test_InstanceCreationExpression_unimported();
-
- @failingTest
- @override
- test_libraryPrefix_deferred() => super.test_libraryPrefix_deferred();
-
- @failingTest
- @override
- test_PrefixedIdentifier_class_const() =>
- super.test_PrefixedIdentifier_class_const();
-
- @failingTest
- @override
- test_PrefixedIdentifier_propertyAccess_newStmt() =>
- super.test_PrefixedIdentifier_propertyAccess_newStmt();
-
- @failingTest
- @override
- test_PrefixedIdentifier_trailingStmt_field() =>
- super.test_PrefixedIdentifier_trailingStmt_field();
-
- @failingTest
- @override
- test_PrefixedIdentifier_trailingStmt_param() =>
- super.test_PrefixedIdentifier_trailingStmt_param();
-
- @failingTest
- @override
- test_PrefixedIdentifier_trailingStmt_param2() =>
- super.test_PrefixedIdentifier_trailingStmt_param2();
-
- @failingTest
- @override
- test_super() => super.test_super();
-}
diff --git a/pkg/analysis_server/test/services/completion/dart/uri_contributor_test.dart b/pkg/analysis_server/test/services/completion/dart/uri_contributor_test.dart
index 0d21667..7d66b12 100644
--- a/pkg/analysis_server/test/services/completion/dart/uri_contributor_test.dart
+++ b/pkg/analysis_server/test/services/completion/dart/uri_contributor_test.dart
@@ -15,9 +15,7 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(UriContributorTest);
- defineReflectiveTests(UriContributorTest_UseCFE);
defineReflectiveTests(UriContributorWindowsTest);
- defineReflectiveTests(UriContributorWindowsTest_UseCFE);
});
}
@@ -531,152 +529,6 @@
}
@reflectiveTest
-class UriContributorTest_UseCFE extends UriContributorTest {
- @override
- bool get useCFE => true;
-
- @failingTest
- @override
- test_after_import() => super.test_after_import();
-
- @failingTest
- @override
- test_after_import_raw() => super.test_after_import_raw();
-
- @failingTest
- @override
- test_before_import() => super.test_before_import();
-
- @failingTest
- @override
- test_before_import_raw() => super.test_before_import_raw();
-
- @failingTest
- @override
- test_before_import_raw2() => super.test_before_import_raw2();
-
- @failingTest
- @override
- test_export_package2() => super.test_export_package2();
-
- @failingTest
- @override
- test_export_package2_off() => super.test_export_package2_off();
-
- @failingTest
- @override
- test_import3() => super.test_import3();
-
- @failingTest
- @override
- test_import_dart() => super.test_import_dart();
-
- @failingTest
- @override
- test_import_dart2() => super.test_import_dart2();
-
- @failingTest
- @override
- test_import_file2() => super.test_import_file2();
-
- @failingTest
- @override
- test_import_file2_off() => super.test_import_file2_off();
-
- @failingTest
- @override
- test_import_file_child() => super.test_import_file_child();
-
- @failingTest
- @override
- test_import_file_outside_lib() => super.test_import_file_outside_lib();
-
- @failingTest
- @override
- test_import_file_parent() => super.test_import_file_parent();
-
- @failingTest
- @override
- test_import_file_parent2() => super.test_import_file_parent2();
-
- @failingTest
- @override
- test_import_no_dot_folders() => super.test_import_no_dot_folders();
-
- @failingTest
- @override
- test_import_only_dart_files() => super.test_import_only_dart_files();
-
- @failingTest
- @override
- test_import_package() => super.test_import_package();
-
- @failingTest
- @override
- test_import_package2() => super.test_import_package2();
-
- @failingTest
- @override
- test_import_package2_off() => super.test_import_package2_off();
-
- @failingTest
- @override
- test_import_package2_raw() => super.test_import_package2_raw();
-
- @failingTest
- @override
- test_import_package2_with_trailing() =>
- super.test_import_package2_with_trailing();
-
- @failingTest
- @override
- test_import_package_missing_lib() => super.test_import_package_missing_lib();
-
- @failingTest
- @override
- test_import_package_raw() => super.test_import_package_raw();
-
- @failingTest
- @override
- test_import_without_closing_quote_eof2() =>
- super.test_import_without_closing_quote_eof2();
-
- @failingTest
- @override
- test_import_without_closing_quote_eof3() =>
- super.test_import_without_closing_quote_eof3();
-
- @failingTest
- @override
- test_import_without_closing_quote_eof4() =>
- super.test_import_without_closing_quote_eof4();
-
- @failingTest
- @override
- test_outside_import() => super.test_outside_import();
-
- @failingTest
- @override
- test_outside_import2() => super.test_outside_import2();
-
- @failingTest
- @override
- test_part_file() => super.test_part_file();
-
- @failingTest
- @override
- test_part_file2() => super.test_part_file2();
-
- @failingTest
- @override
- test_part_file_child() => super.test_part_file_child();
-
- @failingTest
- @override
- test_part_file_parent() => super.test_part_file_parent();
-}
-
-@reflectiveTest
class UriContributorWindowsTest extends DartCompletionContributorTest {
@override
DartCompletionContributor createContributor() {
@@ -841,41 +693,3 @@
assertSuggest('../blat.dart', csKind: CompletionSuggestionKind.IMPORT);
}
}
-
-@reflectiveTest
-class UriContributorWindowsTest_UseCFE extends UriContributorWindowsTest {
- @override
- bool get useCFE => true;
-
- @failingTest
- @override
- test_import_file2() => super.test_import_file2();
-
- @failingTest
- @override
- test_import_file_child() => super.test_import_file_child();
-
- @failingTest
- @override
- test_import_file_parent() => super.test_import_file_parent();
-
- @failingTest
- @override
- test_import_file_parent2() => super.test_import_file_parent2();
-
- @failingTest
- @override
- test_part_file() => super.test_part_file();
-
- @failingTest
- @override
- test_part_file2() => super.test_part_file2();
-
- @failingTest
- @override
- test_part_file_child() => super.test_part_file_child();
-
- @failingTest
- @override
- test_part_file_parent() => super.test_part_file_parent();
-}
diff --git a/pkg/analysis_server/test/services/completion/dart/variable_name_contributor_test.dart b/pkg/analysis_server/test/services/completion/dart/variable_name_contributor_test.dart
index f4bf6e4..f1f2c23 100644
--- a/pkg/analysis_server/test/services/completion/dart/variable_name_contributor_test.dart
+++ b/pkg/analysis_server/test/services/completion/dart/variable_name_contributor_test.dart
@@ -12,7 +12,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(VariableNameContributorTest);
- defineReflectiveTests(VariableNameContributorTest_UseCFE);
});
}
@@ -243,9 +242,3 @@
assertSuggestName('a');
}
}
-
-@reflectiveTest
-class VariableNameContributorTest_UseCFE extends VariableNameContributorTest {
- @override
- bool get useCFE => true;
-}
diff --git a/pkg/analysis_server/test/services/completion/postfix/postfix_completion_test.dart b/pkg/analysis_server/test/services/completion/postfix/postfix_completion_test.dart
index 6d35673..e72c2e8 100644
--- a/pkg/analysis_server/test/services/completion/postfix/postfix_completion_test.dart
+++ b/pkg/analysis_server/test/services/completion/postfix/postfix_completion_test.dart
@@ -2,9 +2,10 @@
// 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:analysis_server/src/protocol_server.dart';
import 'package:analysis_server/src/services/completion/postfix/postfix_completion.dart';
-import 'package:analyzer/src/dart/analysis/driver.dart';
import 'package:test/test.dart';
import 'package:test_reflective_loader/test_reflective_loader.dart';
@@ -13,29 +14,20 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(_AssertTest);
- defineReflectiveTests(_AssertTest_UseCfe);
defineReflectiveTests(_ForTest);
- defineReflectiveTests(_ForTest_UseCfe);
defineReflectiveTests(_NegateTest);
- defineReflectiveTests(_NegateTest_UseCfe);
defineReflectiveTests(_IfTest);
- defineReflectiveTests(_IfTest_UseCfe);
defineReflectiveTests(_NotNullTest);
- defineReflectiveTests(_NotNullTest_UseCfe);
defineReflectiveTests(_ParenTest);
- defineReflectiveTests(_ParenTest_UseCfe);
defineReflectiveTests(_ReturnTest);
- defineReflectiveTests(_ReturnTest_UseCfe);
defineReflectiveTests(_SwitchTest);
- defineReflectiveTests(_SwitchTest_UseCfe);
defineReflectiveTests(_TryTest);
- defineReflectiveTests(_TryTest_UseCfe);
defineReflectiveTests(_WhileTest);
- defineReflectiveTests(_WhileTest_UseCfe);
});
}
class PostfixCompletionTest extends AbstractSingleUnitTest {
+ PostfixCompletionProcessor processor;
SourceChange change;
void _assertHasChange(String message, String expectedCode, [Function cmp]) {
@@ -59,39 +51,44 @@
fail("Expected to find |$message| but got: " + change.message);
}
- _computeCompletion(int offset, String key) async {
- driver.changeFile(testFile);
- AnalysisResult result = await driver.getResult(testFile);
- PostfixCompletionContext context = new PostfixCompletionContext(
- testFile,
- result.lineInfo,
- offset,
- key,
- result.driver,
- testUnit,
- testUnitElement,
- result.errors);
- PostfixCompletionProcessor processor =
- new PostfixCompletionProcessor(context);
+ Future<void> _assertNotApplicable(String key, String code) async {
+ await _prepareProcessor(key, code);
+
+ bool isApplicable = await processor.isApplicable();
+ expect(isApplicable, isFalse);
+ }
+
+ Future<void> _prepareCompletion(String key, String code) async {
+ await _prepareProcessor(key, code);
+
bool isApplicable = await processor.isApplicable();
if (!isApplicable) {
fail("Postfix completion not applicable at given location");
}
- PostfixCompletion completion = await processor.compute();
- change = completion.change;
+
+ if (isApplicable) {
+ PostfixCompletion completion = await processor.compute();
+ change = completion.change;
+ }
}
- _prepareCompletion(String key, String sourceCode) async {
- testCode = sourceCode.replaceAll('////', '');
- int offset = findOffset(key);
- testCode = testCode.replaceFirst(key, '', offset);
- await _prepareCompletionAt(offset, key, testCode);
- }
+ Future<void> _prepareProcessor(String key, String code) async {
+ int offset = code.indexOf(key);
+ code = code.replaceFirst(key, '', offset);
- _prepareCompletionAt(int offset, String key, String sourceCode) async {
verifyNoTestUnitErrors = false;
- await resolveTestUnit(sourceCode);
- await _computeCompletion(offset, key);
+ await resolveTestUnit(code);
+
+ PostfixCompletionContext context = new PostfixCompletionContext(
+ testFile,
+ testAnalysisResult.lineInfo,
+ offset,
+ key,
+ testAnalysisResult.driver,
+ testUnit,
+ testUnitElement,
+ testAnalysisResult.errors);
+ processor = new PostfixCompletionProcessor(context);
}
}
@@ -123,9 +120,8 @@
''');
}
- @failingTest
test_assertFunc_invalid() async {
- await _prepareCompletion('.assert', '''
+ await _assertNotApplicable('.assert', '''
f() {
() => null.assert
}
@@ -147,16 +143,9 @@
}
@reflectiveTest
-class _AssertTest_UseCfe extends _AssertTest {
- @override
- bool get useCFE => true;
-}
-
-@reflectiveTest
class _ForTest extends PostfixCompletionTest {
- @failingTest
test_for_invalid() async {
- await _prepareCompletion('.for', '''
+ await _assertNotApplicable('.for', '''
f() {
{}.for
}
@@ -208,9 +197,8 @@
''');
}
- @failingTest
test_fori_invalid() async {
- await _prepareCompletion('.fori', '''
+ await _assertNotApplicable('.fori', '''
f() {
[].fori
}
@@ -283,12 +271,6 @@
}
@reflectiveTest
-class _ForTest_UseCfe extends _ForTest {
- @override
- bool get useCFE => true;
-}
-
-@reflectiveTest
class _IfTest extends PostfixCompletionTest {
test_Else() async {
await _prepareCompletion('.else', '''
@@ -320,15 +302,23 @@
''');
}
- @failingTest
test_if_invalid() async {
- await _prepareCompletion('.if', '''
+ await _assertNotApplicable('.if', '''
f(List expr) {
expr.if
}
''');
}
+ test_if_invalid_importPrefix() async {
+ await _assertNotApplicable('.if', '''
+import 'dart:async' as p;
+f() {
+ p.if
+}
+''');
+ }
+
test_ifDynamic() async {
await _prepareCompletion('.if', '''
f(expr) {
@@ -346,12 +336,6 @@
}
@reflectiveTest
-class _IfTest_UseCfe extends _IfTest {
- @override
- bool get useCFE => true;
-}
-
-@reflectiveTest
class _NegateTest extends PostfixCompletionTest {
test_negate() async {
await _prepareCompletion('.not', '''
@@ -366,9 +350,8 @@
''');
}
- @failingTest
test_negate_invalid() async {
- await _prepareCompletion('.not', '''
+ await _assertNotApplicable('.not', '''
f(int expr) {
if (expr.not)
}
@@ -455,12 +438,6 @@
}
@reflectiveTest
-class _NegateTest_UseCfe extends _NegateTest {
- @override
- bool get useCFE => true;
-}
-
-@reflectiveTest
class _NotNullTest extends PostfixCompletionTest {
test_nn() async {
await _prepareCompletion('.nn', '''
@@ -479,9 +456,8 @@
''');
}
- @failingTest
test_nn_invalid() async {
- await _prepareCompletion('.nn', '''
+ await _assertNotApplicable('.nn', '''
f(expr) {
var list = [1,2,3];
}.nn
@@ -569,12 +545,6 @@
}
@reflectiveTest
-class _NotNullTest_UseCfe extends _NotNullTest {
- @override
- bool get useCFE => true;
-}
-
-@reflectiveTest
class _ParenTest extends PostfixCompletionTest {
test_paren() async {
await _prepareCompletion('.par', '''
@@ -591,12 +561,6 @@
}
@reflectiveTest
-class _ParenTest_UseCfe extends _ParenTest {
- @override
- bool get useCFE => true;
-}
-
-@reflectiveTest
class _ReturnTest extends PostfixCompletionTest {
test_return() async {
await _prepareCompletion('.return', '''
@@ -613,12 +577,6 @@
}
@reflectiveTest
-class _ReturnTest_UseCfe extends _ReturnTest {
- @override
- bool get useCFE => true;
-}
-
-@reflectiveTest
class _SwitchTest extends PostfixCompletionTest {
test_return() async {
await _prepareCompletion('.switch', '''
@@ -637,12 +595,6 @@
}
@reflectiveTest
-class _SwitchTest_UseCfe extends _SwitchTest {
- @override
- bool get useCFE => true;
-}
-
-@reflectiveTest
class _TryTest extends PostfixCompletionTest {
test_try() async {
await _prepareCompletion('.try', '''
@@ -661,10 +613,9 @@
''');
}
- @failingTest
test_try_invalid() async {
// The semicolon is fine; this fails because of the do-statement.
- await _prepareCompletion('.try', '''
+ await _assertNotApplicable('.try', '''
f() {
do {} while (true);.try
}
@@ -749,12 +700,6 @@
}
@reflectiveTest
-class _TryTest_UseCfe extends _TryTest {
- @override
- bool get useCFE => true;
-}
-
-@reflectiveTest
class _WhileTest extends PostfixCompletionTest {
test_while() async {
await _prepareCompletion('.while', '''
@@ -771,9 +716,3 @@
''');
}
}
-
-@reflectiveTest
-class _WhileTest_UseCfe extends _WhileTest {
- @override
- bool get useCFE => true;
-}
diff --git a/pkg/analysis_server/test/services/completion/statement/statement_completion_test.dart b/pkg/analysis_server/test/services/completion/statement/statement_completion_test.dart
index bf2de54..9ef3195 100644
--- a/pkg/analysis_server/test/services/completion/statement/statement_completion_test.dart
+++ b/pkg/analysis_server/test/services/completion/statement/statement_completion_test.dart
@@ -12,28 +12,17 @@
main() {
defineReflectiveSuite(() {
- defineReflectiveTests(_DeclarationCompletionTest);
- defineReflectiveTests(_DeclarationCompletionTest_UseCfe);
defineReflectiveTests(_ControlFlowCompletionTest);
- defineReflectiveTests(_ControlFlowCompletionTest_UseCfe);
+ defineReflectiveTests(_DeclarationCompletionTest);
defineReflectiveTests(_DoCompletionTest);
- defineReflectiveTests(_DoCompletionTest_UseCfe);
defineReflectiveTests(_ExpressionCompletionTest);
- defineReflectiveTests(_ExpressionCompletionTest_UseCfe);
defineReflectiveTests(_ForCompletionTest);
- defineReflectiveTests(_ForCompletionTest_UseCfe);
defineReflectiveTests(_ForEachCompletionTest);
- defineReflectiveTests(_ForEachCompletionTest_UseCfe);
defineReflectiveTests(_IfCompletionTest);
- defineReflectiveTests(_IfCompletionTest_UseCfe);
defineReflectiveTests(_SimpleCompletionTest);
- defineReflectiveTests(_SimpleCompletionTest_UseCfe);
defineReflectiveTests(_SwitchCompletionTest);
- defineReflectiveTests(_SwitchCompletionTest_UseCfe);
defineReflectiveTests(_TryCompletionTest);
- defineReflectiveTests(_TryCompletionTest_UseCfe);
defineReflectiveTests(_WhileCompletionTest);
- defineReflectiveTests(_WhileCompletionTest_UseCfe);
});
}
@@ -297,12 +286,6 @@
}
@reflectiveTest
-class _ControlFlowCompletionTest_UseCfe extends _ControlFlowCompletionTest {
- @override
- bool get useCFE => true;
-}
-
-@reflectiveTest
class _DeclarationCompletionTest extends StatementCompletionTest {
test_classNameNoBody() async {
await _prepareCompletion(
@@ -470,12 +453,6 @@
}
@reflectiveTest
-class _DeclarationCompletionTest_UseCfe extends _DeclarationCompletionTest {
- @override
- bool get useCFE => true;
-}
-
-@reflectiveTest
class _DoCompletionTest extends StatementCompletionTest {
test_emptyCondition() async {
await _prepareCompletion(
@@ -608,16 +585,6 @@
}
@reflectiveTest
-class _DoCompletionTest_UseCfe extends _DoCompletionTest {
- @override
- bool get useCFE => true;
-
- @failingTest
- @override
- test_keywordOnly() => super.test_keywordOnly();
-}
-
-@reflectiveTest
class _ExpressionCompletionTest extends StatementCompletionTest {
test_listAssign() async {
await _prepareCompletion(
@@ -835,12 +802,6 @@
}
@reflectiveTest
-class _ExpressionCompletionTest_UseCfe extends _ExpressionCompletionTest {
- @override
- bool get useCFE => true;
-}
-
-@reflectiveTest
class _ForCompletionTest extends StatementCompletionTest {
test_emptyCondition() async {
await _prepareCompletion(
@@ -1079,20 +1040,6 @@
}
@reflectiveTest
-class _ForCompletionTest_UseCfe extends _ForCompletionTest {
- @override
- bool get useCFE => true;
-
- @failingTest
- @override
- test_emptyInitializers() => super.test_emptyInitializers();
-
- @failingTest
- @override
- test_emptyInitializersAfterBody() => super.test_emptyInitializersAfterBody();
-}
-
-@reflectiveTest
class _ForEachCompletionTest extends StatementCompletionTest {
test_emptyIdentifier() async {
await _prepareCompletion(
@@ -1186,12 +1133,6 @@
}
@reflectiveTest
-class _ForEachCompletionTest_UseCfe extends _ForEachCompletionTest {
- @override
- bool get useCFE => true;
-}
-
-@reflectiveTest
class _IfCompletionTest extends StatementCompletionTest {
test_afterCondition() async {
await _prepareCompletion(
@@ -1412,16 +1353,6 @@
}
@reflectiveTest
-class _IfCompletionTest_UseCfe extends _IfCompletionTest {
- @override
- bool get useCFE => true;
-
- @failingTest
- @override
- test_keywordOnly() => super.test_keywordOnly();
-}
-
-@reflectiveTest
class _SimpleCompletionTest extends StatementCompletionTest {
test_enter() async {
await _prepareCompletion(
@@ -1639,12 +1570,6 @@
}
@reflectiveTest
-class _SimpleCompletionTest_UseCfe extends _SimpleCompletionTest {
- @override
- bool get useCFE => true;
-}
-
-@reflectiveTest
class _SwitchCompletionTest extends StatementCompletionTest {
test_caseNoColon() async {
await _prepareCompletion(
@@ -1757,12 +1682,6 @@
}
@reflectiveTest
-class _SwitchCompletionTest_UseCfe extends _SwitchCompletionTest {
- @override
- bool get useCFE => true;
-}
-
-@reflectiveTest
class _TryCompletionTest extends StatementCompletionTest {
test_catchOnly() async {
await _prepareCompletion(
@@ -2019,12 +1938,6 @@
}
@reflectiveTest
-class _TryCompletionTest_UseCfe extends _TryCompletionTest {
- @override
- bool get useCFE => true;
-}
-
-@reflectiveTest
class _WhileCompletionTest extends StatementCompletionTest {
/*
The implementation of completion for while-statements is shared with
@@ -2054,13 +1967,3 @@
(s) => _after(s, 'while ('));
}
}
-
-@reflectiveTest
-class _WhileCompletionTest_UseCfe extends _WhileCompletionTest {
- @override
- bool get useCFE => true;
-
- @failingTest
- @override
- test_keywordOnly() => super.test_keywordOnly();
-}
diff --git a/pkg/analysis_server/test/services/correction/assist_test.dart b/pkg/analysis_server/test/services/correction/assist_test.dart
index 0b387a7..5b2765e 100644
--- a/pkg/analysis_server/test/services/correction/assist_test.dart
+++ b/pkg/analysis_server/test/services/correction/assist_test.dart
@@ -25,7 +25,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(AssistProcessorTest);
- defineReflectiveTests(AssistProcessorTest_UseCFE);
});
}
@@ -1013,6 +1012,21 @@
''');
}
+ test_convertToAsyncBody_OK_getter_expression_noSpace() async {
+ await resolveTestUnit('''
+class C {
+ int get g=>0;
+}
+''');
+ await assertHasAssistAt('get g', DartAssistKind.CONVERT_INTO_ASYNC_BODY, '''
+import 'dart:async';
+
+class C {
+ Future<int> get g async =>0;
+}
+''');
+ }
+
test_convertToAsyncBody_OK_method() async {
await resolveTestUnit('''
class C {
@@ -1029,6 +1043,21 @@
''');
}
+ test_convertToAsyncBody_OK_method_abstract() async {
+ await resolveTestUnit('''
+abstract class C {
+ int m();
+}
+''');
+ await assertHasAssistAt('m()', DartAssistKind.CONVERT_INTO_ASYNC_BODY, '''
+import 'dart:async';
+
+abstract class C {
+ Future<int> m();
+}
+''');
+ }
+
test_convertToAsyncBody_OK_method_noReturnType() async {
await resolveTestUnit('''
class C {
@@ -4212,6 +4241,44 @@
''');
}
+ test_flutterWrapContainer_BAD_onContainer() async {
+ addFlutterPackage();
+ await resolveTestUnit('''
+import 'package:flutter/widgets.dart';
+main() {
+ return /*caret*/new Container();
+}
+''');
+ _setCaretLocation();
+ await assertNoAssist(DartAssistKind.FLUTTER_WRAP_CONTAINER);
+ }
+
+ test_flutterWrapContainer_OK() async {
+ addFlutterPackage();
+ await resolveTestUnit('''
+import 'package:flutter/widgets.dart';
+main() {
+ /*caret*/new Text('a');
+}
+''');
+ _setCaretLocation();
+ if (omitNew) {
+ await assertHasAssist(DartAssistKind.FLUTTER_WRAP_CONTAINER, '''
+import 'package:flutter/widgets.dart';
+main() {
+ /*caret*/Container(child: new Text('a'));
+}
+''');
+ } else {
+ await assertHasAssist(DartAssistKind.FLUTTER_WRAP_CONTAINER, '''
+import 'package:flutter/widgets.dart';
+main() {
+ /*caret*/new Center(child: new Text('a'));
+}
+''');
+ }
+ }
+
test_flutterWrapPadding_BAD_onPadding() async {
addFlutterPackage();
await resolveTestUnit('''
@@ -6310,17 +6377,6 @@
}
}
-@reflectiveTest
-class AssistProcessorTest_UseCFE extends AssistProcessorTest {
- @override
- bool get useCFE => true;
-
- @failingTest
- @override
- test_importAddShow_BAD_unresolvedUri() =>
- super.test_importAddShow_BAD_unresolvedUri();
-}
-
class _DartAssistContextForValues implements DartAssistContext {
@override
final Source source;
diff --git a/pkg/analysis_server/test/services/correction/fix_test.dart b/pkg/analysis_server/test/services/correction/fix_test.dart
index 2fc6261..63b5a1c 100644
--- a/pkg/analysis_server/test/services/correction/fix_test.dart
+++ b/pkg/analysis_server/test/services/correction/fix_test.dart
@@ -30,9 +30,7 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(FixProcessorTest);
- defineReflectiveTests(FixProcessorTest_UseCFE);
defineReflectiveTests(LintFixTest);
- defineReflectiveTests(LintFixTest_UseCFE);
});
}
@@ -306,6 +304,7 @@
await assertNoFix(DartFixKind.ADD_ASYNC);
}
+ @FailingTest(issue: 'https://github.com/dart-lang/sdk/issues/33992')
test_addAsync_blockFunctionBody() async {
await resolveTestUnit('''
foo() {}
@@ -366,6 +365,7 @@
''');
}
+ @FailingTest(issue: 'https://github.com/dart-lang/sdk/issues/33992')
test_addAsync_expressionFunctionBody() async {
errorFilter = (AnalysisError error) {
return error.errorCode == StaticWarningCode.UNDEFINED_IDENTIFIER_AWAIT;
@@ -380,6 +380,7 @@
''');
}
+ @FailingTest(issue: 'https://github.com/dart-lang/sdk/issues/33992')
test_addAsync_returnFuture() async {
errorFilter = (AnalysisError error) {
return error.errorCode == StaticWarningCode.UNDEFINED_IDENTIFIER_AWAIT;
@@ -402,6 +403,7 @@
''');
}
+ @FailingTest(issue: 'https://github.com/dart-lang/sdk/issues/33992')
test_addAsync_returnFuture_alreadyFuture() async {
errorFilter = (AnalysisError error) {
return error.errorCode == StaticWarningCode.UNDEFINED_IDENTIFIER_AWAIT;
@@ -424,6 +426,7 @@
''');
}
+ @FailingTest(issue: 'https://github.com/dart-lang/sdk/issues/33992')
test_addAsync_returnFuture_dynamic() async {
errorFilter = (AnalysisError error) {
return error.errorCode == StaticWarningCode.UNDEFINED_IDENTIFIER_AWAIT;
@@ -444,6 +447,7 @@
''');
}
+ @FailingTest(issue: 'https://github.com/dart-lang/sdk/issues/33992')
test_addAsync_returnFuture_noType() async {
errorFilter = (AnalysisError error) {
return error.errorCode == StaticWarningCode.UNDEFINED_IDENTIFIER_AWAIT;
@@ -5632,6 +5636,7 @@
''');
}
+ @FailingTest(issue: 'https://github.com/dart-lang/sdk/issues/33992')
test_replaceVarWithDynamic() async {
errorFilter = (AnalysisError error) {
return error.errorCode == ParserErrorCode.VAR_AS_TYPE_NAME;
@@ -7073,593 +7078,6 @@
}
@reflectiveTest
-class FixProcessorTest_UseCFE extends FixProcessorTest {
- @override
- bool get useCFE => true;
-
- @failingTest
- @override
- test_addAsync_blockFunctionBody() => super.test_addAsync_blockFunctionBody();
-
- @failingTest
- @override
- test_addAsync_closure() => super.test_addAsync_closure();
-
- @failingTest
- @override
- test_addAsync_expressionFunctionBody() =>
- super.test_addAsync_expressionFunctionBody();
-
- @failingTest
- @override
- test_addAsync_returnFuture() => super.test_addAsync_returnFuture();
-
- @failingTest
- @override
- test_addAsync_returnFuture_alreadyFuture() =>
- super.test_addAsync_returnFuture_alreadyFuture();
-
- @failingTest
- @override
- test_addAsync_returnFuture_dynamic() =>
- super.test_addAsync_returnFuture_dynamic();
-
- @failingTest
- @override
- test_addAsync_returnFuture_noType() =>
- super.test_addAsync_returnFuture_noType();
-
- @failingTest
- @override
- test_addExplicitCast_assignment_list() =>
- super.test_addExplicitCast_assignment_list();
-
- @failingTest
- @override
- test_addExplicitCast_assignment_list_all() =>
- super.test_addExplicitCast_assignment_list_all();
-
- @failingTest
- @override
- test_addExplicitCast_assignment_needsParens() =>
- super.test_addExplicitCast_assignment_needsParens();
-
- @failingTest
- @override
- test_addExplicitCast_assignment_needsParens_all() =>
- super.test_addExplicitCast_assignment_needsParens_all();
-
- @failingTest
- @override
- test_addExplicitCast_declaration_list() =>
- super.test_addExplicitCast_declaration_list();
-
- @failingTest
- @override
- test_addExplicitCast_declaration_list_all() =>
- super.test_addExplicitCast_declaration_list_all();
-
- @failingTest
- @override
- test_addExplicitCast_declaration_needsParens() =>
- super.test_addExplicitCast_declaration_needsParens();
-
- @failingTest
- @override
- test_addExplicitCast_declaration_needsParens_all() =>
- super.test_addExplicitCast_declaration_needsParens_all();
-
- @failingTest
- @override
- test_addFieldFormalParameters_flutter() =>
- super.test_addFieldFormalParameters_flutter();
-
- @failingTest
- @override
- test_addFieldFormalParameters_hasRequiredParameter() =>
- super.test_addFieldFormalParameters_hasRequiredParameter();
-
- @failingTest
- @override
- test_addFieldFormalParameters_noParameters() =>
- super.test_addFieldFormalParameters_noParameters();
-
- @failingTest
- @override
- test_addFieldFormalParameters_noRequiredParameter() =>
- super.test_addFieldFormalParameters_noRequiredParameter();
-
- @failingTest
- @override
- test_addFieldFormalParameters_notAllFinal() =>
- super.test_addFieldFormalParameters_notAllFinal();
-
- @failingTest
- @override
- test_addMissingRequiredArg_multiple() =>
- super.test_addMissingRequiredArg_multiple();
-
- @failingTest
- @override
- test_addMissingRequiredArg_multiple_2() =>
- super.test_addMissingRequiredArg_multiple_2();
-
- @failingTest
- @override
- test_addMissingRequiredArg_single() =>
- super.test_addMissingRequiredArg_single();
-
- @failingTest
- @override
- test_addMissingRequiredArg_single_normal() =>
- super.test_addMissingRequiredArg_single_normal();
-
- @failingTest
- @override
- test_addMissingRequiredArg_single_with_details() =>
- super.test_addMissingRequiredArg_single_with_details();
-
- @failingTest
- @override
- test_addStatic_multipleFields() => super.test_addStatic_multipleFields();
-
- @failingTest
- @override
- test_addStatic_oneField() => super.test_addStatic_oneField();
-
- @failingTest
- @override
- test_boolean() => super.test_boolean();
-
- @failingTest
- @override
- test_boolean_all() => super.test_boolean_all();
-
- @failingTest
- @override
- test_changeToStaticAccess_method() =>
- super.test_changeToStaticAccess_method();
-
- @failingTest
- @override
- test_changeToStaticAccess_method_importType() =>
- super.test_changeToStaticAccess_method_importType();
-
- @failingTest
- @override
- test_changeToStaticAccess_method_prefixLibrary() =>
- super.test_changeToStaticAccess_method_prefixLibrary();
-
- @failingTest
- @override
- test_changeToStaticAccess_property() =>
- super.test_changeToStaticAccess_property();
-
- @failingTest
- @override
- test_changeToStaticAccess_property_importType() =>
- super.test_changeToStaticAccess_property_importType();
-
- @failingTest
- @override
- test_changeTypeAnnotation_OK_simple() =>
- super.test_changeTypeAnnotation_OK_simple();
-
- @failingTest
- @override
- test_createClass_instanceCreation_withoutNew_fromMethod() =>
- super.test_createClass_instanceCreation_withoutNew_fromMethod();
-
- @failingTest
- @override
- test_createClass_itemOfList_inAnnotation() =>
- super.test_createClass_itemOfList_inAnnotation();
-
- @failingTest
- @override
- test_createConstructor_named() => super.test_createConstructor_named();
-
- @failingTest
- @override
- test_createConstructor_named_emptyClassBody() =>
- super.test_createConstructor_named_emptyClassBody();
-
- @failingTest
- @override
- test_createConstructorSuperImplicit() =>
- super.test_createConstructorSuperImplicit();
-
- @failingTest
- @override
- test_createConstructorSuperImplicit_fieldInitializer() =>
- super.test_createConstructorSuperImplicit_fieldInitializer();
-
- @failingTest
- @override
- test_createConstructorSuperImplicit_importType() =>
- super.test_createConstructorSuperImplicit_importType();
-
- @failingTest
- @override
- test_createConstructorSuperImplicit_named() =>
- super.test_createConstructorSuperImplicit_named();
-
- @failingTest
- @override
- test_createConstructorSuperImplicit_typeArgument() =>
- super.test_createConstructorSuperImplicit_typeArgument();
-
- @failingTest
- @override
- test_createField_getter_unqualified_instance_asInvocationArgument() =>
- super.test_createField_getter_unqualified_instance_asInvocationArgument();
-
- @failingTest
- @override
- test_createField_getter_unqualified_instance_assignmentRhs() =>
- super.test_createField_getter_unqualified_instance_assignmentRhs();
-
- @failingTest
- @override
- test_createField_getter_unqualified_instance_asStatement() =>
- super.test_createField_getter_unqualified_instance_asStatement();
-
- @failingTest
- @override
- test_createField_invalidInitializer_withoutType() =>
- super.test_createField_invalidInitializer_withoutType();
-
- @failingTest
- @override
- test_createField_invalidInitializer_withType() =>
- super.test_createField_invalidInitializer_withType();
-
- @failingTest
- @override
- test_createField_setter_generic_OK_local() =>
- super.test_createField_setter_generic_OK_local();
-
- @failingTest
- @override
- test_createField_setter_unqualified_instance() =>
- super.test_createField_setter_unqualified_instance();
-
- @failingTest
- @override
- test_createFile_forImport() => super.test_createFile_forImport();
-
- @failingTest
- @override
- test_createFile_forImport_BAD_inPackage_lib_justLib() =>
- super.test_createFile_forImport_BAD_inPackage_lib_justLib();
-
- @failingTest
- @override
- test_createFile_forImport_BAD_notDart() =>
- super.test_createFile_forImport_BAD_notDart();
-
- @failingTest
- @override
- test_createFile_forImport_inPackage_lib() =>
- super.test_createFile_forImport_inPackage_lib();
-
- @failingTest
- @override
- test_createFile_forImport_inPackage_test() =>
- super.test_createFile_forImport_inPackage_test();
-
- @failingTest
- @override
- test_createFile_forPart() => super.test_createFile_forPart();
-
- @failingTest
- @override
- test_createFile_forPart_inPackageLib() =>
- super.test_createFile_forPart_inPackageLib();
-
- @failingTest
- @override
- test_createGetter_unqualified_instance_asInvocationArgument() =>
- super.test_createGetter_unqualified_instance_asInvocationArgument();
-
- @failingTest
- @override
- test_createGetter_unqualified_instance_assignmentLhs() =>
- super.test_createGetter_unqualified_instance_assignmentLhs();
-
- @failingTest
- @override
- test_createGetter_unqualified_instance_assignmentRhs() =>
- super.test_createGetter_unqualified_instance_assignmentRhs();
-
- @failingTest
- @override
- test_createGetter_unqualified_instance_asStatement() =>
- super.test_createGetter_unqualified_instance_asStatement();
-
- @failingTest
- @override
- test_createLocalVariable_write_assignment() =>
- super.test_createLocalVariable_write_assignment();
-
- @failingTest
- @override
- test_createLocalVariable_write_assignment_compound() =>
- super.test_createLocalVariable_write_assignment_compound();
-
- @failingTest
- @override
- test_createMissingOverrides_functionTypedParameter() =>
- super.test_createMissingOverrides_functionTypedParameter();
-
- @failingTest
- @override
- test_createMissingOverrides_method() =>
- super.test_createMissingOverrides_method();
-
- @failingTest
- @override
- test_creationFunction_forFunctionType_cascadeSecond() =>
- super.test_creationFunction_forFunctionType_cascadeSecond();
-
- @failingTest
- @override
- test_creationFunction_forFunctionType_dynamicArgument() =>
- super.test_creationFunction_forFunctionType_dynamicArgument();
-
- @failingTest
- @override
- test_creationFunction_forFunctionType_function() =>
- super.test_creationFunction_forFunctionType_function();
-
- @failingTest
- @override
- test_creationFunction_forFunctionType_function_namedArgument() =>
- super.test_creationFunction_forFunctionType_function_namedArgument();
-
- @failingTest
- @override
- test_creationFunction_forFunctionType_importType() =>
- super.test_creationFunction_forFunctionType_importType();
-
- @failingTest
- @override
- test_creationFunction_forFunctionType_method_enclosingClass_static() => super
- .test_creationFunction_forFunctionType_method_enclosingClass_static();
-
- @failingTest
- @override
- test_creationFunction_forFunctionType_method_enclosingClass_static2() => super
- .test_creationFunction_forFunctionType_method_enclosingClass_static2();
-
- @failingTest
- @override
- test_creationFunction_forFunctionType_method_targetClass() =>
- super.test_creationFunction_forFunctionType_method_targetClass();
-
- @failingTest
- @override
- test_creationFunction_forFunctionType_method_targetClass_hasOtherMember() => super
- .test_creationFunction_forFunctionType_method_targetClass_hasOtherMember();
-
- @failingTest
- @override
- test_illegalAsyncReturnType_adjacentNodes() =>
- super.test_illegalAsyncReturnType_adjacentNodes();
-
- @failingTest
- @override
- test_illegalAsyncReturnType_asyncLibrary_import() =>
- super.test_illegalAsyncReturnType_asyncLibrary_import();
-
- @failingTest
- @override
- test_illegalAsyncReturnType_asyncLibrary_usePrefix() =>
- super.test_illegalAsyncReturnType_asyncLibrary_usePrefix();
-
- @failingTest
- @override
- test_illegalAsyncReturnType_complexTypeName() =>
- super.test_illegalAsyncReturnType_complexTypeName();
-
- @failingTest
- @override
- test_importLibraryProject_BAD_inLibSrc_differentContextRoot() =>
- super.test_importLibraryProject_BAD_inLibSrc_differentContextRoot();
-
- @failingTest
- @override
- test_importLibraryProject_OK_inLibSrc_thisContextRoot() =>
- super.test_importLibraryProject_OK_inLibSrc_thisContextRoot();
-
- @failingTest
- @override
- test_importLibraryProject_withClass_annotation() =>
- super.test_importLibraryProject_withClass_annotation();
-
- @failingTest
- @override
- test_importLibraryProject_withFunction_unresolvedMethod() =>
- super.test_importLibraryProject_withFunction_unresolvedMethod();
-
- @failingTest
- @override
- test_importLibrarySdk_withClass_instanceCreation_explicitNew() =>
- super.test_importLibrarySdk_withClass_instanceCreation_explicitNew();
-
- @failingTest
- @override
- test_importLibrarySdk_withClass_instanceCreation_explicitNew_namedConstructor() =>
- super
- .test_importLibrarySdk_withClass_instanceCreation_explicitNew_namedConstructor();
-
- @failingTest
- @override
- test_importLibrarySdk_withClass_instanceCreation_implicitNew() =>
- super.test_importLibrarySdk_withClass_instanceCreation_implicitNew();
-
- @failingTest
- @override
- test_importLibrarySdk_withClass_instanceCreation_implicitNew_namedConstructor() =>
- super
- .test_importLibrarySdk_withClass_instanceCreation_implicitNew_namedConstructor();
-
- @failingTest
- @override
- test_importLibrarySdk_withClass_itemOfList_inAnnotation() =>
- super.test_importLibrarySdk_withClass_itemOfList_inAnnotation();
-
- @failingTest
- @override
- test_importLibrarySdk_withTopLevelVariable_annotation() =>
- super.test_importLibrarySdk_withTopLevelVariable_annotation();
-
- @failingTest
- @override
- test_importLibraryShow_project() => super.test_importLibraryShow_project();
-
- @failingTest
- @override
- test_importLibraryShow_sdk() => super.test_importLibraryShow_sdk();
-
- @failingTest
- @override
- test_makeFieldNotFinal_hasType() => super.test_makeFieldNotFinal_hasType();
-
- @failingTest
- @override
- test_makeFieldNotFinal_noType() => super.test_makeFieldNotFinal_noType();
-
- @failingTest
- @override
- test_noException_1() => super.test_noException_1();
-
- @failingTest
- @override
- test_nonBoolCondition_addNotNull() =>
- super.test_nonBoolCondition_addNotNull();
-
- @failingTest
- @override
- test_nonBoolCondition_addNotNull_all() =>
- super.test_nonBoolCondition_addNotNull_all();
-
- @failingTest
- @override
- test_removeParentheses_inGetterInvocation() =>
- super.test_removeParentheses_inGetterInvocation();
-
- @failingTest
- @override
- test_replaceVarWithDynamic() => super.test_replaceVarWithDynamic();
-
- @failingTest
- @override
- test_replaceWithConstInstanceCreation_explicitNew() =>
- super.test_replaceWithConstInstanceCreation_explicitNew();
-
- @failingTest
- @override
- test_undefinedClass_useSimilar_BAD_prefixed() =>
- super.test_undefinedClass_useSimilar_BAD_prefixed();
-
- @failingTest
- @override
- test_undefinedClass_useSimilar_fromImport() =>
- super.test_undefinedClass_useSimilar_fromImport();
-
- @failingTest
- @override
- test_undefinedFunction_create_fromMethod() =>
- super.test_undefinedFunction_create_fromMethod();
-
- @failingTest
- @override
- test_undefinedFunction_create_generic_BAD() =>
- super.test_undefinedFunction_create_generic_BAD();
-
- @failingTest
- @override
- test_undefinedFunction_create_generic_OK() =>
- super.test_undefinedFunction_create_generic_OK();
-
- @failingTest
- @override
- test_undefinedFunction_useSimilar_fromImport() =>
- super.test_undefinedFunction_useSimilar_fromImport();
-
- @failingTest
- @override
- test_undefinedFunction_useSimilar_prefixed_fromImport() =>
- super.test_undefinedFunction_useSimilar_prefixed_fromImport();
-
- @failingTest
- @override
- test_undefinedFunction_useSimilar_thisLibrary() =>
- super.test_undefinedFunction_useSimilar_thisLibrary();
-
- @failingTest
- @override
- test_undefinedGetter_useSimilar_unqualified() =>
- super.test_undefinedGetter_useSimilar_unqualified();
-
- @failingTest
- @override
- test_undefinedMethod_create_BAD_targetIsEnum() =>
- super.test_undefinedMethod_create_BAD_targetIsEnum();
-
- @failingTest
- @override
- test_undefinedMethod_create_generic_OK_local() =>
- super.test_undefinedMethod_create_generic_OK_local();
-
- @failingTest
- @override
- test_undefinedMethod_createUnqualified_duplicateArgumentNames() =>
- super.test_undefinedMethod_createUnqualified_duplicateArgumentNames();
-
- @failingTest
- @override
- test_undefinedMethod_createUnqualified_parameters() =>
- super.test_undefinedMethod_createUnqualified_parameters();
-
- @failingTest
- @override
- test_undefinedMethod_createUnqualified_parameters_named() =>
- super.test_undefinedMethod_createUnqualified_parameters_named();
-
- @failingTest
- @override
- test_undefinedMethod_createUnqualified_returnType() =>
- super.test_undefinedMethod_createUnqualified_returnType();
-
- @failingTest
- @override
- test_undefinedMethod_parameterType_differentPrefixInTargetUnit() =>
- super.test_undefinedMethod_parameterType_differentPrefixInTargetUnit();
-
- @failingTest
- @override
- test_undefinedMethod_parameterType_inTargetUnit() =>
- super.test_undefinedMethod_parameterType_inTargetUnit();
-
- @failingTest
- @override
- test_undefinedMethod_useSimilar_unqualified_superClass() =>
- super.test_undefinedMethod_useSimilar_unqualified_superClass();
-
- @failingTest
- @override
- test_undefinedMethod_useSimilar_unqualified_thisClass() =>
- super.test_undefinedMethod_useSimilar_unqualified_thisClass();
-
- @failingTest
- @override
- test_undefinedSetter_useSimilar_unqualified() =>
- super.test_undefinedSetter_useSimilar_unqualified();
-}
-
-@reflectiveTest
class LintFixTest extends BaseFixProcessorTest {
AnalysisError error;
@@ -9007,17 +8425,6 @@
}
}
-@reflectiveTest
-class LintFixTest_UseCFE extends LintFixTest {
- @override
- bool get useCFE => true;
-
- @failingTest
- @override
- test_lint_addMissingOverride_method_with_doc_comment_and_metadata() =>
- super.test_lint_addMissingOverride_method_with_doc_comment_and_metadata();
-}
-
class _DartFixContextImpl implements DartFixContext {
@override
final ResourceProvider resourceProvider;
diff --git a/pkg/analysis_server/test/services/correction/name_suggestion_test.dart b/pkg/analysis_server/test/services/correction/name_suggestion_test.dart
index beb4fe9..d0ac381 100644
--- a/pkg/analysis_server/test/services/correction/name_suggestion_test.dart
+++ b/pkg/analysis_server/test/services/correction/name_suggestion_test.dart
@@ -13,7 +13,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(VariableNameSuggestionTest);
- defineReflectiveTests(VariableNameSuggestionTest_UseCFE);
});
}
@@ -368,14 +367,3 @@
}
}
}
-
-@reflectiveTest
-class VariableNameSuggestionTest_UseCFE extends VariableNameSuggestionTest {
- @override
- bool get useCFE => true;
-
- @failingTest
- @override
- test_forExpression_instanceCreation() =>
- super.test_forExpression_instanceCreation();
-}
diff --git a/pkg/analysis_server/test/services/correction/organize_directives_test.dart b/pkg/analysis_server/test/services/correction/organize_directives_test.dart
index 8c20bad..d2b6796 100644
--- a/pkg/analysis_server/test/services/correction/organize_directives_test.dart
+++ b/pkg/analysis_server/test/services/correction/organize_directives_test.dart
@@ -17,7 +17,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(OrganizeDirectivesTest);
- defineReflectiveTests(OrganizeDirectivesTest_UseCFE);
});
}
@@ -341,32 +340,3 @@
testErrors = result.errors;
}
}
-
-@reflectiveTest
-class OrganizeDirectivesTest_UseCFE extends OrganizeDirectivesTest {
- @override
- bool get useCFE => true;
-
- @failingTest
- @override
- test_remove_unresolvedDirectives() =>
- super.test_remove_unresolvedDirectives();
-
- @failingTest
- @override
- test_remove_unusedImports_hasUnresolvedError() =>
- super.test_remove_unusedImports_hasUnresolvedError();
-
- @failingTest
- @override
- test_sort() => super.test_sort();
-
- @failingTest
- @override
- test_sort_hasComments() => super.test_sort_hasComments();
-
- @failingTest
- @override
- test_sort_imports_packageAndPath() =>
- super.test_sort_imports_packageAndPath();
-}
diff --git a/pkg/analysis_server/test/services/correction/sort_members_test.dart b/pkg/analysis_server/test/services/correction/sort_members_test.dart
index 88942ee..d89bb36 100644
--- a/pkg/analysis_server/test/services/correction/sort_members_test.dart
+++ b/pkg/analysis_server/test/services/correction/sort_members_test.dart
@@ -15,7 +15,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(SortMembersTest);
- defineReflectiveTests(SortMembersTest_UseCFE);
});
}
@@ -809,9 +808,3 @@
testUnit = result.unit;
}
}
-
-@reflectiveTest
-class SortMembersTest_UseCFE extends SortMembersTest {
- @override
- bool get useCFE => true;
-}
diff --git a/pkg/analysis_server/test/services/correction/status_test.dart b/pkg/analysis_server/test/services/correction/status_test.dart
index b884f3d..cce27cd 100644
--- a/pkg/analysis_server/test/services/correction/status_test.dart
+++ b/pkg/analysis_server/test/services/correction/status_test.dart
@@ -18,7 +18,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(RefactoringLocationTest);
- defineReflectiveTests(RefactoringLocationTest_UseCFE);
defineReflectiveTests(RefactoringStatusTest);
});
}
@@ -83,12 +82,6 @@
}
@reflectiveTest
-class RefactoringLocationTest_UseCFE extends RefactoringLocationTest {
- @override
- bool get useCFE => true;
-}
-
-@reflectiveTest
class RefactoringStatusTest {
void test_addError() {
RefactoringStatus refactoringStatus = new RefactoringStatus();
diff --git a/pkg/analysis_server/test/services/correction/util_test.dart b/pkg/analysis_server/test/services/correction/util_test.dart
index cba58c5..3e1981c 100644
--- a/pkg/analysis_server/test/services/correction/util_test.dart
+++ b/pkg/analysis_server/test/services/correction/util_test.dart
@@ -16,7 +16,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(UtilTest);
- defineReflectiveTests(UtilTest_UseCFE);
});
}
@@ -306,12 +305,6 @@
}
}
-@reflectiveTest
-class UtilTest_UseCFE extends UtilTest {
- @override
- bool get useCFE => true;
-}
-
class _SourceMock implements Source {
@override
final String fullName;
diff --git a/pkg/analysis_server/test/services/refactoring/convert_getter_to_method_test.dart b/pkg/analysis_server/test/services/refactoring/convert_getter_to_method_test.dart
index b823bc0..6702055 100644
--- a/pkg/analysis_server/test/services/refactoring/convert_getter_to_method_test.dart
+++ b/pkg/analysis_server/test/services/refactoring/convert_getter_to_method_test.dart
@@ -15,7 +15,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(ConvertGetterToMethodTest);
- defineReflectiveTests(ConvertGetterToMethodTest_UseCFE);
});
}
@@ -162,9 +161,3 @@
_createRefactoringForElement(element);
}
}
-
-@reflectiveTest
-class ConvertGetterToMethodTest_UseCFE extends ConvertGetterToMethodTest {
- @override
- bool get useCFE => true;
-}
diff --git a/pkg/analysis_server/test/services/refactoring/convert_method_to_getter_test.dart b/pkg/analysis_server/test/services/refactoring/convert_method_to_getter_test.dart
index ad14c41..60f38f8 100644
--- a/pkg/analysis_server/test/services/refactoring/convert_method_to_getter_test.dart
+++ b/pkg/analysis_server/test/services/refactoring/convert_method_to_getter_test.dart
@@ -17,7 +17,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(ConvertMethodToGetterTest);
- defineReflectiveTests(ConvertMethodToGetterTest_UseCFE);
});
}
@@ -214,9 +213,3 @@
_createRefactoringForElement(element);
}
}
-
-@reflectiveTest
-class ConvertMethodToGetterTest_UseCFE extends ConvertMethodToGetterTest {
- @override
- bool get useCFE => true;
-}
diff --git a/pkg/analysis_server/test/services/refactoring/extract_local_test.dart b/pkg/analysis_server/test/services/refactoring/extract_local_test.dart
index 95714c8..df1e893c 100644
--- a/pkg/analysis_server/test/services/refactoring/extract_local_test.dart
+++ b/pkg/analysis_server/test/services/refactoring/extract_local_test.dart
@@ -17,7 +17,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(ExtractLocalTest);
- defineReflectiveTests(ExtractLocalTest_UseCFE);
});
}
@@ -933,6 +932,7 @@
''');
}
+ @FailingTest(issue: 'https://github.com/dart-lang/sdk/issues/33992')
test_singleExpression_hasParseError_expectedSemicolon() async {
verifyNoTestUnitErrors = false;
await indexTestUnit('''
@@ -1344,14 +1344,3 @@
return subExpressions;
}
}
-
-@reflectiveTest
-class ExtractLocalTest_UseCFE extends ExtractLocalTest {
- @override
- bool get useCFE => true;
-
- @failingTest
- @override
- test_singleExpression_hasParseError_expectedSemicolon() =>
- super.test_singleExpression_hasParseError_expectedSemicolon();
-}
diff --git a/pkg/analysis_server/test/services/refactoring/extract_method_test.dart b/pkg/analysis_server/test/services/refactoring/extract_method_test.dart
index f37dc32..59f1a21 100644
--- a/pkg/analysis_server/test/services/refactoring/extract_method_test.dart
+++ b/pkg/analysis_server/test/services/refactoring/extract_method_test.dart
@@ -16,7 +16,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(ExtractMethodTest);
- defineReflectiveTests(ExtractMethodTest_UseCFE);
});
}
@@ -2934,14 +2933,3 @@
}).toList();
}
}
-
-@reflectiveTest
-class ExtractMethodTest_UseCFE extends ExtractMethodTest {
- @override
- bool get useCFE => true;
-
- @failingTest
- @override
- test_statements_parameters_localFunction() =>
- super.test_statements_parameters_localFunction();
-}
diff --git a/pkg/analysis_server/test/services/refactoring/extract_widget_test.dart b/pkg/analysis_server/test/services/refactoring/extract_widget_test.dart
index 071fc76..55a9cff 100644
--- a/pkg/analysis_server/test/services/refactoring/extract_widget_test.dart
+++ b/pkg/analysis_server/test/services/refactoring/extract_widget_test.dart
@@ -16,7 +16,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(ExtractWidgetTest);
- defineReflectiveTests(ExtractWidgetTest_UseCFE);
});
}
@@ -1255,59 +1254,3 @@
_createRefactoring(offset, 0);
}
}
-
-@reflectiveTest
-class ExtractWidgetTest_UseCFE extends ExtractWidgetTest {
- @override
- bool get useCFE => true;
-
- @failingTest
- @override
- test_invocation_otherClass() => super.test_invocation_otherClass();
-
- @failingTest
- @override
- test_method_parameters() => super.test_method_parameters();
-
- @failingTest
- @override
- test_method_parameters_named() => super.test_method_parameters_named();
-
- @failingTest
- @override
- test_parameters_field_read_enclosingClass() =>
- super.test_parameters_field_read_enclosingClass();
-
- @failingTest
- @override
- test_parameters_field_read_otherClass() =>
- super.test_parameters_field_read_otherClass();
-
- @failingTest
- @override
- test_parameters_field_write_otherClass() =>
- super.test_parameters_field_write_otherClass();
-
- @failingTest
- @override
- test_parameters_local_read_enclosingScope() =>
- super.test_parameters_local_read_enclosingScope();
-
- @failingTest
- @override
- test_parameters_private() => super.test_parameters_private();
-
- @failingTest
- @override
- test_parameters_private_conflictWithPublic() =>
- super.test_parameters_private_conflictWithPublic();
-
- @failingTest
- @override
- test_parameters_readField_readLocal() =>
- super.test_parameters_readField_readLocal();
-
- @failingTest
- @override
- test_statements() => super.test_statements();
-}
diff --git a/pkg/analysis_server/test/services/refactoring/inline_local_test.dart b/pkg/analysis_server/test/services/refactoring/inline_local_test.dart
index 01d9e19..3c224ee 100644
--- a/pkg/analysis_server/test/services/refactoring/inline_local_test.dart
+++ b/pkg/analysis_server/test/services/refactoring/inline_local_test.dart
@@ -14,7 +14,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(InlineLocalTest);
- defineReflectiveTests(InlineLocalTest_UseCFE);
});
}
@@ -638,9 +637,3 @@
new InlineLocalRefactoring(searchEngine, astProvider, testUnit, offset);
}
}
-
-@reflectiveTest
-class InlineLocalTest_UseCFE extends InlineLocalTest {
- @override
- bool get useCFE => true;
-}
diff --git a/pkg/analysis_server/test/services/refactoring/inline_method_test.dart b/pkg/analysis_server/test/services/refactoring/inline_method_test.dart
index e75781d..64c50e0 100644
--- a/pkg/analysis_server/test/services/refactoring/inline_method_test.dart
+++ b/pkg/analysis_server/test/services/refactoring/inline_method_test.dart
@@ -17,7 +17,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(InlineMethodTest);
- defineReflectiveTests(InlineMethodTest_UseCFE);
});
}
@@ -1760,19 +1759,3 @@
searchEngine, astProvider, testUnit, offset);
}
}
-
-@reflectiveTest
-class InlineMethodTest_UseCFE extends InlineMethodTest {
- @override
- bool get useCFE => true;
-
- @failingTest
- @override
- test_noArgument_named_hasDefault() =>
- super.test_noArgument_named_hasDefault();
-
- @failingTest
- @override
- test_noArgument_positional_hasDefault() =>
- super.test_noArgument_positional_hasDefault();
-}
diff --git a/pkg/analysis_server/test/services/refactoring/move_file_test.dart b/pkg/analysis_server/test/services/refactoring/move_file_test.dart
index 2b34847..0faf26a 100644
--- a/pkg/analysis_server/test/services/refactoring/move_file_test.dart
+++ b/pkg/analysis_server/test/services/refactoring/move_file_test.dart
@@ -8,13 +8,11 @@
import 'package:test/test.dart';
import 'package:test_reflective_loader/test_reflective_loader.dart';
-import '../../test_utilities/utillities.dart';
import 'abstract_refactoring.dart';
main() {
defineReflectiveSuite(() {
defineReflectiveTests(MoveFileTest);
- defineReflectiveTests(MoveFileTest_UseCFE);
});
}
@@ -251,14 +249,3 @@
fail(message);
}
}
-
-@reflectiveTest
-class MoveFileTest_UseCFE extends MoveFileTest {
- @override
- bool get useCFE => true;
-
- @failingTest
- @override
- test_file_containing_imports_exports_parts() =>
- callFailingTest(super.test_file_containing_imports_exports_parts());
-}
diff --git a/pkg/analysis_server/test/services/refactoring/naming_conventions_test.dart b/pkg/analysis_server/test/services/refactoring/naming_conventions_test.dart
index ab5843c..6973932 100644
--- a/pkg/analysis_server/test/services/refactoring/naming_conventions_test.dart
+++ b/pkg/analysis_server/test/services/refactoring/naming_conventions_test.dart
@@ -14,7 +14,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(NamingConventionsTest);
- defineReflectiveTests(NamingConventionsTest_UseCFE);
});
}
@@ -760,9 +759,3 @@
expectedMessage: 'Avoid using built-in identifiers as names.');
}
}
-
-@reflectiveTest
-class NamingConventionsTest_UseCFE extends NamingConventionsTest {
- @override
- bool get useCFE => true;
-}
diff --git a/pkg/analysis_server/test/services/refactoring/rename_class_member_test.dart b/pkg/analysis_server/test/services/refactoring/rename_class_member_test.dart
index 5b3e255..00006c5 100644
--- a/pkg/analysis_server/test/services/refactoring/rename_class_member_test.dart
+++ b/pkg/analysis_server/test/services/refactoring/rename_class_member_test.dart
@@ -13,7 +13,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(RenameClassMemberTest);
- defineReflectiveTests(RenameClassMemberTest_UseCFE);
});
}
@@ -918,14 +917,3 @@
''');
}
}
-
-@reflectiveTest
-class RenameClassMemberTest_UseCFE extends RenameClassMemberTest {
- @override
- bool get useCFE => true;
-
- @failingTest
- @override
- test_checkFinalConditions_shadowed_byParameter_inSameClass() =>
- super.test_checkFinalConditions_shadowed_byParameter_inSameClass();
-}
diff --git a/pkg/analysis_server/test/services/refactoring/rename_constructor_test.dart b/pkg/analysis_server/test/services/refactoring/rename_constructor_test.dart
index 752dd14..2f0f4a3 100644
--- a/pkg/analysis_server/test/services/refactoring/rename_constructor_test.dart
+++ b/pkg/analysis_server/test/services/refactoring/rename_constructor_test.dart
@@ -15,7 +15,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(RenameConstructorTest);
- defineReflectiveTests(RenameConstructorTest_UseCFE);
});
}
@@ -248,21 +247,3 @@
createRenameRefactoringForElement(element);
}
}
-
-@reflectiveTest
-class RenameConstructorTest_UseCFE extends RenameConstructorTest {
- @override
- bool get useCFE => true;
-
- @failingTest
- @override
- test_createChange_add() => super.test_createChange_add();
-
- @failingTest
- @override
- test_createChange_change() => super.test_createChange_change();
-
- @failingTest
- @override
- test_createChange_remove() => super.test_createChange_remove();
-}
diff --git a/pkg/analysis_server/test/services/refactoring/rename_import_test.dart b/pkg/analysis_server/test/services/refactoring/rename_import_test.dart
index 61e1d63..ed29086 100644
--- a/pkg/analysis_server/test/services/refactoring/rename_import_test.dart
+++ b/pkg/analysis_server/test/services/refactoring/rename_import_test.dart
@@ -12,7 +12,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(RenameImportTest);
- defineReflectiveTests(RenameImportTest_UseCFE);
});
}
@@ -229,28 +228,3 @@
createRenameRefactoringForElement(directive.element);
}
}
-
-@reflectiveTest
-class RenameImportTest_UseCFE extends RenameImportTest {
- @override
- bool get useCFE => true;
-
- @failingTest
- @override
- test_createChange_change_className() =>
- super.test_createChange_change_className();
-
- @failingTest
- @override
- test_createChange_change_function() =>
- super.test_createChange_change_function();
-
- @failingTest
- @override
- test_createChange_change_onPrefixElement() =>
- super.test_createChange_change_onPrefixElement();
-
- @failingTest
- @override
- test_createChange_remove() => super.test_createChange_remove();
-}
diff --git a/pkg/analysis_server/test/services/refactoring/rename_label_test.dart b/pkg/analysis_server/test/services/refactoring/rename_label_test.dart
index 9fe5d67..076ec77 100644
--- a/pkg/analysis_server/test/services/refactoring/rename_label_test.dart
+++ b/pkg/analysis_server/test/services/refactoring/rename_label_test.dart
@@ -11,7 +11,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(RenameLabelTest);
- defineReflectiveTests(RenameLabelTest_UseCFE);
});
}
@@ -82,13 +81,3 @@
expect(refactoring.oldName, 'test');
}
}
-
-@reflectiveTest
-class RenameLabelTest_UseCFE extends RenameLabelTest {
- @override
- bool get useCFE => true;
-
- @failingTest
- @override
- test_createChange() => super.test_createChange();
-}
diff --git a/pkg/analysis_server/test/services/refactoring/rename_library_test.dart b/pkg/analysis_server/test/services/refactoring/rename_library_test.dart
index d0da82b..19d2a4d 100644
--- a/pkg/analysis_server/test/services/refactoring/rename_library_test.dart
+++ b/pkg/analysis_server/test/services/refactoring/rename_library_test.dart
@@ -11,7 +11,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(RenameLibraryTest);
- defineReflectiveTests(RenameLibraryTest_UseCFE);
});
}
@@ -90,18 +89,3 @@
createRenameRefactoringForElement(testUnitElement.library);
}
}
-
-@reflectiveTest
-class RenameLibraryTest_UseCFE extends RenameLibraryTest {
- @override
- bool get useCFE => true;
-
- @failingTest
- @override
- test_createChange() => super.test_createChange();
-
- @failingTest
- @override
- test_createChange_hasWhitespaces() =>
- super.test_createChange_hasWhitespaces();
-}
diff --git a/pkg/analysis_server/test/services/refactoring/rename_local_test.dart b/pkg/analysis_server/test/services/refactoring/rename_local_test.dart
index 578caaf..6b8c273 100644
--- a/pkg/analysis_server/test/services/refactoring/rename_local_test.dart
+++ b/pkg/analysis_server/test/services/refactoring/rename_local_test.dart
@@ -12,7 +12,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(RenameLocalTest);
- defineReflectiveTests(RenameLocalTest_UseCFE);
});
}
@@ -573,14 +572,3 @@
expect(refactoring.oldName, 'test');
}
}
-
-@reflectiveTest
-class RenameLocalTest_UseCFE extends RenameLocalTest {
- @override
- bool get useCFE => true;
-
- @failingTest
- @override
- test_checkFinalConditions_shadows_classMember_namedParameter() =>
- super.test_checkFinalConditions_shadows_classMember_namedParameter();
-}
diff --git a/pkg/analysis_server/test/services/refactoring/rename_unit_member_test.dart b/pkg/analysis_server/test/services/refactoring/rename_unit_member_test.dart
index 9046642..e5c22bf 100644
--- a/pkg/analysis_server/test/services/refactoring/rename_unit_member_test.dart
+++ b/pkg/analysis_server/test/services/refactoring/rename_unit_member_test.dart
@@ -7,13 +7,11 @@
import 'package:test/test.dart';
import 'package:test_reflective_loader/test_reflective_loader.dart';
-import '../../test_utilities/utillities.dart';
import 'abstract_rename.dart';
main() {
defineReflectiveSuite(() {
defineReflectiveTests(RenameUnitMemberTest);
- defineReflectiveTests(RenameUnitMemberTest_UseCFE);
});
}
@@ -612,15 +610,3 @@
''');
}
}
-
-@reflectiveTest
-class RenameUnitMemberTest_UseCFE extends RenameUnitMemberTest {
- @override
- bool get useCFE => true;
-
- @failingTest
- @override
- test_checkFinalConditions_shadowsInSubClass_importedLib_hideCombinator() =>
- callFailingTest(super
- .test_checkFinalConditions_shadowsInSubClass_importedLib_hideCombinator());
-}
diff --git a/pkg/analysis_server/test/services/search/element_visitors_test.dart b/pkg/analysis_server/test/services/search/element_visitors_test.dart
index 1bc5725..ef2c208 100644
--- a/pkg/analysis_server/test/services/search/element_visitors_test.dart
+++ b/pkg/analysis_server/test/services/search/element_visitors_test.dart
@@ -12,7 +12,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(FindElementByNameOffsetTest);
- defineReflectiveTests(FindElementByNameOffsetTest_UseCFE);
});
}
@@ -67,9 +66,3 @@
expect(element.name, name);
}
}
-
-@reflectiveTest
-class FindElementByNameOffsetTest_UseCFE extends FindElementByNameOffsetTest {
- @override
- bool get useCFE => true;
-}
diff --git a/pkg/analysis_server/test/services/search/hierarchy_test.dart b/pkg/analysis_server/test/services/search/hierarchy_test.dart
index b36529c..b824347 100644
--- a/pkg/analysis_server/test/services/search/hierarchy_test.dart
+++ b/pkg/analysis_server/test/services/search/hierarchy_test.dart
@@ -15,7 +15,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(HierarchyTest);
- defineReflectiveTests(HierarchyTest_UseCFE);
});
}
@@ -450,9 +449,3 @@
await resolveTestUnit(code);
}
}
-
-@reflectiveTest
-class HierarchyTest_UseCFE extends HierarchyTest {
- @override
- bool get useCFE => true;
-}
diff --git a/pkg/analysis_server/test/services/search/search_engine_test.dart b/pkg/analysis_server/test/services/search/search_engine_test.dart
index d458443..c8a7acf 100644
--- a/pkg/analysis_server/test/services/search/search_engine_test.dart
+++ b/pkg/analysis_server/test/services/search/search_engine_test.dart
@@ -21,12 +21,10 @@
import 'package:test_reflective_loader/test_reflective_loader.dart';
import '../../mock_sdk.dart';
-import '../../test_utilities/utillities.dart';
main() {
defineReflectiveSuite(() {
defineReflectiveTests(SearchEngineImplTest);
- defineReflectiveTests(SearchEngineImplTest_UseCFE);
});
}
@@ -41,11 +39,6 @@
AnalysisDriverScheduler scheduler;
- /**
- * Return `true` to enable the Dart 2.0 Common Front End.
- */
- bool get useCFE => false;
-
void setUp() {
sdk = new MockSdk(resourceProvider: resourceProvider);
logger = new PerformanceLog(logBuffer);
@@ -200,9 +193,9 @@
var searchEngine = new SearchEngineImpl([driver]);
Set<ClassElement> subtypes = await searchEngine.searchAllSubtypes(element);
expect(subtypes, hasLength(3));
- expect(subtypes, contains(predicate((ClassElement e) => e.name == 'A')));
- expect(subtypes, contains(predicate((ClassElement e) => e.name == 'B')));
- expect(subtypes, contains(predicate((ClassElement e) => e.name == 'C')));
+ _assertContainsClass(subtypes, 'A');
+ _assertContainsClass(subtypes, 'B');
+ _assertContainsClass(subtypes, 'C');
}
test_searchAllSubtypes_acrossDrivers() async {
@@ -233,6 +226,35 @@
expect(subtypes, contains(predicate((ClassElement e) => e.name == 'C')));
}
+ test_searchAllSubtypes_mixin() async {
+ var p = newFile('/test.dart', content: '''
+class T {}
+
+mixin A on T {}
+mixin B implements T {}
+
+class C extends T {}
+
+mixin D on C {}
+mixin E implements C {}
+''').path;
+
+ var driver = _newDriver();
+ driver.addFile(p);
+
+ var resultA = await driver.getResult(p);
+ ClassElement element = resultA.unit.declaredElement.types[0];
+
+ var searchEngine = new SearchEngineImpl([driver]);
+ Set<ClassElement> subtypes = await searchEngine.searchAllSubtypes(element);
+ expect(subtypes, hasLength(5));
+ _assertContainsClass(subtypes, 'A');
+ _assertContainsClass(subtypes, 'B');
+ _assertContainsClass(subtypes, 'C');
+ _assertContainsClass(subtypes, 'D');
+ _assertContainsClass(subtypes, 'E');
+ }
+
test_searchMemberDeclarations() async {
var codeA = '''
class A {
@@ -396,10 +418,9 @@
}
var searchEngine = new SearchEngineImpl([driver1, driver2]);
- List<SearchMatch> matches =
- await searchEngine.searchTopLevelDeclarations('.*');
- expect(
- matches.where((match) => !match.libraryElement.isInSdk), hasLength(4));
+ var matches = await searchEngine.searchTopLevelDeclarations('.*');
+ matches.removeWhere((match) => match.libraryElement.isInSdk);
+ expect(matches, hasLength(4));
void assertHasOneElement(String name) {
Iterable<SearchMatch> nameMatches = matches.where((SearchMatch m) =>
@@ -475,25 +496,10 @@
contentOverlay,
null,
new SourceFactory(resolvers, null, resourceProvider),
- new AnalysisOptionsImpl(),
- useCFE: useCFE);
+ new AnalysisOptionsImpl());
}
-}
-@reflectiveTest
-class SearchEngineImplTest_UseCFE extends SearchEngineImplTest {
- @override
- bool get useCFE => true;
-
- @failingTest
- @override
- test_searchMemberReferences() =>
- callFailingTest(super.test_searchMemberReferences());
-
- @failingTest
- @override
- test_searchReferences_discover_owned() {
- fail('Timeout');
-// return callFailingTest(super.test_searchReferences_discover_owned);
+ static void _assertContainsClass(Set<ClassElement> subtypes, String name) {
+ expect(subtypes, contains(predicate((ClassElement e) => e.name == name)));
}
}
diff --git a/pkg/analysis_server/test/src/computer/closingLabels_computer_test.dart b/pkg/analysis_server/test/src/computer/closingLabels_computer_test.dart
index f63237e..1c5ec8d 100644
--- a/pkg/analysis_server/test/src/computer/closingLabels_computer_test.dart
+++ b/pkg/analysis_server/test/src/computer/closingLabels_computer_test.dart
@@ -15,7 +15,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(ClosingLabelsComputerTest);
- defineReflectiveTests(ClosingLabelsComputerTest_UseCFE);
});
}
@@ -407,9 +406,3 @@
return computer.compute();
}
}
-
-@reflectiveTest
-class ClosingLabelsComputerTest_UseCFE extends ClosingLabelsComputerTest {
- @override
- bool get useCFE => true;
-}
diff --git a/pkg/analysis_server/test/src/computer/folding_computer_test.dart b/pkg/analysis_server/test/src/computer/folding_computer_test.dart
index abf0480..dee139a 100644
--- a/pkg/analysis_server/test/src/computer/folding_computer_test.dart
+++ b/pkg/analysis_server/test/src/computer/folding_computer_test.dart
@@ -15,7 +15,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(FoldingComputerTest);
- defineReflectiveTests(FoldingComputerTest_UseCFE);
});
}
@@ -306,6 +305,23 @@
_compareRegions(regions, content);
}
+ test_mixin() async {
+ String content = """
+// Content before
+
+mixin M {/*1:INC*/
+ void m() {/*3:INC*/
+ print("Got to m");
+ /*3:INC:FUNCTION_BODY*/}
+/*1:INC:CLASS_BODY*/}
+
+// Content after
+""";
+
+ final regions = await _computeRegions(content);
+ _compareRegions(regions, content);
+ }
+
test_multiple_directive_types() async {
String content = """
import/*1:INC*/ 'dart:async';
@@ -439,21 +455,3 @@
return computer.compute();
}
}
-
-@reflectiveTest
-class FoldingComputerTest_UseCFE extends FoldingComputerTest {
- @override
- bool get useCFE => true;
-
- @failingTest
- @override
- test_annotations() => super.test_annotations();
-
- @failingTest
- @override
- test_multiple_directive_types() => super.test_multiple_directive_types();
-
- @failingTest
- @override
- test_multiple_import_directives() => super.test_multiple_import_directives();
-}
diff --git a/pkg/analysis_server/test/src/computer/import_elements_computer_test.dart b/pkg/analysis_server/test/src/computer/import_elements_computer_test.dart
index 631177c..72199c9 100644
--- a/pkg/analysis_server/test/src/computer/import_elements_computer_test.dart
+++ b/pkg/analysis_server/test/src/computer/import_elements_computer_test.dart
@@ -17,7 +17,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(ImportElementsComputerTest);
- defineReflectiveTests(ImportElementsComputerTest_UseCFE);
});
}
@@ -359,13 +358,3 @@
''');
}
}
-
-@reflectiveTest
-class ImportElementsComputerTest_UseCFE extends ImportElementsComputerTest {
- @override
- bool get useCFE => true;
-
- @failingTest
- @override
- test_createEdits_invalidUri() => super.test_createEdits_invalidUri();
-}
diff --git a/pkg/analysis_server/test/src/computer/imported_elements_computer_test.dart b/pkg/analysis_server/test/src/computer/imported_elements_computer_test.dart
index 574c073..55c106b 100644
--- a/pkg/analysis_server/test/src/computer/imported_elements_computer_test.dart
+++ b/pkg/analysis_server/test/src/computer/imported_elements_computer_test.dart
@@ -15,7 +15,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(ImportElementsComputerTest);
- defineReflectiveTests(ImportElementsComputerTest_UseCFE);
});
}
@@ -399,9 +398,3 @@
return computer.compute();
}
}
-
-@reflectiveTest
-class ImportElementsComputerTest_UseCFE extends ImportElementsComputerTest {
- @override
- bool get useCFE => true;
-}
diff --git a/pkg/analysis_server/test/src/computer/outline_computer_test.dart b/pkg/analysis_server/test/src/computer/outline_computer_test.dart
index dcd2eba..340045a 100644
--- a/pkg/analysis_server/test/src/computer/outline_computer_test.dart
+++ b/pkg/analysis_server/test/src/computer/outline_computer_test.dart
@@ -16,9 +16,7 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(FlutterOutlineComputerTest);
- defineReflectiveTests(FlutterOutlineComputerTest_UseCFE);
defineReflectiveTests(OutlineComputerTest);
- defineReflectiveTests(OutlineComputerTest_UseCFE);
});
}
@@ -140,12 +138,6 @@
}
@reflectiveTest
-class FlutterOutlineComputerTest_UseCFE extends FlutterOutlineComputerTest {
- @override
- bool get useCFE => true;
-}
-
-@reflectiveTest
class OutlineComputerTest extends AbstractOutlineComputerTest {
test_class() async {
Outline unitOutline = await _computeOutline('''
@@ -838,6 +830,77 @@
}
}
+ test_mixin() async {
+ Outline unitOutline = await _computeOutline('''
+mixin M<N> {
+ c(int d) {}
+ String get e => null;
+ set f(int g) {}
+}
+''');
+ List<Outline> topOutlines = unitOutline.children;
+ expect(topOutlines, hasLength(1));
+ // M
+ {
+ Outline outline_M = topOutlines[0];
+ Element element_M = outline_M.element;
+ expect(element_M.kind, ElementKind.MIXIN);
+ expect(element_M.name, "M");
+ expect(element_M.typeParameters, "<N>");
+ {
+ Location location = element_M.location;
+ expect(location.offset, testCode.indexOf("M<N>"));
+ expect(location.length, 1);
+ }
+ expect(element_M.parameters, isNull);
+ expect(element_M.returnType, isNull);
+ // M children
+ List<Outline> outlines_M = outline_M.children;
+ expect(outlines_M, hasLength(3));
+ {
+ Outline outline = outlines_M[0];
+ Element element = outline.element;
+ expect(element.kind, ElementKind.METHOD);
+ expect(element.name, "c");
+ {
+ Location location = element.location;
+ expect(location.offset, testCode.indexOf("c(int d)"));
+ expect(location.length, 1);
+ }
+ expect(element.parameters, "(int d)");
+ expect(element.returnType, "");
+ expect(element.isAbstract, isFalse);
+ expect(element.isStatic, isFalse);
+ }
+ {
+ Outline outline = outlines_M[1];
+ Element element = outline.element;
+ expect(element.kind, ElementKind.GETTER);
+ expect(element.name, "e");
+ {
+ Location location = element.location;
+ expect(location.offset, testCode.indexOf("e => null"));
+ expect(location.length, 1);
+ }
+ expect(element.parameters, isNull);
+ expect(element.returnType, "String");
+ }
+ {
+ Outline outline = outlines_M[2];
+ Element element = outline.element;
+ expect(element.kind, ElementKind.SETTER);
+ expect(element.name, "f");
+ {
+ Location location = element.location;
+ expect(location.offset, testCode.indexOf("f(int g)"));
+ expect(location.length, 1);
+ }
+ expect(element.parameters, "(int g)");
+ expect(element.returnType, "");
+ }
+ }
+ }
+
test_sourceRanges_fields() async {
Outline unitOutline = await _computeOutline('''
class A {
@@ -1160,9 +1223,3 @@
expect(element.returnType, isNull);
}
}
-
-@reflectiveTest
-class OutlineComputerTest_UseCFE extends OutlineComputerTest {
- @override
- bool get useCFE => true;
-}
diff --git a/pkg/analysis_server/test/src/domain_abstract_test.dart b/pkg/analysis_server/test/src/domain_abstract_test.dart
index fdd414a..dde70ce 100644
--- a/pkg/analysis_server/test/src/domain_abstract_test.dart
+++ b/pkg/analysis_server/test/src/domain_abstract_test.dart
@@ -18,7 +18,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(AbstractRequestHandlerTest);
- defineReflectiveTests(AbstractRequestHandlerTest_UseCFE);
});
}
@@ -95,12 +94,6 @@
}
}
-@reflectiveTest
-class AbstractRequestHandlerTest_UseCFE extends AbstractRequestHandlerTest {
- @override
- bool get useCFE => true;
-}
-
class TestAbstractRequestHandler extends AbstractRequestHandler {
TestAbstractRequestHandler(server) : super(server);
diff --git a/pkg/analysis_server/test/src/domains/execution/completion_test.dart b/pkg/analysis_server/test/src/domains/execution/completion_test.dart
index 263c8b8..4ba0ecd 100644
--- a/pkg/analysis_server/test/src/domains/execution/completion_test.dart
+++ b/pkg/analysis_server/test/src/domains/execution/completion_test.dart
@@ -14,7 +14,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(RuntimeCompletionComputerTest);
- defineReflectiveTests(RuntimeCompletionComputerTest_UseCFE);
});
}
@@ -378,19 +377,3 @@
assertSuggested('b', returnType: 'double');
}
}
-
-@reflectiveTest
-class RuntimeCompletionComputerTest_UseCFE
- extends RuntimeCompletionComputerTest {
- @override
- bool get useCFE => true;
-
- @failingTest
- @override
- test_parameters_function_nested() => super.test_parameters_function_nested();
-
- @failingTest
- @override
- test_parameters_functionExpression() =>
- super.test_parameters_functionExpression();
-}
diff --git a/pkg/analysis_server/test/src/flutter/flutter_correction_test.dart b/pkg/analysis_server/test/src/flutter/flutter_correction_test.dart
index 2f20d00..4501d68 100644
--- a/pkg/analysis_server/test/src/flutter/flutter_correction_test.dart
+++ b/pkg/analysis_server/test/src/flutter/flutter_correction_test.dart
@@ -12,7 +12,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(FlutterCorrectionTest);
- defineReflectiveTests(FlutterCorrectionTest_UseCFE);
});
}
@@ -134,9 +133,3 @@
unit: testUnit);
}
}
-
-@reflectiveTest
-class FlutterCorrectionTest_UseCFE extends FlutterCorrectionTest {
- @override
- bool get useCFE => true;
-}
diff --git a/pkg/analysis_server/test/src/flutter/flutter_outline_computer_test.dart b/pkg/analysis_server/test/src/flutter/flutter_outline_computer_test.dart
index 61450ac..e4b62c4 100644
--- a/pkg/analysis_server/test/src/flutter/flutter_outline_computer_test.dart
+++ b/pkg/analysis_server/test/src/flutter/flutter_outline_computer_test.dart
@@ -15,7 +15,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(FlutterOutlineComputerTest);
- defineReflectiveTests(FlutterOutlineComputerTest_UseCFE);
});
}
@@ -699,9 +698,3 @@
return buffer.toString();
}
}
-
-@reflectiveTest
-class FlutterOutlineComputerTest_UseCFE extends FlutterOutlineComputerTest {
- @override
- bool get useCFE => true;
-}
diff --git a/pkg/analysis_server/test/src/flutter/flutter_outline_notification_test.dart b/pkg/analysis_server/test/src/flutter/flutter_outline_notification_test.dart
index 929d19a..84f8f04 100644
--- a/pkg/analysis_server/test/src/flutter/flutter_outline_notification_test.dart
+++ b/pkg/analysis_server/test/src/flutter/flutter_outline_notification_test.dart
@@ -18,7 +18,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(FlutterNotificationOutlineTest);
- defineReflectiveTests(FlutterNotificationOutlineTest_UseCFE);
});
}
@@ -119,17 +118,3 @@
expect(textOutlineB.offset, code.indexOf("const Text('bbb')"));
}
}
-
-@reflectiveTest
-class FlutterNotificationOutlineTest_UseCFE
- extends FlutterNotificationOutlineTest {
- @override
- bool get useCFE => true;
-
- @failingTest
- @override
- test_children() async {
- fail('Timeout');
-// return callFailingTest(super.test_children);
- }
-}
diff --git a/pkg/analysis_server/test/src/utilities/flutter_test.dart b/pkg/analysis_server/test/src/utilities/flutter_test.dart
index 0d6d026..b4a0ef0 100644
--- a/pkg/analysis_server/test/src/utilities/flutter_test.dart
+++ b/pkg/analysis_server/test/src/utilities/flutter_test.dart
@@ -12,7 +12,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(FlutterTest);
- defineReflectiveTests(FlutterTest_UseCFE);
});
}
@@ -350,9 +349,3 @@
as InstanceCreationExpression;
}
}
-
-@reflectiveTest
-class FlutterTest_UseCFE extends FlutterTest {
- @override
- bool get useCFE => true;
-}
diff --git a/pkg/analysis_server/test/stress/completion/completion.dart b/pkg/analysis_server/test/stress/completion/completion.dart
index a16fb14..81ebf7a 100644
--- a/pkg/analysis_server/test/stress/completion/completion.dart
+++ b/pkg/analysis_server/test/stress/completion/completion.dart
@@ -23,7 +23,6 @@
printMissing: result['missing'],
printQuality: result['quality'],
timing: result['timing'],
- useCFE: result['use-cfe'],
verbose: result['verbose']);
await runner.runAll(analysisRoot);
await stdout.flush();
@@ -57,11 +56,6 @@
negatable: false,
);
parser.addFlag(
- 'use-cfe',
- help: 'Use the CFE to perform the analysis',
- negatable: false,
- );
- parser.addFlag(
'verbose',
abbr: 'v',
help: 'Produce verbose output',
diff --git a/pkg/analysis_server/test/stress/completion/completion_runner.dart b/pkg/analysis_server/test/stress/completion/completion_runner.dart
index 886a07d..3605038 100644
--- a/pkg/analysis_server/test/stress/completion/completion_runner.dart
+++ b/pkg/analysis_server/test/stress/completion/completion_runner.dart
@@ -46,11 +46,6 @@
final bool timing;
/**
- * A flag indicating whether to use the CFE when running the tests.
- */
- final bool useCFE;
-
- /**
* A flag indicating whether to produce verbose output.
*/
final bool verbose;
@@ -69,13 +64,11 @@
bool printMissing,
bool printQuality,
bool timing,
- bool useCFE,
bool verbose})
: this.output = output ?? new NullStringSink(),
this.printMissing = printMissing ?? false,
this.printQuality = printQuality ?? false,
this.timing = timing ?? false,
- this.useCFE = useCFE ?? false,
this.verbose = verbose ?? false;
/**
@@ -87,8 +80,7 @@
new OverlayResourceProvider(PhysicalResourceProvider.INSTANCE);
AnalysisContextCollection collection = new AnalysisContextCollection(
includedPaths: <String>[analysisRoot],
- resourceProvider: resourceProvider,
- useCFE: useCFE); // ignore: deprecated_member_use
+ resourceProvider: resourceProvider);
DartCompletionManager contributor = new DartCompletionManager();
CompletionPerformance performance = new CompletionPerformance();
int stamp = 1;
diff --git a/pkg/analysis_server/tool/spec/generated/java/types/ElementDeclaration.java b/pkg/analysis_server/tool/spec/generated/java/types/ElementDeclaration.java
index 04da8df..736531f 100644
--- a/pkg/analysis_server/tool/spec/generated/java/types/ElementDeclaration.java
+++ b/pkg/analysis_server/tool/spec/generated/java/types/ElementDeclaration.java
@@ -82,6 +82,12 @@
private final String className;
/**
+ * The name of the mixin enclosing this declaration. If the declaration is not a mixin member, this
+ * field will be absent.
+ */
+ private final String mixinName;
+
+ /**
* The parameter list for the element. If the element is not a method or function this field will
* not be defined. If the element doesn't have parameters (e.g. getter), this field will not be
* defined. If the element has zero parameters, this field will have a value of "()". The value
@@ -93,7 +99,7 @@
/**
* Constructor for {@link ElementDeclaration}.
*/
- public ElementDeclaration(String name, String kind, int fileIndex, int offset, int line, int column, int codeOffset, int codeLength, String className, String parameters) {
+ public ElementDeclaration(String name, String kind, int fileIndex, int offset, int line, int column, int codeOffset, int codeLength, String className, String mixinName, String parameters) {
this.name = name;
this.kind = kind;
this.fileIndex = fileIndex;
@@ -103,6 +109,7 @@
this.codeOffset = codeOffset;
this.codeLength = codeLength;
this.className = className;
+ this.mixinName = mixinName;
this.parameters = parameters;
}
@@ -120,6 +127,7 @@
other.codeOffset == codeOffset &&
other.codeLength == codeLength &&
ObjectUtilities.equals(other.className, className) &&
+ ObjectUtilities.equals(other.mixinName, mixinName) &&
ObjectUtilities.equals(other.parameters, parameters);
}
return false;
@@ -135,8 +143,9 @@
int codeOffset = jsonObject.get("codeOffset").getAsInt();
int codeLength = jsonObject.get("codeLength").getAsInt();
String className = jsonObject.get("className") == null ? null : jsonObject.get("className").getAsString();
+ String mixinName = jsonObject.get("mixinName") == null ? null : jsonObject.get("mixinName").getAsString();
String parameters = jsonObject.get("parameters") == null ? null : jsonObject.get("parameters").getAsString();
- return new ElementDeclaration(name, kind, fileIndex, offset, line, column, codeOffset, codeLength, className, parameters);
+ return new ElementDeclaration(name, kind, fileIndex, offset, line, column, codeOffset, codeLength, className, mixinName, parameters);
}
public static List<ElementDeclaration> fromJsonArray(JsonArray jsonArray) {
@@ -202,6 +211,14 @@
}
/**
+ * The name of the mixin enclosing this declaration. If the declaration is not a mixin member, this
+ * field will be absent.
+ */
+ public String getMixinName() {
+ return mixinName;
+ }
+
+ /**
* The name of the declaration.
*/
public String getName() {
@@ -238,6 +255,7 @@
builder.append(codeOffset);
builder.append(codeLength);
builder.append(className);
+ builder.append(mixinName);
builder.append(parameters);
return builder.toHashCode();
}
@@ -255,6 +273,9 @@
if (className != null) {
jsonObject.addProperty("className", className);
}
+ if (mixinName != null) {
+ jsonObject.addProperty("mixinName", mixinName);
+ }
if (parameters != null) {
jsonObject.addProperty("parameters", parameters);
}
@@ -283,6 +304,8 @@
builder.append(codeLength + ", ");
builder.append("className=");
builder.append(className + ", ");
+ builder.append("mixinName=");
+ builder.append(mixinName + ", ");
builder.append("parameters=");
builder.append(parameters);
builder.append("]");
diff --git a/pkg/analysis_server/tool/spec/generated/java/types/ElementKind.java b/pkg/analysis_server/tool/spec/generated/java/types/ElementKind.java
index f572d75..3991c56 100644
--- a/pkg/analysis_server/tool/spec/generated/java/types/ElementKind.java
+++ b/pkg/analysis_server/tool/spec/generated/java/types/ElementKind.java
@@ -49,6 +49,8 @@
public static final String METHOD = "METHOD";
+ public static final String MIXIN = "MIXIN";
+
public static final String PARAMETER = "PARAMETER";
public static final String PREFIX = "PREFIX";
diff --git a/pkg/analysis_server/tool/spec/spec_input.html b/pkg/analysis_server/tool/spec/spec_input.html
index 3ecf1ea..2334b39 100644
--- a/pkg/analysis_server/tool/spec/spec_input.html
+++ b/pkg/analysis_server/tool/spec/spec_input.html
@@ -7,7 +7,7 @@
<body>
<h1>Analysis Server API Specification</h1>
<h1 style="color:#999999">Version
- <version>1.20.5</version>
+ <version>1.21.0</version>
</h1>
<p>
This document contains a specification of the API provided by the
@@ -3195,6 +3195,13 @@
is not a class member, this field will be absent.
</p>
</field>
+ <field name="mixinName" optional="true">
+ <ref>String</ref>
+ <p>
+ The name of the mixin enclosing this declaration. If the declaration
+ is not a mixin member, this field will be absent.
+ </p>
+ </field>
<field name="parameters" optional="true">
<ref>String</ref>
<p>
diff --git a/pkg/analyzer/lib/dart/analysis/analysis_context_collection.dart b/pkg/analyzer/lib/dart/analysis/analysis_context_collection.dart
index 73a5b06..2405a63 100644
--- a/pkg/analyzer/lib/dart/analysis/analysis_context_collection.dart
+++ b/pkg/analyzer/lib/dart/analysis/analysis_context_collection.dart
@@ -20,8 +20,7 @@
/// system, otherwise the default resource provider will be used.
factory AnalysisContextCollection(
{@required List<String> includedPaths,
- ResourceProvider resourceProvider,
- @deprecated bool useCFE}) = AnalysisContextCollectionImpl;
+ ResourceProvider resourceProvider}) = AnalysisContextCollectionImpl;
/// Return all of the analysis contexts in this collection.
List<AnalysisContext> get contexts;
diff --git a/pkg/analyzer/lib/dart/analysis/context_builder.dart b/pkg/analyzer/lib/dart/analysis/context_builder.dart
index 1d5a2c6..69ef376 100644
--- a/pkg/analyzer/lib/dart/analysis/context_builder.dart
+++ b/pkg/analyzer/lib/dart/analysis/context_builder.dart
@@ -38,6 +38,5 @@
AnalysisContext createContext(
{@required ContextRoot contextRoot,
DeclaredVariables declaredVariables,
- String sdkPath,
- @deprecated bool useCFE});
+ String sdkPath});
}
diff --git a/pkg/analyzer/lib/dart/ast/ast.dart b/pkg/analyzer/lib/dart/ast/ast.dart
index 84c538a..777bdc3 100644
--- a/pkg/analyzer/lib/dart/ast/ast.dart
+++ b/pkg/analyzer/lib/dart/ast/ast.dart
@@ -5185,6 +5185,9 @@
* Clients may not extend, implement or mix-in this class.
*/
abstract class MixinDeclaration extends NamedCompilationUnitMember {
+ @override
+ ClassElement get declaredElement;
+
/**
* Return the implements clause for the mixin, or `null` if the mixin does not
* implement any interfaces.
diff --git a/pkg/analyzer/lib/dart/element/element.dart b/pkg/analyzer/lib/dart/element/element.dart
index 7e2ca4c..ed74e72 100644
--- a/pkg/analyzer/lib/dart/element/element.dart
+++ b/pkg/analyzer/lib/dart/element/element.dart
@@ -189,8 +189,8 @@
* Return a list containing all of the superclass constraints defined for this
* class. The list will be empty if this class does not represent a mixin
* declaration. If this class _does_ represent a mixin declaration but the
- * declaration does not have an on clause, then the list will contain the type
- * for the class `Object`.
+ * declaration does not have an `on` clause, then the list will contain the
+ * type for the class `Object`.
*
* <b>Note:</b> Because the element model represents the state of the code, it
* is possible for it to be semantically invalid. In particular, it is not
@@ -491,6 +491,12 @@
LineInfo get lineInfo;
/**
+ * Return a list containing all of the mixins contained in this compilation
+ * unit.
+ */
+ List<ClassElement> get mixins;
+
+ /**
* Return a list containing all of the top-level variables contained in this
* compilation unit.
*/
diff --git a/pkg/analyzer/lib/error/error.dart b/pkg/analyzer/lib/error/error.dart
index 5662d2f..bda2290 100644
--- a/pkg/analyzer/lib/error/error.dart
+++ b/pkg/analyzer/lib/error/error.dart
@@ -130,7 +130,6 @@
CompileTimeErrorCode.EXPORT_OF_NON_LIBRARY,
CompileTimeErrorCode.EXTENDS_DEFERRED_CLASS,
CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS,
- CompileTimeErrorCode.EXTENDS_ENUM,
CompileTimeErrorCode.EXTENDS_NON_CLASS,
CompileTimeErrorCode.EXTERNAL_CONSTRUCTOR_WITH_FIELD_INITIALIZERS,
CompileTimeErrorCode.EXTRA_POSITIONAL_ARGUMENTS,
@@ -150,8 +149,6 @@
CompileTimeErrorCode.ILLEGAL_MIXIN,
CompileTimeErrorCode.IMPLEMENTS_DEFERRED_CLASS,
CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS,
- CompileTimeErrorCode.IMPLEMENTS_DYNAMIC,
- CompileTimeErrorCode.IMPLEMENTS_ENUM,
CompileTimeErrorCode.IMPLEMENTS_NON_CLASS,
CompileTimeErrorCode.IMPLEMENTS_REPEATED,
CompileTimeErrorCode.IMPLEMENTS_SUPER_CLASS,
@@ -195,6 +192,7 @@
CompileTimeErrorCode.MISSING_CONST_IN_LIST_LITERAL,
CompileTimeErrorCode.MISSING_CONST_IN_MAP_LITERAL,
CompileTimeErrorCode.MISSING_DART_LIBRARY,
+ CompileTimeErrorCode.MIXIN_CLASS_DECLARES_CONSTRUCTOR,
CompileTimeErrorCode.MIXIN_DECLARES_CONSTRUCTOR,
CompileTimeErrorCode.MIXIN_DEFERRED_CLASS,
CompileTimeErrorCode.MIXIN_HAS_NO_CONSTRUCTORS,
@@ -203,9 +201,11 @@
CompileTimeErrorCode.MIXIN_INFERENCE_NO_POSSIBLE_SUBSTITUTION,
CompileTimeErrorCode.MIXIN_INHERITS_FROM_NOT_OBJECT,
CompileTimeErrorCode.MIXIN_OF_DISALLOWED_CLASS,
- CompileTimeErrorCode.MIXIN_OF_ENUM,
CompileTimeErrorCode.MIXIN_OF_NON_CLASS,
CompileTimeErrorCode.MIXIN_REFERENCES_SUPER,
+ CompileTimeErrorCode.MIXIN_SUPER_CLASS_CONSTRAINT_DEFERRED_CLASS,
+ CompileTimeErrorCode.MIXIN_SUPER_CLASS_CONSTRAINT_DISALLOWED_CLASS,
+ CompileTimeErrorCode.MIXIN_SUPER_CLASS_CONSTRAINT_NON_CLASS,
CompileTimeErrorCode.MIXIN_WITH_NON_CLASS_SUPERCLASS,
CompileTimeErrorCode.MULTIPLE_REDIRECTING_CONSTRUCTOR_INVOCATIONS,
CompileTimeErrorCode.MULTIPLE_SUPER_INITIALIZERS,
@@ -429,6 +429,7 @@
ParserErrorCode.GETTER_WITH_PARAMETERS,
ParserErrorCode.ILLEGAL_ASSIGNMENT_TO_NON_ASSIGNABLE,
ParserErrorCode.IMPLEMENTS_BEFORE_EXTENDS,
+ ParserErrorCode.IMPLEMENTS_BEFORE_ON,
ParserErrorCode.IMPLEMENTS_BEFORE_WITH,
ParserErrorCode.IMPORT_DIRECTIVE_AFTER_PART_DIRECTIVE,
ParserErrorCode.INITIALIZED_VARIABLE_IN_FOR_EACH,
@@ -474,6 +475,7 @@
ParserErrorCode.MISSING_VARIABLE_IN_FOR_EACH,
ParserErrorCode.MIXED_PARAMETER_GROUPS,
ParserErrorCode.MULTIPLE_EXTENDS_CLAUSES,
+ ParserErrorCode.MULTIPLE_ON_CLAUSES,
ParserErrorCode.MULTIPLE_IMPLEMENTS_CLAUSES,
ParserErrorCode.MULTIPLE_LIBRARY_DIRECTIVES,
ParserErrorCode.MULTIPLE_NAMED_PARAMETER_GROUPS,
@@ -593,11 +595,8 @@
StaticWarningCode.CASE_BLOCK_NOT_TERMINATED,
StaticWarningCode.CAST_TO_NON_TYPE,
StaticWarningCode.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER,
- StaticWarningCode.CONFLICTING_DART_IMPORT,
- StaticWarningCode.CONFLICTING_INSTANCE_GETTER_AND_SUPERCLASS_MEMBER,
StaticWarningCode.CONFLICTING_INSTANCE_METHOD_SETTER,
StaticWarningCode.CONFLICTING_INSTANCE_METHOD_SETTER2,
- StaticWarningCode.CONFLICTING_INSTANCE_SETTER_AND_SUPERCLASS_MEMBER,
StaticWarningCode.CONFLICTING_STATIC_GETTER_AND_INSTANCE_SETTER,
StaticWarningCode.CONFLICTING_STATIC_SETTER_AND_INSTANCE_MEMBER,
StaticWarningCode.CONST_WITH_ABSTRACT_CLASS,
diff --git a/pkg/analyzer/lib/source/error_processor.dart b/pkg/analyzer/lib/source/error_processor.dart
index 4a7559a..9a00004 100644
--- a/pkg/analyzer/lib/source/error_processor.dart
+++ b/pkg/analyzer/lib/source/error_processor.dart
@@ -127,7 +127,7 @@
return true;
}
if (errorCode is StaticWarningCode) {
- return errorCode.isStrongModeError;
+ return true;
}
return false;
}
diff --git a/pkg/analyzer/lib/src/context/builder.dart b/pkg/analyzer/lib/src/context/builder.dart
index 9c4118d..6e91ddd 100644
--- a/pkg/analyzer/lib/src/context/builder.dart
+++ b/pkg/analyzer/lib/src/context/builder.dart
@@ -32,7 +32,6 @@
import 'package:analyzer/src/source/package_map_resolver.dart';
import 'package:analyzer/src/summary/summary_sdk.dart';
import 'package:analyzer/src/task/options.dart';
-import 'package:analyzer/src/util/sdk.dart';
import 'package:args/args.dart';
import 'package:front_end/src/api_prototype/byte_store.dart';
import 'package:front_end/src/base/performance_logger.dart';
@@ -136,11 +135,6 @@
bool get previewDart2 => true;
/**
- * Whether to enable the Dart 2.0 Common Front End implementation.
- */
- bool useCFE = false;
-
- /**
* Initialize a newly created builder to be ready to build a context rooted in
* the directory with the given [rootDirectoryPath].
*/
@@ -179,18 +173,6 @@
//_processAnalysisOptions(context, optionMap);
final sf = createSourceFactory(path, options);
- // The folder with `vm_platform_strong.dill`, which has required patches.
- Folder kernelPlatformFolder;
- if (useCFE) {
- DartSdk sdk = sf.dartSdk;
- if (sdk is FolderBasedDartSdk) {
- var binariesPath = computePlatformBinariesPath(sdk.directory.path);
- if (binariesPath != null) {
- kernelPlatformFolder = resourceProvider.getFolder(binariesPath);
- }
- }
- }
-
AnalysisDriver driver = new AnalysisDriver(
analysisDriverScheduler,
performanceLog,
@@ -199,9 +181,7 @@
fileContentOverlay,
contextRoot,
sf,
- options,
- useCFE: useCFE,
- kernelPlatformFolder: kernelPlatformFolder);
+ options);
// temporary plugin support:
if (onCreateAnalysisDriver != null) {
onCreateAnalysisDriver(driver, analysisDriverScheduler, performanceLog,
diff --git a/pkg/analyzer/lib/src/context/context.dart b/pkg/analyzer/lib/src/context/context.dart
index c1e0f20..c8bf328 100644
--- a/pkg/analyzer/lib/src/context/context.dart
+++ b/pkg/analyzer/lib/src/context/context.dart
@@ -322,7 +322,7 @@
this._options.implicitCasts = options.implicitCasts;
this._options.nonnullableTypes = options.nonnullableTypes;
this._options.implicitDynamic = options.implicitDynamic;
- this._options.useCFE = options.useCFE;
+ this._options.isMixinSupportEnabled = options.isMixinSupportEnabled;
}
if (needsRecompute) {
for (WorkManager workManager in workManagers) {
diff --git a/pkg/analyzer/lib/src/dart/analysis/analysis_context_collection.dart b/pkg/analyzer/lib/src/dart/analysis/analysis_context_collection.dart
index 1ea2e28..a474878 100644
--- a/pkg/analyzer/lib/src/dart/analysis/analysis_context_collection.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/analysis_context_collection.dart
@@ -22,8 +22,7 @@
AnalysisContextCollectionImpl(
{@required List<String> includedPaths,
ResourceProvider resourceProvider,
- String sdkPath,
- @deprecated bool useCFE})
+ String sdkPath})
: resourceProvider =
resourceProvider ?? PhysicalResourceProvider.INSTANCE {
_throwIfAnyNotAbsoluteNormalizedPath(includedPaths);
@@ -39,8 +38,8 @@
var contextBuilder = new ContextBuilder(
resourceProvider: this.resourceProvider,
);
- var context = contextBuilder.createContext(
- contextRoot: root, sdkPath: sdkPath, useCFE: useCFE);
+ var context =
+ contextBuilder.createContext(contextRoot: root, sdkPath: sdkPath);
contexts.add(context);
}
}
diff --git a/pkg/analyzer/lib/src/dart/analysis/context_builder.dart b/pkg/analyzer/lib/src/dart/analysis/context_builder.dart
index 3f961e4..3ede35d 100644
--- a/pkg/analyzer/lib/src/dart/analysis/context_builder.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/context_builder.dart
@@ -52,8 +52,7 @@
AnalysisContext createContext(
{@required ContextRoot contextRoot,
DeclaredVariables declaredVariables,
- String sdkPath,
- @deprecated bool useCFE}) {
+ String sdkPath}) {
PerformanceLog performanceLog = new PerformanceLog(new StringBuffer());
AnalysisDriverScheduler scheduler =
new AnalysisDriverScheduler(performanceLog);
@@ -79,7 +78,6 @@
builder.byteStore = new MemoryByteStore();
builder.fileContentOverlay = new FileContentOverlay();
builder.performanceLog = performanceLog;
- builder.useCFE = useCFE ?? false;
old.ContextRoot oldContextRoot = new old.ContextRoot(
contextRoot.root.path, contextRoot.excludedPaths.toList(),
diff --git a/pkg/analyzer/lib/src/dart/analysis/defined_names.dart b/pkg/analyzer/lib/src/dart/analysis/defined_names.dart
index 58d0a65..44baa00 100644
--- a/pkg/analyzer/lib/src/dart/analysis/defined_names.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/defined_names.dart
@@ -33,6 +33,9 @@
if (member is ClassDeclaration) {
member.members.forEach(appendClassMemberName);
}
+ if (member is MixinDeclaration) {
+ member.members.forEach(appendClassMemberName);
+ }
} else if (member is TopLevelVariableDeclaration) {
for (VariableDeclaration variable in member.variables.variables) {
appendName(names.topLevelNames, variable.name);
diff --git a/pkg/analyzer/lib/src/dart/analysis/driver.dart b/pkg/analyzer/lib/src/dart/analysis/driver.dart
index b07b1140..37bd368 100644
--- a/pkg/analyzer/lib/src/dart/analysis/driver.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/driver.dart
@@ -19,9 +19,7 @@
import 'package:analyzer/src/context/context_root.dart';
import 'package:analyzer/src/dart/analysis/file_state.dart';
import 'package:analyzer/src/dart/analysis/file_tracker.dart';
-import 'package:analyzer/src/dart/analysis/frontend_resolution.dart';
import 'package:analyzer/src/dart/analysis/index.dart';
-import 'package:analyzer/src/dart/analysis/kernel_context.dart';
import 'package:analyzer/src/dart/analysis/library_analyzer.dart';
import 'package:analyzer/src/dart/analysis/library_context.dart';
import 'package:analyzer/src/dart/analysis/search.dart';
@@ -94,7 +92,7 @@
/**
* The version of data format, should be incremented on every format change.
*/
- static const int DATA_VERSION = 63;
+ static const int DATA_VERSION = 65;
/**
* The number of exception contexts allowed to write. Once this field is
@@ -103,19 +101,6 @@
static int allowedNumberOfContextsToWrite = 10;
/**
- * Whether kernel should be used to resynthesize elements.
- */
- final bool _useCFE;
-
- /**
- * The [Folder] with the `vm_platform.dill` file.
- *
- * We use `vm_platform.dill`, because loading patches is not yet implemented,
- * and patches are not a part of SDK distribution.
- */
- final Folder _kernelPlatformFolder;
-
- /**
* The scheduler that schedules analysis work in this, and possibly other
* analysis drivers.
*/
@@ -183,12 +168,6 @@
final Uint32List _salt = new Uint32List(1 + AnalysisOptions.signatureLength);
/**
- * If [enableKernelDriver], then the instance of [FrontEndCompiler].
- * Otherwise `null`.
- */
- FrontEndCompiler _frontEndCompiler;
-
- /**
* The set of priority files, that should be analyzed sooner.
*/
final _priorityFiles = new LinkedHashSet<String>();
@@ -351,22 +330,17 @@
this.contextRoot,
SourceFactory sourceFactory,
this._analysisOptions,
- {bool useCFE: false,
- Folder kernelPlatformFolder,
- PackageBundle sdkBundle,
+ {PackageBundle sdkBundle,
this.disableChangesAndCacheAllResults: false,
SummaryDataStore externalSummaries})
: _logger = logger,
_sourceFactory = sourceFactory.clone(),
_sdkBundle = sdkBundle,
- _externalSummaries = externalSummaries,
- _useCFE = useCFE,
- _kernelPlatformFolder = kernelPlatformFolder {
+ _externalSummaries = externalSummaries {
_createNewSession();
_onResults = _resultController.stream.asBroadcastStream();
_testView = new AnalysisDriverTestView(this);
_createFileTracker();
- _createKernelDriver();
_scheduler.add(this);
_search = new Search(this);
}
@@ -597,7 +571,6 @@
Iterable<String> addedFiles = _fileTracker.addedFiles;
_createFileTracker();
_fileTracker.addFiles(addedFiles);
- _createKernelDriver();
}
/**
@@ -1158,7 +1131,6 @@
void removeFile(String path) {
_throwIfNotAbsolutePath(path);
_throwIfChangesAreNotAllowed();
- _frontEndCompilerInvalidate(path);
_fileTracker.removeFile(path);
_priorityResults.clear();
}
@@ -1167,7 +1139,6 @@
* Implementation for [changeFile].
*/
void _changeFile(String path) {
- _frontEndCompilerInvalidate(path);
_fileTracker.changeFile(path);
_priorityResults.clear();
}
@@ -1243,43 +1214,25 @@
await null;
try {
LibraryContext libraryContext;
- KernelContext kernelContext;
try {
_testView.numOfAnalyzedLibraries++;
- LibraryAnalyzer analyzer;
- if (_useCFE) {
- kernelContext = await _createKernelContext(library);
- analyzer = new LibraryAnalyzer(
- _logger,
- analysisOptions,
- declaredVariables,
- sourceFactory,
- kernelContext.isLibraryUri,
- kernelContext.analysisContext,
- kernelContext.resynthesizer,
- library,
- useCFE: true,
- frontEndCompiler: _frontEndCompiler);
- } else {
- if (!_fsState.getFileForUri(Uri.parse('dart:core')).exists) {
- return _newMissingDartLibraryResult(file, 'dart:core');
- }
- if (!_fsState.getFileForUri(Uri.parse('dart:async')).exists) {
- return _newMissingDartLibraryResult(file, 'dart:async');
- }
- libraryContext = await _createLibraryContext(library);
- analyzer = new LibraryAnalyzer(
- _logger,
- analysisOptions,
- declaredVariables,
- sourceFactory,
- libraryContext.isLibraryUri,
- libraryContext.analysisContext,
- libraryContext.resynthesizer,
- library);
+ if (!_fsState.getFileForUri(Uri.parse('dart:core')).exists) {
+ return _newMissingDartLibraryResult(file, 'dart:core');
}
+ if (!_fsState.getFileForUri(Uri.parse('dart:async')).exists) {
+ return _newMissingDartLibraryResult(file, 'dart:async');
+ }
+ libraryContext = await _createLibraryContext(library);
+ LibraryAnalyzer analyzer = new LibraryAnalyzer(
+ analysisOptions,
+ declaredVariables,
+ sourceFactory,
+ libraryContext.isLibraryUri,
+ libraryContext.analysisContext,
+ libraryContext.resynthesizer,
+ library);
Map<FileState, UnitAnalysisResult> results = await analyzer.analyze();
List<int> bytes;
@@ -1315,7 +1268,6 @@
return result;
} finally {
libraryContext?.dispose();
- kernelContext?.dispose();
}
} catch (exception, stackTrace) {
String contextKey = _storeExceptionContextDuringAnalysis(
@@ -1349,28 +1301,15 @@
}
}
- if (_useCFE) {
- var kernelContext = await _createKernelContext(library);
- try {
- CompilationUnitElement element =
- kernelContext.computeUnitElement(library.source, file.source);
- String signature = library.transitiveSignature;
- return new UnitElementResult(
- currentSession, path, file.uri, signature, element);
- } finally {
- kernelContext.dispose();
- }
- } else {
- LibraryContext libraryContext = await _createLibraryContext(library);
- try {
- CompilationUnitElement element =
- libraryContext.computeUnitElement(library.source, file.source);
- String signature = library.transitiveSignature;
- return new UnitElementResult(
- currentSession, path, file.uri, signature, element);
- } finally {
- libraryContext.dispose();
- }
+ LibraryContext libraryContext = await _createLibraryContext(library);
+ try {
+ CompilationUnitElement element =
+ libraryContext.computeUnitElement(library.source, file.source);
+ String signature = library.transitiveSignature;
+ return new UnitElementResult(
+ currentSession, path, file.uri, signature, element);
+ } finally {
+ libraryContext.dispose();
}
}
@@ -1406,38 +1345,6 @@
_fileTracker = new FileTracker(_logger, _fsState, _changeHook);
}
- Future<KernelContext> _createKernelContext(FileState library) async {
- // TODO(brianwilkerson) Determine whether this await is necessary.
- await null;
- return await KernelContext.forSingleLibrary(
- library,
- _logger,
- _analysisOptions,
- declaredVariables,
- _sourceFactory,
- fsState,
- _frontEndCompiler);
- }
-
- /**
- * Creates a new [FrontEndCompiler] in [_frontEndCompiler].
- *
- * This is used both on initial construction and whenever the configuration
- * changes.
- */
- void _createKernelDriver() {
- if (_useCFE) {
- _frontEndCompiler = new FrontEndCompiler(
- _logger,
- _byteStore,
- analysisOptions,
- _kernelPlatformFolder,
- sourceFactory,
- fsState,
- _resourceProvider.pathContext);
- }
- }
-
/**
* Return the context in which the [library] should be analyzed.
*/
@@ -1485,16 +1392,6 @@
}
/**
- * Invalidate the file with the given [path] in the [_frontEndCompiler].
- */
- void _frontEndCompilerInvalidate(String path) {
- if (_frontEndCompiler != null) {
- var fileUri = _resourceProvider.pathContext.toUri(path);
- _frontEndCompiler.invalidate(fileUri);
- }
- }
-
- /**
* Load the [AnalysisResult] for the given [file] from the [bytes]. Set
* optional [content] and [resolvedUnit].
*/
diff --git a/pkg/analyzer/lib/src/dart/analysis/file_state.dart b/pkg/analyzer/lib/src/dart/analysis/file_state.dart
index d7cab63..b048577 100644
--- a/pkg/analyzer/lib/src/dart/analysis/file_state.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/file_state.dart
@@ -630,7 +630,6 @@
AnalysisOptions analysisOptions = _fsState._analysisOptions;
CharSequenceReader reader = new CharSequenceReader(content);
Scanner scanner = new Scanner(source, reader, errorListener);
- scanner.scanGenericMethodComments = true;
Token token = PerformanceStatistics.scan.makeCurrentWhile(() {
return scanner.tokenize();
});
@@ -639,7 +638,6 @@
bool useFasta = analysisOptions.useFastaParser;
Parser parser = new Parser(source, errorListener, useFasta: useFasta);
parser.enableOptionalNewAndConst = true;
- parser.parseGenericMethodComments = true;
CompilationUnit unit = parser.parseCompilationUnit(token);
unit.lineInfo = lineInfo;
@@ -896,7 +894,7 @@
Source fileSource = resource.createSource();
Uri uri = _sourceFactory.restoreUri(fileSource);
Source uriSource = _sourceFactory.forUri2(uri);
- flag = uriSource.fullName == path;
+ flag = uriSource?.fullName == path;
_hasUriForPath[path] = flag;
}
return flag;
diff --git a/pkg/analyzer/lib/src/dart/analysis/frontend_resolution.dart b/pkg/analyzer/lib/src/dart/analysis/frontend_resolution.dart
deleted file mode 100644
index 2d056ef..0000000
--- a/pkg/analyzer/lib/src/dart/analysis/frontend_resolution.dart
+++ /dev/null
@@ -1,602 +0,0 @@
-import 'dart:async';
-import 'dart:convert';
-
-import 'package:analyzer/file_system/file_system.dart';
-import 'package:analyzer/src/dart/analysis/file_state.dart';
-import 'package:analyzer/src/dart/analysis/kernel_metadata.dart';
-import 'package:analyzer/src/fasta/resolution_storer.dart';
-import 'package:analyzer/src/generated/engine.dart';
-import 'package:analyzer/src/generated/sdk.dart';
-import 'package:analyzer/src/generated/source.dart';
-import 'package:front_end/src/api_prototype/byte_store.dart';
-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/api_prototype/file_system.dart' as front_end;
-import 'package:front_end/src/base/libraries_specification.dart';
-import 'package:front_end/src/base/performance_logger.dart';
-import 'package:front_end/src/base/processed_options.dart';
-import 'package:front_end/src/fasta/builder/builder.dart';
-import 'package:front_end/src/fasta/compiler_context.dart';
-import 'package:front_end/src/fasta/dill/dill_target.dart';
-import 'package:front_end/src/fasta/kernel/kernel_shadow_ast.dart';
-import 'package:front_end/src/fasta/kernel/kernel_target.dart';
-import 'package:front_end/src/fasta/kernel/metadata_collector.dart';
-import 'package:front_end/src/fasta/source/diet_listener.dart';
-import 'package:front_end/src/fasta/source/outline_listener.dart';
-import 'package:front_end/src/fasta/source/source_library_builder.dart';
-import 'package:front_end/src/fasta/source/source_loader.dart';
-import 'package:front_end/src/fasta/source/stack_listener.dart';
-import 'package:front_end/src/fasta/target_implementation.dart';
-import 'package:front_end/src/fasta/type_inference/type_inference_engine.dart';
-import 'package:front_end/src/fasta/type_inference/type_inference_listener.dart';
-import 'package:front_end/src/fasta/uri_translator.dart';
-import 'package:front_end/src/fasta/uri_translator_impl.dart';
-import 'package:kernel/class_hierarchy.dart';
-import 'package:kernel/core_types.dart';
-import 'package:kernel/kernel.dart';
-import 'package:kernel/target/targets.dart';
-import 'package:package_config/packages.dart';
-import 'package:package_config/src/packages_impl.dart';
-import 'package:path/path.dart' as pathos;
-
-/// Resolution information in a single function body.
-class CollectedResolution {
- final Map<int, ResolutionData> kernelData = {};
-
- final Map<TypeParameter, int> typeVariableDeclarations =
- new Map<TypeParameter, int>.identity();
-}
-
-/// The compilation result for a single file.
-class FileCompilationResult {
- /// The file system URI of the file.
- final Uri fileUri;
-
- /// The collected resolution for the file.
- final CollectedResolution resolution;
-
- /// The list of all FrontEnd errors in the file.
- final List<CompilationMessage> errors;
-
- FileCompilationResult(this.fileUri, this.resolution, this.errors);
-}
-
-/// The wrapper around FrontEnd compiler that can be used incrementally.
-///
-/// When the client needs the kernel, resolution information, and errors for
-/// a library, it should call [compile]. The compiler will compile the library
-/// and the transitive closure of its dependencies. The results are cached,
-/// so the next invocation for a dependency will be served from the cache.
-///
-/// If a file is changed, [invalidate] should be invoked. This will invalidate
-/// the file, its library, and the transitive closure of dependencies. So, the
-/// next invocation of [compile] will recompile libraries required for the
-/// requested library.
-class FrontEndCompiler {
- static const MSG_PENDING_COMPILE =
- 'A compile() invocation is still executing.';
-
- /// Options used by the kernel compiler.
- final CompilerOptions _compilerOptions;
-
- /// The logger to report compilation progress.
- final PerformanceLog _logger;
-
- /// The [FileSystem] to access file during compilation.
- final front_end.FileSystem _fileSystem;
-
- /// The object that knows how to resolve "package:" and "dart:" URIs.
- final UriTranslator uriTranslator;
-
- /// The listener / recorder for compilation errors produced by the compiler.
- final _ErrorListener _errorListener;
-
- /// Each key is the absolute URI of a library.
- /// Each value is the compilation result of the key library.
- final Map<Uri, LibraryCompilationResult> _results = {};
-
- /// Index of metadata in [_component].
- final AnalyzerMetadataIndex _metadataIndex = new AnalyzerMetadataIndex();
-
- /// The [Component] with currently valid libraries. When a file is invalidated,
- /// we remove the file, its library, and everything affected from [_component].
- Component _component = new Component();
-
- /// The [DillTarget] that is filled with [_component] libraries before
- /// compilation of a new library.
- DillTarget _dillTarget;
-
- /// Each key is the file system URI of a library.
- /// Each value is the libraries that directly depend on the key library.
- final Map<Uri, Set<Uri>> _directLibraryDependencies = {};
-
- /// Each key is the file system URI of a library.
- /// Each value is the [Library] that is still in the [_component].
- final Map<Uri, Library> _uriToLibrary = {};
-
- /// Each key is the file system URI of a part.
- /// Each value is the file system URI of the library that sources the part.
- final Map<Uri, Uri> _partToLibrary = {};
-
- /// Whether [compile] is executing.
- bool _isCompileExecuting = false;
-
- factory FrontEndCompiler(
- PerformanceLog logger,
- ByteStore byteStore,
- AnalysisOptions analysisOptions,
- Folder sdkFolder,
- SourceFactory sourceFactory,
- FileSystemState fsState,
- pathos.Context pathContext) {
- // Prepare SDK libraries.
- Map<String, LibraryInfo> dartLibraries = {};
- {
- DartSdk dartSdk = sourceFactory.dartSdk;
- dartSdk.sdkLibraries.forEach((sdkLibrary) {
- var dartUri = sdkLibrary.shortName;
- var name = Uri.parse(dartUri).path;
- var path = dartSdk.mapDartUri(dartUri).fullName;
- var fileUri = pathContext.toUri(path);
- dartLibraries[name] = new LibraryInfo(name, fileUri, const []);
- });
- }
-
- // Prepare packages.
- Packages packages = Packages.noPackages;
- {
- Map<String, List<Folder>> packageMap = sourceFactory.packageMap;
- if (packageMap != null) {
- var map = <String, Uri>{};
- for (var name in packageMap.keys) {
- map[name] = packageMap[name].first.toUri();
- }
- packages = new MapPackages(map);
- }
- }
-
- // TODO(scheglov) Should we restore this?
-// // Try to find the SDK outline.
-// // It is not used for unit testing, we compile SDK sources.
-// // But for running shared tests we need the patched SDK.
-// List<int> sdkOutlineBytes;
-// if (sdkFolder != null) {
-// try {
-// sdkOutlineBytes = sdkFolder
-// .getChildAssumingFile('vm_platform_strong.dill')
-// .readAsBytesSync();
-// } catch (_) {}
-// }
-
- var uriTranslator = new UriTranslatorImpl(
- new TargetLibrariesSpecification('none', dartLibraries), packages);
- var errorListener = new _ErrorListener();
- var compilerOptions = new CompilerOptions()
- ..target = new _AnalyzerTarget(new TargetFlags(strongMode: true),
- enableSuperMixins: analysisOptions.enableSuperMixins)
- ..reportMessages = false
- ..logger = logger
- ..fileSystem = new _FileSystemAdaptor(fsState, pathContext)
- ..byteStore = byteStore
- ..onError = errorListener.onError;
-
- return new FrontEndCompiler._(
- compilerOptions, uriTranslator, errorListener);
- }
-
- FrontEndCompiler._(
- this._compilerOptions, this.uriTranslator, this._errorListener)
- : _logger = _compilerOptions.logger,
- _fileSystem = _compilerOptions.fileSystem;
-
- /// Compile the library with the given absolute [uri], and everything it
- /// depends on. Return the result of the requested library compilation.
- ///
- /// If there is the cached result for the library (compiled directly, or as
- /// a result of compilation of another library), it will be returned quickly.
- ///
- /// Throw [StateError] if another compilation is pending.
- Future<LibraryCompilationResult> compile(Uri uri) {
- if (_isCompileExecuting) {
- throw new StateError(MSG_PENDING_COMPILE);
- }
- _isCompileExecuting = true;
-
- {
- LibraryCompilationResult result = _results[uri];
- if (result != null) {
- _isCompileExecuting = false;
- return new Future.value(result);
- }
- }
-
- return _runWithFrontEndContext('Compile', uri, (processedOptions) async {
- try {
- // Initialize the dill target once.
- if (_dillTarget == null) {
- _dillTarget = new DillTarget(
- processedOptions.ticker,
- uriTranslator,
- processedOptions.target,
- );
- }
-
- // Append new libraries from the current component.
- await _logger.runAsync('Load dill libraries', () async {
- _dillTarget.loader.appendLibraries(_component,
- filter: (uri) => !_dillTarget.loader.builders.containsKey(uri));
- await _dillTarget.buildOutlines();
- });
-
- // Create the target to compile the library.
- var kernelTarget = new _AnalyzerKernelTarget(_fileSystem, _dillTarget,
- uriTranslator, new AnalyzerMetadataCollector());
- kernelTarget.read(uri);
-
- // Compile the entry point into the new component.
- _component = await _logger.runAsync('Compile', () async {
- await kernelTarget.buildOutlines(nameRoot: _component.root);
- Component newComponent = await kernelTarget.buildComponent();
- if (newComponent != null) {
- _metadataIndex.replaceComponent(newComponent);
- return newComponent;
- } else {
- return _component;
- }
- });
-
- _ShadowCleaner cleaner = new _ShadowCleaner();
- for (var library in _component.libraries) {
- if (!_results.containsKey(library.importUri)) {
- _component.computeCanonicalNamesForLibrary(library);
- library.accept(cleaner);
- }
- }
-
- _logger.run('Compute dependencies', _computeDependencies);
-
- // Add results for new libraries.
- for (var library in _component.libraries) {
- if (!_results.containsKey(library.importUri)) {
- Map<Uri, CollectedResolution> libraryResolutions =
- kernelTarget.resolutions[library.fileUri];
-
- var files = <Uri, FileCompilationResult>{};
-
- void addFileResult(Uri fileUri) {
- if (libraryResolutions != null) {
- files[fileUri] = new FileCompilationResult(
- fileUri,
- libraryResolutions[fileUri] ?? new CollectedResolution(),
- _errorListener.fileUriToErrors[fileUri] ?? []);
- }
- }
-
- addFileResult(library.fileUri);
- for (var part in library.parts) {
- addFileResult(library.fileUri.resolve(part.partUri));
- }
-
- var libraryResult = new LibraryCompilationResult(
- _component, library.importUri, library, files);
- _results[library.importUri] = libraryResult;
- }
- }
- _errorListener.fileUriToErrors.clear();
-
- // The result must have been computed.
- return _results[uri];
- } finally {
- _isCompileExecuting = false;
- }
- });
- }
-
- /// Invalidate the file with the given file [uri], its library and the
- /// transitive the of libraries that use it. The next time when any of these
- /// libraries is be requested in [compile], it will be recompiled again.
- void invalidate(Uri uri) {
- void invalidateLibrary(Uri libraryUri) {
- Library library = _uriToLibrary.remove(libraryUri);
- if (library == null) return;
-
- // Invalidate the library.
- _metadataIndex.invalidate(library);
- _component.libraries.remove(library);
- _component.root.removeChild('${library.importUri}');
- _component.uriToSource.remove(libraryUri);
- _dillTarget.loader.builders.remove(library.importUri);
- _dillTarget.loader.libraries.remove(library);
- _dillTarget.loader.uriToSource.remove(libraryUri);
- _results.remove(library.importUri);
-
- // Recursively invalidate dependencies.
- Set<Uri> directDependencies =
- _directLibraryDependencies.remove(libraryUri);
- directDependencies?.forEach(invalidateLibrary);
- }
-
- Uri libraryUri = _partToLibrary.remove(uri) ?? uri;
- invalidateLibrary(libraryUri);
- }
-
- /// Recompute [_directLibraryDependencies] for the current [_component].
- void _computeDependencies() {
- _directLibraryDependencies.clear();
- _uriToLibrary.clear();
- _partToLibrary.clear();
-
- void processLibrary(Library library) {
- if (_uriToLibrary.containsKey(library.fileUri)) {
- return;
- }
- _uriToLibrary[library.fileUri] = library;
-
- // Remember libraries for parts.
- for (var part in library.parts) {
- _partToLibrary[library.fileUri.resolve(part.partUri)] = library.fileUri;
- }
-
- // Record reverse dependencies.
- for (LibraryDependency dependency in library.dependencies) {
- Library targetLibrary = dependency.targetLibrary;
- _directLibraryDependencies
- .putIfAbsent(targetLibrary.fileUri, () => new Set<Uri>())
- .add(library.fileUri);
- processLibrary(targetLibrary);
- }
- }
-
- // Record dependencies for every library in the component.
- _component.libraries.forEach(processLibrary);
- }
-
- Future<T> _runWithFrontEndContext<T>(
- String msg, Uri input, Future<T> Function(ProcessedOptions) f) async {
- var processedOptions = new ProcessedOptions(_compilerOptions, [input]);
- return await CompilerContext.runWithOptions(processedOptions, (context) {
- context.disableColors();
- return _logger.runAsync(msg, () => f(processedOptions));
- });
- }
-}
-
-/// The compilation result for a single library.
-class LibraryCompilationResult {
- /// The full current [Component]. It has all libraries that are required by
- /// this library, but might also have other libraries, that are not required.
- ///
- /// The object is mutable, and is changed when files are invalidated.
- final Component component;
-
- /// The absolute URI of the library.
- final Uri uri;
-
- /// The kernel [Library] of the library.
- final Library kernel;
-
- /// The map from file system URIs to results for the defining unit and parts.
- final Map<Uri, FileCompilationResult> files;
-
- LibraryCompilationResult(this.component, this.uri, this.kernel, this.files);
-}
-
-/// The [DietListener] that record resolution information.
-class _AnalyzerDietListener extends DietListener {
- final Map<Uri, ResolutionStorer> _storerMap = {};
-
- _AnalyzerDietListener(
- SourceLibraryBuilder library,
- ClassHierarchy hierarchy,
- CoreTypes coreTypes,
- TypeInferenceEngine typeInferenceEngine,
- Map<Uri, CollectedResolution> resolutions)
- : super(library, hierarchy, coreTypes, typeInferenceEngine) {
- for (var fileUri in resolutions.keys) {
- var resolution = resolutions[fileUri];
- _storerMap[fileUri] = new ResolutionStorer(
- resolution.kernelData, resolution.typeVariableDeclarations);
- }
- }
-
- StackListener createListener(
- ModifierBuilder builder, Scope memberScope, bool isInstanceMember,
- [Scope formalParameterScope,
- TypeInferenceListener<int, Node, int> listener]) {
- ResolutionStorer storer = _storerMap[builder.fileUri];
- return super.createListener(
- builder, memberScope, isInstanceMember, formalParameterScope, storer);
- }
-}
-
-/// The [KernelTarget] that records resolution information.
-class _AnalyzerKernelTarget extends KernelTarget {
- final Map<Uri, Map<Uri, CollectedResolution>> resolutions = {};
-
- _AnalyzerKernelTarget(front_end.FileSystem fileSystem, DillTarget dillTarget,
- UriTranslator uriTranslator, MetadataCollector metadataCollector)
- : super(fileSystem, true, dillTarget, uriTranslator,
- metadataCollector: metadataCollector);
-
- @override
- _AnalyzerSourceLoader<Library> createLoader() {
- return new _AnalyzerSourceLoader<Library>(fileSystem, this, resolutions);
- }
-
- @override
- Declaration getAbstractClassInstantiationError(loader) {
- return loader.coreLibrary.getConstructor('Exception');
- }
-
- @override
- Declaration getDuplicatedFieldInitializerError(loader) {
- return loader.coreLibrary.getConstructor('Exception');
- }
-}
-
-/// [OutlineListener] that records resolution.
-class _AnalyzerOutlineListener implements OutlineListener {
- final Uri fileUri;
- final CollectedResolution resolution;
-
- _AnalyzerOutlineListener(this.fileUri, this.resolution);
-
- @override
- void store(int offset, bool isSynthetic,
- {int importIndex,
- bool isNamespaceCombinatorReference = false,
- Node reference,
- DartType type}) {
-// if (fileUri.toString().endsWith('test.dart')) {
-// print('[store][offset: $offset][reference: $reference][type: $type]');
-// }
- var encodedLocation = 2 * offset + (isSynthetic ? 1 : 0);
- resolution.kernelData[encodedLocation] = new ResolutionData(
- isNamespaceCombinatorReference: isNamespaceCombinatorReference,
- isOutline: true,
- prefixInfo: importIndex,
- reference: reference,
- inferredType: type);
- }
-}
-
-/// The [SourceLoader] that record resolution information.
-class _AnalyzerSourceLoader<L> extends SourceLoader<L> {
- final Map<Uri, CollectedResolution> _fileResolutions = {};
- final Map<Uri, Map<Uri, CollectedResolution>> _resolutions;
-
- _AnalyzerSourceLoader(front_end.FileSystem fileSystem,
- TargetImplementation target, this._resolutions)
- : super(fileSystem, true, target);
-
- @override
- _AnalyzerDietListener createDietListener(SourceLibraryBuilder library) {
- var libraryResolutions = <Uri, CollectedResolution>{};
- libraryResolutions[library.fileUri] = _fileResolution(library.fileUri);
- for (var part in library.parts) {
- libraryResolutions[part.fileUri] = _fileResolution(part.fileUri);
- }
- _resolutions[library.fileUri] = libraryResolutions;
-
- return new _AnalyzerDietListener(
- library, hierarchy, coreTypes, typeInferenceEngine, libraryResolutions);
- }
-
- @override
- OutlineListener createOutlineListener(Uri fileUri) {
- var resolution = _fileResolution(fileUri);
- return new _AnalyzerOutlineListener(fileUri, resolution);
- }
-
- @override
- Severity rewriteSeverity(severity, message, fileUri) => severity;
-
- CollectedResolution _fileResolution(Uri fileUri) {
- CollectedResolution resolution = _fileResolutions[fileUri];
- if (resolution == null) {
- resolution = new CollectedResolution();
- _fileResolutions[fileUri] = resolution;
- }
- return resolution;
- }
-}
-
-/**
- * [Target] for static analysis, with all features enabled.
- */
-class _AnalyzerTarget extends NoneTarget {
- @override
- bool enableSuperMixins;
-
- _AnalyzerTarget(TargetFlags flags, {this.enableSuperMixins = false})
- : super(flags);
-
- @override
- List<String> get extraRequiredLibraries => const <String>['dart:_internal'];
-
- @override
- bool enableNative(Uri uri) => true;
-}
-
-/// The listener for [CompilationMessage]s from FrontEnd.
-class _ErrorListener {
- final Map<Uri, List<CompilationMessage>> fileUriToErrors = {};
-
- void onError(CompilationMessage error) {
- var fileUri = error.span.sourceUrl;
- fileUriToErrors.putIfAbsent(fileUri, () => []).add(error);
- }
-}
-
-/// Adapter of [FileSystemState] to [front_end.FileSystem].
-class _FileSystemAdaptor implements front_end.FileSystem {
- final FileSystemState fsState;
- final pathos.Context pathContext;
-
- _FileSystemAdaptor(this.fsState, this.pathContext);
-
- @override
- front_end.FileSystemEntity entityForUri(Uri uri) {
- if (uri.isScheme('file')) {
- var path = pathContext.fromUri(uri);
- var file = fsState.getFileForPath(path);
- return new _FileSystemEntityAdaptor(uri, file);
- } else {
- throw new front_end.FileSystemException(
- uri, 'Only file:// URIs are supported, but $uri is given.');
- }
- }
-}
-
-/// Adapter of [FileState] to [front_end.FileSystemEntity].
-class _FileSystemEntityAdaptor implements front_end.FileSystemEntity {
- final Uri uri;
- final FileState file;
-
- _FileSystemEntityAdaptor(this.uri, this.file);
-
- @override
- Future<bool> exists() async {
- return file.exists;
- }
-
- @override
- Future<List<int>> readAsBytes() async {
- _throwIfDoesNotExist();
- // TODO(scheglov) Optimize.
- return utf8.encode(file.content);
- }
-
- @override
- Future<String> readAsString() async {
- _throwIfDoesNotExist();
- return file.content;
- }
-
- void _throwIfDoesNotExist() {
- if (!file.exists) {
- throw new front_end.FileSystemException(uri, 'File not found');
- }
- }
-}
-
-/// Visitor that removes from shadow AST information that is not needed once
-/// resolution is done, and causes memory leaks during incremental compilation.
-class _ShadowCleaner extends RecursiveVisitor {
- @override
- visitField(Field node) {
- if (node is ShadowField) {
- node.inferenceNode = null;
- node.typeInferrer = null;
- }
- return super.visitField(node);
- }
-
- @override
- visitProcedure(Procedure node) {
- if (node is ShadowProcedure) {
- node.inferenceNode = null;
- }
- return super.visitProcedure(node);
- }
-}
diff --git a/pkg/analyzer/lib/src/dart/analysis/index.dart b/pkg/analyzer/lib/src/dart/analysis/index.dart
index 13153c0..1afbb1d 100644
--- a/pkg/analyzer/lib/src/dart/analysis/index.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/index.dart
@@ -627,6 +627,13 @@
}
@override
+ visitOnClause(OnClause node) {
+ for (TypeName typeName in node.superclassConstraints) {
+ recordSuperType(typeName, IndexRelationKind.IS_IMPLEMENTED_BY);
+ }
+ }
+
+ @override
visitPartDirective(PartDirective node) {
CompilationUnitElement element = node.element;
if (element?.source != null) {
diff --git a/pkg/analyzer/lib/src/dart/analysis/kernel_context.dart b/pkg/analyzer/lib/src/dart/analysis/kernel_context.dart
deleted file mode 100644
index fdf172c..0000000
--- a/pkg/analyzer/lib/src/dart/analysis/kernel_context.dart
+++ /dev/null
@@ -1,184 +0,0 @@
-// 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 'dart:async';
-
-import 'package:analyzer/dart/analysis/declared_variables.dart';
-import 'package:analyzer/dart/element/element.dart' show CompilationUnitElement;
-import 'package:analyzer/src/context/context.dart';
-import 'package:analyzer/src/dart/analysis/file_state.dart';
-import 'package:analyzer/src/dart/analysis/frontend_resolution.dart';
-import 'package:analyzer/src/dart/element/element.dart';
-import 'package:analyzer/src/dart/element/handle.dart';
-import 'package:analyzer/src/generated/engine.dart'
- show AnalysisContext, AnalysisEngine, AnalysisOptions;
-import 'package:analyzer/src/generated/source.dart';
-import 'package:analyzer/src/kernel/resynthesize.dart';
-import 'package:front_end/src/base/performance_logger.dart';
-import 'package:front_end/src/base/resolve_relative_uri.dart';
-import 'package:kernel/ast.dart' as kernel;
-import 'package:kernel/text/ast_to_text.dart' as kernel;
-
-/**
- * Support for resynthesizing element model from Kernel.
- */
-class KernelContext {
- /**
- * The [AnalysisContext] which is used to do the analysis.
- */
- final AnalysisContext analysisContext;
-
- /**
- * The resynthesizer that resynthesizes elements in [analysisContext].
- */
- final ElementResynthesizer resynthesizer;
-
- KernelContext._(this.analysisContext, this.resynthesizer);
-
- /**
- * Computes a [CompilationUnitElement] for the given library/unit pair.
- */
- CompilationUnitElement computeUnitElement(
- Source librarySource, Source unitSource) {
- String libraryUri = librarySource.uri.toString();
- String unitUri = unitSource.uri.toString();
- return resynthesizer.getElement(
- new ElementLocationImpl.con3(<String>[libraryUri, unitUri]));
- }
-
- /**
- * Cleans up any persistent resources used by this [KernelContext].
- *
- * Should be called once the [KernelContext] is no longer needed.
- */
- void dispose() {
- analysisContext.dispose();
- }
-
- /**
- * Return `true` if the given [uri] is known to be a library.
- */
- bool isLibraryUri(Uri uri) {
- // TODO(scheglov) implement
- return true;
-// String uriStr = uri.toString();
-// return store.unlinkedMap[uriStr]?.isPartOf == false;
- }
-
- static KernelResynthesizer buildResynthesizer(
- FileSystemState fsState,
- LibraryCompilationResult libraryResult,
- AnalysisContextImpl analysisContext) {
- // Remember Kernel libraries produced by the compiler.
- // There might be more libraries than we actually need.
- // This is probably OK, because we consume them lazily.
- var fileInfoMap = <String, KernelFileInfo>{};
-
- void addFileInfo(FileState file, {kernel.Library library}) {
- String uriStr = file.uriStr;
- if (!fileInfoMap.containsKey(uriStr)) {
- fileInfoMap[file.uriStr] = new KernelFileInfo(
- file?.exists ?? false,
- file?.content?.length ?? 0,
- file?.lineInfo ?? new LineInfo([0]),
- library);
- }
- }
-
- bool coreFound = false;
- for (var library in libraryResult.component.libraries) {
- String uriStr = library.importUri.toString();
- if (uriStr == 'dart:core') {
- coreFound = true;
- }
- FileState file = fsState.getFileForUri(library.importUri);
- addFileInfo(file, library: library);
- for (var part in library.parts) {
- var relativePartUri = Uri.parse(part.partUri);
- var partUri = resolveRelativeUri(library.importUri, relativePartUri);
- FileState partFile = fsState.getFileForUri(partUri);
- addFileInfo(partFile);
- }
- }
- if (!coreFound) {
- throw new StateError('No dart:core library found (dartbug.com/33686)');
- }
-
- // Create the resynthesizer bound to the analysis context.
- var resynthesizer = new KernelResynthesizer(analysisContext, fileInfoMap);
- return resynthesizer;
- }
-
- /**
- * Create a [KernelContext] which is prepared to analyze [targetLibrary].
- */
- static Future<KernelContext> forSingleLibrary(
- FileState targetLibrary,
- PerformanceLog logger,
- AnalysisOptions analysisOptions,
- DeclaredVariables declaredVariables,
- SourceFactory sourceFactory,
- FileSystemState fsState,
- FrontEndCompiler compiler) async {
- // TODO(brianwilkerson) Determine whether this await is necessary.
- await null;
- return logger.runAsync('Create kernel context', () async {
- Uri targetUri = targetLibrary.uri;
- LibraryCompilationResult libraryResult =
- await compiler.compile(targetUri);
-
- // Create and configure a new context.
- AnalysisContextImpl analysisContext =
- AnalysisEngine.instance.createAnalysisContext();
- analysisContext.useSdkCachePartition = false;
- analysisContext.analysisOptions = analysisOptions;
- analysisContext.declaredVariables = declaredVariables;
- analysisContext.sourceFactory = sourceFactory.clone();
- analysisContext.contentCache = new _ContentCacheWrapper(fsState);
-
- KernelResynthesizer resynthesizer =
- buildResynthesizer(fsState, libraryResult, analysisContext);
- return new KernelContext._(analysisContext, resynthesizer);
- });
- }
-}
-
-/**
- * [ContentCache] wrapper around [FileContentOverlay].
- */
-class _ContentCacheWrapper implements ContentCache {
- final FileSystemState fsState;
-
- _ContentCacheWrapper(this.fsState);
-
- @override
- void accept(ContentCacheVisitor visitor) {
- throw new UnimplementedError();
- }
-
- @override
- String getContents(Source source) {
- return _getFileForSource(source).content;
- }
-
- @override
- bool getExists(Source source) {
- return _getFileForSource(source).exists;
- }
-
- @override
- int getModificationStamp(Source source) {
- return _getFileForSource(source).exists ? 0 : -1;
- }
-
- @override
- String setContents(Source source, String contents) {
- throw new UnimplementedError();
- }
-
- FileState _getFileForSource(Source source) {
- String path = source.fullName;
- return fsState.getFileForPath(path);
- }
-}
diff --git a/pkg/analyzer/lib/src/dart/analysis/kernel_metadata.dart b/pkg/analyzer/lib/src/dart/analysis/kernel_metadata.dart
deleted file mode 100644
index 59be9f0..0000000
--- a/pkg/analyzer/lib/src/dart/analysis/kernel_metadata.dart
+++ /dev/null
@@ -1,225 +0,0 @@
-// 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 'dart:convert';
-
-import 'package:front_end/src/fasta/builder/qualified_name.dart';
-import 'package:front_end/src/fasta/kernel/metadata_collector.dart';
-import 'package:front_end/src/incremental/kernel_driver.dart';
-import 'package:kernel/kernel.dart' as kernel;
-
-/// Additional information that Analyzer needs for nodes.
-class AnalyzerMetadata {
- /// The offset of the beginning of the node code.
- int codeOffset = -1;
-
- /// The length of the node code.
- int codeLength = 0;
-
- /// If the node is a named constructor, the offset of the name.
- /// Otherwise `-1`.
- int constructorNameOffset = -1;
-
- /// Optional documentation comment, may be `null`.
- String documentationComment;
-
- /// If the node is an import library dependency, the offset of the prefix.
- /// Otherwise `-1`.
- int importPrefixOffset = -1;
-
- /// Return the [AnalyzerMetadata] for the [node], or `null` absent.
- static AnalyzerMetadata forNode(kernel.TreeNode node) {
- var repository =
- node.enclosingComponent.metadata[AnalyzerMetadataRepository.TAG];
- if (repository != null) {
- return repository.mapping[node];
- }
- return null;
- }
-}
-
-/// Analyzer specific implementation of [MetadataCollector].
-class AnalyzerMetadataCollector implements MetadataCollector {
- @override
- final AnalyzerMetadataRepository repository =
- new AnalyzerMetadataRepository();
-
- @override
- void setCodeStartEnd(kernel.TreeNode node, int start, int end) {
- var metadata = repository._forWriting(node);
- metadata.codeOffset = start;
- metadata.codeLength = end - start;
- }
-
- @override
- void setConstructorNameOffset(kernel.Member node, Object name) {
- if (name is QualifiedName) {
- var metadata = repository._forWriting(node);
- metadata.constructorNameOffset = name.charOffset;
- }
- }
-
- @override
- void setDocumentationComment(kernel.NamedNode node, String comment) {
- var metadata = repository._forWriting(node);
- metadata.documentationComment = comment;
- }
-
- @override
- void setImportPrefixOffset(kernel.LibraryDependency node, int offset) {
- var metadata = repository._forWriting(node);
- metadata.importPrefixOffset = offset;
- }
-}
-
-/// Factory for creating Analyzer specific sink and repository.
-class AnalyzerMetadataFactory implements MetadataFactory {
- @override
- int get version => 1;
-
- @override
- MetadataCollector newCollector() {
- return new AnalyzerMetadataCollector();
- }
-
- @override
- kernel.MetadataRepository newRepositoryForReading() {
- return new AnalyzerMetadataRepository();
- }
-}
-
-/// Index of metadata.
-class AnalyzerMetadataIndex {
- final Map<kernel.Library, List<kernel.TreeNode>> libraryNodes = {};
- AnalyzerMetadataRepository repository;
-
- /// The [library] was invalidated, flush its metadata.
- void invalidate(kernel.Library library) {
- var nodes = libraryNodes.remove(library);
- nodes?.forEach(repository.mapping.remove);
- }
-
- /// A [newComponent] has been compiled, with new, and only new, metadata.
- /// Merge the existing [repository] into the new one, and replace it.
- void replaceComponent(kernel.Component newComponent) {
- AnalyzerMetadataRepository newRepository =
- newComponent.metadata[AnalyzerMetadataRepository.TAG];
- if (newRepository != null) {
- _indexNewMetadata(newRepository);
- if (repository != null) {
- // Copy the new (partial) metadata into the existing metadata repository
- // and replace the reference to the partial data with the full data.
- repository.mapping.addAll(newRepository.mapping);
- newComponent.metadata[AnalyzerMetadataRepository.TAG] = repository;
- } else {
- repository = newRepository;
- }
- } else {
- newComponent.metadata[AnalyzerMetadataRepository.TAG] = repository;
- }
- }
-
- void _indexNewMetadata(AnalyzerMetadataRepository newRepository) {
- for (var node in newRepository.mapping.keys) {
- var library = _enclosingLibrary(node);
- assert(library != null);
-
- var nodes = libraryNodes[library];
- if (nodes == null) {
- nodes = <kernel.TreeNode>[];
- libraryNodes[library] = nodes;
- }
-
- nodes.add(node);
- }
- }
-
- static kernel.Library _enclosingLibrary(kernel.TreeNode node) {
- for (; node != null; node = node.parent) {
- if (node is kernel.Library) {
- return node;
- }
- }
- return null;
- }
-}
-
-/// Analyzer specific implementation of [kernel.MetadataRepository].
-class AnalyzerMetadataRepository
- implements kernel.MetadataRepository<AnalyzerMetadata> {
- static const TAG = 'kernel.metadata.analyzer';
-
- @override
- final String tag = TAG;
-
- @override
- final Map<kernel.TreeNode, AnalyzerMetadata> mapping =
- <kernel.TreeNode, AnalyzerMetadata>{};
-
- @override
- AnalyzerMetadata readFromBinary(
- kernel.Node node, kernel.BinarySource source) {
- return new AnalyzerMetadata()
- ..codeOffset = _readOffset(source)
- ..codeLength = _readLength(source)
- ..constructorNameOffset = _readOffset(source)
- ..documentationComment = _readOptionalString(source)
- ..importPrefixOffset = _readOffset(source);
- }
-
- @override
- void writeToBinary(
- AnalyzerMetadata metadata, kernel.Node node, kernel.BinarySink sink) {
- _writeOffset(sink, metadata.codeOffset);
- _writeLength(sink, metadata.codeLength);
- _writeOffset(sink, metadata.constructorNameOffset);
- _writeOptionalString(sink, metadata.documentationComment);
- _writeOffset(sink, metadata.importPrefixOffset);
- }
-
- /// Return the existing or new [AnalyzerMetadata] instance for the [node].
- AnalyzerMetadata _forWriting(kernel.TreeNode node) {
- return mapping[node] ??= new AnalyzerMetadata();
- }
-
- int _readLength(kernel.BinarySource source) {
- return source.readUint32();
- }
-
- int _readOffset(kernel.BinarySource source) {
- return source.readUint32() - 1;
- }
-
- String _readOptionalString(kernel.BinarySource source) {
- int flag = source.readByte();
- if (flag == 1) {
- List<int> bytes = source.readByteList();
- return utf8.decode(bytes);
- } else {
- return null;
- }
- }
-
- /// The [length] value must be `>= 0`.
- void _writeLength(kernel.BinarySink sink, int length) {
- assert(length >= 0);
- sink.writeUInt32(length);
- }
-
- /// The [offset] value must be `>= -1`.
- void _writeOffset(kernel.BinarySink sink, int offset) {
- assert(offset >= -1);
- sink.writeUInt32(1 + offset);
- }
-
- void _writeOptionalString(kernel.BinarySink sink, String str) {
- if (str != null) {
- sink.writeByte(1);
- List<int> bytes = utf8.encode(str);
- sink.writeByteList(bytes);
- } else {
- sink.writeByte(0);
- }
- }
-}
diff --git a/pkg/analyzer/lib/src/dart/analysis/library_analyzer.dart b/pkg/analyzer/lib/src/dart/analysis/library_analyzer.dart
index d5a934b..c2c7f2c 100644
--- a/pkg/analyzer/lib/src/dart/analysis/library_analyzer.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/library_analyzer.dart
@@ -8,53 +8,39 @@
import 'package:analyzer/dart/ast/ast.dart';
import 'package:analyzer/dart/ast/visitor.dart';
import 'package:analyzer/dart/element/element.dart';
-import 'package:analyzer/dart/element/type.dart';
import 'package:analyzer/error/error.dart';
import 'package:analyzer/error/listener.dart';
import 'package:analyzer/src/context/context.dart';
import 'package:analyzer/src/dart/analysis/file_state.dart';
-import 'package:analyzer/src/dart/analysis/frontend_resolution.dart';
import 'package:analyzer/src/dart/ast/ast.dart';
import 'package:analyzer/src/dart/ast/utilities.dart';
import 'package:analyzer/src/dart/constant/evaluation.dart';
import 'package:analyzer/src/dart/constant/utilities.dart';
import 'package:analyzer/src/dart/element/element.dart';
import 'package:analyzer/src/dart/element/handle.dart';
-import 'package:analyzer/src/dart/element/member.dart';
import 'package:analyzer/src/error/codes.dart';
import 'package:analyzer/src/error/pending_error.dart';
-import 'package:analyzer/src/fasta/error_converter.dart';
-import 'package:analyzer/src/fasta/resolution_applier.dart';
-import 'package:analyzer/src/fasta/resolution_storer.dart' as kernel;
import 'package:analyzer/src/generated/declaration_resolver.dart';
import 'package:analyzer/src/generated/engine.dart';
import 'package:analyzer/src/generated/error_verifier.dart';
import 'package:analyzer/src/generated/resolver.dart';
import 'package:analyzer/src/generated/source.dart';
-import 'package:analyzer/src/kernel/resynthesize.dart';
import 'package:analyzer/src/lint/linter.dart';
import 'package:analyzer/src/lint/linter_visitor.dart';
import 'package:analyzer/src/services/lint.dart';
import 'package:analyzer/src/task/dart.dart';
import 'package:analyzer/src/task/strong/checker.dart';
-import 'package:front_end/src/base/performance_logger.dart';
import 'package:front_end/src/dependency_walker.dart';
-import 'package:kernel/kernel.dart' as kernel;
-import 'package:kernel/type_algebra.dart' as kernel;
/**
* Analyzer of a single library.
*/
class LibraryAnalyzer {
- final PerformanceLog _logger;
final AnalysisOptions _analysisOptions;
final DeclaredVariables _declaredVariables;
final SourceFactory _sourceFactory;
final FileState _library;
- final bool _useCFE;
- final FrontEndCompiler _frontEndCompiler;
-
final bool Function(Uri) _isLibraryUri;
final AnalysisContextImpl _context;
final ElementResynthesizer _resynthesizer;
@@ -73,19 +59,14 @@
final List<ConstantEvaluationTarget> _constants = [];
LibraryAnalyzer(
- this._logger,
this._analysisOptions,
this._declaredVariables,
this._sourceFactory,
this._isLibraryUri,
this._context,
this._resynthesizer,
- this._library,
- {bool useCFE: false,
- FrontEndCompiler frontEndCompiler})
- : _typeProvider = _context.typeProvider,
- _useCFE = useCFE,
- _frontEndCompiler = frontEndCompiler;
+ this._library)
+ : _typeProvider = _context.typeProvider;
/**
* Compute analysis results for all units of the library.
@@ -94,13 +75,7 @@
// TODO(brianwilkerson) Determine whether this await is necessary.
await null;
return PerformanceStatistics.analysis.makeCurrentWhileAsync(() async {
- // TODO(brianwilkerson) Determine whether this await is necessary.
- await null;
- if (_useCFE) {
- return await _analyze2();
- } else {
- return _analyze();
- }
+ return _analyze();
});
}
@@ -180,105 +155,6 @@
return results;
}
- Future<Map<FileState, UnitAnalysisResult>> _analyze2() async {
- return await _logger.runAsync('Analyze', () async {
- Map<FileState, CompilationUnit> units = {};
-
- // Parse all files.
- _logger.run('Parse units', () {
- units[_library] = _parse(_library);
- for (FileState part in _library.partedFiles) {
- units[part] = _parse(part);
- }
- });
-
- // Resolve URIs in directives to corresponding sources.
- units.forEach((file, unit) {
- _resolveUriBasedDirectives(file, unit);
- });
-
- try {
- _libraryElement = _resynthesizer
- .getElement(new ElementLocationImpl.con3([_library.uriStr]));
-
- _resolveDirectives(units);
-
- var libraryResult = await _logger.runAsync('Compile library', () {
- return _frontEndCompiler.compile(_library.uri);
- });
-
- _logger.run('Apply resolution', () {
- units.forEach((file, unit) {
- var resolution = libraryResult.files[file.fileUri].resolution;
-
- _resolveFile2(file, unit, resolution);
- _computePendingMissingRequiredParameters(file, unit);
-
- // Invalid part URIs can result in an element with a null source
- if (unit.declaredElement.source != null) {
- var reporter = new FastaErrorReporter(_getErrorReporter(file));
- var fileResult = libraryResult.files[file.fileUri];
- if (fileResult?.errors != null) {
- for (var error in fileResult.errors) {
- reporter.reportCompilationMessage(error);
- }
- }
- }
- });
- });
-
- units.values.forEach(_findConstants);
- _computeConstants();
-
- units.forEach((file, unit) {
- ErrorReporter errorReporter = _getErrorReporter(file);
- _computeConstantErrors(errorReporter, unit);
- });
-
- if (_analysisOptions.hint) {
- PerformanceStatistics.hints.makeCurrentWhile(() {
- units.forEach((file, unit) {
- {
- var visitor =
- new GatherUsedLocalElementsVisitor(_libraryElement);
- unit.accept(visitor);
- _usedLocalElementsList.add(visitor.usedElements);
- }
- {
- var visitor =
- new GatherUsedImportedElementsVisitor(_libraryElement);
- unit.accept(visitor);
- _usedImportedElementsList.add(visitor.usedElements);
- }
- });
- units.forEach((file, unit) {
- _computeHints(file, unit);
- });
- });
- }
-
- if (_analysisOptions.lint) {
- PerformanceStatistics.lints.makeCurrentWhile(() {
- units.forEach((file, unit) {
- _computeLints(file, unit);
- });
- });
- }
- } finally {
- _context.dispose();
- }
-
- // Return full results.
- Map<FileState, UnitAnalysisResult> results = {};
- units.forEach((file, unit) {
- List<AnalysisError> errors = _getErrorListener(file).errors;
- errors = _filterIgnoredErrors(file, errors);
- results[file] = new UnitAnalysisResult(file, unit, errors);
- });
- return results;
- });
- }
-
void _computeConstantErrors(
ErrorReporter errorReporter, CompilationUnit unit) {
ConstantVerifier constantVerifier = new ConstantVerifier(
@@ -536,8 +412,7 @@
* Return a new parsed unresolved [CompilationUnit].
*/
CompilationUnit _parse(FileState file) {
- AnalysisErrorListener errorListener =
- _useCFE ? AnalysisErrorListener.NULL_LISTENER : _getErrorListener(file);
+ AnalysisErrorListener errorListener = _getErrorListener(file);
String content = file.content;
CompilationUnit unit = file.parse(errorListener);
@@ -553,22 +428,11 @@
definingCompilationUnit.element = _libraryElement.definingCompilationUnit;
bool matchNodeElement(Directive node, Element element) {
- if (_useCFE) {
- return node.keyword.offset == element.nameOffset;
- } else {
- return node.offset == element.nameOffset;
- }
+ return node.offset == element.nameOffset;
}
ErrorReporter libraryErrorReporter = _getErrorReporter(_library);
- void reportErrorReportedByFrontEnd(
- ErrorCode errorCode, AstNode node, List<Object> arguments) {
- if (!_useCFE) {
- libraryErrorReporter.reportErrorForNode(errorCode, node, arguments);
- }
- }
-
LibraryIdentifier libraryNameNode = null;
var seenPartSources = new Set<Source>();
var directivesToResolve = <Directive>[];
@@ -624,7 +488,7 @@
// Validate that the part source is unique in the library.
//
if (!seenPartSources.add(partSource)) {
- reportErrorReportedByFrontEnd(
+ libraryErrorReporter.reportErrorForNode(
CompileTimeErrorCode.DUPLICATE_PART, partUri, [partSource.uri]);
}
@@ -636,16 +500,18 @@
_NameOrSource nameOrSource = _getPartLibraryNameOrUri(
partSource, partUnit, directivesToResolve);
if (nameOrSource == null) {
- reportErrorReportedByFrontEnd(CompileTimeErrorCode.PART_OF_NON_PART,
- partUri, [partUri.toSource()]);
+ libraryErrorReporter.reportErrorForNode(
+ CompileTimeErrorCode.PART_OF_NON_PART,
+ partUri,
+ [partUri.toSource()]);
} else {
String name = nameOrSource.name;
if (name != null) {
if (libraryNameNode == null) {
- reportErrorReportedByFrontEnd(
+ libraryErrorReporter.reportErrorForNode(
ResolverErrorCode.PART_OF_UNNAMED_LIBRARY, partUri, [name]);
} else if (libraryNameNode.name != name) {
- reportErrorReportedByFrontEnd(
+ libraryErrorReporter.reportErrorForNode(
StaticWarningCode.PART_OF_DIFFERENT_LIBRARY,
partUri,
[libraryNameNode.name, name]);
@@ -653,7 +519,7 @@
} else {
Source source = nameOrSource.source;
if (source != _library.source) {
- reportErrorReportedByFrontEnd(
+ libraryErrorReporter.reportErrorForNode(
StaticWarningCode.PART_OF_DIFFERENT_LIBRARY,
partUri,
[_library.uriStr, source.uri]);
@@ -728,143 +594,6 @@
_libraryElement, source, _typeProvider, errorListener));
}
- void _resolveFile2(FileState file, CompilationUnitImpl unit,
- CollectedResolution resolution) {
- CompilationUnitElement unitElement = unit.declaredElement;
- new DeclarationResolver(useCFE: true).resolve(unit, unitElement);
-
- var applierContext = new _ResolutionApplierContext(_resynthesizer,
- _typeProvider, _libraryElement, resolution, unit.localDeclarations);
- var applier = applierContext.applier;
-
- for (var directive in unit.directives) {
- if (directive.metadata.isNotEmpty) {
- applier.applyToAnnotations(directive);
- }
- if (directive is NamespaceDirective) {
- directive.combinators.accept(applier);
- }
- }
- for (var declaration in unit.declarations) {
- if (declaration is ClassDeclaration) {
- if (declaration.metadata.isNotEmpty) {
- applier.applyToAnnotations(declaration);
- }
-
- var context = declaration.declaredElement as ClassElementImpl;
- applierContext.setContext(context);
- declaration.typeParameters?.accept(applier);
- declaration.extendsClause?.accept(applier);
- declaration.withClause?.accept(applier);
- declaration.implementsClause?.accept(applier);
-
- for (var member in declaration.members) {
- if (member is ConstructorDeclaration) {
- var context = member.declaredElement as ConstructorElementImpl;
- applierContext.setContext(context);
- ConstructorName redirectName = member.redirectedConstructor;
- if (redirectName != null) {
- var redirectedConstructor = context.redirectedConstructor;
- redirectName.staticElement = redirectedConstructor;
- // TODO(scheglov) Support for import prefix?
- if (redirectedConstructor != null) {
- DeclarationResolver.applyConstructorElement(
- _libraryElement,
- null,
- redirectedConstructor,
- redirectedConstructor.returnType,
- redirectName);
- }
- // TODO(scheglov) Add support for type parameterized redirects.
- // Annotations are stored separately for each formal parameter.
- for (var parameter in member.parameters.parameters) {
- if (parameter.metadata.isNotEmpty) {
- parameter.metadata.accept(applier);
- }
- }
- } else {
- member.initializers.accept(applier);
- member.parameters.accept(applier);
- member.body.accept(applier);
- applier.applyToAnnotations(member);
- }
- } else if (member is FieldDeclaration) {
- VariableDeclarationList fieldList = member.fields;
- List<VariableDeclaration> fields = fieldList.variables;
- var element = fields[0].declaredElement;
- var context = (element.initializer ?? element) as ElementImpl;
- applierContext.setContext(context);
- fieldList.type?.accept(applier);
- for (var field in fields.reversed) {
- field.initializer?.accept(applier);
- if (element is ConstVariableElement) {
- (element as ConstVariableElement).constantInitializer =
- field.initializer;
- }
- }
- applier.applyToAnnotations(member);
- } else if (member is MethodDeclaration) {
- ExecutableElementImpl context = member.declaredElement;
- applierContext.setContext(context);
- member.typeParameters?.accept(applier);
- member.returnType?.accept(applier);
- member.parameters?.accept(applier);
- member.body.accept(applier);
- applier.applyToAnnotations(member);
- } else {
- throw new StateError('(${declaration.runtimeType}) $declaration');
- }
- }
- } else if (declaration is ClassTypeAlias) {
- applierContext.setContext(declaration.declaredElement);
- declaration.typeParameters?.accept(applier);
- declaration.superclass.accept(applier);
- declaration.withClause?.accept(applier);
- declaration.implementsClause?.accept(applier);
- } else if (declaration is EnumDeclaration) {
- // No bodies to resolve.
- } else if (declaration is FunctionDeclaration) {
- var context = declaration.declaredElement as ExecutableElementImpl;
- applierContext.setContext(context);
- declaration.returnType?.accept(applier);
- declaration.functionExpression.typeParameters?.accept(applier);
- declaration.functionExpression.parameters?.accept(applier);
- declaration.functionExpression.body.accept(applier);
- applier.applyToAnnotations(declaration);
- } else if (declaration is FunctionTypeAlias) {
- applierContext.setContext(declaration.declaredElement);
- declaration.typeParameters?.accept(applier);
- declaration.returnType?.accept(applier);
- } else if (declaration is GenericTypeAlias) {
- declaration.typeParameters?.accept(applier);
- GenericFunctionType functionType = declaration.functionType;
- if (functionType != null) {
- applierContext.setContext(functionType.type.element);
- functionType.typeParameters?.accept(applier);
- functionType.returnType?.accept(applier);
- }
- } else if (declaration is TopLevelVariableDeclaration) {
- VariableDeclarationList variableList = declaration.variables;
- List<VariableDeclaration> variables = variableList.variables;
- var element = variables[0].declaredElement;
- var context = (element.initializer ?? element) as ElementImpl;
- applierContext.setContext(context);
- variableList.type?.accept(applier);
- for (var variable in variables.reversed) {
- variable.initializer?.accept(applier);
- var element = variable.declaredElement;
- if (element is ConstVariableElement) {
- (element as ConstVariableElement).constantInitializer =
- variable.initializer;
- }
- }
- applier.applyToAnnotations(declaration);
- } else {
- throw new StateError('(${declaration.runtimeType}) $declaration');
- }
- }
- }
-
/**
* Return the result of resolve the given [uriContent], reporting errors
* against the [uriLiteral].
@@ -1045,174 +774,3 @@
_NameOrSource(this.name, this.source);
}
-
-/// Concrete implementation of [TypeContext].
-class _ResolutionApplierContext implements TypeContext {
- final KernelResynthesizer resynthesizer;
- final TypeProvider typeProvider;
- final LibraryElement libraryElement;
- final CollectedResolution resolution;
- final Map<int, AstNode> localDeclarations;
-
- @override
- ClassElement enclosingClassElement;
-
- List<ElementImpl> contextStack = [];
- ElementImpl context;
-
- ResolutionApplier applier;
-
- _ResolutionApplierContext(this.resynthesizer, this.typeProvider,
- this.libraryElement, this.resolution, this.localDeclarations) {
- applier =
- new ResolutionApplier(libraryElement, this, resolution.kernelData);
- }
-
- @override
- DartType get stringType => typeProvider.stringType;
-
- @override
- DartType get typeType => typeProvider.typeType;
-
- @override
- void encloseVariable(ElementImpl element) {
- context.encloseElement(element);
- }
-
- @override
- void enterLocalFunction(FunctionTypedElementImpl element) {
- context.encloseElement(element);
-
- // The function is the new resolution context.
- contextStack.add(context);
- context = element;
- }
-
- @override
- void exitLocalFunction(FunctionTypedElementImpl element) {
- assert(identical(context, element));
- context = contextStack.removeLast();
- }
-
- void setContext(ElementImpl context) {
- this.context = context;
- for (Element element = context;
- element != null;
- element = element.enclosingElement) {
- if (element is ClassElement) {
- enclosingClassElement = element;
- break;
- }
- }
- }
-
- @override
- Element translateDeclaration(int declarationOffset) {
- if (declarationOffset == null) return null;
- var declaration = localDeclarations[declarationOffset];
- Element element;
- if (declaration is VariableDeclaration) {
- element = declaration.declaredElement;
- } else if (declaration is FormalParameter) {
- element = declaration.declaredElement;
- } else if (declaration is DeclaredSimpleIdentifier) {
- element = declaration.staticElement;
- } else if (declaration is FunctionDeclaration) {
- element = declaration.declaredElement;
- } else if (declaration is TypeParameter) {
- element = declaration.declaredElement;
- } else {
- throw new UnimplementedError('${declaration.runtimeType}');
- }
- assert(element != null);
- return element;
- }
-
- @override
- PrefixElement translatePrefixInfo(int importIndex) {
- if (importIndex == null) return null;
- return libraryElement.imports[importIndex].prefix;
- }
-
- @override
- Element translateReference(kernel.Node referencedNode,
- {bool isNamespaceCombinatorReference = false,
- bool isTypeReference = false,
- bool isWriteReference = false,
- kernel.DartType inferredType,
- kernel.DartType receiverType}) {
- if (referencedNode == null) {
- if (isTypeReference && inferredType is kernel.DynamicType) {
- return typeProvider.dynamicType.element;
- }
- return null;
- }
- Element element;
- if (referencedNode is kernel.NamedNode) {
- element = resynthesizer
- .getElementFromCanonicalName(referencedNode.canonicalName);
- } else if (referencedNode is kernel.FunctionType) {
- element = resynthesizer
- .getElementFromCanonicalName(referencedNode.typedef.canonicalName);
- assert(element != null);
- } else if (referencedNode is kernel.InterfaceType) {
- element = resynthesizer
- .getElementFromCanonicalName(referencedNode.classNode.canonicalName);
- assert(element != null);
- } else if (referencedNode is kernel.TypeParameterType) {
- element =
- resynthesizer.getTypeParameter(context, referencedNode.parameter);
- assert(element != null);
- } else if (referencedNode is kernel.DynamicType) {
- element = DynamicElementImpl.instance;
- } else if (referencedNode is kernel.TypeParameter) {
- element = resynthesizer.getTypeParameter(context, referencedNode);
- } else if (referencedNode is kernel.InvalidType) {
- element = DynamicElementImpl.instance;
- } else {
- throw new UnimplementedError(
- 'TODO(paulberry): ${referencedNode.runtimeType}');
- }
- if (isNamespaceCombinatorReference) {
- return element;
- }
- if (element is PropertyInducingElement) {
- PropertyInducingElement property = element;
- element = isWriteReference ? property.setter : property.getter;
- }
- if (element is ConstructorElement &&
- inferredType is kernel.InterfaceType &&
- inferredType.typeArguments.isNotEmpty) {
- InterfaceType type = translateType(inferredType);
- return ConstructorMember.from(element, type);
- }
- if (receiverType is kernel.InterfaceType &&
- receiverType.typeArguments.isNotEmpty) {
- InterfaceType type = translateType(receiverType);
- if (element is MethodElement) {
- return MethodMember.from(element, type);
- }
- if (element is PropertyAccessorElement) {
- return PropertyAccessorMember.from(element, type);
- }
- }
- return element;
- }
-
- @override
- DartType translateType(kernel.DartType kernelType) {
- if (kernelType == null) {
- return null;
- } else if (kernelType is kernel.TypeArgumentsDartType) {
- // TODO(paulberry): get rid of this case
- List<kernel.DartType> kernelTypes = kernelType.types;
- var types = new List<DartType>(kernelTypes.length);
- for (var i = 0; i < kernelTypes.length; i++) {
- types[i] = translateType(kernelTypes[i]);
- }
- return new TypeArgumentsDartType(types);
- } else {
- return resynthesizer.getType(context, kernelType);
- }
- }
-}
diff --git a/pkg/analyzer/lib/src/dart/analysis/library_context.dart b/pkg/analyzer/lib/src/dart/analysis/library_context.dart
index 53a8b68..7988281 100644
--- a/pkg/analyzer/lib/src/dart/analysis/library_context.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/library_context.dart
@@ -122,7 +122,7 @@
}, (String uri) {
UnlinkedUnit unlinkedUnit = store.unlinkedMap[uri];
return unlinkedUnit;
- }, (_) => null, true);
+ }, (_) => null);
logger.writeln('Linked ${linkedLibraries.length} bundles.');
});
diff --git a/pkg/analyzer/lib/src/dart/analysis/search.dart b/pkg/analyzer/lib/src/dart/analysis/search.dart
index 61ace7d..b998712 100644
--- a/pkg/analyzer/lib/src/dart/analysis/search.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/search.dart
@@ -40,6 +40,7 @@
final int codeOffset;
final int codeLength;
final String className;
+ final String mixinName;
final String parameters;
Declaration(
@@ -52,6 +53,7 @@
this.codeOffset,
this.codeLength,
this.className,
+ this.mixinName,
this.parameters);
}
@@ -69,6 +71,7 @@
FUNCTION_TYPE_ALIAS,
GETTER,
METHOD,
+ MIXIN,
SETTER,
VARIABLE
}
@@ -82,7 +85,7 @@
Search(this._driver);
/**
- * Returns class members with the given [name].
+ * Returns class or mixin members with the given [name].
*/
Future<List<Element>> classMembers(String name) async {
// TODO(brianwilkerson) Determine whether this await is necessary.
@@ -95,15 +98,18 @@
}
}
+ void addElements(ClassElement element) {
+ element.accessors.forEach(addElement);
+ element.fields.forEach(addElement);
+ element.methods.forEach(addElement);
+ }
+
List<String> files = await _driver.getFilesDefiningClassMemberName(name);
for (String file in files) {
UnitElementResult unitResult = await _driver.getUnitElement(file);
if (unitResult != null) {
- for (ClassElement clazz in unitResult.element.types) {
- clazz.accessors.forEach(addElement);
- clazz.fields.forEach(addElement);
- clazz.methods.forEach(addElement);
- }
+ unitResult.element.types.forEach(addElements);
+ unitResult.element.mixins.forEach(addElements);
}
}
return elements;
@@ -161,7 +167,7 @@
void addDeclaration(String name, DeclarationKind kind, int offset,
int codeOffset, int codeLength,
- {String className, String parameters}) {
+ {String className, String mixinName, String parameters}) {
if (maxResults != null && declarations.length >= maxResults) {
throw const _MaxNumberOfDeclarationsError();
}
@@ -189,6 +195,7 @@
codeOffset,
codeLength,
className,
+ mixinName,
parameters));
}
@@ -208,22 +215,17 @@
return getParametersString(executable.parameters);
}
- for (var class_ in unlinkedUnit.classes) {
- String className = class_.name;
- addDeclaration(
- className,
- class_.isMixinApplication
- ? DeclarationKind.CLASS_TYPE_ALIAS
- : DeclarationKind.CLASS,
- class_.nameOffset,
- class_.codeRange.offset,
- class_.codeRange.length);
+ void addUnlinkedClass(UnlinkedClass class_, DeclarationKind kind,
+ {String className, String mixinName}) {
+ addDeclaration(class_.name, kind, class_.nameOffset,
+ class_.codeRange.offset, class_.codeRange.length);
+
parameterComposer.outerTypeParameters = class_.typeParameters;
for (var field in class_.fields) {
addDeclaration(field.name, DeclarationKind.FIELD, field.nameOffset,
field.codeRange.offset, field.codeRange.length,
- className: className);
+ className: className, mixinName: mixinName);
}
for (var executable in class_.executables) {
@@ -235,6 +237,7 @@
executable.codeRange.offset,
executable.codeRange.length,
className: className,
+ mixinName: mixinName,
parameters: getExecutableParameters(executable));
parameterComposer.innerTypeParameters = const [];
}
@@ -242,6 +245,17 @@
parameterComposer.outerTypeParameters = const [];
}
+ for (var class_ in unlinkedUnit.classes) {
+ var kind = class_.isMixinApplication
+ ? DeclarationKind.CLASS_TYPE_ALIAS
+ : DeclarationKind.CLASS;
+ addUnlinkedClass(class_, kind, className: class_.name);
+ }
+
+ for (var mixin in unlinkedUnit.mixins) {
+ addUnlinkedClass(mixin, DeclarationKind.MIXIN, mixinName: mixin.name);
+ }
+
for (var enum_ in unlinkedUnit.enums) {
addDeclaration(enum_.name, DeclarationKind.ENUM, enum_.nameOffset,
enum_.codeRange.offset, enum_.codeRange.length);
@@ -428,6 +442,7 @@
unitElement.enums.forEach(addElement);
unitElement.functions.forEach(addElement);
unitElement.functionTypeAliases.forEach(addElement);
+ unitElement.mixins.forEach(addElement);
unitElement.topLevelVariables.forEach(addElement);
unitElement.types.forEach(addElement);
}
diff --git a/pkg/analyzer/lib/src/dart/ast/ast.dart b/pkg/analyzer/lib/src/dart/ast/ast.dart
index c655ac4..573adfe 100644
--- a/pkg/analyzer/lib/src/dart/ast/ast.dart
+++ b/pkg/analyzer/lib/src/dart/ast/ast.dart
@@ -7816,8 +7816,7 @@
..add(rightBracket);
@override
-// MixinElement get declaredElement => _name?.staticElement as MixinElement;
- Element get declaredElement => throw new UnimplementedError();
+ ClassElement get declaredElement => _name?.staticElement as ClassElement;
@deprecated
@override
diff --git a/pkg/analyzer/lib/src/dart/constant/value.dart b/pkg/analyzer/lib/src/dart/constant/value.dart
index 15dc365..3e444e6 100644
--- a/pkg/analyzer/lib/src/dart/constant/value.dart
+++ b/pkg/analyzer/lib/src/dart/constant/value.dart
@@ -2243,10 +2243,10 @@
int rightValue = rightOperand.value;
if (rightValue == null) {
return UNKNOWN_VALUE;
- } else if (rightValue == 0) {
- return new DoubleState(value.toDouble() % rightValue.toDouble());
}
- return new IntState(value.remainder(rightValue));
+ if (rightValue != 0) {
+ return new IntState(value % rightValue);
+ }
} else if (rightOperand is DoubleState) {
double rightValue = rightOperand.value;
if (rightValue == null) {
@@ -2273,7 +2273,9 @@
} else if (rightValue.bitLength > 31) {
return UNKNOWN_VALUE;
}
- return new IntState(value << rightValue);
+ if (rightValue >= 0) {
+ return new IntState(value << rightValue);
+ }
} else if (rightOperand is DynamicState || rightOperand is NumState) {
return UNKNOWN_VALUE;
}
@@ -2294,7 +2296,9 @@
} else if (rightValue.bitLength > 31) {
return UNKNOWN_VALUE;
}
- return new IntState(value >> rightValue);
+ if (rightValue >= 0) {
+ return new IntState(value >> rightValue);
+ }
} else if (rightOperand is DynamicState || rightOperand is NumState) {
return UNKNOWN_VALUE;
}
diff --git a/pkg/analyzer/lib/src/dart/element/builder.dart b/pkg/analyzer/lib/src/dart/element/builder.dart
index 236e332..567dd7c 100644
--- a/pkg/analyzer/lib/src/dart/element/builder.dart
+++ b/pkg/analyzer/lib/src/dart/element/builder.dart
@@ -82,25 +82,8 @@
}
}
- ElementHolder holder = new ElementHolder();
- //
- // Process field declarations before constructors and methods so that field
- // formal parameters can be correctly resolved to their fields.
- //
- ElementHolder previousHolder = _currentHolder;
- _currentHolder = holder;
- try {
- List<ClassMember> nonFields = new List<ClassMember>();
- node.visitChildren(
- new _ElementBuilder_visitClassDeclaration(this, nonFields));
- _buildFieldMap(holder.fieldsWithoutFlushing);
- int count = nonFields.length;
- for (int i = 0; i < count; i++) {
- nonFields[i].accept(this);
- }
- } finally {
- _currentHolder = previousHolder;
- }
+ ElementHolder holder = _buildClassMembers(node);
+
SimpleIdentifier className = node.name;
ClassElementImpl element = new ClassElementImpl.forNode(className);
_setCodeRange(element, node);
@@ -603,6 +586,26 @@
}
@override
+ Object visitMixinDeclaration(MixinDeclaration node) {
+ ElementHolder holder = _buildClassMembers(node);
+
+ SimpleIdentifier nameNode = node.name;
+ MixinElementImpl element = new MixinElementImpl.forNode(nameNode);
+ _setCodeRange(element, node);
+ element.metadata = _createElementAnnotations(node.metadata);
+ element.typeParameters = holder.typeParameters;
+ setElementDocumentationComment(element, node);
+ element.accessors = holder.accessors;
+ element.constructors = holder.constructors;
+ element.fields = holder.fields;
+ element.methods = holder.methods;
+ _currentHolder.addMixin(element);
+ nameNode.staticElement = element;
+ holder.validate();
+ return null;
+ }
+
+ @override
Object visitPartDirective(PartDirective node) {
List<ElementAnnotation> annotations =
_createElementAnnotations(node.metadata);
@@ -694,6 +697,29 @@
return null;
}
+ ElementHolder _buildClassMembers(AstNode classNode) {
+ ElementHolder holder = new ElementHolder();
+ //
+ // Process field declarations before constructors and methods so that field
+ // formal parameters can be correctly resolved to their fields.
+ //
+ ElementHolder previousHolder = _currentHolder;
+ _currentHolder = holder;
+ try {
+ List<ClassMember> nonFields = new List<ClassMember>();
+ classNode.visitChildren(
+ new _ClassNotExecutableElementsBuilder(this, nonFields));
+ _buildFieldMap(holder.fieldsWithoutFlushing);
+ int count = nonFields.length;
+ for (int i = 0; i < count; i++) {
+ nonFields[i].accept(this);
+ }
+ } finally {
+ _currentHolder = previousHolder;
+ }
+ return holder;
+ }
+
/**
* Build the table mapping field names to field elements for the [fields]
* defined in the current class.
@@ -783,6 +809,7 @@
element.functions = holder.functions;
element.source = source;
element.librarySource = librarySource;
+ element.mixins = holder.mixins;
element.typeAliases = holder.typeAliases;
element.types = holder.types;
element.topLevelVariables = holder.topLevelVariables;
@@ -1667,12 +1694,14 @@
}
}
-class _ElementBuilder_visitClassDeclaration extends UnifyingAstVisitor<Object> {
+/**
+ * Builds elements for all node that are not constructors or methods.
+ */
+class _ClassNotExecutableElementsBuilder extends UnifyingAstVisitor<Object> {
final ApiElementBuilder builder;
+ final List<ClassMember> nonFields;
- List<ClassMember> nonFields;
-
- _ElementBuilder_visitClassDeclaration(this.builder, this.nonFields) : super();
+ _ClassNotExecutableElementsBuilder(this.builder, this.nonFields);
@override
Object visitConstructorDeclaration(ConstructorDeclaration node) {
diff --git a/pkg/analyzer/lib/src/dart/element/element.dart b/pkg/analyzer/lib/src/dart/element/element.dart
index 73e23a7..e3c4b49 100644
--- a/pkg/analyzer/lib/src/dart/element/element.dart
+++ b/pkg/analyzer/lib/src/dart/element/element.dart
@@ -10,7 +10,6 @@
import 'package:analyzer/dart/constant/value.dart';
import 'package:analyzer/dart/element/element.dart';
import 'package:analyzer/dart/element/type.dart';
-import 'package:analyzer/src/dart/analysis/kernel_metadata.dart';
import 'package:analyzer/src/dart/ast/utilities.dart';
import 'package:analyzer/src/dart/constant/value.dart';
import 'package:analyzer/src/dart/element/handle.dart';
@@ -29,8 +28,6 @@
import 'package:analyzer/src/generated/utilities_general.dart';
import 'package:analyzer/src/summary/idl.dart';
import 'package:analyzer/src/task/dart.dart';
-import 'package:kernel/kernel.dart' as kernel;
-import 'package:kernel/type_algebra.dart' as kernel;
/**
* Assert that the given [object] is null, which in the places where this
@@ -72,12 +69,6 @@
AbstractClassElementImpl(String name, int offset) : super(name, offset);
/**
- * Initialize for resynthesizing from kernel.
- */
- AbstractClassElementImpl.forKernel(CompilationUnitElementImpl enclosingUnit)
- : super.forKernel(enclosingUnit);
-
- /**
* Initialize a newly created class element to have the given [name].
*/
AbstractClassElementImpl.forNode(Identifier name) : super.forNode(name);
@@ -451,26 +442,11 @@
final UnlinkedClass _unlinkedClass;
/**
- * The kernel of the element.
- */
- final kernel.Class _kernel;
-
- /**
* If this class is resynthesized, whether it has a constant constructor.
*/
bool _hasConstConstructorCached;
/**
- * The actual supertype extracted from desugared [_kernel].
- */
- kernel.Supertype _kernelSupertype;
-
- /**
- * The mixed-in types extracted from desugared [_kernel].
- */
- List<kernel.Supertype> _kernelMixins;
-
- /**
* The superclass of the class, or `null` for [Object].
*/
InterfaceType _supertype;
@@ -521,23 +497,13 @@
*/
ClassElementImpl(String name, int offset)
: _unlinkedClass = null,
- _kernel = null,
super(name, offset);
/**
- * Initialize using the given kernel.
- */
- ClassElementImpl.forKernel(
- CompilationUnitElementImpl enclosingUnit, this._kernel)
- : _unlinkedClass = null,
- super.forKernel(enclosingUnit);
-
- /**
* Initialize a newly created class element to have the given [name].
*/
ClassElementImpl.forNode(Identifier name)
: _unlinkedClass = null,
- _kernel = null,
super.forNode(name);
/**
@@ -545,8 +511,7 @@
*/
ClassElementImpl.forSerialized(
this._unlinkedClass, CompilationUnitElementImpl enclosingUnit)
- : _kernel = null,
- super.forSerialized(enclosingUnit);
+ : super.forSerialized(enclosingUnit);
/**
* Set whether this class is abstract.
@@ -559,7 +524,7 @@
@override
List<PropertyAccessorElement> get accessors {
if (_accessors == null) {
- if (_kernel != null || _unlinkedClass != null) {
+ if (_unlinkedClass != null) {
_resynthesizeFieldsAndPropertyAccessors();
}
}
@@ -581,10 +546,6 @@
@override
int get codeLength {
- if (_kernel != null) {
- var metadata = AnalyzerMetadata.forNode(_kernel);
- return metadata?.codeLength;
- }
if (_unlinkedClass != null) {
return _unlinkedClass.codeRange?.length;
}
@@ -593,10 +554,6 @@
@override
int get codeOffset {
- if (_kernel != null) {
- var metadata = AnalyzerMetadata.forNode(_kernel);
- return metadata?.codeOffset;
- }
if (_unlinkedClass != null) {
return _unlinkedClass.codeRange?.offset;
}
@@ -608,17 +565,6 @@
if (isMixinApplication) {
return _computeMixinAppConstructors();
}
- if (_kernel != null && _constructors == null) {
- var constructors = _kernel.constructors
- .map((k) => new ConstructorElementImpl.forKernel(this, k, null));
- var factories = _kernel.procedures
- .where((k) => k.isFactory)
- .map((k) => new ConstructorElementImpl.forKernel(this, null, k));
- _constructors = <ConstructorElement>[]
- ..addAll(constructors)
- ..addAll(factories);
- _constructors.sort((a, b) => a.nameOffset - b.nameOffset);
- }
if (_unlinkedClass != null && _constructors == null) {
_constructors = _unlinkedClass.executables
.where((e) => e.kind == UnlinkedExecutableKind.constructor)
@@ -652,10 +598,6 @@
@override
String get documentationComment {
- if (_kernel != null) {
- var metadata = AnalyzerMetadata.forNode(_kernel);
- return metadata?.documentationComment;
- }
if (_unlinkedClass != null) {
return _unlinkedClass.documentationComment?.text;
}
@@ -712,7 +654,7 @@
@override
List<FieldElement> get fields {
if (_fields == null) {
- if (_kernel != null || _unlinkedClass != null) {
+ if (_unlinkedClass != null) {
_resynthesizeFieldsAndPropertyAccessors();
}
}
@@ -810,10 +752,6 @@
@override
List<InterfaceType> get interfaces {
if (_interfaces == null) {
- if (_kernel != null) {
- var context = enclosingUnit._kernelContext;
- _interfaces = context.getInterfaceTypes(this, _kernel.implementedTypes);
- }
if (_unlinkedClass != null) {
ResynthesizerContext context = enclosingUnit.resynthesizerContext;
_interfaces = _unlinkedClass.interfaces
@@ -833,9 +771,6 @@
@override
bool get isAbstract {
- if (_kernel != null) {
- return _kernel.isAbstract;
- }
if (_unlinkedClass != null) {
return _unlinkedClass.isAbstract;
}
@@ -844,9 +779,6 @@
@override
bool get isMixinApplication {
- if (_kernel != null) {
- return _kernel.mixedInType != null;
- }
if (_unlinkedClass != null) {
return _unlinkedClass.isMixinApplication;
}
@@ -886,14 +818,7 @@
}
@override
- List<kernel.TypeParameter> get kernelTypeParams => _kernel?.typeParameters;
-
- @override
List<ElementAnnotation> get metadata {
- if (_kernel != null) {
- _metadata ??=
- enclosingUnit._kernelContext.buildAnnotations(_kernel.annotations);
- }
if (_unlinkedClass != null) {
return _metadata ??=
_buildAnnotations(enclosingUnit, _unlinkedClass.annotations);
@@ -903,15 +828,6 @@
@override
List<MethodElement> get methods {
- if (_kernel != null) {
- _methods ??= _kernel.procedures
- .where((k) =>
- !k.isSyntheticForwarder &&
- (k.kind == kernel.ProcedureKind.Method ||
- k.kind == kernel.ProcedureKind.Operator))
- .map((k) => new MethodElementImpl.forKernel(this, k))
- .toList(growable: false);
- }
if (_unlinkedClass != null) {
_methods ??= _unlinkedClass.executables
.where((e) => e.kind == UnlinkedExecutableKind.functionOrMethod)
@@ -943,11 +859,6 @@
@override
List<InterfaceType> get mixins {
if (_mixins == null) {
- if (_kernel != null) {
- _initializeKernelMixins();
- var context = enclosingUnit._kernelContext;
- _mixins = context.getInterfaceTypes(this, _kernelMixins);
- }
if (_unlinkedClass != null) {
ResynthesizerContext context = enclosingUnit.resynthesizerContext;
_mixins = _unlinkedClass.mixins
@@ -962,20 +873,16 @@
void set mixins(List<InterfaceType> mixins) {
_assertNotResynthesized(_unlinkedClass);
- // 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) {
+ // Note: if we are using 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) {
_mixins = mixins;
}
}
@override
String get name {
- if (_kernel != null) {
- return _kernel.name;
- }
if (_unlinkedClass != null) {
return _unlinkedClass.name;
}
@@ -994,16 +901,6 @@
@override
InterfaceType get supertype {
if (_supertype == null) {
- if (_kernel != null) {
- _initializeKernelMixins();
- if (_kernelSupertype != null) {
- _supertype = enclosingUnit._kernelContext
- .getInterfaceType(this, _kernelSupertype);
- _supertype ??= context.typeProvider.objectType;
- } else {
- return null;
- }
- }
if (_unlinkedClass != null) {
if (_unlinkedClass.supertype != null) {
DartType type = enclosingUnit.resynthesizerContext
@@ -1071,9 +968,6 @@
bool get _hasConstConstructor {
if (_hasConstConstructorCached == null) {
_hasConstConstructorCached = false;
- if (_kernel != null) {
- _hasConstConstructorCached = _kernel.constructors.any((c) => c.isConst);
- }
if (_unlinkedClass != null) {
_hasConstConstructorCached = _unlinkedClass.executables.any(
(c) => c.kind == UnlinkedExecutableKind.constructor && c.isConst);
@@ -1278,32 +1172,10 @@
}
/**
- * Extract actual supertypes and mixed-in types from [_kernel].
+ * Return `true` if the given [type] is a class [InterfaceType].
*/
- void _initializeKernelMixins() {
- if (_kernelSupertype == null) {
- _kernelMixins = <kernel.Supertype>[];
- kernel.Supertype supertype = _kernel.supertype;
- if (supertype != null) {
- if (_kernel.mixedInType != null) {
- _kernelMixins.add(_kernel.mixedInType);
- }
- while (supertype.classNode.isAnonymousMixin) {
- var superNode = supertype.classNode;
- var substitute = kernel.Substitution.fromSupertype(supertype);
-
- var superMixin = superNode.mixedInType;
- if (superMixin != null) {
- var thisMixin = substitute.substituteSupertype(superMixin);
- _kernelMixins.add(thisMixin);
- }
-
- supertype = substitute.substituteSupertype(superNode.supertype);
- }
- _kernelMixins = _kernelMixins.reversed.toList();
- }
- _kernelSupertype = supertype;
- }
+ bool _isClassInterfaceType(DartType type) {
+ return type is InterfaceType && !type.element.isEnum;
}
/**
@@ -1317,93 +1189,46 @@
var implicitAccessors = <PropertyAccessorElement>[];
var explicitAccessors = <PropertyAccessorElement>[];
var implicitFields = <String, FieldElementImpl>{};
- if (_kernel != null) {
- // Build explicit fields and implicit property accessors.
- for (var k in _kernel.fields) {
- if (k.name.name.startsWith('_redirecting#')) {
- continue;
- }
- var field = new FieldElementImpl.forKernelFactory(this, k);
- explicitFields.add(field);
+
+ // Build explicit fields and implicit property accessors.
+ for (UnlinkedVariable v in _unlinkedClass.fields) {
+ FieldElementImpl field =
+ new FieldElementImpl.forSerializedFactory(v, this);
+ explicitFields.add(field);
+ implicitAccessors.add(
+ new PropertyAccessorElementImpl_ImplicitGetter(field)
+ ..enclosingElement = this);
+ if (!field.isConst && !field.isFinal) {
implicitAccessors.add(
- new PropertyAccessorElementImpl_ImplicitGetter(field)
+ new PropertyAccessorElementImpl_ImplicitSetter(field)
..enclosingElement = this);
- if (!field.isConst && !field.isFinal) {
- implicitAccessors.add(
- new PropertyAccessorElementImpl_ImplicitSetter(field)
- ..enclosingElement = this);
- }
}
- // Build explicit property accessors and implicit fields.
- for (var k in _kernel.procedures) {
- if (k.isForwardingStub) continue;
- bool isGetter = k.kind == kernel.ProcedureKind.Getter;
- bool isSetter = k.kind == kernel.ProcedureKind.Setter;
- if (isGetter || isSetter) {
- var accessor = new PropertyAccessorElementImpl.forKernel(this, k);
- explicitAccessors.add(accessor);
- // Create or update the implicit field.
- String fieldName = accessor.displayName;
- FieldElementImpl field = implicitFields[fieldName];
- if (field == null) {
- field = new FieldElementImpl(fieldName, -1);
- implicitFields[fieldName] = field;
- field.enclosingElement = this;
- field.isSynthetic = true;
- field.isFinal = isGetter;
- field.isStatic = k.isStatic;
- } else {
- field.isFinal = false;
- }
- accessor.variable = field;
- if (isGetter) {
- field.getter = accessor;
- } else {
- field.setter = accessor;
- }
+ }
+ // Build explicit property accessors and implicit fields.
+ for (UnlinkedExecutable e in _unlinkedClass.executables) {
+ if (e.kind == UnlinkedExecutableKind.getter ||
+ e.kind == UnlinkedExecutableKind.setter) {
+ PropertyAccessorElementImpl accessor =
+ new PropertyAccessorElementImpl.forSerialized(e, this);
+ explicitAccessors.add(accessor);
+ // Create or update the implicit field.
+ String fieldName = accessor.displayName;
+ FieldElementImpl field = implicitFields[fieldName];
+ if (field == null) {
+ field = new FieldElementImpl(fieldName, -1);
+ implicitFields[fieldName] = field;
+ field.enclosingElement = this;
+ field.isSynthetic = true;
+ field.isFinal = e.kind == UnlinkedExecutableKind.getter;
+ field.isStatic = e.isStatic;
+ } else {
+ field.isFinal = false;
}
- }
- } else {
- // Build explicit fields and implicit property accessors.
- for (UnlinkedVariable v in _unlinkedClass.fields) {
- FieldElementImpl field =
- new FieldElementImpl.forSerializedFactory(v, this);
- explicitFields.add(field);
- implicitAccessors.add(
- new PropertyAccessorElementImpl_ImplicitGetter(field)
- ..enclosingElement = this);
- if (!field.isConst && !field.isFinal) {
- implicitAccessors.add(
- new PropertyAccessorElementImpl_ImplicitSetter(field)
- ..enclosingElement = this);
- }
- }
- // Build explicit property accessors and implicit fields.
- for (UnlinkedExecutable e in _unlinkedClass.executables) {
- if (e.kind == UnlinkedExecutableKind.getter ||
- e.kind == UnlinkedExecutableKind.setter) {
- PropertyAccessorElementImpl accessor =
- new PropertyAccessorElementImpl.forSerialized(e, this);
- explicitAccessors.add(accessor);
- // Create or update the implicit field.
- String fieldName = accessor.displayName;
- FieldElementImpl field = implicitFields[fieldName];
- if (field == null) {
- field = new FieldElementImpl(fieldName, -1);
- implicitFields[fieldName] = field;
- field.enclosingElement = this;
- field.isSynthetic = true;
- field.isFinal = e.kind == UnlinkedExecutableKind.getter;
- field.isStatic = e.isStatic;
- } else {
- field.isFinal = false;
- }
- accessor.variable = field;
- if (e.kind == UnlinkedExecutableKind.getter) {
- field.getter = accessor;
- } else {
- field.setter = accessor;
- }
+ accessor.variable = field;
+ if (e.kind == UnlinkedExecutableKind.getter) {
+ field.getter = accessor;
+ } else {
+ field.setter = accessor;
}
}
}
@@ -1480,13 +1305,6 @@
}
return null;
}
-
- /**
- * Return `true` if the given [type] is a class [InterfaceType].
- */
- static bool _isClassInterfaceType(DartType type) {
- return type is InterfaceType && !type.element.isEnum;
- }
}
/**
@@ -1511,11 +1329,6 @@
final UnlinkedPart _unlinkedPart;
/**
- * The kernel context in which the unit is resynthesized.
- */
- final KernelUnitResynthesizerContext _kernelContext;
-
- /**
* The source that corresponds to this compilation unit.
*/
@override
@@ -1558,13 +1371,18 @@
List<FunctionElement> _functions;
/**
+ * A list containing all of the mixins contained in this compilation unit.
+ */
+ List<ClassElement> _mixins;
+
+ /**
* A list containing all of the function type aliases contained in this
* compilation unit.
*/
List<FunctionTypeAliasElement> _typeAliases;
/**
- * A list containing all of the types contained in this compilation unit.
+ * A list containing all of the classes contained in this compilation unit.
*/
List<ClassElement> _types;
@@ -1599,24 +1417,9 @@
: resynthesizerContext = null,
_unlinkedUnit = null,
_unlinkedPart = null,
- _kernelContext = null,
super(name, -1);
/**
- * Initialize using the given kernel information.
- */
- CompilationUnitElementImpl.forKernel(
- LibraryElementImpl enclosingLibrary, this._kernelContext, String name)
- : resynthesizerContext = null,
- _unlinkedUnit = null,
- _unlinkedPart = null,
- super.forKernel(null) {
- _enclosingElement = enclosingLibrary;
- _name = name;
- _nameOffset = -1;
- }
-
- /**
* Initialize using the given serialized information.
*/
CompilationUnitElementImpl.forSerialized(
@@ -1625,8 +1428,7 @@
this._unlinkedUnit,
this._unlinkedPart,
String name)
- : _kernelContext = null,
- super.forSerialized(null) {
+ : super.forSerialized(null) {
_enclosingElement = enclosingLibrary;
_name = name;
_nameOffset = -1;
@@ -1635,10 +1437,6 @@
@override
List<PropertyAccessorElement> get accessors {
if (_accessors == null) {
- if (_kernelContext != null) {
- _explicitTopLevelAccessors ??= _kernelContext.buildTopLevelAccessors();
- _explicitTopLevelVariables ??= _kernelContext.buildTopLevelVariables();
- }
if (_unlinkedUnit != null) {
_explicitTopLevelAccessors ??=
resynthesizerContext.buildTopLevelAccessors();
@@ -1692,12 +1490,6 @@
@override
List<ClassElement> get enums {
- if (_kernelContext != null) {
- _enums ??= _kernelContext.kernelUnit.classes
- .where((k) => k.isEnum)
- .map((k) => new EnumElementImpl.forKernel(this, k))
- .toList(growable: false);
- }
if (_unlinkedUnit != null) {
_enums ??= _unlinkedUnit.enums
.map((e) => new EnumElementImpl.forSerialized(e, this))
@@ -1719,13 +1511,6 @@
@override
List<FunctionElement> get functions {
- if (_kernelContext != null) {
- _functions ??= _kernelContext.kernelUnit.procedures
- .where((k) => k.kind == kernel.ProcedureKind.Method)
- .where((k) => !k.name.name.startsWith('__loadLibrary_'))
- .map((k) => new FunctionElementImpl.forKernel(this, k))
- .toList(growable: false);
- }
if (_unlinkedUnit != null) {
_functions ??= _unlinkedUnit.executables
.where((e) => e.kind == UnlinkedExecutableKind.functionOrMethod)
@@ -1748,11 +1533,6 @@
@override
List<FunctionTypeAliasElement> get functionTypeAliases {
- if (_kernelContext != null) {
- _typeAliases ??= _kernelContext.kernelUnit.typedefs
- .map((k) => new GenericTypeAliasElementImpl.forKernel(this, k))
- .toList(growable: false);
- }
if (_unlinkedUnit != null) {
_typeAliases ??= _unlinkedUnit.typedefs.map((t) {
return new GenericTypeAliasElementImpl.forSerialized(t, this);
@@ -1784,10 +1564,6 @@
@override
List<ElementAnnotation> get metadata {
if (_metadata == null) {
- if (_kernelContext != null) {
- return _metadata = _kernelContext
- .buildAnnotations(_kernelContext.kernelUnit.annotations);
- }
if (_unlinkedPart != null) {
return _metadata = _buildAnnotations(
library.definingCompilationUnit as CompilationUnitElementImpl,
@@ -1798,12 +1574,29 @@
}
@override
+ List<ClassElement> get mixins {
+ if (_unlinkedUnit != null) {
+ _mixins ??= _unlinkedUnit.mixins
+ .map((c) => new MixinElementImpl.forSerialized(c, this))
+ .toList(growable: false);
+ }
+ return _mixins ?? const <ClassElement>[];
+ }
+
+ /**
+ * Set the mixins contained in this compilation unit to the given [mixins].
+ */
+ void set mixins(List<ClassElement> mixins) {
+ _assertNotResynthesized(_unlinkedUnit);
+ for (MixinElementImpl type in mixins) {
+ type.enclosingElement = this;
+ }
+ this._mixins = mixins;
+ }
+
+ @override
List<TopLevelVariableElement> get topLevelVariables {
if (_variables == null) {
- if (_kernelContext != null) {
- _explicitTopLevelAccessors ??= _kernelContext.buildTopLevelAccessors();
- _explicitTopLevelVariables ??= _kernelContext.buildTopLevelVariables();
- }
if (_unlinkedUnit != null) {
_explicitTopLevelAccessors ??=
resynthesizerContext.buildTopLevelAccessors();
@@ -1861,12 +1654,6 @@
@override
List<ClassElement> get types {
- if (_kernelContext != null) {
- _types ??= _kernelContext.kernelUnit.classes
- .where((k) => !k.isEnum && !k.isAnonymousMixin)
- .map((k) => new ClassElementImpl.forKernel(this, k))
- .toList(growable: false);
- }
if (_unlinkedUnit != null) {
_types ??= _unlinkedUnit.classes
.map((c) => new ClassElementImpl.forSerialized(c, this))
@@ -1989,7 +1776,7 @@
*/
void replaceTopLevelVariable(
TopLevelVariableElement from, TopLevelVariableElement to) {
- if (_kernelContext != null || _unlinkedUnit != null) {
+ if (_unlinkedUnit != null) {
// Getters and setter in different units should be patched to use the
// same variables before these variables were asked and returned.
assert(_variables == null);
@@ -2018,6 +1805,7 @@
safelyVisitChildren(enums, visitor);
safelyVisitChildren(functions, visitor);
safelyVisitChildren(functionTypeAliases, visitor);
+ safelyVisitChildren(mixins, visitor);
safelyVisitChildren(types, visitor);
safelyVisitChildren(topLevelVariables, visitor);
}
@@ -2051,13 +1839,6 @@
ConstFieldElementImpl(String name, int offset) : super(name, offset);
/**
- * Initialize using the given kernel.
- */
- ConstFieldElementImpl.forKernel(
- ElementImpl enclosingElement, kernel.Field kernel)
- : super.forKernel(enclosingElement, kernel);
-
- /**
* Initialize a newly created field element to have the given [name].
*/
ConstFieldElementImpl.forNode(Identifier name) : super.forNode(name);
@@ -2075,19 +1856,14 @@
*/
class ConstFieldElementImpl_EnumValue extends ConstFieldElementImpl_ofEnum {
final UnlinkedEnumValue _unlinkedEnumValue;
- final kernel.Field _kernelEnumValue;
final int _index;
- ConstFieldElementImpl_EnumValue(EnumElementImpl enumElement,
- this._unlinkedEnumValue, this._kernelEnumValue, this._index)
+ ConstFieldElementImpl_EnumValue(
+ EnumElementImpl enumElement, this._unlinkedEnumValue, this._index)
: super(enumElement);
@override
String get documentationComment {
- if (_kernelEnumValue != null) {
- var metadata = AnalyzerMetadata.forNode(_kernelEnumValue);
- return metadata?.documentationComment;
- }
if (_unlinkedEnumValue != null) {
return _unlinkedEnumValue.documentationComment?.text;
}
@@ -2110,10 +1886,6 @@
@override
List<ElementAnnotation> get metadata {
- if (_kernel != null) {
- _metadata ??=
- enclosingUnit._kernelContext.buildAnnotations(_kernel.annotations);
- }
if (_unlinkedEnumValue != null) {
return _metadata ??=
_buildAnnotations(enclosingUnit, _unlinkedEnumValue.annotations);
@@ -2123,9 +1895,6 @@
@override
String get name {
- if (_kernelEnumValue != null) {
- return _kernelEnumValue.name.name;
- }
if (_unlinkedEnumValue != null) {
return _unlinkedEnumValue.name;
}
@@ -2258,16 +2027,6 @@
List<ConstructorInitializer> _constantInitializers;
/**
- * The kernel of the element.
- */
- final kernel.Constructor _kernelConstructor;
-
- /**
- * The kernel of the element.
- */
- final kernel.Procedure _kernelFactory;
-
- /**
* The offset of the `.` before this constructor name or `null` if not named.
*/
int _periodOffset;
@@ -2289,36 +2048,19 @@
* Initialize a newly created constructor element to have the given [name] and
* [offset].
*/
- ConstructorElementImpl(String name, int offset)
- : _kernelConstructor = null,
- _kernelFactory = null,
- super(name, offset);
-
- /**
- * Initialize using the given serialized information.
- */
- ConstructorElementImpl.forKernel(ClassElementImpl enclosingClass,
- this._kernelConstructor, this._kernelFactory)
- : super.forKernel(enclosingClass, _kernelConstructor ?? _kernelFactory) {
- isSynthetic = _kernelConstructor?.isSynthetic ?? false;
- }
+ ConstructorElementImpl(String name, int offset) : super(name, offset);
/**
* Initialize a newly created constructor element to have the given [name].
*/
- ConstructorElementImpl.forNode(Identifier name)
- : _kernelConstructor = null,
- _kernelFactory = null,
- super.forNode(name);
+ ConstructorElementImpl.forNode(Identifier name) : super.forNode(name);
/**
* Initialize using the given serialized information.
*/
ConstructorElementImpl.forSerialized(
UnlinkedExecutable serializedExecutable, ClassElementImpl enclosingClass)
- : _kernelConstructor = null,
- _kernelFactory = null,
- super.forSerialized(serializedExecutable, enclosingClass);
+ : super.forSerialized(serializedExecutable, enclosingClass);
/**
* Return the constant initializers for this element, which will be empty if
@@ -2326,17 +2068,6 @@
*/
List<ConstructorInitializer> get constantInitializers {
if (_constantInitializers == null) {
- if (_kernelConstructor != null) {
- if (_kernelConstructor.isConst) {
- var context = enclosingUnit._kernelContext;
- _constantInitializers = _kernelConstructor.initializers
- .map((k) => context.getConstructorInitializer(this, k))
- .where((i) => i != null)
- .toList();
- } else {
- _constantInitializers = const <ConstructorInitializer>[];
- }
- }
if (serializedExecutable != null) {
_constantInitializers = serializedExecutable.constantInitializers
.map((i) => _buildConstructorInitializer(i))
@@ -2370,12 +2101,6 @@
@override
bool get isConst {
- if (_kernelConstructor != null) {
- return _kernelConstructor.isConst;
- }
- if (_kernelFactory != null) {
- return _kernelFactory.isConst;
- }
if (serializedExecutable != null) {
return serializedExecutable.isConst;
}
@@ -2424,8 +2149,6 @@
@override
bool get isFactory {
- if (_kernelConstructor != null) return false;
- if (_kernelFactory != null) return true;
if (serializedExecutable != null) {
return serializedExecutable.isFactory;
}
@@ -2436,9 +2159,6 @@
bool get isStatic => false;
@override
- List<kernel.TypeParameter> get kernelTypeParams => const [];
-
- @override
ElementKind get kind => ElementKind.CONSTRUCTOR;
@override
@@ -2459,18 +2179,6 @@
}
@override
- int get nameOffset {
- if (_kernel != null) {
- var metadata = AnalyzerMetadata.forNode(_kernel);
- if (metadata != null && metadata.constructorNameOffset != -1) {
- return metadata.constructorNameOffset;
- }
- return _kernel.fileOffset;
- }
- return super.nameOffset;
- }
-
- @override
int get periodOffset {
if (serializedExecutable != null) {
if (serializedExecutable.name.isNotEmpty) {
@@ -2488,10 +2196,6 @@
@override
ConstructorElement get redirectedConstructor {
if (_redirectedConstructor == null) {
- if (_kernelConstructor != null || _kernelFactory != null) {
- _redirectedConstructor = enclosingUnit._kernelContext
- .getRedirectedConstructor(this, _kernelConstructor, _kernelFactory);
- }
if (serializedExecutable != null) {
if (serializedExecutable.isRedirectedConstructor) {
if (serializedExecutable.isFactory) {
@@ -2638,13 +2342,6 @@
: super(name, offset);
/**
- * Initialize using the given kernel.
- */
- ConstTopLevelVariableElementImpl.forKernel(
- ElementImpl enclosingElement, kernel.Field kernel)
- : super.forKernel(enclosingElement, kernel);
-
- /**
* Initialize a newly created top-level variable element to have the given
* [name].
*/
@@ -2687,10 +2384,6 @@
Expression get constantInitializer {
if (_constantInitializer == null) {
- if (_kernelInitializer != null) {
- _constantInitializer = enclosingUnit._kernelContext
- .getExpression(this, _kernelInitializer);
- }
if (_unlinkedConst != null) {
_constantInitializer = enclosingUnit.resynthesizerContext
.buildExpression(this, _unlinkedConst);
@@ -2711,12 +2404,6 @@
}
/**
- * If this element is resynthesized from Kernel, return the Kernel
- * initializer, otherwise return `null`.
- */
- kernel.Expression get _kernelInitializer;
-
- /**
* If this element is resynthesized from the summary, return the unlinked
* initializer, otherwise return `null`.
*/
@@ -2749,13 +2436,6 @@
: super(name, nameOffset);
/**
- * Initialize using the given kernel.
- */
- DefaultFieldFormalParameterElementImpl.forKernel(ElementImpl enclosingElement,
- kernel.VariableDeclaration kernel, ParameterKind parameterKind)
- : super.forKernel(enclosingElement, kernel, parameterKind);
-
- /**
* Initialize a newly created parameter element to have the given [name].
*/
DefaultFieldFormalParameterElementImpl.forNode(Identifier name)
@@ -2782,13 +2462,6 @@
: super(name, nameOffset);
/**
- * Initialize using the given kernel.
- */
- DefaultParameterElementImpl.forKernel(ElementImpl enclosingElement,
- kernel.VariableDeclaration kernel, ParameterKind parameterKind)
- : super.forKernel(enclosingElement, kernel, parameterKind);
-
- /**
* Initialize a newly created parameter element to have the given [name].
*/
DefaultParameterElementImpl.forNode(Identifier name) : super.forNode(name);
@@ -3207,11 +2880,6 @@
}
/**
- * Initialize for resynthesizing from kernel.
- */
- ElementImpl.forKernel(this._enclosingElement);
-
- /**
* Initialize a newly created element to have the given [name].
*/
ElementImpl.forNode(Identifier name)
@@ -3886,11 +3554,6 @@
final UnlinkedEnum _unlinkedEnum;
/**
- * The kernel of the element.
- */
- final kernel.Class _kernel;
-
- /**
* The type defined by the enum.
*/
InterfaceType _type;
@@ -3901,23 +3564,13 @@
*/
EnumElementImpl(String name, int offset)
: _unlinkedEnum = null,
- _kernel = null,
super(name, offset);
/**
- * Initialize using the given kernel.
- */
- EnumElementImpl.forKernel(
- CompilationUnitElementImpl enclosingUnit, this._kernel)
- : _unlinkedEnum = null,
- super.forKernel(enclosingUnit);
-
- /**
* Initialize a newly created class element to have the given [name].
*/
EnumElementImpl.forNode(Identifier name)
: _unlinkedEnum = null,
- _kernel = null,
super.forNode(name);
/**
@@ -3925,8 +3578,7 @@
*/
EnumElementImpl.forSerialized(
this._unlinkedEnum, CompilationUnitElementImpl enclosingUnit)
- : _kernel = null,
- super.forSerialized(enclosingUnit);
+ : super.forSerialized(enclosingUnit);
/**
* Set whether this class is abstract.
@@ -3938,7 +3590,7 @@
@override
List<PropertyAccessorElement> get accessors {
if (_accessors == null) {
- if (_kernel != null || _unlinkedEnum != null) {
+ if (_unlinkedEnum != null) {
_resynthesizeMembers();
}
}
@@ -3981,10 +3633,6 @@
@override
String get documentationComment {
- if (_kernel != null) {
- var metadata = AnalyzerMetadata.forNode(_kernel);
- return metadata?.documentationComment;
- }
if (_unlinkedEnum != null) {
return _unlinkedEnum.documentationComment?.text;
}
@@ -3994,7 +3642,7 @@
@override
List<FieldElement> get fields {
if (_fields == null) {
- if (_kernel != null || _unlinkedEnum != null) {
+ if (_unlinkedEnum != null) {
_resynthesizeMembers();
}
}
@@ -4039,10 +3687,6 @@
@override
List<ElementAnnotation> get metadata {
- if (_kernel != null) {
- _metadata ??=
- enclosingUnit._kernelContext.buildAnnotations(_kernel.annotations);
- }
if (_unlinkedEnum != null) {
return _metadata ??=
_buildAnnotations(enclosingUnit, _unlinkedEnum.annotations);
@@ -4053,7 +3697,7 @@
@override
List<MethodElement> get methods {
if (_methods == null) {
- if (_kernel != null || _unlinkedEnum != null) {
+ if (_unlinkedEnum != null) {
_resynthesizeMembers();
}
}
@@ -4065,9 +3709,6 @@
@override
String get name {
- if (_kernel != null) {
- return _kernel.name;
- }
if (_unlinkedEnum != null) {
return _unlinkedEnum.name;
}
@@ -4119,7 +3760,7 @@
*/
void createToStringMethodElement() {
var method = new MethodElementImpl('toString', -1);
- if (_kernel != null || _unlinkedEnum != null) {
+ if (_unlinkedEnum != null) {
method.returnType = context.typeProvider.stringType;
method.type = new FunctionTypeImpl(method);
}
@@ -4144,24 +3785,11 @@
// Build the 'values' field.
fields.add(new ConstFieldElementImpl_EnumValues(this));
// Build fields for all enum constants.
- if (_kernel != null) {
- for (int i = 0; i < _kernel.fields.length; i++) {
- kernel.Field kernelField = _kernel.fields[i];
- if (kernelField.name.name == 'index' ||
- kernelField.name.name == '_name' ||
- kernelField.name.name == 'values') {
- continue;
- }
- ConstFieldElementImpl_EnumValue field =
- new ConstFieldElementImpl_EnumValue(this, null, kernelField, i);
- fields.add(field);
- }
- }
if (_unlinkedEnum != null) {
for (int i = 0; i < _unlinkedEnum.values.length; i++) {
UnlinkedEnumValue unlinkedValue = _unlinkedEnum.values[i];
ConstFieldElementImpl_EnumValue field =
- new ConstFieldElementImpl_EnumValue(this, unlinkedValue, null, i);
+ new ConstFieldElementImpl_EnumValue(this, unlinkedValue, i);
fields.add(field);
}
}
@@ -4188,11 +3816,6 @@
final UnlinkedExecutable serializedExecutable;
/**
- * The kernel of the element.
- */
- final kernel.Member _kernel;
-
- /**
* A list containing all of the parameters defined by this executable element.
*/
List<ParameterElement> _parameters;
@@ -4218,22 +3841,13 @@
*/
ExecutableElementImpl(String name, int offset)
: serializedExecutable = null,
- _kernel = null,
super(name, offset);
/**
- * Initialize using the given kernel.
- */
- ExecutableElementImpl.forKernel(ElementImpl enclosingElement, this._kernel)
- : serializedExecutable = null,
- super.forKernel(enclosingElement);
-
- /**
* Initialize a newly created executable element to have the given [name].
*/
ExecutableElementImpl.forNode(Identifier name)
: serializedExecutable = null,
- _kernel = null,
super.forNode(name);
/**
@@ -4241,8 +3855,7 @@
*/
ExecutableElementImpl.forSerialized(
this.serializedExecutable, ElementImpl enclosingElement)
- : _kernel = null,
- super.forSerialized(enclosingElement);
+ : super.forSerialized(enclosingElement);
/**
* Set whether this executable element's body is asynchronous.
@@ -4254,10 +3867,6 @@
@override
int get codeLength {
- if (_kernel != null) {
- var metadata = AnalyzerMetadata.forNode(_kernel);
- return metadata?.codeLength;
- }
if (serializedExecutable != null) {
return serializedExecutable.codeRange?.length;
}
@@ -4266,10 +3875,6 @@
@override
int get codeOffset {
- if (_kernel != null) {
- var metadata = AnalyzerMetadata.forNode(_kernel);
- return metadata?.codeOffset;
- }
if (serializedExecutable != null) {
return serializedExecutable.codeRange?.offset;
}
@@ -4283,9 +3888,6 @@
@override
String get displayName {
- if (_kernel != null) {
- return _kernel.name.name;
- }
if (serializedExecutable != null) {
return serializedExecutable.name;
}
@@ -4294,10 +3896,6 @@
@override
String get documentationComment {
- if (_kernel != null) {
- var metadata = AnalyzerMetadata.forNode(_kernel);
- return metadata?.documentationComment;
- }
if (serializedExecutable != null) {
return serializedExecutable.documentationComment?.text;
}
@@ -4339,9 +3937,6 @@
@override
bool get isAbstract {
- if (_kernel != null) {
- return _kernel.isAbstract;
- }
if (serializedExecutable != null) {
return serializedExecutable.isAbstract;
}
@@ -4350,11 +3945,6 @@
@override
bool get isAsynchronous {
- if (_kernel != null) {
- kernel.AsyncMarker marker = _kernel.function.asyncMarker;
- return marker == kernel.AsyncMarker.Async ||
- marker == kernel.AsyncMarker.AsyncStar;
- }
if (serializedExecutable != null) {
return serializedExecutable.isAsynchronous;
}
@@ -4363,9 +3953,6 @@
@override
bool get isExternal {
- if (_kernel != null) {
- return _kernel.isExternal;
- }
if (serializedExecutable != null) {
return serializedExecutable.isExternal;
}
@@ -4374,11 +3961,6 @@
@override
bool get isGenerator {
- if (_kernel != null) {
- kernel.AsyncMarker marker = _kernel.function.asyncMarker;
- return marker == kernel.AsyncMarker.AsyncStar ||
- marker == kernel.AsyncMarker.SyncStar;
- }
if (serializedExecutable != null) {
return serializedExecutable.isGenerator;
}
@@ -4392,16 +3974,7 @@
bool get isSynchronous => !isAsynchronous;
@override
- List<kernel.TypeParameter> get kernelTypeParams {
- return _kernel?.function?.typeParameters;
- }
-
- @override
List<ElementAnnotation> get metadata {
- if (_kernel != null) {
- _metadata ??=
- enclosingUnit._kernelContext.buildAnnotations(_kernel.annotations);
- }
if (serializedExecutable != null) {
return _metadata ??=
_buildAnnotations(enclosingUnit, serializedExecutable.annotations);
@@ -4411,9 +3984,6 @@
@override
String get name {
- if (_kernel != null) {
- return _kernel.name.name;
- }
if (serializedExecutable != null) {
return serializedExecutable.name;
}
@@ -4423,9 +3993,6 @@
@override
int get nameOffset {
int offset = super.nameOffset;
- if (_kernel != null) {
- return _kernel.fileOffset;
- }
if (offset == 0 && serializedExecutable != null) {
return serializedExecutable.nameOffset;
}
@@ -4435,10 +4002,6 @@
@override
List<ParameterElement> get parameters {
if (_parameters == null) {
- if (_kernel != null) {
- _parameters =
- ParameterElementImpl.forKernelFunction(this, _kernel.function);
- }
if (serializedExecutable != null) {
_parameters = ParameterElementImpl.resynthesizeList(
serializedExecutable.parameters, this);
@@ -4461,10 +4024,6 @@
@override
DartType get returnType {
- if (_kernel != null) {
- return _returnType ??= enclosingUnit._kernelContext
- .getType(this, _kernel.function.returnType);
- }
if (serializedExecutable != null &&
_declaredReturnType == null &&
_returnType == null) {
@@ -4486,7 +4045,7 @@
@override
FunctionType get type {
- if (_kernel != null || serializedExecutable != null) {
+ if (serializedExecutable != null) {
_type ??= new FunctionTypeImpl(this);
}
return _type;
@@ -4602,11 +4161,6 @@
final UnlinkedExportNonPublic _unlinkedExportNonPublic;
/**
- * The kernel of the element.
- */
- final kernel.LibraryDependency _kernel;
-
- /**
* The library that is exported from this library by this export directive.
*/
LibraryElement _exportedLibrary;
@@ -4628,32 +4182,18 @@
ExportElementImpl(int offset)
: _unlinkedExportPublic = null,
_unlinkedExportNonPublic = null,
- _kernel = null,
super(null, offset);
/**
- * Initialize using the given kernel.
- */
- ExportElementImpl.forKernel(LibraryElementImpl enclosingLibrary, this._kernel)
- : _unlinkedExportPublic = null,
- _unlinkedExportNonPublic = null,
- super.forKernel(enclosingLibrary);
-
- /**
* Initialize using the given serialized information.
*/
ExportElementImpl.forSerialized(this._unlinkedExportPublic,
this._unlinkedExportNonPublic, LibraryElementImpl enclosingLibrary)
- : _kernel = null,
- super.forSerialized(enclosingLibrary);
+ : super.forSerialized(enclosingLibrary);
@override
List<NamespaceCombinator> get combinators {
if (_combinators == null) {
- if (_kernel != null) {
- _combinators =
- ImportElementImpl._buildCombinatorsForKernel(_kernel.combinators);
- }
if (_unlinkedExportPublic != null) {
_combinators = ImportElementImpl._buildCombinators(
_unlinkedExportPublic.combinators);
@@ -4670,12 +4210,6 @@
@override
LibraryElement get exportedLibrary {
if (_exportedLibrary == null) {
- if (_kernel != null) {
- Uri exportedUri = _kernel.targetLibrary.importUri;
- String exportedUriStr = exportedUri.toString();
- LibraryElementImpl library = enclosingElement as LibraryElementImpl;
- _exportedLibrary = library._kernelContext.getLibrary(exportedUriStr);
- }
if (_unlinkedExportNonPublic != null) {
LibraryElementImpl library = enclosingElement as LibraryElementImpl;
_exportedLibrary =
@@ -4699,14 +4233,9 @@
@override
List<ElementAnnotation> get metadata {
if (_metadata == null) {
- CompilationUnitElementImpl definingUnit = library.definingCompilationUnit;
- if (_kernel != null) {
- return _metadata =
- definingUnit._kernelContext.buildAnnotations(_kernel.annotations);
- }
if (_unlinkedExportNonPublic != null) {
- return _metadata = _buildAnnotations(
- definingUnit, _unlinkedExportNonPublic.annotations);
+ return _metadata = _buildAnnotations(library.definingCompilationUnit,
+ _unlinkedExportNonPublic.annotations);
}
}
return super.metadata;
@@ -4719,9 +4248,6 @@
@override
int get nameOffset {
- if (_kernel != null) {
- return _kernel.fileOffset;
- }
int offset = super.nameOffset;
if (offset == 0 && _unlinkedExportNonPublic != null) {
return _unlinkedExportNonPublic.offset;
@@ -4794,27 +4320,6 @@
FieldElementImpl(String name, int offset) : super(name, offset);
/**
- * Initialize using the given kernel.
- */
- FieldElementImpl.forKernel(ElementImpl enclosingElement, kernel.Field kernel)
- : super.forKernel(enclosingElement, kernel);
-
- /**
- * Initialize using the given kernel.
- */
- factory FieldElementImpl.forKernelFactory(
- ClassElementImpl enclosingClass, kernel.Field kernel) {
- if (kernel.isConst ||
- kernel.isFinal &&
- !kernel.isStatic &&
- enclosingClass._hasConstConstructor) {
- return new ConstFieldElementImpl.forKernel(enclosingClass, kernel);
- } else {
- return new FieldElementImpl.forKernel(enclosingClass, kernel);
- }
- }
-
- /**
* Initialize a newly created field element to have the given [name].
*/
FieldElementImpl.forNode(Identifier name) : super.forNode(name);
@@ -4851,9 +4356,6 @@
* Return `true` if this field was explicitly marked as being covariant.
*/
bool get isCovariant {
- if (_kernel != null) {
- return _kernel.isCovariant;
- }
if (_unlinkedVariable != null) {
return _unlinkedVariable.isCovariant;
}
@@ -4874,9 +4376,6 @@
@override
bool get isStatic {
- if (_kernel != null) {
- return _kernel.isStatic;
- }
if (_unlinkedVariable != null) {
return _unlinkedVariable.isStatic;
}
@@ -4929,13 +4428,6 @@
: super(name, nameOffset);
/**
- * Initialize using the given kernel.
- */
- FieldFormalParameterElementImpl.forKernel(ElementImpl enclosingElement,
- kernel.VariableDeclaration kernel, ParameterKind parameterKind)
- : super.forKernel(enclosingElement, kernel, parameterKind);
-
- /**
* Initialize a newly created parameter element to have the given [name].
*/
FieldFormalParameterElementImpl.forNode(Identifier name)
@@ -4952,9 +4444,6 @@
FieldElement get field {
if (_field == null) {
String fieldName;
- if (_kernel != null) {
- fieldName = _kernel.name;
- }
if (unlinkedParam != null) {
fieldName = unlinkedParam.name;
}
@@ -5024,13 +4513,6 @@
FunctionElementImpl(String name, int offset) : super(name, offset);
/**
- * Initialize using the given kernel.
- */
- FunctionElementImpl.forKernel(
- ElementImpl enclosingElement, kernel.Procedure kernel)
- : super.forKernel(enclosingElement, kernel);
-
- /**
* Initialize a newly created function element to have the given [name].
*/
FunctionElementImpl.forNode(Identifier name) : super.forNode(name);
@@ -5262,11 +4744,6 @@
with TypeParameterizedElementMixin
implements GenericFunctionTypeElement, FunctionTypedElementImpl {
/**
- * The kernel type.
- */
- final kernel.FunctionType _kernel;
-
- /**
* The unlinked representation of the generic function type in the summary.
*/
EntityRef _entityRef;
@@ -5287,27 +4764,18 @@
FunctionType _type;
/**
- * Initialize using the given kernel.
- */
- GenericFunctionTypeElementImpl.forKernel(
- ElementImpl enclosingElement, this._kernel)
- : super.forKernel(enclosingElement);
-
- /**
* Initialize a newly created function element to have no name and the given
* [nameOffset]. This is used for function expressions, that have no name.
*/
GenericFunctionTypeElementImpl.forOffset(int nameOffset)
- : _kernel = null,
- super("", nameOffset);
+ : super("", nameOffset);
/**
* Initialize from serialized information.
*/
GenericFunctionTypeElementImpl.forSerialized(
ElementImpl enclosingElement, this._entityRef)
- : _kernel = null,
- super.forSerialized(enclosingElement);
+ : super.forSerialized(enclosingElement);
@override
TypeParameterizedElementMixin get enclosingTypeParameterContext {
@@ -5318,25 +4786,11 @@
String get identifier => '-';
@override
- List<kernel.TypeParameter> get kernelTypeParams => _kernel?.typeParameters;
-
- @override
ElementKind get kind => ElementKind.GENERIC_FUNCTION_TYPE;
@override
List<ParameterElement> get parameters {
if (_parameters == null) {
- if (_kernel != null) {
- var parameters =
- enclosingUnit._kernelContext.getFunctionTypeParameters(_kernel);
- var positionalParameters = parameters[0];
- var namedParameters = parameters[1];
- _parameters = ParameterElementImpl.forKernelParameters(
- this,
- _kernel.requiredParameterCount,
- positionalParameters,
- namedParameters);
- }
if (_entityRef != null) {
_parameters = ParameterElementImpl.resynthesizeList(
_entityRef.syntheticParams, this);
@@ -5360,10 +4814,6 @@
@override
DartType get returnType {
if (_returnType == null) {
- if (_kernel != null) {
- _returnType =
- enclosingUnit._kernelContext.getType(this, _kernel.returnType);
- }
if (_entityRef != null) {
_returnType = enclosingUnit.resynthesizerContext.resolveTypeRef(
this, _entityRef.syntheticReturnType,
@@ -5473,11 +4923,6 @@
final UnlinkedTypedef _unlinkedTypedef;
/**
- * The kernel of the element.
- */
- final kernel.Typedef _kernel;
-
- /**
* The element representing the generic function type.
*/
GenericFunctionTypeElementImpl _function;
@@ -5492,23 +4937,13 @@
*/
GenericTypeAliasElementImpl(String name, int offset)
: _unlinkedTypedef = null,
- _kernel = null,
super(name, offset);
/**
- * Initialize using the given serialized information.
- */
- GenericTypeAliasElementImpl.forKernel(
- CompilationUnitElementImpl enclosingUnit, this._kernel)
- : _unlinkedTypedef = null,
- super.forSerialized(enclosingUnit);
-
- /**
* Initialize a newly created type alias element to have the given [name].
*/
GenericTypeAliasElementImpl.forNode(Identifier name)
: _unlinkedTypedef = null,
- _kernel = null,
super.forNode(name);
/**
@@ -5516,8 +4951,7 @@
*/
GenericTypeAliasElementImpl.forSerialized(
this._unlinkedTypedef, CompilationUnitElementImpl enclosingUnit)
- : _kernel = null,
- super.forSerialized(enclosingUnit);
+ : super.forSerialized(enclosingUnit);
@override
int get codeLength {
@@ -5540,10 +4974,6 @@
@override
String get documentationComment {
- if (_kernel != null) {
- var metadata = AnalyzerMetadata.forNode(_kernel);
- return metadata?.documentationComment;
- }
if (_unlinkedTypedef != null) {
return _unlinkedTypedef.documentationComment?.text;
}
@@ -5564,19 +4994,6 @@
@override
GenericFunctionTypeElementImpl get function {
if (_function == null) {
- if (_kernel != null) {
- var kernelType = _kernel.type;
- if (kernelType is kernel.FunctionType) {
- _function =
- new GenericFunctionTypeElementImpl.forKernel(this, kernelType);
- } else {
- // Error recovery.
- _function = new GenericFunctionTypeElementImpl.forOffset(-1);
- _function.enclosingElement = this;
- _function.returnType = DynamicTypeImpl.instance;
- _function.parameters = <ParameterElement>[];
- }
- }
if (_unlinkedTypedef != null) {
if (_unlinkedTypedef.style == TypedefStyle.genericFunctionType) {
DartType type = enclosingUnit.resynthesizerContext.resolveTypeRef(
@@ -5617,17 +5034,10 @@
}
@override
- List<kernel.TypeParameter> get kernelTypeParams => _kernel?.typeParameters;
-
- @override
ElementKind get kind => ElementKind.FUNCTION_TYPE_ALIAS;
@override
List<ElementAnnotation> get metadata {
- if (_kernel != null) {
- _metadata ??=
- enclosingUnit._kernelContext.buildAnnotations(_kernel.annotations);
- }
if (_unlinkedTypedef != null) {
return _metadata ??=
_buildAnnotations(enclosingUnit, _unlinkedTypedef.annotations);
@@ -5637,9 +5047,6 @@
@override
String get name {
- if (_kernel != null) {
- return _kernel.name;
- }
if (_unlinkedTypedef != null) {
return _unlinkedTypedef.name;
}
@@ -5782,37 +5189,20 @@
final UnlinkedCombinator _unlinkedCombinator;
/**
- * The kernel for the element.
- */
- final kernel.Combinator _kernel;
-
- /**
* The names that are not to be made visible in the importing library even if
* they are defined in the imported library.
*/
List<String> _hiddenNames;
- HideElementCombinatorImpl()
- : _unlinkedCombinator = null,
- _kernel = null;
-
- /**
- * Initialize using the given kernel.
- */
- HideElementCombinatorImpl.forKernel(this._kernel)
- : _unlinkedCombinator = null;
+ HideElementCombinatorImpl() : _unlinkedCombinator = null;
/**
* Initialize using the given serialized information.
*/
- HideElementCombinatorImpl.forSerialized(this._unlinkedCombinator)
- : _kernel = null;
+ HideElementCombinatorImpl.forSerialized(this._unlinkedCombinator);
@override
List<String> get hiddenNames {
- if (_kernel != null) {
- _hiddenNames ??= _kernel.names;
- }
if (_unlinkedCombinator != null) {
_hiddenNames ??= _unlinkedCombinator.hides.toList(growable: false);
}
@@ -5855,16 +5245,6 @@
final int _linkedDependency;
/**
- * The kernel of the element.
- */
- final kernel.LibraryDependency _kernel;
-
- /**
- * Whether this import is synthetic.
- */
- final bool _kernelSynthetic;
-
- /**
* The offset of the prefix of this import in the file that contains the this
* import directive, or `-1` if this import is synthetic.
*/
@@ -5904,35 +5284,18 @@
ImportElementImpl(int offset)
: _unlinkedImport = null,
_linkedDependency = null,
- _kernel = null,
- _kernelSynthetic = false,
super(null, offset);
/**
- * Initialize using the given kernel.
- */
- ImportElementImpl.forKernel(LibraryElementImpl enclosingLibrary, this._kernel,
- {bool isSynthetic: false})
- : _unlinkedImport = null,
- _linkedDependency = null,
- _kernelSynthetic = isSynthetic,
- super.forKernel(enclosingLibrary);
-
- /**
* Initialize using the given serialized information.
*/
ImportElementImpl.forSerialized(this._unlinkedImport, this._linkedDependency,
LibraryElementImpl enclosingLibrary)
- : _kernel = null,
- _kernelSynthetic = false,
- super.forSerialized(enclosingLibrary);
+ : super.forSerialized(enclosingLibrary);
@override
List<NamespaceCombinator> get combinators {
if (_combinators == null) {
- if (_kernel != null) {
- _combinators = _buildCombinatorsForKernel(_kernel.combinators);
- }
if (_unlinkedImport != null) {
_combinators = _buildCombinators(_unlinkedImport.combinators);
}
@@ -5958,14 +5321,6 @@
@override
LibraryElement get importedLibrary {
- if (_kernel != null) {
- if (_importedLibrary == null) {
- Uri importedUri = _kernel.targetLibrary.importUri;
- String importedUriStr = importedUri.toString();
- LibraryElementImpl library = enclosingElement as LibraryElementImpl;
- _importedLibrary = library._kernelContext.getLibrary(importedUriStr);
- }
- }
if (_linkedDependency != null) {
if (_importedLibrary == null) {
LibraryElementImpl library = enclosingElement as LibraryElementImpl;
@@ -5987,9 +5342,6 @@
@override
bool get isDeferred {
- if (_kernel != null) {
- return _kernel.isDeferred;
- }
if (_unlinkedImport != null) {
return _unlinkedImport.isDeferred;
}
@@ -5998,9 +5350,6 @@
@override
bool get isSynthetic {
- if (_kernel != null) {
- return _kernelSynthetic;
- }
if (_unlinkedImport != null) {
return _unlinkedImport.isImplicit;
}
@@ -6013,14 +5362,9 @@
@override
List<ElementAnnotation> get metadata {
if (_metadata == null) {
- CompilationUnitElementImpl definingUnit = library.definingCompilationUnit;
- if (_kernel != null) {
- return _metadata =
- definingUnit._kernelContext.buildAnnotations(_kernel.annotations);
- }
if (_unlinkedImport != null) {
- return _metadata =
- _buildAnnotations(definingUnit, _unlinkedImport.annotations);
+ return _metadata = _buildAnnotations(
+ library.definingCompilationUnit, _unlinkedImport.annotations);
}
}
return super.metadata;
@@ -6033,9 +5377,6 @@
@override
int get nameOffset {
- if (_kernel != null) {
- return _kernel.fileOffset;
- }
int offset = super.nameOffset;
if (offset == 0 && _unlinkedImport != null) {
if (_unlinkedImport.isImplicit) {
@@ -6054,10 +5395,6 @@
PrefixElement get prefix {
if (_prefix == null) {
- if (_kernel != null && _kernel.name != null) {
- LibraryElementImpl library = enclosingElement as LibraryElementImpl;
- _prefix = new PrefixElementImpl.forKernel(library, _kernel);
- }
if (_unlinkedImport != null && _unlinkedImport.prefixReference != 0) {
LibraryElementImpl library = enclosingElement as LibraryElementImpl;
_prefix = new PrefixElementImpl.forSerialized(_unlinkedImport, library);
@@ -6168,145 +5505,6 @@
return const <NamespaceCombinator>[];
}
}
-
- static List<NamespaceCombinator> _buildCombinatorsForKernel(
- List<kernel.Combinator> unlinkedCombinators) {
- int length = unlinkedCombinators.length;
- if (length != 0) {
- List<NamespaceCombinator> combinators =
- new List<NamespaceCombinator>(length);
- for (int i = 0; i < length; i++) {
- kernel.Combinator unlinkedCombinator = unlinkedCombinators[i];
- combinators[i] = unlinkedCombinator.isShow
- ? new ShowElementCombinatorImpl.forKernel(unlinkedCombinator)
- : new HideElementCombinatorImpl.forKernel(unlinkedCombinator);
- }
- return combinators;
- } else {
- return const <NamespaceCombinator>[];
- }
- }
-}
-
-/**
- * The kernel context in which a library is resynthesized.
- */
-abstract class KernelLibraryResynthesizerContext {
- /**
- * The Kernel library for `dart:core`.
- */
- kernel.Library get coreLibrary;
-
- /**
- * Return `true` if the library has an import directive whose URI uses the
- * "dart-ext" scheme.
- */
- bool get hasExtUri;
-
- /**
- * The Kernel library being resynthesized.
- */
- kernel.Library get library;
-
- /**
- * Return the export namespace of the library.
- */
- Namespace buildExportNamespace();
-
- /**
- * Return the public namespace of the library.
- */
- Namespace buildPublicNamespace();
-
- /**
- * Return the [LibraryElement] for the given absolute [uriStr].
- */
- LibraryElement getLibrary(String uriStr);
-}
-
-/**
- * Top-level declarations of a Kernel library filtered by the unit.
- */
-abstract class KernelUnit {
- List<kernel.Expression> get annotations;
-
- List<kernel.Class> get classes;
-
- List<kernel.Field> get fields;
-
- List<kernel.Procedure> get procedures;
-
- List<kernel.Typedef> get typedefs;
-}
-
-/**
- * The kernel context in which a unit is resynthesized.
- */
-abstract class KernelUnitResynthesizerContext {
- /**
- * Subset of top-level declarations in the unit.
- */
- KernelUnit get kernelUnit;
-
- /**
- * Build [ElementAnnotation]s for the given Kernel [annotations].
- */
- List<ElementAnnotation> buildAnnotations(List<kernel.Expression> annotations);
-
- /**
- * Build explicit top-level property accessors.
- */
- UnitExplicitTopLevelAccessors buildTopLevelAccessors();
-
- /**
- * Build explicit top-level variables.
- */
- UnitExplicitTopLevelVariables buildTopLevelVariables();
-
- /**
- * Return the resynthesized [ConstructorInitializer] for the given Kernel
- * [initializer], or `null` if synthetic.
- */
- ConstructorInitializer getConstructorInitializer(
- ConstructorElementImpl constructor, kernel.Initializer initializer);
-
- /**
- * Return the [Expression] for the given kernel.
- */
- Expression getExpression(ElementImpl context, kernel.Expression expression);
-
- /**
- * Return the list with exactly two elements - positional and named parameter
- * lists.
- */
- List<List<kernel.VariableDeclaration>> getFunctionTypeParameters(
- kernel.FunctionType functionType);
-
- /**
- * Return the [InterfaceType] for the given Kernel [type], or `null` if the
- * [type] does not correspond to an [InterfaceType].
- */
- InterfaceType getInterfaceType(ElementImpl context, kernel.Supertype type);
-
- /**
- * Return the [InterfaceType]s for the given Kernel [types], skipping
- * the elements that don't correspond to an [InterfaceType].
- */
- List<InterfaceType> getInterfaceTypes(
- ElementImpl context, List<kernel.Supertype> types);
-
- /**
- * Return the [ConstructorElementImpl] to which the given [kernelConstructor]
- * or [kernelFactory] redirects.
- */
- ConstructorElement getRedirectedConstructor(ElementImpl context,
- kernel.Constructor kernelConstructor, kernel.Procedure kernelFactory);
-
- /**
- * Return the [DartType] for the given Kernel [type], or `null` if the [type]
- * does not correspond to a [DartType].
- */
- DartType getType(ElementImpl context, kernel.DartType type);
}
/**
@@ -6376,8 +5574,6 @@
* A concrete implementation of a [LibraryElement].
*/
class LibraryElementImpl extends ElementImpl implements LibraryElement {
- static final Uri _dartCore = Uri.parse('dart:core');
-
/**
* The analysis context in which this library is defined.
*/
@@ -6385,11 +5581,6 @@
final LibraryResynthesizerContext resynthesizerContext;
- /**
- * The kernel context in which the library is resynthesized.
- */
- final KernelLibraryResynthesizerContext _kernelContext;
-
final UnlinkedUnit unlinkedDefiningUnit;
/**
@@ -6467,34 +5658,16 @@
*/
LibraryElementImpl(this.context, String name, int offset, this.nameLength)
: resynthesizerContext = null,
- _kernelContext = null,
unlinkedDefiningUnit = null,
super(name, offset);
/**
- * Initialize using the given kernel information.
- */
- LibraryElementImpl.forKernel(this.context, this._kernelContext)
- : resynthesizerContext = null,
- unlinkedDefiningUnit = null,
- nameLength = _kernelContext.library.name?.length ?? 0,
- super.forKernel(null) {
- _name = _kernelContext.library.name ?? '';
- _nameOffset = _kernelContext.library.fileOffset;
- setResolutionCapability(
- LibraryResolutionCapability.resolvedTypeNames, true);
- setResolutionCapability(
- LibraryResolutionCapability.constantExpressions, true);
- }
-
- /**
* Initialize a newly created library element in the given [context] to have
* the given [name].
*/
LibraryElementImpl.forNode(this.context, LibraryIdentifier name)
: nameLength = name != null ? name.length : 0,
resynthesizerContext = null,
- _kernelContext = null,
unlinkedDefiningUnit = null,
super.forNode(name);
@@ -6503,8 +5676,7 @@
*/
LibraryElementImpl.forSerialized(this.context, String name, int offset,
this.nameLength, this.resynthesizerContext, this.unlinkedDefiningUnit)
- : _kernelContext = null,
- super.forSerialized(null) {
+ : super.forSerialized(null) {
_name = name;
_nameOffset = offset;
setResolutionCapability(
@@ -6547,10 +5719,6 @@
@override
String get documentationComment {
- if (_kernelContext != null) {
- var metadata = AnalyzerMetadata.forNode(_kernelContext.library);
- return metadata?.documentationComment;
- }
if (unlinkedDefiningUnit != null) {
return unlinkedDefiningUnit.libraryDocumentationComment?.text;
}
@@ -6582,9 +5750,6 @@
@override
Namespace get exportNamespace {
- if (_kernelContext != null) {
- _exportNamespace ??= _kernelContext.buildExportNamespace();
- }
if (resynthesizerContext != null) {
_exportNamespace ??= resynthesizerContext.buildExportNamespace();
}
@@ -6598,12 +5763,6 @@
@override
List<ExportElement> get exports {
if (_exports == null) {
- if (_kernelContext != null) {
- _exports = _kernelContext.library.dependencies
- .where((k) => k.isExport)
- .map((k) => new ExportElementImpl.forKernel(this, k))
- .toList(growable: false);
- }
if (unlinkedDefiningUnit != null) {
List<UnlinkedExportNonPublic> unlinkedNonPublicExports =
unlinkedDefiningUnit.exports;
@@ -6647,9 +5806,6 @@
@override
bool get hasExtUri {
- if (_kernelContext != null) {
- return _kernelContext.hasExtUri;
- }
if (unlinkedDefiningUnit != null) {
List<UnlinkedImport> unlinkedImports = unlinkedDefiningUnit.imports;
for (UnlinkedImport import in unlinkedImports) {
@@ -6700,42 +5856,6 @@
@override
List<ImportElement> get imports {
if (_imports == null) {
- if (_kernelContext != null) {
- var dependencies = _kernelContext.library.dependencies;
- int numOfDependencies = dependencies.length;
- // Compute the number of import dependencies.
- bool hasCore = false;
- int numOfImports = 0;
- for (int i = 0; i < numOfDependencies; i++) {
- kernel.LibraryDependency dependency = dependencies[i];
- if (dependency.isImport) {
- numOfImports++;
- if (dependency.targetLibrary.importUri == _dartCore) {
- hasCore = true;
- }
- }
- }
-
- // Create import elements.
- var imports = new List<ImportElement>(numOfImports + (hasCore ? 0 : 1));
- int importIndex = 0;
- for (int i = 0; i < numOfDependencies; i++) {
- kernel.LibraryDependency dependency = dependencies[i];
- if (dependency.isImport) {
- imports[importIndex++] =
- new ImportElementImpl.forKernel(this, dependency);
- }
- }
-
- // If dart:core is not imported explicitly, import it implicitly.
- if (!hasCore) {
- imports[numOfImports] = new ImportElementImpl.forKernel(this,
- new kernel.LibraryDependency.import(_kernelContext.coreLibrary),
- isSynthetic: true);
- }
- // Set imports into the field.
- _imports = imports;
- }
if (unlinkedDefiningUnit != null) {
_imports = buildImportsFromSummary(this, unlinkedDefiningUnit.imports,
resynthesizerContext.linkedLibrary.importDependencies);
@@ -6908,11 +6028,6 @@
@override
List<ElementAnnotation> get metadata {
if (_metadata == null) {
- if (_kernelContext != null) {
- CompilationUnitElementImpl definingUnit = _definingCompilationUnit;
- _metadata = definingUnit._kernelContext
- .buildAnnotations(_kernelContext.library.annotations);
- }
if (unlinkedDefiningUnit != null) {
_metadata = _buildAnnotations(
_definingCompilationUnit as CompilationUnitElementImpl,
@@ -6945,9 +6060,6 @@
@override
Namespace get publicNamespace {
- if (_kernelContext != null) {
- _publicNamespace ??= _kernelContext.buildPublicNamespace();
- }
if (resynthesizerContext != null) {
_publicNamespace ??= resynthesizerContext.buildPublicNamespace();
}
@@ -7327,24 +6439,12 @@
*/
class MethodElementImpl extends ExecutableElementImpl implements MethodElement {
/**
- * The kernel of the element.
- */
- kernel.Procedure _kernelProcedure;
-
- /**
* Initialize a newly created method element to have the given [name] at the
* given [offset].
*/
MethodElementImpl(String name, int offset) : super(name, offset);
/**
- * Initialize using the given kernel.
- */
- MethodElementImpl.forKernel(
- ClassElementImpl enclosingClass, this._kernelProcedure)
- : super.forKernel(enclosingClass, _kernelProcedure);
-
- /**
* Initialize a newly created method element to have the given [name].
*/
MethodElementImpl.forNode(Identifier name) : super.forNode(name);
@@ -7403,9 +6503,6 @@
@override
bool get isStatic {
- if (_kernel != null) {
- return _kernelProcedure.isStatic;
- }
if (serializedExecutable != null) {
return serializedExecutable.isStatic;
}
@@ -7499,13 +6596,6 @@
MixinElementImpl(String name, int offset) : super(name, offset);
/**
- * Initialize using the given kernel.
- */
- MixinElementImpl.forKernel(
- CompilationUnitElementImpl enclosingUnit, kernel.Class kernel)
- : super.forKernel(enclosingUnit, kernel);
-
- /**
* Initialize a newly created class element to have the given [name].
*/
MixinElementImpl.forNode(Identifier name) : super.forNode(name);
@@ -7523,11 +6613,20 @@
@override
List<InterfaceType> get superclassConstraints {
if (_superclassConstraints == null) {
- if (_kernel != null) {
- throw new UnimplementedError();
- }
if (_unlinkedClass != null) {
- throw new UnimplementedError();
+ List<InterfaceType> constraints;
+ if (_unlinkedClass.superclassConstraints.isNotEmpty) {
+ ResynthesizerContext context = enclosingUnit.resynthesizerContext;
+ constraints = _unlinkedClass.superclassConstraints
+ .map((EntityRef t) => context.resolveTypeRef(this, t))
+ .where(_isClassInterfaceType)
+ .cast<InterfaceType>()
+ .toList(growable: false);
+ }
+ if (constraints == null || constraints.isEmpty) {
+ constraints = [context.typeProvider.objectType];
+ }
+ _superclassConstraints = constraints;
}
}
return _superclassConstraints ?? const <InterfaceType>[];
@@ -7535,11 +6634,10 @@
void set superclassConstraints(List<InterfaceType> superclassConstraints) {
_assertNotResynthesized(_unlinkedClass);
- // Note: if we are using kernel or the analysis driver, the set of
- // superclass constraints has already been computed, and it's more accurate.
- // So we only store superclass constraints if we are using the old task
- // model.
- if (_unlinkedClass == null && _kernel == null) {
+ // Note: if we are using the analysis driver, the set of superclass
+ // constraints has already been computed, and it's more accurate. So we
+ // only store superclass constraints if we are using the old task model.
+ if (_unlinkedClass == null) {
_superclassConstraints = superclassConstraints;
}
}
@@ -7708,53 +6806,26 @@
/**
* The analysis context in which the multiply defined elements are defined.
*/
+ @override
final AnalysisContext context;
/**
* The name of the conflicting elements.
*/
- String _name;
-
- /**
- * A list containing all of the elements defined in SDK libraries that
- * conflict.
- */
- final List<Element> sdkElements;
-
- /**
- * A list containing all of the elements defined in non-SDK libraries that
- * conflict.
- */
- final List<Element> nonSdkElements;
-
- /**
- * Initialize a newly created element in the given [context] to represent a
- * list of conflicting [sdkElements] and [nonSdkElements]. At least one of the
- * lists must contain more than one element.
- */
- MultiplyDefinedElementImpl(
- this.context, this.sdkElements, this.nonSdkElements) {
- if (nonSdkElements.length > 0) {
- _name = nonSdkElements[0].name;
- } else {
- _name = sdkElements[0].name;
- }
- }
+ @override
+ final String name;
@override
- List<Element> get conflictingElements {
- if (sdkElements.isEmpty) {
- return nonSdkElements;
- } else if (nonSdkElements.isEmpty) {
- return sdkElements;
- }
- List<Element> elements = nonSdkElements.toList();
- elements.addAll(sdkElements);
- return elements;
- }
+ final List<Element> conflictingElements;
+
+ /**
+ * Initialize a newly created element in the given [context] to represent
+ * the given non-empty [conflictingElements].
+ */
+ MultiplyDefinedElementImpl(this.context, this.name, this.conflictingElements);
@override
- String get displayName => _name;
+ String get displayName => name;
@override
String get documentationComment => null;
@@ -7855,9 +6926,6 @@
List<ElementAnnotation> get metadata => const <ElementAnnotation>[];
@override
- String get name => _name;
-
- @override
int get nameLength => displayName != null ? displayName.length : 0;
@override
@@ -7923,8 +6991,7 @@
}
buffer.write("[");
- writeList(nonSdkElements);
- writeList(sdkElements);
+ writeList(conflictingElements);
buffer.write("]");
return buffer.toString();
}
@@ -7933,47 +7000,6 @@
void visitChildren(ElementVisitor visitor) {
// There are no children to visit
}
-
- /**
- * Return an element in the given [context] that represents the fact that the
- * [firstElement] and [secondElement] conflict. (If the elements are the same,
- * then one of the two will be returned directly.)
- */
- static Element fromElements(
- AnalysisContext context, Element firstElement, Element secondElement) {
- Set<Element> sdkElements = new HashSet<Element>.identity();
- Set<Element> nonSdkElements = new HashSet<Element>.identity();
- void add(Element element) {
- if (element != null) {
- if (element is MultiplyDefinedElementImpl) {
- sdkElements.addAll(element.sdkElements);
- nonSdkElements.addAll(element.nonSdkElements);
- } else if (element.library.isInSdk) {
- sdkElements.add(element);
- } else {
- nonSdkElements.add(element);
- }
- }
- }
-
- add(firstElement);
- add(secondElement);
- int nonSdkCount = nonSdkElements.length;
- if (nonSdkCount == 0) {
- int sdkCount = sdkElements.length;
- if (sdkCount == 0) {
- return null;
- } else if (sdkCount == 1) {
- return sdkElements.first;
- }
- } else if (nonSdkCount == 1) {
- return nonSdkElements.first;
- }
- return new MultiplyDefinedElementImpl(
- context,
- sdkElements.toList(growable: false),
- nonSdkElements.toList(growable: false));
- }
}
/**
@@ -8039,33 +7065,18 @@
final UnlinkedVariable _unlinkedVariable;
/**
- * The kernel of the element;
- */
- final kernel.Field _kernel;
-
- /**
* Initialize a newly created variable element to have the given [name] and
* [offset].
*/
NonParameterVariableElementImpl(String name, int offset)
: _unlinkedVariable = null,
- _kernel = null,
super(name, offset);
/**
- * Initialize using the given kernel.
- */
- NonParameterVariableElementImpl.forKernel(
- ElementImpl enclosingElement, this._kernel)
- : _unlinkedVariable = null,
- super.forKernel(enclosingElement);
-
- /**
* Initialize a newly created variable element to have the given [name].
*/
NonParameterVariableElementImpl.forNode(Identifier name)
: _unlinkedVariable = null,
- _kernel = null,
super.forNode(name);
/**
@@ -8073,15 +7084,10 @@
*/
NonParameterVariableElementImpl.forSerialized(
this._unlinkedVariable, ElementImpl enclosingElement)
- : _kernel = null,
- super.forSerialized(enclosingElement);
+ : super.forSerialized(enclosingElement);
@override
int get codeLength {
- if (_kernel != null) {
- var metadata = AnalyzerMetadata.forNode(_kernel);
- return metadata?.codeLength;
- }
if (_unlinkedVariable != null) {
return _unlinkedVariable.codeRange?.length;
}
@@ -8090,10 +7096,6 @@
@override
int get codeOffset {
- if (_kernel != null) {
- var metadata = AnalyzerMetadata.forNode(_kernel);
- return metadata?.codeOffset;
- }
if (_unlinkedVariable != null) {
return _unlinkedVariable.codeRange?.offset;
}
@@ -8102,10 +7104,6 @@
@override
String get documentationComment {
- if (_kernel != null) {
- var metadata = AnalyzerMetadata.forNode(_kernel);
- return metadata?.documentationComment;
- }
if (_unlinkedVariable != null) {
return _unlinkedVariable.documentationComment?.text;
}
@@ -8129,11 +7127,6 @@
@override
FunctionElement get initializer {
if (_initializer == null) {
- if (_kernel != null && _kernel.initializer != null) {
- _initializer = new FunctionElementImpl.forOffset(-1)
- ..enclosingElement = this
- ..isSynthetic = true;
- }
if (_unlinkedVariable != null) {
UnlinkedExecutable unlinkedInitializer = _unlinkedVariable.initializer;
if (unlinkedInitializer != null) {
@@ -8159,9 +7152,6 @@
@override
bool get isConst {
- if (_kernel != null) {
- return _kernel.isConst;
- }
if (_unlinkedVariable != null) {
return _unlinkedVariable.isConst;
}
@@ -8176,9 +7166,6 @@
@override
bool get isFinal {
- if (_kernel != null) {
- return _kernel.isFinal;
- }
if (_unlinkedVariable != null) {
return _unlinkedVariable.isFinal;
}
@@ -8193,10 +7180,6 @@
@override
List<ElementAnnotation> get metadata {
- if (_kernel != null) {
- _metadata ??=
- enclosingUnit._kernelContext.buildAnnotations(_kernel.annotations);
- }
if (_unlinkedVariable != null) {
return _metadata ??=
_buildAnnotations(enclosingUnit, _unlinkedVariable.annotations);
@@ -8206,9 +7189,6 @@
@override
String get name {
- if (_kernel != null) {
- return _kernel.name.name;
- }
if (_unlinkedVariable != null) {
return _unlinkedVariable.name;
}
@@ -8219,9 +7199,6 @@
int get nameOffset {
int offset = super.nameOffset;
if (offset == 0) {
- if (_kernel != null) {
- return _kernel.fileOffset;
- }
if (_unlinkedVariable != null) {
return _unlinkedVariable.nameOffset;
}
@@ -8231,9 +7208,6 @@
@override
DartType get type {
- if (_kernel != null) {
- return _type ??= enclosingUnit._kernelContext.getType(this, _kernel.type);
- }
if (_unlinkedVariable != null && _declaredType == null && _type == null) {
_type = enclosingUnit.resynthesizerContext
.resolveLinkedType(this, _unlinkedVariable.inferredTypeSlot);
@@ -8260,11 +7234,6 @@
}
/**
- * Subclasses need this getter, see [ConstVariableElement._kernelInitializer].
- */
- kernel.Expression get _kernelInitializer => _kernel?.initializer;
-
- /**
* Subclasses need this getter, see [ConstVariableElement._unlinkedConst].
*/
UnlinkedExpr get _unlinkedConst => _unlinkedVariable?.initializer?.bodyExpr;
@@ -8282,11 +7251,6 @@
final UnlinkedParam unlinkedParam;
/**
- * The kernel of the element;
- */
- final kernel.VariableDeclaration _kernel;
-
- /**
* The kind of this parameter.
*/
ParameterKind _parameterKind;
@@ -8315,23 +7279,13 @@
*/
ParameterElementImpl(String name, int nameOffset)
: unlinkedParam = null,
- _kernel = null,
super(name, nameOffset);
/**
- * Initialize using the given kernel.
- */
- ParameterElementImpl.forKernel(
- ElementImpl enclosingElement, this._kernel, this._parameterKind)
- : unlinkedParam = null,
- super.forKernel(enclosingElement);
-
- /**
* Initialize a newly created parameter element to have the given [name].
*/
ParameterElementImpl.forNode(Identifier name)
: unlinkedParam = null,
- _kernel = null,
super.forNode(name);
/**
@@ -8339,8 +7293,7 @@
*/
ParameterElementImpl.forSerialized(
this.unlinkedParam, ElementImpl enclosingElement)
- : _kernel = null,
- super.forSerialized(enclosingElement);
+ : super.forSerialized(enclosingElement);
/**
* Initialize using the given serialized information.
@@ -8384,10 +7337,6 @@
@override
int get codeLength {
- if (_kernel != null) {
- var metadata = AnalyzerMetadata.forNode(_kernel);
- return metadata?.codeLength;
- }
if (unlinkedParam != null) {
return unlinkedParam.codeRange?.length;
}
@@ -8396,10 +7345,6 @@
@override
int get codeOffset {
- if (_kernel != null) {
- var metadata = AnalyzerMetadata.forNode(_kernel);
- return metadata?.codeOffset;
- }
if (unlinkedParam != null) {
return unlinkedParam.codeRange?.offset;
}
@@ -8464,11 +7409,6 @@
@override
FunctionElement get initializer {
if (_initializer == null) {
- if (_kernel != null) {
- _initializer = new FunctionElementImpl.forOffset(-1)
- ..enclosingElement = this
- ..isSynthetic = true;
- }
if (unlinkedParam != null) {
UnlinkedExecutable unlinkedInitializer = unlinkedParam.initializer;
if (unlinkedInitializer != null) {
@@ -8494,9 +7434,6 @@
@override
bool get isConst {
- if (_kernel != null) {
- return false;
- }
if (unlinkedParam != null) {
return false;
}
@@ -8526,9 +7463,6 @@
* Return true if this parameter is explicitly marked as being covariant.
*/
bool get isExplicitlyCovariant {
- if (_kernel != null) {
- return _kernel.isCovariant;
- }
if (unlinkedParam != null) {
return unlinkedParam.isExplicitlyCovariant;
}
@@ -8545,9 +7479,6 @@
@override
bool get isFinal {
- if (_kernel != null) {
- return _kernel.isFinal;
- }
if (unlinkedParam != null) {
return unlinkedParam.isFinal;
}
@@ -8574,10 +7505,6 @@
@override
List<ElementAnnotation> get metadata {
- if (_kernel != null) {
- _metadata ??=
- enclosingUnit._kernelContext.buildAnnotations(_kernel.annotations);
- }
if (unlinkedParam != null) {
return _metadata ??=
_buildAnnotations(enclosingUnit, unlinkedParam.annotations);
@@ -8587,9 +7514,6 @@
@override
String get name {
- if (_kernel != null) {
- return _kernel.name;
- }
if (unlinkedParam != null) {
return unlinkedParam.name;
}
@@ -8600,9 +7524,6 @@
int get nameOffset {
int offset = super.nameOffset;
if (offset == 0) {
- if (_kernel != null) {
- return _kernel.fileOffset;
- }
if (unlinkedParam != null) {
if (isSynthetic ||
(unlinkedParam.name.isEmpty &&
@@ -8681,11 +7602,6 @@
}
/**
- * Subclasses need this getter, see [ConstVariableElement._kernelInitializer].
- */
- kernel.Expression get _kernelInitializer => _kernel?.initializer;
-
- /**
* Subclasses need this getter, see [ConstVariableElement._unlinkedConst].
*/
UnlinkedExpr get _unlinkedConst => unlinkedParam?.initializer?.bodyExpr;
@@ -8737,10 +7653,6 @@
* been build yet, build them and remember in the corresponding fields.
*/
void _resynthesizeTypeAndParameters() {
- if (_kernel != null && _type == null) {
- kernel.DartType type = _kernel.type;
- _type = enclosingUnit._kernelContext.getType(this, type);
- }
if (unlinkedParam != null && _declaredType == null && _type == null) {
if (unlinkedParam.isFunctionTyped) {
CompilationUnitElementImpl enclosingUnit = this.enclosingUnit;
@@ -8769,68 +7681,6 @@
}
/**
- * Create and return [ParameterElement]s for the given [function].
- */
- static List<ParameterElement> forKernelFunction(
- ElementImpl enclosingElement, kernel.FunctionNode function) {
- return forKernelParameters(
- enclosingElement,
- function.requiredParameterCount,
- function.positionalParameters,
- function.namedParameters);
- }
-
- /**
- * Create and return [ParameterElement]s for the given Kernel parameters.
- */
- static List<ParameterElement> forKernelParameters(
- ElementImpl enclosingElement,
- int requiredParameterCount,
- List<kernel.VariableDeclaration> positionalParameters,
- List<kernel.VariableDeclaration> namedParameters) {
- if (positionalParameters.isNotEmpty || namedParameters.isNotEmpty) {
- var parameters = <ParameterElement>[];
-
- // Add positional required and optional parameters.
- for (int i = 0; i < positionalParameters.length; i++) {
- kernel.VariableDeclaration parameter = positionalParameters[i];
- if (i < requiredParameterCount) {
- if (parameter.isFieldFormal) {
- parameters.add(new FieldFormalParameterElementImpl.forKernel(
- enclosingElement, parameter, ParameterKind.REQUIRED));
- } else {
- parameters.add(new ParameterElementImpl.forKernel(
- enclosingElement, parameter, ParameterKind.REQUIRED));
- }
- } else {
- if (parameter.isFieldFormal) {
- parameters.add(new DefaultFieldFormalParameterElementImpl.forKernel(
- enclosingElement, parameter, ParameterKind.POSITIONAL));
- } else {
- parameters.add(new DefaultParameterElementImpl.forKernel(
- enclosingElement, parameter, ParameterKind.POSITIONAL));
- }
- }
- }
-
- // Add named parameters.
- for (var k in namedParameters) {
- if (k.isFieldFormal) {
- parameters.add(new DefaultFieldFormalParameterElementImpl.forKernel(
- enclosingElement, k, ParameterKind.NAMED));
- } else {
- parameters.add(new DefaultParameterElementImpl.forKernel(
- enclosingElement, k, ParameterKind.NAMED));
- }
- }
-
- return parameters;
- } else {
- return const <ParameterElement>[];
- }
- }
-
- /**
* Create and return [ParameterElement]s for the given [unlinkedParameters].
*/
static List<ParameterElement> resynthesizeList(
@@ -8962,32 +7812,18 @@
final UnlinkedImport _unlinkedImport;
/**
- * The kernel of the element.
- */
- final kernel.LibraryDependency _kernel;
-
- /**
* Initialize a newly created method element to have the given [name] and
* [nameOffset].
*/
PrefixElementImpl(String name, int nameOffset)
: _unlinkedImport = null,
- _kernel = null,
super(name, nameOffset);
/**
- * Initialize using the given kernel.
- */
- PrefixElementImpl.forKernel(LibraryElementImpl enclosingLibrary, this._kernel)
- : _unlinkedImport = null,
- super.forKernel(enclosingLibrary);
-
- /**
* Initialize a newly created prefix element to have the given [name].
*/
PrefixElementImpl.forNode(Identifier name)
: _unlinkedImport = null,
- _kernel = null,
super.forNode(name);
/**
@@ -8995,8 +7831,7 @@
*/
PrefixElementImpl.forSerialized(
this._unlinkedImport, LibraryElementImpl enclosingLibrary)
- : _kernel = null,
- super.forSerialized(enclosingLibrary);
+ : super.forSerialized(enclosingLibrary);
@override
String get displayName => name;
@@ -9017,9 +7852,6 @@
@override
String get name {
if (_name == null) {
- if (_kernel != null) {
- return _name = _kernel.name;
- }
if (_unlinkedImport != null) {
LibraryElementImpl library = enclosingElement as LibraryElementImpl;
int prefixId = _unlinkedImport.prefixReference;
@@ -9032,10 +7864,6 @@
@override
int get nameOffset {
int offset = super.nameOffset;
- if (_kernel != null) {
- var metadata = AnalyzerMetadata.forNode(_kernel);
- return metadata.importPrefixOffset;
- }
if (offset == 0 && _unlinkedImport != null) {
return _unlinkedImport.prefixOffset;
}
@@ -9058,11 +7886,6 @@
class PropertyAccessorElementImpl extends ExecutableElementImpl
implements PropertyAccessorElement {
/**
- * The kernel of the element.
- */
- final kernel.Procedure _kernelProcedure;
-
- /**
* The variable associated with this accessor.
*/
PropertyInducingElement variable;
@@ -9071,40 +7894,27 @@
* Initialize a newly created property accessor element to have the given
* [name] and [offset].
*/
- PropertyAccessorElementImpl(String name, int offset)
- : _kernelProcedure = null,
- super(name, offset);
-
- /**
- * Initialize using the given kernel.
- */
- PropertyAccessorElementImpl.forKernel(
- ElementImpl enclosingElement, this._kernelProcedure)
- : super.forKernel(enclosingElement, _kernelProcedure);
+ PropertyAccessorElementImpl(String name, int offset) : super(name, offset);
/**
* Initialize a newly created property accessor element to have the given
* [name].
*/
- PropertyAccessorElementImpl.forNode(Identifier name)
- : _kernelProcedure = null,
- super.forNode(name);
+ PropertyAccessorElementImpl.forNode(Identifier name) : super.forNode(name);
/**
* Initialize using the given serialized information.
*/
PropertyAccessorElementImpl.forSerialized(
UnlinkedExecutable serializedExecutable, ElementImpl enclosingElement)
- : _kernelProcedure = null,
- super.forSerialized(serializedExecutable, enclosingElement);
+ : super.forSerialized(serializedExecutable, enclosingElement);
/**
* Initialize a newly created synthetic property accessor element to be
* associated with the given [variable].
*/
PropertyAccessorElementImpl.forVariable(PropertyInducingElementImpl variable)
- : _kernelProcedure = null,
- super(variable.name, variable.nameOffset) {
+ : super(variable.name, variable.nameOffset) {
this.variable = variable;
isStatic = variable.isStatic;
isSynthetic = true;
@@ -9174,9 +7984,6 @@
@override
bool get isGetter {
- if (_kernel != null) {
- return _kernelProcedure.kind == kernel.ProcedureKind.Getter;
- }
if (serializedExecutable != null) {
return serializedExecutable.kind == UnlinkedExecutableKind.getter;
}
@@ -9185,9 +7992,6 @@
@override
bool get isSetter {
- if (_kernel != null) {
- return _kernelProcedure.kind == kernel.ProcedureKind.Setter;
- }
if (serializedExecutable != null) {
return serializedExecutable.kind == UnlinkedExecutableKind.setter;
}
@@ -9196,9 +8000,6 @@
@override
bool get isStatic {
- if (_kernel != null) {
- return _kernelProcedure.isStatic;
- }
if (serializedExecutable != null) {
return serializedExecutable.isStatic ||
variable is TopLevelVariableElement;
@@ -9374,18 +8175,6 @@
PropertyInducingElementImpl(String name, int offset) : super(name, offset);
/**
- * Initialize using the given kernel.
- */
- PropertyInducingElementImpl.forKernel(
- ElementImpl enclosingElement, kernel.Field kernel)
- : super.forKernel(enclosingElement, kernel) {
- getter = new PropertyAccessorElementImpl_ImplicitGetter(this);
- if (!isFinal && !isConst) {
- setter = new PropertyAccessorElementImpl_ImplicitSetter(this);
- }
- }
-
- /**
* Initialize a newly created element to have the given [name].
*/
PropertyInducingElementImpl.forNode(Identifier name) : super.forNode(name);
@@ -9501,11 +8290,6 @@
final UnlinkedCombinator _unlinkedCombinator;
/**
- * The kernel for the element.
- */
- final kernel.Combinator _kernel;
-
- /**
* The names that are to be made visible in the importing library if they are
* defined in the imported library.
*/
@@ -9522,21 +8306,12 @@
*/
int _offset = 0;
- ShowElementCombinatorImpl()
- : _unlinkedCombinator = null,
- _kernel = null;
-
- /**
- * Initialize using the given kernel.
- */
- ShowElementCombinatorImpl.forKernel(this._kernel)
- : _unlinkedCombinator = null;
+ ShowElementCombinatorImpl() : _unlinkedCombinator = null;
/**
* Initialize using the given serialized information.
*/
- ShowElementCombinatorImpl.forSerialized(this._unlinkedCombinator)
- : _kernel = null;
+ ShowElementCombinatorImpl.forSerialized(this._unlinkedCombinator);
@override
int get end {
@@ -9566,9 +8341,6 @@
@override
List<String> get shownNames {
- if (_kernel != null) {
- _shownNames ??= _kernel.names;
- }
if (_unlinkedCombinator != null) {
_shownNames ??= _unlinkedCombinator.shows.toList(growable: false);
}
@@ -9607,13 +8379,6 @@
TopLevelVariableElementImpl(String name, int offset) : super(name, offset);
/**
- * Initialize using the given kernel.
- */
- TopLevelVariableElementImpl.forKernel(
- ElementImpl enclosingElement, kernel.Field kernel)
- : super.forKernel(enclosingElement, kernel);
-
- /**
* Initialize a newly created top-level variable element to have the given
* [name].
*/
@@ -9664,11 +8429,6 @@
final int nestingLevel;
/**
- * The kernel of the element.
- */
- final kernel.TypeParameter _kernel;
-
- /**
* The type defined by this type parameter.
*/
TypeParameterType _type;
@@ -9686,25 +8446,14 @@
TypeParameterElementImpl(String name, int offset)
: _unlinkedTypeParam = null,
nestingLevel = null,
- _kernel = null,
super(name, offset);
/**
- * Initialize using the given kernel.
- */
- TypeParameterElementImpl.forKernel(
- TypeParameterizedElementMixin enclosingElement, this._kernel)
- : _unlinkedTypeParam = null,
- nestingLevel = null,
- super.forKernel(enclosingElement);
-
- /**
* Initialize a newly created type parameter element to have the given [name].
*/
TypeParameterElementImpl.forNode(Identifier name)
: _unlinkedTypeParam = null,
nestingLevel = null,
- _kernel = null,
super.forNode(name);
/**
@@ -9712,8 +8461,7 @@
*/
TypeParameterElementImpl.forSerialized(this._unlinkedTypeParam,
TypeParameterizedElementMixin enclosingElement, this.nestingLevel)
- : _kernel = null,
- super.forSerialized(enclosingElement);
+ : super.forSerialized(enclosingElement);
/**
* Initialize a newly created synthetic type parameter element to have the
@@ -9721,18 +8469,12 @@
*/
TypeParameterElementImpl.synthetic(String name, {this.nestingLevel})
: _unlinkedTypeParam = null,
- _kernel = null,
super(name, -1) {
isSynthetic = true;
}
DartType get bound {
if (_bound == null) {
- if (_kernel != null) {
- _bound = enclosingUnit._kernelContext.getType(this, _kernel.bound);
- // TODO(scheglov) Add a flag for explicit bound.
- if (_bound != null && _bound.isObject) _bound = null;
- }
if (_unlinkedTypeParam != null) {
if (_unlinkedTypeParam.bound == null) {
return null;
@@ -9783,9 +8525,6 @@
@override
String get name {
- if (_kernel != null) {
- return _kernel.name;
- }
if (_unlinkedTypeParam != null) {
return _unlinkedTypeParam.name;
}
@@ -9802,9 +8541,6 @@
}
TypeParameterType get type {
- if (_kernel != null) {
- _type ??= new TypeParameterTypeImpl(this);
- }
if (_unlinkedTypeParam != null) {
_type ??= new TypeParameterTypeImpl(this);
}
@@ -9894,12 +8630,6 @@
*/
CompilationUnitElementImpl get enclosingUnit;
- /**
- * Get the [kernel.TypeParameter]s declared by this element, or `null` if
- * this elements isn't from a kernel.
- */
- List<kernel.TypeParameter> get kernelTypeParams => const [];
-
@override
TypeParameterizedElementMixin get typeParameterContext => this;
@@ -9913,17 +8643,6 @@
@override
List<TypeParameterElement> get typeParameters {
if (_typeParameterElements == null) {
- List<kernel.TypeParameter> kernelParams = kernelTypeParams;
- if (kernelParams != null) {
- int numTypeParameters = kernelParams.length;
- _typeParameterElements =
- new List<TypeParameterElement>(numTypeParameters);
- for (int i = 0; i < numTypeParameters; i++) {
- _typeParameterElements[i] =
- new TypeParameterElementImpl.forKernel(this, kernelParams[i]);
- }
- }
-
List<UnlinkedTypeParam> unlinkedParams = unlinkedTypeParams;
if (unlinkedParams != null) {
int enclosingNestingLevel =
@@ -10045,12 +8764,6 @@
UriReferencedElementImpl(String name, int offset) : super(name, offset);
/**
- * Initialize for resynthesizing from kernel.
- */
- UriReferencedElementImpl.forKernel(ElementImpl enclosingElement)
- : super.forKernel(enclosingElement);
-
- /**
* Initialize using the given serialized information.
*/
UriReferencedElementImpl.forSerialized(ElementImpl enclosingElement)
@@ -10134,12 +8847,6 @@
VariableElementImpl(String name, int offset) : super(name, offset);
/**
- * Initialize for resynthesizing form kernel.
- */
- VariableElementImpl.forKernel(ElementImpl enclosingElement)
- : super.forKernel(enclosingElement);
-
- /**
* Initialize a newly created variable element to have the given [name].
*/
VariableElementImpl.forNode(Identifier name) : super.forNode(name);
diff --git a/pkg/analyzer/lib/src/dart/element/handle.dart b/pkg/analyzer/lib/src/dart/element/handle.dart
index 331832d..f2929a7 100644
--- a/pkg/analyzer/lib/src/dart/element/handle.dart
+++ b/pkg/analyzer/lib/src/dart/element/handle.dart
@@ -228,6 +228,9 @@
LineInfo get lineInfo => actualElement.lineInfo;
@override
+ List<ClassElement> get mixins => actualElement.mixins;
+
+ @override
Source get source => actualElement.source;
@override
diff --git a/pkg/analyzer/lib/src/dart/element/wrapped.dart b/pkg/analyzer/lib/src/dart/element/wrapped.dart
index cd3d985..aaad9cd 100644
--- a/pkg/analyzer/lib/src/dart/element/wrapped.dart
+++ b/pkg/analyzer/lib/src/dart/element/wrapped.dart
@@ -139,6 +139,9 @@
List<ElementAnnotation> get metadata => wrappedUnit.metadata;
@override
+ List<ClassElement> get mixins => wrappedUnit.mixins;
+
+ @override
String get name => wrappedUnit.name;
@override
diff --git a/pkg/analyzer/lib/src/dart/error/syntactic_errors.dart b/pkg/analyzer/lib/src/dart/error/syntactic_errors.dart
index 9ca8202..c1361b0 100644
--- a/pkg/analyzer/lib/src/dart/error/syntactic_errors.dart
+++ b/pkg/analyzer/lib/src/dart/error/syntactic_errors.dart
@@ -413,6 +413,11 @@
correction:
"Try moving the extends clause before the implements clause.");
+ static const ParserErrorCode IMPLEMENTS_BEFORE_ON = const ParserErrorCode(
+ 'IMPLEMENTS_BEFORE_ON',
+ "The on clause must be before the implements clause.",
+ correction: "Try moving the on clause before the implements clause.");
+
static const ParserErrorCode IMPLEMENTS_BEFORE_WITH = const ParserErrorCode(
'IMPLEMENTS_BEFORE_WITH',
"The with clause must be before the implements clause.",
@@ -525,6 +530,7 @@
correction: "Try adding either a catch or finally clause, or "
"remove the try statement.");
+ /// TODO(danrubel): Consider splitting this into two separate error messages.
static const ParserErrorCode MISSING_CLASS_BODY = const ParserErrorCode(
'MISSING_CLASS_BODY',
"A class or mixin definition must have a body, even if it is empty.",
@@ -655,7 +661,7 @@
static const ParserErrorCode MULTIPLE_IMPLEMENTS_CLAUSES = const ParserErrorCode(
'MULTIPLE_IMPLEMENTS_CLAUSES',
- "Each class definition can have at most one implements clause.",
+ "Each class or mixin definition can have at most one implements clause.",
correction:
"Try combining all of the implements clauses into a single clause.");
@@ -669,6 +675,11 @@
"Can't have multiple groups of named parameters in a single parameter list.",
correction: "Try combining all of the groups into a single group.");
+ static const ParserErrorCode MULTIPLE_ON_CLAUSES = const ParserErrorCode(
+ 'MULTIPLE_ON_CLAUSES',
+ "Each mixin definition can have at most one on clause.",
+ correction: "Try combining all of the on clauses into a single clause.");
+
static const ParserErrorCode MULTIPLE_PART_OF_DIRECTIVES =
const ParserErrorCode('MULTIPLE_PART_OF_DIRECTIVES',
"Only one part-of directive may be declared in a file.",
diff --git a/pkg/analyzer/lib/src/dart/resolver/scope.dart b/pkg/analyzer/lib/src/dart/resolver/scope.dart
index 5c8706a..2e688d6 100644
--- a/pkg/analyzer/lib/src/dart/resolver/scope.dart
+++ b/pkg/analyzer/lib/src/dart/resolver/scope.dart
@@ -373,13 +373,6 @@
*/
class LibraryImportScope extends Scope {
/**
- * The name of the property containing a list of the elements from the SDK
- * that conflict with the single name imported from non-SDK libraries. The
- * value of the property is always of type `List<Element>`.
- */
- static const String conflictingSdkElements = 'conflictingSdkElements';
-
- /**
* The element representing the library in which this scope is enclosed.
*/
final LibraryElement _definingLibrary;
@@ -539,38 +532,48 @@
Element _lookupInImportedNamespaces(
Identifier identifier, Element lookup(Namespace namespace)) {
- Set<Element> sdkElements = new HashSet<Element>();
- Set<Element> nonSdkElements = new HashSet<Element>();
+ Element result;
+
+ bool hasPotentialConflict = false;
for (int i = 0; i < _importedNamespaces.length; i++) {
Element element = lookup(_importedNamespaces[i]);
if (element != null) {
- if (element.library.isInSdk) {
- sdkElements.add(element);
+ if (result == null || result == element) {
+ result = element;
} else {
- nonSdkElements.add(element);
+ hasPotentialConflict = true;
}
}
}
- int nonSdkCount = nonSdkElements.length;
- int sdkCount = sdkElements.length;
- if (nonSdkCount == 0) {
- if (sdkCount == 0) {
- return null;
- } else if (sdkCount == 1) {
- return sdkElements.first;
+
+ if (hasPotentialConflict) {
+ var sdkElements = new Set<Element>();
+ var nonSdkElements = new Set<Element>();
+ for (int i = 0; i < _importedNamespaces.length; i++) {
+ Element element = lookup(_importedNamespaces[i]);
+ if (element != null) {
+ if (element.library.isInSdk) {
+ sdkElements.add(element);
+ } else {
+ nonSdkElements.add(element);
+ }
+ }
+ }
+ if (sdkElements.length > 1 || nonSdkElements.length > 1) {
+ var conflictingElements = <Element>[]
+ ..addAll(sdkElements)
+ ..addAll(nonSdkElements);
+ return new MultiplyDefinedElementImpl(_definingLibrary.context,
+ conflictingElements.first.name, conflictingElements);
+ }
+ if (nonSdkElements.isNotEmpty) {
+ result = nonSdkElements.first;
+ } else if (sdkElements.isNotEmpty) {
+ result = sdkElements.first;
}
}
- if (nonSdkCount == 1) {
- if (sdkCount > 0) {
- identifier.setProperty(
- conflictingSdkElements, sdkElements.toList(growable: false));
- }
- return nonSdkElements.first;
- }
- return new MultiplyDefinedElementImpl(
- _definingLibrary.context,
- sdkElements.toList(growable: false),
- nonSdkElements.toList(growable: false));
+
+ return result;
}
}
@@ -635,6 +638,9 @@
in compilationUnit.functionTypeAliases) {
define(element);
}
+ for (ClassElement element in compilationUnit.mixins) {
+ define(element);
+ }
for (ClassElement element in compilationUnit.types) {
define(element);
}
diff --git a/pkg/analyzer/lib/src/dart/scanner/scanner.dart b/pkg/analyzer/lib/src/dart/scanner/scanner.dart
index 192befa..66066c9 100644
--- a/pkg/analyzer/lib/src/dart/scanner/scanner.dart
+++ b/pkg/analyzer/lib/src/dart/scanner/scanner.dart
@@ -53,8 +53,6 @@
Token firstToken;
- bool scanGenericMethodComments = false;
-
bool scanLazyAssignmentOperators = false;
/**
@@ -104,7 +102,6 @@
Token tokenize() {
fasta.ScannerResult result = fasta.scanString(_contents,
includeComments: _preserveComments,
- scanGenericMethodComments: scanGenericMethodComments,
scanLazyAssignmentOperators: scanLazyAssignmentOperators);
// fasta pretends there is an additional line at EOF
diff --git a/pkg/analyzer/lib/src/dart/sdk/patch.dart b/pkg/analyzer/lib/src/dart/sdk/patch.dart
index 7066cdb..532ae5e 100644
--- a/pkg/analyzer/lib/src/dart/sdk/patch.dart
+++ b/pkg/analyzer/lib/src/dart/sdk/patch.dart
@@ -29,12 +29,10 @@
*/
void patch(
ResourceProvider resourceProvider,
- bool strongMode,
Map<String, List<String>> allPatchPaths,
AnalysisErrorListener errorListener,
Source source,
CompilationUnit unit) {
- // TODO(brianwilkerson) Remove the 'strongMode' parameter.
// Process URI.
String libraryUriStr;
bool isLibraryDefiningUnit;
@@ -60,7 +58,7 @@
'The patch file ${patchFile.path} for $source does not exist.');
}
Source patchSource = patchFile.createSource();
- CompilationUnit patchUnit = parse(patchSource, strongMode, errorListener);
+ CompilationUnit patchUnit = parse(patchSource, errorListener);
// Prepare for reporting errors.
_baseDesc = source.toString();
@@ -408,17 +406,15 @@
*/
@visibleForTesting
static CompilationUnit parse(
- Source source, bool strong, AnalysisErrorListener errorListener) {
+ Source source, AnalysisErrorListener errorListener) {
String code = source.contents.data;
CharSequenceReader reader = new CharSequenceReader(code);
Scanner scanner = new Scanner(source, reader, errorListener);
- scanner.scanGenericMethodComments = strong;
Token token = scanner.tokenize();
LineInfo lineInfo = new LineInfo(scanner.lineStarts);
Parser parser = new Parser(source, errorListener);
- parser.parseGenericMethodComments = strong;
CompilationUnit unit = parser.parseCompilationUnit(token);
unit.lineInfo = lineInfo;
return unit;
diff --git a/pkg/analyzer/lib/src/dart/sdk/sdk.dart b/pkg/analyzer/lib/src/dart/sdk/sdk.dart
index 194a08a..f645f41 100644
--- a/pkg/analyzer/lib/src/dart/sdk/sdk.dart
+++ b/pkg/analyzer/lib/src/dart/sdk/sdk.dart
@@ -163,9 +163,7 @@
@override
PackageBundle getLinkedBundle() {
if (_useSummary) {
- // TODO(brianwilkerson) 'strongMode' should probably always be 'true'.
- bool strongMode = _analysisOptions != null;
- _sdkBundle ??= getSummarySdkBundle(strongMode);
+ _sdkBundle ??= getSummarySdkBundle();
return _sdkBundle;
}
return null;
@@ -181,7 +179,7 @@
* This method should not be used outside of `analyzer` and `analyzer_cli`
* packages.
*/
- PackageBundle getSummarySdkBundle(bool strongMode);
+ PackageBundle getSummarySdkBundle();
Source internalMapDartUri(String dartUri) {
// TODO(brianwilkerson) Figure out how to unify the implementations in the
@@ -300,8 +298,8 @@
String getRelativePathFromFile(File file) => file.path;
@override
- PackageBundle getSummarySdkBundle(bool strongMode) {
- String name = strongMode ? 'strong.sum' : 'spec.sum';
+ PackageBundle getSummarySdkBundle() {
+ String name = 'strong.sum';
File file = _embedderYamlLibFolder.parent.getChildAssumingFile(name);
try {
if (file.exists) {
@@ -584,7 +582,7 @@
* This method should not be used outside of `analyzer` and `analyzer_cli`
* packages.
*/
- PackageBundle getSummarySdkBundle(bool _) {
+ PackageBundle getSummarySdkBundle() {
String rootPath = directory.path;
String name = 'strong.sum';
String path =
diff --git a/pkg/analyzer/lib/src/error/codes.dart b/pkg/analyzer/lib/src/error/codes.dart
index a38ea7e..5adc23c7 100644
--- a/pkg/analyzer/lib/src/error/codes.dart
+++ b/pkg/analyzer/lib/src/error/codes.dart
@@ -944,15 +944,6 @@
correction: "Try exporting the library that the part is a part of.");
/**
- * Enum proposal: It is a compile-time error to subclass, mix-in or implement
- * an enum.
- */
- static const CompileTimeErrorCode EXTENDS_ENUM = const CompileTimeErrorCode(
- 'EXTENDS_ENUM', "Classes can't extend an enum.",
- correction:
- "Try specifying a different superclass, or removing the extends clause.");
-
- /**
* 7.9 Superclasses: It is a compile-time error if the extends clause of a
* class <i>C</i> includes a type expression that does not denote a class
* available in the lexical scope of <i>C</i>.
@@ -1009,8 +1000,8 @@
* See [IMPLEMENTS_DEFERRED_CLASS], and [MIXIN_DEFERRED_CLASS].
*/
static const CompileTimeErrorCode EXTENDS_DEFERRED_CLASS =
- const CompileTimeErrorCode('EXTENDS_DEFERRED_CLASS',
- "This class can't extend the deferred class '{0}'.",
+ const CompileTimeErrorCode(
+ 'EXTENDS_DEFERRED_CLASS', "Classes can't extend deferred classes.",
correction: "Try specifying a different superclass, or "
"removing the extends clause.");
@@ -1169,14 +1160,11 @@
* of a class <i>C</i> specifies a malformed type or deferred type as a
* superinterface.
*
- * Parameters:
- * 0: the name of the type that is deferred
- *
* See [EXTENDS_DEFERRED_CLASS], and [MIXIN_DEFERRED_CLASS].
*/
static const CompileTimeErrorCode IMPLEMENTS_DEFERRED_CLASS =
const CompileTimeErrorCode('IMPLEMENTS_DEFERRED_CLASS',
- "This class can't implement the deferred class '{0}'.",
+ "Classes and mixins can't implement deferred classes.",
correction: "Try specifying a different interface, "
"removing the class from the list, or "
"changing the import to not be deferred.");
@@ -1207,33 +1195,13 @@
* See [EXTENDS_DISALLOWED_CLASS].
*/
static const CompileTimeErrorCode IMPLEMENTS_DISALLOWED_CLASS =
- const CompileTimeErrorCode(
- 'IMPLEMENTS_DISALLOWED_CLASS', "Classes can't implement '{0}'.",
+ const CompileTimeErrorCode('IMPLEMENTS_DISALLOWED_CLASS',
+ "Classes and mixins can't implement '{0}'.",
correction: "Try specifying a different interface, or "
"remove the class from the list.");
/**
* 7.10 Superinterfaces: It is a compile-time error if the implements clause
- * of a class includes type dynamic.
- */
- static const CompileTimeErrorCode IMPLEMENTS_DYNAMIC =
- const CompileTimeErrorCode(
- 'IMPLEMENTS_DYNAMIC', "Classes can't implement 'dynamic'.",
- correction:
- "Try specifying an interface, or remove 'dynamic' from the list.");
-
- /**
- * Enum proposal: It is a compile-time error to subclass, mix-in or implement
- * an enum.
- */
- static const CompileTimeErrorCode IMPLEMENTS_ENUM =
- const CompileTimeErrorCode(
- 'IMPLEMENTS_ENUM', "Classes can't implement an enum.",
- correction:
- "Try specifying an interface, or remove the enum from the list.");
-
- /**
- * 7.10 Superinterfaces: It is a compile-time error if the implements clause
* of a class <i>C</i> includes a type expression that does not denote a class
* available in the lexical scope of <i>C</i>.
*
@@ -1241,8 +1209,8 @@
* 0: the name of the interface that was not found
*/
static const CompileTimeErrorCode IMPLEMENTS_NON_CLASS =
- const CompileTimeErrorCode(
- 'IMPLEMENTS_NON_CLASS', "Classes can only implement other classes.",
+ const CompileTimeErrorCode('IMPLEMENTS_NON_CLASS',
+ "Classes and mixins can only implement classes.",
correction:
"Try specifying a class, or remove the name from the list.");
@@ -1702,13 +1670,21 @@
* Parameters:
* 0: the name of the mixin that is invalid
*/
- static const CompileTimeErrorCode MIXIN_DECLARES_CONSTRUCTOR =
+ static const CompileTimeErrorCode MIXIN_CLASS_DECLARES_CONSTRUCTOR =
const CompileTimeErrorCode(
- 'MIXIN_DECLARES_CONSTRUCTOR',
+ 'MIXIN_CLASS_DECLARES_CONSTRUCTOR',
"The class '{0}' can't be used as a mixin because it declares a "
"constructor.");
/**
+ * The <i>mixinMember</i> production allows the same instance or static
+ * members that a class would allow, but no constructors (for now).
+ */
+ static const CompileTimeErrorCode MIXIN_DECLARES_CONSTRUCTOR =
+ const CompileTimeErrorCode(
+ 'MIXIN_DECLARES_CONSTRUCTOR', "Mixins can't declare constructors.");
+
+ /**
* 9.1 Mixin Application: It is a compile-time error if the with clause of a
* mixin application <i>C</i> includes a deferred type expression.
*
@@ -1718,8 +1694,8 @@
* See [EXTENDS_DEFERRED_CLASS], and [IMPLEMENTS_DEFERRED_CLASS].
*/
static const CompileTimeErrorCode MIXIN_DEFERRED_CLASS =
- const CompileTimeErrorCode('MIXIN_DEFERRED_CLASS',
- "This class can't mixin the deferred class '{0}'.",
+ const CompileTimeErrorCode(
+ 'MIXIN_DEFERRED_CLASS', "Classes can't mixin deferred classes.",
correction: "Try changing the import to not be deferred.");
/**
@@ -1799,13 +1775,6 @@
'MIXIN_OF_DISALLOWED_CLASS', "Classes can't mixin '{0}'.");
/**
- * Enum proposal: It is a compile-time error to subclass, mix-in or implement
- * an enum.
- */
- static const CompileTimeErrorCode MIXIN_OF_ENUM = const CompileTimeErrorCode(
- 'MIXIN_OF_ENUM', "Classes can't mixin an enum.");
-
- /**
* 9.1 Mixin Application: It is a compile-time error if <i>M</i> does not
* denote a class or mixin available in the immediately enclosing scope.
*/
@@ -1823,6 +1792,22 @@
"The class '{0}' can't be used as a mixin because it references "
"'super'.");
+ static const CompileTimeErrorCode
+ MIXIN_SUPER_CLASS_CONSTRAINT_DEFERRED_CLASS = const CompileTimeErrorCode(
+ 'MIXIN_SUPER_CLASS_CONSTRAINT_DEFERRED_CLASS',
+ "Deferred classes can't be used as super-class constraints.",
+ correction: "Try changing the import to not be deferred.");
+
+ static const CompileTimeErrorCode
+ MIXIN_SUPER_CLASS_CONSTRAINT_DISALLOWED_CLASS =
+ const CompileTimeErrorCode(
+ 'MIXIN_SUPER_CLASS_CONSTRAINT_DISALLOWED_CLASS',
+ "'{0}' can't be used as a super-class constraint.");
+
+ static const CompileTimeErrorCode MIXIN_SUPER_CLASS_CONSTRAINT_NON_CLASS =
+ const CompileTimeErrorCode('MIXIN_SUPER_CLASS_CONSTRAINT_NON_CLASS',
+ "Only classes can be used as super-class constraints.");
+
/**
* 9.1 Mixin Application: It is a compile-time error if <i>S</i> does not
* denote a class available in the immediately enclosing scope.
@@ -3578,40 +3563,6 @@
correction: "Try making '{1}' abstract, or adding a body to '{0}'.");
/**
- * 14.1 Imports: If a name <i>N</i> is referenced by a library <i>L</i> and
- * <i>N</i> would be introduced into the top level scope of <i>L</i> by an
- * import from a library whose URI begins with <i>dart:</i> and an import from
- * a library whose URI does not begin with <i>dart:</i>:
- * * The import from <i>dart:</i> is implicitly extended by a hide N clause.
- * * A static warning is issued.
- *
- * Parameters:
- * 0: the ambiguous name
- * 1: the name of the dart: library in which the element is found
- * 2: the name of the non-dart: library in which the element is found
- */
- static const StaticWarningCode CONFLICTING_DART_IMPORT =
- const StaticWarningCode('CONFLICTING_DART_IMPORT',
- "Element '{0}' from SDK library '{1}' is implicitly hidden by '{2}'.",
- correction: "Try adding an explicit hide combinator.",
- isStrongModeError: false);
-
- /**
- * 7.2 Getters: It is a static warning if a class <i>C</i> declares an
- * instance getter named <i>v</i> and an accessible static member named
- * <i>v</i> or <i>v=</i> is declared in a superclass of <i>C</i>.
- *
- * Parameters:
- * 0: the name of the super class declaring a static member
- */
- static const StaticWarningCode
- CONFLICTING_INSTANCE_GETTER_AND_SUPERCLASS_MEMBER =
- const StaticWarningCode(
- 'CONFLICTING_INSTANCE_GETTER_AND_SUPERCLASS_MEMBER',
- "Superclass '{0}' declares static member with the same name.",
- correction: "Try renaming either the getter or the static member.");
-
- /**
* 7.1 Instance Methods: It is a static warning if a class <i>C</i> declares
* an instance method named <i>n</i> and has a setter named <i>n=</i>.
*/
@@ -3634,22 +3585,6 @@
correction: "Try renaming either the method or the setter.");
/**
- * 7.3 Setters: It is a static warning if a class <i>C</i> declares an
- * instance setter named <i>v=</i> and an accessible static member named
- * <i>v=</i> or <i>v</i> is declared in a superclass of <i>C</i>.
- *
- * Parameters:
- * 0: the name of the super class declaring a static member
- */
- static const StaticWarningCode
- CONFLICTING_INSTANCE_SETTER_AND_SUPERCLASS_MEMBER =
- const StaticWarningCode(
- 'CONFLICTING_INSTANCE_SETTER_AND_SUPERCLASS_MEMBER',
- "Superclass '{0}' declares a static member with the same name.",
- correction:
- "Try renaming either the setter or the inherited member.");
-
- /**
* 7.2 Getters: It is a static warning if a class declares a static getter
* named <i>v</i> and also has a non-static setter named <i>v=</i>.
*/
@@ -3811,8 +3746,7 @@
// TODO(brianwilkerson) Split this error code so that we can suggest
// initializing fields in constructors (FINAL_FIELD_NOT_INITIALIZED
// and FINAL_VARIABLE_NOT_INITIALIZED).
- correction: "Try initializing the variable.",
- isStrongModeError: false);
+ correction: "Try initializing the variable.");
/**
* 7.6.1 Generative Constructors: Each final instance variable <i>f</i>
@@ -3829,8 +3763,7 @@
static const StaticWarningCode FINAL_NOT_INITIALIZED_CONSTRUCTOR_1 =
const StaticWarningCode('FINAL_NOT_INITIALIZED_CONSTRUCTOR_1',
"The final variable '{0}' must be initialized.",
- correction: "Try adding an initializer for the field.",
- isStrongModeError: false);
+ correction: "Try adding an initializer for the field.");
/**
* 7.6.1 Generative Constructors: Each final instance variable <i>f</i>
@@ -3848,8 +3781,7 @@
static const StaticWarningCode FINAL_NOT_INITIALIZED_CONSTRUCTOR_2 =
const StaticWarningCode('FINAL_NOT_INITIALIZED_CONSTRUCTOR_2',
"The final variables '{0}' and '{1}' must be initialized.",
- correction: "Try adding initializers for the fields.",
- isStrongModeError: false);
+ correction: "Try adding initializers for the fields.");
/**
* 7.6.1 Generative Constructors: Each final instance variable <i>f</i>
@@ -3868,8 +3800,7 @@
static const StaticWarningCode FINAL_NOT_INITIALIZED_CONSTRUCTOR_3_PLUS =
const StaticWarningCode('FINAL_NOT_INITIALIZED_CONSTRUCTOR_3',
"The final variables '{0}', '{1}' and '{2}' more must be initialized.",
- correction: "Try adding initializers for the fields.",
- isStrongModeError: false);
+ correction: "Try adding initializers for the fields.");
/**
* 15.5 Function Types: It is a static warning if a concrete class implements
@@ -3893,8 +3824,7 @@
static const StaticWarningCode IMPORT_DUPLICATED_LIBRARY_NAMED =
const StaticWarningCode('IMPORT_DUPLICATED_LIBRARY_NAMED',
"The imported libraries '{0}' and '{1}' can't have the same name '{2}'.",
- correction: "Try adding a hide clause to one of the imports.",
- isStrongModeError: false);
+ correction: "Try adding a hide clause to one of the imports.");
/**
* 14.1 Imports: It is a static warning if the specified URI of a deferred
@@ -4233,8 +4163,7 @@
'MISMATCHED_GETTER_AND_SETTER_TYPES',
"The parameter type for setter '{0}' is '{1}' which isn't assignable "
"to its getter (of type '{2}').",
- correction: "Try changing the types so that they are compatible.",
- isStrongModeError: false);
+ correction: "Try changing the types so that they are compatible.");
/**
* 7.3 Setters: It is a static warning if a class has a setter named <i>v=</i>
@@ -4247,8 +4176,7 @@
'MISMATCHED_GETTER_AND_SETTER_TYPES_FROM_SUPERTYPE',
"The parameter type for setter '{0}' is '{1}' which isn't assignable "
"to its getter (of type '{2}'), from superclass '{3}'.",
- correction: "Try changing the types so that they are compatible.",
- isStrongModeError: false);
+ correction: "Try changing the types so that they are compatible.");
/**
* 17.9 Switch: It is a static warning if all of the following conditions
@@ -4267,8 +4195,7 @@
const StaticWarningCode(
'MISSING_ENUM_CONSTANT_IN_SWITCH', "Missing case clause for '{0}'.",
correction: "Try adding a case clause for the missing constant, or "
- "adding a default clause.",
- isStrongModeError: false);
+ "adding a default clause.");
/**
* 13.12 Return: It is a static warning if a function contains both one or
@@ -4281,8 +4208,7 @@
// TODO(brianwilkerson) Split this error code depending on whether the
// function declares a return type.
correction: "Try making all the return statements consistent "
- "(either include a value or not).",
- isStrongModeError: false);
+ "(either include a value or not).");
/**
* 12.11.1 New: It is a static warning if <i>q</i> is a constructor of an
@@ -4515,8 +4441,7 @@
static const StaticWarningCode NON_VOID_RETURN_FOR_OPERATOR =
const StaticWarningCode('NON_VOID_RETURN_FOR_OPERATOR',
"The return type of the operator []= must be 'void'.",
- correction: "Try changing the return type to 'void'.",
- isStrongModeError: false);
+ correction: "Try changing the return type to 'void'.");
/**
* 7.3 Setters: It is a static warning if a setter declares a return type
@@ -4526,8 +4451,7 @@
const StaticWarningCode('NON_VOID_RETURN_FOR_SETTER',
"The return type of the setter must be 'void' or absent.",
correction: "Try removing the return type, or "
- "define a method rather than a setter.",
- isStrongModeError: false);
+ "define a method rather than a setter.");
/**
* 15.1 Static Types: A type <i>T</i> is malformed iff:
@@ -4639,7 +4563,7 @@
*/
static const StaticWarningCode RETURN_WITHOUT_VALUE = const StaticWarningCode(
'RETURN_WITHOUT_VALUE', "Missing return value after 'return'.",
- correction: null, isStrongModeError: false);
+ correction: null);
/**
* 12.16.3 Static Invocation: It is a static warning if <i>C</i> does not
@@ -4875,21 +4799,13 @@
' and variables which, in rare cases, may be void as well.');
/**
- * A flag indicating whether this warning is an error when running with strong
- * mode enabled.
- */
- final bool isStrongModeError;
-
- /**
* Initialize a newly created error code to have the given [name]. The message
* associated with the error will be created from the given [message]
* template. The correction associated with the error will be created from the
* given [correction] template.
*/
const StaticWarningCode(String name, String message,
- {String correction,
- this.isStrongModeError = true,
- bool isUnresolvedIdentifier: false})
+ {String correction, bool isUnresolvedIdentifier: false})
: super.temporary(name, message,
correction: correction,
isUnresolvedIdentifier: isUnresolvedIdentifier);
diff --git a/pkg/analyzer/lib/src/fasta/ast_builder.dart b/pkg/analyzer/lib/src/fasta/ast_builder.dart
index 72568c0..68906df 100644
--- a/pkg/analyzer/lib/src/fasta/ast_builder.dart
+++ b/pkg/analyzer/lib/src/fasta/ast_builder.dart
@@ -30,6 +30,7 @@
import 'package:front_end/src/fasta/problems.dart' show unhandled;
import 'package:front_end/src/fasta/messages.dart'
show
+ LocatedMessage,
Message,
messageConstConstructorWithBody,
messageConstMethod,
@@ -71,8 +72,6 @@
/// `native` support.
Parser parser;
- bool parseGenericMethodComments = false;
-
/// The class currently being parsed, or `null` if no class is being parsed.
ClassDeclarationImpl classDeclaration;
@@ -597,12 +596,15 @@
initializerObject.operator,
initializerObject.methodName,
initializerObject.argumentList));
- } else {
+ } else if (target is ThisExpression) {
initializers.add(ast.redirectingConstructorInvocation(
- (target as ThisExpression).thisKeyword,
+ target.thisKeyword,
initializerObject.operator,
initializerObject.methodName,
initializerObject.argumentList));
+ } else {
+ // Invalid initializer
+ // TODO(danrubel): Capture this in the AST.
}
} else if (initializerObject is AssignmentExpression) {
Token thisKeyword;
@@ -1153,13 +1155,8 @@
}
@override
- void endFormalParameter(
- Token thisKeyword,
- Token periodAfterThis,
- Token nameToken,
- FormalParameterKind kind,
- MemberKind memberKind,
- Token endToken) {
+ void endFormalParameter(Token thisKeyword, Token periodAfterThis,
+ Token nameToken, FormalParameterKind kind, MemberKind memberKind) {
assert(optionalOrNull('this', thisKeyword));
assert(thisKeyword == null
? periodAfterThis == null
@@ -1927,6 +1924,29 @@
}
@override
+ void handleRecoverMixinHeader() {
+ ImplementsClause implementsClause = pop(NullValue.IdentifierList);
+ OnClause onClause = pop(NullValue.IdentifierList);
+
+ if (onClause != null) {
+ if (mixinDeclaration.onClause == null) {
+ mixinDeclaration.onClause = onClause;
+ } else {
+ mixinDeclaration.onClause.superclassConstraints
+ .addAll(onClause.superclassConstraints);
+ }
+ }
+ if (implementsClause != null) {
+ if (mixinDeclaration.implementsClause == null) {
+ mixinDeclaration.implementsClause = implementsClause;
+ } else {
+ mixinDeclaration.implementsClause.interfaces
+ .addAll(implementsClause.interfaces);
+ }
+ }
+ }
+
+ @override
void endMixinDeclaration(Token token) {
debugEvent("MixinDeclaration");
mixinDeclaration = null;
@@ -2022,7 +2042,7 @@
} else {
int offset = startToken.offset;
int length = endToken.end - offset;
- addCompileTimeError(message, offset, length);
+ addProblem(message, offset, length);
}
}
@@ -2294,7 +2314,7 @@
@override
void beginMethod(Token externalToken, Token staticToken, Token covariantToken,
- Token varFinalOrConst, Token name) {
+ Token varFinalOrConst, Token getOrSet, Token name) {
_Modifiers modifiers = new _Modifiers();
if (externalToken != null) {
assert(externalToken.isModifier);
@@ -2302,7 +2322,10 @@
}
if (staticToken != null) {
assert(staticToken.isModifier);
- if (name?.lexeme == classDeclaration.name.name) {
+ String className = classDeclaration != null
+ ? classDeclaration.name.name
+ : mixinDeclaration.name.name;
+ if (name?.lexeme == className && getOrSet == null) {
// This error is also reported in OutlineBuilder.beginMethod
handleRecoverableError(
messageStaticConstructor, staticToken, staticToken);
@@ -2744,12 +2767,13 @@
}
@override
- void addCompileTimeError(Message message, int offset, int length) {
+ void addProblem(Message message, int charOffset, int length,
+ {bool wasHandled: false, List<LocatedMessage> context}) {
if (directives.isEmpty &&
message.code.analyzerCode == 'NON_PART_OF_DIRECTIVE_IN_PART') {
message = messageDirectiveAfterDeclaration;
}
- errorReporter.reportMessage(message, offset, length);
+ errorReporter.reportMessage(message, charOffset, length);
}
/// Return `true` if [token] is either `null` or is the symbol or keyword
diff --git a/pkg/analyzer/lib/src/fasta/error_converter.dart b/pkg/analyzer/lib/src/fasta/error_converter.dart
index 614fadb..aebe4d2 100644
--- a/pkg/analyzer/lib/src/fasta/error_converter.dart
+++ b/pkg/analyzer/lib/src/fasta/error_converter.dart
@@ -336,6 +336,10 @@
errorReporter?.reportErrorForOffset(
ParserErrorCode.IMPLEMENTS_BEFORE_EXTENDS, offset, length);
return;
+ case "IMPLEMENTS_BEFORE_ON":
+ errorReporter?.reportErrorForOffset(
+ ParserErrorCode.IMPLEMENTS_BEFORE_ON, offset, length);
+ return;
case "IMPLEMENTS_BEFORE_WITH":
errorReporter?.reportErrorForOffset(
ParserErrorCode.IMPLEMENTS_BEFORE_WITH, offset, length);
@@ -346,6 +350,10 @@
offset,
length);
return;
+ case "IMPORT_OF_NON_LIBRARY":
+ errorReporter?.reportErrorForOffset(
+ CompileTimeErrorCode.IMPORT_OF_NON_LIBRARY, offset, length);
+ return;
case "INVALID_CAST_FUNCTION":
errorReporter?.reportErrorForOffset(
StrongModeCode.INVALID_CAST_FUNCTION, offset, length);
@@ -502,6 +510,10 @@
errorReporter?.reportErrorForOffset(
ParserErrorCode.MULTIPLE_LIBRARY_DIRECTIVES, offset, length);
return;
+ case "MULTIPLE_ON_CLAUSES":
+ errorReporter?.reportErrorForOffset(
+ ParserErrorCode.MULTIPLE_ON_CLAUSES, offset, length);
+ return;
case "MULTIPLE_WITH_CLAUSES":
errorReporter?.reportErrorForOffset(
ParserErrorCode.MULTIPLE_WITH_CLAUSES, offset, length);
@@ -618,6 +630,10 @@
errorReporter?.reportErrorForOffset(
ParserErrorCode.TYPEDEF_IN_CLASS, offset, length);
return;
+ case "UNDEFINED_CLASS":
+ errorReporter?.reportErrorForOffset(
+ CompileTimeErrorCode.UNDEFINED_CLASS, offset, length);
+ return;
case "UNDEFINED_GETTER":
errorReporter?.reportErrorForOffset(
StaticTypeWarningCode.UNDEFINED_GETTER, offset, length);
diff --git a/pkg/analyzer/lib/src/fasta/resolution_applier.dart b/pkg/analyzer/lib/src/fasta/resolution_applier.dart
deleted file mode 100644
index 3c913ce..0000000
--- a/pkg/analyzer/lib/src/fasta/resolution_applier.dart
+++ /dev/null
@@ -1,1012 +0,0 @@
-// 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/dart/ast/ast.dart';
-import 'package:analyzer/dart/ast/standard_ast_factory.dart';
-import 'package:analyzer/dart/ast/visitor.dart';
-import 'package:analyzer/dart/element/element.dart';
-import 'package:analyzer/dart/element/type.dart';
-import 'package:analyzer/src/dart/ast/ast.dart';
-import 'package:analyzer/src/dart/ast/utilities.dart';
-import 'package:analyzer/src/dart/element/element.dart';
-import 'package:analyzer/src/dart/element/member.dart';
-import 'package:analyzer/src/fasta/resolution_storer.dart';
-import 'package:front_end/src/base/syntactic_entity.dart';
-import 'package:front_end/src/scanner/token.dart';
-import 'package:kernel/kernel.dart' as kernel;
-
-/// Visitor that applies resolution data from the front end (obtained via
-/// [ResolutionStorer]) to an analyzer AST.
-class ResolutionApplier extends GeneralizingAstVisitor {
- final LibraryElement _enclosingLibraryElement;
- final TypeContext _typeContext;
-
- final Map<int, ResolutionData> _data;
-
- /// The current label scope. Each [Block] adds a new one.
- _LabelScope _labelScope = new _LabelScope(null);
-
- ResolutionApplier(
- this._enclosingLibraryElement, this._typeContext, this._data);
-
- /// Apply resolution to annotations of the given [node].
- void applyToAnnotations(AnnotatedNode node) {
- node.metadata.accept(this);
- }
-
- @override
- void visitAdjacentStrings(AdjacentStrings node) {
- node.strings.accept(this);
- node.staticType = _typeContext.stringType;
- }
-
- @override
- void visitAnnotation(Annotation node) {
- Identifier name = node.name;
- ArgumentList argumentList = node.arguments;
-
- SimpleIdentifier fieldName;
- SimpleIdentifier constructorName;
-
- var data = _get(name);
- if (name is SimpleIdentifier) {
- var translatedReference = _translateReference(data);
- name.staticElement = translatedReference;
- name.staticType = _translateType(data.inferredType);
- node.element = translatedReference;
- } else if (name is PrefixedIdentifier) {
- if (data.prefixInfo != null) {
- name.prefix.staticElement = _translatePrefixInfo(data.prefixInfo);
-
- data = _get(name.identifier);
- name.identifier.staticElement = _translateReference(data);
- name.identifier.staticType = _translateType(data.inferredType);
-
- if (argumentList == null) {
- fieldName = node.constructorName;
- } else {
- constructorName = node.constructorName;
- }
- } else {
- name.prefix.staticElement = _translateReference(data);
- name.prefix.staticType = _translateType(data.inferredType);
-
- if (argumentList == null) {
- fieldName = name.identifier;
- } else {
- constructorName = name.identifier;
- }
- }
- }
-
- if (fieldName != null) {
- data = _get(fieldName);
- var translatedReference = _translateReference(data);
- node.element = translatedReference;
- fieldName.staticElement = translatedReference;
- fieldName.staticType = _translateType(data.inferredType);
- }
-
- if (argumentList != null) {
- var data = _get(argumentList);
- ConstructorElement element = _translateReference(data);
- node.element = element;
-
- if (constructorName != null) {
- constructorName.staticElement = element;
- constructorName.staticType = element.type;
- }
-
- argumentList.accept(this);
- _resolveArgumentsToParameters(argumentList, element.parameters);
- }
- }
-
- @override
- void visitArgumentList(ArgumentList node) {
- for (var argument in node.arguments) {
- if (argument is NamedExpression) {
- argument.expression.accept(this);
- argument.staticType = argument.expression.staticType;
- } else {
- argument.accept(this);
- }
- }
- }
-
- @override
- void visitAsExpression(AsExpression node) {
- node.expression.accept(this);
- node.type.accept(this);
- var data = _get(node.asOperator);
- node.staticType = _translateType(data.inferredType);
- }
-
- @override
- void visitAssignmentExpression(AssignmentExpression node) {
- node.leftHandSide.accept(this);
- node.rightHandSide.accept(this);
-
- SyntacticEntity entity =
- _getAssignmentEntity(node.leftHandSide) ?? node.operator;
- var data = _get(entity,
- isSynthetic: entity is SimpleIdentifier && entity.isSynthetic);
- node.staticElement = _translateAuxiliaryReference(data.combiner);
- node.staticType = _translateType(data.inferredType);
- }
-
- @override
- void visitBinaryExpression(BinaryExpression node) {
- node.leftOperand.accept(this);
-
- var data = _get(node.operator);
- TokenType operatorType = node.operator.type;
- if (operatorType != TokenType.QUESTION_QUESTION &&
- operatorType != TokenType.AMPERSAND_AMPERSAND &&
- operatorType != TokenType.BAR_BAR) {
- node.staticElement = _translateReference(data);
- }
-
- // Record the return type of the expression.
- node.staticType = _translateType(data.inferredType);
-
- node.rightOperand.accept(this);
- }
-
- @override
- void visitBlock(Block node) {
- _labelScope = new _LabelScope(_labelScope);
- super.visitBlock(node);
- _labelScope = _labelScope.parent;
- }
-
- @override
- void visitBreakStatement(BreakStatement node) {
- SimpleIdentifier label = node.label;
- if (label != null) {
- LabelElement labelElement = _labelScope[label.name];
- label.staticElement = labelElement;
- }
- }
-
- @override
- void visitCascadeExpression(CascadeExpression node) {
- visitNode(node);
- node.staticType = node.target.staticType;
- }
-
- @override
- void visitCatchClause(CatchClause node) {
- node.exceptionType?.accept(this);
- SimpleIdentifier exception = node.exceptionParameter;
- if (exception != null) {
- LocalVariableElementImpl element = exception.staticElement;
- DartType type = _translateType(
- _get(exception, isSynthetic: exception.isSynthetic).inferredType);
- element.type = type;
- exception.staticType = type;
- }
-
- SimpleIdentifier stackTrace = node.stackTraceParameter;
- if (stackTrace != null) {
- LocalVariableElementImpl element = stackTrace.staticElement;
- DartType type = _translateType(_get(stackTrace).inferredType);
- element.type = type;
- stackTrace.staticType = type;
- }
-
- node.body.accept(this);
- }
-
- @override
- void visitConditionalExpression(ConditionalExpression node) {
- node.condition.accept(this);
- node.thenExpression.accept(this);
- node.elseExpression.accept(this);
- node.staticType = _translateType(_get(node.question).inferredType);
- }
-
- @override
- void visitConstructorFieldInitializer(ConstructorFieldInitializer node) {
- var element = _translateReference(_get(node.equals));
- if (element is PropertyAccessorElement) {
- node.fieldName.staticElement = element.variable;
- } else {
- node.fieldName.staticElement = element;
- }
-
- node.expression.accept(this);
- }
-
- @override
- void visitContinueStatement(ContinueStatement node) {
- SimpleIdentifier label = node.label;
- if (label != null) {
- LabelElement labelElement = _labelScope[label.name];
- label.staticElement = labelElement;
- }
- }
-
- @override
- void visitExpression(Expression node) {
- visitNode(node);
- node.staticType = _translateType(_get(node).inferredType);
- }
-
- @override
- void visitForEachStatement(ForEachStatement node) {
- DeclaredIdentifier loopVariable = node.loopVariable;
- if (loopVariable != null) {
- loopVariable.type?.accept(this);
- SimpleIdentifier identifier = loopVariable.identifier;
-
- DartType type = _translateType(_get(identifier).inferredType);
- identifier.staticType = type;
-
- VariableElementImpl element = identifier.staticElement;
- if (element != null) {
- _typeContext.encloseVariable(element);
- identifier.staticElement = element;
- element.type = type;
- }
- } else {
- node.identifier.accept(this);
- }
- node.iterable.accept(this);
- node.body.accept(this);
- }
-
- @override
- void visitFormalParameterList(FormalParameterList parameterList) {
- for (var parameter in parameterList.parameters) {
- parameter.metadata?.accept(this);
- NormalFormalParameter normalParameter;
- if (parameter is DefaultFormalParameter) {
- parameter.defaultValue?.accept(this);
- normalParameter = parameter.parameter;
- } else if (parameter is NormalFormalParameter) {
- normalParameter = parameter;
- } else {
- // All parameters should either be DefaultFormalParameter or
- // NormalFormalParameter.
- throw new UnimplementedError('${parameter.runtimeType}');
- }
- if (normalParameter is SimpleFormalParameter) {
- normalParameter.type?.accept(this);
- } else if (normalParameter is FieldFormalParameter) {
- normalParameter.type?.accept(this);
- } else if (normalParameter is FunctionTypedFormalParameter) {
- normalParameter.returnType?.accept(this);
- normalParameter.typeParameters?.accept(this);
- normalParameter.parameters?.accept(this);
- var data = _get(normalParameter.identifier);
- normalParameter.identifier.staticType =
- _translateType(data.inferredType);
- } else {
- // Now that DefaultFormalParameter has been handled, all parameters
- // should be SimpleFormalParameter, FieldFormalParameter, or
- // FunctionTypedFormalParameter.
- throw new UnimplementedError('${normalParameter.runtimeType}');
- }
- }
- }
-
- @override
- void visitFunctionDeclaration(FunctionDeclaration node) {
- FunctionElementImpl element = node.declaredElement;
- _typeContext.enterLocalFunction(element);
-
- node.returnType?.accept(this);
- FunctionExpression functionExpression = node.functionExpression;
- FormalParameterList parameterList = functionExpression.parameters;
-
- // Apply resolution to default values.
- parameterList.accept(this);
-
- functionExpression.body?.accept(this);
- _storeFunctionType(_translateType(_get(node.name).inferredType), element);
-
- // Associate the elements with the nodes.
- if (element != null) {
- functionExpression.element = element;
-
- node.name.staticElement = element;
- node.name.staticType = element.type;
-
- TypeParameterList typeParameterList = functionExpression.typeParameters;
- if (typeParameterList != null) {
- List<TypeParameter> typeParameters = typeParameterList.typeParameters;
- for (var i = 0; i < typeParameters.length; i++) {
- TypeParameter typeParameter = typeParameters[i];
- typeParameter.name.staticElement = element.typeParameters[i];
- typeParameter.name.staticType = _typeContext.typeType;
- }
- }
- }
-
- _typeContext.exitLocalFunction(element);
- }
-
- @override
- void visitFunctionExpression(FunctionExpression node) {
- FormalParameterList parameterList = node.parameters;
-
- FunctionElementImpl element = node.declaredElement;
- _typeContext.enterLocalFunction(element);
-
- // Apply resolution to default values.
- parameterList.accept(this);
-
- node.body.accept(this);
- _storeFunctionType(
- _translateType(_get(node.parameters).inferredType), element);
-
- // Associate the elements with the nodes.
- if (element != null) {
- node.element = element;
- node.staticType = element.type;
- }
-
- _typeContext.exitLocalFunction(element);
- }
-
- @override
- void visitFunctionExpressionInvocation(FunctionExpressionInvocation node) {
- node.function.accept(this);
- node.typeArguments?.accept(this);
-
- var data = _get(node.argumentList);
- DartType invokeType = _translateType(data.invokeType);
- node.staticInvokeType = invokeType;
-
- DartType resultType = _translateType(data.inferredType);
- node.staticType = resultType;
-
- node.argumentList.accept(this);
- }
-
- @override
- void visitGenericFunctionType(covariant GenericFunctionTypeImpl node) {
- var data = _get(node.functionKeyword);
- FunctionType type = _translateType(data.inferredType);
- node.type = type;
- _typeContext.enterLocalFunction(type.element);
- super.visitGenericFunctionType(node);
- _typeContext.exitLocalFunction(type.element);
- }
-
- @override
- void visitIndexExpression(IndexExpression node) {
- node.target?.accept(this);
-
- var data = _get(node.leftBracket);
- node.staticElement = _translateReference(data);
- node.staticType = _translateType(data.inferredType);
-
- node.index.accept(this);
- }
-
- @override
- void visitInstanceCreationExpression(InstanceCreationExpression node) {
- ConstructorName constructorName = node.constructorName;
- Identifier typeIdentifier = constructorName.type.name;
- SimpleIdentifier classIdentifier;
- SimpleIdentifier constructorIdentifier;
-
- constructorName.type.typeArguments?.accept(this);
- var data = _get(typeIdentifier);
- TypeName newTypeName;
- if (typeIdentifier is SimpleIdentifier) {
- classIdentifier = typeIdentifier;
- constructorIdentifier = constructorName.name;
- } else if (typeIdentifier is PrefixedIdentifier) {
- if (data.isPrefixReference) {
- typeIdentifier.prefix.staticElement =
- _translatePrefixInfo(data.prefixInfo);
-
- classIdentifier = typeIdentifier.identifier;
- constructorIdentifier = node.constructorName.name;
-
- data = _get(classIdentifier);
- } else {
- classIdentifier = typeIdentifier.prefix;
- constructorIdentifier = typeIdentifier.identifier;
-
- TypeArgumentList typeArguments = constructorName.type.typeArguments;
- newTypeName = astFactory.typeName(classIdentifier, typeArguments);
- constructorName.type = newTypeName;
- constructorName.period = typeIdentifier.period;
- constructorName.name = constructorIdentifier;
- }
- }
- classIdentifier.staticElement = _translateReference(data);
-
- data = _get(node.argumentList);
-
- ConstructorElement constructor = _translateReference(data);
- DartType type = _translateType(data.inferredType);
-
- node.staticElement = constructor;
- node.staticType = type;
-
- node.constructorName.staticElement = constructor;
- node.constructorName.type.type = type;
-
- typeIdentifier.staticType = type;
- classIdentifier.staticType = type;
- constructorIdentifier?.staticElement = constructor;
-
- ArgumentList argumentList = node.argumentList;
- argumentList.accept(this);
- _resolveArgumentsToParameters(argumentList, constructor?.parameters);
- }
-
- @override
- void visitIsExpression(IsExpression node) {
- node.expression.accept(this);
- node.type.accept(this);
- var data = _get(node.isOperator);
- node.staticType = _translateType(data.inferredType);
- }
-
- @override
- void visitLabel(Label node) {
- SimpleIdentifier label = node.label;
- String name = label.name;
- var element = new LabelElementImpl(name, label.offset, false, false);
- _labelScope.add(name, element);
- label.staticElement = element;
- }
-
- @override
- void visitListLiteral(ListLiteral node) {
- node.typeArguments?.accept(this);
- node.elements.accept(this);
- DartType type = _translateType(
- _get(node.constKeyword ?? node.leftBracket).inferredType);
- node.staticType = type;
- }
-
- @override
- void visitMapLiteral(MapLiteral node) {
- node.typeArguments?.accept(this);
- node.entries.accept(this);
- DartType type = _translateType(
- _get(node.constKeyword ?? node.leftBracket).inferredType);
- node.staticType = type;
- }
-
- @override
- void visitMethodInvocation(MethodInvocation node) {
- node.target?.accept(this);
- node.typeArguments?.accept(this);
-
- ArgumentList argumentList = node.argumentList;
-
- var data = _get(argumentList);
- Element invokeElement;
- if (data.loadLibrary != null) {
- LibraryElement libraryElement =
- _translateAuxiliaryReference(data.loadLibrary);
- invokeElement = libraryElement.loadLibraryFunction;
- } else if (data.isImplicitCall) {
- if (node.methodName != null) {
- node.methodName.accept(this);
- invokeElement = node.methodName.staticElement;
- }
- } else {
- invokeElement = _translateReference(data);
- }
- DartType invokeType = _translateType(data.invokeType);
- DartType resultType = _translateType(data.inferredType);
-
- if (invokeElement is PropertyInducingElement) {
- PropertyInducingElement property = invokeElement;
- invokeElement = property.getter;
- }
-
- node.staticInvokeType = invokeType;
- node.staticType = resultType;
-
- if (node.methodName.name == 'call' && invokeElement == null) {
- // Don't resolve explicit call() invocation of function types.
- } else if (_get(node.methodName.token,
- isSynthetic: node.methodName.isSynthetic, failIfAbsent: false) !=
- null) {
- node.methodName.accept(this);
- } else {
- node.methodName.staticElement = invokeElement;
- node.methodName.staticType = invokeType;
- }
-
- argumentList.accept(this);
-
- {
- var elementForParameters = invokeElement;
- if (elementForParameters is PropertyAccessorElement) {
- PropertyAccessorElement accessor = elementForParameters;
- elementForParameters = accessor.returnType.element;
- }
- List<ParameterElement> parameters;
- if (elementForParameters is FunctionTypedElement) {
- parameters = elementForParameters.parameters;
- } else if (elementForParameters is ParameterElement) {
- var type = elementForParameters.type;
- if (type is FunctionType) {
- parameters = type.parameters;
- }
- }
- _resolveArgumentsToParameters(argumentList, parameters);
- }
-
- if (invokeElement is ConstructorElement) {
- _rewriteIntoInstanceCreation(node, invokeElement, invokeType, resultType);
- }
- }
-
- @override
- void visitNativeFunctionBody(NativeFunctionBody node) {
- // nothing to resolve
- }
-
- @override
- void visitParenthesizedExpression(ParenthesizedExpression node) {
- node.visitChildren(this);
- node.staticType = node.expression.staticType;
- }
-
- @override
- void visitPostfixExpression(PostfixExpression node) {
- node.operand.accept(this);
- SyntacticEntity entity =
- _getAssignmentEntity(node.operand) ?? node.operator;
- var data = _get(entity);
- node.staticElement = _translateAuxiliaryReference(data.combiner);
- node.staticType = _translateType(data.inferredType);
- }
-
- @override
- void visitPrefixedIdentifier(PrefixedIdentifier node) {
- node.prefix.accept(this);
- node.identifier.accept(this);
- node.staticType = node.identifier.staticType;
- }
-
- @override
- void visitPrefixExpression(PrefixExpression node) {
- node.operand.accept(this);
- TokenType tokenType = node.operator.type;
- if (tokenType.isIncrementOperator) {
- // ++v;
- // This is an assignment, it is associated with the operand.
- SyntacticEntity entity =
- _getAssignmentEntity(node.operand) ?? node.operator;
- var data = _get(entity);
- node.staticElement = _translateAuxiliaryReference(data.combiner);
- node.staticType = _translateType(data.inferredType);
- } else if (tokenType == TokenType.BANG) {
- // !boolExpression;
- node.staticType = _translateType(_get(node).inferredType);
- } else {
- // ~v;
- // This is a method invocation, it is associated with the operator.
- SyntacticEntity entity = node.operator;
- var data = _get(entity);
- node.staticElement = _translateReference(data);
- node.staticType = _translateType(data.inferredType);
- }
- }
-
- @override
- void visitPropertyAccess(PropertyAccess node) {
- node.target?.accept(this);
- node.propertyName.accept(this);
- node.staticType = node.propertyName.staticType;
- }
-
- @override
- void visitRedirectingConstructorInvocation(
- RedirectingConstructorInvocation node) {
- SimpleIdentifier constructorName = node.constructorName;
-
- ConstructorElement element =
- _translateReference(_get(constructorName ?? node));
- node.staticElement = element;
- constructorName?.staticElement = element;
-
- ArgumentList argumentList = node.argumentList;
- argumentList.accept(this);
- _resolveArgumentsToParameters(argumentList, element?.parameters);
- }
-
- @override
- void visitSimpleIdentifier(SimpleIdentifier node) {
- var data = _get(node, isSynthetic: node.token.isSynthetic);
- if (data.prefixInfo != null) {
- node.staticElement = _translatePrefixInfo(data.prefixInfo);
- } else if (data.declaration != null) {
- node.staticElement = _translateDeclaration(data.declaration);
- } else if (data.loadLibrary != null) {
- LibraryElement library = _translateAuxiliaryReference(data.loadLibrary);
- node.staticElement = library.loadLibraryFunction;
- } else {
- node.staticElement = _translateReference(data);
- }
- node.staticType = _translateType(
- data.isWriteReference ? data.writeContext : data.inferredType);
- }
-
- @override
- void visitStringInterpolation(StringInterpolation node) {
- for (var element in node.elements) {
- if (element is InterpolationExpression) {
- element.expression.accept(this);
- }
- }
- node.staticType = _typeContext.stringType;
- }
-
- @override
- void visitSuperConstructorInvocation(SuperConstructorInvocation node) {
- SimpleIdentifier constructorName = node.constructorName;
- var superElement = _typeContext.enclosingClassElement.supertype.element;
- ConstructorElement element;
- if (constructorName == null) {
- element = superElement.unnamedConstructor;
- } else {
- String name = constructorName.name;
- element = superElement.getNamedConstructor(name);
- constructorName.staticElement = element;
- }
- node.staticElement = element;
-
- ArgumentList argumentList = node.argumentList;
- argumentList.accept(this);
- _resolveArgumentsToParameters(argumentList, element?.parameters);
- }
-
- @override
- void visitSuperExpression(SuperExpression node) {
- node.staticType = _typeContext.enclosingClassElement?.type;
- }
-
- @override
- void visitThisExpression(ThisExpression node) {
- node.staticType = _typeContext.enclosingClassElement?.type;
- }
-
- @override
- void visitTypeName(TypeName node) {
- super.visitTypeName(node);
- node.type = node.name.staticType;
- }
-
- @override
- visitTypeParameter(TypeParameter node) {
- node.bound?.accept(this);
- }
-
- @override
- void visitVariableDeclaration(VariableDeclaration node) {
- AstNode parent = node.parent;
- if (parent is VariableDeclarationList &&
- (parent.parent is TopLevelVariableDeclaration ||
- parent.parent is FieldDeclaration)) {
- // Don't visit the name; resolution for it will come from the outline.
- } else {
- DartType type = _translateType(
- _get(node.name, isSynthetic: node.name.isSynthetic).inferredType);
- node.name.staticType = type;
-
- VariableElementImpl element = node.name.staticElement;
- if (element != null) {
- _typeContext.encloseVariable(element);
- node.name.staticElement = element;
- element.type = type;
- }
-
- node.initializer?.accept(this);
-
- if (element is ConstVariableElement) {
- (element as ConstVariableElement).constantInitializer =
- node.initializer;
- }
- }
- }
-
- @override
- void visitVariableDeclarationList(VariableDeclarationList node) {
- if (node.parent is TopLevelVariableDeclaration) {
- node.variables.accept(this);
- } else {
- node.type?.accept(this);
- node.metadata.accept(this);
- node.variables.accept(this);
- }
- }
-
- ResolutionData _get(SyntacticEntity entity,
- {bool failIfAbsent = true, bool isSynthetic = false}) {
- int entityOffset = entity.offset;
- var encodedLocation = 2 * entityOffset + (isSynthetic ? 1 : 0);
- var data = _data[encodedLocation];
- if (failIfAbsent && data == null) {
- String fileName = _enclosingLibraryElement.source.fullName;
- throw new StateError('No data for $entity at (offset=$entityOffset, '
- 'isSynthetic=$isSynthetic) in $fileName');
- }
- return data;
- }
-
- /// Return the [SyntacticEntity] with which the front-end associates
- /// assignment to the given [leftHandSide].
- SyntacticEntity _getAssignmentEntity(Expression leftHandSide) {
- if (leftHandSide is SimpleIdentifier) {
- return leftHandSide;
- } else if (leftHandSide is PrefixedIdentifier) {
- return leftHandSide.identifier;
- } else if (leftHandSide is PropertyAccess) {
- return leftHandSide.propertyName;
- } else if (leftHandSide is IndexExpressionImpl) {
- return leftHandSide.leftBracket;
- } else if (leftHandSide is ParenthesizedExpression) {
- return leftHandSide.rightParenthesis;
- } else {
- return null;
- }
- }
-
- /// Resolve arguments of the [argumentList] to corresponding [parameters].
- void _resolveArgumentsToParameters(
- ArgumentList argumentList, List<ParameterElement> parameters) {
- if (parameters != null) {
- var numberOfPositionalParameters = 0;
- for (var parameter in parameters) {
- if (parameter.isPositional) {
- numberOfPositionalParameters++;
- }
- }
-
- var numberOfArguments = argumentList.arguments.length;
- if (numberOfArguments == numberOfPositionalParameters &&
- numberOfPositionalParameters == parameters.length) {
- argumentList.correspondingStaticParameters = parameters;
- return;
- }
-
- var resolvedParameters = new List<ParameterElement>(numberOfArguments);
- for (var i = 0; i < numberOfArguments; i++) {
- var argument = argumentList.arguments[i];
- ParameterElement argumentParameter;
- if (argument is NamedExpression) {
- SimpleIdentifier identifier = argument.name.label;
- for (var parameter in parameters) {
- if (parameter.name == identifier.name) {
- argumentParameter = parameter;
- identifier.staticElement = parameter;
- break;
- }
- }
- } else if (i < parameters.length && parameters[i].isPositional) {
- argumentParameter = parameters[i];
- }
- resolvedParameters[i] = argumentParameter;
- }
-
- argumentList.correspondingStaticParameters = resolvedParameters;
- }
- }
-
- /// Rewrite AST if the [node] represents an instance creation.
- void _rewriteIntoInstanceCreation(
- MethodInvocation node,
- ConstructorElement invokeElement,
- DartType invokeType,
- DartType resultType) {
- if (node.isCascaded) {
- return;
- }
-
- Identifier typeIdentifier;
- Token constructorIdentifierPeriod;
- SimpleIdentifier constructorIdentifier;
- var target = node.target;
- if (target == null) {
- SimpleIdentifier simpleTypeIdentifier = node.methodName;
- simpleTypeIdentifier.staticElement = resultType.element;
- simpleTypeIdentifier.staticType = resultType;
-
- typeIdentifier = simpleTypeIdentifier;
- } else if (target is SimpleIdentifier) {
- if (target.staticElement is PrefixElement) {
- SimpleIdentifier simpleTypeIdentifier = node.methodName;
- simpleTypeIdentifier.staticElement = resultType.element;
- simpleTypeIdentifier.staticType = resultType;
-
- typeIdentifier = astFactory.prefixedIdentifier(
- target, node.operator, simpleTypeIdentifier);
- } else {
- typeIdentifier = target;
-
- constructorIdentifierPeriod = node.operator;
- constructorIdentifier = node.methodName;
- }
- } else {
- PrefixedIdentifier prefixed = target;
- typeIdentifier = prefixed;
-
- constructorIdentifierPeriod = prefixed.period;
- constructorIdentifier = node.methodName;
- }
-
- var typeName = astFactory.typeName(typeIdentifier, node.typeArguments);
- typeName.type = resultType;
-
- var creation = astFactory.instanceCreationExpression(
- null,
- astFactory.constructorName(
- typeName,
- constructorIdentifierPeriod,
- constructorIdentifier,
- ),
- node.argumentList,
- );
- creation.staticElement = invokeElement;
- creation.staticType = resultType;
- NodeReplacer.replace(node, creation);
- }
-
- void _storeFunctionType(DartType type, FunctionTypedElementImpl element) {
- if (type is FunctionType && element != null) {
- DartType Function(DartType) substituteConstituentType;
- if (type.typeFormals.length == element.typeParameters.length &&
- type.typeFormals.length != 0) {
- var argumentTypes = element.typeParameters.map((e) => e.type).toList();
- var parameterTypes = type.typeFormals.map((e) {
- var type = e.type;
- var element = type.element;
- if (element is TypeParameterMember) {
- return element.baseElement.type;
- } else {
- return type;
- }
- }).toList();
- substituteConstituentType =
- (DartType t) => t.substitute2(argumentTypes, parameterTypes);
- for (int i = 0; i < type.typeFormals.length; i++) {
- (element.typeParameters[i] as TypeParameterElementImpl).bound =
- type.typeFormals[i].bound == null
- ? null
- : substituteConstituentType(type.typeFormals[i].bound);
- }
- } else {
- substituteConstituentType = (DartType t) => t;
- }
- element.returnType = substituteConstituentType(type.returnType);
- int normalParameterIndex = 0;
- int optionalParameterIndex = 0;
- for (ParameterElementImpl parameter in element.parameters) {
- if (parameter.isNamed) {
- parameter.type = substituteConstituentType(
- type.namedParameterTypes[parameter.name]);
- } else if (normalParameterIndex < type.normalParameterTypes.length) {
- parameter.type = substituteConstituentType(
- type.normalParameterTypes[normalParameterIndex++]);
- } else if (optionalParameterIndex <
- type.optionalParameterTypes.length) {
- parameter.type = substituteConstituentType(
- type.optionalParameterTypes[optionalParameterIndex++]);
- }
- }
- }
- }
-
- Element _translateAuxiliaryReference(kernel.Node reference) {
- return _typeContext.translateReference(reference);
- }
-
- Element _translateDeclaration(int declaration) {
- return _typeContext.translateDeclaration(declaration);
- }
-
- Element _translatePrefixInfo(int prefixInfo) {
- return _typeContext.translatePrefixInfo(prefixInfo);
- }
-
- Element _translateReference(ResolutionData data) {
- if (data.isPrefixReference) {
- return _translatePrefixInfo(data.prefixInfo);
- }
- return _typeContext.translateReference(data.reference,
- isNamespaceCombinatorReference: data.isNamespaceCombinatorReference,
- isTypeReference: data.isTypeReference,
- isWriteReference: data.isWriteReference,
- inferredType: data.inferredType,
- receiverType: data.receiverType);
- }
-
- DartType _translateType(kernel.DartType type) {
- return _typeContext.translateType(type);
- }
-}
-
-/// A container with [typeArguments].
-class TypeArgumentsDartType implements ParameterizedType {
- @override
- final List<DartType> typeArguments;
-
- TypeArgumentsDartType(this.typeArguments);
-
- @override
- bool get isUndefined => false;
-
- noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation);
-
- @override
- String toString() {
- return '<${typeArguments.join(', ')}>';
- }
-}
-
-/// Context for translating types.
-abstract class TypeContext {
- /// The enclosing [ClassElement], or `null` if not in a class.
- ClassElement get enclosingClassElement;
-
- DartType get stringType;
-
- DartType get typeType;
-
- /// Attach the variable [element] to the current executable.
- void encloseVariable(ElementImpl element);
-
- /// Finalize the given function [element] - set all types for it.
- /// Then make it the current executable.
- void enterLocalFunction(FunctionTypedElementImpl element);
-
- /// Restore the current executable that was before the [element].
- void exitLocalFunction(FunctionTypedElementImpl element);
-
- /// Return the Analyzer [Element] for the local declaration having the given
- /// offset.
- Element translateDeclaration(int declarationOffset);
-
- /// Return the analyzer [Element] for the import prefix corresponding to the
- /// import having the given offset.
- PrefixElement translatePrefixInfo(int importIndex);
-
- /// Return the analyzer [Element] for the given kernel node.
- Element translateReference(kernel.Node referencedNode,
- {bool isNamespaceCombinatorReference = false,
- bool isTypeReference = false,
- bool isWriteReference = false,
- kernel.DartType inferredType,
- kernel.DartType receiverType});
-
- /// Return the Analyzer [DartType] for the given [kernelType].
- DartType translateType(kernel.DartType kernelType);
-}
-
-/// The hierarchical scope for labels.
-class _LabelScope {
- final _LabelScope parent;
- final Map<String, LabelElement> elements = {};
-
- _LabelScope(this.parent);
-
- LabelElement operator [](String name) {
- var element = elements[name];
- if (element != null) {
- return element;
- }
- if (parent != null) {
- return parent[name];
- }
- return null;
- }
-
- void add(String name, LabelElement element) {
- elements[name] = element;
- }
-}
diff --git a/pkg/analyzer/lib/src/fasta/resolution_storer.dart b/pkg/analyzer/lib/src/fasta/resolution_storer.dart
deleted file mode 100644
index 04e1c84..0000000
--- a/pkg/analyzer/lib/src/fasta/resolution_storer.dart
+++ /dev/null
@@ -1,955 +0,0 @@
-// 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/fasta/resolution_applier.dart';
-import 'package:front_end/src/fasta/kernel/kernel_shadow_ast.dart';
-import 'package:front_end/src/fasta/kernel/kernel_type_variable_builder.dart';
-import 'package:front_end/src/fasta/type_inference/type_inference_listener.dart';
-import 'package:front_end/src/scanner/token.dart';
-import 'package:kernel/ast.dart';
-import 'package:kernel/type_algebra.dart';
-
-class ResolutionData {
- final List<DartType> argumentTypes;
- final Node combiner;
- final int declaration;
- final DartType inferredType;
- final DartType invokeType;
- final bool isExplicitCall;
- final bool isImplicitCall;
- final bool isNamespaceCombinatorReference;
- final bool isOutline;
- final bool isPrefixReference;
- final bool isTypeReference;
- final bool isWriteReference;
- final Node loadLibrary;
- final int prefixInfo;
- final DartType receiverType;
- final Node reference;
- final DartType writeContext;
-
- ResolutionData(
- {this.argumentTypes,
- this.combiner,
- this.declaration,
- this.inferredType,
- this.invokeType,
- this.isExplicitCall = false,
- this.isImplicitCall = false,
- this.isNamespaceCombinatorReference = false,
- this.isOutline = false,
- this.isPrefixReference = false,
- this.isTypeReference = false,
- this.isWriteReference = false,
- this.loadLibrary,
- this.prefixInfo,
- this.receiverType,
- this.reference,
- this.writeContext});
-}
-
-/// Type inference listener that records inferred types for later use by
-/// [ResolutionApplier].
-class ResolutionStorer
- implements TypeInferenceListener<int, Node, int>, TypeInferenceTokensSaver {
- final Map<int, ResolutionData> _data;
-
- final Map<TypeParameter, int> _typeVariableDeclarations;
-
- ResolutionStorer(Map<int, ResolutionData> data,
- Map<TypeParameter, int> typeVariableDeclarations)
- : _data = data,
- _typeVariableDeclarations = typeVariableDeclarations;
-
- @override
- TypeInferenceTokensSaver get typeInferenceTokensSaver => this;
-
- @override
- AsExpressionTokens asExpressionTokens(Token asOperator) {
- return new AsExpressionTokens(asOperator);
- }
-
- void asExpression(ExpressionJudgment judgment, int location, void expression,
- AsExpressionTokens tokens, void literalType, DartType inferredType) {
- _store(location, inferredType: inferredType);
- }
-
- @override
- AssertInitializerTokens assertInitializerTokens(Token assertKeyword,
- Token leftParenthesis, Token comma, Token rightParenthesis) {
- return new AssertInitializerTokens(
- assertKeyword, leftParenthesis, comma, rightParenthesis);
- }
-
- void assertInitializer(InitializerJudgment judgment, int location,
- AssertInitializerTokens tokens, void condition, void message) {}
-
- @override
- AssertStatementTokens assertStatementTokens(
- Token assertKeyword,
- Token leftParenthesis,
- Token comma,
- Token rightParenthesis,
- Token semicolon) {
- return new AssertStatementTokens(
- assertKeyword, leftParenthesis, comma, rightParenthesis, semicolon);
- }
-
- void assertStatement(StatementJudgment judgment, int location,
- AssertStatementTokens Tokens, void condition, void message) {}
-
- AwaitExpressionTokens awaitExpressionTokens(Token awaitKeyword) {
- return new AwaitExpressionTokens(awaitKeyword);
- }
-
- void awaitExpression(
- ExpressionJudgment judgment,
- int location,
- AwaitExpressionTokens tokens,
- void expression,
- DartType inferredType) =>
- genericExpression("awaitExpression", location, inferredType);
-
- Object binderForFunctionDeclaration(
- StatementJudgment judgment, int fileOffset, String name) {
- return new VariableDeclarationBinder(fileOffset, false);
- }
-
- void binderForStatementLabel(
- StatementJudgment judgment, int fileOffset, String name) {}
-
- void binderForSwitchLabel(
- SwitchCaseJudgment judgment, int fileOffset, String name) {}
-
- TypeVariableBinder binderForTypeVariable(
- KernelTypeVariableBuilder builder, int fileOffset, String name) {
- return new TypeVariableBinder(fileOffset);
- }
-
- Object binderForVariableDeclaration(StatementJudgment judgment,
- int fileOffset, String name, bool forSyntheticToken) {
- return new VariableDeclarationBinder(fileOffset, forSyntheticToken);
- }
-
- BlockTokens blockTokens(Token leftBracket, Token rightBracket) {
- return new BlockTokens(leftBracket, rightBracket);
- }
-
- void block(StatementJudgment judgment, int location, BlockTokens tokens,
- List<void> statements) {}
-
- BoolLiteralTokens boolLiteralTokens(Token literal) {
- return new BoolLiteralTokens(literal);
- }
-
- void boolLiteral(ExpressionJudgment judgment, int location,
- BoolLiteralTokens tokens, bool value, DartType inferredType) =>
- genericExpression("boolLiteral", location, inferredType);
-
- BreakStatementTokens breakStatementTokens(
- Token breakKeyword, Token semicolon) {
- return new BreakStatementTokens(breakKeyword, semicolon);
- }
-
- void breakStatement(StatementJudgment judgment, int location,
- BreakStatementTokens tokens, void label, covariant Object labelBinder) {}
-
- void cascadeExpression(
- ExpressionJudgment judgment, int location, DartType inferredType) {
- // Overridden so that the type of the expression will not be recorded. We
- // don't need to record the type because the type is always the same as the
- // type of the target, and we don't have the appropriate offset so we can't
- // correctly apply the type even if we recorded it.
- }
-
- CatchStatementTokens catchStatementTokens(Token onKeyword, Token catchKeyword,
- Token leftParenthesis, Token comma, Token rightParenthesis) {
- return new CatchStatementTokens(
- onKeyword, catchKeyword, leftParenthesis, comma, rightParenthesis);
- }
-
- void catchStatement(
- Catch judgment,
- int location,
- CatchStatementTokens tokens,
- void type,
- void body,
- covariant VariableDeclarationBinder exceptionBinder,
- DartType exceptionType,
- covariant VariableDeclarationBinder stackTraceBinder,
- DartType stackTraceType) {
- if (exceptionBinder != null) {
- _store(exceptionBinder.fileOffset,
- inferredType: exceptionType,
- isSynthetic: exceptionBinder.isSynthetic);
- }
-
- if (stackTraceBinder != null) {
- _store(stackTraceBinder.fileOffset, inferredType: stackTraceType);
- }
- }
-
- ConditionalExpressionTokens conditionalExpressionTokens(
- Token question, Token colon) {
- return new ConditionalExpressionTokens(question, colon);
- }
-
- void conditionalExpression(
- ExpressionJudgment judgment,
- int location,
- void condition,
- ConditionalExpressionTokens tokens,
- void thenExpression,
- void elseExpression,
- DartType inferredType) =>
- genericExpression("conditionalExpression", location, inferredType);
-
- void constructorInvocation(ExpressionJudgment judgment, int location,
- Node expressionTarget, DartType inferredType) {
- // A class reference may have already been stored at this location by
- // storeClassReference. We want to replace it with a constructor
- // reference.
- _unstore(location);
- _store(location, inferredType: inferredType, reference: expressionTarget);
- }
-
- ContinueStatementTokens continueStatementTokens(
- Token continueKeyword, Token semicolon) {
- return new ContinueStatementTokens(continueKeyword, semicolon);
- }
-
- void continueStatement(
- StatementJudgment judgment,
- int location,
- ContinueStatementTokens tokens,
- void label,
- covariant Object labelBinder) {}
-
- ContinueSwitchStatementTokens continueSwitchStatementTokens(
- Token continueKeyword, Token semicolon) {
- return new ContinueSwitchStatementTokens(continueKeyword, semicolon);
- }
-
- void continueSwitchStatement(
- StatementJudgment judgment,
- int location,
- ContinueSwitchStatementTokens tokens,
- void label,
- covariant Object labelBinder) {}
-
- void deferredCheck(
- ExpressionJudgment judgment, int location, DartType inferredType) {
- // This judgment has no semantic value for Analyzer.
- }
-
- DoStatementTokens doStatementTokens(Token doKeyword, Token whileKeyword,
- Token leftParenthesis, Token rightParenthesis, Token semicolon) {
- return new DoStatementTokens(
- doKeyword, whileKeyword, leftParenthesis, rightParenthesis, semicolon);
- }
-
- void doStatement(StatementJudgment judgment, int location,
- DoStatementTokens tokens, void body, void condition) {}
-
- DoubleLiteralTokens doubleLiteralTokens(Token literal) {
- return new DoubleLiteralTokens(literal);
- }
-
- void doubleLiteral(ExpressionJudgment judgment, int location,
- DoubleLiteralTokens tokens, double value, DartType inferredType) =>
- genericExpression("doubleLiteral", location, inferredType);
-
- EmptyStatementTokens emptyStatementTokens(Token semicolon) {
- return new EmptyStatementTokens(semicolon);
- }
-
- void emptyStatement(EmptyStatementTokens tokens) {}
-
- ExpressionStatementTokens expressionStatementTokens(Token semicolon) {
- return new ExpressionStatementTokens(semicolon);
- }
-
- void expressionStatement(StatementJudgment judgment, int location,
- void expression, ExpressionStatementTokens tokens) {}
-
- void fieldInitializer(
- InitializerJudgment judgment,
- int location,
- Token thisKeyword,
- Token period,
- Token fieldName,
- Token equals,
- void expression,
- Node initializerField) {
- _store(location, reference: initializerField);
- }
-
- ForInStatementTokens forInStatementTokens(
- Token awaitKeyword,
- Token forKeyword,
- Token leftParenthesis,
- Token inKeyword,
- Token rightParenthesis) {
- return new ForInStatementTokens(
- awaitKeyword, forKeyword, leftParenthesis, inKeyword, rightParenthesis);
- }
-
- void forInStatement(
- StatementJudgment judgment,
- int location,
- ForInStatementTokens tokens,
- Object loopVariable,
- void iterator,
- void body,
- covariant VariableDeclarationBinder loopVariableBinder,
- DartType loopVariableType,
- int writeLocation,
- DartType writeType,
- covariant VariableDeclarationBinder writeVariableBinder,
- Node writeTarget) {
- if (loopVariableBinder != null) {
- _store(loopVariableBinder.fileOffset, inferredType: loopVariableType);
- } else {
- if (writeVariableBinder != null) {
- _store(writeLocation,
- declaration: writeVariableBinder.fileOffset,
- inferredType: writeType);
- } else {
- _store(writeLocation,
- reference: writeTarget,
- isWriteReference: true,
- writeContext: writeType);
- }
- }
- }
-
- ForStatementTokens forStatementTokens(
- Token forKeyword,
- Token leftParenthesis,
- Token leftSeparator,
- Token rightSeparator,
- Token rightParenthesis,
- ) {
- return new ForStatementTokens(forKeyword, leftParenthesis, leftSeparator,
- rightSeparator, rightParenthesis);
- }
-
- void forStatement(
- StatementJudgment judgment,
- int location,
- ForStatementTokens tokens,
- void variableDeclarationList,
- void initialization,
- void condition,
- void updaters,
- void body) {}
-
- void functionDeclaration(
- covariant VariableDeclarationBinder binder, FunctionType inferredType) {
- _store(binder.fileOffset, inferredType: inferredType);
- }
-
- void functionExpression(
- ExpressionJudgment judgment, int location, DartType inferredType) =>
- genericExpression("functionExpression", location, inferredType);
-
- @override
- void functionType(int location, DartType type) {
- _store(location, inferredType: type);
- }
-
- @override
- void functionTypedFormalParameter(int location, DartType type) {
- _store(location, inferredType: type);
- }
-
- void genericExpression(
- String expressionType, int location, DartType inferredType) {
- _store(location, inferredType: inferredType);
- }
-
- IfNullTokens ifNullTokens(Token operator) {
- return new IfNullTokens(operator);
- }
-
- void ifNull(ExpressionJudgment judgment, int location, void leftOperand,
- IfNullTokens tokens, void rightOperand, DartType inferredType) =>
- genericExpression('ifNull', location, inferredType);
-
- IfStatementTokens ifStatementTokens(Token ifKeyword, Token leftParenthesis,
- Token rightParenthesis, Token elseKeyword) {
- return new IfStatementTokens(
- ifKeyword, leftParenthesis, rightParenthesis, elseKeyword);
- }
-
- void ifStatement(
- StatementJudgment judgment,
- int location,
- IfStatementTokens tokens,
- void condition,
- void thenStatement,
- void elseStatement) {}
-
- void indexAssign(
- ExpressionJudgment judgment,
- int location,
- DartType receiverType,
- Node writeMember,
- Node combiner,
- DartType inferredType) {
- _store(location,
- reference: writeMember,
- inferredType: inferredType,
- combiner: combiner,
- receiverType: receiverType);
- }
-
- IntLiteralTokens intLiteralTokens(Token literal) {
- return new IntLiteralTokens(literal);
- }
-
- void intLiteral(ExpressionJudgment judgment, int location,
- IntLiteralTokens tokens, num value, DartType inferredType) =>
- genericExpression("intLiteral", location, inferredType);
-
- @override
- void invalidAssignment(ExpressionJudgment judgment, int location) {
- _store(location, inferredType: const DynamicType());
- }
-
- void invalidInitializer(InitializerJudgment judgment, int location) {}
-
- IsExpressionTokens isExpressionTokens(Token isOperator) {
- return new IsExpressionTokens(isOperator);
- }
-
- void isExpression(ExpressionJudgment judgment, int location, void expression,
- IsExpressionTokens tokens, void literalType, DartType inferredType) {
- _store(location, inferredType: inferredType);
- }
-
- IsNotExpressionTokens isNotExpressionTokens(
- Token isOperator, Token notOperator) {
- return new IsNotExpressionTokens(isOperator, notOperator);
- }
-
- void isNotExpression(
- ExpressionJudgment judgment,
- int location,
- void expression,
- IsNotExpressionTokens tokens,
- void literalType,
- DartType inferredType) {
- _store(location, inferredType: inferredType);
- }
-
- void labeledStatement(List<Object> labels, void statement) {}
-
- ListLiteralTokens listLiteralTokens(
- Token constKeyword, Token leftBracket, Token rightBracket) {
- return new ListLiteralTokens(constKeyword, leftBracket, rightBracket);
- }
-
- void listLiteral(
- ExpressionJudgment judgment,
- int location,
- ListLiteralTokens tokens,
- Object typeArguments,
- void elements,
- DartType inferredType) =>
- genericExpression("listLiteral", location, inferredType);
-
- @override
- void loadLibrary(LoadLibraryJudgment judgment, int location, Node library,
- FunctionType calleeType, DartType inferredType) {
- _store(location,
- loadLibrary: library,
- invokeType: calleeType,
- inferredType: inferredType);
- }
-
- @override
- void loadLibraryTearOff(LoadLibraryTearOffJudgment judgment, int location,
- Node library, DartType inferredType) {
- _store(location, loadLibrary: library, inferredType: inferredType);
- }
-
- LogicalExpressionTokens logicalExpressionTokens(Token operatorToken) {
- return new LogicalExpressionTokens(operatorToken);
- }
-
- void logicalExpression(
- ExpressionJudgment judgment,
- int location,
- void leftOperand,
- LogicalExpressionTokens tokens,
- void rightOperand,
- DartType inferredType) =>
- genericExpression("logicalExpression", location, inferredType);
-
- MapLiteralTokens mapLiteralTokens(
- Token constKeyword, Token leftBracket, Token rightBracket) {
- return new MapLiteralTokens(constKeyword, leftBracket, rightBracket);
- }
-
- void mapLiteral(
- ExpressionJudgment judgment,
- int location,
- MapLiteralTokens tokens,
- Object typeArguments,
- List<Object> entries,
- DartType inferredType) =>
- genericExpression("mapLiteral", location, inferredType);
-
- void mapLiteralEntry(
- Object judgment, int fileOffset, void key, Token separator, void value) {
- // TODO(brianwilkerson) Implement this.
- }
-
- void methodInvocation(
- ExpressionJudgment judgment,
- int resultOffset,
- DartType receiverType,
- List<DartType> argumentsTypes,
- bool isImplicitCall,
- Node interfaceMember,
- FunctionType calleeType,
- Substitution substitution,
- DartType inferredType) {
- FunctionType invokeType = substitution == null
- ? calleeType
- : substitution.substituteType(calleeType.withoutTypeParameters);
-
- _store(resultOffset,
- inferredType: inferredType,
- argumentTypes: argumentsTypes,
- invokeType: invokeType,
- isImplicitCall: isImplicitCall,
- receiverType: receiverType,
- reference: interfaceMember);
- }
-
- void methodInvocationCall(
- ExpressionJudgment judgment,
- int resultOffset,
- List<DartType> argumentsTypes,
- bool isImplicitCall,
- FunctionType calleeType,
- Substitution substitution,
- DartType inferredType) {
- FunctionType invokeType = substitution == null
- ? calleeType
- : substitution.substituteType(calleeType.withoutTypeParameters);
-
- _store(resultOffset,
- inferredType: inferredType,
- argumentTypes: argumentsTypes,
- invokeType: invokeType,
- isImplicitCall: isImplicitCall);
- }
-
- void namedFunctionExpression(ExpressionJudgment judgment,
- covariant VariableDeclarationBinder binder, DartType inferredType) =>
- genericExpression(
- "namedFunctionExpression", binder.fileOffset, inferredType);
-
- NotTokens notTokens(Token operator) {
- return new NotTokens(operator);
- }
-
- void not(ExpressionJudgment judgment, int location, NotTokens tokens,
- void operand, DartType inferredType) =>
- genericExpression("not", location, inferredType);
-
- NullLiteralTokens nullLiteralTokens(Token literal) {
- return new NullLiteralTokens(literal);
- }
-
- void nullLiteral(ExpressionJudgment judgment, int location,
- NullLiteralTokens tokens, bool isSynthetic, DartType inferredType) {
- if (isSynthetic) return null;
- genericExpression("nullLiteral", location, inferredType);
- }
-
- void propertyAssign(
- ExpressionJudgment judgment,
- int location,
- bool isSyntheticLhs,
- DartType receiverType,
- Node writeMember,
- DartType writeContext,
- Node combiner,
- DartType inferredType) {
- _store(location,
- isSynthetic: isSyntheticLhs,
- isWriteReference: true,
- reference: writeMember,
- writeContext: writeContext,
- combiner: combiner,
- inferredType: inferredType,
- receiverType: receiverType);
- }
-
- void propertyGet(
- ExpressionJudgment judgment,
- int location,
- bool forSyntheticToken,
- DartType receiverType,
- Node member,
- DartType inferredType) {
- _store(location,
- reference: member,
- inferredType: inferredType,
- isSynthetic: forSyntheticToken,
- receiverType: receiverType);
- }
-
- void propertyGetCall(
- ExpressionJudgment judgment, int location, DartType inferredType) {
- _store(location, isExplicitCall: true);
- }
-
- void redirectingInitializer(
- InitializerJudgment judgment,
- int location,
- Token thisKeyword,
- Token period,
- Token constructorName,
- covariant Object argumentList,
- Node initializerTarget) {
- _store(location, reference: initializerTarget);
- }
-
- RethrowTokens rethrowTokens(Token rethrowKeyword) {
- return new RethrowTokens(rethrowKeyword);
- }
-
- void rethrow_(ExpressionJudgment judgment, int location, RethrowTokens tokens,
- DartType inferredType) =>
- genericExpression('rethrow', location, inferredType);
-
- ReturnStatementTokens returnStatementTokens(
- Token returnKeyword, Token semicolon) {
- return new ReturnStatementTokens(returnKeyword, semicolon);
- }
-
- void returnStatement(StatementJudgment judgment, int location,
- ReturnStatementTokenstokens, void expression) {}
-
- void statementLabel(covariant void binder, Token label, Token colon) {}
-
- void staticAssign(ExpressionJudgment judgment, int location, Node writeMember,
- DartType writeContext, Node combiner, DartType inferredType) {
- _store(location,
- reference: writeMember,
- isWriteReference: true,
- writeContext: writeContext,
- combiner: combiner,
- inferredType: inferredType);
- }
-
- void staticGet(ExpressionJudgment judgment, int location,
- Node expressionTarget, DartType inferredType) {
- _store(location, reference: expressionTarget, inferredType: inferredType);
- }
-
- void staticInvocation(
- ExpressionJudgment judgment,
- int location,
- Node expressionTarget,
- List<DartType> expressionArgumentsTypes,
- FunctionType calleeType,
- Substitution substitution,
- DartType inferredType) {
- FunctionType invokeType = substitution == null
- ? calleeType
- : substitution.substituteType(calleeType.withoutTypeParameters);
- _store(location,
- invokeType: invokeType ?? const DynamicType(),
- argumentTypes: expressionArgumentsTypes,
- reference: expressionTarget,
- inferredType: inferredType);
- }
-
- void storeClassReference(int location, Node reference, DartType rawType) {
- // TODO(paulberry): would it be better to use literalType?
- _store(location, reference: reference, inferredType: rawType);
- }
-
- void storePrefixInfo(int location, int prefixInfo) {
- _store(location, isPrefixReference: true, prefixInfo: prefixInfo);
- }
-
- @override
- void storeUnresolved(int location) {
- _unstore(location);
- _store(location, inferredType: const DynamicType());
- }
-
- void stringConcatenation(
- ExpressionJudgment judgment, int location, DartType inferredType) {
- // We don't need the type - we already know that it is String.
- // Moreover, the file offset for StringConcatenation is `-1`.
- }
-
- StringLiteralTokens stringLiteralTokens(Token literal) {
- return new StringLiteralTokens(literal);
- }
-
- void stringLiteral(ExpressionJudgment judgment, int location,
- StringLiteralTokens tokens, String value, DartType inferredType) =>
- genericExpression("StringLiteral", location, inferredType);
-
- SuperInitializerTokens superInitializerTokens(
- Token superKeyword, Token period, Token constructorName) {
- return new SuperInitializerTokens(superKeyword, period, constructorName);
- }
-
- void superInitializer(InitializerJudgment judgment, int location,
- SuperInitializerTokens tokens, covariant Object argumentList) {}
-
- SwitchCaseTokens switchCaseTokens(Token keyword, Token colon) {
- return new SwitchCaseTokens(keyword, colon);
- }
-
- void switchCase(SwitchCaseJudgment judgment, List<Object> labels,
- Token keyword, void expression, Token colon, List<void> statements) {}
-
- void switchLabel(covariant void binder, Token label, Token colon) {}
-
- SwitchStatementTokens switchStatementTokens(
- Token switchKeyword,
- Token leftParenthesis,
- Token rightParenthesis,
- Token leftBracket,
- Token rightBracket) {
- return new SwitchStatementTokens(switchKeyword, leftParenthesis,
- rightParenthesis, leftBracket, rightBracket);
- }
-
- void switchStatement(StatementJudgment judgment, int location,
- SwitchStatementTokens tokens, void expression, void members) {}
-
- void symbolLiteral(ExpressionJudgment judgment, int location, Token poundSign,
- List<Token> components, String value, DartType inferredType) =>
- genericExpression("symbolLiteral", location, inferredType);
-
- ThisExpressionTokens thisExpressionTokens(Token thisKeyword) {
- return new ThisExpressionTokens(thisKeyword);
- }
-
- void thisExpression(ExpressionJudgment judgment, int location,
- ThisExpressionTokens token, DartType inferredType) {}
-
- ThrowTokens throwTokens(Token throwKeyword) {
- return new ThrowTokens(throwKeyword);
- }
-
- void throw_(ExpressionJudgment judgment, int location, ThrowTokens tokens,
- void expression, DartType inferredType) =>
- genericExpression('throw', location, inferredType);
-
- void tryCatch(StatementJudgment judgment, int location) {}
-
- TryFinallyTokens tryFinallyTokens(Token tryKeyword, Token finallyKeyword) {
- return new TryFinallyTokens(tryKeyword, finallyKeyword);
- }
-
- void tryFinally(
- StatementJudgment judgment,
- int location,
- TryFinallyTokens tokens,
- void body,
- void catchClauses,
- void finallyBlock) {}
-
- void typeLiteral(ExpressionJudgment judgment, int location,
- Node expressionType, DartType inferredType) {
- _store(location, reference: expressionType, inferredType: inferredType);
- }
-
- void typeReference(
- int location,
- bool forSyntheticToken,
- Token leftBracket,
- List<void> typeArguments,
- Token rightBracket,
- Node reference,
- covariant TypeVariableBinder binder,
- DartType type) {
- _store(location,
- isSynthetic: forSyntheticToken,
- reference: reference,
- declaration: binder?.fileOffset,
- inferredType: type,
- isTypeReference: true);
- }
-
- void typeVariableDeclaration(int location,
- covariant TypeVariableBinder binder, TypeParameter typeParameter) {
- _storeTypeVariableDeclaration(binder.fileOffset, typeParameter);
- _store(location, declaration: binder.fileOffset);
- }
-
- void variableAssign(
- ExpressionJudgment judgment,
- int location,
- bool isSyntheticLhs,
- DartType writeContext,
- covariant VariableDeclarationBinder writeVariableBinder,
- Node combiner,
- DartType inferredType) {
- _store(location,
- isSynthetic: isSyntheticLhs,
- declaration: writeVariableBinder?.fileOffset,
- isWriteReference: true,
- writeContext: writeContext,
- combiner: combiner,
- inferredType: inferredType);
- }
-
- void variableDeclaration(
- covariant VariableDeclarationBinder binder, DartType inferredType) {
- _store(binder.fileOffset,
- inferredType: inferredType, isSynthetic: binder.isSynthetic);
- }
-
- void variableGet(
- ExpressionJudgment judgment,
- int location,
- bool forSyntheticToken,
- bool isInCascade,
- covariant VariableDeclarationBinder variableBinder,
- DartType inferredType) {
- if (isInCascade) {
- return;
- }
- _store(location,
- isSynthetic: forSyntheticToken,
- declaration: variableBinder?.fileOffset,
- inferredType: inferredType);
- }
-
- void voidType(int location, Token token, DartType type) {
- _store(location, inferredType: type);
- }
-
- WhileStatementTokens whileStatementTokens(
- Token whileKeyword, Token leftParenthesis, Token rightParenthesis) {
- return new WhileStatementTokens(
- whileKeyword, leftParenthesis, rightParenthesis);
- }
-
- void whileStatement(StatementJudgment judgment, int location,
- WhileStatementTokens tokens, void condition, void body) {}
-
- YieldStatementTokens yieldStatementTokens(
- Token yieldKeyword, Token star, Token semicolon) {
- return new YieldStatementTokens(yieldKeyword, star, semicolon);
- }
-
- void yieldStatement(StatementJudgment judgment, int location,
- YieldStatementTokens tokens, void expression) {}
-
- void _store(int location,
- {List<DartType> argumentTypes,
- Node combiner,
- int declaration,
- DartType inferredType,
- DartType invokeType,
- bool isExplicitCall = false,
- bool isImplicitCall = false,
- bool isPrefixReference = false,
- bool isSynthetic = false,
- bool isTypeReference = false,
- bool isWriteReference = false,
- Node loadLibrary,
- int prefixInfo,
- DartType receiverType,
- Node reference,
- bool replace = false,
- DartType writeContext}) {
- _validateLocation(location);
- var encodedLocation = 2 * location + (isSynthetic ? 1 : 0);
- if (!replace) {
- var existing = _data[encodedLocation];
- if (existing != null) {
- if (existing.isOutline) {
- return;
- }
- throw new StateError('Data already stored for (offset=$location, '
- 'isSynthetic=$isSynthetic)');
- }
- }
- _data[encodedLocation] = new ResolutionData(
- argumentTypes: argumentTypes,
- combiner: combiner,
- declaration: declaration,
- inferredType: inferredType,
- invokeType: invokeType,
- isExplicitCall: isExplicitCall,
- isImplicitCall: isImplicitCall,
- isPrefixReference: isPrefixReference,
- isTypeReference: isTypeReference,
- isWriteReference: isWriteReference,
- loadLibrary: loadLibrary,
- prefixInfo: prefixInfo,
- receiverType: receiverType,
- reference: reference,
- writeContext: writeContext);
- }
-
- void _storeTypeVariableDeclaration(
- int fileOffset, TypeParameter typeParameter) {
- if (_typeVariableDeclarations.containsKey(fileOffset)) {
- throw new StateError(
- 'Type declaration already stored for offset $fileOffset');
- }
- _typeVariableDeclarations[typeParameter] = fileOffset;
- }
-
- void _unstore(int location, {bool isSynthetic: false}) {
- var encodedLocation = 2 * location + (isSynthetic ? 1 : 0);
- _data.remove(encodedLocation) == null;
- }
-
- void _validateLocation(int location) {
- if (location < 0) {
- throw new StateError('Invalid location: $location');
- }
- }
-
- NamedExpressionTokens namedExpressionTokens(Token nameToken, Token colon) {
- return new NamedExpressionTokens(nameToken, colon);
- }
-}
-
-/// A [DartType] wrapper around invocation type arguments.
-class TypeArgumentsDartType implements DartType {
- final List<DartType> types;
-
- TypeArgumentsDartType(this.types);
-
- noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation);
-
- @override
- String toString() {
- return '<${types.join(', ')}>';
- }
-}
-
-/// TODO(paulberry): eventually just use the element directly.
-class TypeVariableBinder {
- final int fileOffset;
-
- TypeVariableBinder(this.fileOffset);
-}
-
-/// TODO(paulberry): eventually just use the element directly.
-class VariableDeclarationBinder {
- final int fileOffset;
- final bool isSynthetic;
-
- VariableDeclarationBinder(this.fileOffset, this.isSynthetic);
-}
diff --git a/pkg/analyzer/lib/src/generated/declaration_resolver.dart b/pkg/analyzer/lib/src/generated/declaration_resolver.dart
index 854a78a..4a24786 100644
--- a/pkg/analyzer/lib/src/generated/declaration_resolver.dart
+++ b/pkg/analyzer/lib/src/generated/declaration_resolver.dart
@@ -27,19 +27,12 @@
* any more complete than a [COMPILATION_UNIT_ELEMENT].
*/
class DeclarationResolver extends RecursiveAstVisitor<Object> {
- final bool _useCFE;
-
/**
* The compilation unit containing the AST nodes being visited.
*/
CompilationUnitElementImpl _enclosingUnit;
/**
- * The library element containing the compilation unit.
- */
- LibraryElement _enclosingLibrary;
-
- /**
* The type provider used to access the known types.
*/
TypeProvider _typeProvider;
@@ -50,7 +43,7 @@
*/
ElementWalker _walker;
- DeclarationResolver({bool useCFE: false}) : _useCFE = useCFE;
+ DeclarationResolver();
/**
* Resolve the declarations within the given compilation [unit] to the
@@ -58,7 +51,6 @@
* if the element model and compilation unit do not match each other.
*/
void resolve(CompilationUnit unit, CompilationUnitElement element) {
- _enclosingLibrary = element.enclosingElement;
_enclosingUnit = element;
_typeProvider = _enclosingUnit.context?.typeProvider;
_walker = new ElementWalker.forCompilationUnit(element);
@@ -103,9 +95,6 @@
@override
Object visitClassDeclaration(ClassDeclaration node) {
ClassElement element = _match(node.name, _walker.getClass());
- if (_useCFE) {
- node.name.staticType = _typeProvider.typeType;
- }
_walk(new ElementWalker.forClass(element), () {
super.visitClassDeclaration(node);
});
@@ -116,9 +105,6 @@
@override
Object visitClassTypeAlias(ClassTypeAlias node) {
ClassElement element = _match(node.name, _walker.getClass());
- if (_useCFE) {
- node.name.staticType = _typeProvider.typeType;
- }
_walk(new ElementWalker.forClass(element), () {
super.visitClassTypeAlias(node);
});
@@ -135,10 +121,6 @@
super.visitConstructorDeclaration(node);
});
resolveMetadata(node, node.metadata, element);
- if (_useCFE) {
- _applyTypeToIdentifier(node.returnType, element.returnType);
- node.name?.staticType = element.type;
- }
return null;
}
@@ -254,17 +236,6 @@
}
@override
- Object visitFormalParameterList(FormalParameterList node) {
- if (_useCFE) {
- applyParameters(_enclosingLibrary, _walker._parameters, node);
- _walker.consumeParameters();
- return null;
- } else {
- return super.visitFormalParameterList(node);
- }
- }
-
- @override
Object visitFunctionDeclaration(FunctionDeclaration node) {
SimpleIdentifier functionName = node.name;
Token property = node.propertyKeyword;
@@ -282,15 +253,6 @@
elementName: functionName.name + '=');
}
}
- if (_useCFE) {
- if (node.isGetter) {
- node.name.staticType = element.returnType;
- } else if (node.isSetter) {
- node.name.staticType = element.parameters[0].type;
- } else {
- node.name.staticType = element.type;
- }
- }
_setGenericFunctionType(node.returnType, element.returnType);
node.functionExpression.element = element;
_walker._elementHolder?.addFunction(element);
@@ -427,15 +389,6 @@
elementName: nameOfMethod + '=');
}
}
- if (_useCFE) {
- if (node.isGetter) {
- node.name.staticType = element.returnType;
- } else if (node.isSetter) {
- node.name.staticType = element.parameters[0].type;
- } else {
- node.name.staticType = element.type;
- }
- }
_setGenericFunctionType(node.returnType, element.returnType);
_walk(new ElementWalker.forExecutable(element, _enclosingUnit), () {
super.visitMethodDeclaration(node);
@@ -445,6 +398,16 @@
}
@override
+ Object visitMixinDeclaration(MixinDeclaration node) {
+ ClassElement element = _match(node.name, _walker.getMixin());
+ _walk(new ElementWalker.forClass(element), () {
+ super.visitMixinDeclaration(node);
+ });
+ resolveMetadata(node, node.metadata, element);
+ return null;
+ }
+
+ @override
Object visitPartDirective(PartDirective node) {
super.visitPartDirective(node);
List<ElementAnnotation> annotations =
@@ -506,7 +469,7 @@
@override
Object visitTypeParameter(TypeParameter node) {
- if (node.parent.parent is FunctionTypedFormalParameter && !_useCFE) {
+ if (node.parent.parent is FunctionTypedFormalParameter) {
// Work around dartbug.com/28515.
// TODO(paulberry): remove this once dartbug.com/28515 is fixed.
var element = new TypeParameterElementImpl.forNode(node.name);
@@ -525,9 +488,6 @@
@override
Object visitVariableDeclaration(VariableDeclaration node) {
VariableElement element = _match(node.name, _walker.getVariable());
- if (_useCFE) {
- node.name.staticType = element.type;
- }
Expression initializer = node.initializer;
if (initializer != null) {
_walk(
@@ -558,21 +518,6 @@
}
}
- /// TODO(scheglov) Replace with the implementation from ResolutionApplier.
- void _applyTypeToIdentifier(Identifier identifier, DartType type) {
- if (type is InterfaceType) {
- if (identifier is SimpleIdentifier) {
- identifier.staticType = _typeProvider.typeType;
- identifier.staticElement = type.element;
- } else {
- throw new UnimplementedError(
- 'Cannot apply type to ${identifier.runtimeType}');
- }
- } else {
- throw new UnimplementedError('Cannot apply ${type.runtimeType}');
- }
- }
-
/**
* Updates [identifier] to point to [element], after ensuring that the
* element has the expected name.
@@ -904,6 +849,8 @@
int _enumIndex = 0;
List<ExecutableElement> _functions;
int _functionIndex = 0;
+ List<ClassElement> _mixins;
+ int _mixinIndex = 0;
List<ParameterElement> _parameters;
int _parameterIndex = 0;
List<FunctionTypeAliasElement> _typedefs;
@@ -937,6 +884,7 @@
_classes = compilationUnit.types,
_enums = compilationUnit.enums,
_functions = compilationUnit.functions,
+ _mixins = compilationUnit.mixins,
_typedefs = compilationUnit.functionTypeAliases,
_variables =
compilationUnit.topLevelVariables.where(_isNotSynthetic).toList();
@@ -1042,6 +990,12 @@
ExecutableElement getFunction() => _functions[_functionIndex++];
/**
+ * Returns the next non-synthetic child of [element] which is a mixin; throws
+ * an [IndexError] if there are no more.
+ */
+ ClassElement getMixin() => _mixins[_mixinIndex++];
+
+ /**
* Returns the next non-synthetic child of [element] which is a parameter;
* throws an [IndexError] if there are no more.
*/
diff --git a/pkg/analyzer/lib/src/generated/element_resolver.dart b/pkg/analyzer/lib/src/generated/element_resolver.dart
index 9a823df..974721e 100644
--- a/pkg/analyzer/lib/src/generated/element_resolver.dart
+++ b/pkg/analyzer/lib/src/generated/element_resolver.dart
@@ -207,17 +207,6 @@
if (identifier is SimpleIdentifier) {
Element element = _resolveSimpleIdentifier(identifier);
if (element == null) {
- //
- // This might be a reference to an imported name that is missing the
- // prefix.
- //
- element = _findImportWithoutPrefix(identifier);
- if (element is MultiplyDefinedElement) {
- // TODO(brianwilkerson) Report this error?
- element = null;
- }
- }
- if (element == null) {
// TODO(brianwilkerson) Report this error?
// resolver.reportError(
// StaticWarningCode.UNDEFINED_IDENTIFIER,
@@ -727,6 +716,12 @@
}
@override
+ Object visitMixinDeclaration(MixinDeclaration node) {
+ resolveMetadata(node);
+ return null;
+ }
+
+ @override
Object visitPartDirective(PartDirective node) {
resolveMetadata(node);
return null;
@@ -1258,39 +1253,6 @@
}
/**
- * Look for any declarations of the given [identifier] that are imported using
- * a prefix. Return the element that was found, or `null` if the name is not
- * imported using a prefix.
- */
- Element _findImportWithoutPrefix(SimpleIdentifier identifier) {
- Element element = null;
- Scope nameScope = _resolver.nameScope;
- List<ImportElement> imports = _definingLibrary.imports;
- int length = imports.length;
- for (int i = 0; i < length; i++) {
- ImportElement importElement = imports[i];
- PrefixElement prefixElement = importElement.prefix;
- if (prefixElement != null) {
- Identifier prefixedIdentifier = new PrefixedIdentifierImpl.temp(
- new SimpleIdentifierImpl(new StringToken(TokenType.STRING,
- prefixElement.name, prefixElement.nameOffset)),
- identifier);
- Element importedElement =
- nameScope.lookup(prefixedIdentifier, _definingLibrary);
- if (importedElement != null) {
- if (element == null) {
- element = importedElement;
- } else {
- element = MultiplyDefinedElementImpl.fromElements(
- _definingLibrary.context, element, importedElement);
- }
- }
- }
- }
- return element;
- }
-
- /**
* Return the best type of the given [expression] that is to be used for
* type analysis.
*/
@@ -2221,8 +2183,6 @@
Identifier setterId =
new SyntheticIdentifier('${identifier.name}=', identifier);
element = _resolver.nameScope.lookup(setterId, _definingLibrary);
- identifier.setProperty(LibraryImportScope.conflictingSdkElements,
- setterId.getProperty(LibraryImportScope.conflictingSdkElements));
}
ClassElement enclosingClass = _resolver.enclosingClass;
if (element == null && enclosingClass != null) {
diff --git a/pkg/analyzer/lib/src/generated/engine.dart b/pkg/analyzer/lib/src/generated/engine.dart
index 8d1810d..20824a9 100644
--- a/pkg/analyzer/lib/src/generated/engine.dart
+++ b/pkg/analyzer/lib/src/generated/engine.dart
@@ -1461,12 +1461,7 @@
bool trackCacheDependencies = true;
@override
- bool useFastaParser = false;
-
- /// [useCFE] exists on [AnalysisOptionsImpl] but not [AnalysisOptions] so as
- /// not to make it public API. It's used when calculating the driver signature
- /// of cached results.
- bool useCFE = false;
+ bool useFastaParser = true;
@override
bool disableCacheFlushing = false;
@@ -1499,6 +1494,12 @@
bool implicitDynamic = true;
/**
+ * Return `true` to enable mixin declarations.
+ * https://github.com/dart-lang/language/issues/12
+ */
+ bool isMixinSupportEnabled = false;
+
+ /**
* Initialize a newly created set of analysis options to have their default
* values.
*/
@@ -1530,7 +1531,7 @@
implicitCasts = options.implicitCasts;
nonnullableTypes = options.nonnullableTypes;
implicitDynamic = options.implicitDynamic;
- useCFE = options.useCFE;
+ isMixinSupportEnabled = options.isMixinSupportEnabled;
}
trackCacheDependencies = options.trackCacheDependencies;
disableCacheFlushing = options.disableCacheFlushing;
@@ -1670,7 +1671,7 @@
buffer.addBool(strongModeHints);
buffer.addBool(useFastaParser);
buffer.addBool(previewDart2);
- buffer.addBool(useCFE);
+ buffer.addBool(isMixinSupportEnabled);
// Append error processors.
buffer.addInt(errorProcessors.length);
diff --git a/pkg/analyzer/lib/src/generated/error_verifier.dart b/pkg/analyzer/lib/src/generated/error_verifier.dart
index b88db95..030cb13 100644
--- a/pkg/analyzer/lib/src/generated/error_verifier.dart
+++ b/pkg/analyzer/lib/src/generated/error_verifier.dart
@@ -485,12 +485,14 @@
try {
_isInNativeClass = node.nativeClause != null;
_enclosingClass = AbstractClassElementImpl.getImpl(node.declaredElement);
- _checkDuplicateClassMembers(node);
+
+ List<ClassMember> members = node.members;
+ _checkDuplicateClassMembers(members);
_checkForBuiltInIdentifierAsName(
node.name, CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPE_NAME);
_checkForMemberWithClassName();
_checkForNoDefaultSuperConstructorImplicit(node);
- _checkForConflictingTypeVariableErrorCodes(node);
+ _checkForConflictingTypeVariableErrorCodes();
TypeName superclass = node.extendsClause?.superclass;
ImplementsClause implementsClause = node.implementsClause;
WithClause withClause = node.withClause;
@@ -501,8 +503,9 @@
withClause != null) {
_checkClassInheritance(node, superclass, withClause, implementsClause);
}
- visitClassDeclarationIncrementally(node);
- _checkForFinalNotInitializedInClass(node);
+
+ _initializeInitialFieldElementsMap(_enclosingClass.fields);
+ _checkForFinalNotInitializedInClass(members);
_checkForDuplicateDefinitionInheritance();
_checkForConflictingInstanceMethodSetter(node);
_checkForBadFunctionUse(node);
@@ -514,28 +517,6 @@
}
}
- /**
- * Implementation of this method should be synchronized with
- * [visitClassDeclaration].
- */
- void visitClassDeclarationIncrementally(ClassDeclaration node) {
- _isInNativeClass = node.nativeClause != null;
- _enclosingClass = AbstractClassElementImpl.getImpl(node.declaredElement);
- // initialize initialFieldElementsMap
- if (_enclosingClass != null) {
- List<FieldElement> fieldElements = _enclosingClass.fields;
- _initialFieldElementsMap = new HashMap<FieldElement, INIT_STATE>();
- for (FieldElement fieldElement in fieldElements) {
- if (!fieldElement.isSynthetic) {
- _initialFieldElementsMap[fieldElement] =
- fieldElement.initializer == null
- ? INIT_STATE.NOT_INIT
- : INIT_STATE.INIT_IN_DECLARATION;
- }
- }
- }
- }
-
@override
Object visitClassTypeAlias(ClassTypeAlias node) {
_checkForBuiltInIdentifierAsName(
@@ -592,6 +573,7 @@
_checkForConflictingConstructorNameAndMember(node, constructorElement);
_checkForAllFinalInitializedErrorCodes(node);
_checkForRedirectingConstructorErrorCodes(node);
+ _checkForMixinDeclaresConstructor(node);
_checkForMultipleSuperInitializers(node);
_checkForRecursiveConstructorRedirect(node, constructorElement);
if (!_checkForRecursiveFactoryRedirect(node, constructorElement)) {
@@ -927,7 +909,6 @@
_checkForConstWithNonConst(node);
_checkForConstWithUndefinedConstructor(
node, constructorName, typeName);
- _checkForConstWithTypeParameters(typeName);
_checkForConstDeferredClass(node, constructorName, typeName);
} else {
_checkForNewWithUndefinedConstructor(node, constructorName, typeName);
@@ -1048,6 +1029,43 @@
}
@override
+ Object visitMixinDeclaration(MixinDeclaration node) {
+ // TODO(scheglov) Verify for all mixin errors.
+// ClassElementImpl outerClass = _enclosingClass;
+ try {
+// _isInNativeClass = node.nativeClause != null;
+ _enclosingClass = AbstractClassElementImpl.getImpl(node.declaredElement);
+
+ List<ClassMember> members = node.members;
+ _checkDuplicateClassMembers(members);
+// _checkForBuiltInIdentifierAsName(
+// node.name, CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPE_NAME);
+ _checkForMemberWithClassName();
+// _checkForNoDefaultSuperConstructorImplicit(node);
+ _checkForConflictingTypeVariableErrorCodes();
+
+ OnClause onClause = node.onClause;
+ ImplementsClause implementsClause = node.implementsClause;
+
+ // Only do error checks only if there is a non-null clause.
+ if (onClause != null || implementsClause != null) {
+ _checkMixinInheritance(node, onClause, implementsClause);
+ }
+
+ _initializeInitialFieldElementsMap(_enclosingClass.fields);
+ _checkForFinalNotInitializedInClass(members);
+// _checkForDuplicateDefinitionInheritance();
+// _checkForConflictingInstanceMethodSetter(node);
+// _checkForBadFunctionUse(node);
+ return super.visitMixinDeclaration(node);
+ } finally {
+// _isInNativeClass = false;
+ _initialFieldElementsMap = null;
+// _enclosingClass = outerClass;
+ }
+ }
+
+ @override
Object visitNativeClause(NativeClause node) {
// TODO(brianwilkerson) Figure out the right rule for when 'native' is
// allowed.
@@ -1344,7 +1362,6 @@
_checkForInconsistentMethodInheritance();
_checkForRecursiveInterfaceInheritance(_enclosingClass);
_checkForConflictingGetterAndMethod();
- _checkForConflictingInstanceGetterAndSuperclassMember();
_checkImplementsSuperClass(implementsClause);
_checkForMixinHasNoConstructors(node);
_checkMixinInference(node, withClause);
@@ -1377,10 +1394,10 @@
/**
* Check that there are no members with the same name.
*/
- void _checkDuplicateClassMembers(ClassDeclaration node) {
+ void _checkDuplicateClassMembers(List<ClassMember> members) {
Map<String, Element> definedNames = new HashMap<String, Element>();
Set<String> visitedFields = new HashSet<String>();
- for (ClassMember member in node.members) {
+ for (ClassMember member in members) {
// We ignore constructors because they are checked in the method
// _checkForConflictingConstructorNameAndMember.
if (member is FieldDeclaration) {
@@ -1782,7 +1799,7 @@
/**
* Verify that all classes of the given [withClause] are valid.
*
- * See [CompileTimeErrorCode.MIXIN_DECLARES_CONSTRUCTOR],
+ * See [CompileTimeErrorCode.MIXIN_CLASS_DECLARES_CONSTRUCTOR],
* [CompileTimeErrorCode.MIXIN_INHERITS_FROM_NOT_OBJECT], and
* [CompileTimeErrorCode.MIXIN_REFERENCES_SUPER].
*/
@@ -1803,7 +1820,7 @@
mixinName, CompileTimeErrorCode.MIXIN_DEFERRED_CLASS)) {
problemReported = true;
}
- if (_checkForMixinDeclaresConstructor(mixinName, mixinElement)) {
+ if (_checkForMixinClassDeclaresConstructor(mixinName, mixinElement)) {
problemReported = true;
}
if (!enableSuperMixins &&
@@ -1983,17 +2000,6 @@
libraryNames.sort();
_errorReporter.reportErrorForNode(StaticWarningCode.AMBIGUOUS_IMPORT,
node, [name, StringUtilities.printListOfQuotedNames(libraryNames)]);
- } else if (element != null) {
- List<Element> sdkElements =
- node.getProperty(LibraryImportScope.conflictingSdkElements);
- if (sdkElements != null) {
- _errorReporter.reportErrorForNode(
- StaticWarningCode.CONFLICTING_DART_IMPORT, node, [
- element.displayName,
- _getLibraryName(sdkElements[0]),
- _getLibraryName(element)
- ]);
- }
}
}
@@ -2481,71 +2487,6 @@
}
/**
- * Verify that the superclass of the [_enclosingClass] does not declare
- * accessible static members with the same name as the instance
- * getters/setters declared in [_enclosingClass].
- *
- * See [StaticWarningCode.CONFLICTING_INSTANCE_GETTER_AND_SUPERCLASS_MEMBER], and
- * [StaticWarningCode.CONFLICTING_INSTANCE_SETTER_AND_SUPERCLASS_MEMBER].
- */
- void _checkForConflictingInstanceGetterAndSuperclassMember() {
- if (_enclosingClass == null) {
- return;
- }
- InterfaceType enclosingType = _enclosingClass.type;
- // check every accessor
- for (PropertyAccessorElement accessor in _enclosingClass.accessors) {
- // we analyze instance accessors here
- if (accessor.isStatic) {
- continue;
- }
- // prepare accessor properties
- String name = accessor.displayName;
- bool getter = accessor.isGetter;
- // if non-final variable, ignore setter - we already reported problem for
- // getter
- if (accessor.isSetter && accessor.isSynthetic) {
- continue;
- }
- // try to find super element
- ExecutableElement superElement;
- superElement =
- enclosingType.lookUpGetterInSuperclass(name, _currentLibrary);
- if (superElement == null) {
- superElement =
- enclosingType.lookUpSetterInSuperclass(name, _currentLibrary);
- }
- if (superElement == null) {
- superElement =
- enclosingType.lookUpMethodInSuperclass(name, _currentLibrary);
- }
- if (superElement == null) {
- continue;
- }
- // OK, not static
- if (!superElement.isStatic) {
- continue;
- }
- // prepare "super" type to report its name
- ClassElement superElementClass =
- superElement.enclosingElement as ClassElement;
- InterfaceType superElementType = superElementClass.type;
-
- if (getter) {
- _errorReporter.reportErrorForElement(
- StaticWarningCode.CONFLICTING_INSTANCE_GETTER_AND_SUPERCLASS_MEMBER,
- accessor,
- [superElementType.displayName]);
- } else {
- _errorReporter.reportErrorForElement(
- StaticWarningCode.CONFLICTING_INSTANCE_SETTER_AND_SUPERCLASS_MEMBER,
- accessor,
- [superElementType.displayName]);
- }
- }
- }
-
- /**
* Verify that the enclosing class does not have a setter with the same name
* as the given instance method declaration.
*
@@ -2730,8 +2671,7 @@
* See [CompileTimeErrorCode.CONFLICTING_TYPE_VARIABLE_AND_CLASS], and
* [CompileTimeErrorCode.CONFLICTING_TYPE_VARIABLE_AND_MEMBER].
*/
- void _checkForConflictingTypeVariableErrorCodes(
- ClassDeclaration declaration) {
+ void _checkForConflictingTypeVariableErrorCodes() {
for (TypeParameterElement typeParameter in _enclosingClass.typeParameters) {
String name = typeParameter.name;
// name is same as the name of the enclosing class
@@ -2949,35 +2889,6 @@
}
/**
- * Verify that the given [type] does not reference any type parameters.
- *
- * See [CompileTimeErrorCode.CONST_WITH_TYPE_PARAMETERS].
- */
- void _checkForConstWithTypeParameters(TypeAnnotation type) {
- // something wrong with AST
- if (type is! TypeName) {
- return;
- }
- TypeName typeName = type;
- Identifier name = typeName.name;
- if (name == null) {
- return;
- }
- // should not be a type parameter
- if (name.staticElement is TypeParameterElement) {
- _errorReporter.reportErrorForNode(
- CompileTimeErrorCode.CONST_WITH_TYPE_PARAMETERS, name);
- }
- // check type arguments
- TypeArgumentList typeArguments = typeName.typeArguments;
- if (typeArguments != null) {
- for (TypeAnnotation argument in typeArguments.arguments) {
- _checkForConstWithTypeParameters(argument);
- }
- }
- }
-
- /**
* Verify that if the given 'const' instance creation [expression] is being
* invoked on the resolved constructor. The [constructorName] is the
* constructor name, always non-`null`. The [typeName] is the name of the type
@@ -3291,8 +3202,7 @@
return false;
}
if (typeName.isDeferred) {
- _errorReporter
- .reportErrorForNode(errorCode, typeName, [typeName.name.name]);
+ _errorReporter.reportErrorForNode(errorCode, typeName);
return true;
}
return false;
@@ -3488,23 +3398,20 @@
}
/**
- * Verify that final fields in the given class [declaration] that are
- * declared, without any constructors in the enclosing class, are
- * initialized. Cases in which there is at least one constructor are handled
- * at the end of
- * [_checkForAllFinalInitializedErrorCodes].
+ * If there are no constructors in the given [members], verify that all
+ * final fields are initialized. Cases in which there is at least one
+ * constructor are handled in [_checkForAllFinalInitializedErrorCodes].
*
* See [CompileTimeErrorCode.CONST_NOT_INITIALIZED], and
* [StaticWarningCode.FINAL_NOT_INITIALIZED].
*/
- void _checkForFinalNotInitializedInClass(ClassDeclaration declaration) {
- NodeList<ClassMember> classMembers = declaration.members;
- for (ClassMember classMember in classMembers) {
+ void _checkForFinalNotInitializedInClass(List<ClassMember> members) {
+ for (ClassMember classMember in members) {
if (classMember is ConstructorDeclaration) {
return;
}
}
- for (ClassMember classMember in classMembers) {
+ for (ClassMember classMember in members) {
if (classMember is FieldDeclaration) {
_checkForFinalNotInitialized(classMember.fields);
}
@@ -4246,7 +4153,7 @@
// check accessors
for (PropertyAccessorElement accessor in _enclosingClass.accessors) {
- if (className == accessor.name) {
+ if (className == accessor.displayName) {
_errorReporter.reportErrorForElement(
CompileTimeErrorCode.MEMBER_WITH_CLASS_NAME, accessor);
}
@@ -4437,14 +4344,14 @@
* constructor. The [mixinName] is the node to report problem on. The
* [mixinElement] is the mixing to evaluate.
*
- * See [CompileTimeErrorCode.MIXIN_DECLARES_CONSTRUCTOR].
+ * See [CompileTimeErrorCode.MIXIN_CLASS_DECLARES_CONSTRUCTOR].
*/
- bool _checkForMixinDeclaresConstructor(
+ bool _checkForMixinClassDeclaresConstructor(
TypeName mixinName, ClassElement mixinElement) {
for (ConstructorElement constructor in mixinElement.constructors) {
if (!constructor.isSynthetic && !constructor.isFactory) {
_errorReporter.reportErrorForNode(
- CompileTimeErrorCode.MIXIN_DECLARES_CONSTRUCTOR,
+ CompileTimeErrorCode.MIXIN_CLASS_DECLARES_CONSTRUCTOR,
mixinName,
[mixinElement.name]);
return true;
@@ -4453,6 +4360,13 @@
return false;
}
+ void _checkForMixinDeclaresConstructor(ConstructorDeclaration node) {
+ if (_enclosingClass.isMixin) {
+ _errorReporter.reportErrorForNode(
+ CompileTimeErrorCode.MIXIN_DECLARES_CONSTRUCTOR, node.returnType);
+ }
+ }
+
/**
* Report the error [CompileTimeErrorCode.MIXIN_HAS_NO_CONSTRUCTORS] if
* appropriate.
@@ -4930,6 +4844,39 @@
}
/**
+ * Verify that all classes of the given [onClause] are valid.
+ *
+ * See [CompileTimeErrorCode.MIXIN_CLASS_DECLARES_CONSTRUCTOR],
+ * [CompileTimeErrorCode.MIXIN_INHERITS_FROM_NOT_OBJECT], and
+ * [CompileTimeErrorCode.MIXIN_REFERENCES_SUPER].
+ */
+ bool _checkForOnClauseErrorCodes(OnClause onClause) {
+ if (onClause == null) {
+ return false;
+ }
+ bool problemReported = false;
+ for (TypeName typeName in onClause.superclassConstraints) {
+ DartType type = typeName.type;
+ if (type is InterfaceType) {
+ if (_checkForExtendsOrImplementsDisallowedClass(
+ typeName,
+ CompileTimeErrorCode
+ .MIXIN_SUPER_CLASS_CONSTRAINT_DISALLOWED_CLASS)) {
+ problemReported = true;
+ } else {
+ if (_checkForExtendsOrImplementsDeferredClass(
+ typeName,
+ CompileTimeErrorCode
+ .MIXIN_SUPER_CLASS_CONSTRAINT_DEFERRED_CLASS)) {
+ problemReported = true;
+ }
+ }
+ }
+ }
+ return problemReported;
+ }
+
+ /**
* Verify the given operator-method [declaration], does not have an optional
* parameter. This method assumes that the method declaration was tested to be
* an operator declaration before being called.
@@ -5900,6 +5847,34 @@
}
/**
+ * Checks the class for problems with the superclass, mixins, or implemented
+ * interfaces.
+ */
+ void _checkMixinInheritance(MixinDeclaration node, OnClause onClause,
+ ImplementsClause implementsClause) {
+ // TODO(scheglov) Verify for all mixin errors.
+ // Only check for all of the inheritance logic around clauses if there
+ // isn't an error code such as "Cannot implement double" already.
+ if (!_checkForOnClauseErrorCodes(onClause) &&
+ !_checkForImplementsDisallowedClass(implementsClause)) {
+// _checkForImplicitDynamicType(superclass);
+// _checkForExtendsDeferredClass(superclass);
+ _checkForImplementsDeferredClass(implementsClause);
+// _checkForNonAbstractClassInheritsAbstractMember(node.name);
+// _checkForInconsistentMethodInheritance();
+// _checkForRecursiveInterfaceInheritance(_enclosingClass);
+// _checkForConflictingGetterAndMethod();
+// _checkImplementsSuperClass(implementsClause);
+// _checkForMixinHasNoConstructors(node);
+// _checkMixinInference(node, onClause);
+// _checkForMixinWithConflictingPrivateMember(onClause, superclass);
+// if (!disableConflictingGenericsCheck) {
+// _checkForConflictingGenerics(node);
+// }
+ }
+ }
+
+ /**
* Verify that the given [typeArguments] are all within their bounds, as
* defined by the given [element].
*
@@ -6239,6 +6214,18 @@
return visitor.hasSelfReference;
}
+ void _initializeInitialFieldElementsMap(List<FieldElement> fields) {
+ _initialFieldElementsMap = new HashMap<FieldElement, INIT_STATE>();
+ for (FieldElement fieldElement in fields) {
+ if (!fieldElement.isSynthetic) {
+ _initialFieldElementsMap[fieldElement] =
+ fieldElement.initializer == null
+ ? INIT_STATE.NOT_INIT
+ : INIT_STATE.INIT_IN_DECLARATION;
+ }
+ }
+ }
+
bool _isFunctionType(DartType type) {
if (type.isDynamic || type.isDartCoreNull) {
return true;
diff --git a/pkg/analyzer/lib/src/generated/parser.dart b/pkg/analyzer/lib/src/generated/parser.dart
index 4e0133d..fe33ae00 100644
--- a/pkg/analyzer/lib/src/generated/parser.dart
+++ b/pkg/analyzer/lib/src/generated/parser.dart
@@ -184,7 +184,8 @@
* A flag indicating whether the analyzer [Parser] factory method
* will return a fasta based parser or an analyzer based parser.
*/
- static const bool useFasta = const bool.fromEnvironment("useFastaParser");
+ static const bool useFasta =
+ const bool.fromEnvironment("useFastaParser", defaultValue: true);
/**
* The source being parsed.
@@ -264,12 +265,6 @@
@deprecated
bool parseGenericMethods = false;
- /**
- * A flag indicating whether to parse generic method comments, of the form
- * `/*=T*/` and `/*<T>*/`.
- */
- bool parseGenericMethodComments = false;
-
bool allowNativeClause;
/**
@@ -278,7 +273,7 @@
*/
factory Parser(Source source, AnalysisErrorListener errorListener,
{bool useFasta}) {
- if ((useFasta ?? false) || Parser.useFasta) {
+ if (useFasta ?? Parser.useFasta) {
return new _Parser2(source, errorListener, allowNativeClause: true);
} else {
return new Parser.withoutFasta(source, errorListener);
@@ -1515,9 +1510,9 @@
parseSimpleIdentifier(allowKeyword: true, isDeclaration: true),
parseFormalParameterList());
} else if (_tokenMatches(next, TokenType.OPEN_PAREN)) {
- TypeName returnType = _parseOptionalTypeNameComment();
+ TypeName returnType = null;
SimpleIdentifier methodName = parseSimpleIdentifier(isDeclaration: true);
- TypeParameterList typeParameters = _parseGenericCommentTypeParameters();
+ TypeParameterList typeParameters = null;
FormalParameterList parameters = parseFormalParameterList();
if (_matches(TokenType.COLON) ||
modifiers.factoryKeyword != null ||
@@ -1632,7 +1627,7 @@
} else if (_tokenMatches(next, TokenType.OPEN_PAREN)) {
SimpleIdentifier methodName =
_parseSimpleIdentifierUnchecked(isDeclaration: true);
- TypeParameterList typeParameters = _parseGenericCommentTypeParameters();
+ TypeParameterList typeParameters = null;
FormalParameterList parameters = parseFormalParameterList();
if (methodName.name == className) {
_reportErrorForNode(ParserErrorCode.CONSTRUCTOR_WITH_RETURN_TYPE, type);
@@ -2238,7 +2233,7 @@
return parseFunctionDeclaration(
commentAndMetadata, modifiers.externalKeyword, null);
} else if (_tokenMatches(next, TokenType.OPEN_PAREN)) {
- TypeName returnType = _parseOptionalTypeNameComment();
+ TypeName returnType = null;
_validateModifiersForTopLevelFunction(modifiers);
return parseFunctionDeclaration(
commentAndMetadata, modifiers.externalKeyword, returnType);
@@ -2386,7 +2381,7 @@
Expression parseConstExpression() {
Token keyword = getAndAdvance();
TokenType type = _currentToken.type;
- if (type == TokenType.LT || _injectGenericCommentTypeList()) {
+ if (type == TokenType.LT) {
return parseListOrMapLiteral(keyword);
} else if (type == TokenType.OPEN_SQUARE_BRACKET ||
type == TokenType.INDEX) {
@@ -2922,18 +2917,9 @@
keywordToken = getAndAdvance();
if (_isTypedIdentifier(_currentToken)) {
type = parseTypeAnnotation(false);
- } else {
- // Support `final/*=T*/ x;`
- type = _parseOptionalTypeNameComment();
}
} else if (keyword == Keyword.VAR) {
keywordToken = getAndAdvance();
- // Support `var/*=T*/ x;`
- type = _parseOptionalTypeNameComment();
- if (type != null) {
- // Clear the keyword to prevent an error.
- keywordToken = null;
- }
} else if (_isTypedIdentifier(_currentToken)) {
type = parseTypeAnnotation(false);
} else if (inFunctionType && _matchesIdentifier()) {
@@ -2959,7 +2945,7 @@
} else {
// Support parameters such as `(/*=K*/ key, /*=V*/ value)`
// This is not supported if the type is required.
- type = _parseOptionalTypeNameComment();
+ type = null;
}
return new FinalConstVarOrType(keywordToken, type);
}
@@ -4657,7 +4643,7 @@
} finally {
_inInitializer = wasInInitializer;
}
- } else if (type == TokenType.LT || _injectGenericCommentTypeList()) {
+ } else if (type == TokenType.LT) {
if (isFunctionExpression(currentToken)) {
return parseFunctionExpression();
}
@@ -5286,13 +5272,7 @@
// TODO(eernst): Rename this to `parseTypeNotVoidWithoutFunction`?
// Apparently, it was named `parseTypeName` before type arguments existed.
TypeName parseTypeName(bool inExpression) {
- TypeName realType = _parseTypeName(inExpression);
- // If this is followed by a generic method type comment, allow the comment
- // type to replace the real type name.
- // TODO(jmesserly): this feels like a big hammer. Can we restrict it to
- // only work inside generic methods?
- TypeName typeFromComment = _parseOptionalTypeNameComment();
- return typeFromComment ?? realType;
+ return _parseTypeName(inExpression);
}
/**
@@ -5767,8 +5747,7 @@
*/
Token skipTypeArgumentList(Token startToken) {
Token token = startToken;
- if (!_tokenMatches(token, TokenType.LT) &&
- !_injectGenericCommentTypeList()) {
+ if (!_tokenMatches(token, TokenType.LT)) {
return null;
}
token = skipTypeAnnotation(token.next);
@@ -6209,49 +6188,6 @@
return null;
}
- bool _injectGenericComment(TokenType type, int prefixLen) {
- if (parseGenericMethodComments) {
- CommentToken t = _currentToken.precedingComments;
- for (; t != null; t = t.next) {
- if (t.type == type) {
- String comment = t.lexeme.substring(prefixLen, t.lexeme.length - 2);
- Token list = _scanGenericMethodComment(comment, t.offset + prefixLen);
- if (list != null) {
- _reportErrorForToken(HintCode.GENERIC_METHOD_COMMENT, t);
- // Remove the token from the comment stream.
- t.remove();
- // Insert the tokens into the stream.
- _injectTokenList(list);
- return true;
- }
- }
- }
- }
- return false;
- }
-
- /**
- * Matches a generic comment type substitution and injects it into the token
- * stream. Returns true if a match was injected, otherwise false.
- *
- * These comments are of the form `/*=T*/`, in other words, a [TypeName]
- * inside a slash-star comment, preceded by equals sign.
- */
- bool _injectGenericCommentTypeAssign() {
- return _injectGenericComment(TokenType.GENERIC_METHOD_TYPE_ASSIGN, 3);
- }
-
- /**
- * Matches a generic comment type parameters and injects them into the token
- * stream. Returns true if a match was injected, otherwise false.
- *
- * These comments are of the form `/*<K, V>*/`, in other words, a
- * [TypeParameterList] or [TypeArgumentList] inside a slash-star comment.
- */
- bool _injectGenericCommentTypeList() {
- return _injectGenericComment(TokenType.GENERIC_METHOD_TYPE_LIST, 2);
- }
-
/**
* Inject the given [token] into the token stream immediately before the
* current token.
@@ -6263,19 +6199,6 @@
return token;
}
- void _injectTokenList(Token firstToken) {
- // Scanner creates a cyclic EOF token.
- Token lastToken = firstToken;
- while (lastToken.next.type != TokenType.EOF) {
- lastToken = lastToken.next;
- }
- // Inject these new tokens into the stream.
- Token previous = _currentToken.previous;
- lastToken.setNext(_currentToken);
- previous.setNext(firstToken);
- _currentToken = firstToken;
- }
-
/**
* Return `true` if the current token could be the question mark in a
* condition expression. The current token is assumed to be a question mark.
@@ -7114,30 +7037,13 @@
}
/**
- * Parses generic type parameters from a comment.
- *
- * Normally this is handled by [_parseGenericMethodTypeParameters], but if the
- * code already handles the normal generic type parameters, the comment
- * matcher can be called directly. For example, we may have already tried
- * matching `<` (less than sign) in a method declaration, and be currently
- * on the `(` (open paren) because we didn't find it. In that case, this
- * function will parse the preceding comment such as `/*<T, R>*/`.
- */
- TypeParameterList _parseGenericCommentTypeParameters() {
- if (_injectGenericCommentTypeList()) {
- return parseTypeParameterList();
- }
- return null;
- }
-
- /**
* Parse the generic method or function's type parameters.
*
* For backwards compatibility this can optionally use comments.
* See [parseGenericMethodComments].
*/
TypeParameterList _parseGenericMethodTypeParameters() {
- if (_matches(TokenType.LT) || _injectGenericCommentTypeList()) {
+ if (_matches(TokenType.LT)) {
return parseTypeParameterList();
}
return null;
@@ -7341,10 +7247,6 @@
* advancing. Return the return type that was parsed.
*/
TypeAnnotation _parseOptionalReturnType() {
- TypeName typeComment = _parseOptionalTypeNameComment();
- if (typeComment != null) {
- return typeComment;
- }
Keyword keyword = _currentToken.keyword;
if (keyword == Keyword.VOID) {
if (_atGenericFunctionTypeAfterReturnType(_peek())) {
@@ -7386,19 +7288,12 @@
* This also supports the comment form, if enabled: `/*<T>*/`
*/
TypeArgumentList _parseOptionalTypeArguments() {
- if (_matches(TokenType.LT) || _injectGenericCommentTypeList()) {
+ if (_matches(TokenType.LT)) {
return parseTypeArgumentList();
}
return null;
}
- TypeName _parseOptionalTypeNameComment() {
- if (_injectGenericCommentTypeAssign()) {
- return _parseTypeName(false);
- }
- return null;
- }
-
/**
* Parse a part directive. The [commentAndMetadata] is the metadata to be
* associated with the directive. Return the part or part-of directive that
@@ -7465,7 +7360,7 @@
*/
Identifier _parsePrefixedIdentifierAfterIdentifier(
SimpleIdentifier qualifier) {
- if (!_matches(TokenType.PERIOD) || _injectGenericCommentTypeList()) {
+ if (!_matches(TokenType.PERIOD)) {
return qualifier;
}
Token period = getAndAdvance();
@@ -7622,11 +7517,7 @@
* qualified typeArguments?
*/
TypeAnnotation _parseTypeAnnotationAfterIdentifier() {
- TypeAnnotation type = parseTypeAnnotation(false);
- // If this is followed by a generic method type comment, allow the comment
- // type to replace the real type name.
- TypeName typeFromComment = _parseOptionalTypeNameComment();
- return typeFromComment ?? type;
+ return parseTypeAnnotation(false);
}
TypeName _parseTypeName(bool inExpression) {
@@ -7813,22 +7704,6 @@
}
/**
- * Scans the generic method comment, and returns the tokens, otherwise
- * returns null.
- */
- Token _scanGenericMethodComment(String code, int offset) {
- BooleanErrorListener listener = new BooleanErrorListener();
- Scanner scanner =
- new Scanner(null, new SubSequenceReader(code, offset), listener);
- scanner.setSourceStart(1, 1);
- Token firstToken = scanner.tokenize();
- if (listener.errorReported) {
- return null;
- }
- return firstToken;
- }
-
- /**
* Execute the given [parseOperation] in a temporary parser whose current
* token has been set to the given [startToken]. If the parse does not
* generate any errors or exceptions, then return the token following the
diff --git a/pkg/analyzer/lib/src/generated/parser_fasta.dart b/pkg/analyzer/lib/src/generated/parser_fasta.dart
index 82e23f4..8cbdd21 100644
--- a/pkg/analyzer/lib/src/generated/parser_fasta.dart
+++ b/pkg/analyzer/lib/src/generated/parser_fasta.dart
@@ -24,13 +24,13 @@
final AstBuilder astBuilder;
ParserAdapter(this.currentToken, ErrorReporter errorReporter, Uri fileUri,
- {bool allowNativeClause: false, bool enableGenericMethodComments: false})
+ {bool allowNativeClause: false})
: fastaParser = new fasta.Parser(null),
astBuilder = new AstBuilder(errorReporter, fileUri, true) {
+ fastaParser.isMixinSupportEnabled = true;
fastaParser.listener = astBuilder;
astBuilder.parser = fastaParser;
astBuilder.allowNativeClause = allowNativeClause;
- astBuilder.parseGenericMethodComments = enableGenericMethodComments;
}
@override
@@ -50,14 +50,6 @@
}
@override
- bool get parseGenericMethodComments => astBuilder.parseGenericMethodComments;
-
- @override
- set parseGenericMethodComments(bool value) {
- astBuilder.parseGenericMethodComments = value;
- }
-
- @override
set parseGenericMethods(_) {}
/// Append the given token to the end of the token stream,
diff --git a/pkg/analyzer/lib/src/generated/resolver.dart b/pkg/analyzer/lib/src/generated/resolver.dart
index 124183c..911c655 100644
--- a/pkg/analyzer/lib/src/generated/resolver.dart
+++ b/pkg/analyzer/lib/src/generated/resolver.dart
@@ -1604,6 +1604,9 @@
@override
Object visitInstanceCreationExpression(InstanceCreationExpression node) {
if (node.isConst) {
+ TypeName typeName = node.constructorName.type;
+ _checkForConstWithTypeParameters(typeName);
+
// We need to evaluate the constant to see if any errors occur during its
// evaluation.
ConstructorElement constructor = node.staticElement;
@@ -1808,6 +1811,35 @@
}
/**
+ * Verify that the given [type] does not reference any type parameters.
+ *
+ * See [CompileTimeErrorCode.CONST_WITH_TYPE_PARAMETERS].
+ */
+ void _checkForConstWithTypeParameters(TypeAnnotation type) {
+ // something wrong with AST
+ if (type is! TypeName) {
+ return;
+ }
+ TypeName typeName = type;
+ Identifier name = typeName.name;
+ if (name == null) {
+ return;
+ }
+ // should not be a type parameter
+ if (name.staticElement is TypeParameterElement) {
+ _errorReporter.reportErrorForNode(
+ CompileTimeErrorCode.CONST_WITH_TYPE_PARAMETERS, name);
+ }
+ // check type arguments
+ TypeArgumentList typeArguments = typeName.typeArguments;
+ if (typeArguments != null) {
+ for (TypeAnnotation argument in typeArguments.arguments) {
+ _checkForConstWithTypeParameters(argument);
+ }
+ }
+ }
+
+ /**
* @return `true` if given [Type] implements operator <i>==</i>, and it is not
* <i>int</i> or <i>String</i>.
*/
@@ -2723,6 +2755,8 @@
List<MethodElement> _methods;
+ List<ClassElement> _mixins;
+
List<ParameterElement> _parameters;
List<TopLevelVariableElement> _topLevelVariables;
@@ -2813,6 +2847,15 @@
return result;
}
+ List<ClassElement> get mixins {
+ if (_mixins == null) {
+ return const <ClassElement>[];
+ }
+ List<ClassElement> result = _mixins;
+ _mixins = null;
+ return result;
+ }
+
List<ParameterElement> get parameters {
if (_parameters == null) {
return const <ParameterElement>[];
@@ -2914,6 +2957,13 @@
_methods.add(element);
}
+ void addMixin(ClassElement element) {
+ if (_mixins == null) {
+ _mixins = new List<ClassElement>();
+ }
+ _mixins.add(element);
+ }
+
void addParameter(ParameterElement element) {
if (_parameters == null) {
_parameters = new List<ParameterElement>();
@@ -5007,6 +5057,12 @@
*/
ExecutableElement _enclosingFunction = null;
+ /**
+ * The mixin declaration representing the class containing the current node,
+ * or `null` if the current node is not contained in a mixin.
+ */
+ MixinDeclaration _enclosingMixinDeclaration = null;
+
InferenceContext inferenceContext = null;
/**
@@ -5291,7 +5347,8 @@
Object visitAnnotation(Annotation node) {
AstNode parent = node.parent;
if (identical(parent, _enclosingClassDeclaration) ||
- identical(parent, _enclosingFunctionTypeAlias)) {
+ identical(parent, _enclosingFunctionTypeAlias) ||
+ identical(parent, _enclosingMixinDeclaration)) {
return null;
}
node.name?.accept(this);
@@ -6193,6 +6250,31 @@
}
@override
+ Object visitMixinDeclaration(MixinDeclaration node) {
+ //
+ // Resolve the metadata in the library scope.
+ //
+ node.metadata?.accept(this);
+ _enclosingMixinDeclaration = node;
+ //
+ // Continue the class resolution.
+ //
+ ClassElement outerType = enclosingClass;
+ try {
+ enclosingClass = node.declaredElement;
+ typeAnalyzer.thisType = enclosingClass?.type;
+ super.visitMixinDeclaration(node);
+ node.accept(elementResolver);
+ node.accept(typeAnalyzer);
+ } finally {
+ typeAnalyzer.thisType = outerType?.type;
+ enclosingClass = outerType;
+ _enclosingMixinDeclaration = null;
+ }
+ return null;
+ }
+
+ @override
Object visitNamedExpression(NamedExpression node) {
InferenceContext.setTypeFromNode(node.expression, node);
return super.visitNamedExpression(node);
@@ -7627,6 +7709,40 @@
super.visitMethodDeclaration(node);
}
+ @override
+ Object visitMixinDeclaration(MixinDeclaration node) {
+ ClassElement element = node.declaredElement;
+
+ Scope outerScope = nameScope;
+ ClassElement outerClass = enclosingClass;
+ try {
+ enclosingClass = element;
+
+ nameScope = new TypeParameterScope(nameScope, element);
+ visitMixinDeclarationInScope(node);
+
+ nameScope = new ClassScope(nameScope, element);
+ visitMixinMembersInScope(node);
+ } finally {
+ nameScope = outerScope;
+ enclosingClass = outerClass;
+ }
+ return null;
+ }
+
+ void visitMixinDeclarationInScope(MixinDeclaration node) {
+ node.name?.accept(this);
+ node.typeParameters?.accept(this);
+ node.onClause?.accept(this);
+ node.implementsClause?.accept(this);
+ }
+
+ void visitMixinMembersInScope(MixinDeclaration node) {
+ node.documentationComment?.accept(this);
+ node.metadata.accept(this);
+ node.members.accept(this);
+ }
+
/**
* Visit the given statement after it's scope has been created. This is used by ResolverVisitor to
* correctly visit the 'then' and 'else' statements of an 'if' statement.
@@ -9664,8 +9780,7 @@
ErrorCode errorCode = (withClause == null
? CompileTimeErrorCode.EXTENDS_NON_CLASS
: CompileTimeErrorCode.MIXIN_WITH_NON_CLASS_SUPERCLASS);
- superclassType = _resolveType(extendsClause.superclass, errorCode,
- CompileTimeErrorCode.EXTENDS_ENUM, errorCode);
+ superclassType = _resolveType(extendsClause.superclass, errorCode);
}
if (classElement != null) {
if (superclassType == null) {
@@ -9676,7 +9791,8 @@
}
classElement.supertype = superclassType;
}
- _resolve(classElement, withClause, implementsClause);
+ _resolveWithClause(classElement, withClause);
+ _resolveImplementsClause(classElement, implementsClause);
return null;
}
@@ -9709,8 +9825,7 @@
Object visitClassTypeAlias(ClassTypeAlias node) {
super.visitClassTypeAlias(node);
ErrorCode errorCode = CompileTimeErrorCode.MIXIN_WITH_NON_CLASS_SUPERCLASS;
- InterfaceType superclassType = _resolveType(node.superclass, errorCode,
- CompileTimeErrorCode.EXTENDS_ENUM, errorCode);
+ InterfaceType superclassType = _resolveType(node.superclass, errorCode);
if (superclassType == null) {
superclassType = typeProvider.objectType;
}
@@ -9718,7 +9833,8 @@
if (classElement != null) {
classElement.supertype = superclassType;
}
- _resolve(classElement, node.withClause, node.implementsClause);
+ _resolveWithClause(classElement, node.withClause);
+ _resolveImplementsClause(classElement, node.implementsClause);
return null;
}
@@ -9897,6 +10013,15 @@
}
@override
+ void visitMixinDeclarationInScope(MixinDeclaration node) {
+ super.visitMixinDeclarationInScope(node);
+ MixinElementImpl element = node.declaredElement;
+ _resolveOnClause(element, node.onClause);
+ _resolveImplementsClause(element, node.implementsClause);
+ return null;
+ }
+
+ @override
Object visitNode(AstNode node) {
// In API mode we need to skip:
// - function bodies;
@@ -10162,29 +10287,12 @@
return null;
}
- /**
- * Resolve the types in the given [withClause] and [implementsClause] and
- * associate those types with the given [classElement].
- */
- void _resolve(ClassElementImpl classElement, WithClause withClause,
- ImplementsClause implementsClause) {
- if (withClause != null) {
- List<InterfaceType> mixinTypes = _resolveTypes(
- withClause.mixinTypes,
- CompileTimeErrorCode.MIXIN_OF_NON_CLASS,
- CompileTimeErrorCode.MIXIN_OF_ENUM,
- CompileTimeErrorCode.MIXIN_OF_NON_CLASS);
- if (classElement != null) {
- classElement.mixins = mixinTypes;
- }
- }
- if (implementsClause != null) {
- NodeList<TypeName> interfaces = implementsClause.interfaces;
- List<InterfaceType> interfaceTypes = _resolveTypes(
- interfaces,
- CompileTimeErrorCode.IMPLEMENTS_NON_CLASS,
- CompileTimeErrorCode.IMPLEMENTS_ENUM,
- CompileTimeErrorCode.IMPLEMENTS_DYNAMIC);
+ void _resolveImplementsClause(
+ ClassElementImpl classElement, ImplementsClause clause) {
+ if (clause != null) {
+ NodeList<TypeName> interfaces = clause.interfaces;
+ List<InterfaceType> interfaceTypes =
+ _resolveTypes(interfaces, CompileTimeErrorCode.IMPLEMENTS_NON_CLASS);
if (classElement != null) {
classElement.interfaces = interfaceTypes;
}
@@ -10214,6 +10322,18 @@
}
}
+ void _resolveOnClause(MixinElementImpl classElement, OnClause clause) {
+ List<InterfaceType> types;
+ if (clause != null) {
+ types = _resolveTypes(clause.superclassConstraints,
+ CompileTimeErrorCode.MIXIN_SUPER_CLASS_CONSTRAINT_NON_CLASS);
+ }
+ if (types == null || types.isEmpty) {
+ types = [typeProvider.objectType];
+ }
+ classElement.superclassConstraints = types;
+ }
+
/**
* Return the type specified by the given name.
*
@@ -10224,13 +10344,12 @@
* @param dynamicTypeError the error to produce if the type name is "dynamic"
* @return the type specified by the type name
*/
- InterfaceType _resolveType(TypeName typeName, ErrorCode nonTypeError,
- ErrorCode enumTypeError, ErrorCode dynamicTypeError) {
+ InterfaceType _resolveType(TypeName typeName, ErrorCode errorCode) {
DartType type = typeName.type;
if (type is InterfaceType) {
ClassElement element = type.element;
if (element != null && element.isEnum) {
- errorReporter.reportErrorForNode(enumTypeError, typeName);
+ errorReporter.reportErrorForNode(errorCode, typeName);
return null;
}
return type;
@@ -10238,14 +10357,8 @@
// If the type is not an InterfaceType, then visitTypeName() sets the type
// to be a DynamicTypeImpl
Identifier name = typeName.name;
- // TODO(mfairhurst) differentiate between dynamic via clean path, and error
- // types, and then check `type.isDynamic`. However, if we do that now, then
- // [nonTypeError] will never be reported because non types are resolved to
- // dynamic.
- if (name.name == Keyword.DYNAMIC.lexeme) {
- errorReporter.reportErrorForNode(dynamicTypeError, name, [name.name]);
- } else if (!nameScope.shouldIgnoreUndefined(name)) {
- errorReporter.reportErrorForNode(nonTypeError, name, [name.name]);
+ if (!nameScope.shouldIgnoreUndefined(name)) {
+ errorReporter.reportErrorForNode(errorCode, name, [name.name]);
}
return null;
}
@@ -10261,14 +10374,10 @@
* @return an array containing all of the types that were resolved.
*/
List<InterfaceType> _resolveTypes(
- NodeList<TypeName> typeNames,
- ErrorCode nonTypeError,
- ErrorCode enumTypeError,
- ErrorCode dynamicTypeError) {
+ NodeList<TypeName> typeNames, ErrorCode errorCode) {
List<InterfaceType> types = new List<InterfaceType>();
for (TypeName typeName in typeNames) {
- InterfaceType type =
- _resolveType(typeName, nonTypeError, enumTypeError, dynamicTypeError);
+ InterfaceType type = _resolveType(typeName, errorCode);
if (type != null) {
types.add(type);
}
@@ -10276,6 +10385,14 @@
return types;
}
+ void _resolveWithClause(ClassElementImpl classElement, WithClause clause) {
+ if (clause != null) {
+ List<InterfaceType> mixinTypes = _resolveTypes(
+ clause.mixinTypes, CompileTimeErrorCode.MIXIN_OF_NON_CLASS);
+ classElement.mixins = mixinTypes;
+ }
+ }
+
/**
* Given a function typed [parameter] with [FunctionType] based on a
* [GenericFunctionTypeElementImpl], compute and set the return type for the
diff --git a/pkg/analyzer/lib/src/generated/static_type_analyzer.dart b/pkg/analyzer/lib/src/generated/static_type_analyzer.dart
index 6112ac4..5e69a5b 100644
--- a/pkg/analyzer/lib/src/generated/static_type_analyzer.dart
+++ b/pkg/analyzer/lib/src/generated/static_type_analyzer.dart
@@ -994,7 +994,12 @@
VariableElement variable = element;
staticType = _promoteManager.getStaticType(variable);
} else if (element is PrefixElement) {
- return null;
+ var parent = node.parent;
+ if (parent is PrefixedIdentifier && parent.prefix == node ||
+ parent is MethodInvocation && parent.target == node) {
+ return null;
+ }
+ staticType = _typeProvider.dynamicType;
} else if (element is DynamicElementImpl) {
staticType = _typeProvider.typeType;
} else {
diff --git a/pkg/analyzer/lib/src/kernel/resynthesize.dart b/pkg/analyzer/lib/src/kernel/resynthesize.dart
deleted file mode 100644
index d0d8426..0000000
--- a/pkg/analyzer/lib/src/kernel/resynthesize.dart
+++ /dev/null
@@ -1,1238 +0,0 @@
-// 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/dart/ast/ast.dart';
-import 'package:analyzer/dart/ast/standard_ast_factory.dart';
-import 'package:analyzer/dart/ast/token.dart';
-import 'package:analyzer/dart/element/element.dart';
-import 'package:analyzer/dart/element/type.dart';
-import 'package:analyzer/source/line_info.dart';
-import 'package:analyzer/src/context/context.dart' show AnalysisContextImpl;
-import 'package:analyzer/src/dart/element/element.dart';
-import 'package:analyzer/src/dart/element/handle.dart';
-import 'package:analyzer/src/dart/element/member.dart';
-import 'package:analyzer/src/dart/element/type.dart';
-import 'package:analyzer/src/dart/resolver/scope.dart';
-import 'package:analyzer/src/generated/engine.dart' show AnalysisContext;
-import 'package:analyzer/src/generated/resolver.dart' show TypeProvider;
-import 'package:analyzer/src/generated/testing/ast_test_factory.dart';
-import 'package:analyzer/src/summary/summary_sdk.dart';
-import 'package:front_end/src/base/resolve_relative_uri.dart';
-import 'package:front_end/src/base/source.dart';
-import 'package:front_end/src/fasta/kernel/kernel_shadow_ast.dart' as kernel;
-import 'package:front_end/src/fasta/kernel/redirecting_factory_body.dart';
-import 'package:kernel/kernel.dart' as kernel;
-import 'package:kernel/type_algebra.dart' as kernel;
-import 'package:kernel/type_environment.dart' as kernel;
-import 'package:path/path.dart' as pathos;
-
-/// Information about a single file - a library or part.
-class KernelFileInfo {
- final bool exists;
- final int contentLength;
- final LineInfo lineInfo;
- final kernel.Library library;
-
- KernelFileInfo(this.exists, this.contentLength, this.lineInfo, this.library);
-}
-
-/**
- * Object that can resynthesize analyzer [LibraryElement] from Kernel.
- */
-class KernelResynthesizer implements ElementResynthesizer {
- final AnalysisContextImpl _analysisContext;
- final Map<String, KernelFileInfo> _fileInfoMap;
- final Map<String, LibraryElementImpl> _libraryMap = {};
-
- /**
- * Cache of [Source] objects that have already been converted from URIs.
- */
- final Map<String, Source> _sources = <String, Source>{};
-
- /// The type provider for this resynthesizer.
- SummaryTypeProvider _typeProvider;
-
- KernelResynthesizer(this._analysisContext, this._fileInfoMap) {
- _buildTypeProvider();
- _analysisContext.typeProvider = _typeProvider;
- }
-
- @override
- AnalysisContext get context => _analysisContext;
-
- /**
- * TODO(brianwilkerson) Remove this getter.
- */
- bool get strongMode => true;
-
- /**
- * Return the `Type` type.
- */
- DartType get typeType => getLibrary('dart:core').getType('Type').type;
-
- @override
- Element getElement(ElementLocation location) {
- List<String> components = location.components;
-
- LibraryElementImpl library = getLibrary(components[0]);
- if (components.length == 1) {
- return library;
- }
-
- CompilationUnitElement unit;
- for (var libraryUnit in library.units) {
- if (libraryUnit.source.uri.toString() == components[1]) {
- unit = libraryUnit;
- break;
- }
- }
- if (unit == null) {
- throw new ArgumentError('Unable to find unit: $location');
- }
- if (components.length == 2) {
- return unit;
- }
-
- ElementImpl element = unit as ElementImpl;
- for (int i = 2; i < components.length; i++) {
- if (element == null) {
- throw new ArgumentError('Unable to find element: $location');
- }
- element = element.getChild(components[i]);
- }
- return element;
- }
-
- /**
- * Return the [ElementImpl] that corresponds to the given [name], or `null`
- * if the corresponding element cannot be found.
- */
- ElementImpl getElementFromCanonicalName(kernel.CanonicalName name) {
- if (name == null) return null;
-
- var components = new List<String>(5);
- var componentPtr = 0;
- for (var namePart = name;
- namePart != null && !namePart.isRoot;
- namePart = namePart.parent) {
- components[componentPtr++] = namePart.name;
- }
-
- String libraryUri = components[--componentPtr];
- LibraryElementImpl library = getLibrary(libraryUri);
- if (library == null) return null;
-
- if (componentPtr == 0) {
- return library;
- }
-
- String topKindOrClassName = components[--componentPtr];
-
- String takeElementName() {
- String publicNameOrLibraryUri = components[--componentPtr];
- if (publicNameOrLibraryUri == libraryUri) {
- return components[--componentPtr];
- } else {
- return publicNameOrLibraryUri;
- }
- }
-
- // Top-level element other than class.
- if (topKindOrClassName == '@fields' ||
- topKindOrClassName == '@methods' ||
- topKindOrClassName == '@getters' ||
- topKindOrClassName == '@setters' ||
- topKindOrClassName == '@typedefs') {
- String elementName = takeElementName();
- for (CompilationUnitElement unit in library.units) {
- CompilationUnitElementImpl unitImpl = unit;
- ElementImpl child = unitImpl.getChild(elementName);
- if (child != null) {
- return child;
- }
- }
- return null;
- }
-
- AbstractClassElementImpl classElement;
- for (CompilationUnitElement unit in library.units) {
- CompilationUnitElementImpl unitImpl = unit;
- classElement = unitImpl.getChild(topKindOrClassName);
- if (classElement != null) {
- break;
- }
- }
- if (classElement == null) return null;
-
- // If no more component, the class is the element.
- if (componentPtr == 0) return classElement;
-
- String kind = components[--componentPtr];
- String elementName = takeElementName();
- if (kind == '@methods') {
- return classElement.getMethod(elementName) as ElementImpl;
- } else if (kind == '@getters') {
- return classElement.getGetter(elementName) as ElementImpl;
- } else if (kind == '@setters') {
- return classElement.getSetter(elementName) as ElementImpl;
- } else if (kind == '@fields') {
- return classElement.getField(elementName) as ElementImpl;
- } else if (kind == '@constructors' || kind == '@factories') {
- if (elementName.isEmpty) {
- return classElement.unnamedConstructor as ElementImpl;
- }
- return classElement.getNamedConstructor(elementName) as ElementImpl;
- } else {
- throw new UnimplementedError('Internal error: $kind unexpected.');
- }
- }
-
- /**
- * Return the [LibraryElementImpl] for the given [uriStr], or `null` if
- * the library is not part of the Kernel libraries bundle.
- */
- LibraryElementImpl getLibrary(String uriStr) {
- return _libraryMap.putIfAbsent(uriStr, () {
- var kernel = _fileInfoMap[uriStr].library;
- if (kernel == null) return null;
-
- if (_fileInfoMap[uriStr]?.exists != true) {
- return _newSyntheticLibrary(uriStr);
- }
-
- var libraryContext =
- new _KernelLibraryResynthesizerContextImpl(this, kernel);
-
- // Build the library.
- LibraryElementImpl libraryElement = libraryContext._buildLibrary(uriStr);
- if (libraryElement == null) return null;
-
- // Build the defining unit.
- var definingUnit = libraryContext._buildUnit(uriStr, kernel.fileUri).unit;
- libraryElement.definingCompilationUnit = definingUnit;
-
- // Build units for parts.
- var parts = new List<CompilationUnitElementImpl>(kernel.parts.length);
- for (int i = 0; i < kernel.parts.length; i++) {
- var relativeUriStr = kernel.parts[i].partUri;
- var importUriStr =
- resolveRelativeUri(kernel.importUri, Uri.parse(relativeUriStr))
- .toString();
- var fileUri = kernel.fileUri.resolve(relativeUriStr);
- var unitContext = libraryContext._buildUnit(importUriStr, fileUri);
- var partUnit = unitContext.unit;
- parts[i] = partUnit;
- }
- libraryElement.parts = parts;
-
- // Create the required `loadLibrary` function.
- if (uriStr != 'dart:core' && uriStr != 'dart:async') {
- libraryElement.createLoadLibraryFunction(_typeProvider);
- }
-
- return libraryElement;
- });
- }
-
- DartType getType(ElementImpl context, kernel.DartType kernelType) {
- if (kernelType is kernel.DynamicType) return DynamicTypeImpl.instance;
- if (kernelType is kernel.InvalidType) return UndefinedTypeImpl.instance;
- if (kernelType is kernel.BottomType) return BottomTypeImpl.instance;
- if (kernelType is kernel.VoidType) return VoidTypeImpl.instance;
-
- if (kernelType is kernel.InterfaceType) {
- var name = kernelType.className.canonicalName;
- if (!strongMode &&
- name.name == 'FutureOr' &&
- name.parent.name == 'dart:async') {
- return DynamicTypeImpl.instance;
- }
- return _getInterfaceType(context, name, kernelType.typeArguments);
- }
-
- if (kernelType is kernel.TypeParameterType) {
- kernel.TypeParameter kTypeParameter = kernelType.parameter;
- return getTypeParameter(context, kTypeParameter).type;
- }
-
- if (kernelType is kernel.FunctionType) {
- return _getFunctionType(context, kernelType);
- }
-
- // TODO(scheglov) Support other kernel types.
- throw new UnimplementedError('For ${kernelType.runtimeType}');
- }
-
- /// Return the [TypeParameterElement] for the given [kernelTypeParameter].
- TypeParameterElement getTypeParameter(
- ElementImpl context, kernel.TypeParameter kernelTypeParameter) {
- String name = kernelTypeParameter.name;
- for (var ctx = context; ctx != null; ctx = ctx.enclosingElement) {
- if (ctx is TypeParameterizedElementMixin) {
- for (var typeParameter in ctx.typeParameters) {
- if (typeParameter.name == name) {
- return typeParameter;
- }
- }
- }
- }
- throw new StateError('Not found $kernelTypeParameter in $context');
- }
-
- void _buildTypeProvider() {
- var coreLibrary = getLibrary('dart:core');
- var asyncLibrary = getLibrary('dart:async');
- _typeProvider = new SummaryTypeProvider();
- _typeProvider.initializeCore(coreLibrary);
- _typeProvider.initializeAsync(asyncLibrary);
- // Now, when TypeProvider is ready, we can finalize core/async.
- coreLibrary.createLoadLibraryFunction(_typeProvider);
- asyncLibrary.createLoadLibraryFunction(_typeProvider);
- }
-
- /// Return the [FunctionType] that corresponds to the given [kernelType].
- FunctionType _getFunctionType(
- ElementImpl context, kernel.FunctionType kernelType) {
- if (kernelType.typedef != null) {
- var translatedType = _getTypedefType(context, kernelType);
- if (translatedType != null) return translatedType;
- }
-
- var element = new FunctionElementImpl('', -1);
- context.encloseElement(element);
-
- // Set type parameters.
- {
- List<kernel.TypeParameter> typeParameters = kernelType.typeParameters;
- int count = typeParameters.length;
- var astTypeParameters = new List<TypeParameterElement>(count);
- for (int i = 0; i < count; i++) {
- astTypeParameters[i] =
- new TypeParameterElementImpl.forKernel(element, typeParameters[i]);
- }
- element.typeParameters = astTypeParameters;
- }
-
- // Set formal parameters.
- var parameters = _getFunctionTypeParameters(kernelType);
- var positionalParameters = parameters[0];
- var namedParameters = parameters[1];
- var astParameters = ParameterElementImpl.forKernelParameters(
- element,
- kernelType.requiredParameterCount,
- positionalParameters,
- namedParameters);
- element.parameters = astParameters;
-
- element.returnType = getType(element, kernelType.returnType);
-
- return new FunctionTypeImpl(element);
- }
-
- InterfaceType _getInterfaceType(ElementImpl context,
- kernel.CanonicalName className, List<kernel.DartType> kernelArguments) {
- var libraryName = className.parent;
- var libraryElement = getLibrary(libraryName.name);
- ClassElement classElement = libraryElement.getType(className.name);
- classElement ??= libraryElement.getEnum(className.name);
-
- if (kernelArguments.isEmpty) {
- return classElement.type;
- }
-
- return new InterfaceTypeImpl.elementWithNameAndArgs(
- classElement, classElement.name, () {
- List<DartType> arguments = kernelArguments
- .map((kernel.DartType k) => getType(context, k))
- .toList(growable: false);
- return arguments;
- });
- }
-
- /**
- * Get the [Source] object for the given [uri].
- */
- Source _getSource(String uri) {
- return _sources.putIfAbsent(
- uri, () => _analysisContext.sourceFactory.forUri(uri));
- }
-
- /// Return the [FunctionType] for the given typedef based [kernelType].
- FunctionType _getTypedefType(
- ElementImpl context, kernel.FunctionType kernelType) {
- kernel.Typedef typedef = kernelType.typedef;
-
- GenericTypeAliasElementImpl typedefElement =
- getElementFromCanonicalName(typedef.canonicalName);
-
- kernel.FunctionType typedefType = typedef.type;
-
- if (kernelType.typeParameters.length != typedefType.typeParameters.length) {
- // Type parameters don't match; just resynthesize as a synthetic function
- // type.
- return null;
- }
-
- // In the general case imagine the typedef is:
- // typedef F<T, U> = ... Function<V, W>(...);
- // And kernelType is:
- // ... Function<X, Y>(...);
- // So the outer type parameters of the typedef have been instantiated (or
- // there were none); the inner type parameters have not been instantiated
- // (or there were none).
- //
- // Now we have to figure out what substitution was used to instantiate
- // the typedef, since the kernel doesn't track that information.
- var substitution = kernel.unifyTypes(
- typedefType, kernelType, typedef.typeParameters.toSet());
-
- // Convert kernel type arguments into Analyzer types.
- var typeArguments = typedef.typeParameters
- .map((t) => substitution.containsKey(t)
- ? getType(context, substitution[t])
- : _typeProvider.nullType)
- .toList();
- return typedefElement.instantiate(typeArguments);
- }
-
- LibraryElementImpl _newSyntheticLibrary(String uriStr) {
- Source librarySource = _getSource(uriStr);
- if (librarySource == null) return null;
-
- LibraryElementImpl libraryElement =
- new LibraryElementImpl(context, '', -1, 0);
- libraryElement.isSynthetic = true;
- CompilationUnitElementImpl unitElement =
- new CompilationUnitElementImpl(librarySource.shortName);
- libraryElement.definingCompilationUnit = unitElement;
- unitElement.source = librarySource;
- unitElement.librarySource = librarySource;
- libraryElement.createLoadLibraryFunction(_typeProvider);
- libraryElement.publicNamespace = new Namespace({});
- libraryElement.exportNamespace = new Namespace({});
- return libraryElement;
- }
-
- /// Return the list with exactly two elements - positional and named
- /// parameter lists.
- static List<List<kernel.VariableDeclaration>> _getFunctionTypeParameters(
- kernel.FunctionType type) {
- int positionalCount = type.positionalParameters.length;
- var positionalParameters =
- new List<kernel.VariableDeclaration>(positionalCount);
- var knownPositionalParameters = const <kernel.VariableDeclaration>[];
- if (type.typedefReference != null) {
- knownPositionalParameters =
- type.typedefReference.asTypedef.positionalParameters;
- }
- for (int i = 0; i < positionalCount; i++) {
- String name = i < knownPositionalParameters.length
- ? (knownPositionalParameters[i].name ?? '')
- : 'arg_$i';
- positionalParameters[i] = new kernel.VariableDeclaration(name,
- type: type.positionalParameters[i]);
- }
-
- var namedParameters = type.namedParameters
- .map((k) => new kernel.VariableDeclaration(k.name, type: k.type))
- .toList(growable: false);
-
- return [positionalParameters, namedParameters];
- }
-}
-
-/**
- * Builder of [Expression]s from [kernel.Expression]s.
- */
-class _ExprBuilder {
- final _KernelUnitResynthesizerContextImpl _context;
- final ElementImpl _contextElement;
-
- _ExprBuilder(this._context, this._contextElement);
-
- TypeProvider get typeProvider =>
- _context.libraryContext.resynthesizer._typeProvider;
-
- Expression build(kernel.Expression expr) {
- if (_hasInvalidExpression(expr)) {
- return AstTestFactory.identifier3('#invalidConst');
- }
- return _build(expr);
- }
-
- ConstructorInitializer buildInitializer(kernel.Initializer k) {
- if (k is kernel.FieldInitializer) {
- Expression value = build(k.value);
- ConstructorFieldInitializer initializer =
- AstTestFactory.constructorFieldInitializer(
- false, k.field.name.name, value);
- initializer.fieldName.staticElement = _getElement(k.fieldReference);
- return initializer;
- }
-
- if (k is kernel.AssertInitializer) {
- var body = k.statement;
- var condition = build(body.condition);
- var message = body.message != null ? build(body.message) : null;
- return AstTestFactory.assertInitializer(condition, message);
- }
-
- if (k is kernel.RedirectingInitializer) {
- ConstructorElementImpl redirect = _getElement(k.targetReference);
- var arguments = _toArguments(k.arguments);
-
- RedirectingConstructorInvocation invocation =
- AstTestFactory.redirectingConstructorInvocation(arguments);
- invocation.staticElement = redirect;
-
- String name = k.target.name.name;
- if (name.isNotEmpty) {
- invocation.constructorName = AstTestFactory.identifier3(name)
- ..staticElement = redirect;
- }
-
- return invocation;
- }
-
- if (k is kernel.SuperInitializer) {
- ConstructorElementImpl redirect = _getElement(k.targetReference);
- var arguments = _toArguments(k.arguments);
-
- SuperConstructorInvocation invocation =
- AstTestFactory.superConstructorInvocation(arguments);
- invocation.staticElement = redirect;
-
- String name = k.target.name.name;
- if (name.isNotEmpty) {
- invocation.constructorName = AstTestFactory.identifier3(name)
- ..staticElement = redirect;
- }
-
- return invocation;
- }
-
- if (k is kernel.ShadowInvalidFieldInitializer ||
- k is kernel.ShadowInvalidInitializer ||
- k is kernel.InvalidSuperInitializerJudgment) {
- return null;
- }
-
- throw new UnimplementedError('For ${k.runtimeType}');
- }
-
- Expression _build(kernel.Expression expr) {
- if (expr is kernel.NullLiteral) {
- return AstTestFactory.nullLiteral();
- }
- if (expr is kernel.BoolLiteral) {
- return AstTestFactory.booleanLiteral(expr.value);
- }
- if (expr is kernel.IntLiteral) {
- return AstTestFactory.integer(expr.value);
- }
- if (expr is kernel.DoubleLiteral) {
- return AstTestFactory.doubleLiteral(expr.value);
- }
- if (expr is kernel.StringLiteral) {
- return AstTestFactory.string2(expr.value);
- }
-
- if (expr is kernel.StringConcatenation) {
- List<InterpolationElement> elements = expr.expressions
- .map(_build)
- .map(_newInterpolationElement)
- .toList(growable: false);
- return AstTestFactory.string(elements);
- }
-
- if (expr is kernel.SymbolLiteral) {
- List<String> components = expr.value.split('.').toList();
- return AstTestFactory.symbolLiteral(components);
- }
-
- if (expr is kernel.ListLiteral) {
- Keyword keyword = expr.isConst ? Keyword.CONST : null;
- var typeArguments = _getTypes([expr.typeArgument]);
- var typeArgumentNodes = _buildTypeArgumentList(typeArguments);
- var elements = expr.expressions.map(_build).toList();
- return AstTestFactory.listLiteral2(keyword, typeArgumentNodes, elements)
- ..staticType = typeProvider.listType.instantiate(typeArguments);
- }
-
- if (expr is kernel.MapLiteral) {
- Keyword keyword = expr.isConst ? Keyword.CONST : null;
- var typeArguments = _getTypes([expr.keyType, expr.valueType]);
- var typeArgumentNodes = _buildTypeArgumentList(typeArguments);
-
- int numberOfEntries = expr.entries.length;
- var entries = new List<MapLiteralEntry>(numberOfEntries);
- for (int i = 0; i < numberOfEntries; i++) {
- var entry = expr.entries[i];
- Expression key = _build(entry.key);
- Expression value = _build(entry.value);
- entries[i] = AstTestFactory.mapLiteralEntry2(key, value);
- }
-
- return AstTestFactory.mapLiteral(keyword, typeArgumentNodes, entries);
- }
-
- if (expr is kernel.StaticGet) {
- return _buildIdentifier(expr.targetReference, isGet: true);
- }
-
- if (expr is kernel.ThisExpression) {
- return AstTestFactory.thisExpression();
- }
-
- if (expr is kernel.PropertyGet) {
- Expression target = _build(expr.receiver);
- kernel.Reference reference = expr.interfaceTargetReference;
- SimpleIdentifier identifier = _buildSimpleIdentifier(reference);
- return AstTestFactory.propertyAccess(target, identifier);
- }
-
- if (expr is kernel.VariableGet) {
- String name = expr.variable.name;
- Element contextConstructor = _contextElement;
- if (contextConstructor is ConstructorElement) {
- SimpleIdentifier identifier = AstTestFactory.identifier3(name);
- ParameterElement parameter = contextConstructor.parameters.firstWhere(
- (parameter) => parameter.name == name,
- orElse: () => null);
- identifier.staticElement = parameter;
- return identifier;
- }
- }
-
- if (expr is kernel.ConditionalExpression) {
- var condition = _build(expr.condition);
- var then = _build(expr.then);
- var otherwise = _build(expr.otherwise);
- return AstTestFactory.conditionalExpression(condition, then, otherwise);
- }
-
- if (expr is kernel.Not) {
- kernel.Expression kernelOperand = expr.operand;
- var operand = _build(kernelOperand);
- return AstTestFactory.prefixExpression(TokenType.BANG, operand);
- }
-
- if (expr is kernel.LogicalExpression) {
- var operator = _toBinaryOperatorTokenType(expr.operator);
- var left = _build(expr.left);
- var right = _build(expr.right);
- return AstTestFactory.binaryExpression(left, operator, right);
- }
-
- if (expr is kernel.AsExpression && expr.isTypeError) {
- return _build(expr.operand);
- }
-
- if (expr is kernel.Let) {
- var body = expr.body;
- if (body is kernel.ConditionalExpression) {
- var condition = body.condition;
- var otherwiseExpr = body.otherwise;
- if (condition is kernel.MethodInvocation) {
- var equalsReceiver = condition.receiver;
- if (equalsReceiver is kernel.VariableGet &&
- condition.name.name == '==' &&
- condition.arguments.positional.length == 1 &&
- condition.arguments.positional[0] is kernel.NullLiteral &&
- otherwiseExpr is kernel.VariableGet &&
- otherwiseExpr.variable == equalsReceiver.variable) {
- var left = _build(expr.variable.initializer);
- var right = _build(body.then);
- return AstTestFactory.binaryExpression(
- left, TokenType.QUESTION_QUESTION, right);
- }
- }
- }
- }
-
- if (expr is kernel.MethodInvocation) {
- var left = _build(expr.receiver);
- String operatorName = expr.name.name;
- List<kernel.Expression> args = expr.arguments.positional;
- if (args.isEmpty) {
- if (operatorName == 'unary-') {
- return AstTestFactory.prefixExpression(TokenType.MINUS, left);
- }
- if (operatorName == '~') {
- return AstTestFactory.prefixExpression(TokenType.TILDE, left);
- }
- } else if (args.length == 1) {
- var operator = _toBinaryOperatorTokenType(operatorName);
- var right = _build(args.single);
- return AstTestFactory.binaryExpression(left, operator, right);
- }
- }
-
- if (expr is kernel.StaticInvocation) {
- kernel.Procedure target = expr.target;
- String name = target.name.name;
- List<Expression> arguments = _toArguments(expr.arguments);
- MethodInvocation invocation =
- AstTestFactory.methodInvocation3(null, name, null, arguments);
- invocation.methodName.staticElement = _getElement(target.reference);
- return invocation;
- }
-
- if (expr is kernel.ConstructorInvocation) {
- ConstructorElementImpl element = _getElement(expr.targetReference);
-
- // It's safe to pass null for the TypeEnvironment because it isn't
- // needed to compute the type of a constructor invocation.
- var kernelType = expr.getStaticType(null);
- var type = _getType(kernelType);
- TypeName typeName = _buildType(type);
-
- var constructorName = AstTestFactory.constructorName(
- typeName, element.name.isNotEmpty ? element.name : null);
- constructorName?.name?.staticElement = element;
-
- var keyword = expr.isConst ? Keyword.CONST : Keyword.NEW;
- var arguments = _toArguments(expr.arguments);
- var creation = AstTestFactory.instanceCreationExpression(
- keyword, constructorName, arguments);
- creation.staticElement = ConstructorMember.from(element, type);
- creation.staticType = type;
- return creation;
- }
-
- if (expr is kernel.Instantiation) {
- return _build(expr.expression);
- }
-
- if (expr is kernel.TypeLiteral) {
- ElementImpl element;
- var kernelType = expr.type;
- if (kernelType is kernel.FunctionType) {
- element = _getElement(kernelType.typedefReference);
- } else {
- var type = _getType(kernelType);
- element = type.element;
- }
- var identifier = AstTestFactory.identifier3(element.name);
- identifier.staticElement = element;
- identifier.staticType = _context.libraryContext.resynthesizer.typeType;
- return identifier;
- }
-
- // TODO(scheglov): complete getExpression
- throw new UnimplementedError('kernel: (${expr.runtimeType}) $expr');
- }
-
- Identifier _buildIdentifier(kernel.Reference reference, {bool isGet: false}) {
- Element element = _getElement(reference);
- if (isGet && element is PropertyInducingElement) {
- element = (element as PropertyInducingElement).getter;
- }
- SimpleIdentifier property = AstTestFactory.identifier3(element.displayName)
- ..staticElement = element;
- Element enclosingElement = element.enclosingElement;
- if (enclosingElement is ClassElement) {
- SimpleIdentifier classRef =
- AstTestFactory.identifier3(enclosingElement.name)
- ..staticElement = enclosingElement;
- return AstTestFactory.identifier(classRef, property);
- } else {
- return property;
- }
- }
-
- SimpleIdentifier _buildSimpleIdentifier(kernel.Reference reference) {
- String name = reference.canonicalName.name;
- SimpleIdentifier identifier = AstTestFactory.identifier3(name);
- Element element = _getElement(reference);
- identifier.staticElement = element;
- return identifier;
- }
-
- TypeAnnotation _buildType(DartType type) {
- List<TypeAnnotation> argumentNodes;
- if (type is ParameterizedType) {
- argumentNodes = _buildTypeArguments(type.typeArguments);
- }
- TypeName node = AstTestFactory.typeName4(type.name, argumentNodes);
- node.type = type;
- (node.name as SimpleIdentifier).staticElement = type.element;
- return node;
- }
-
- TypeArgumentList _buildTypeArgumentList(List<DartType> types) {
- int length = types.length;
- var typeAnnotations = new List<TypeAnnotation>(length);
- for (int i = 0; i < length; i++) {
- DartType type = types[i];
- TypeAnnotation typeAnnotation = _buildType(type);
- typeAnnotations[i] = typeAnnotation;
- }
- return AstTestFactory.typeArgumentList(typeAnnotations);
- }
-
- List<TypeAnnotation> _buildTypeArguments(List<DartType> types) {
- if (types.every((t) => t.isDynamic)) return null;
- return types.map(_buildType).toList();
- }
-
- ElementImpl _getElement(kernel.Reference reference) {
- return _context.libraryContext.resynthesizer
- .getElementFromCanonicalName(reference?.canonicalName);
- }
-
- DartType _getType(kernel.DartType kernel) {
- return _context.getType(_contextElement, kernel);
- }
-
- List<DartType> _getTypes(List<kernel.DartType> kernels) {
- int length = kernels.length;
- var types = new List<DartType>(length);
- for (int i = 0; i < length; i++) {
- DartType type = _getType(kernels[i]);
- types[i] = type;
- }
- return types;
- }
-
- InterpolationElement _newInterpolationElement(Expression expr) {
- if (expr is SimpleStringLiteral) {
- return astFactory.interpolationString(expr.literal, expr.value);
- } else {
- return AstTestFactory.interpolationExpression(expr);
- }
- }
-
- /// Return [Expression]s for the given [kernelArguments].
- List<Expression> _toArguments(kernel.Arguments kernelArguments) {
- int numPositional = kernelArguments.positional.length;
- int numNamed = kernelArguments.named.length;
- var arguments = new List<Expression>(numPositional + numNamed);
-
- int i = 0;
- for (kernel.Expression k in kernelArguments.positional) {
- arguments[i++] = _build(k);
- }
-
- for (kernel.NamedExpression k in kernelArguments.named) {
- var value = _build(k.value);
- arguments[i++] = AstTestFactory.namedExpression2(k.name, value);
- }
-
- return arguments;
- }
-
- /// Return the [TokenType] for the given operator [name].
- TokenType _toBinaryOperatorTokenType(String name) {
- if (name == '==') return TokenType.EQ_EQ;
- if (name == '&&') return TokenType.AMPERSAND_AMPERSAND;
- if (name == '||') return TokenType.BAR_BAR;
- if (name == '^') return TokenType.CARET;
- if (name == '&') return TokenType.AMPERSAND;
- if (name == '|') return TokenType.BAR;
- if (name == '>>') return TokenType.GT_GT;
- if (name == '<<') return TokenType.LT_LT;
- if (name == '+') return TokenType.PLUS;
- if (name == '-') return TokenType.MINUS;
- if (name == '*') return TokenType.STAR;
- if (name == '/') return TokenType.SLASH;
- if (name == '~/') return TokenType.TILDE_SLASH;
- if (name == '%') return TokenType.PERCENT;
- if (name == '>') return TokenType.GT;
- if (name == '<') return TokenType.LT;
- if (name == '>=') return TokenType.GT_EQ;
- if (name == '<=') return TokenType.LT_EQ;
- if (name == 'unary-') return TokenType.MINUS;
- throw new ArgumentError(name);
- }
-
- static bool _hasInvalidExpression(kernel.Expression expr) {
- var visitor = new _HasInvalidExpressionVisitor();
- expr.accept(visitor);
- return visitor.result;
- }
-}
-
-class _HasInvalidExpressionVisitor extends kernel.RecursiveVisitor<void> {
- bool result = false;
-
- @override
- void visitInvalidExpression(kernel.InvalidExpression node) {
- result = true;
- }
-}
-
-/**
- * Implementation of [KernelLibraryResynthesizerContext].
- */
-class _KernelLibraryResynthesizerContextImpl
- implements KernelLibraryResynthesizerContext {
- final KernelResynthesizer resynthesizer;
-
- @override
- final kernel.Library library;
-
- /**
- * The relative URI of the directory with the [library] file.
- * E.g. `sdk/lib/core` for `sdk/lib/core/core.dart`.
- */
- String libraryDirectoryUri;
-
- Source librarySource;
- LibraryElementImpl libraryElement;
-
- _KernelLibraryResynthesizerContextImpl(this.resynthesizer, this.library) {
- libraryDirectoryUri = pathos.url.dirname("${library.fileUri}");
- }
-
- @override
- kernel.Library get coreLibrary {
- return resynthesizer._fileInfoMap['dart:core'].library;
- }
-
- @override
- bool get hasExtUri {
- for (var dependency in library.dependencies) {
- if (dependency.isImport &&
- dependency.targetLibrary.importUri.isScheme('dart-ext')) {
- return true;
- }
- }
- return false;
- }
-
- @override
- Namespace buildExportNamespace() {
- Namespace publicNamespace = buildPublicNamespace();
- if (library.additionalExports.isEmpty) {
- return publicNamespace;
- }
-
- Map<String, Element> definedNames = publicNamespace.definedNames;
- for (kernel.Reference additionalExport in library.additionalExports) {
- var element = resynthesizer
- .getElementFromCanonicalName(additionalExport.canonicalName);
- if (element != null) {
- definedNames[element.name] = element;
- }
- }
-
- return new Namespace(definedNames);
- }
-
- @override
- Namespace buildPublicNamespace() {
- return new NamespaceBuilder()
- .createPublicNamespaceForLibrary(libraryElement);
- }
-
- @override
- LibraryElementImpl getLibrary(String uriStr) {
- return resynthesizer.getLibrary(uriStr);
- }
-
- LibraryElementImpl _buildLibrary(String uriStr) {
- librarySource = resynthesizer._getSource(uriStr);
- if (librarySource == null) return null;
- return libraryElement =
- new LibraryElementImpl.forKernel(resynthesizer._analysisContext, this);
- }
-
- _KernelUnitResynthesizerContextImpl _buildUnit(String uriStr, Uri fileUri) {
- var unitContext = new _KernelUnitResynthesizerContextImpl(this, fileUri);
-
- var unitElement = new CompilationUnitElementImpl.forKernel(
- libraryElement, unitContext, '<no name>');
- unitContext.unit = unitElement;
- unitElement.librarySource = librarySource;
- if (!fileUri.isScheme('org-dartlang-malformed-uri')) {
- var fileInfo = resynthesizer._fileInfoMap[uriStr];
- unitElement.setCodeRange(0, fileInfo.contentLength);
- unitElement.lineInfo = fileInfo.lineInfo;
- unitElement.source = resynthesizer._getSource(uriStr);
- }
-
- unitContext.unit = unitElement;
- return unitContext;
- }
-}
-
-/**
- * Implementation of [KernelUnit].
- */
-class _KernelUnitImpl implements KernelUnit {
- final _KernelUnitResynthesizerContextImpl context;
-
- List<kernel.Expression> _annotations;
- List<kernel.Class> _classes;
- List<kernel.Field> _fields;
- List<kernel.Procedure> _procedures;
- List<kernel.Typedef> _typedefs;
-
- _KernelUnitImpl(this.context);
-
- @override
- List<kernel.Expression> get annotations {
- if (_annotations == null) {
- var libraryFileUri = context.libraryContext.library.fileUri;
- for (var part in context.libraryContext.library.parts) {
- if (libraryFileUri.resolve(part.partUri) == context.fileUri) {
- return _annotations = part.annotations;
- }
- }
- }
- return _annotations ?? const <kernel.Expression>[];
- }
-
- @override
- List<kernel.Class> get classes =>
- _classes ??= context.libraryContext.library.classes
- .where((n) => n.fileUri == context.fileUri)
- .toList(growable: false);
-
- @override
- List<kernel.Field> get fields =>
- _fields ??= context.libraryContext.library.fields
- .where((n) => n.fileUri == context.fileUri)
- .toList(growable: false);
-
- @override
- List<kernel.Procedure> get procedures =>
- _procedures ??= context.libraryContext.library.procedures
- .where((n) => n.fileUri == context.fileUri)
- .toList(growable: false);
-
- @override
- List<kernel.Typedef> get typedefs =>
- _typedefs ??= context.libraryContext.library.typedefs
- .where((n) => n.fileUri == context.fileUri)
- .toList(growable: false);
-}
-
-/**
- * Implementation of [KernelUnitResynthesizerContext].
- */
-class _KernelUnitResynthesizerContextImpl
- implements KernelUnitResynthesizerContext {
- static final Uri dartInternalUri = Uri.parse('dart:_internal');
-
- final _KernelLibraryResynthesizerContextImpl libraryContext;
- final Uri fileUri;
-
- CompilationUnitElementImpl unit;
-
- _KernelUnitResynthesizerContextImpl(this.libraryContext, this.fileUri);
-
- @override
- KernelUnit get kernelUnit => new _KernelUnitImpl(this);
-
- @override
- List<ElementAnnotation> buildAnnotations(
- List<kernel.Expression> expressions) {
- int length = expressions.length;
- if (length != 0) {
- var annotations = <ElementAnnotation>[];
- for (var expression in expressions) {
- if (_isSyntheticExternalNameAnnotation(expression)) continue;
- var annotation = _buildAnnotation(unit, expression);
- annotations.add(annotation);
- }
- return annotations;
- } else {
- return const <ElementAnnotation>[];
- }
- }
-
- @override
- UnitExplicitTopLevelAccessors buildTopLevelAccessors() {
- var accessorsData = new UnitExplicitTopLevelAccessors();
- var implicitVariables = <String, TopLevelVariableElementImpl>{};
- // Build explicit property accessors and implicit fields.
- for (var procedure in kernelUnit.procedures) {
- bool isGetter = procedure.kind == kernel.ProcedureKind.Getter;
- bool isSetter = procedure.kind == kernel.ProcedureKind.Setter;
- if (isGetter || isSetter) {
- var accessor =
- new PropertyAccessorElementImpl.forKernel(unit, procedure);
- accessorsData.accessors.add(accessor);
-
- // Create or update the implicit variable.
- String name = accessor.displayName;
- TopLevelVariableElementImpl variable = implicitVariables[name];
- if (variable == null) {
- variable = new TopLevelVariableElementImpl(name, -1);
- implicitVariables[name] = variable;
- variable.enclosingElement = unit;
- variable.isSynthetic = true;
- variable.isFinal = isGetter;
- } else {
- variable.isFinal = false;
- }
-
- // Attach the accessor to the variable.
- accessor.variable = variable;
- if (isGetter) {
- variable.getter = accessor;
- } else {
- variable.setter = accessor;
- }
- }
- }
- accessorsData.implicitVariables.addAll(implicitVariables.values);
- return accessorsData;
- }
-
- @override
- UnitExplicitTopLevelVariables buildTopLevelVariables() {
- List<kernel.Field> kernelFields = kernelUnit.fields;
- int numberOfVariables = kernelFields.length;
- var variablesData = new UnitExplicitTopLevelVariables(numberOfVariables);
- for (int i = 0; i < numberOfVariables; i++) {
- kernel.Field field = kernelFields[i];
-
- // Add the explicit variables.
- TopLevelVariableElementImpl variable;
- if (field.isConst && field.initializer != null) {
- variable = new ConstTopLevelVariableElementImpl.forKernel(unit, field);
- } else {
- variable = new TopLevelVariableElementImpl.forKernel(unit, field);
- }
- variablesData.variables[i] = variable;
-
- // Add the implicit accessors.
- variablesData.implicitAccessors
- .add(new PropertyAccessorElementImpl_ImplicitGetter(variable));
- if (!(variable.isConst || variable.isFinal)) {
- variablesData.implicitAccessors
- .add(new PropertyAccessorElementImpl_ImplicitSetter(variable));
- }
- }
- return variablesData;
- }
-
- @override
- ConstructorInitializer getConstructorInitializer(
- ConstructorElementImpl constructor, kernel.Initializer k) {
- if (k is kernel.FieldInitializer && k.isSynthetic ||
- k is kernel.SuperInitializer && k.isSynthetic) {
- return null;
- }
- return new _ExprBuilder(this, constructor).buildInitializer(k);
- }
-
- @override
- Expression getExpression(ElementImpl context, kernel.Expression expression) {
- return new _ExprBuilder(this, context).build(expression);
- }
-
- @override
- List<List<kernel.VariableDeclaration>> getFunctionTypeParameters(
- kernel.FunctionType type) {
- return KernelResynthesizer._getFunctionTypeParameters(type);
- }
-
- @override
- InterfaceType getInterfaceType(
- ElementImpl context, kernel.Supertype kernelType) {
- if (kernelType.classNode.isEnum) {
- return null;
- }
- return libraryContext.resynthesizer._getInterfaceType(
- context, kernelType.className.canonicalName, kernelType.typeArguments);
- }
-
- @override
- List<InterfaceType> getInterfaceTypes(
- ElementImpl context, List<kernel.Supertype> types) {
- var interfaceTypes = <InterfaceType>[];
- for (kernel.Supertype kernelType in types) {
- InterfaceType interfaceType = getInterfaceType(context, kernelType);
- if (interfaceType != null) {
- interfaceTypes.add(interfaceType);
- }
- }
- return interfaceTypes;
- }
-
- @override
- ConstructorElement getRedirectedConstructor(ElementImpl context,
- kernel.Constructor kernelConstructor, kernel.Procedure kernelFactory) {
- if (kernelConstructor != null) {
- for (var initializer in kernelConstructor.initializers) {
- if (initializer is kernel.RedirectingInitializer) {
- return libraryContext.resynthesizer.getElementFromCanonicalName(
- initializer.targetReference.canonicalName)
- as ConstructorElementImpl;
- }
- }
- }
- if (kernelFactory != null) {
- kernel.Statement body = kernelFactory.function.body;
- if (body is RedirectingFactoryBody) {
- kernel.Member target = body.target;
- if (target != null) {
- ConstructorElementImpl constructorElement = libraryContext
- .resynthesizer
- .getElementFromCanonicalName(target.reference.canonicalName);
- var typeArguments = body.typeArguments;
- if (typeArguments != null) {
- var classElement = constructorElement.enclosingElement;
-
- var instantiatedType = new InterfaceTypeImpl.elementWithNameAndArgs(
- classElement, classElement.name, () {
- List<DartType> arguments = typeArguments
- .map((kernel.DartType k) => getType(context, k))
- .toList(growable: false);
- return arguments;
- });
-
- return ConstructorMember.from(constructorElement, instantiatedType);
- } else {
- return constructorElement;
- }
- }
- }
- }
- return null;
- }
-
- @override
- DartType getType(ElementImpl context, kernel.DartType type) {
- return libraryContext.resynthesizer.getType(context, type);
- }
-
- ElementAnnotationImpl _buildAnnotation(
- CompilationUnitElementImpl unit, kernel.Expression expression) {
- ElementAnnotationImpl elementAnnotation = new ElementAnnotationImpl(unit);
- Expression constExpr = getExpression(unit, expression);
- if (constExpr is Identifier) {
- elementAnnotation.element = constExpr.staticElement;
- elementAnnotation.annotationAst = AstTestFactory.annotation(constExpr);
- } else if (constExpr is InstanceCreationExpression) {
- elementAnnotation.element = constExpr.staticElement;
- Identifier typeName = constExpr.constructorName.type.name;
- SimpleIdentifier constructorName = constExpr.constructorName.name;
- elementAnnotation.annotationAst = AstTestFactory.annotation2(
- typeName, constructorName, constExpr.argumentList)
- ..element = constExpr.staticElement;
- } else {
- throw new StateError(
- 'Unexpected annotation type: ${constExpr.runtimeType}');
- }
- return elementAnnotation;
- }
-
- /// Fasta converts `native 'name'` clauses to `@ExternalName('name')`
- /// annotations. But we don't actually have these annotations in code. So,
- /// we need to skip them to avoid mismatch with AST.
- static bool _isSyntheticExternalNameAnnotation(kernel.Expression expr) {
- if (expr is kernel.ConstructorInvocation) {
- kernel.Constructor target = expr.target;
- return target != null &&
- target.enclosingClass.name == 'ExternalName' &&
- target.enclosingLibrary.importUri == dartInternalUri;
- }
- return false;
- }
-}
diff --git a/pkg/analyzer/lib/src/summary/format.dart b/pkg/analyzer/lib/src/summary/format.dart
index 8916caf..599f424 100644
--- a/pkg/analyzer/lib/src/summary/format.dart
+++ b/pkg/analyzer/lib/src/summary/format.dart
@@ -3099,7 +3099,7 @@
}
@override
- bool get fallbackMode =>
+ Null get fallbackMode =>
throw new UnimplementedError('attempt to access deprecated field');
@override
@@ -3316,7 +3316,7 @@
}
@override
- bool get fallbackMode =>
+ Null get fallbackMode =>
throw new UnimplementedError('attempt to access deprecated field');
@override
@@ -3432,7 +3432,7 @@
}
@override
- int get localIndex =>
+ Null get localIndex =>
throw new UnimplementedError('attempt to access deprecated field');
@override
@@ -3580,7 +3580,7 @@
}
@override
- int get localIndex =>
+ Null get localIndex =>
throw new UnimplementedError('attempt to access deprecated field');
@override
@@ -3915,38 +3915,20 @@
class PackageBundleBuilder extends Object
with _PackageBundleMixin
implements idl.PackageBundle {
- String _apiSignature;
- List<PackageDependencyInfoBuilder> _dependencies;
List<LinkedLibraryBuilder> _linkedLibraries;
List<String> _linkedLibraryUris;
int _majorVersion;
int _minorVersion;
- List<String> _unlinkedUnitHashes;
List<UnlinkedUnitBuilder> _unlinkedUnits;
List<String> _unlinkedUnitUris;
@override
- String get apiSignature => _apiSignature ??= '';
-
- /**
- * MD5 hash of the non-informative fields of the [PackageBundle] (not
- * including this one). This can be used to identify when the API of a
- * package may have changed.
- */
- void set apiSignature(String value) {
- this._apiSignature = value;
- }
+ Null get apiSignature =>
+ throw new UnimplementedError('attempt to access deprecated field');
@override
- List<PackageDependencyInfoBuilder> get dependencies =>
- _dependencies ??= <PackageDependencyInfoBuilder>[];
-
- /**
- * Information about the packages this package depends on, if known.
- */
- void set dependencies(List<PackageDependencyInfoBuilder> value) {
- this._dependencies = value;
- }
+ Null get dependencies =>
+ throw new UnimplementedError('attempt to access deprecated field');
@override
List<LinkedLibraryBuilder> get linkedLibraries =>
@@ -3995,15 +3977,8 @@
}
@override
- List<String> get unlinkedUnitHashes => _unlinkedUnitHashes ??= <String>[];
-
- /**
- * List of MD5 hashes of the files listed in [unlinkedUnitUris]. Each hash
- * is encoded as a hexadecimal string using lower case letters.
- */
- void set unlinkedUnitHashes(List<String> value) {
- this._unlinkedUnitHashes = value;
- }
+ Null get unlinkedUnitHashes =>
+ throw new UnimplementedError('attempt to access deprecated field');
@override
List<UnlinkedUnitBuilder> get unlinkedUnits =>
@@ -4027,22 +4002,16 @@
}
PackageBundleBuilder(
- {String apiSignature,
- List<PackageDependencyInfoBuilder> dependencies,
- List<LinkedLibraryBuilder> linkedLibraries,
+ {List<LinkedLibraryBuilder> linkedLibraries,
List<String> linkedLibraryUris,
int majorVersion,
int minorVersion,
- List<String> unlinkedUnitHashes,
List<UnlinkedUnitBuilder> unlinkedUnits,
List<String> unlinkedUnitUris})
- : _apiSignature = apiSignature,
- _dependencies = dependencies,
- _linkedLibraries = linkedLibraries,
+ : _linkedLibraries = linkedLibraries,
_linkedLibraryUris = linkedLibraryUris,
_majorVersion = majorVersion,
_minorVersion = minorVersion,
- _unlinkedUnitHashes = unlinkedUnitHashes,
_unlinkedUnits = unlinkedUnits,
_unlinkedUnitUris = unlinkedUnitUris;
@@ -4050,9 +4019,7 @@
* Flush [informative] data recursively.
*/
void flushInformative() {
- _dependencies = null;
_linkedLibraries?.forEach((b) => b.flushInformative());
- _unlinkedUnitHashes = null;
_unlinkedUnits?.forEach((b) => b.flushInformative());
}
@@ -4094,7 +4061,6 @@
}
signature.addInt(this._majorVersion ?? 0);
signature.addInt(this._minorVersion ?? 0);
- signature.addString(this._apiSignature ?? '');
}
List<int> toBuffer() {
@@ -4103,20 +4069,10 @@
}
fb.Offset finish(fb.Builder fbBuilder) {
- fb.Offset offset_apiSignature;
- fb.Offset offset_dependencies;
fb.Offset offset_linkedLibraries;
fb.Offset offset_linkedLibraryUris;
- fb.Offset offset_unlinkedUnitHashes;
fb.Offset offset_unlinkedUnits;
fb.Offset offset_unlinkedUnitUris;
- if (_apiSignature != null) {
- offset_apiSignature = fbBuilder.writeString(_apiSignature);
- }
- if (!(_dependencies == null || _dependencies.isEmpty)) {
- offset_dependencies = fbBuilder
- .writeList(_dependencies.map((b) => b.finish(fbBuilder)).toList());
- }
if (!(_linkedLibraries == null || _linkedLibraries.isEmpty)) {
offset_linkedLibraries = fbBuilder
.writeList(_linkedLibraries.map((b) => b.finish(fbBuilder)).toList());
@@ -4125,10 +4081,6 @@
offset_linkedLibraryUris = fbBuilder.writeList(
_linkedLibraryUris.map((b) => fbBuilder.writeString(b)).toList());
}
- if (!(_unlinkedUnitHashes == null || _unlinkedUnitHashes.isEmpty)) {
- offset_unlinkedUnitHashes = fbBuilder.writeList(
- _unlinkedUnitHashes.map((b) => fbBuilder.writeString(b)).toList());
- }
if (!(_unlinkedUnits == null || _unlinkedUnits.isEmpty)) {
offset_unlinkedUnits = fbBuilder
.writeList(_unlinkedUnits.map((b) => b.finish(fbBuilder)).toList());
@@ -4138,12 +4090,6 @@
_unlinkedUnitUris.map((b) => fbBuilder.writeString(b)).toList());
}
fbBuilder.startTable();
- if (offset_apiSignature != null) {
- fbBuilder.addOffset(7, offset_apiSignature);
- }
- if (offset_dependencies != null) {
- fbBuilder.addOffset(8, offset_dependencies);
- }
if (offset_linkedLibraries != null) {
fbBuilder.addOffset(0, offset_linkedLibraries);
}
@@ -4156,9 +4102,6 @@
if (_minorVersion != null && _minorVersion != 0) {
fbBuilder.addUint32(6, _minorVersion);
}
- if (offset_unlinkedUnitHashes != null) {
- fbBuilder.addOffset(4, offset_unlinkedUnitHashes);
- }
if (offset_unlinkedUnits != null) {
fbBuilder.addOffset(2, offset_unlinkedUnits);
}
@@ -4190,29 +4133,20 @@
_PackageBundleImpl(this._bc, this._bcOffset);
- String _apiSignature;
- List<idl.PackageDependencyInfo> _dependencies;
List<idl.LinkedLibrary> _linkedLibraries;
List<String> _linkedLibraryUris;
int _majorVersion;
int _minorVersion;
- List<String> _unlinkedUnitHashes;
List<idl.UnlinkedUnit> _unlinkedUnits;
List<String> _unlinkedUnitUris;
@override
- String get apiSignature {
- _apiSignature ??= const fb.StringReader().vTableGet(_bc, _bcOffset, 7, '');
- return _apiSignature;
- }
+ Null get apiSignature =>
+ throw new UnimplementedError('attempt to access deprecated field');
@override
- List<idl.PackageDependencyInfo> get dependencies {
- _dependencies ??= const fb.ListReader<idl.PackageDependencyInfo>(
- const _PackageDependencyInfoReader())
- .vTableGet(_bc, _bcOffset, 8, const <idl.PackageDependencyInfo>[]);
- return _dependencies;
- }
+ Null get dependencies =>
+ throw new UnimplementedError('attempt to access deprecated field');
@override
List<idl.LinkedLibrary> get linkedLibraries {
@@ -4242,11 +4176,8 @@
}
@override
- List<String> get unlinkedUnitHashes {
- _unlinkedUnitHashes ??= const fb.ListReader<String>(const fb.StringReader())
- .vTableGet(_bc, _bcOffset, 4, const <String>[]);
- return _unlinkedUnitHashes;
- }
+ Null get unlinkedUnitHashes =>
+ throw new UnimplementedError('attempt to access deprecated field');
@override
List<idl.UnlinkedUnit> get unlinkedUnits {
@@ -4268,10 +4199,6 @@
@override
Map<String, Object> toJson() {
Map<String, Object> _result = <String, Object>{};
- if (apiSignature != '') _result["apiSignature"] = apiSignature;
- if (dependencies.isNotEmpty)
- _result["dependencies"] =
- dependencies.map((_value) => _value.toJson()).toList();
if (linkedLibraries.isNotEmpty)
_result["linkedLibraries"] =
linkedLibraries.map((_value) => _value.toJson()).toList();
@@ -4279,8 +4206,6 @@
_result["linkedLibraryUris"] = linkedLibraryUris;
if (majorVersion != 0) _result["majorVersion"] = majorVersion;
if (minorVersion != 0) _result["minorVersion"] = minorVersion;
- if (unlinkedUnitHashes.isNotEmpty)
- _result["unlinkedUnitHashes"] = unlinkedUnitHashes;
if (unlinkedUnits.isNotEmpty)
_result["unlinkedUnits"] =
unlinkedUnits.map((_value) => _value.toJson()).toList();
@@ -4291,13 +4216,10 @@
@override
Map<String, Object> toMap() => {
- "apiSignature": apiSignature,
- "dependencies": dependencies,
"linkedLibraries": linkedLibraries,
"linkedLibraryUris": linkedLibraryUris,
"majorVersion": majorVersion,
"minorVersion": minorVersion,
- "unlinkedUnitHashes": unlinkedUnitHashes,
"unlinkedUnits": unlinkedUnits,
"unlinkedUnitUris": unlinkedUnitUris,
};
@@ -4306,231 +4228,6 @@
String toString() => convert.json.encode(toJson());
}
-class PackageDependencyInfoBuilder extends Object
- with _PackageDependencyInfoMixin
- implements idl.PackageDependencyInfo {
- String _apiSignature;
- List<String> _includedPackageNames;
- bool _includesDartUris;
- bool _includesFileUris;
- String _summaryPath;
-
- @override
- String get apiSignature => _apiSignature ??= '';
-
- /**
- * API signature of this dependency.
- */
- void set apiSignature(String value) {
- this._apiSignature = value;
- }
-
- @override
- List<String> get includedPackageNames => _includedPackageNames ??= <String>[];
-
- /**
- * If this dependency summarizes any files whose URI takes the form
- * "package:<package_name>/...", a list of all such package names, sorted
- * lexicographically. Otherwise empty.
- */
- void set includedPackageNames(List<String> value) {
- this._includedPackageNames = value;
- }
-
- @override
- bool get includesDartUris => _includesDartUris ??= false;
-
- /**
- * Indicates whether this dependency summarizes any files whose URI takes the
- * form "dart:...".
- */
- void set includesDartUris(bool value) {
- this._includesDartUris = value;
- }
-
- @override
- bool get includesFileUris => _includesFileUris ??= false;
-
- /**
- * Indicates whether this dependency summarizes any files whose URI takes the
- * form "file:...".
- */
- void set includesFileUris(bool value) {
- this._includesFileUris = value;
- }
-
- @override
- String get summaryPath => _summaryPath ??= '';
-
- /**
- * Relative path to the summary file for this dependency. This is intended as
- * a hint to help the analysis server locate summaries of dependencies. We
- * don't specify precisely what this path is relative to, but we expect it to
- * be relative to a directory the analysis server can find (e.g. for projects
- * built using Bazel, it would be relative to the "bazel-bin" directory).
- *
- * Absent if the path is not known.
- */
- void set summaryPath(String value) {
- this._summaryPath = value;
- }
-
- PackageDependencyInfoBuilder(
- {String apiSignature,
- List<String> includedPackageNames,
- bool includesDartUris,
- bool includesFileUris,
- String summaryPath})
- : _apiSignature = apiSignature,
- _includedPackageNames = includedPackageNames,
- _includesDartUris = includesDartUris,
- _includesFileUris = includesFileUris,
- _summaryPath = summaryPath;
-
- /**
- * Flush [informative] data recursively.
- */
- void flushInformative() {}
-
- /**
- * Accumulate non-[informative] data into [signature].
- */
- void collectApiSignature(api_sig.ApiSignature signature) {
- signature.addString(this._apiSignature ?? '');
- signature.addString(this._summaryPath ?? '');
- if (this._includedPackageNames == null) {
- signature.addInt(0);
- } else {
- signature.addInt(this._includedPackageNames.length);
- for (var x in this._includedPackageNames) {
- signature.addString(x);
- }
- }
- signature.addBool(this._includesFileUris == true);
- signature.addBool(this._includesDartUris == true);
- }
-
- fb.Offset finish(fb.Builder fbBuilder) {
- fb.Offset offset_apiSignature;
- fb.Offset offset_includedPackageNames;
- fb.Offset offset_summaryPath;
- if (_apiSignature != null) {
- offset_apiSignature = fbBuilder.writeString(_apiSignature);
- }
- if (!(_includedPackageNames == null || _includedPackageNames.isEmpty)) {
- offset_includedPackageNames = fbBuilder.writeList(
- _includedPackageNames.map((b) => fbBuilder.writeString(b)).toList());
- }
- if (_summaryPath != null) {
- offset_summaryPath = fbBuilder.writeString(_summaryPath);
- }
- fbBuilder.startTable();
- if (offset_apiSignature != null) {
- fbBuilder.addOffset(0, offset_apiSignature);
- }
- if (offset_includedPackageNames != null) {
- fbBuilder.addOffset(2, offset_includedPackageNames);
- }
- if (_includesDartUris == true) {
- fbBuilder.addBool(4, true);
- }
- if (_includesFileUris == true) {
- fbBuilder.addBool(3, true);
- }
- if (offset_summaryPath != null) {
- fbBuilder.addOffset(1, offset_summaryPath);
- }
- return fbBuilder.endTable();
- }
-}
-
-class _PackageDependencyInfoReader
- extends fb.TableReader<_PackageDependencyInfoImpl> {
- const _PackageDependencyInfoReader();
-
- @override
- _PackageDependencyInfoImpl createObject(fb.BufferContext bc, int offset) =>
- new _PackageDependencyInfoImpl(bc, offset);
-}
-
-class _PackageDependencyInfoImpl extends Object
- with _PackageDependencyInfoMixin
- implements idl.PackageDependencyInfo {
- final fb.BufferContext _bc;
- final int _bcOffset;
-
- _PackageDependencyInfoImpl(this._bc, this._bcOffset);
-
- String _apiSignature;
- List<String> _includedPackageNames;
- bool _includesDartUris;
- bool _includesFileUris;
- String _summaryPath;
-
- @override
- String get apiSignature {
- _apiSignature ??= const fb.StringReader().vTableGet(_bc, _bcOffset, 0, '');
- return _apiSignature;
- }
-
- @override
- List<String> get includedPackageNames {
- _includedPackageNames ??=
- const fb.ListReader<String>(const fb.StringReader())
- .vTableGet(_bc, _bcOffset, 2, const <String>[]);
- return _includedPackageNames;
- }
-
- @override
- bool get includesDartUris {
- _includesDartUris ??=
- const fb.BoolReader().vTableGet(_bc, _bcOffset, 4, false);
- return _includesDartUris;
- }
-
- @override
- bool get includesFileUris {
- _includesFileUris ??=
- const fb.BoolReader().vTableGet(_bc, _bcOffset, 3, false);
- return _includesFileUris;
- }
-
- @override
- String get summaryPath {
- _summaryPath ??= const fb.StringReader().vTableGet(_bc, _bcOffset, 1, '');
- return _summaryPath;
- }
-}
-
-abstract class _PackageDependencyInfoMixin
- implements idl.PackageDependencyInfo {
- @override
- Map<String, Object> toJson() {
- Map<String, Object> _result = <String, Object>{};
- if (apiSignature != '') _result["apiSignature"] = apiSignature;
- if (includedPackageNames.isNotEmpty)
- _result["includedPackageNames"] = includedPackageNames;
- if (includesDartUris != false)
- _result["includesDartUris"] = includesDartUris;
- if (includesFileUris != false)
- _result["includesFileUris"] = includesFileUris;
- if (summaryPath != '') _result["summaryPath"] = summaryPath;
- return _result;
- }
-
- @override
- Map<String, Object> toMap() => {
- "apiSignature": apiSignature,
- "includedPackageNames": includedPackageNames,
- "includesDartUris": includesDartUris,
- "includesFileUris": includesFileUris,
- "summaryPath": summaryPath,
- };
-
- @override
- String toString() => convert.json.encode(toJson());
-}
-
class PackageIndexBuilder extends Object
with _PackageIndexMixin
implements idl.PackageIndex {
@@ -5748,6 +5445,7 @@
List<EntityRefBuilder> _mixins;
String _name;
int _nameOffset;
+ List<EntityRefBuilder> _superclassConstraints;
EntityRefBuilder _supertype;
List<UnlinkedTypeParamBuilder> _typeParameters;
@@ -5879,6 +5577,19 @@
}
@override
+ List<EntityRefBuilder> get superclassConstraints =>
+ _superclassConstraints ??= <EntityRefBuilder>[];
+
+ /**
+ * Superclass constraints for this mixin declaration. The list will be empty
+ * if this class is not a mixin declaration, or if the declaration does not
+ * have an `on` clause (in which case the type `Object` is implied).
+ */
+ void set superclassConstraints(List<EntityRefBuilder> value) {
+ this._superclassConstraints = value;
+ }
+
+ @override
EntityRefBuilder get supertype => _supertype;
/**
@@ -5914,6 +5625,7 @@
List<EntityRefBuilder> mixins,
String name,
int nameOffset,
+ List<EntityRefBuilder> superclassConstraints,
EntityRefBuilder supertype,
List<UnlinkedTypeParamBuilder> typeParameters})
: _annotations = annotations,
@@ -5928,6 +5640,7 @@
_mixins = mixins,
_name = name,
_nameOffset = nameOffset,
+ _superclassConstraints = superclassConstraints,
_supertype = supertype,
_typeParameters = typeParameters;
@@ -5943,6 +5656,7 @@
_interfaces?.forEach((b) => b.flushInformative());
_mixins?.forEach((b) => b.flushInformative());
_nameOffset = null;
+ _superclassConstraints?.forEach((b) => b.flushInformative());
_supertype?.flushInformative();
_typeParameters?.forEach((b) => b.flushInformative());
}
@@ -6005,6 +5719,14 @@
}
signature.addBool(this._isMixinApplication == true);
signature.addBool(this._hasNoSupertype == true);
+ if (this._superclassConstraints == null) {
+ signature.addInt(0);
+ } else {
+ signature.addInt(this._superclassConstraints.length);
+ for (var x in this._superclassConstraints) {
+ x?.collectApiSignature(signature);
+ }
+ }
}
fb.Offset finish(fb.Builder fbBuilder) {
@@ -6016,6 +5738,7 @@
fb.Offset offset_interfaces;
fb.Offset offset_mixins;
fb.Offset offset_name;
+ fb.Offset offset_superclassConstraints;
fb.Offset offset_supertype;
fb.Offset offset_typeParameters;
if (!(_annotations == null || _annotations.isEmpty)) {
@@ -6047,6 +5770,10 @@
if (_name != null) {
offset_name = fbBuilder.writeString(_name);
}
+ if (!(_superclassConstraints == null || _superclassConstraints.isEmpty)) {
+ offset_superclassConstraints = fbBuilder.writeList(
+ _superclassConstraints.map((b) => b.finish(fbBuilder)).toList());
+ }
if (_supertype != null) {
offset_supertype = _supertype.finish(fbBuilder);
}
@@ -6091,6 +5818,9 @@
if (_nameOffset != null && _nameOffset != 0) {
fbBuilder.addUint32(1, _nameOffset);
}
+ if (offset_superclassConstraints != null) {
+ fbBuilder.addOffset(14, offset_superclassConstraints);
+ }
if (offset_supertype != null) {
fbBuilder.addOffset(3, offset_supertype);
}
@@ -6129,6 +5859,7 @@
List<idl.EntityRef> _mixins;
String _name;
int _nameOffset;
+ List<idl.EntityRef> _superclassConstraints;
idl.EntityRef _supertype;
List<idl.UnlinkedTypeParam> _typeParameters;
@@ -6216,6 +5947,14 @@
}
@override
+ List<idl.EntityRef> get superclassConstraints {
+ _superclassConstraints ??=
+ const fb.ListReader<idl.EntityRef>(const _EntityRefReader())
+ .vTableGet(_bc, _bcOffset, 14, const <idl.EntityRef>[]);
+ return _superclassConstraints;
+ }
+
+ @override
idl.EntityRef get supertype {
_supertype ??= const _EntityRefReader().vTableGet(_bc, _bcOffset, 3, null);
return _supertype;
@@ -6256,6 +5995,9 @@
_result["mixins"] = mixins.map((_value) => _value.toJson()).toList();
if (name != '') _result["name"] = name;
if (nameOffset != 0) _result["nameOffset"] = nameOffset;
+ if (superclassConstraints.isNotEmpty)
+ _result["superclassConstraints"] =
+ superclassConstraints.map((_value) => _value.toJson()).toList();
if (supertype != null) _result["supertype"] = supertype.toJson();
if (typeParameters.isNotEmpty)
_result["typeParameters"] =
@@ -6277,6 +6019,7 @@
"mixins": mixins,
"name": name,
"nameOffset": nameOffset,
+ "superclassConstraints": superclassConstraints,
"supertype": supertype,
"typeParameters": typeParameters,
};
@@ -6870,11 +6613,11 @@
String _text;
@override
- int get length =>
+ Null get length =>
throw new UnimplementedError('attempt to access deprecated field');
@override
- int get offset =>
+ Null get offset =>
throw new UnimplementedError('attempt to access deprecated field');
@override
@@ -6938,11 +6681,11 @@
String _text;
@override
- int get length =>
+ Null get length =>
throw new UnimplementedError('attempt to access deprecated field');
@override
- int get offset =>
+ Null get offset =>
throw new UnimplementedError('attempt to access deprecated field');
@override
@@ -7656,11 +7399,11 @@
}
@override
- List<String> get localLabels =>
+ Null get localLabels =>
throw new UnimplementedError('attempt to access deprecated field');
@override
- List<UnlinkedVariableBuilder> get localVariables =>
+ Null get localVariables =>
throw new UnimplementedError('attempt to access deprecated field');
@override
@@ -8249,11 +7992,11 @@
}
@override
- List<String> get localLabels =>
+ Null get localLabels =>
throw new UnimplementedError('attempt to access deprecated field');
@override
- List<idl.UnlinkedVariable> get localVariables =>
+ Null get localVariables =>
throw new UnimplementedError('attempt to access deprecated field');
@override
@@ -11411,6 +11154,7 @@
int _libraryNameLength;
int _libraryNameOffset;
List<int> _lineStarts;
+ List<UnlinkedClassBuilder> _mixins;
List<UnlinkedPartBuilder> _parts;
UnlinkedPublicNamespaceBuilder _publicNamespace;
List<UnlinkedReferenceBuilder> _references;
@@ -11485,7 +11229,7 @@
}
@override
- String get fallbackModePath =>
+ Null get fallbackModePath =>
throw new UnimplementedError('attempt to access deprecated field');
@override
@@ -11580,6 +11324,16 @@
}
@override
+ List<UnlinkedClassBuilder> get mixins => _mixins ??= <UnlinkedClassBuilder>[];
+
+ /**
+ * Mixins declared in the compilation unit.
+ */
+ void set mixins(List<UnlinkedClassBuilder> value) {
+ this._mixins = value;
+ }
+
+ @override
List<UnlinkedPartBuilder> get parts => _parts ??= <UnlinkedPartBuilder>[];
/**
@@ -11651,6 +11405,7 @@
int libraryNameLength,
int libraryNameOffset,
List<int> lineStarts,
+ List<UnlinkedClassBuilder> mixins,
List<UnlinkedPartBuilder> parts,
UnlinkedPublicNamespaceBuilder publicNamespace,
List<UnlinkedReferenceBuilder> references,
@@ -11670,6 +11425,7 @@
_libraryNameLength = libraryNameLength,
_libraryNameOffset = libraryNameOffset,
_lineStarts = lineStarts,
+ _mixins = mixins,
_parts = parts,
_publicNamespace = publicNamespace,
_references = references,
@@ -11691,6 +11447,7 @@
_libraryNameLength = null;
_libraryNameOffset = null;
_lineStarts = null;
+ _mixins?.forEach((b) => b.flushInformative());
_parts?.forEach((b) => b.flushInformative());
_publicNamespace?.flushInformative();
_references?.forEach((b) => b.flushInformative());
@@ -11794,6 +11551,14 @@
signature.addInt(x);
}
}
+ if (this._mixins == null) {
+ signature.addInt(0);
+ } else {
+ signature.addInt(this._mixins.length);
+ for (var x in this._mixins) {
+ x?.collectApiSignature(signature);
+ }
+ }
}
List<int> toBuffer() {
@@ -11813,6 +11578,7 @@
fb.Offset offset_libraryDocumentationComment;
fb.Offset offset_libraryName;
fb.Offset offset_lineStarts;
+ fb.Offset offset_mixins;
fb.Offset offset_parts;
fb.Offset offset_publicNamespace;
fb.Offset offset_references;
@@ -11858,6 +11624,10 @@
if (!(_lineStarts == null || _lineStarts.isEmpty)) {
offset_lineStarts = fbBuilder.writeListUint32(_lineStarts);
}
+ if (!(_mixins == null || _mixins.isEmpty)) {
+ offset_mixins =
+ fbBuilder.writeList(_mixins.map((b) => b.finish(fbBuilder)).toList());
+ }
if (!(_parts == null || _parts.isEmpty)) {
offset_parts =
fbBuilder.writeList(_parts.map((b) => b.finish(fbBuilder)).toList());
@@ -11920,6 +11690,9 @@
if (offset_lineStarts != null) {
fbBuilder.addOffset(17, offset_lineStarts);
}
+ if (offset_mixins != null) {
+ fbBuilder.addOffset(20, offset_mixins);
+ }
if (offset_parts != null) {
fbBuilder.addOffset(11, offset_parts);
}
@@ -11974,6 +11747,7 @@
int _libraryNameLength;
int _libraryNameOffset;
List<int> _lineStarts;
+ List<idl.UnlinkedClass> _mixins;
List<idl.UnlinkedPart> _parts;
idl.UnlinkedPublicNamespace _publicNamespace;
List<idl.UnlinkedReference> _references;
@@ -12026,7 +11800,7 @@
}
@override
- String get fallbackModePath =>
+ Null get fallbackModePath =>
throw new UnimplementedError('attempt to access deprecated field');
@override
@@ -12086,6 +11860,14 @@
}
@override
+ List<idl.UnlinkedClass> get mixins {
+ _mixins ??=
+ const fb.ListReader<idl.UnlinkedClass>(const _UnlinkedClassReader())
+ .vTableGet(_bc, _bcOffset, 20, const <idl.UnlinkedClass>[]);
+ return _mixins;
+ }
+
+ @override
List<idl.UnlinkedPart> get parts {
_parts ??=
const fb.ListReader<idl.UnlinkedPart>(const _UnlinkedPartReader())
@@ -12155,6 +11937,8 @@
if (libraryNameOffset != 0)
_result["libraryNameOffset"] = libraryNameOffset;
if (lineStarts.isNotEmpty) _result["lineStarts"] = lineStarts;
+ if (mixins.isNotEmpty)
+ _result["mixins"] = mixins.map((_value) => _value.toJson()).toList();
if (parts.isNotEmpty)
_result["parts"] = parts.map((_value) => _value.toJson()).toList();
if (publicNamespace != null)
@@ -12186,6 +11970,7 @@
"libraryNameLength": libraryNameLength,
"libraryNameOffset": libraryNameOffset,
"lineStarts": lineStarts,
+ "mixins": mixins,
"parts": parts,
"publicNamespace": publicNamespace,
"references": references,
@@ -12382,11 +12167,11 @@
}
@override
- int get visibleLength =>
+ Null get visibleLength =>
throw new UnimplementedError('attempt to access deprecated field');
@override
- int get visibleOffset =>
+ Null get visibleOffset =>
throw new UnimplementedError('attempt to access deprecated field');
UnlinkedVariableBuilder(
@@ -12653,11 +12438,11 @@
}
@override
- int get visibleLength =>
+ Null get visibleLength =>
throw new UnimplementedError('attempt to access deprecated field');
@override
- int get visibleOffset =>
+ Null get visibleOffset =>
throw new UnimplementedError('attempt to access deprecated field');
}
diff --git a/pkg/analyzer/lib/src/summary/format.fbs b/pkg/analyzer/lib/src/summary/format.fbs
index 54b21e9..542ec79 100644
--- a/pkg/analyzer/lib/src/summary/format.fbs
+++ b/pkg/analyzer/lib/src/summary/format.fbs
@@ -1548,12 +1548,12 @@
* including this one). This can be used to identify when the API of a
* package may have changed.
*/
- apiSignature:string (id: 7);
+ apiSignature:string (id: 7, deprecated);
/**
* Information about the packages this package depends on, if known.
*/
- dependencies:[PackageDependencyInfo] (id: 8);
+ dependencies:[PackageDependencyInfo] (id: 8, deprecated);
/**
* Linked libraries.
@@ -1582,7 +1582,7 @@
* List of MD5 hashes of the files listed in [unlinkedUnitUris]. Each hash
* is encoded as a hexadecimal string using lower case letters.
*/
- unlinkedUnitHashes:[string] (id: 4);
+ unlinkedUnitHashes:[string] (id: 4, deprecated);
/**
* Unlinked information for the compilation units constituting the package.
@@ -1877,6 +1877,13 @@
nameOffset:uint (id: 1);
/**
+ * Superclass constraints for this mixin declaration. The list will be empty
+ * if this class is not a mixin declaration, or if the declaration does not
+ * have an `on` clause (in which case the type `Object` is implied).
+ */
+ superclassConstraints:[EntityRef] (id: 14);
+
+ /**
* Supertype of the class, or `null` if either (a) the class doesn't
* explicitly declare a supertype (and hence has supertype `Object`), or (b)
* the class *is* `Object` (and hence has no supertype).
@@ -2822,6 +2829,11 @@
lineStarts:[uint] (id: 17);
/**
+ * Mixins declared in the compilation unit.
+ */
+ mixins:[UnlinkedClass] (id: 20);
+
+ /**
* Part declarations in the compilation unit.
*/
parts:[UnlinkedPart] (id: 11);
diff --git a/pkg/analyzer/lib/src/summary/idl.dart b/pkg/analyzer/lib/src/summary/idl.dart
index 343740b..ee9df47 100644
--- a/pkg/analyzer/lib/src/summary/idl.dart
+++ b/pkg/analyzer/lib/src/summary/idl.dart
@@ -944,6 +944,7 @@
* package may have changed.
*/
@Id(7)
+ @deprecated
String get apiSignature;
/**
@@ -951,6 +952,7 @@
*/
@Id(8)
@informative
+ @deprecated
List<PackageDependencyInfo> get dependencies;
/**
@@ -985,6 +987,7 @@
* is encoded as a hexadecimal string using lower case letters.
*/
@Id(4)
+ @deprecated
@informative
List<String> get unlinkedUnitHashes;
@@ -1004,6 +1007,7 @@
/**
* Information about a single dependency of a summary package.
*/
+@deprecated
abstract class PackageDependencyInfo extends base.SummaryClass {
/**
* API signature of this dependency.
@@ -1440,6 +1444,14 @@
int get nameOffset;
/**
+ * Superclass constraints for this mixin declaration. The list will be empty
+ * if this class is not a mixin declaration, or if the declaration does not
+ * have an `on` clause (in which case the type `Object` is implied).
+ */
+ @Id(14)
+ List<EntityRef> get superclassConstraints;
+
+ /**
* Supertype of the class, or `null` if either (a) the class doesn't
* explicitly declare a supertype (and hence has supertype `Object`), or (b)
* the class *is* `Object` (and hence has no supertype).
@@ -3226,6 +3238,12 @@
List<int> get lineStarts;
/**
+ * Mixins declared in the compilation unit.
+ */
+ @Id(20)
+ List<UnlinkedClass> get mixins;
+
+ /**
* Part declarations in the compilation unit.
*/
@Id(11)
diff --git a/pkg/analyzer/lib/src/summary/link.dart b/pkg/analyzer/lib/src/summary/link.dart
index f1d8a76..8bce0e0 100644
--- a/pkg/analyzer/lib/src/summary/link.dart
+++ b/pkg/analyzer/lib/src/summary/link.dart
@@ -112,34 +112,14 @@
Set<String> libraryUris,
GetDependencyCallback getDependency,
GetUnitCallback getUnit,
- GetDeclaredVariable getDeclaredVariable,
- bool strong) {
- // TODO(brianwilkerson) Remove the parameter 'strong'.
+ GetDeclaredVariable getDeclaredVariable) {
Map<String, LinkedLibraryBuilder> linkedLibraries =
setupForLink(libraryUris, getUnit, getDeclaredVariable);
- relink(linkedLibraries, getDependency, getUnit, strong);
+ _relink(linkedLibraries, getDependency, getUnit);
return linkedLibraries;
}
/**
- * Given [libraries] (a map from URI to [LinkedLibraryBuilder]
- * containing correct prelinked information), rebuild linked
- * information, using [getDependency] to fetch the [LinkedLibrary]
- * objects from other build units, and [getUnit] to fetch the
- * [UnlinkedUnit] objects from both this build unit and other build
- * units.
- *
- * The [strong] flag controls whether type inference is performed in strong
- * mode or spec mode. Note that in spec mode, the only types that are inferred
- * are the types of initializing formals, which are inferred from the types of
- * the corresponding fields.
- */
-void relink(Map<String, LinkedLibraryBuilder> libraries,
- GetDependencyCallback getDependency, GetUnitCallback getUnit, bool strong) {
- new Linker(libraries, getDependency, getUnit, strong).link();
-}
-
-/**
* Prepare to link together the build unit consisting of [libraryUris], using
* [getUnit] to fetch the [UnlinkedUnit] objects from both this build unit and
* other build units.
@@ -278,6 +258,24 @@
}
/**
+ * Given [libraries] (a map from URI to [LinkedLibraryBuilder]
+ * containing correct prelinked information), rebuild linked
+ * information, using [getDependency] to fetch the [LinkedLibrary]
+ * objects from other build units, and [getUnit] to fetch the
+ * [UnlinkedUnit] objects from both this build unit and other build
+ * units.
+ *
+ * The [strong] flag controls whether type inference is performed in strong
+ * mode or spec mode. Note that in spec mode, the only types that are inferred
+ * are the types of initializing formals, which are inferred from the types of
+ * the corresponding fields.
+ */
+void _relink(Map<String, LinkedLibraryBuilder> libraries,
+ GetDependencyCallback getDependency, GetUnitCallback getUnit) {
+ new Linker(libraries, getDependency, getUnit).link();
+}
+
+/**
* Create an [UnlinkedParam] representing the given [parameter], which should be
* a parameter of a synthetic function type (e.g. one produced during type
* inference as a result of computing the least upper bound of two function
@@ -554,6 +552,9 @@
*/
final UnlinkedClass _unlinkedClass;
+ @override
+ final bool isMixin;
+
List<ConstructorElementForLink> _constructors;
ConstructorElementForLink _unnamedConstructor;
bool _unnamedConstructorComputed = false;
@@ -565,8 +566,8 @@
List<InterfaceType> _interfaces;
List<PropertyAccessorElementForLink> _accessors;
- ClassElementForLink_Class(
- CompilationUnitElementForLink enclosingElement, this._unlinkedClass)
+ ClassElementForLink_Class(CompilationUnitElementForLink enclosingElement,
+ this._unlinkedClass, this.isMixin)
: super(enclosingElement);
@override
@@ -1003,6 +1004,7 @@
*/
final String _absoluteUri;
+ List<ClassElementForLink_Class> _mixins;
List<ClassElementForLink_Class> _types;
Map<String, ReferenceableElementForLink> _containedNames;
List<TopLevelVariableElementForLink> _topLevelVariables;
@@ -1132,6 +1134,17 @@
LibraryElementForLink get library => enclosingElement;
@override
+ List<ClassElementForLink_Class> get mixins {
+ if (_mixins == null) {
+ _mixins = <ClassElementForLink_Class>[];
+ for (UnlinkedClass unlinkedClass in _unlinkedUnit.mixins) {
+ _mixins.add(new ClassElementForLink_Class(this, unlinkedClass, true));
+ }
+ }
+ return _mixins;
+ }
+
+ @override
ResynthesizerContext get resynthesizerContext => this;
@override
@@ -1151,7 +1164,7 @@
if (_types == null) {
_types = <ClassElementForLink_Class>[];
for (UnlinkedClass unlinkedClass in _unlinkedUnit.classes) {
- _types.add(new ClassElementForLink_Class(this, unlinkedClass));
+ _types.add(new ClassElementForLink_Class(this, unlinkedClass, false));
}
}
return _types;
@@ -3659,7 +3672,7 @@
ContextForLink _context;
AnalysisOptionsForLink _analysisOptions;
Linker(Map<String, LinkedLibraryBuilder> linkedLibraries, this.getDependency,
- this.getUnit, bool _) {
+ this.getUnit) {
// Create elements for the libraries to be linked. The rest of
// the element model will be created on demand.
linkedLibraries
diff --git a/pkg/analyzer/lib/src/summary/one_phase.dart b/pkg/analyzer/lib/src/summary/one_phase.dart
new file mode 100644
index 0000000..0775161
--- /dev/null
+++ b/pkg/analyzer/lib/src/summary/one_phase.dart
@@ -0,0 +1,64 @@
+// 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:analyzer/dart/ast/ast.dart';
+import 'package:analyzer/src/summary/format.dart';
+import 'package:analyzer/src/summary/idl.dart';
+import 'package:analyzer/src/summary/link.dart';
+import 'package:analyzer/src/summary/package_bundle_reader.dart';
+import 'package:analyzer/src/summary/prelink.dart';
+import 'package:analyzer/src/summary/summarize_ast.dart';
+import 'package:analyzer/src/summary/summarize_elements.dart';
+
+/// Builds the summary for a build unit based on unresolved ASTs of its
+/// compilation units.
+///
+/// The compilation units in [uriToUnit] are summarized, and the results are
+/// stored in [assembler]. References to other compilation units are resolved
+/// using the summaries stored in [dependencies].
+///
+/// [getDeclaredVariable] is used to resolve configurable imports. If
+/// [allowMissingFiles] is `false`, then failure to resolve an import will
+/// result in an exception being thrown; otherwise unresolved imports will be
+/// silently recovered from.
+void summarize(
+ Map<String, CompilationUnit> uriToUnit,
+ SummaryDataStore dependencies,
+ PackageBundleAssembler assembler,
+ GetDeclaredVariable getDeclaredVariable,
+ bool allowMissingFiles) {
+ var uriToUnlinked = <String, UnlinkedUnitBuilder>{};
+ uriToUnit.forEach((uri, compilationUnit) {
+ var unlinkedUnit = serializeAstUnlinked(compilationUnit);
+ uriToUnlinked[uri] = unlinkedUnit;
+ assembler.addUnlinkedUnitViaUri(uri, unlinkedUnit);
+ });
+
+ LinkedLibrary getDependency(String absoluteUri) {
+ var dependency = dependencies.linkedMap[absoluteUri];
+ if (dependency == null && !allowMissingFiles) {
+ throw new StateError('Missing dependency $absoluteUri');
+ }
+ return dependency;
+ }
+
+ UnlinkedUnit getUnit(String absoluteUri) {
+ if (absoluteUri == null) {
+ return null;
+ }
+ var unlinkedUnit =
+ uriToUnlinked[absoluteUri] ?? dependencies.unlinkedMap[absoluteUri];
+ if (unlinkedUnit == null && !allowMissingFiles) {
+ throw new StateError('Missing unit $absoluteUri');
+ }
+ return unlinkedUnit;
+ }
+
+ // TODO(paulberry): is this bad? Are we passing parts to link that we
+ // shouldn't?
+ var linkedLibraries = link(
+ uriToUnlinked.keys.toSet(), getDependency, getUnit, getDeclaredVariable);
+
+ linkedLibraries.forEach(assembler.addLinkedLibrary);
+}
diff --git a/pkg/analyzer/lib/src/summary/prelink.dart b/pkg/analyzer/lib/src/summary/prelink.dart
index 15c4b7c..6bda8fd 100644
--- a/pkg/analyzer/lib/src/summary/prelink.dart
+++ b/pkg/analyzer/lib/src/summary/prelink.dart
@@ -268,6 +268,34 @@
importCache[definingUnitUri] = definingUnit.publicNamespace;
}
+ void addClassToPrivateNamespace(int unitNum, UnlinkedClass cls) {
+ _Namespace namespace = new _Namespace();
+ cls.fields.forEach((field) {
+ if (field.isStatic && field.isConst) {
+ namespace.add(field.name,
+ new _Meaning(unitNum, ReferenceKind.propertyAccessor, 0, 0));
+ }
+ });
+ cls.executables.forEach((executable) {
+ ReferenceKind kind = null;
+ if (executable.kind == UnlinkedExecutableKind.constructor) {
+ kind = ReferenceKind.constructor;
+ } else if (executable.kind == UnlinkedExecutableKind.functionOrMethod &&
+ executable.isStatic) {
+ kind = ReferenceKind.method;
+ } else if (executable.kind == UnlinkedExecutableKind.getter &&
+ executable.isStatic) {
+ kind = ReferenceKind.propertyAccessor;
+ }
+ if (kind != null && executable.name.isNotEmpty) {
+ namespace.add(executable.name,
+ new _Meaning(unitNum, kind, 0, executable.typeParameters.length));
+ }
+ });
+ privateNamespace.add(cls.name,
+ new _ClassMeaning(unitNum, 0, cls.typeParameters.length, namespace));
+ }
+
/**
* Compute the public namespace for the library whose URI is reachable from
* [definingUnit] via [absoluteUri], by aggregating together public namespace
@@ -407,31 +435,7 @@
*/
void extractPrivateNames(UnlinkedUnit unit, int unitNum) {
for (UnlinkedClass cls in unit.classes) {
- _Namespace namespace = new _Namespace();
- cls.fields.forEach((field) {
- if (field.isStatic && field.isConst) {
- namespace.add(field.name,
- new _Meaning(unitNum, ReferenceKind.propertyAccessor, 0, 0));
- }
- });
- cls.executables.forEach((executable) {
- ReferenceKind kind = null;
- if (executable.kind == UnlinkedExecutableKind.constructor) {
- kind = ReferenceKind.constructor;
- } else if (executable.kind == UnlinkedExecutableKind.functionOrMethod &&
- executable.isStatic) {
- kind = ReferenceKind.method;
- } else if (executable.kind == UnlinkedExecutableKind.getter &&
- executable.isStatic) {
- kind = ReferenceKind.propertyAccessor;
- }
- if (kind != null && executable.name.isNotEmpty) {
- namespace.add(executable.name,
- new _Meaning(unitNum, kind, 0, executable.typeParameters.length));
- }
- });
- privateNamespace.add(cls.name,
- new _ClassMeaning(unitNum, 0, cls.typeParameters.length, namespace));
+ addClassToPrivateNamespace(unitNum, cls);
}
for (UnlinkedEnum enm in unit.enums) {
_Namespace namespace = new _Namespace();
@@ -455,6 +459,9 @@
0,
executable.typeParameters.length));
}
+ for (UnlinkedClass mixin in unit.mixins) {
+ addClassToPrivateNamespace(unitNum, mixin);
+ }
for (UnlinkedTypedef typedef in unit.typedefs) {
ReferenceKind kind;
switch (typedef.style) {
diff --git a/pkg/analyzer/lib/src/summary/public_namespace_computer.dart b/pkg/analyzer/lib/src/summary/public_namespace_computer.dart
index b11701b..76e34f8 100644
--- a/pkg/analyzer/lib/src/summary/public_namespace_computer.dart
+++ b/pkg/analyzer/lib/src/summary/public_namespace_computer.dart
@@ -78,43 +78,7 @@
ReferenceKind.classOrEnum,
node.typeParameters?.typeParameters?.length ?? 0);
if (cls != null) {
- for (ClassMember member in node.members) {
- if (member is FieldDeclaration && member.isStatic) {
- for (VariableDeclaration field in member.fields.variables) {
- String name = field.name.name;
- if (isPublic(name)) {
- cls.members.add(new UnlinkedPublicNameBuilder(
- name: name,
- kind: ReferenceKind.propertyAccessor,
- numTypeParameters: 0));
- }
- }
- }
- if (member is MethodDeclaration &&
- member.isStatic &&
- !member.isSetter &&
- !member.isOperator) {
- String name = member.name.name;
- if (isPublic(name)) {
- cls.members.add(new UnlinkedPublicNameBuilder(
- name: name,
- kind: member.isGetter
- ? ReferenceKind.propertyAccessor
- : ReferenceKind.method,
- numTypeParameters:
- member.typeParameters?.typeParameters?.length ?? 0));
- }
- }
- if (member is ConstructorDeclaration && member.name != null) {
- String name = member.name.name;
- if (isPublic(name)) {
- cls.members.add(new UnlinkedPublicNameBuilder(
- name: name,
- kind: ReferenceKind.constructor,
- numTypeParameters: 0));
- }
- }
- }
+ _addClassMembers(cls, node.members);
}
}
@@ -183,6 +147,17 @@
}
@override
+ visitMixinDeclaration(MixinDeclaration node) {
+ UnlinkedPublicNameBuilder mixin = addNameIfPublic(
+ node.name.name,
+ ReferenceKind.classOrEnum,
+ node.typeParameters?.typeParameters?.length ?? 0);
+ if (mixin != null) {
+ _addClassMembers(mixin, node.members);
+ }
+ }
+
+ @override
visitPartDirective(PartDirective node) {
parts.add(node.uri.stringValue ?? '');
}
@@ -195,4 +170,45 @@
addNameIfPublic('$name=', ReferenceKind.topLevelPropertyAccessor, 0);
}
}
+
+ void _addClassMembers(
+ UnlinkedPublicNameBuilder builder, List<ClassMember> members) {
+ for (ClassMember member in members) {
+ if (member is FieldDeclaration && member.isStatic) {
+ for (VariableDeclaration field in member.fields.variables) {
+ String name = field.name.name;
+ if (isPublic(name)) {
+ builder.members.add(new UnlinkedPublicNameBuilder(
+ name: name,
+ kind: ReferenceKind.propertyAccessor,
+ numTypeParameters: 0));
+ }
+ }
+ }
+ if (member is MethodDeclaration &&
+ member.isStatic &&
+ !member.isSetter &&
+ !member.isOperator) {
+ String name = member.name.name;
+ if (isPublic(name)) {
+ builder.members.add(new UnlinkedPublicNameBuilder(
+ name: name,
+ kind: member.isGetter
+ ? ReferenceKind.propertyAccessor
+ : ReferenceKind.method,
+ numTypeParameters:
+ member.typeParameters?.typeParameters?.length ?? 0));
+ }
+ }
+ if (member is ConstructorDeclaration && member.name != null) {
+ String name = member.name.name;
+ if (isPublic(name)) {
+ builder.members.add(new UnlinkedPublicNameBuilder(
+ name: name,
+ kind: ReferenceKind.constructor,
+ numTypeParameters: 0));
+ }
+ }
+ }
+ }
}
diff --git a/pkg/analyzer/lib/src/summary/resynthesize.dart b/pkg/analyzer/lib/src/summary/resynthesize.dart
index 7c20b56..355b249 100644
--- a/pkg/analyzer/lib/src/summary/resynthesize.dart
+++ b/pkg/analyzer/lib/src/summary/resynthesize.dart
@@ -272,6 +272,7 @@
unitElement.enums.forEach(putElement);
unitElement.functions.forEach(putElement);
unitElement.functionTypeAliases.forEach(putElement);
+ unitElement.mixins.forEach(putElement);
unitElement.topLevelVariables.forEach(putElement);
unitElement.types.forEach(putElement);
unitsInLibrary[unitUri] = elementsInUnit;
diff --git a/pkg/analyzer/lib/src/summary/summarize_ast.dart b/pkg/analyzer/lib/src/summary/summarize_ast.dart
index 4551401..32809c8 100644
--- a/pkg/analyzer/lib/src/summary/summarize_ast.dart
+++ b/pkg/analyzer/lib/src/summary/summarize_ast.dart
@@ -239,6 +239,11 @@
<UnlinkedExportNonPublicBuilder>[];
/**
+ * List of objects which should be written to [UnlinkedUnit.mixins].
+ */
+ final List<UnlinkedClassBuilder> mixins = <UnlinkedClassBuilder>[];
+
+ /**
* List of objects which should be written to [UnlinkedUnit.parts].
*/
final List<UnlinkedPartBuilder> parts = <UnlinkedPartBuilder>[];
@@ -534,6 +539,7 @@
b.executables = executables;
b.exports = exports;
b.imports = unlinkedImports;
+ b.mixins = mixins;
b.parts = parts;
b.references = unlinkedReferences;
b.typedefs = typedefs;
@@ -816,6 +822,58 @@
}
/**
+ * Serialize a [MixinDeclaration] into an [UnlinkedClass]
+ * and store the result in [mixins].
+ */
+ void serializeMixin(
+ AstNode node,
+ String name,
+ int nameOffset,
+ TypeParameterList typeParameters,
+ OnClause onClause,
+ ImplementsClause implementsClause,
+ NodeList<ClassMember> members,
+ Comment documentationComment,
+ NodeList<Annotation> annotations) {
+ int oldScopesLength = scopes.length;
+ List<UnlinkedExecutableBuilder> oldExecutables = executables;
+ executables = <UnlinkedExecutableBuilder>[];
+ List<UnlinkedVariableBuilder> oldVariables = variables;
+ variables = <UnlinkedVariableBuilder>[];
+ _TypeParameterScope typeParameterScope = new _TypeParameterScope();
+ scopes.add(typeParameterScope);
+ UnlinkedClassBuilder b = new UnlinkedClassBuilder();
+ b.name = name;
+ b.nameOffset = nameOffset;
+ b.typeParameters =
+ serializeTypeParameters(typeParameters, typeParameterScope);
+ if (onClause != null) {
+ b.superclassConstraints =
+ onClause.superclassConstraints.map(serializeType).toList();
+ }
+ if (implementsClause != null) {
+ b.interfaces = implementsClause.interfaces.map(serializeType).toList();
+ }
+ if (members != null) {
+ scopes.add(buildClassMemberScope(name, members));
+ for (ClassMember member in members) {
+ member.accept(this);
+ }
+ scopes.removeLast();
+ }
+ b.executables = executables;
+ b.fields = variables;
+ b.documentationComment = serializeDocumentation(documentationComment);
+ b.annotations = serializeAnnotations(annotations);
+ b.codeRange = serializeCodeRange(node);
+ mixins.add(b);
+ scopes.removeLast();
+ assert(scopes.length == oldScopesLength);
+ executables = oldExecutables;
+ variables = oldVariables;
+ }
+
+ /**
* Serialize a [FieldFormalParameter], [FunctionTypedFormalParameter], or
* [SimpleFormalParameter] into an [UnlinkedParam].
*/
@@ -1353,6 +1411,20 @@
}
@override
+ visitMixinDeclaration(MixinDeclaration node) {
+ serializeMixin(
+ node,
+ node.name.name,
+ node.name.offset,
+ node.typeParameters,
+ node.onClause,
+ node.implementsClause,
+ node.members,
+ node.documentationComment,
+ node.metadata);
+ }
+
+ @override
void visitPartDirective(PartDirective node) {
parts.add(new UnlinkedPartBuilder(
uriOffset: node.uri.offset,
diff --git a/pkg/analyzer/lib/src/summary/summarize_elements.dart b/pkg/analyzer/lib/src/summary/summarize_elements.dart
index 9f5e609..30964d4 100644
--- a/pkg/analyzer/lib/src/summary/summarize_elements.dart
+++ b/pkg/analyzer/lib/src/summary/summarize_elements.dart
@@ -4,14 +4,9 @@
library serialization.elements;
-import 'dart:convert';
-
import 'package:analyzer/src/generated/source.dart';
import 'package:analyzer/src/summary/format.dart';
import 'package:analyzer/src/summary/idl.dart';
-import 'package:convert/convert.dart';
-import 'package:crypto/crypto.dart';
-import 'package:front_end/src/base/api_signature.dart';
/**
* Object that gathers information uses it to assemble a new
@@ -41,16 +36,6 @@
final List<UnlinkedUnitBuilder> _unlinkedUnits = <UnlinkedUnitBuilder>[];
final Map<String, UnlinkedUnitBuilder> _unlinkedUnitMap =
<String, UnlinkedUnitBuilder>{};
- final List<String> _unlinkedUnitHashes;
- final bool _excludeHashes;
-
- /**
- * Create a [PackageBundleAssembler]. If [excludeHashes] is `true`, hash
- * computation will be skipped.
- */
- PackageBundleAssembler({bool excludeHashes: false})
- : _excludeHashes = excludeHashes,
- _unlinkedUnitHashes = excludeHashes ? null : <String>[];
void addLinkedLibrary(String uri, LinkedLibraryBuilder library) {
_linkedLibraries.add(library);
@@ -58,16 +43,13 @@
}
void addUnlinkedUnit(Source source, UnlinkedUnitBuilder unit) {
- addUnlinkedUnitWithHash(source.uri.toString(), unit,
- _excludeHashes ? null : _hash(source.contents.data));
+ addUnlinkedUnitViaUri(source.uri.toString(), unit);
}
- void addUnlinkedUnitWithHash(
- String uri, UnlinkedUnitBuilder unit, String hash) {
+ void addUnlinkedUnitViaUri(String uri, UnlinkedUnitBuilder unit) {
_unlinkedUnitUris.add(uri);
_unlinkedUnits.add(unit);
_unlinkedUnitMap[uri] = unit;
- _unlinkedUnitHashes?.add(hash);
}
/**
@@ -79,28 +61,7 @@
linkedLibraries: _linkedLibraries,
unlinkedUnitUris: _unlinkedUnitUris,
unlinkedUnits: _unlinkedUnits,
- unlinkedUnitHashes: _unlinkedUnitHashes,
majorVersion: currentMajorVersion,
- minorVersion: currentMinorVersion,
- apiSignature: _computeApiSignature());
- }
-
- /**
- * Compute the API signature for this package bundle.
- */
- String _computeApiSignature() {
- ApiSignature apiSignature = new ApiSignature();
- for (String unitUri in _unlinkedUnitMap.keys.toList()..sort()) {
- apiSignature.addString(unitUri);
- _unlinkedUnitMap[unitUri].collectApiSignature(apiSignature);
- }
- return apiSignature.toHex();
- }
-
- /**
- * Compute a hash of the given file contents.
- */
- String _hash(String contents) {
- return hex.encode(md5.convert(utf8.encode(contents)).bytes);
+ minorVersion: currentMinorVersion);
}
}
diff --git a/pkg/analyzer/lib/src/summary/summary_file_builder.dart b/pkg/analyzer/lib/src/summary/summary_file_builder.dart
index 02d89f4..3ef4a6d 100644
--- a/pkg/analyzer/lib/src/summary/summary_file_builder.dart
+++ b/pkg/analyzer/lib/src/summary/summary_file_builder.dart
@@ -27,27 +27,24 @@
class SummaryBuilder {
final Iterable<Source> librarySources;
final AnalysisContext context;
-
- /**
- * TODO(brianwilkerson) Remove this field.
- */
- final bool strong;
-
/**
* Create a summary builder for these [librarySources] and [context].
+ *
+ * TODO(paulberry): remove optional "strong" parameter once all callers have
+ * stopped passing it in.
*/
- SummaryBuilder(this.librarySources, this.context, this.strong);
+ SummaryBuilder(this.librarySources, this.context);
/**
* Create an SDK summary builder for the dart SDK at the given [sdkPath].
*/
- factory SummaryBuilder.forSdk(String sdkPath, bool strong) {
+ factory SummaryBuilder.forSdk(String sdkPath) {
//
// Prepare SDK.
//
ResourceProvider resourceProvider = PhysicalResourceProvider.INSTANCE;
FolderBasedDartSdk sdk = new FolderBasedDartSdk(
- resourceProvider, resourceProvider.getFolder(sdkPath), strong);
+ resourceProvider, resourceProvider.getFolder(sdkPath), true);
sdk.useSummary = false;
sdk.analysisOptions = new AnalysisOptionsImpl();
@@ -63,30 +60,25 @@
librarySources.add(sdk.mapDartUri(uri));
}
- return new SummaryBuilder(librarySources, sdk.context, strong);
+ return new SummaryBuilder(librarySources, sdk.context);
}
/**
* Build the linked bundle and return its bytes.
*/
- List<int> build() => new _Builder(context, librarySources, strong).build();
+ List<int> build() => new _Builder(context, librarySources).build();
}
class _Builder {
final AnalysisContext context;
final Iterable<Source> librarySources;
- /**
- * TODO(brianwilkerson) Remove this field.
- */
- final bool strong;
-
final Set<String> libraryUris = new Set<String>();
final Map<String, UnlinkedUnit> unlinkedMap = <String, UnlinkedUnit>{};
final PackageBundleAssembler bundleAssembler = new PackageBundleAssembler();
- _Builder(this.context, this.librarySources, this.strong);
+ _Builder(this.context, this.librarySources);
/**
* Build the linked bundle and return its bytes.
@@ -104,7 +96,7 @@
return unlinked;
}, (String name) {
throw new StateError('Unexpected call to GetDeclaredVariable($name).');
- }, strong);
+ });
map.forEach(bundleAssembler.addLinkedLibrary);
return bundleAssembler.assemble().toBuffer();
@@ -143,13 +135,11 @@
String code = source.contents.data;
CharSequenceReader reader = new CharSequenceReader(code);
Scanner scanner = new Scanner(source, reader, errorListener);
- scanner.scanGenericMethodComments = strong;
Token token = scanner.tokenize();
LineInfo lineInfo = new LineInfo(scanner.lineStarts);
Parser parser = new Parser(source, errorListener,
useFasta: context.analysisOptions.useFastaParser);
parser.enableOptionalNewAndConst = true;
- parser.parseGenericMethodComments = strong;
CompilationUnit unit = parser.parseCompilationUnit(token);
unit.lineInfo = lineInfo;
return unit;
diff --git a/pkg/analyzer/lib/src/task/dart.dart b/pkg/analyzer/lib/src/task/dart.dart
index 7ab1b66..ee2ccc0 100644
--- a/pkg/analyzer/lib/src/task/dart.dart
+++ b/pkg/analyzer/lib/src/task/dart.dart
@@ -3760,7 +3760,6 @@
new Parser(_source, errorListener, useFasta: options.useFastaParser);
parser.parseFunctionBodies =
options.analyzeFunctionBodiesPredicate(_source);
- parser.parseGenericMethodComments = true;
parser.enableOptionalNewAndConst = true;
CompilationUnit unit = parser.parseCompilationUnit(tokenStream);
unit.lineInfo = lineInfo;
@@ -3769,7 +3768,7 @@
var resourceProvider =
(context.sourceFactory.dartSdk as FolderBasedDartSdk)
.resourceProvider;
- new SdkPatcher().patch(resourceProvider, true,
+ new SdkPatcher().patch(resourceProvider,
context.analysisOptions.patchPaths, errorListener, _source, unit);
}
@@ -5314,7 +5313,6 @@
errorListener);
scanner.setSourceStart(fragment.line, fragment.column);
scanner.preserveComments = context.analysisOptions.preserveComments;
- scanner.scanGenericMethodComments = true;
scanner.scanLazyAssignmentOperators =
context.analysisOptions.enableLazyAssignmentOperators;
@@ -5331,7 +5329,6 @@
Scanner scanner =
new Scanner(source, new CharSequenceReader(content), errorListener);
scanner.preserveComments = context.analysisOptions.preserveComments;
- scanner.scanGenericMethodComments = true;
scanner.scanLazyAssignmentOperators =
context.analysisOptions.enableLazyAssignmentOperators;
diff --git a/pkg/analyzer/test/dart/element/builder_test.dart b/pkg/analyzer/test/dart/element/builder_test.dart
index 741f593..4d481a0 100644
--- a/pkg/analyzer/test/dart/element/builder_test.dart
+++ b/pkg/analyzer/test/dart/element/builder_test.dart
@@ -1212,6 +1212,8 @@
abstract class _ApiElementBuilderTestMixin {
CompilationUnit get compilationUnit;
+ void set isMixinSupportEnabled(bool value);
+
void assertHasCodeRange(Element element, int offset, int length);
/**
@@ -2465,6 +2467,48 @@
expect(method.isSynthetic, isFalse);
}
+ void test_visitMixinDeclaration() {
+ isMixinSupportEnabled = true;
+ var holder = buildElementsForText(r'''
+/// doc
+mixin M<T, U> on A, B implements C {
+ double f;
+ int get g => 0;
+ set s(int v) {}
+ int m(int v) => 0;
+}
+''');
+ var mixins = holder.mixins;
+ expect(mixins, hasLength(1));
+ var type = mixins[0];
+ expect(type.name, 'M');
+ expect(type.isMixin, isTrue);
+ expect(type.documentationComment, '/// doc');
+ assertHasCodeRange(type, 0, 115);
+
+ List<TypeParameterElement> typeParameters = type.typeParameters;
+ expect(typeParameters, hasLength(2));
+ expect(typeParameters[0].name, 'T');
+ expect(typeParameters[1].name, 'U');
+
+ var fields = type.fields;
+ expect(fields, hasLength(3));
+ expect(fields[0].name, 'f');
+ expect(fields[1].name, 'g');
+ expect(fields[2].name, 's');
+
+ var accessors = type.accessors;
+ expect(accessors, hasLength(4));
+ expect(accessors[0].name, 'f');
+ expect(accessors[1].name, 'f=');
+ expect(accessors[2].name, 'g');
+ expect(accessors[3].name, 's=');
+
+ var methods = type.methods;
+ expect(methods, hasLength(1));
+ expect(methods[0].name, 'm');
+ }
+
void test_visitTypeAlias_minimal() {
String aliasName = "F";
TypeAlias typeAlias = AstTestFactory.typeAlias(null, aliasName, null, null);
diff --git a/pkg/analyzer/test/generated/all_the_rest_test.dart b/pkg/analyzer/test/generated/all_the_rest_test.dart
index 9865748..87d7feb 100644
--- a/pkg/analyzer/test/generated/all_the_rest_test.dart
+++ b/pkg/analyzer/test/generated/all_the_rest_test.dart
@@ -694,9 +694,7 @@
GatheringErrorListener listener = new GatheringErrorListener();
ErrorReporter reporter = new ErrorReporter(listener, element.source);
reporter.reportErrorForElement(
- StaticWarningCode.CONFLICTING_INSTANCE_GETTER_AND_SUPERCLASS_MEMBER,
- element,
- ['A']);
+ StaticWarningCode.CAST_TO_NON_TYPE, element, ['A']);
AnalysisError error = listener.errors[0];
expect(error.offset, element.nameOffset);
}
@@ -710,9 +708,7 @@
new NonExistingSource(
'/test.dart', path.toUri('/test.dart'), UriKind.FILE_URI));
reporter.reportErrorForElement(
- StaticWarningCode.CONFLICTING_INSTANCE_GETTER_AND_SUPERCLASS_MEMBER,
- element,
- ['A']);
+ StaticWarningCode.CAST_TO_NON_TYPE, element, ['A']);
AnalysisError error = listener.errors[0];
expect(error.offset, element.nameOffset);
}
diff --git a/pkg/analyzer/test/generated/analysis_context_factory.dart b/pkg/analyzer/test/generated/analysis_context_factory.dart
index 2bb645b..4754a57 100644
--- a/pkg/analyzer/test/generated/analysis_context_factory.dart
+++ b/pkg/analyzer/test/generated/analysis_context_factory.dart
@@ -44,9 +44,9 @@
* system.
*/
static InternalAnalysisContext contextWithCore(
- {ResourceProvider resourceProvider}) {
+ {UriResolver contributedResolver, ResourceProvider resourceProvider}) {
AnalysisContextForTests context = new AnalysisContextForTests();
- return initContextWithCore(context, null, resourceProvider);
+ return initContextWithCore(context, contributedResolver, resourceProvider);
}
/**
diff --git a/pkg/analyzer/test/generated/checked_mode_compile_time_error_code_kernel_test.dart b/pkg/analyzer/test/generated/checked_mode_compile_time_error_code_kernel_test.dart
deleted file mode 100644
index 705b52a..0000000
--- a/pkg/analyzer/test/generated/checked_mode_compile_time_error_code_kernel_test.dart
+++ /dev/null
@@ -1,122 +0,0 @@
-// 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:test_reflective_loader/test_reflective_loader.dart';
-
-import 'checked_mode_compile_time_error_code_driver_test.dart';
-
-main() {
- defineReflectiveSuite(() {
- defineReflectiveTests(CheckedModeCompileTimeErrorCodeTest_Kernel);
- });
-}
-
-@reflectiveTest
-class CheckedModeCompileTimeErrorCodeTest_Kernel
- extends CheckedModeCompileTimeErrorCodeTest_Driver {
- @override
- bool get enableKernelDriver => true;
-
- @override
- bool get useCFE => true;
-
- @override
- bool get usingFastaParser => true;
-
- @failingTest
- @override
- test_fieldFormalParameterAssignableToField_fieldType_unresolved_null() async {
- // Expected 1 errors of type StaticWarningCode.UNDEFINED_CLASS, found 0
- await super
- .test_fieldFormalParameterAssignableToField_fieldType_unresolved_null();
- }
-
- @failingTest
- @override
- test_fieldFormalParameterNotAssignableToField_fieldType_unresolved() async {
- // Expected 1 errors of type CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH, found 0;
- // 1 errors of type StaticWarningCode.UNDEFINED_CLASS, found 0
- await super
- .test_fieldFormalParameterNotAssignableToField_fieldType_unresolved();
- }
-
- @failingTest
- @override
- test_fieldInitializerNotAssignable() async {
- // UnimplementedError: kernel: (Let) let final dynamic #t2 = "" in let ...
- await super.test_fieldInitializerNotAssignable();
- }
-
- @failingTest
- @override
- test_fieldTypeMismatch_unresolved() async {
- // UnimplementedError: kernel: (AsExpression) x as{TypeError} invalid-type
- await super.test_fieldTypeMismatch_unresolved();
- }
-
- @failingTest
- @override
- test_fieldTypeOk_unresolved_null() async {
- // UnimplementedError: kernel: (AsExpression) x as{TypeError} invalid-type
- await super.test_fieldTypeOk_unresolved_null();
- }
-
- @failingTest
- @override
- test_listElementTypeNotAssignable() async {
- // Expected 1 errors of type CheckedModeCompileTimeErrorCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE, found 0;
- // 1 errors of type StaticWarningCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE, found 0
- await super.test_listElementTypeNotAssignable();
- }
-
- @failingTest
- @override
- test_mapKeyTypeNotAssignable() async {
- // Expected 1 errors of type CheckedModeCompileTimeErrorCode.MAP_KEY_TYPE_NOT_ASSIGNABLE, found 0;
- // 1 errors of type StaticWarningCode.MAP_KEY_TYPE_NOT_ASSIGNABLE, found 0
- await super.test_mapKeyTypeNotAssignable();
- }
-
- @failingTest
- @override
- test_mapValueTypeNotAssignable() async {
- // Expected 1 errors of type CheckedModeCompileTimeErrorCode.MAP_VALUE_TYPE_NOT_ASSIGNABLE, found 0;
- // 1 errors of type StaticWarningCode.MAP_VALUE_TYPE_NOT_ASSIGNABLE, found 0
- await super.test_mapValueTypeNotAssignable();
- }
-
- @failingTest
- @override
- test_parameterAssignable_undefined_null() async {
- // Expected 1 errors of type StaticWarningCode.UNDEFINED_CLASS, found 0
- await super.test_parameterAssignable_undefined_null();
- }
-
- @failingTest
- @override
- test_parameterNotAssignable_undefined() async {
- // Expected 1 errors of type CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH, found 0;
- // 1 errors of type StaticWarningCode.UNDEFINED_CLASS, found 0
- await super.test_parameterNotAssignable_undefined();
- }
-
- @failingTest
- @override
- test_topLevelVarAssignable_undefined_null() async {
- // Expected 1 errors of type StaticWarningCode.UNDEFINED_CLASS, found 0
- await super.test_topLevelVarAssignable_undefined_null();
- }
-
- @failingTest
- @override
- test_topLevelVarNotAssignable_undefined() async {
- // UnimplementedError: kernel: (Let) let final dynamic #t6 = "foo" in let ...
- await super.test_topLevelVarNotAssignable_undefined();
- }
-}
-
-/// Tests marked with this annotation fail because of a Fasta problem.
-class FastaProblem {
- const FastaProblem(String issueUri);
-}
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
deleted file mode 100644
index 0cd7e62..0000000
--- a/pkg/analyzer/test/generated/compile_time_error_code_kernel_test.dart
+++ /dev/null
@@ -1,1358 +0,0 @@
-// 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:test_reflective_loader/test_reflective_loader.dart';
-
-import 'compile_time_error_code_driver_test.dart';
-
-main() {
- defineReflectiveSuite(() {
- defineReflectiveTests(CompileTimeErrorCodeTest_Kernel);
- });
-}
-
-@reflectiveTest
-class CompileTimeErrorCodeTest_Kernel extends CompileTimeErrorCodeTest_Driver {
- @override
- bool get enableKernelDriver => true;
-
- @override
- bool get useCFE => true;
-
- @override
- bool get usingFastaParser => true;
-
- @override
- @failingTest
- test_accessPrivateEnumField() async {
- await super.test_accessPrivateEnumField();
- }
-
- @override
- @failingTest
- @FastaProblem('https://github.com/dart-lang/sdk/issues/12916')
- test_ambiguousExport() async {
- await super.test_ambiguousExport();
- }
-
- @override
- @failingTest
- test_annotationWithNotClass() async {
- await super.test_annotationWithNotClass();
- }
-
- @override
- @failingTest
- test_annotationWithNotClass_prefixed() async {
- await super.test_annotationWithNotClass_prefixed();
- }
-
- @override
- @failingTest
- test_async_used_as_identifier_in_break_statement() async {
- await super.test_async_used_as_identifier_in_break_statement();
- }
-
- @override // Test passes with CFE but fails with the original analyzer.
- test_conflictingConstructorNameAndMember_field() async {
- await super.test_conflictingConstructorNameAndMember_field();
- }
-
- @override // Test passes with CFE but fails with the original analyzer.
- test_conflictingConstructorNameAndMember_getter() async {
- await super.test_conflictingConstructorNameAndMember_getter();
- }
-
- @override // Test passes with CFE but fails with the original analyzer.
- test_conflictingConstructorNameAndMember_method() async {
- await super.test_conflictingConstructorNameAndMember_method();
- }
-
- @override
- @failingTest
- test_conflictingGenericInterfaces_hierarchyLoop() {
- return super.test_conflictingGenericInterfaces_hierarchyLoop();
- }
-
- @override
- @failingTest
- test_constConstructorWithNonFinalField_super() async {
- await super.test_constConstructorWithNonFinalField_super();
- }
-
- @override
- @failingTest
- test_constEvalThrowsException_binaryMinus_null() async {
- await super.test_constEvalThrowsException_binaryMinus_null();
- }
-
- @override
- @failingTest
- test_constEvalThrowsException_binaryPlus_null() async {
- await super.test_constEvalThrowsException_binaryPlus_null();
- }
-
- @override
- @failingTest
- test_constEvalThrowsException_finalAlreadySet_initializer() async {
- await super.test_constEvalThrowsException_finalAlreadySet_initializer();
- }
-
- @override
- @failingTest
- test_constEvalThrowsException_finalAlreadySet_initializing_formal() async {
- await super
- .test_constEvalThrowsException_finalAlreadySet_initializing_formal();
- }
-
- @override
- @failingTest
- test_constEvalTypeBool_binary() async {
- await super.test_constEvalTypeBool_binary();
- }
-
- @override
- @failingTest
- test_constFormalParameter_fieldFormalParameter() async {
- await super.test_constFormalParameter_fieldFormalParameter();
- }
-
- @override
- @failingTest
- test_constFormalParameter_simpleFormalParameter() async {
- await super.test_constFormalParameter_simpleFormalParameter();
- }
-
- @override
- @failingTest
- test_constInitializedWithNonConstValueFromDeferredClass() async {
- await super.test_constInitializedWithNonConstValueFromDeferredClass();
- }
-
- @override
- @failingTest
- test_constInitializedWithNonConstValueFromDeferredClass_nested() async {
- await super
- .test_constInitializedWithNonConstValueFromDeferredClass_nested();
- }
-
- @override
- @failingTest
- test_constInstanceField() async {
- await super.test_constInstanceField();
- }
-
- @override
- @failingTest
- test_constWithInvalidTypeParameters() async {
- await super.test_constWithInvalidTypeParameters();
- }
-
- @override
- @failingTest
- test_constWithInvalidTypeParameters_tooFew() async {
- await super.test_constWithInvalidTypeParameters_tooFew();
- }
-
- @override
- @failingTest
- test_constWithInvalidTypeParameters_tooMany() async {
- await super.test_constWithInvalidTypeParameters_tooMany();
- }
-
- @override
- @failingTest
- test_constWithNonType() async {
- await super.test_constWithNonType();
- }
-
- @override
- @failingTest
- test_defaultValueInFunctionTypeAlias_new_named() async {
- await super.test_defaultValueInFunctionTypeAlias_new_named();
- }
-
- @override
- @failingTest
- test_defaultValueInFunctionTypeAlias_new_positional() async {
- await super.test_defaultValueInFunctionTypeAlias_new_positional();
- }
-
- @override
- @failingTest
- test_defaultValueInFunctionTypeAlias_old_named() async {
- await super.test_defaultValueInFunctionTypeAlias_old_named();
- }
-
- @override
- @failingTest
- test_defaultValueInFunctionTypeAlias_old_positional() async {
- await super.test_defaultValueInFunctionTypeAlias_old_positional();
- }
-
- @override
- @failingTest
- test_defaultValueInFunctionTypedParameter_named() async {
- await super.test_defaultValueInFunctionTypedParameter_named();
- }
-
- @override
- @failingTest
- test_defaultValueInFunctionTypedParameter_optional() async {
- await super.test_defaultValueInFunctionTypedParameter_optional();
- }
-
- @override
- @failingTest
- test_defaultValueInRedirectingFactoryConstructor() async {
- await super.test_defaultValueInRedirectingFactoryConstructor();
- }
-
- @override
- @failingTest
- test_deferredImportWithInvalidUri() async {
- await super.test_deferredImportWithInvalidUri();
- }
-
- @override
- @failingTest
- test_duplicateConstructorName_named() async {
- return super.test_duplicateConstructorName_named();
- }
-
- @override
- @failingTest
- test_duplicateConstructorName_unnamed() async {
- return super.test_duplicateConstructorName_unnamed();
- }
-
- @override
- @failingTest
- test_duplicateDefinition_acrossLibraries() async {
- return super.test_duplicateDefinition_acrossLibraries();
- }
-
- @override
- @failingTest
- test_duplicateDefinition_classMembers_fields() async {
- return super.test_duplicateDefinition_classMembers_fields();
- }
-
- @override
- @failingTest
- test_duplicateDefinition_classMembers_fields_oneStatic() async {
- return super.test_duplicateDefinition_classMembers_fields_oneStatic();
- }
-
- @override
- @failingTest
- test_duplicateDefinition_classMembers_methods() async {
- return super.test_duplicateDefinition_classMembers_methods();
- }
-
- @override
- @failingTest
- test_duplicateDefinition_inPart() async {
- return super.test_duplicateDefinition_inPart();
- }
-
- @override
- @failingTest
- @FastaProblem('https://github.com/dart-lang/sdk/issues/30959')
- test_exportOfNonLibrary() async {
- return super.test_exportOfNonLibrary();
- }
-
- @override
- @failingTest
- test_extendsDeferredClass() async {
- await super.test_extendsDeferredClass();
- }
-
- @override
- @failingTest
- test_extendsDeferredClass_classTypeAlias() async {
- await super.test_extendsDeferredClass_classTypeAlias();
- }
-
- @override
- test_extendsDisallowedClass_class_Null() async {
- await super.test_extendsDisallowedClass_class_Null();
- }
-
- @override
- @failingTest
- test_extraPositionalArguments_const_super() async {
- await super.test_extraPositionalArguments_const_super();
- }
-
- @override
- @failingTest
- test_extraPositionalArgumentsCouldBeNamed_const_super() async {
- await super.test_extraPositionalArgumentsCouldBeNamed_const_super();
- }
-
- @override
- @failingTest
- test_fieldInitializerOutsideConstructor() async {
- await super.test_fieldInitializerOutsideConstructor();
- }
-
- @override
- @failingTest
- test_forInWithConstVariable_forEach_identifier() async {
- return super.test_forInWithConstVariable_forEach_identifier();
- }
-
- @override
- @failingTest
- test_genericFunctionTypeArgument_class() async {
- await super.test_genericFunctionTypeArgument_class();
- }
-
- @override
- @failingTest
- test_genericFunctionTypeArgument_function() async {
- await super.test_genericFunctionTypeArgument_function();
- }
-
- @override
- @failingTest
- test_genericFunctionTypeArgument_functionType() async {
- await super.test_genericFunctionTypeArgument_functionType();
- }
-
- @override
- @failingTest
- test_genericFunctionTypeArgument_inference_function() async {
- await super.test_genericFunctionTypeArgument_inference_function();
- }
-
- @override
- @failingTest
- test_genericFunctionTypeArgument_inference_functionType() async {
- await super.test_genericFunctionTypeArgument_inference_functionType();
- }
-
- @override
- @failingTest
- test_genericFunctionTypeArgument_inference_method() async {
- await super.test_genericFunctionTypeArgument_inference_method();
- }
-
- @override
- @failingTest
- test_genericFunctionTypeArgument_method() async {
- await super.test_genericFunctionTypeArgument_method();
- }
-
- @override
- @failingTest
- test_genericFunctionTypeAsBound_class() async {
- await super.test_genericFunctionTypeAsBound_class();
- }
-
- @override
- @failingTest
- test_genericFunctionTypeAsBound_genericFunction() async {
- await super.test_genericFunctionTypeAsBound_genericFunction();
- }
-
- @override
- @failingTest
- test_genericFunctionTypeAsBound_genericFunctionTypedef() async {
- await super.test_genericFunctionTypeAsBound_genericFunctionTypedef();
- }
-
- @override
- @failingTest
- test_genericFunctionTypeAsBound_parameterOfFunction() async {
- await super.test_genericFunctionTypeAsBound_parameterOfFunction();
- }
-
- @override
- @failingTest
- test_genericFunctionTypeAsBound_typedef() async {
- await super.test_genericFunctionTypeAsBound_typedef();
- }
-
- @override
- @failingTest
- test_genericFunctionTypedParameter() async {
- await super.test_genericFunctionTypedParameter();
- }
-
- @override
- @failingTest
- test_getterAndMethodWithSameName() async {
- return super.test_getterAndMethodWithSameName();
- }
-
- @override
- @failingTest
- test_implementsDeferredClass() async {
- await super.test_implementsDeferredClass();
- }
-
- @override
- @failingTest
- test_implementsDeferredClass_classTypeAlias() async {
- await super.test_implementsDeferredClass_classTypeAlias();
- }
-
- @override
- test_implementsDisallowedClass_class_Null() async {
- await super.test_implementsDisallowedClass_class_Null();
- }
-
- @override
- test_implementsDisallowedClass_classTypeAlias_Null() async {
- await super.test_implementsDisallowedClass_classTypeAlias_Null();
- }
-
- @override
- @failingTest
- test_implementsDynamic() async {
- await super.test_implementsDynamic();
- }
-
- @override
- @failingTest
- test_implementsEnum() async {
- await super.test_implementsEnum();
- }
-
- @override
- @failingTest
- test_implementsNonClass_class() async {
- await super.test_implementsNonClass_class();
- }
-
- @override
- @failingTest
- test_implementsNonClass_typeAlias() async {
- await super.test_implementsNonClass_typeAlias();
- }
-
- @override
- @failingTest
- test_implementsRepeated_3times() async {
- await super.test_implementsRepeated_3times();
- }
-
- @override
- @failingTest
- test_implicitThisReferenceInInitializer_field() async {
- await super.test_implicitThisReferenceInInitializer_field();
- }
-
- @override
- @failingTest
- test_implicitThisReferenceInInitializer_invocation() async {
- await super.test_implicitThisReferenceInInitializer_invocation();
- }
-
- @override
- @failingTest
- test_implicitThisReferenceInInitializer_invocationInStatic() async {
- await super.test_implicitThisReferenceInInitializer_invocationInStatic();
- }
-
- @override
- @failingTest
- test_implicitThisReferenceInInitializer_redirectingConstructorInvocation() async {
- await super
- .test_implicitThisReferenceInInitializer_redirectingConstructorInvocation();
- }
-
- @override
- @failingTest
- test_implicitThisReferenceInInitializer_superConstructorInvocation() async {
- await super
- .test_implicitThisReferenceInInitializer_superConstructorInvocation();
- }
-
- @override
- @failingTest
- @FastaProblem('https://github.com/dart-lang/sdk/issues/30959')
- test_importOfNonLibrary() async {
- return super.test_importOfNonLibrary();
- }
-
- @override
- @failingTest
- test_initializerForNonExistent_const() async {
- await super.test_initializerForNonExistent_const();
- }
-
- @override
- @failingTest
- test_initializerForNonExistent_initializer() async {
- await super.test_initializerForNonExistent_initializer();
- }
-
- @override
- @failingTest
- test_initializerForStaticField() async {
- await super.test_initializerForStaticField();
- }
-
- @override
- @failingTest
- test_instantiateEnum_const() async {
- await super.test_instantiateEnum_const();
- }
-
- @override
- @failingTest
- test_instantiateEnum_new() async {
- await super.test_instantiateEnum_new();
- }
-
- @override
- @failingTest
- test_invalidAnnotation_importWithPrefix_notVariableOrConstructorInvocation() {
- return super
- .test_invalidAnnotation_importWithPrefix_notVariableOrConstructorInvocation();
- }
-
- @override
- @failingTest
- test_invalidAnnotation_notVariableOrConstructorInvocation() {
- return super.test_invalidAnnotation_notVariableOrConstructorInvocation();
- }
-
- @override
- @failingTest
- test_invalidAnnotation_staticMethodReference() async {
- await super.test_invalidAnnotation_staticMethodReference();
- }
-
- @override
- @failingTest
- test_invalidAnnotationFromDeferredLibrary() async {
- await super.test_invalidAnnotationFromDeferredLibrary();
- }
-
- @override
- @failingTest
- test_invalidAnnotationFromDeferredLibrary_constructor() async {
- await super.test_invalidAnnotationFromDeferredLibrary_constructor();
- }
-
- @override
- @failingTest
- test_invalidAnnotationFromDeferredLibrary_namedConstructor() async {
- await super.test_invalidAnnotationFromDeferredLibrary_namedConstructor();
- }
-
- @override
- @failingTest
- test_invalidAnnotationGetter_getter() async {
- await super.test_invalidAnnotationGetter_getter();
- }
-
- @override
- @failingTest
- test_invalidAnnotationGetter_importWithPrefix_getter() async {
- await super.test_invalidAnnotationGetter_importWithPrefix_getter();
- }
-
- @override
- @failingTest
- @FastaProblem('https://github.com/dart-lang/sdk/issues/31001')
- test_invalidConstructorName_notEnclosingClassName_defined() async {
- return super.test_invalidConstructorName_notEnclosingClassName_defined();
- }
-
- @override
- @failingTest
- @FastaProblem('https://github.com/dart-lang/sdk/issues/31001')
- test_invalidConstructorName_notEnclosingClassName_undefined() async {
- return super.test_invalidConstructorName_notEnclosingClassName_undefined();
- }
-
- @override
- @failingTest
- @FastaProblem('https://github.com/dart-lang/sdk/issues/30999')
- test_invalidFactoryNameNotAClass_notClassName() async {
- return super.test_invalidFactoryNameNotAClass_notClassName();
- }
-
- @override
- @failingTest
- @FastaProblem('https://github.com/dart-lang/sdk/issues/30999')
- test_invalidFactoryNameNotAClass_notEnclosingClassName() async {
- return super.test_invalidFactoryNameNotAClass_notEnclosingClassName();
- }
-
- @override
- @failingTest
- test_invalidReferenceToThis_instanceVariableInitializer_inConstructor() async {
- await super
- .test_invalidReferenceToThis_instanceVariableInitializer_inConstructor();
- }
-
- @override
- @failingTest
- test_invalidReferenceToThis_instanceVariableInitializer_inDeclaration() async {
- await super
- .test_invalidReferenceToThis_instanceVariableInitializer_inDeclaration();
- }
-
- @override
- @failingTest
- test_invalidReferenceToThis_superInitializer() async {
- await super.test_invalidReferenceToThis_superInitializer();
- }
-
- @override
- @failingTest
- test_invalidUri_export() async {
- return super.test_invalidUri_export();
- }
-
- @override
- @failingTest
- test_invalidUri_import() async {
- return super.test_invalidUri_import();
- }
-
- @override
- @failingTest
- test_invalidUri_part() async {
- return super.test_invalidUri_part();
- }
-
- @override
- @failingTest
- test_isInConstInstanceCreation_restored() async {
- await super.test_isInConstInstanceCreation_restored();
- }
-
- @override
- @failingTest
- test_labelInOuterScope() async {
- await super.test_labelInOuterScope();
- }
-
- @override
- @failingTest
- test_labelUndefined_break() async {
- await super.test_labelUndefined_break();
- }
-
- @override
- @failingTest
- test_memberWithClassName_field() async {
- await super.test_memberWithClassName_field();
- }
-
- @override
- @failingTest
- test_memberWithClassName_field2() async {
- await super.test_memberWithClassName_field2();
- }
-
- @override
- @failingTest
- test_memberWithClassName_getter() async {
- return super.test_memberWithClassName_getter();
- }
-
- @override
- @failingTest
- test_methodAndGetterWithSameName() async {
- return super.test_methodAndGetterWithSameName();
- }
-
- @override
- @failingTest
- test_mixinDeferredClass() async {
- await super.test_mixinDeferredClass();
- }
-
- @override
- @failingTest
- test_mixinDeferredClass_classTypeAlias() async {
- await super.test_mixinDeferredClass_classTypeAlias();
- }
-
- @override
- @failingTest
- test_mixinHasNoConstructors_mixinApp() async {
- await super.test_mixinHasNoConstructors_mixinApp();
- }
-
- @override
- @failingTest
- test_mixinHasNoConstructors_mixinClass() async {
- await super.test_mixinHasNoConstructors_mixinClass();
- }
-
- @override
- @failingTest
- test_mixinHasNoConstructors_mixinClass_explicitSuperCall() async {
- await super.test_mixinHasNoConstructors_mixinClass_explicitSuperCall();
- }
-
- @override
- @failingTest
- test_mixinHasNoConstructors_mixinClass_implicitSuperCall() async {
- await super.test_mixinHasNoConstructors_mixinClass_implicitSuperCall();
- }
-
- @override
- @failingTest
- test_mixinHasNoConstructors_mixinClass_namedSuperCall() async {
- await super.test_mixinHasNoConstructors_mixinClass_namedSuperCall();
- }
-
- @override
- @failingTest
- test_mixinInference_conflictingSubstitution() =>
- super.test_mixinInference_conflictingSubstitution();
-
- @override
- @failingTest
- test_mixinInference_impossibleSubstitution() =>
- super.test_mixinInference_impossibleSubstitution();
-
- @override
- @failingTest
- test_mixinInheritsFromNotObject_classDeclaration_extends() async {
- await super.test_mixinInheritsFromNotObject_classDeclaration_extends();
- }
-
- @override
- @failingTest
- test_mixinInheritsFromNotObject_classDeclaration_with() async {
- await super.test_mixinInheritsFromNotObject_classDeclaration_with();
- }
-
- @override
- @failingTest
- test_mixinInheritsFromNotObject_typeAlias_extends() async {
- await super.test_mixinInheritsFromNotObject_typeAlias_extends();
- }
-
- @override
- @failingTest
- test_mixinInheritsFromNotObject_typeAlias_with() async {
- await super.test_mixinInheritsFromNotObject_typeAlias_with();
- }
-
- @override
- test_mixinOfDisallowedClass_class_Null() async {
- await super.test_mixinOfDisallowedClass_class_Null();
- }
-
- @override
- test_mixinOfDisallowedClass_classTypeAlias_Null() async {
- await super.test_mixinOfDisallowedClass_classTypeAlias_Null();
- }
-
- @override
- @failingTest
- test_mixinOfEnum() async {
- await super.test_mixinOfEnum();
- }
-
- @override
- @failingTest
- test_mixinOfNonClass_class() async {
- await super.test_mixinOfNonClass_class();
- }
-
- @override
- @failingTest
- @FastaProblem('https://github.com/dart-lang/sdk/issues/31005')
- test_mixinOfNonClass_typeAlias() async {
- return super.test_mixinOfNonClass_typeAlias();
- }
-
- @override
- @failingTest
- test_mixinReferencesSuper() async {
- await super.test_mixinReferencesSuper();
- }
-
- @override
- @failingTest
- test_multipleRedirectingConstructorInvocations() async {
- return super.test_multipleRedirectingConstructorInvocations();
- }
-
- @override
- @failingTest
- test_multipleSuperInitializers() async {
- return super.test_multipleSuperInitializers();
- }
-
- @override
- @failingTest
- test_nativeClauseInNonSDKCode() async {
- await super.test_nativeClauseInNonSDKCode();
- }
-
- @override
- @failingTest
- test_nativeFunctionBodyInNonSDKCode_function() async {
- await super.test_nativeFunctionBodyInNonSDKCode_function();
- }
-
- @override
- @failingTest
- test_nativeFunctionBodyInNonSDKCode_method() async {
- await super.test_nativeFunctionBodyInNonSDKCode_method();
- }
-
- @override
- @failingTest
- test_noAnnotationConstructorArguments() {
- return super.test_noAnnotationConstructorArguments();
- }
-
- @override
- @failingTest
- test_noDefaultSuperConstructorExplicit_MixinAppWithDirectSuperCall() async {
- await super
- .test_noDefaultSuperConstructorExplicit_MixinAppWithDirectSuperCall();
- }
-
- @override
- @failingTest
- test_noDefaultSuperConstructorExplicit_mixinAppWithNamedParam() async {
- await super.test_noDefaultSuperConstructorExplicit_mixinAppWithNamedParam();
- }
-
- @override
- @failingTest
- test_noDefaultSuperConstructorExplicit_MixinAppWithNamedSuperCall() async {
- await super
- .test_noDefaultSuperConstructorExplicit_MixinAppWithNamedSuperCall();
- }
-
- @override
- @failingTest
- test_noDefaultSuperConstructorExplicit_mixinAppWithOptionalParam() async {
- await super
- .test_noDefaultSuperConstructorExplicit_mixinAppWithOptionalParam();
- }
-
- @override
- @failingTest
- test_noDefaultSuperConstructorExplicit_MixinWithDirectSuperCall() async {
- await super
- .test_noDefaultSuperConstructorExplicit_MixinWithDirectSuperCall();
- }
-
- @override
- @failingTest
- test_noDefaultSuperConstructorExplicit_mixinWithNamedParam() async {
- await super.test_noDefaultSuperConstructorExplicit_mixinWithNamedParam();
- }
-
- @override
- @failingTest
- test_noDefaultSuperConstructorExplicit_MixinWithNamedSuperCall() async {
- await super
- .test_noDefaultSuperConstructorExplicit_MixinWithNamedSuperCall();
- }
-
- @override
- @failingTest
- test_noDefaultSuperConstructorExplicit_mixinWithOptionalParam() async {
- await super.test_noDefaultSuperConstructorExplicit_mixinWithOptionalParam();
- }
-
- @override
- @failingTest
- test_noDefaultSuperConstructorImplicit_mixinAppWithNamedParam() async {
- await super.test_noDefaultSuperConstructorImplicit_mixinAppWithNamedParam();
- }
-
- @override
- @failingTest
- test_noDefaultSuperConstructorImplicit_mixinAppWithOptionalParam() async {
- await super
- .test_noDefaultSuperConstructorImplicit_mixinAppWithOptionalParam();
- }
-
- @override
- @failingTest
- test_noDefaultSuperConstructorImplicit_mixinWithNamedParam() async {
- await super.test_noDefaultSuperConstructorImplicit_mixinWithNamedParam();
- }
-
- @override
- @failingTest
- test_noDefaultSuperConstructorImplicit_mixinWithOptionalParam() async {
- await super.test_noDefaultSuperConstructorImplicit_mixinWithOptionalParam();
- }
-
- @override
- @failingTest
- test_nonConstantDefaultValueFromDeferredLibrary() async {
- await super.test_nonConstantDefaultValueFromDeferredLibrary();
- }
-
- @override
- @failingTest
- test_nonConstantDefaultValueFromDeferredLibrary_nested() async {
- await super.test_nonConstantDefaultValueFromDeferredLibrary_nested();
- }
-
- @override
- @failingTest
- test_nonConstValueInInitializerFromDeferredLibrary_field() async {
- await super.test_nonConstValueInInitializerFromDeferredLibrary_field();
- }
-
- @override
- @failingTest
- test_nonConstValueInInitializerFromDeferredLibrary_field_nested() async {
- await super
- .test_nonConstValueInInitializerFromDeferredLibrary_field_nested();
- }
-
- @override
- @failingTest
- test_nonConstValueInInitializerFromDeferredLibrary_redirecting() async {
- await super
- .test_nonConstValueInInitializerFromDeferredLibrary_redirecting();
- }
-
- @override
- @failingTest
- test_nonConstValueInInitializerFromDeferredLibrary_super() async {
- await super.test_nonConstValueInInitializerFromDeferredLibrary_super();
- }
-
- @override
- @failingTest
- test_optionalParameterInOperator_named() async {
- await super.test_optionalParameterInOperator_named();
- }
-
- @override
- @failingTest
- test_optionalParameterInOperator_positional() async {
- await super.test_optionalParameterInOperator_positional();
- }
-
- @override
- @failingTest
- test_prefix_conditionalPropertyAccess_set() async {
- await super.test_prefix_conditionalPropertyAccess_set();
- }
-
- @override
- @failingTest
- test_prefix_conditionalPropertyAccess_set_loadLibrary() async {
- await super.test_prefix_conditionalPropertyAccess_set_loadLibrary();
- }
-
- @override
- @failingTest
- test_prefixCollidesWithTopLevelMembers_functionTypeAlias() async {
- return super.test_prefixCollidesWithTopLevelMembers_functionTypeAlias();
- }
-
- @override
- @failingTest
- test_prefixCollidesWithTopLevelMembers_topLevelFunction() async {
- return super.test_prefixCollidesWithTopLevelMembers_topLevelFunction();
- }
-
- @override
- @failingTest
- test_prefixCollidesWithTopLevelMembers_topLevelVariable() async {
- return super.test_prefixCollidesWithTopLevelMembers_topLevelVariable();
- }
-
- @override
- @failingTest
- test_prefixCollidesWithTopLevelMembers_type() async {
- return super.test_prefixCollidesWithTopLevelMembers_type();
- }
-
- @override
- @failingTest
- test_privateCollisionInClassTypeAlias_mixinAndMixin() async {
- await super.test_privateCollisionInClassTypeAlias_mixinAndMixin();
- }
-
- @override
- @failingTest
- test_privateCollisionInClassTypeAlias_mixinAndMixin_indirect() async {
- await super.test_privateCollisionInClassTypeAlias_mixinAndMixin_indirect();
- }
-
- @override
- @failingTest
- test_privateCollisionInClassTypeAlias_superclassAndMixin() async {
- await super.test_privateCollisionInClassTypeAlias_superclassAndMixin();
- }
-
- @override
- @failingTest
- test_privateCollisionInClassTypeAlias_superclassAndMixin_same() async {
- await super.test_privateCollisionInClassTypeAlias_superclassAndMixin_same();
- }
-
- @override
- @failingTest
- test_privateCollisionInMixinApplication_mixinAndMixin() async {
- await super.test_privateCollisionInMixinApplication_mixinAndMixin();
- }
-
- @override
- @failingTest
- test_privateCollisionInMixinApplication_mixinAndMixin_indirect() async {
- await super
- .test_privateCollisionInMixinApplication_mixinAndMixin_indirect();
- }
-
- @override
- @failingTest
- test_privateCollisionInMixinApplication_superclassAndMixin() async {
- await super.test_privateCollisionInMixinApplication_superclassAndMixin();
- }
-
- @override
- @failingTest
- test_privateCollisionInMixinApplication_superclassAndMixin_same() async {
- await super
- .test_privateCollisionInMixinApplication_superclassAndMixin_same();
- }
-
- @override
- @failingTest
- test_recursiveFactoryRedirect() async {
- await super.test_recursiveFactoryRedirect();
- }
-
- @override
- @failingTest
- test_recursiveFactoryRedirect_directSelfReference() async {
- await super.test_recursiveFactoryRedirect_directSelfReference();
- }
-
- @override
- @failingTest
- test_recursiveFactoryRedirect_generic() async {
- await super.test_recursiveFactoryRedirect_generic();
- }
-
- @override
- @failingTest
- test_recursiveFactoryRedirect_named() async {
- await super.test_recursiveFactoryRedirect_named();
- }
-
- @override
- @failingTest
- test_recursiveFactoryRedirect_outsideCycle() async {
- await super.test_recursiveFactoryRedirect_outsideCycle();
- }
-
- @override
- @failingTest
- test_recursiveInterfaceInheritance_extends() async {
- await super.test_recursiveInterfaceInheritance_extends();
- }
-
- @override
- @failingTest
- test_recursiveInterfaceInheritance_extends_implements() async {
- await super.test_recursiveInterfaceInheritance_extends_implements();
- }
-
- @override
- @failingTest
- test_recursiveInterfaceInheritance_implements() async {
- await super.test_recursiveInterfaceInheritance_implements();
- }
-
- @override
- @failingTest
- @FastaProblem('https://github.com/dart-lang/sdk/issues/31007')
- test_recursiveInterfaceInheritance_mixin() async {
- return super.test_recursiveInterfaceInheritance_mixin();
- }
-
- @override
- @failingTest
- test_recursiveInterfaceInheritance_mixin_superclass() async {
- await super.test_recursiveInterfaceInheritance_mixin_superclass();
- }
-
- @override
- @failingTest
- test_recursiveInterfaceInheritance_tail() async {
- await super.test_recursiveInterfaceInheritance_tail();
- }
-
- @override
- @failingTest
- test_recursiveInterfaceInheritance_tail2() async {
- await super.test_recursiveInterfaceInheritance_tail2();
- }
-
- @override
- @failingTest
- test_recursiveInterfaceInheritance_tail3() async {
- await super.test_recursiveInterfaceInheritance_tail3();
- }
-
- @override
- @failingTest
- test_recursiveInterfaceInheritanceBaseCaseExtends() async {
- await super.test_recursiveInterfaceInheritanceBaseCaseExtends();
- }
-
- @override
- @failingTest
- test_recursiveInterfaceInheritanceBaseCaseExtends_abstract() async {
- await super.test_recursiveInterfaceInheritanceBaseCaseExtends_abstract();
- }
-
- @override
- @failingTest
- test_recursiveInterfaceInheritanceBaseCaseImplements() async {
- await super.test_recursiveInterfaceInheritanceBaseCaseImplements();
- }
-
- @override
- @failingTest
- test_recursiveInterfaceInheritanceBaseCaseImplements_typeAlias() async {
- await super
- .test_recursiveInterfaceInheritanceBaseCaseImplements_typeAlias();
- }
-
- @override
- @failingTest
- @FastaProblem('https://github.com/dart-lang/sdk/issues/31007')
- test_recursiveInterfaceInheritanceBaseCaseWith() async {
- return super.test_recursiveInterfaceInheritanceBaseCaseWith();
- }
-
- @override
- @failingTest
- test_redirectGenerativeToMissingConstructor() async {
- await super.test_redirectGenerativeToMissingConstructor();
- }
-
- @override
- @failingTest
- test_redirectGenerativeToNonGenerativeConstructor() async {
- await super.test_redirectGenerativeToNonGenerativeConstructor();
- }
-
- @override
- @failingTest
- test_redirectToNonClass_notAType() async {
- await super.test_redirectToNonClass_notAType();
- }
-
- @override
- @failingTest
- test_redirectToNonClass_undefinedIdentifier() async {
- await super.test_redirectToNonClass_undefinedIdentifier();
- }
-
- @override
- @failingTest
- test_redirectToNonConstConstructor() async {
- await super.test_redirectToNonConstConstructor();
- }
-
- @override
- @failingTest
- test_referencedBeforeDeclaration_inInitializer_closure() async {
- await super.test_referencedBeforeDeclaration_inInitializer_closure();
- }
-
- @override
- @failingTest
- test_referencedBeforeDeclaration_inInitializer_directly() async {
- await super.test_referencedBeforeDeclaration_inInitializer_directly();
- }
-
- @override
- @failingTest
- test_returnInGenerativeConstructor() async {
- await super.test_returnInGenerativeConstructor();
- }
-
- @override
- @failingTest
- test_returnInGenerativeConstructor_expressionFunctionBody() async {
- await super.test_returnInGenerativeConstructor_expressionFunctionBody();
- }
-
- @override
- @failingTest
- test_superInInvalidContext_constructorFieldInitializer() async {
- await super.test_superInInvalidContext_constructorFieldInitializer();
- }
-
- @override
- @failingTest
- test_superInInvalidContext_instanceVariableInitializer() async {
- await super.test_superInInvalidContext_instanceVariableInitializer();
- }
-
- @override
- @failingTest // Deliberately only reports one of the expected errors.
- test_superInRedirectingConstructor_superRedirection() async {
- await super.test_superInRedirectingConstructor_superRedirection();
- }
-
- @override
- @failingTest
- test_typeArgumentNotMatchingBounds_const() async {
- await super.test_typeArgumentNotMatchingBounds_const();
- }
-
- @override
- @failingTest
- test_undefinedAnnotation_unresolved_identifier() {
- return super.test_undefinedAnnotation_unresolved_identifier();
- }
-
- @override
- @failingTest
- test_undefinedAnnotation_unresolved_invocation() async {
- await super.test_undefinedAnnotation_unresolved_invocation();
- }
-
- @override
- @failingTest
- test_undefinedAnnotation_unresolved_prefixedIdentifier() {
- return super.test_undefinedAnnotation_unresolved_prefixedIdentifier();
- }
-
- @override
- @failingTest
- test_undefinedAnnotation_useLibraryScope() {
- return super.test_undefinedAnnotation_useLibraryScope();
- }
-
- @override
- @failingTest
- test_uriDoesNotExist_export() async {
- await super.test_uriDoesNotExist_export();
- }
-
- @override
- @failingTest
- test_uriDoesNotExist_import() async {
- await super.test_uriDoesNotExist_import();
- }
-
- @override
- @failingTest
- test_uriDoesNotExist_import_appears_after_deleting_target() async {
- await super.test_uriDoesNotExist_import_appears_after_deleting_target();
- }
-
- @override
- @failingTest
- test_uriDoesNotExist_import_disappears_when_fixed() async {
- await super.test_uriDoesNotExist_import_disappears_when_fixed();
- }
-
- @override
- @failingTest
- test_uriDoesNotExist_part() async {
- await super.test_uriDoesNotExist_part();
- }
-
- @override
- @failingTest
- test_uriWithInterpolation_constant() async {
- return super.test_uriWithInterpolation_constant();
- }
-
- @override
- @failingTest
- test_uriWithInterpolation_nonConstant() async {
- return super.test_uriWithInterpolation_nonConstant();
- }
-
- @override
- @failingTest
- test_wrongNumberOfParametersForOperator_tilde() async {
- await super.test_wrongNumberOfParametersForOperator_tilde();
- }
-
- @override
- @failingTest
- @FastaProblem('https://github.com/dart-lang/sdk/issues/31096')
- test_wrongNumberOfParametersForSetter_function_named() async {
- return super.test_wrongNumberOfParametersForSetter_function_named();
- }
-
- @override
- @failingTest
- @FastaProblem('https://github.com/dart-lang/sdk/issues/31096')
- test_wrongNumberOfParametersForSetter_function_optional() async {
- return super.test_wrongNumberOfParametersForSetter_function_optional();
- }
-
- @override
- @failingTest
- @FastaProblem('https://github.com/dart-lang/sdk/issues/31096')
- test_wrongNumberOfParametersForSetter_function_tooFew() async {
- return super.test_wrongNumberOfParametersForSetter_function_tooFew();
- }
-
- @override
- @failingTest
- @FastaProblem('https://github.com/dart-lang/sdk/issues/31096')
- test_wrongNumberOfParametersForSetter_function_tooMany() async {
- return super.test_wrongNumberOfParametersForSetter_function_tooMany();
- }
-
- @override
- @failingTest
- @FastaProblem('https://github.com/dart-lang/sdk/issues/31096')
- test_wrongNumberOfParametersForSetter_method_named() async {
- return super.test_wrongNumberOfParametersForSetter_method_named();
- }
-
- @override
- @failingTest
- @FastaProblem('https://github.com/dart-lang/sdk/issues/31096')
- test_wrongNumberOfParametersForSetter_method_optional() async {
- return super.test_wrongNumberOfParametersForSetter_method_optional();
- }
-
- @override
- @failingTest
- @FastaProblem('https://github.com/dart-lang/sdk/issues/31096')
- test_wrongNumberOfParametersForSetter_method_tooFew() async {
- return super.test_wrongNumberOfParametersForSetter_method_tooFew();
- }
-
- @override
- @failingTest
- @FastaProblem('https://github.com/dart-lang/sdk/issues/31096')
- test_wrongNumberOfParametersForSetter_method_tooMany() async {
- return super.test_wrongNumberOfParametersForSetter_method_tooMany();
- }
-
- @override
- test_yieldInNonGenerator_async() async {
- // Test passes, even though if fails in the superclass
- await super.test_yieldInNonGenerator_async();
- }
-}
-
-/// Tests marked with this annotation fail because of a Fasta problem.
-class FastaProblem {
- const FastaProblem(String issueUri);
-}
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 d2202d1..0463112 100644
--- a/pkg/analyzer/test/generated/compile_time_error_code_test.dart
+++ b/pkg/analyzer/test/generated/compile_time_error_code_test.dart
@@ -92,11 +92,6 @@
CompileTimeErrorCode.MIXIN_OF_DISALLOWED_CLASS,
CompileTimeErrorCode.MIXIN_OF_DISALLOWED_CLASS
]);
- } else if (useCFE) {
- assertErrors(source, [
- CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS,
- CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS
- ]);
} else {
assertErrors(source, [
CompileTimeErrorCode.MIXIN_OF_DISALLOWED_CLASS,
@@ -554,7 +549,7 @@
yield await x;
}''');
await computeAnalysisResult(source);
- if (usingFastaParser || useCFE) {
+ if (usingFastaParser) {
assertErrors(source, [CompileTimeErrorCode.AWAIT_IN_WRONG_CONTEXT]);
}
verify([source]);
@@ -591,11 +586,8 @@
class B {}
class as = A with B;''');
await computeAnalysisResult(source);
- assertErrors(source, [
- useCFE
- ? CompileTimeErrorCode.BUILT_IN_IDENTIFIER_IN_DECLARATION
- : CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPEDEF_NAME
- ]);
+ assertErrors(
+ source, [CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPEDEF_NAME]);
verify([source]);
}
@@ -603,9 +595,7 @@
Source source = addSource("import 'dart:async' as abstract;");
await computeAnalysisResult(source);
assertErrors(source, [
- useCFE
- ? CompileTimeErrorCode.BUILT_IN_IDENTIFIER_IN_DECLARATION
- : CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_PREFIX_NAME,
+ CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_PREFIX_NAME,
HintCode.UNUSED_IMPORT
]);
verify([source]);
@@ -618,12 +608,7 @@
dynamic x;
""");
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source,
- [CompileTimeErrorCode.UNDEFINED_CLASS, StaticWarningCode.NOT_A_TYPE]);
- } else {
- assertErrors(source, [CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPE]);
- }
+ assertErrors(source, [CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPE]);
}
test_builtInIdentifierAsType_formalParameter_field() async {
@@ -662,52 +647,37 @@
await computeAnalysisResult(source);
assertErrors(
source,
- useCFE
+ usingFastaParser
? [
- StaticTypeWarningCode.UNDEFINED_GETTER,
- StaticTypeWarningCode.UNDEFINED_GETTER,
+ StaticWarningCode.UNDEFINED_IDENTIFIER,
+ StaticWarningCode.UNDEFINED_IDENTIFIER,
ParserErrorCode.EXPECTED_TOKEN
]
- : usingFastaParser
- ? [
- StaticWarningCode.UNDEFINED_IDENTIFIER,
- StaticWarningCode.UNDEFINED_IDENTIFIER,
- ParserErrorCode.EXPECTED_TOKEN
- ]
- : [CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPE]);
+ : [CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPE]);
verify([source]);
}
test_builtInIdentifierAsTypedefName_functionTypeAlias() async {
Source source = addSource("typedef bool as();");
await computeAnalysisResult(source);
- assertErrors(source, [
- useCFE
- ? CompileTimeErrorCode.BUILT_IN_IDENTIFIER_IN_DECLARATION
- : CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPEDEF_NAME
- ]);
+ assertErrors(
+ source, [CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPEDEF_NAME]);
verify([source]);
}
test_builtInIdentifierAsTypeName() async {
Source source = addSource("class as {}");
await computeAnalysisResult(source);
- assertErrors(source, [
- useCFE
- ? CompileTimeErrorCode.BUILT_IN_IDENTIFIER_IN_DECLARATION
- : CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPE_NAME
- ]);
+ assertErrors(
+ source, [CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPE_NAME]);
verify([source]);
}
test_builtInIdentifierAsTypeParameterName() async {
Source source = addSource("class A<as> {}");
await computeAnalysisResult(source);
- assertErrors(source, [
- useCFE
- ? CompileTimeErrorCode.BUILT_IN_IDENTIFIER_IN_DECLARATION
- : CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPE_PARAMETER_NAME
- ]);
+ assertErrors(source,
+ [CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPE_PARAMETER_NAME]);
verify([source]);
}
@@ -805,12 +775,7 @@
class C extends A implements B {}
''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [CompileTimeErrorCode.AMBIGUOUS_SUPERTYPES]);
- } else {
- assertErrors(
- source, [CompileTimeErrorCode.CONFLICTING_GENERIC_INTERFACES]);
- }
+ assertErrors(source, [CompileTimeErrorCode.CONFLICTING_GENERIC_INTERFACES]);
}
@failingTest // Does not work with old task model
@@ -822,12 +787,7 @@
class C extends A with B {}
''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [CompileTimeErrorCode.AMBIGUOUS_SUPERTYPES]);
- } else {
- assertErrors(
- source, [CompileTimeErrorCode.CONFLICTING_GENERIC_INTERFACES]);
- }
+ assertErrors(source, [CompileTimeErrorCode.CONFLICTING_GENERIC_INTERFACES]);
}
test_conflictingGetterAndMethod_field_method() async {
@@ -839,11 +799,7 @@
m() {}
}''');
await computeAnalysisResult(source);
- assertErrors(
- source,
- useCFE
- ? [CompileTimeErrorCode.DECLARED_MEMBER_CONFLICTS_WITH_INHERITED]
- : [CompileTimeErrorCode.CONFLICTING_GETTER_AND_METHOD]);
+ assertErrors(source, [CompileTimeErrorCode.CONFLICTING_GETTER_AND_METHOD]);
verify([source]);
}
@@ -856,11 +812,7 @@
m() {}
}''');
await computeAnalysisResult(source);
- assertErrors(
- source,
- useCFE
- ? [CompileTimeErrorCode.DECLARED_MEMBER_CONFLICTS_WITH_INHERITED]
- : [CompileTimeErrorCode.CONFLICTING_GETTER_AND_METHOD]);
+ assertErrors(source, [CompileTimeErrorCode.CONFLICTING_GETTER_AND_METHOD]);
verify([source]);
}
@@ -873,11 +825,7 @@
int m;
}''');
await computeAnalysisResult(source);
- assertErrors(
- source,
- useCFE
- ? [CompileTimeErrorCode.DECLARED_MEMBER_CONFLICTS_WITH_INHERITED]
- : [CompileTimeErrorCode.CONFLICTING_METHOD_AND_GETTER]);
+ assertErrors(source, [CompileTimeErrorCode.CONFLICTING_METHOD_AND_GETTER]);
verify([source]);
}
@@ -890,11 +838,7 @@
get m => 0;
}''');
await computeAnalysisResult(source);
- assertErrors(
- source,
- useCFE
- ? [CompileTimeErrorCode.DECLARED_MEMBER_CONFLICTS_WITH_INHERITED]
- : [CompileTimeErrorCode.CONFLICTING_METHOD_AND_GETTER]);
+ assertErrors(source, [CompileTimeErrorCode.CONFLICTING_METHOD_AND_GETTER]);
verify([source]);
}
@@ -1063,16 +1007,11 @@
const B();
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [
- CompileTimeErrorCode.CONST_CONSTRUCTOR_IN_SUBCLASS_OF_MIXIN_APPLICATION
- ]);
- } else {
- assertErrors(source, [
- CompileTimeErrorCode.CONST_CONSTRUCTOR_WITH_MIXIN_WITH_FIELD,
- CompileTimeErrorCode.CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD
- ]);
- }
+
+ assertErrors(source, [
+ CompileTimeErrorCode.CONST_CONSTRUCTOR_WITH_MIXIN_WITH_FIELD,
+ CompileTimeErrorCode.CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD
+ ]);
verify([source]);
}
@@ -1085,14 +1024,8 @@
const B();
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [
- CompileTimeErrorCode.CONST_CONSTRUCTOR_IN_SUBCLASS_OF_MIXIN_APPLICATION
- ]);
- } else {
- assertErrors(source,
- [CompileTimeErrorCode.CONST_CONSTRUCTOR_WITH_MIXIN_WITH_FIELD]);
- }
+ assertErrors(
+ source, [CompileTimeErrorCode.CONST_CONSTRUCTOR_WITH_MIXIN_WITH_FIELD]);
verify([source]);
}
@@ -1133,16 +1066,10 @@
const B();
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [
- CompileTimeErrorCode.CONST_CONSTRUCTOR_IN_SUBCLASS_OF_MIXIN_APPLICATION
- ]);
- } else {
- assertErrors(source, [
- CompileTimeErrorCode.CONST_CONSTRUCTOR_WITH_MIXIN_WITH_FIELD,
- CompileTimeErrorCode.CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD
- ]);
- }
+ assertErrors(source, [
+ CompileTimeErrorCode.CONST_CONSTRUCTOR_WITH_MIXIN_WITH_FIELD,
+ CompileTimeErrorCode.CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD
+ ]);
verify([source]);
}
@@ -1217,15 +1144,8 @@
}
const a = new A();''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [
- CompileTimeErrorCode.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE,
- CompileTimeErrorCode.NOT_CONSTANT_EXPRESSION
- ]);
- } else {
- assertErrors(source,
- [CompileTimeErrorCode.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE]);
- }
+ assertErrors(source,
+ [CompileTimeErrorCode.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE]);
verify([source]);
}
@@ -1265,15 +1185,8 @@
final a = const A();
const C = a.m;''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [
- CompileTimeErrorCode.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE,
- CompileTimeErrorCode.NOT_CONSTANT_EXPRESSION
- ]);
- } else {
- assertErrors(source,
- [CompileTimeErrorCode.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE]);
- }
+ assertErrors(source,
+ [CompileTimeErrorCode.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE]);
verify([source]);
}
@@ -1291,14 +1204,12 @@
}
test_constEvalThrowsException_binaryMinus_null() async {
- await _check_constEvalThrowsException_binary_null("null - 5", false,
- cfeErrors: [StaticTypeWarningCode.UNDEFINED_METHOD]);
+ await _check_constEvalThrowsException_binary_null("null - 5", false);
await _check_constEvalThrowsException_binary_null("5 - null", true);
}
test_constEvalThrowsException_binaryPlus_null() async {
- await _check_constEvalThrowsException_binary_null("null + 5", false,
- cfeErrors: [StaticTypeWarningCode.UNDEFINED_METHOD]);
+ await _check_constEvalThrowsException_binary_null("null + 5", false);
await _check_constEvalThrowsException_binary_null("5 + null", true);
}
@@ -1353,28 +1264,14 @@
test_constEvalThrowsException_unaryBitNot_null() async {
Source source = addSource("const C = ~null;");
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [
- CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION,
- StaticTypeWarningCode.UNDEFINED_METHOD
- ]);
- } else {
- assertErrors(source, [CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION]);
- }
+ assertErrors(source, [CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION]);
// no verify(), '~null' is not resolved
}
test_constEvalThrowsException_unaryNegated_null() async {
Source source = addSource("const C = -null;");
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [
- CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION,
- StaticTypeWarningCode.UNDEFINED_METHOD
- ]);
- } else {
- assertErrors(source, [CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION]);
- }
+ assertErrors(source, [CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION]);
// no verify(), '-null' is not resolved
}
@@ -1386,21 +1283,15 @@
}
test_constEvalTypeBool_binary() async {
- await _check_constEvalTypeBool_withParameter_binary("p && ''",
- cfeErrors: [StaticTypeWarningCode.INVALID_ASSIGNMENT]);
+ await _check_constEvalTypeBool_withParameter_binary("p && ''");
await _check_constEvalTypeBool_withParameter_binary("p || ''");
}
test_constEvalTypeBool_binary_leftTrue() async {
Source source = addSource("const C = (true || 0);");
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source,
- [HintCode.DEAD_CODE, StaticTypeWarningCode.INVALID_ASSIGNMENT]);
- } else {
- assertErrors(
- source, [StaticTypeWarningCode.NON_BOOL_OPERAND, HintCode.DEAD_CODE]);
- }
+ assertErrors(
+ source, [StaticTypeWarningCode.NON_BOOL_OPERAND, HintCode.DEAD_CODE]);
verify([source]);
}
@@ -1506,15 +1397,8 @@
const C = p;
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [
- CompileTimeErrorCode.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE,
- CompileTimeErrorCode.NOT_CONSTANT_EXPRESSION
- ]);
- } else {
- assertErrors(source,
- [CompileTimeErrorCode.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE]);
- }
+ assertErrors(source,
+ [CompileTimeErrorCode.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE]);
verify([source]);
}
@@ -1708,14 +1592,7 @@
}
f() { return const T(0, 1, c: 2, d: 3); }''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [
- CompileTimeErrorCode.CONST_WITH_NON_CONST,
- CompileTimeErrorCode.NOT_CONSTANT_EXPRESSION
- ]);
- } else {
- assertErrors(source, [CompileTimeErrorCode.CONST_WITH_NON_CONST]);
- }
+ assertErrors(source, [CompileTimeErrorCode.CONST_WITH_NON_CONST]);
verify([source]);
}
@@ -1731,20 +1608,12 @@
}
''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [
- CompileTimeErrorCode.NOT_CONSTANT_EXPRESSION,
- CompileTimeErrorCode.CONST_WITH_NON_CONST,
- CompileTimeErrorCode.CONST_WITH_NON_CONSTANT_ARGUMENT,
- ]);
- } else {
- // TODO(a14n): the error CONST_WITH_NON_CONSTANT_ARGUMENT is redundant and
- // ought to be suppressed.
- assertErrors(source, [
- CompileTimeErrorCode.CONST_WITH_NON_CONST,
- CompileTimeErrorCode.CONST_WITH_NON_CONSTANT_ARGUMENT
- ]);
- }
+ // TODO(a14n): the error CONST_WITH_NON_CONSTANT_ARGUMENT is redundant and
+ // ought to be suppressed.
+ assertErrors(source, [
+ CompileTimeErrorCode.CONST_WITH_NON_CONST,
+ CompileTimeErrorCode.CONST_WITH_NON_CONSTANT_ARGUMENT
+ ]);
verify([source]);
}
@@ -1761,20 +1630,12 @@
}
''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [
- CompileTimeErrorCode.NOT_CONSTANT_EXPRESSION,
- CompileTimeErrorCode.CONST_WITH_NON_CONST,
- CompileTimeErrorCode.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE
- ]);
- } else {
- // TODO(a14n): the error CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE is
- // redundant and ought to be suppressed.
- assertErrors(source, [
- CompileTimeErrorCode.CONST_WITH_NON_CONST,
- CompileTimeErrorCode.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE
- ]);
- }
+ // TODO(a14n): the error CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE is
+ // redundant and ought to be suppressed.
+ assertErrors(source, [
+ CompileTimeErrorCode.CONST_WITH_NON_CONST,
+ CompileTimeErrorCode.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE
+ ]);
verify([source]);
}
@@ -1788,15 +1649,8 @@
main() {
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [
- CompileTimeErrorCode.CONST_WITH_NON_CONSTANT_ARGUMENT,
- CompileTimeErrorCode.NOT_CONSTANT_EXPRESSION
- ]);
- } else {
- assertErrors(
- source, [CompileTimeErrorCode.CONST_WITH_NON_CONSTANT_ARGUMENT]);
- }
+ assertErrors(
+ source, [CompileTimeErrorCode.CONST_WITH_NON_CONSTANT_ARGUMENT]);
verify([source]);
}
@@ -1807,20 +1661,12 @@
}
f(p) { return const A(p); }''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [
- CompileTimeErrorCode.NOT_CONSTANT_EXPRESSION,
- CompileTimeErrorCode.CONST_WITH_NON_CONSTANT_ARGUMENT,
- CompileTimeErrorCode.INVALID_CONSTANT
- ]);
- } else {
- // TODO(paulberry): the error INVALID_CONSTANT is redundant and ought to be
- // suppressed.
- assertErrors(source, [
- CompileTimeErrorCode.CONST_WITH_NON_CONSTANT_ARGUMENT,
- CompileTimeErrorCode.INVALID_CONSTANT
- ]);
- }
+ // TODO(paulberry): the error INVALID_CONSTANT is redundant and ought to be
+ // suppressed.
+ assertErrors(source, [
+ CompileTimeErrorCode.CONST_WITH_NON_CONSTANT_ARGUMENT,
+ CompileTimeErrorCode.INVALID_CONSTANT
+ ]);
verify([source]);
}
@@ -1844,11 +1690,7 @@
}''');
await computeAnalysisResult(source1);
await computeAnalysisResult(source2);
- if (useCFE) {
- assertErrors(source2, [StaticTypeWarningCode.UNDEFINED_METHOD]);
- } else {
- assertErrors(source2, [CompileTimeErrorCode.CONST_WITH_NON_TYPE]);
- }
+ assertErrors(source2, [CompileTimeErrorCode.CONST_WITH_NON_TYPE]);
verify([source1]);
}
@@ -1861,12 +1703,8 @@
return const A.noSuchConstructor();
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [StaticTypeWarningCode.UNDEFINED_METHOD]);
- } else {
- assertErrors(
- source, [CompileTimeErrorCode.CONST_WITH_UNDEFINED_CONSTRUCTOR]);
- }
+ assertErrors(
+ source, [CompileTimeErrorCode.CONST_WITH_UNDEFINED_CONSTRUCTOR]);
// no verify(), 'noSuchConstructor' is not resolved
}
@@ -1879,12 +1717,8 @@
return const A();
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [StaticTypeWarningCode.UNDEFINED_METHOD]);
- } else {
- assertErrors(source,
- [CompileTimeErrorCode.CONST_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT]);
- }
+ assertErrors(source,
+ [CompileTimeErrorCode.CONST_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT]);
verify([source]);
}
@@ -2222,13 +2056,8 @@
static int get x => 0;
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source,
- [CompileTimeErrorCode.DECLARED_MEMBER_CONFLICTS_WITH_INHERITED]);
- } else {
- assertErrors(
- source, [CompileTimeErrorCode.DUPLICATE_DEFINITION_INHERITANCE]);
- }
+ assertErrors(
+ source, [CompileTimeErrorCode.DUPLICATE_DEFINITION_INHERITANCE]);
verify([source]);
}
@@ -2241,15 +2070,8 @@
static int get x => 0;
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [
- CompileTimeErrorCode.DECLARED_MEMBER_CONFLICTS_WITH_INHERITED,
- StaticWarningCode.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER
- ]);
- } else {
- assertErrors(
- source, [CompileTimeErrorCode.DUPLICATE_DEFINITION_INHERITANCE]);
- }
+ assertErrors(
+ source, [CompileTimeErrorCode.DUPLICATE_DEFINITION_INHERITANCE]);
verify([source]);
}
@@ -2262,13 +2084,8 @@
static x() {}
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source,
- [CompileTimeErrorCode.DECLARED_MEMBER_CONFLICTS_WITH_INHERITED]);
- } else {
- assertErrors(
- source, [CompileTimeErrorCode.DUPLICATE_DEFINITION_INHERITANCE]);
- }
+ assertErrors(
+ source, [CompileTimeErrorCode.DUPLICATE_DEFINITION_INHERITANCE]);
verify([source]);
}
@@ -2281,13 +2098,8 @@
static x() {}
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source,
- [CompileTimeErrorCode.DECLARED_MEMBER_CONFLICTS_WITH_INHERITED]);
- } else {
- assertErrors(
- source, [CompileTimeErrorCode.DUPLICATE_DEFINITION_INHERITANCE]);
- }
+ assertErrors(
+ source, [CompileTimeErrorCode.DUPLICATE_DEFINITION_INHERITANCE]);
verify([source]);
}
@@ -2300,13 +2112,8 @@
static set x(value) {}
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source,
- [CompileTimeErrorCode.DECLARED_MEMBER_CONFLICTS_WITH_INHERITED]);
- } else {
- assertErrors(
- source, [CompileTimeErrorCode.DUPLICATE_DEFINITION_INHERITANCE]);
- }
+ assertErrors(
+ source, [CompileTimeErrorCode.DUPLICATE_DEFINITION_INHERITANCE]);
verify([source]);
}
@@ -2319,15 +2126,8 @@
static set x(value) {}
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [
- CompileTimeErrorCode.DECLARED_MEMBER_CONFLICTS_WITH_INHERITED,
- StaticWarningCode.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER
- ]);
- } else {
- assertErrors(
- source, [CompileTimeErrorCode.DUPLICATE_DEFINITION_INHERITANCE]);
- }
+ assertErrors(
+ source, [CompileTimeErrorCode.DUPLICATE_DEFINITION_INHERITANCE]);
verify([source]);
}
@@ -2369,12 +2169,7 @@
test_exportInternalLibrary() async {
Source source = addSource("export 'dart:_interceptors';");
await computeAnalysisResult(source);
- if (useCFE) {
- // CFE has a single error for both import and export.
- assertErrors(source, [CompileTimeErrorCode.IMPORT_INTERNAL_LIBRARY]);
- } else {
- assertErrors(source, [CompileTimeErrorCode.EXPORT_INTERNAL_LIBRARY]);
- }
+ assertErrors(source, [CompileTimeErrorCode.EXPORT_INTERNAL_LIBRARY]);
verify([source]);
}
@@ -2430,32 +2225,17 @@
test_extendsDisallowedClass_class_double() async {
Source source = addSource("class A extends double {}");
await computeAnalysisResult(source);
- assertErrors(
- source,
- useCFE
- ? [
- CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS,
- StaticWarningCode.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER
- ]
- : [CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS]);
+ assertErrors(source, [CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS]);
verify([source]);
}
test_extendsDisallowedClass_class_int() async {
Source source = addSource("class A extends int {}");
await computeAnalysisResult(source);
- assertErrors(
- source,
- useCFE
- ? [
- CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS,
- CompileTimeErrorCode.NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT,
- StaticWarningCode.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER
- ]
- : [
- CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS,
- CompileTimeErrorCode.NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT
- ]);
+ assertErrors(source, [
+ CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS,
+ CompileTimeErrorCode.NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT
+ ]);
verify([source]);
}
@@ -2472,32 +2252,17 @@
test_extendsDisallowedClass_class_num() async {
Source source = addSource("class A extends num {}");
await computeAnalysisResult(source);
- assertErrors(
- source,
- useCFE
- ? [
- CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS,
- StaticWarningCode.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER
- ]
- : [CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS]);
+ assertErrors(source, [CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS]);
verify([source]);
}
test_extendsDisallowedClass_class_String() async {
Source source = addSource("class A extends String {}");
await computeAnalysisResult(source);
- assertErrors(
- source,
- useCFE
- ? [
- CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS,
- CompileTimeErrorCode.NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT,
- StaticWarningCode.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER
- ]
- : [
- CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS,
- CompileTimeErrorCode.NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT
- ]);
+ assertErrors(source, [
+ CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS,
+ CompileTimeErrorCode.NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT
+ ]);
verify([source]);
}
@@ -2506,14 +2271,7 @@
class M {}
class C = bool with M;''');
await computeAnalysisResult(source);
- assertErrors(
- source,
- useCFE
- ? [
- CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS,
- CompileTimeErrorCode.NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT
- ]
- : [CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS]);
+ assertErrors(source, [CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS]);
verify([source]);
}
@@ -2522,14 +2280,7 @@
class M {}
class C = double with M;''');
await computeAnalysisResult(source);
- assertErrors(
- source,
- useCFE
- ? [
- CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS,
- StaticWarningCode.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER
- ]
- : [CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS]);
+ assertErrors(source, [CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS]);
verify([source]);
}
@@ -2538,15 +2289,7 @@
class M {}
class C = int with M;''');
await computeAnalysisResult(source);
- assertErrors(
- source,
- useCFE
- ? [
- CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS,
- CompileTimeErrorCode.NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT,
- StaticWarningCode.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER
- ]
- : [CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS]);
+ assertErrors(source, [CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS]);
verify([source]);
}
@@ -2555,14 +2298,7 @@
class M {}
class C = Null with M;''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [
- CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS,
- CompileTimeErrorCode.NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT
- ]);
- } else {
- assertErrors(source, [CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS]);
- }
+ assertErrors(source, [CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS]);
verify([source]);
}
@@ -2571,14 +2307,7 @@
class M {}
class C = num with M;''');
await computeAnalysisResult(source);
- assertErrors(
- source,
- useCFE
- ? [
- CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS,
- StaticWarningCode.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER
- ]
- : [CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS]);
+ assertErrors(source, [CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS]);
verify([source]);
}
@@ -2587,44 +2316,7 @@
class M {}
class C = String with M;''');
await computeAnalysisResult(source);
- assertErrors(
- source,
- useCFE
- ? [
- CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS,
- CompileTimeErrorCode.NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT,
- StaticWarningCode.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER
- ]
- : [CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS]);
- verify([source]);
- }
-
- test_extendsEnum() async {
- Source source = addSource(r'''
-enum E { ONE }
-class A extends E {}''');
- await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [
- CompileTimeErrorCode.EXTENDS_ENUM,
- CompileTimeErrorCode.NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT
- ]);
- } else {
- assertErrors(source, [CompileTimeErrorCode.EXTENDS_ENUM]);
- }
- verify([source]);
- }
-
- test_extendsNonClass_class() async {
- Source source = addSource(r'''
-int A;
-class B extends A {}''');
- await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [CompileTimeErrorCode.UNDEFINED_CLASS]);
- } else {
- assertErrors(source, [CompileTimeErrorCode.EXTENDS_NON_CLASS]);
- }
+ assertErrors(source, [CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS]);
verify([source]);
}
@@ -2635,6 +2327,24 @@
verify([source]);
}
+ test_extendsNonClass_enum() async {
+ Source source = addSource(r'''
+enum E { ONE }
+class A extends E {}''');
+ await computeAnalysisResult(source);
+ assertErrors(source, [CompileTimeErrorCode.EXTENDS_NON_CLASS]);
+ verify([source]);
+ }
+
+ test_extendsNonClass_variable() async {
+ Source source = addSource(r'''
+int A;
+class B extends A {}''');
+ await computeAnalysisResult(source);
+ assertErrors(source, [CompileTimeErrorCode.EXTENDS_NON_CLASS]);
+ verify([source]);
+ }
+
test_extraPositionalArguments_const() async {
Source source = addSource(r'''
class A {
@@ -2696,14 +2406,8 @@
A(this.x) : x = 3 {}
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(
- source, [CompileTimeErrorCode.FINAL_INITIALIZED_MULTIPLE_TIMES]);
- } else {
- assertErrors(source, [
- CompileTimeErrorCode.FIELD_INITIALIZED_IN_PARAMETER_AND_INITIALIZER
- ]);
- }
+ assertErrors(source,
+ [CompileTimeErrorCode.FIELD_INITIALIZED_IN_PARAMETER_AND_INITIALIZER]);
verify([source]);
}
@@ -2714,13 +2418,8 @@
A() : x = 0, x = 1 {}
}''');
await computeAnalysisResult(source);
- assertErrors(
- source,
- useCFE
- ? [CompileTimeErrorCode.FINAL_INITIALIZED_MULTIPLE_TIMES]
- : [
- CompileTimeErrorCode.FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS
- ]);
+ assertErrors(source,
+ [CompileTimeErrorCode.FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS]);
verify([source]);
}
@@ -2731,17 +2430,10 @@
A() : x = 0, x = 1, x = 2 {}
}''');
await computeAnalysisResult(source);
- assertErrors(
- source,
- useCFE
- ? [
- CompileTimeErrorCode.FINAL_INITIALIZED_MULTIPLE_TIMES,
- CompileTimeErrorCode.FINAL_INITIALIZED_MULTIPLE_TIMES
- ]
- : [
- CompileTimeErrorCode.FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS,
- CompileTimeErrorCode.FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS
- ]);
+ assertErrors(source, [
+ CompileTimeErrorCode.FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS,
+ CompileTimeErrorCode.FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS
+ ]);
verify([source]);
}
@@ -2753,17 +2445,10 @@
A() : x = 0, x = 1, y = 0, y = 1 {}
}''');
await computeAnalysisResult(source);
- assertErrors(
- source,
- useCFE
- ? [
- CompileTimeErrorCode.FINAL_INITIALIZED_MULTIPLE_TIMES,
- CompileTimeErrorCode.FINAL_INITIALIZED_MULTIPLE_TIMES
- ]
- : [
- CompileTimeErrorCode.FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS,
- CompileTimeErrorCode.FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS
- ]);
+ assertErrors(source, [
+ CompileTimeErrorCode.FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS,
+ CompileTimeErrorCode.FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS
+ ]);
verify([source]);
}
@@ -2774,14 +2459,8 @@
A(this.x) : x = 1 {}
}''');
await computeAnalysisResult(source);
- assertErrors(
- source,
- useCFE
- ? [CompileTimeErrorCode.FINAL_INITIALIZED_MULTIPLE_TIMES]
- : [
- CompileTimeErrorCode
- .FIELD_INITIALIZED_IN_PARAMETER_AND_INITIALIZER
- ]);
+ assertErrors(source,
+ [CompileTimeErrorCode.FIELD_INITIALIZED_IN_PARAMETER_AND_INITIALIZER]);
verify([source]);
}
@@ -2792,13 +2471,8 @@
factory A(this.x) => null;
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(
- source, [CompileTimeErrorCode.FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR]);
- } else {
- assertErrors(
- source, [CompileTimeErrorCode.FIELD_INITIALIZER_FACTORY_CONSTRUCTOR]);
- }
+ assertErrors(
+ source, [CompileTimeErrorCode.FIELD_INITIALIZER_FACTORY_CONSTRUCTOR]);
verify([source]);
}
@@ -2887,13 +2561,8 @@
A() : x = 0, x = 0 {}
}''');
await computeAnalysisResult(source);
- assertErrors(
- source,
- useCFE
- ? [CompileTimeErrorCode.FINAL_INITIALIZED_MULTIPLE_TIMES]
- : [
- CompileTimeErrorCode.FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS
- ]);
+ assertErrors(source,
+ [CompileTimeErrorCode.FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS]);
verify([source]);
}
@@ -2912,14 +2581,8 @@
A(this.x) : x = 0 {}
}''');
await computeAnalysisResult(source);
- assertErrors(
- source,
- useCFE
- ? [CompileTimeErrorCode.FINAL_INITIALIZED_MULTIPLE_TIMES]
- : [
- CompileTimeErrorCode
- .FIELD_INITIALIZED_IN_PARAMETER_AND_INITIALIZER
- ]);
+ assertErrors(source,
+ [CompileTimeErrorCode.FIELD_INITIALIZED_IN_PARAMETER_AND_INITIALIZER]);
verify([source]);
}
@@ -3161,7 +2824,7 @@
var expectedErrorCodes = <ErrorCode>[
CompileTimeErrorCode.GENERIC_FUNCTION_TYPED_PARAM_UNSUPPORTED
];
- if (enableNewAnalysisDriver && !enableKernelDriver) {
+ if (enableNewAnalysisDriver) {
// Due to dartbug.com/28515, some additional errors appear when using the
// new analysis driver.
expectedErrorCodes.addAll([
@@ -3218,97 +2881,52 @@
test_implementsDisallowedClass_class_bool() async {
Source source = addSource("class A implements bool {}");
await computeAnalysisResult(source);
- assertErrors(source, [
- useCFE
- ? CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS
- : CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS
- ]);
+ assertErrors(source, [CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS]);
verify([source]);
}
test_implementsDisallowedClass_class_double() async {
Source source = addSource("class A implements double {}");
await computeAnalysisResult(source);
- assertErrors(
- source,
- useCFE
- ? [
- CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS,
- StaticWarningCode.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER
- ]
- : [CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS]);
+ assertErrors(source, [CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS]);
verify([source]);
}
test_implementsDisallowedClass_class_int() async {
Source source = addSource("class A implements int {}");
await computeAnalysisResult(source);
- assertErrors(
- source,
- useCFE
- ? [
- CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS,
- StaticWarningCode.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER
- ]
- : [CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS]);
+ assertErrors(source, [CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS]);
verify([source]);
}
test_implementsDisallowedClass_class_Null() async {
Source source = addSource("class A implements Null {}");
await computeAnalysisResult(source);
- assertErrors(source, [
- useCFE
- ? CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS
- : CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS
- ]);
+ assertErrors(source, [CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS]);
verify([source]);
}
test_implementsDisallowedClass_class_num() async {
Source source = addSource("class A implements num {}");
await computeAnalysisResult(source);
- assertErrors(
- source,
- useCFE
- ? [
- CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS,
- StaticWarningCode.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER
- ]
- : [CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS]);
+ assertErrors(source, [CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS]);
verify([source]);
}
test_implementsDisallowedClass_class_String() async {
Source source = addSource("class A implements String {}");
await computeAnalysisResult(source);
- assertErrors(
- source,
- useCFE
- ? [
- CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS,
- StaticWarningCode.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER
- ]
- : [CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS]);
+ assertErrors(source, [CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS]);
verify([source]);
}
test_implementsDisallowedClass_class_String_num() async {
Source source = addSource("class A implements String, num {}");
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [
- CompileTimeErrorCode.AMBIGUOUS_SUPERTYPES,
- CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS,
- CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS,
- StaticWarningCode.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER
- ]);
- } else {
- assertErrors(source, [
- CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS,
- CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS
- ]);
- }
+ assertErrors(source, [
+ CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS,
+ CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS
+ ]);
verify([source]);
}
@@ -3318,11 +2936,7 @@
class M {}
class C = A with M implements bool;''');
await computeAnalysisResult(source);
- assertErrors(source, [
- useCFE
- ? CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS
- : CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS
- ]);
+ assertErrors(source, [CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS]);
verify([source]);
}
@@ -3332,14 +2946,7 @@
class M {}
class C = A with M implements double;''');
await computeAnalysisResult(source);
- assertErrors(
- source,
- useCFE
- ? [
- CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS,
- StaticWarningCode.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER
- ]
- : [CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS]);
+ assertErrors(source, [CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS]);
verify([source]);
}
@@ -3349,14 +2956,7 @@
class M {}
class C = A with M implements int;''');
await computeAnalysisResult(source);
- assertErrors(
- source,
- useCFE
- ? [
- CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS,
- StaticWarningCode.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER
- ]
- : [CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS]);
+ assertErrors(source, [CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS]);
verify([source]);
}
@@ -3366,11 +2966,7 @@
class M {}
class C = A with M implements Null;''');
await computeAnalysisResult(source);
- assertErrors(source, [
- useCFE
- ? CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS
- : CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS
- ]);
+ assertErrors(source, [CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS]);
verify([source]);
}
@@ -3380,14 +2976,7 @@
class M {}
class C = A with M implements num;''');
await computeAnalysisResult(source);
- assertErrors(
- source,
- useCFE
- ? [
- CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS,
- StaticWarningCode.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER
- ]
- : [CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS]);
+ assertErrors(source, [CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS]);
verify([source]);
}
@@ -3397,14 +2986,7 @@
class M {}
class C = A with M implements String;''');
await computeAnalysisResult(source);
- assertErrors(
- source,
- useCFE
- ? [
- CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS,
- StaticWarningCode.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER
- ]
- : [CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS]);
+ assertErrors(source, [CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS]);
verify([source]);
}
@@ -3414,35 +2996,10 @@
class M {}
class C = A with M implements String, num;''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [
- CompileTimeErrorCode.AMBIGUOUS_SUPERTYPES,
- CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS,
- CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS,
- StaticWarningCode.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER
- ]);
- } else {
- assertErrors(source, [
- CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS,
- CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS
- ]);
- }
- verify([source]);
- }
-
- test_implementsDynamic() async {
- Source source = addSource("class A implements dynamic {}");
- await computeAnalysisResult(source);
- assertErrors(source, [CompileTimeErrorCode.IMPLEMENTS_DYNAMIC]);
- verify([source]);
- }
-
- test_implementsEnum() async {
- Source source = addSource(r'''
-enum E { ONE }
-class A implements E {}''');
- await computeAnalysisResult(source);
- assertErrors(source, [CompileTimeErrorCode.IMPLEMENTS_ENUM]);
+ assertErrors(source, [
+ CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS,
+ CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS
+ ]);
verify([source]);
}
@@ -3455,6 +3012,22 @@
verify([source]);
}
+ test_implementsNonClass_dynamic() async {
+ Source source = addSource("class A implements dynamic {}");
+ await computeAnalysisResult(source);
+ assertErrors(source, [CompileTimeErrorCode.IMPLEMENTS_NON_CLASS]);
+ verify([source]);
+ }
+
+ test_implementsNonClass_enum() async {
+ Source source = addSource(r'''
+enum E { ONE }
+class A implements E {}''');
+ await computeAnalysisResult(source);
+ assertErrors(source, [CompileTimeErrorCode.IMPLEMENTS_NON_CLASS]);
+ verify([source]);
+ }
+
test_implementsNonClass_typeAlias() async {
Source source = addSource(r'''
class A {}
@@ -3544,17 +3117,10 @@
final y = x;
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [CompileTimeErrorCode.THIS_ACCESS_FROM_INITIALIZER]);
- } else if (enableKernelDriver) {
- assertErrors(source,
- [CompileTimeErrorCode.IMPLICIT_THIS_REFERENCE_IN_INITIALIZER]);
- } else {
- assertErrors(source, [
- CompileTimeErrorCode.IMPLICIT_THIS_REFERENCE_IN_INITIALIZER,
- StrongModeCode.TOP_LEVEL_INSTANCE_GETTER
- ]);
- }
+ assertErrors(source, [
+ CompileTimeErrorCode.IMPLICIT_THIS_REFERENCE_IN_INITIALIZER,
+ StrongModeCode.TOP_LEVEL_INSTANCE_GETTER
+ ]);
verify([source]);
}
@@ -3741,12 +3307,8 @@
A(this.x) {}
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [CompileTimeErrorCode.INITIALIZER_FOR_STATIC_FIELD]);
- } else {
- assertErrors(source,
- [CompileTimeErrorCode.INITIALIZING_FORMAL_FOR_NON_EXISTENT_FIELD]);
- }
+ assertErrors(source,
+ [CompileTimeErrorCode.INITIALIZING_FORMAL_FOR_NON_EXISTENT_FIELD]);
verify([source]);
}
@@ -3759,12 +3321,8 @@
B(this.x) {}
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [CompileTimeErrorCode.INITIALIZER_FOR_STATIC_FIELD]);
- } else {
- assertErrors(source,
- [CompileTimeErrorCode.INITIALIZING_FORMAL_FOR_NON_EXISTENT_FIELD]);
- }
+ assertErrors(source,
+ [CompileTimeErrorCode.INITIALIZING_FORMAL_FOR_NON_EXISTENT_FIELD]);
verify([source]);
}
@@ -3774,12 +3332,8 @@
A([this.x]) {}
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [CompileTimeErrorCode.INITIALIZER_FOR_STATIC_FIELD]);
- } else {
- assertErrors(source,
- [CompileTimeErrorCode.INITIALIZING_FORMAL_FOR_NON_EXISTENT_FIELD]);
- }
+ assertErrors(source,
+ [CompileTimeErrorCode.INITIALIZING_FORMAL_FOR_NON_EXISTENT_FIELD]);
verify([source]);
}
@@ -3790,12 +3344,8 @@
A(this.x) {}
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [CompileTimeErrorCode.INITIALIZER_FOR_STATIC_FIELD]);
- } else {
- assertErrors(source,
- [CompileTimeErrorCode.INITIALIZING_FORMAL_FOR_NON_EXISTENT_FIELD]);
- }
+ assertErrors(source,
+ [CompileTimeErrorCode.INITIALIZING_FORMAL_FOR_NON_EXISTENT_FIELD]);
verify([source]);
}
@@ -3806,12 +3356,8 @@
A([this.x]) {}
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [CompileTimeErrorCode.INITIALIZER_FOR_STATIC_FIELD]);
- } else {
- assertErrors(
- source, [CompileTimeErrorCode.INITIALIZING_FORMAL_FOR_STATIC_FIELD]);
- }
+ assertErrors(
+ source, [CompileTimeErrorCode.INITIALIZING_FORMAL_FOR_STATIC_FIELD]);
verify([source]);
}
@@ -3826,12 +3372,8 @@
}
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [StaticTypeWarningCode.UNDEFINED_METHOD]);
- } else {
- assertErrors(
- source, [CompileTimeErrorCode.INSTANCE_MEMBER_ACCESS_FROM_FACTORY]);
- }
+ assertErrors(
+ source, [CompileTimeErrorCode.INSTANCE_MEMBER_ACCESS_FROM_FACTORY]);
verify([source]);
}
@@ -3846,12 +3388,8 @@
}
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [StaticTypeWarningCode.UNDEFINED_METHOD]);
- } else {
- assertErrors(
- source, [CompileTimeErrorCode.INSTANCE_MEMBER_ACCESS_FROM_FACTORY]);
- }
+ assertErrors(
+ source, [CompileTimeErrorCode.INSTANCE_MEMBER_ACCESS_FROM_FACTORY]);
verify([source]);
}
@@ -3864,12 +3402,8 @@
}
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [StaticTypeWarningCode.UNDEFINED_GETTER]);
- } else {
- assertErrors(
- source, [CompileTimeErrorCode.INSTANCE_MEMBER_ACCESS_FROM_STATIC]);
- }
+ assertErrors(
+ source, [CompileTimeErrorCode.INSTANCE_MEMBER_ACCESS_FROM_STATIC]);
verify([source]);
}
@@ -3882,12 +3416,8 @@
}
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [StaticTypeWarningCode.UNDEFINED_GETTER]);
- } else {
- assertErrors(
- source, [CompileTimeErrorCode.INSTANCE_MEMBER_ACCESS_FROM_STATIC]);
- }
+ assertErrors(
+ source, [CompileTimeErrorCode.INSTANCE_MEMBER_ACCESS_FROM_STATIC]);
verify([source]);
}
@@ -3900,12 +3430,8 @@
}
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [StaticTypeWarningCode.UNDEFINED_METHOD]);
- } else {
- assertErrors(
- source, [CompileTimeErrorCode.INSTANCE_MEMBER_ACCESS_FROM_STATIC]);
- }
+ assertErrors(
+ source, [CompileTimeErrorCode.INSTANCE_MEMBER_ACCESS_FROM_STATIC]);
verify([source]);
}
@@ -3953,11 +3479,7 @@
main() {
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [CompileTimeErrorCode.NOT_CONSTANT_EXPRESSION]);
- } else {
- assertErrors(source, [CompileTimeErrorCode.INVALID_ANNOTATION]);
- }
+ assertErrors(source, [CompileTimeErrorCode.INVALID_ANNOTATION]);
verify([source]);
}
@@ -3982,11 +3504,7 @@
main() {
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [CompileTimeErrorCode.NOT_CONSTANT_EXPRESSION]);
- } else {
- assertErrors(source, [CompileTimeErrorCode.INVALID_ANNOTATION]);
- }
+ assertErrors(source, [CompileTimeErrorCode.INVALID_ANNOTATION]);
verify([source]);
}
@@ -4177,12 +3695,8 @@
A() async {}
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [CompileTimeErrorCode.NON_SYNC_CONSTRUCTOR]);
- } else {
- assertErrors(
- source, [CompileTimeErrorCode.INVALID_MODIFIER_ON_CONSTRUCTOR]);
- }
+ assertErrors(
+ source, [CompileTimeErrorCode.INVALID_MODIFIER_ON_CONSTRUCTOR]);
verify([source]);
}
@@ -4192,12 +3706,8 @@
A() async* {}
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [CompileTimeErrorCode.NON_SYNC_CONSTRUCTOR]);
- } else {
- assertErrors(
- source, [CompileTimeErrorCode.INVALID_MODIFIER_ON_CONSTRUCTOR]);
- }
+ assertErrors(
+ source, [CompileTimeErrorCode.INVALID_MODIFIER_ON_CONSTRUCTOR]);
verify([source]);
}
@@ -4207,12 +3717,8 @@
A() sync* {}
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [CompileTimeErrorCode.NON_SYNC_CONSTRUCTOR]);
- } else {
- assertErrors(
- source, [CompileTimeErrorCode.INVALID_MODIFIER_ON_CONSTRUCTOR]);
- }
+ assertErrors(
+ source, [CompileTimeErrorCode.INVALID_MODIFIER_ON_CONSTRUCTOR]);
verify([source]);
}
@@ -4226,7 +3732,7 @@
// using fasta parser.
assertErrors(
source,
- usingFastaParser && !useCFE
+ usingFastaParser
? [
CompileTimeErrorCode.INVALID_MODIFIER_ON_SETTER,
CompileTimeErrorCode.INVALID_MODIFIER_ON_SETTER
@@ -4243,7 +3749,7 @@
await computeAnalysisResult(source);
assertErrors(
source,
- usingFastaParser && !useCFE
+ usingFastaParser
? [
CompileTimeErrorCode.INVALID_MODIFIER_ON_SETTER,
CompileTimeErrorCode.INVALID_MODIFIER_ON_SETTER
@@ -4260,7 +3766,7 @@
await computeAnalysisResult(source);
assertErrors(
source,
- usingFastaParser && !useCFE
+ usingFastaParser
? [
CompileTimeErrorCode.INVALID_MODIFIER_ON_SETTER,
CompileTimeErrorCode.INVALID_MODIFIER_ON_SETTER
@@ -4274,7 +3780,7 @@
await computeAnalysisResult(source);
assertErrors(
source,
- usingFastaParser && !useCFE
+ usingFastaParser
? [
CompileTimeErrorCode.INVALID_MODIFIER_ON_SETTER,
CompileTimeErrorCode.INVALID_MODIFIER_ON_SETTER
@@ -4288,7 +3794,7 @@
await computeAnalysisResult(source);
assertErrors(
source,
- usingFastaParser && !useCFE
+ usingFastaParser
? [
CompileTimeErrorCode.INVALID_MODIFIER_ON_SETTER,
CompileTimeErrorCode.INVALID_MODIFIER_ON_SETTER
@@ -4302,7 +3808,7 @@
await computeAnalysisResult(source);
assertErrors(
source,
- usingFastaParser && !useCFE
+ usingFastaParser
? [
CompileTimeErrorCode.INVALID_MODIFIER_ON_SETTER,
CompileTimeErrorCode.INVALID_MODIFIER_ON_SETTER
@@ -4443,12 +3949,8 @@
}
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [CompileTimeErrorCode.THIS_ACCESS_FROM_INITIALIZER]);
- } else {
- assertErrors(source,
- [CompileTimeErrorCode.IMPLICIT_THIS_REFERENCE_IN_INITIALIZER]);
- }
+ assertErrors(
+ source, [CompileTimeErrorCode.IMPLICIT_THIS_REFERENCE_IN_INITIALIZER]);
verify([source]);
}
@@ -4499,19 +4001,11 @@
// (due to an error) should not crash the analyzer (see dartbug.com/23383)
Source source = addSource("const int i = (1 ? 'alpha' : 'beta').length;");
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [
- CompileTimeErrorCode.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE,
- CompileTimeErrorCode.CONST_EVAL_TYPE_BOOL,
- StaticTypeWarningCode.INVALID_ASSIGNMENT
- ]);
- } else {
- assertErrors(source, [
- CompileTimeErrorCode.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE,
- CompileTimeErrorCode.CONST_EVAL_TYPE_BOOL,
- StaticTypeWarningCode.NON_BOOL_CONDITION
- ]);
- }
+ assertErrors(source, [
+ CompileTimeErrorCode.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE,
+ CompileTimeErrorCode.CONST_EVAL_TYPE_BOOL,
+ StaticTypeWarningCode.NON_BOOL_CONDITION
+ ]);
verify([source]);
}
@@ -4561,37 +4055,31 @@
verify([source]);
}
- @failingTest
- test_mixinDeclaresConstructor() async {
- Source source = addSource(r'''
-class A {
- A() {}
-}
-class B extends Object mixin A {}''');
- await computeAnalysisResult(source);
- assertErrors(source, [CompileTimeErrorCode.MIXIN_DECLARES_CONSTRUCTOR]);
- verify([source]);
- }
-
- test_mixinDeclaresConstructor_classDeclaration() async {
+ test_mixinClassDeclaresConstructor_classDeclaration() async {
Source source = addSource(r'''
class A {
A() {}
}
class B extends Object with A {}''');
await computeAnalysisResult(source);
- assertErrors(source, [CompileTimeErrorCode.MIXIN_DECLARES_CONSTRUCTOR]);
+ assertErrors(
+ source,
+ [CompileTimeErrorCode.MIXIN_CLASS_DECLARES_CONSTRUCTOR],
+ );
verify([source]);
}
- test_mixinDeclaresConstructor_typeAlias() async {
+ test_mixinClassDeclaresConstructor_typeAlias() async {
Source source = addSource(r'''
class A {
A() {}
}
class B = Object with A;''');
await computeAnalysisResult(source);
- assertErrors(source, [CompileTimeErrorCode.MIXIN_DECLARES_CONSTRUCTOR]);
+ assertErrors(
+ source,
+ [CompileTimeErrorCode.MIXIN_CLASS_DECLARES_CONSTRUCTOR],
+ );
verify([source]);
}
@@ -4801,13 +4289,8 @@
class C extends Object with M {}
''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source,
- [CompileTimeErrorCode.MIXIN_INFERENCE_NO_POSSIBLE_SUBSTITUTION]);
- } else {
- assertErrors(
- source, [CompileTimeErrorCode.MIXIN_INFERENCE_NO_MATCHING_CLASS]);
- }
+ assertErrors(
+ source, [CompileTimeErrorCode.MIXIN_INFERENCE_NO_MATCHING_CLASS]);
}
@failingTest // Does not work with old task model
@@ -4822,17 +4305,10 @@
class C extends Object with M implements A<B> {}
''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [
- CompileTimeErrorCode.AMBIGUOUS_SUPERTYPES,
- CompileTimeErrorCode.MIXIN_INFERENCE_NO_POSSIBLE_SUBSTITUTION
- ]);
- } else {
- assertErrors(source, [
- CompileTimeErrorCode.MIXIN_INFERENCE_NO_MATCHING_CLASS,
- CompileTimeErrorCode.CONFLICTING_GENERIC_INTERFACES
- ]);
- }
+ assertErrors(source, [
+ CompileTimeErrorCode.MIXIN_INFERENCE_NO_MATCHING_CLASS,
+ CompileTimeErrorCode.CONFLICTING_GENERIC_INTERFACES
+ ]);
}
test_mixinInference_noMatchingClass_namedMixinApplication() async {
@@ -4846,13 +4322,8 @@
class C = Object with M;
''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source,
- [CompileTimeErrorCode.MIXIN_INFERENCE_NO_POSSIBLE_SUBSTITUTION]);
- } else {
- assertErrors(
- source, [CompileTimeErrorCode.MIXIN_INFERENCE_NO_MATCHING_CLASS]);
- }
+ assertErrors(
+ source, [CompileTimeErrorCode.MIXIN_INFERENCE_NO_MATCHING_CLASS]);
}
test_mixinInference_noMatchingClass_noSuperclassConstraint() async {
@@ -4965,78 +4436,42 @@
test_mixinOfDisallowedClass_class_bool() async {
Source source = addSource("class A extends Object with bool {}");
await computeAnalysisResult(source);
- assertErrors(source, [
- useCFE
- ? CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS
- : CompileTimeErrorCode.MIXIN_OF_DISALLOWED_CLASS
- ]);
+ assertErrors(source, [CompileTimeErrorCode.MIXIN_OF_DISALLOWED_CLASS]);
verify([source]);
}
test_mixinOfDisallowedClass_class_double() async {
Source source = addSource("class A extends Object with double {}");
await computeAnalysisResult(source);
- assertErrors(
- source,
- useCFE
- ? [
- CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS,
- StaticWarningCode.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER
- ]
- : [CompileTimeErrorCode.MIXIN_OF_DISALLOWED_CLASS]);
+ assertErrors(source, [CompileTimeErrorCode.MIXIN_OF_DISALLOWED_CLASS]);
verify([source]);
}
test_mixinOfDisallowedClass_class_int() async {
Source source = addSource("class A extends Object with int {}");
await computeAnalysisResult(source);
- assertErrors(
- source,
- useCFE
- ? [
- CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS,
- StaticWarningCode.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER
- ]
- : [CompileTimeErrorCode.MIXIN_OF_DISALLOWED_CLASS]);
+ assertErrors(source, [CompileTimeErrorCode.MIXIN_OF_DISALLOWED_CLASS]);
verify([source]);
}
test_mixinOfDisallowedClass_class_Null() async {
Source source = addSource("class A extends Object with Null {}");
await computeAnalysisResult(source);
- assertErrors(source, [
- useCFE
- ? CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS
- : CompileTimeErrorCode.MIXIN_OF_DISALLOWED_CLASS
- ]);
+ assertErrors(source, [CompileTimeErrorCode.MIXIN_OF_DISALLOWED_CLASS]);
verify([source]);
}
test_mixinOfDisallowedClass_class_num() async {
Source source = addSource("class A extends Object with num {}");
await computeAnalysisResult(source);
- assertErrors(
- source,
- useCFE
- ? [
- CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS,
- StaticWarningCode.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER
- ]
- : [CompileTimeErrorCode.MIXIN_OF_DISALLOWED_CLASS]);
+ assertErrors(source, [CompileTimeErrorCode.MIXIN_OF_DISALLOWED_CLASS]);
verify([source]);
}
test_mixinOfDisallowedClass_class_String() async {
Source source = addSource("class A extends Object with String {}");
await computeAnalysisResult(source);
- assertErrors(
- source,
- useCFE
- ? [
- CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS,
- StaticWarningCode.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER
- ]
- : [CompileTimeErrorCode.MIXIN_OF_DISALLOWED_CLASS]);
+ assertErrors(source, [CompileTimeErrorCode.MIXIN_OF_DISALLOWED_CLASS]);
verify([source]);
}
@@ -5045,11 +4480,7 @@
class A {}
class C = A with bool;''');
await computeAnalysisResult(source);
- assertErrors(source, [
- useCFE
- ? CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS
- : CompileTimeErrorCode.MIXIN_OF_DISALLOWED_CLASS
- ]);
+ assertErrors(source, [CompileTimeErrorCode.MIXIN_OF_DISALLOWED_CLASS]);
verify([source]);
}
@@ -5058,14 +4489,7 @@
class A {}
class C = A with double;''');
await computeAnalysisResult(source);
- assertErrors(
- source,
- useCFE
- ? [
- CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS,
- StaticWarningCode.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER
- ]
- : [CompileTimeErrorCode.MIXIN_OF_DISALLOWED_CLASS]);
+ assertErrors(source, [CompileTimeErrorCode.MIXIN_OF_DISALLOWED_CLASS]);
verify([source]);
}
@@ -5074,14 +4498,7 @@
class A {}
class C = A with int;''');
await computeAnalysisResult(source);
- assertErrors(
- source,
- useCFE
- ? [
- CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS,
- StaticWarningCode.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER
- ]
- : [CompileTimeErrorCode.MIXIN_OF_DISALLOWED_CLASS]);
+ assertErrors(source, [CompileTimeErrorCode.MIXIN_OF_DISALLOWED_CLASS]);
verify([source]);
}
@@ -5090,11 +4507,7 @@
class A {}
class C = A with Null;''');
await computeAnalysisResult(source);
- assertErrors(source, [
- useCFE
- ? CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS
- : CompileTimeErrorCode.MIXIN_OF_DISALLOWED_CLASS
- ]);
+ assertErrors(source, [CompileTimeErrorCode.MIXIN_OF_DISALLOWED_CLASS]);
verify([source]);
}
@@ -5103,14 +4516,7 @@
class A {}
class C = A with num;''');
await computeAnalysisResult(source);
- assertErrors(
- source,
- useCFE
- ? [
- CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS,
- StaticWarningCode.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER
- ]
- : [CompileTimeErrorCode.MIXIN_OF_DISALLOWED_CLASS]);
+ assertErrors(source, [CompileTimeErrorCode.MIXIN_OF_DISALLOWED_CLASS]);
verify([source]);
}
@@ -5119,23 +4525,7 @@
class A {}
class C = A with String;''');
await computeAnalysisResult(source);
- assertErrors(
- source,
- useCFE
- ? [
- CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS,
- StaticWarningCode.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER
- ]
- : [CompileTimeErrorCode.MIXIN_OF_DISALLOWED_CLASS]);
- verify([source]);
- }
-
- test_mixinOfEnum() async {
- Source source = addSource(r'''
-enum E { ONE }
-class A extends Object with E {}''');
- await computeAnalysisResult(source);
- assertErrors(source, [CompileTimeErrorCode.MIXIN_OF_ENUM]);
+ assertErrors(source, [CompileTimeErrorCode.MIXIN_OF_DISALLOWED_CLASS]);
verify([source]);
}
@@ -5159,6 +4549,15 @@
verify([source]);
}
+ test_mixinOfNonClass_enum() async {
+ Source source = addSource(r'''
+enum E { ONE }
+class A extends Object with E {}''');
+ await computeAnalysisResult(source);
+ assertErrors(source, [CompileTimeErrorCode.MIXIN_OF_NON_CLASS]);
+ verify([source]);
+ }
+
test_mixinOfNonClass_typeAlias() async {
Source source = addSource(r'''
class A {}
@@ -5186,12 +4585,8 @@
class B {}
class C extends A with B {}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [CompileTimeErrorCode.UNDEFINED_CLASS]);
- } else {
- assertErrors(
- source, [CompileTimeErrorCode.MIXIN_WITH_NON_CLASS_SUPERCLASS]);
- }
+ assertErrors(
+ source, [CompileTimeErrorCode.MIXIN_WITH_NON_CLASS_SUPERCLASS]);
verify([source]);
}
@@ -5201,12 +4596,8 @@
class B {}
class C = A with B;''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [CompileTimeErrorCode.UNDEFINED_CLASS]);
- } else {
- assertErrors(
- source, [CompileTimeErrorCode.MIXIN_WITH_NON_CLASS_SUPERCLASS]);
- }
+ assertErrors(
+ source, [CompileTimeErrorCode.MIXIN_WITH_NON_CLASS_SUPERCLASS]);
verify([source]);
}
@@ -5295,13 +4686,8 @@
B() {}
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(
- source, [CompileTimeErrorCode.NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT]);
- } else {
- assertErrors(
- source, [CompileTimeErrorCode.NO_DEFAULT_SUPER_CONSTRUCTOR_EXPLICIT]);
- }
+ assertErrors(
+ source, [CompileTimeErrorCode.NO_DEFAULT_SUPER_CONSTRUCTOR_EXPLICIT]);
verify([source]);
}
@@ -5539,15 +4925,8 @@
main() {
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [
- CompileTimeErrorCode.NON_CONSTANT_ANNOTATION_CONSTRUCTOR,
- CompileTimeErrorCode.NOT_CONSTANT_EXPRESSION
- ]);
- } else {
- assertErrors(
- source, [CompileTimeErrorCode.NON_CONSTANT_ANNOTATION_CONSTRUCTOR]);
- }
+ assertErrors(
+ source, [CompileTimeErrorCode.NON_CONSTANT_ANNOTATION_CONSTRUCTOR]);
verify([source]);
}
@@ -5560,15 +4939,8 @@
main() {
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [
- CompileTimeErrorCode.NON_CONSTANT_ANNOTATION_CONSTRUCTOR,
- CompileTimeErrorCode.NOT_CONSTANT_EXPRESSION
- ]);
- } else {
- assertErrors(
- source, [CompileTimeErrorCode.NON_CONSTANT_ANNOTATION_CONSTRUCTOR]);
- }
+ assertErrors(
+ source, [CompileTimeErrorCode.NON_CONSTANT_ANNOTATION_CONSTRUCTOR]);
verify([source]);
}
@@ -5671,24 +5043,16 @@
}
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [
- CompileTimeErrorCode.NON_CONSTANT_CASE_EXPRESSION,
- CompileTimeErrorCode.NOT_CONSTANT_EXPRESSION
- ]);
- } else {
- assertErrors(source, [CompileTimeErrorCode.NON_CONSTANT_CASE_EXPRESSION]);
- }
+ assertErrors(source, [CompileTimeErrorCode.NON_CONSTANT_CASE_EXPRESSION]);
verify([source]);
}
test_nonConstCaseExpressionFromDeferredLibrary() async {
- await resolveWithErrors(
- <String>[
- r'''
+ await resolveWithErrors(<String>[
+ r'''
library lib1;
const int c = 1;''',
- r'''
+ r'''
library root;
import 'lib1.dart' deferred as a;
main (int p) {
@@ -5697,26 +5061,17 @@
break;
}
}'''
- ],
- useCFE
- ? <ErrorCode>[
- CompileTimeErrorCode
- .NON_CONSTANT_CASE_EXPRESSION_FROM_DEFERRED_LIBRARY,
- CompileTimeErrorCode.CONST_DEFERRED_CLASS
- ]
- : <ErrorCode>[
- CompileTimeErrorCode
- .NON_CONSTANT_CASE_EXPRESSION_FROM_DEFERRED_LIBRARY
- ]);
+ ], [
+ CompileTimeErrorCode.NON_CONSTANT_CASE_EXPRESSION_FROM_DEFERRED_LIBRARY
+ ]);
}
test_nonConstCaseExpressionFromDeferredLibrary_nested() async {
- await resolveWithErrors(
- <String>[
- r'''
+ await resolveWithErrors(<String>[
+ r'''
library lib1;
const int c = 1;''',
- r'''
+ r'''
library root;
import 'lib1.dart' deferred as a;
main (int p) {
@@ -5725,17 +5080,9 @@
break;
}
}'''
- ],
- useCFE
- ? <ErrorCode>[
- CompileTimeErrorCode
- .NON_CONSTANT_CASE_EXPRESSION_FROM_DEFERRED_LIBRARY,
- CompileTimeErrorCode.CONST_DEFERRED_CLASS
- ]
- : <ErrorCode>[
- CompileTimeErrorCode
- .NON_CONSTANT_CASE_EXPRESSION_FROM_DEFERRED_LIBRARY
- ]);
+ ], [
+ CompileTimeErrorCode.NON_CONSTANT_CASE_EXPRESSION_FROM_DEFERRED_LIBRARY
+ ]);
}
test_nonConstListElement() async {
@@ -5744,65 +5091,40 @@
return const [a];
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [
- CompileTimeErrorCode.NOT_CONSTANT_EXPRESSION,
- CompileTimeErrorCode.NON_CONSTANT_LIST_ELEMENT
- ]);
- } else {
- assertErrors(source, [CompileTimeErrorCode.NON_CONSTANT_LIST_ELEMENT]);
- }
+ assertErrors(source, [CompileTimeErrorCode.NON_CONSTANT_LIST_ELEMENT]);
verify([source]);
}
test_nonConstListElementFromDeferredLibrary() async {
- await resolveWithErrors(
- <String>[
- r'''
+ await resolveWithErrors(<String>[
+ r'''
library lib1;
const int c = 1;''',
- r'''
+ r'''
library root;
import 'lib1.dart' deferred as a;
f() {
return const [a.c];
}'''
- ],
- useCFE
- ? <ErrorCode>[
- CompileTimeErrorCode.CONST_DEFERRED_CLASS,
- CompileTimeErrorCode
- .NON_CONSTANT_LIST_ELEMENT_FROM_DEFERRED_LIBRARY
- ]
- : <ErrorCode>[
- CompileTimeErrorCode
- .NON_CONSTANT_LIST_ELEMENT_FROM_DEFERRED_LIBRARY
- ]);
+ ], [
+ CompileTimeErrorCode.NON_CONSTANT_LIST_ELEMENT_FROM_DEFERRED_LIBRARY
+ ]);
}
test_nonConstListElementFromDeferredLibrary_nested() async {
- await resolveWithErrors(
- <String>[
- r'''
+ await resolveWithErrors(<String>[
+ r'''
library lib1;
const int c = 1;''',
- r'''
+ r'''
library root;
import 'lib1.dart' deferred as a;
f() {
return const [a.c + 1];
}'''
- ],
- useCFE
- ? <ErrorCode>[
- CompileTimeErrorCode.CONST_DEFERRED_CLASS,
- CompileTimeErrorCode
- .NON_CONSTANT_LIST_ELEMENT_FROM_DEFERRED_LIBRARY
- ]
- : <ErrorCode>[
- CompileTimeErrorCode
- .NON_CONSTANT_LIST_ELEMENT_FROM_DEFERRED_LIBRARY
- ]);
+ ], [
+ CompileTimeErrorCode.NON_CONSTANT_LIST_ELEMENT_FROM_DEFERRED_LIBRARY
+ ]);
}
test_nonConstMapAsExpressionStatement_begin() async {
@@ -5811,47 +5133,27 @@
{'a' : 0, 'b' : 1}.length;
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [
- ParserErrorCode.EXPECTED_TOKEN,
- ParserErrorCode.EXPECTED_TOKEN,
- ParserErrorCode.EXPECTED_TOKEN,
- ParserErrorCode.EXPECTED_TOKEN,
- ParserErrorCode.EXPECTED_TOKEN,
- ParserErrorCode.EXPECTED_TOKEN,
- ParserErrorCode.EXPECTED_TOKEN,
- ParserErrorCode.MISSING_IDENTIFIER,
- ParserErrorCode.MISSING_IDENTIFIER,
- ParserErrorCode.MISSING_IDENTIFIER,
- ParserErrorCode.MISSING_IDENTIFIER,
- ParserErrorCode.UNEXPECTED_TOKEN,
- ParserErrorCode.UNEXPECTED_TOKEN,
- ParserErrorCode.UNEXPECTED_TOKEN,
- StaticTypeWarningCode.UNDEFINED_GETTER,
- StaticTypeWarningCode.UNDEFINED_GETTER,
- StaticTypeWarningCode.UNDEFINED_GETTER,
- StaticTypeWarningCode.UNDEFINED_GETTER,
- ]);
- } else {
- assertErrors(
- source,
- usingFastaParser
- ? [
- // TODO(danrubel): Consider improving recovery
- ParserErrorCode.EXPECTED_TOKEN,
- ParserErrorCode.EXPECTED_TOKEN,
- ParserErrorCode.EXPECTED_TOKEN,
- ParserErrorCode.EXPECTED_TOKEN,
- ParserErrorCode.MISSING_IDENTIFIER,
- ParserErrorCode.MISSING_IDENTIFIER,
- ParserErrorCode.MISSING_IDENTIFIER,
- ParserErrorCode.MISSING_IDENTIFIER,
- ParserErrorCode.UNEXPECTED_TOKEN,
- ParserErrorCode.UNEXPECTED_TOKEN,
- ParserErrorCode.UNEXPECTED_TOKEN,
- ]
- : [CompileTimeErrorCode.NON_CONST_MAP_AS_EXPRESSION_STATEMENT]);
- }
+ assertErrors(
+ source,
+ usingFastaParser
+ ? [
+ // TODO(danrubel): Consider improving recovery
+ ParserErrorCode.EXPECTED_TOKEN,
+ ParserErrorCode.EXPECTED_TOKEN,
+ ParserErrorCode.EXPECTED_TOKEN,
+ ParserErrorCode.EXPECTED_TOKEN,
+ ParserErrorCode.EXPECTED_TOKEN,
+ ParserErrorCode.EXPECTED_TOKEN,
+ ParserErrorCode.EXPECTED_TOKEN,
+ ParserErrorCode.MISSING_IDENTIFIER,
+ ParserErrorCode.MISSING_IDENTIFIER,
+ ParserErrorCode.MISSING_IDENTIFIER,
+ ParserErrorCode.MISSING_IDENTIFIER,
+ ParserErrorCode.UNEXPECTED_TOKEN,
+ ParserErrorCode.UNEXPECTED_TOKEN,
+ ParserErrorCode.UNEXPECTED_TOKEN,
+ ]
+ : [CompileTimeErrorCode.NON_CONST_MAP_AS_EXPRESSION_STATEMENT]);
verify([source]);
}
@@ -5861,43 +5163,25 @@
{'a' : 0, 'b' : 1};
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [
- ParserErrorCode.EXPECTED_TOKEN,
- ParserErrorCode.EXPECTED_TOKEN,
- ParserErrorCode.EXPECTED_TOKEN,
- ParserErrorCode.EXPECTED_TOKEN,
- ParserErrorCode.EXPECTED_TOKEN,
- ParserErrorCode.EXPECTED_TOKEN,
- ParserErrorCode.EXPECTED_TOKEN,
- ParserErrorCode.MISSING_IDENTIFIER,
- ParserErrorCode.MISSING_IDENTIFIER,
- ParserErrorCode.MISSING_IDENTIFIER,
- ParserErrorCode.UNEXPECTED_TOKEN,
- ParserErrorCode.UNEXPECTED_TOKEN,
- ParserErrorCode.UNEXPECTED_TOKEN,
- StaticTypeWarningCode.UNDEFINED_GETTER,
- StaticTypeWarningCode.UNDEFINED_GETTER,
- StaticTypeWarningCode.UNDEFINED_GETTER
- ]);
- } else {
- assertErrors(
- source,
- usingFastaParser
- ? [
- ParserErrorCode.EXPECTED_TOKEN,
- ParserErrorCode.EXPECTED_TOKEN,
- ParserErrorCode.EXPECTED_TOKEN,
- ParserErrorCode.EXPECTED_TOKEN,
- ParserErrorCode.MISSING_IDENTIFIER,
- ParserErrorCode.MISSING_IDENTIFIER,
- ParserErrorCode.MISSING_IDENTIFIER,
- ParserErrorCode.UNEXPECTED_TOKEN,
- ParserErrorCode.UNEXPECTED_TOKEN,
- ParserErrorCode.UNEXPECTED_TOKEN,
- ]
- : [CompileTimeErrorCode.NON_CONST_MAP_AS_EXPRESSION_STATEMENT]);
- }
+ assertErrors(
+ source,
+ usingFastaParser
+ ? [
+ ParserErrorCode.EXPECTED_TOKEN,
+ ParserErrorCode.EXPECTED_TOKEN,
+ ParserErrorCode.EXPECTED_TOKEN,
+ ParserErrorCode.EXPECTED_TOKEN,
+ ParserErrorCode.EXPECTED_TOKEN,
+ ParserErrorCode.EXPECTED_TOKEN,
+ ParserErrorCode.EXPECTED_TOKEN,
+ ParserErrorCode.MISSING_IDENTIFIER,
+ ParserErrorCode.MISSING_IDENTIFIER,
+ ParserErrorCode.MISSING_IDENTIFIER,
+ ParserErrorCode.UNEXPECTED_TOKEN,
+ ParserErrorCode.UNEXPECTED_TOKEN,
+ ParserErrorCode.UNEXPECTED_TOKEN,
+ ]
+ : [CompileTimeErrorCode.NON_CONST_MAP_AS_EXPRESSION_STATEMENT]);
verify([source]);
}
@@ -5907,61 +5191,40 @@
return const {a : 0};
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [
- CompileTimeErrorCode.NOT_CONSTANT_EXPRESSION,
- CompileTimeErrorCode.NON_CONSTANT_MAP_KEY
- ]);
- } else {
- assertErrors(source, [CompileTimeErrorCode.NON_CONSTANT_MAP_KEY]);
- }
+ assertErrors(source, [CompileTimeErrorCode.NON_CONSTANT_MAP_KEY]);
verify([source]);
}
test_nonConstMapKeyFromDeferredLibrary() async {
- await resolveWithErrors(
- <String>[
- r'''
+ await resolveWithErrors(<String>[
+ r'''
library lib1;
const int c = 1;''',
- r'''
+ r'''
library root;
import 'lib1.dart' deferred as a;
f() {
return const {a.c : 0};
}'''
- ],
- useCFE
- ? <ErrorCode>[
- CompileTimeErrorCode.CONST_DEFERRED_CLASS,
- CompileTimeErrorCode.NON_CONSTANT_MAP_KEY_FROM_DEFERRED_LIBRARY
- ]
- : <ErrorCode>[
- CompileTimeErrorCode.NON_CONSTANT_MAP_KEY_FROM_DEFERRED_LIBRARY
- ]);
+ ], [
+ CompileTimeErrorCode.NON_CONSTANT_MAP_KEY_FROM_DEFERRED_LIBRARY
+ ]);
}
test_nonConstMapKeyFromDeferredLibrary_nested() async {
- await resolveWithErrors(
- <String>[
- r'''
+ await resolveWithErrors(<String>[
+ r'''
library lib1;
const int c = 1;''',
- r'''
+ r'''
library root;
import 'lib1.dart' deferred as a;
f() {
return const {a.c + 1 : 0};
}'''
- ],
- useCFE
- ? <ErrorCode>[
- CompileTimeErrorCode.CONST_DEFERRED_CLASS,
- CompileTimeErrorCode.NON_CONSTANT_MAP_KEY_FROM_DEFERRED_LIBRARY
- ]
- : <ErrorCode>[
- CompileTimeErrorCode.NON_CONSTANT_MAP_KEY_FROM_DEFERRED_LIBRARY
- ]);
+ ], [
+ CompileTimeErrorCode.NON_CONSTANT_MAP_KEY_FROM_DEFERRED_LIBRARY
+ ]);
}
test_nonConstMapValue() async {
@@ -5970,65 +5233,40 @@
return const {'a' : a};
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [
- CompileTimeErrorCode.NOT_CONSTANT_EXPRESSION,
- CompileTimeErrorCode.NON_CONSTANT_MAP_VALUE
- ]);
- } else {
- assertErrors(source, [CompileTimeErrorCode.NON_CONSTANT_MAP_VALUE]);
- }
+ assertErrors(source, [CompileTimeErrorCode.NON_CONSTANT_MAP_VALUE]);
verify([source]);
}
test_nonConstMapValueFromDeferredLibrary() async {
- await resolveWithErrors(
- <String>[
- r'''
+ await resolveWithErrors(<String>[
+ r'''
library lib1;
const int c = 1;''',
- r'''
+ r'''
library root;
import 'lib1.dart' deferred as a;
f() {
return const {'a' : a.c};
}'''
- ],
- useCFE
- ? <ErrorCode>[
- CompileTimeErrorCode.CONST_DEFERRED_CLASS,
- CompileTimeErrorCode
- .NON_CONSTANT_MAP_VALUE_FROM_DEFERRED_LIBRARY
- ]
- : <ErrorCode>[
- CompileTimeErrorCode
- .NON_CONSTANT_MAP_VALUE_FROM_DEFERRED_LIBRARY
- ]);
+ ], [
+ CompileTimeErrorCode.NON_CONSTANT_MAP_VALUE_FROM_DEFERRED_LIBRARY
+ ]);
}
test_nonConstMapValueFromDeferredLibrary_nested() async {
- await resolveWithErrors(
- <String>[
- r'''
+ await resolveWithErrors(<String>[
+ r'''
library lib1;
const int c = 1;''',
- r'''
+ r'''
library root;
import 'lib1.dart' deferred as a;
f() {
return const {'a' : a.c + 1};
}'''
- ],
- useCFE
- ? <ErrorCode>[
- CompileTimeErrorCode.CONST_DEFERRED_CLASS,
- CompileTimeErrorCode
- .NON_CONSTANT_MAP_VALUE_FROM_DEFERRED_LIBRARY
- ]
- : <ErrorCode>[
- CompileTimeErrorCode
- .NON_CONSTANT_MAP_VALUE_FROM_DEFERRED_LIBRARY
- ]);
+ ], [
+ CompileTimeErrorCode.NON_CONSTANT_MAP_VALUE_FROM_DEFERRED_LIBRARY
+ ]);
}
test_nonConstValueInInitializer_assert_condition() async {
@@ -6037,15 +5275,8 @@
const A(int i) : assert(i.isNegative);
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [
- CompileTimeErrorCode.NOT_CONSTANT_EXPRESSION,
- CompileTimeErrorCode.NON_CONSTANT_VALUE_IN_INITIALIZER
- ]);
- } else {
- assertErrors(
- source, [CompileTimeErrorCode.NON_CONSTANT_VALUE_IN_INITIALIZER]);
- }
+ assertErrors(
+ source, [CompileTimeErrorCode.NON_CONSTANT_VALUE_IN_INITIALIZER]);
verify([source]);
}
@@ -6055,15 +5286,8 @@
const A(int i) : assert(i < 0, 'isNegative = ${i.isNegative}');
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [
- CompileTimeErrorCode.NOT_CONSTANT_EXPRESSION,
- CompileTimeErrorCode.NON_CONSTANT_VALUE_IN_INITIALIZER
- ]);
- } else {
- assertErrors(
- source, [CompileTimeErrorCode.NON_CONSTANT_VALUE_IN_INITIALIZER]);
- }
+ assertErrors(
+ source, [CompileTimeErrorCode.NON_CONSTANT_VALUE_IN_INITIALIZER]);
verify([source]);
}
@@ -6074,17 +5298,10 @@
const A(String p) : a = p && true;
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [
- CompileTimeErrorCode.CONST_EVAL_TYPE_BOOL,
- StaticTypeWarningCode.INVALID_ASSIGNMENT
- ]);
- } else {
- assertErrors(source, [
- CompileTimeErrorCode.CONST_EVAL_TYPE_BOOL,
- StaticTypeWarningCode.NON_BOOL_OPERAND
- ]);
- }
+ assertErrors(source, [
+ CompileTimeErrorCode.CONST_EVAL_TYPE_BOOL,
+ StaticTypeWarningCode.NON_BOOL_OPERAND
+ ]);
verify([source]);
}
@@ -6095,17 +5312,10 @@
const A(String p) : a = true && p;
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [
- CompileTimeErrorCode.CONST_EVAL_TYPE_BOOL,
- StaticTypeWarningCode.INVALID_ASSIGNMENT
- ]);
- } else {
- assertErrors(source, [
- CompileTimeErrorCode.CONST_EVAL_TYPE_BOOL,
- StaticTypeWarningCode.NON_BOOL_OPERAND
- ]);
- }
+ assertErrors(source, [
+ CompileTimeErrorCode.CONST_EVAL_TYPE_BOOL,
+ StaticTypeWarningCode.NON_BOOL_OPERAND
+ ]);
verify([source]);
}
@@ -6145,15 +5355,8 @@
const A() : a = C;
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [
- CompileTimeErrorCode.NOT_CONSTANT_EXPRESSION,
- CompileTimeErrorCode.NON_CONSTANT_VALUE_IN_INITIALIZER
- ]);
- } else {
- assertErrors(
- source, [CompileTimeErrorCode.NON_CONSTANT_VALUE_IN_INITIALIZER]);
- }
+ assertErrors(
+ source, [CompileTimeErrorCode.NON_CONSTANT_VALUE_IN_INITIALIZER]);
verify([source]);
}
@@ -6170,18 +5373,10 @@
// TODO(scheglov): the error CONST_EVAL_THROWS_EXCEPTION is redundant and
// ought to be suppressed. Or not?
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [
- CompileTimeErrorCode.NOT_CONSTANT_EXPRESSION,
- CompileTimeErrorCode.NON_CONSTANT_VALUE_IN_INITIALIZER,
- CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION
- ]);
- } else {
- assertErrors(source, [
- CompileTimeErrorCode.NON_CONSTANT_VALUE_IN_INITIALIZER,
- CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION
- ]);
- }
+ assertErrors(source, [
+ CompileTimeErrorCode.NON_CONSTANT_VALUE_IN_INITIALIZER,
+ CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION
+ ]);
verify([source]);
}
@@ -6198,18 +5393,10 @@
await computeAnalysisResult(sourceA);
assertNoErrors(sourceA);
await computeAnalysisResult(sourceB);
- if (useCFE) {
- assertErrors(sourceB, [
- CompileTimeErrorCode.NON_CONSTANT_DEFAULT_VALUE,
- StaticTypeWarningCode.UNDEFINED_GETTER,
- StaticTypeWarningCode.UNDEFINED_GETTER
- ]);
- } else {
- assertErrors(sourceB, [
- CompileTimeErrorCode.NON_CONSTANT_DEFAULT_VALUE,
- StaticWarningCode.UNDEFINED_IDENTIFIER
- ]);
- }
+ assertErrors(sourceB, [
+ CompileTimeErrorCode.NON_CONSTANT_DEFAULT_VALUE,
+ StaticWarningCode.UNDEFINED_IDENTIFIER
+ ]);
}
test_nonConstValueInInitializer_redirecting() async {
@@ -6220,15 +5407,8 @@
const A() : this.named(C);
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [
- CompileTimeErrorCode.NOT_CONSTANT_EXPRESSION,
- CompileTimeErrorCode.NON_CONSTANT_VALUE_IN_INITIALIZER
- ]);
- } else {
- assertErrors(
- source, [CompileTimeErrorCode.NON_CONSTANT_VALUE_IN_INITIALIZER]);
- }
+ assertErrors(
+ source, [CompileTimeErrorCode.NON_CONSTANT_VALUE_IN_INITIALIZER]);
verify([source]);
}
@@ -6242,15 +5422,8 @@
const B() : super(C);
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [
- CompileTimeErrorCode.NOT_CONSTANT_EXPRESSION,
- CompileTimeErrorCode.NON_CONSTANT_VALUE_IN_INITIALIZER
- ]);
- } else {
- assertErrors(
- source, [CompileTimeErrorCode.NON_CONSTANT_VALUE_IN_INITIALIZER]);
- }
+ assertErrors(
+ source, [CompileTimeErrorCode.NON_CONSTANT_VALUE_IN_INITIALIZER]);
verify([source]);
}
@@ -6337,11 +5510,7 @@
B() : super.named();
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [StaticTypeWarningCode.UNDEFINED_SUPER_METHOD]);
- } else {
- assertErrors(source, [CompileTimeErrorCode.NON_GENERATIVE_CONSTRUCTOR]);
- }
+ assertErrors(source, [CompileTimeErrorCode.NON_GENERATIVE_CONSTRUCTOR]);
verify([source]);
}
@@ -6354,12 +5523,7 @@
B();
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(
- source, [CompileTimeErrorCode.NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT]);
- } else {
- assertErrors(source, [CompileTimeErrorCode.NON_GENERATIVE_CONSTRUCTOR]);
- }
+ assertErrors(source, [CompileTimeErrorCode.NON_GENERATIVE_CONSTRUCTOR]);
verify([source]);
}
@@ -6371,12 +5535,7 @@
class B extends A {
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(
- source, [CompileTimeErrorCode.NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT]);
- } else {
- assertErrors(source, [CompileTimeErrorCode.NON_GENERATIVE_CONSTRUCTOR]);
- }
+ assertErrors(source, [CompileTimeErrorCode.NON_GENERATIVE_CONSTRUCTOR]);
verify([source]);
}
@@ -6845,14 +6004,7 @@
const x = y + 1;
const y = x + 1;''');
await computeAnalysisResult(source);
- if (enableKernelDriver) {
- assertErrors(source, [
- CompileTimeErrorCode.RECURSIVE_COMPILE_TIME_CONSTANT,
- CompileTimeErrorCode.RECURSIVE_COMPILE_TIME_CONSTANT,
- CompileTimeErrorCode.RECURSIVE_COMPILE_TIME_CONSTANT,
- CompileTimeErrorCode.RECURSIVE_COMPILE_TIME_CONSTANT
- ]);
- } else if (!enableNewAnalysisDriver) {
+ if (!enableNewAnalysisDriver) {
assertErrors(source, [
CompileTimeErrorCode.RECURSIVE_COMPILE_TIME_CONSTANT,
CompileTimeErrorCode.RECURSIVE_COMPILE_TIME_CONSTANT,
@@ -6887,12 +6039,7 @@
const x = x;
''');
await computeAnalysisResult(source);
- if (enableKernelDriver) {
- assertErrors(source, [
- CompileTimeErrorCode.RECURSIVE_COMPILE_TIME_CONSTANT,
- CompileTimeErrorCode.RECURSIVE_COMPILE_TIME_CONSTANT,
- ]);
- } else if (!enableNewAnalysisDriver) {
+ if (!enableNewAnalysisDriver) {
assertErrors(source, [
CompileTimeErrorCode.RECURSIVE_COMPILE_TIME_CONSTANT,
]);
@@ -6912,15 +6059,10 @@
A.b() : this.a();
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(
- source, [CompileTimeErrorCode.RECURSIVE_CONSTRUCTOR_REDIRECT]);
- } else {
- assertErrors(source, [
- CompileTimeErrorCode.RECURSIVE_CONSTRUCTOR_REDIRECT,
- CompileTimeErrorCode.RECURSIVE_CONSTRUCTOR_REDIRECT
- ]);
- }
+ assertErrors(source, [
+ CompileTimeErrorCode.RECURSIVE_CONSTRUCTOR_REDIRECT,
+ CompileTimeErrorCode.RECURSIVE_CONSTRUCTOR_REDIRECT
+ ]);
verify([source]);
}
@@ -7161,14 +6303,9 @@
test_recursiveInterfaceInheritanceBaseCaseExtends() async {
Source source = addSource("class A extends A {}");
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(
- source, [CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE]);
- } else {
- assertErrors(source, [
- CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_EXTENDS
- ]);
- }
+ assertErrors(source, [
+ CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_EXTENDS
+ ]);
verify([source]);
}
@@ -7180,18 +6317,11 @@
}
''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [
- CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE,
- StaticWarningCode.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER
- ]);
- } else {
- assertErrors(source, [
- CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_EXTENDS,
- StaticWarningCode.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER,
- StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE
- ]);
- }
+ assertErrors(source, [
+ CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_EXTENDS,
+ StaticWarningCode.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER,
+ StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE
+ ]);
verify([source]);
}
@@ -7270,13 +6400,7 @@
}''');
await computeAnalysisResult(source);
assertErrors(
- source,
- useCFE
- ? [
- CompileTimeErrorCode.CONSTRUCTOR_NOT_FOUND,
- CompileTimeErrorCode.REDIRECT_TO_MISSING_CONSTRUCTOR
- ]
- : [CompileTimeErrorCode.REDIRECT_TO_MISSING_CONSTRUCTOR]);
+ source, [CompileTimeErrorCode.REDIRECT_TO_MISSING_CONSTRUCTOR]);
}
test_redirectToNonClass_notAType() async {
@@ -7441,7 +6565,7 @@
await computeAnalysisResult(source);
assertErrors(
source,
- usingFastaParser && !useCFE
+ usingFastaParser
? [
CompileTimeErrorCode.RETURN_IN_GENERATOR,
CompileTimeErrorCode.RETURN_IN_GENERATOR
@@ -7458,7 +6582,7 @@
await computeAnalysisResult(source);
assertErrors(
source,
- usingFastaParser && !useCFE
+ usingFastaParser
? [
CompileTimeErrorCode.RETURN_IN_GENERATOR,
CompileTimeErrorCode.RETURN_IN_GENERATOR
@@ -7488,11 +6612,7 @@
test_superInInvalidContext_binaryExpression() async {
Source source = addSource("var v = super + 0;");
await computeAnalysisResult(source);
- assertErrors(
- source,
- useCFE
- ? [CompileTimeErrorCode.SUPER_AS_EXPRESSION]
- : [CompileTimeErrorCode.SUPER_IN_INVALID_CONTEXT]);
+ assertErrors(source, [CompileTimeErrorCode.SUPER_IN_INVALID_CONTEXT]);
// no verify(), 'super.v' is not resolved
}
@@ -7522,11 +6642,7 @@
}
}''');
await computeAnalysisResult(source);
- assertErrors(
- source,
- useCFE
- ? [CompileTimeErrorCode.SUPER_AS_EXPRESSION]
- : [CompileTimeErrorCode.SUPER_IN_INVALID_CONTEXT]);
+ assertErrors(source, [CompileTimeErrorCode.SUPER_IN_INVALID_CONTEXT]);
// no verify(), 'super.m' is not resolved
}
@@ -7552,11 +6668,7 @@
static n() { return super.m(); }
}''');
await computeAnalysisResult(source);
- assertErrors(
- source,
- useCFE
- ? [CompileTimeErrorCode.SUPER_AS_EXPRESSION]
- : [CompileTimeErrorCode.SUPER_IN_INVALID_CONTEXT]);
+ assertErrors(source, [CompileTimeErrorCode.SUPER_IN_INVALID_CONTEXT]);
// no verify(), 'super.m' is not resolved
}
@@ -7569,11 +6681,7 @@
static int b = super.a;
}''');
await computeAnalysisResult(source);
- assertErrors(
- source,
- useCFE
- ? [CompileTimeErrorCode.SUPER_AS_EXPRESSION]
- : [CompileTimeErrorCode.SUPER_IN_INVALID_CONTEXT]);
+ assertErrors(source, [CompileTimeErrorCode.SUPER_IN_INVALID_CONTEXT]);
// no verify(), 'super.a' is not resolved
}
@@ -7583,22 +6691,14 @@
super.f();
}''');
await computeAnalysisResult(source);
- assertErrors(
- source,
- useCFE
- ? [CompileTimeErrorCode.SUPER_AS_EXPRESSION]
- : [CompileTimeErrorCode.SUPER_IN_INVALID_CONTEXT]);
+ assertErrors(source, [CompileTimeErrorCode.SUPER_IN_INVALID_CONTEXT]);
// no verify(), 'super.f' is not resolved
}
test_superInInvalidContext_topLevelVariableInitializer() async {
Source source = addSource("var v = super.y;");
await computeAnalysisResult(source);
- assertErrors(
- source,
- useCFE
- ? [CompileTimeErrorCode.SUPER_AS_EXPRESSION]
- : [CompileTimeErrorCode.SUPER_IN_INVALID_CONTEXT]);
+ assertErrors(source, [CompileTimeErrorCode.SUPER_IN_INVALID_CONTEXT]);
// no verify(), 'super.y' is not resolved
}
@@ -7682,15 +6782,10 @@
F foo(G g) => g;
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(
- source, [CompileTimeErrorCode.TYPE_ALIAS_CANNOT_REFERENCE_ITSELF]);
- } else {
- assertErrors(source, [
- CompileTimeErrorCode.TYPE_ALIAS_CANNOT_REFERENCE_ITSELF,
- CompileTimeErrorCode.TYPE_ALIAS_CANNOT_REFERENCE_ITSELF
- ]);
- }
+ assertErrors(source, [
+ CompileTimeErrorCode.TYPE_ALIAS_CANNOT_REFERENCE_ITSELF,
+ CompileTimeErrorCode.TYPE_ALIAS_CANNOT_REFERENCE_ITSELF
+ ]);
verify([source]);
}
@@ -7727,15 +6822,10 @@
}
''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(
- source, [CompileTimeErrorCode.TYPE_ALIAS_CANNOT_REFERENCE_ITSELF]);
- } else {
- assertErrors(source, [
- CompileTimeErrorCode.TYPE_ALIAS_CANNOT_REFERENCE_ITSELF,
- CompileTimeErrorCode.TYPE_ALIAS_CANNOT_REFERENCE_ITSELF
- ]);
- }
+ assertErrors(source, [
+ CompileTimeErrorCode.TYPE_ALIAS_CANNOT_REFERENCE_ITSELF,
+ CompileTimeErrorCode.TYPE_ALIAS_CANNOT_REFERENCE_ITSELF
+ ]);
verify([source]);
}
@@ -7797,15 +6887,10 @@
typedef B A();
typedef A B();''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(
- source, [CompileTimeErrorCode.TYPE_ALIAS_CANNOT_REFERENCE_ITSELF]);
- } else {
- assertErrors(source, [
- CompileTimeErrorCode.TYPE_ALIAS_CANNOT_REFERENCE_ITSELF,
- CompileTimeErrorCode.TYPE_ALIAS_CANNOT_REFERENCE_ITSELF
- ]);
- }
+ assertErrors(source, [
+ CompileTimeErrorCode.TYPE_ALIAS_CANNOT_REFERENCE_ITSELF,
+ CompileTimeErrorCode.TYPE_ALIAS_CANNOT_REFERENCE_ITSELF
+ ]);
verify([source]);
}
@@ -7875,11 +6960,7 @@
return const A();
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [StaticTypeWarningCode.UNDEFINED_METHOD]);
- } else {
- assertErrors(source, [CompileTimeErrorCode.UNDEFINED_CLASS]);
- }
+ assertErrors(source, [CompileTimeErrorCode.UNDEFINED_CLASS]);
verify([source]);
}
@@ -7890,12 +6971,8 @@
B() : super.named();
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [StaticTypeWarningCode.UNDEFINED_SUPER_METHOD]);
- } else {
- assertErrors(
- source, [CompileTimeErrorCode.UNDEFINED_CONSTRUCTOR_IN_INITIALIZER]);
- }
+ assertErrors(
+ source, [CompileTimeErrorCode.UNDEFINED_CONSTRUCTOR_IN_INITIALIZER]);
// no verify(), "super.named()" is not resolved
}
@@ -7908,12 +6985,8 @@
B() : super();
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [StaticTypeWarningCode.UNDEFINED_SUPER_METHOD]);
- } else {
- assertErrors(source,
- [CompileTimeErrorCode.UNDEFINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT]);
- }
+ assertErrors(source,
+ [CompileTimeErrorCode.UNDEFINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT]);
verify([source]);
}
@@ -7926,13 +6999,8 @@
B();
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(
- source, [CompileTimeErrorCode.NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT]);
- } else {
- assertErrors(source,
- [CompileTimeErrorCode.UNDEFINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT]);
- }
+ assertErrors(source,
+ [CompileTimeErrorCode.UNDEFINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT]);
verify([source]);
}
@@ -8018,17 +7086,10 @@
test_uriWithInterpolation_constant() async {
Source source = addSource("import 'stuff_\$platform.dart';");
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [
- CompileTimeErrorCode.URI_WITH_INTERPOLATION,
- ParserErrorCode.INVALID_LITERAL_IN_CONFIGURATION
- ]);
- } else {
- assertErrors(source, [
- CompileTimeErrorCode.URI_WITH_INTERPOLATION,
- StaticWarningCode.UNDEFINED_IDENTIFIER
- ]);
- }
+ assertErrors(source, [
+ CompileTimeErrorCode.URI_WITH_INTERPOLATION,
+ StaticWarningCode.UNDEFINED_IDENTIFIER
+ ]);
// We cannot verify resolution with an unresolvable
// URI: 'stuff_$platform.dart'
}
@@ -8238,36 +7299,27 @@
}
Future<Null> _check_constEvalThrowsException_binary_null(
- String expr, bool resolved,
- {List<ErrorCode> cfeErrors}) async {
+ String expr, bool resolved) async {
Source source = addSource("const C = $expr;");
await computeAnalysisResult(source);
- if (useCFE && cfeErrors != null) {
- assertErrors(source, cfeErrors);
- } else {
- assertErrors(source, [CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION]);
- }
+ assertErrors(source, [CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION]);
if (resolved) {
verify([source]);
}
}
- Future<Null> _check_constEvalTypeBool_withParameter_binary(String expr,
- {List<ErrorCode> cfeErrors}) async {
+ Future<Null> _check_constEvalTypeBool_withParameter_binary(
+ String expr) async {
Source source = addSource('''
class A {
final a;
const A(bool p) : a = $expr;
}''');
await computeAnalysisResult(source);
- if (useCFE && cfeErrors != null) {
- assertErrors(source, cfeErrors);
- } else {
- assertErrors(source, [
- CompileTimeErrorCode.CONST_EVAL_TYPE_BOOL,
- StaticTypeWarningCode.NON_BOOL_OPERAND
- ]);
- }
+ assertErrors(source, [
+ CompileTimeErrorCode.CONST_EVAL_TYPE_BOOL,
+ StaticTypeWarningCode.NON_BOOL_OPERAND
+ ]);
verify([source]);
}
diff --git a/pkg/analyzer/test/generated/error_suppression_kernel_test.dart b/pkg/analyzer/test/generated/error_suppression_kernel_test.dart
deleted file mode 100644
index a5ef305..0000000
--- a/pkg/analyzer/test/generated/error_suppression_kernel_test.dart
+++ /dev/null
@@ -1,25 +0,0 @@
-// 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:test_reflective_loader/test_reflective_loader.dart';
-
-import 'error_suppression_driver_test.dart';
-
-main() {
- defineReflectiveSuite(() {
- defineReflectiveTests(ErrorSuppressionTest_Kernel);
- });
-}
-
-@reflectiveTest
-class ErrorSuppressionTest_Kernel extends ErrorSuppressionTest_Driver {
- @override
- bool get enableKernelDriver => true;
-
- @override
- bool get useCFE => true;
-
- @override
- bool get usingFastaParser => true;
-}
diff --git a/pkg/analyzer/test/generated/error_suppression_test.dart b/pkg/analyzer/test/generated/error_suppression_test.dart
index 0b7f92c..0e5d6106 100644
--- a/pkg/analyzer/test/generated/error_suppression_test.dart
+++ b/pkg/analyzer/test/generated/error_suppression_test.dart
@@ -18,29 +18,16 @@
@reflectiveTest
class ErrorSuppressionTest extends ResolverTestCase {
- String get ignoredCode => useCFE
- ? 'not_constant_expression, const_initialized_with_non_constant_value'
- : 'const_initialized_with_non_constant_value';
+ String get ignoredCode => 'const_initialized_with_non_constant_value';
- List<ErrorCode> get reportedCodes => useCFE
- ? [
- CompileTimeErrorCode.NOT_CONSTANT_EXPRESSION,
- CompileTimeErrorCode.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE,
- ]
- : [
- CompileTimeErrorCode.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE,
- ];
+ List<ErrorCode> get reportedCodes => [
+ CompileTimeErrorCode.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE,
+ ];
- List<ErrorCode> get reportedCodesWithAssignment => useCFE
- ? [
- StaticTypeWarningCode.INVALID_ASSIGNMENT,
- CompileTimeErrorCode.NOT_CONSTANT_EXPRESSION,
- CompileTimeErrorCode.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE,
- ]
- : [
- StaticTypeWarningCode.INVALID_ASSIGNMENT,
- CompileTimeErrorCode.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE,
- ];
+ List<ErrorCode> get reportedCodesWithAssignment => [
+ StaticTypeWarningCode.INVALID_ASSIGNMENT,
+ CompileTimeErrorCode.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE,
+ ];
test_error_code_mismatch() async {
Source source = addSource('''
diff --git a/pkg/analyzer/test/generated/hint_code_kernel_test.dart b/pkg/analyzer/test/generated/hint_code_kernel_test.dart
deleted file mode 100644
index 073e8c5..0000000
--- a/pkg/analyzer/test/generated/hint_code_kernel_test.dart
+++ /dev/null
@@ -1,182 +0,0 @@
-// 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:test_reflective_loader/test_reflective_loader.dart';
-
-import 'hint_code_driver_test.dart';
-
-main() {
- defineReflectiveSuite(() {
- defineReflectiveTests(HintCodeTest_Kernel);
- });
-}
-
-@reflectiveTest
-class HintCodeTest_Kernel extends HintCodeTest_Driver {
- @override
- bool get enableKernelDriver => true;
-
- @override
- bool get useCFE => true;
-
- @override
- bool get usingFastaParser => true;
-
- @failingTest
- @override
- test_abstractSuperMemberReference_getter() async {
- return super.test_abstractSuperMemberReference_getter();
- }
-
- @failingTest
- @override
- test_abstractSuperMemberReference_method_invocation() async {
- return super.test_abstractSuperMemberReference_method_invocation();
- }
-
- @failingTest
- @override
- test_abstractSuperMemberReference_method_reference() async {
- return super.test_abstractSuperMemberReference_method_reference();
- }
-
- @failingTest
- @override
- test_abstractSuperMemberReference_superHasNoSuchMethod() async {
- return super.test_abstractSuperMemberReference_superHasNoSuchMethod();
- }
-
- @failingTest
- @override
- test_deprecatedAnnotationUse_call() async {
- return super.test_deprecatedAnnotationUse_call();
- }
-
- @failingTest
- @override
- test_deprecatedFunction_class() async {
- return super.test_deprecatedFunction_class();
- }
-
- @failingTest
- @override
- test_deprecatedFunction_extends() async {
- return super.test_deprecatedFunction_extends();
- }
-
- @failingTest
- @override
- test_deprecatedFunction_extends2() async {
- return super.test_deprecatedFunction_extends2();
- }
-
- @failingTest
- @override
- test_deprecatedFunction_mixin() async {
- return super.test_deprecatedFunction_mixin();
- }
-
- @failingTest
- @override
- test_deprecatedFunction_mixin2() async {
- return super.test_deprecatedFunction_mixin2();
- }
-
- @override
- @failingTest
- test_invalidRequiredParam_on_named_parameter_with_default() async {
- return super.test_invalidRequiredParam_on_named_parameter_with_default();
- }
-
- @failingTest
- @override
- test_missingJsLibAnnotation_class() async {
- return super.test_missingJsLibAnnotation_class();
- }
-
- @failingTest
- @override
- test_missingJsLibAnnotation_externalField() async {
- return super.test_missingJsLibAnnotation_externalField();
- }
-
- @failingTest
- @override
- test_missingJsLibAnnotation_function() async {
- return super.test_missingJsLibAnnotation_function();
- }
-
- @failingTest
- @override
- test_missingJsLibAnnotation_method() async {
- return super.test_missingJsLibAnnotation_method();
- }
-
- @failingTest
- @override
- test_missingJsLibAnnotation_variable() async {
- return super.test_missingJsLibAnnotation_variable();
- }
-
- @failingTest
- @override
- test_mustCallSuper() async {
- return super.test_mustCallSuper();
- }
-
- @failingTest
- @override
- test_mustCallSuper_indirect() async {
- return super.test_mustCallSuper_indirect();
- }
-
- @override
- @failingTest
- test_required_function_param() async {
- return super.test_required_function_param();
- }
-
- @override
- @failingTest
- test_required_method_param() async {
- return super.test_required_method_param();
- }
-
- @override
- @failingTest
- test_required_method_param_in_other_lib() async {
- return super.test_required_method_param_in_other_lib();
- }
-
- @override
- @failingTest
- test_required_typedef_function_param() async {
- return super.test_required_typedef_function_param();
- }
-
- @failingTest
- @override
- // Failing due to https://github.com/dart-lang/sdk/issues/34249
- test_invalidSealedAnnotation_onMixinApplication() async {
- return super.test_invalidSealedAnnotation_onMixinApplication();
- }
-
- @failingTest
- @override
- test_strongMode_downCastCompositeHint() async {
- return super.test_strongMode_downCastCompositeHint();
- }
-
- @failingTest
- @override
- test_strongMode_downCastCompositeWarn() async {
- return super.test_strongMode_downCastCompositeWarn();
- }
-
- @failingTest
- @override
- test_unusedImport_inComment_libraryDirective() async {
- return super.test_unusedImport_inComment_libraryDirective();
- }
-}
diff --git a/pkg/analyzer/test/generated/hint_code_test.dart b/pkg/analyzer/test/generated/hint_code_test.dart
index 36f7faa..d0ab205 100644
--- a/pkg/analyzer/test/generated/hint_code_test.dart
+++ b/pkg/analyzer/test/generated/hint_code_test.dart
@@ -109,14 +109,7 @@
}
''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [
- StaticTypeWarningCode.UNDEFINED_SUPER_GETTER,
- HintCode.ABSTRACT_SUPER_MEMBER_REFERENCE
- ]);
- } else {
- assertErrors(source, [HintCode.ABSTRACT_SUPER_MEMBER_REFERENCE]);
- }
+ assertErrors(source, [HintCode.ABSTRACT_SUPER_MEMBER_REFERENCE]);
verify([source]);
}
@@ -132,14 +125,7 @@
}
''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [
- StaticTypeWarningCode.UNDEFINED_SUPER_METHOD,
- HintCode.ABSTRACT_SUPER_MEMBER_REFERENCE
- ]);
- } else {
- assertErrors(source, [HintCode.ABSTRACT_SUPER_MEMBER_REFERENCE]);
- }
+ assertErrors(source, [HintCode.ABSTRACT_SUPER_MEMBER_REFERENCE]);
verify([source]);
}
@@ -155,14 +141,7 @@
}
''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [
- StaticTypeWarningCode.UNDEFINED_SUPER_GETTER,
- HintCode.ABSTRACT_SUPER_MEMBER_REFERENCE
- ]);
- } else {
- assertErrors(source, [HintCode.ABSTRACT_SUPER_MEMBER_REFERENCE]);
- }
+ assertErrors(source, [HintCode.ABSTRACT_SUPER_MEMBER_REFERENCE]);
verify([source]);
}
@@ -178,14 +157,7 @@
}
''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [
- StaticTypeWarningCode.UNDEFINED_SUPER_SETTER,
- HintCode.ABSTRACT_SUPER_MEMBER_REFERENCE
- ]);
- } else {
- assertErrors(source, [HintCode.ABSTRACT_SUPER_MEMBER_REFERENCE]);
- }
+ assertErrors(source, [HintCode.ABSTRACT_SUPER_MEMBER_REFERENCE]);
verify([source]);
}
@@ -201,14 +173,7 @@
}
''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [
- StaticTypeWarningCode.UNDEFINED_SUPER_METHOD,
- HintCode.ABSTRACT_SUPER_MEMBER_REFERENCE
- ]);
- } else {
- assertErrors(source, [HintCode.ABSTRACT_SUPER_MEMBER_REFERENCE]);
- }
+ assertErrors(source, [HintCode.ABSTRACT_SUPER_MEMBER_REFERENCE]);
verify([source]);
}
@@ -1695,7 +1660,6 @@
verify([source]);
}
- @failingTest
test_invalidSealedAnnotation_onMixin() async {
Source source = addNamedSource('/lib1.dart', r'''
import 'package:meta/meta.dart';
@@ -3461,11 +3425,7 @@
var b = new A().g;
''');
await computeAnalysisResult(source);
- if (enableKernelDriver) {
- assertNoErrors(source);
- } else {
- assertErrors(source, [StrongModeCode.TOP_LEVEL_INSTANCE_GETTER]);
- }
+ assertErrors(source, [StrongModeCode.TOP_LEVEL_INSTANCE_GETTER]);
verify([source]);
}
@@ -3478,11 +3438,7 @@
var b = a.g();
''');
await computeAnalysisResult(source);
- if (enableKernelDriver) {
- assertNoErrors(source);
- } else {
- assertErrors(source, [StrongModeCode.TOP_LEVEL_INSTANCE_GETTER]);
- }
+ assertErrors(source, [StrongModeCode.TOP_LEVEL_INSTANCE_GETTER]);
verify([source]);
}
@@ -3494,11 +3450,7 @@
var b = new A().g;
''');
await computeAnalysisResult(source);
- if (enableKernelDriver) {
- assertNoErrors(source);
- } else {
- assertErrors(source, [StrongModeCode.TOP_LEVEL_INSTANCE_GETTER]);
- }
+ assertErrors(source, [StrongModeCode.TOP_LEVEL_INSTANCE_GETTER]);
verify([source]);
}
@@ -3511,11 +3463,7 @@
var b = a.g();
''');
await computeAnalysisResult(source);
- if (enableKernelDriver) {
- assertNoErrors(source);
- } else {
- assertErrors(source, [StrongModeCode.TOP_LEVEL_INSTANCE_GETTER]);
- }
+ assertErrors(source, [StrongModeCode.TOP_LEVEL_INSTANCE_GETTER]);
verify([source]);
}
@@ -3528,11 +3476,7 @@
var b = a.g;
''');
await computeAnalysisResult(source);
- if (enableKernelDriver) {
- assertNoErrors(source);
- } else {
- assertErrors(source, [StrongModeCode.TOP_LEVEL_INSTANCE_GETTER]);
- }
+ assertErrors(source, [StrongModeCode.TOP_LEVEL_INSTANCE_GETTER]);
verify([source]);
}
@@ -3548,11 +3492,7 @@
// The reference to a.x triggers TOP_LEVEL_INSTANCE_GETTER because f is
// generic, so the type of a.x might affect the type of b.
await computeAnalysisResult(source);
- if (enableKernelDriver) {
- assertNoErrors(source);
- } else {
- assertErrors(source, [StrongModeCode.TOP_LEVEL_INSTANCE_GETTER]);
- }
+ assertErrors(source, [StrongModeCode.TOP_LEVEL_INSTANCE_GETTER]);
verify([source]);
}
@@ -3615,11 +3555,7 @@
// The reference to a.x triggers TOP_LEVEL_INSTANCE_GETTER because the
// closure is generic, so the type of a.x might affect the type of b.
await computeAnalysisResult(source);
- if (enableKernelDriver) {
- assertNoErrors(source);
- } else {
- assertErrors(source, [StrongModeCode.TOP_LEVEL_INSTANCE_GETTER]);
- }
+ assertErrors(source, [StrongModeCode.TOP_LEVEL_INSTANCE_GETTER]);
verify([source]);
}
@@ -3665,11 +3601,7 @@
// The reference to a.x triggers TOP_LEVEL_INSTANCE_GETTER because f is
// generic, so the type of a.x might affect the type of b.
await computeAnalysisResult(source);
- if (enableKernelDriver) {
- assertNoErrors(source);
- } else {
- assertErrors(source, [StrongModeCode.TOP_LEVEL_INSTANCE_GETTER]);
- }
+ assertErrors(source, [StrongModeCode.TOP_LEVEL_INSTANCE_GETTER]);
verify([source]);
}
@@ -3719,11 +3651,7 @@
// The reference to a.x triggers TOP_LEVEL_INSTANCE_GETTER because B is
// generic, so the type of a.x might affect the type of b.
await computeAnalysisResult(source);
- if (enableKernelDriver) {
- assertNoErrors(source);
- } else {
- assertErrors(source, [StrongModeCode.TOP_LEVEL_INSTANCE_GETTER]);
- }
+ assertErrors(source, [StrongModeCode.TOP_LEVEL_INSTANCE_GETTER]);
verify([source]);
}
@@ -3798,11 +3726,7 @@
// The reference to a.x triggers TOP_LEVEL_INSTANCE_GETTER because B is
// generic, so the type of a.x might affect the type of b.
await computeAnalysisResult(source);
- if (enableKernelDriver) {
- assertNoErrors(source);
- } else {
- assertErrors(source, [StrongModeCode.TOP_LEVEL_INSTANCE_GETTER]);
- }
+ assertErrors(source, [StrongModeCode.TOP_LEVEL_INSTANCE_GETTER]);
verify([source]);
}
@@ -3880,11 +3804,7 @@
// The reference to a.x triggers TOP_LEVEL_INSTANCE_GETTER because B is
// generic, so the type of a.x might affect the type of b.
await computeAnalysisResult(source);
- if (enableKernelDriver) {
- assertNoErrors(source);
- } else {
- assertErrors(source, [StrongModeCode.TOP_LEVEL_INSTANCE_GETTER]);
- }
+ assertErrors(source, [StrongModeCode.TOP_LEVEL_INSTANCE_GETTER]);
verify([source]);
}
@@ -3897,11 +3817,7 @@
var b = a.g;
''');
await computeAnalysisResult(source);
- if (enableKernelDriver) {
- assertNoErrors(source);
- } else {
- assertErrors(source, [StrongModeCode.TOP_LEVEL_INSTANCE_GETTER]);
- }
+ assertErrors(source, [StrongModeCode.TOP_LEVEL_INSTANCE_GETTER]);
verify([source]);
}
@@ -3920,11 +3836,7 @@
// The reference to a.x triggers TOP_LEVEL_INSTANCE_GETTER because the type
// of a.x affects the lookup of y, which in turn affects the type of b.
await computeAnalysisResult(source);
- if (enableKernelDriver) {
- assertNoErrors(source);
- } else {
- assertErrors(source, [StrongModeCode.TOP_LEVEL_INSTANCE_GETTER]);
- }
+ assertErrors(source, [StrongModeCode.TOP_LEVEL_INSTANCE_GETTER]);
verify([source]);
}
@@ -3951,11 +3863,7 @@
var x = new A().f();
''');
await computeAnalysisResult(source);
- if (enableKernelDriver) {
- assertNoErrors(source);
- } else {
- assertErrors(source, [StrongModeCode.TOP_LEVEL_INSTANCE_METHOD]);
- }
+ assertErrors(source, [StrongModeCode.TOP_LEVEL_INSTANCE_METHOD]);
verify([source]);
}
@@ -3979,11 +3887,7 @@
var x = new A().f(0);
''');
await computeAnalysisResult(source);
- if (enableKernelDriver) {
- assertNoErrors(source);
- } else {
- assertErrors(source, [StrongModeCode.TOP_LEVEL_INSTANCE_METHOD]);
- }
+ assertErrors(source, [StrongModeCode.TOP_LEVEL_INSTANCE_METHOD]);
verify([source]);
}
@@ -4019,11 +3923,7 @@
var x = new A().f;
''');
await computeAnalysisResult(source);
- if (enableKernelDriver) {
- assertNoErrors(source);
- } else {
- assertErrors(source, [StrongModeCode.TOP_LEVEL_INSTANCE_METHOD]);
- }
+ assertErrors(source, [StrongModeCode.TOP_LEVEL_INSTANCE_METHOD]);
verify([source]);
}
@@ -4035,11 +3935,7 @@
var x = new A().f;
''');
await computeAnalysisResult(source);
- if (enableKernelDriver) {
- assertNoErrors(source);
- } else {
- assertErrors(source, [StrongModeCode.TOP_LEVEL_INSTANCE_METHOD]);
- }
+ assertErrors(source, [StrongModeCode.TOP_LEVEL_INSTANCE_METHOD]);
verify([source]);
}
@@ -4182,9 +4078,7 @@
}
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [StaticTypeWarningCode.UNDEFINED_METHOD]);
- } else if (previewDart2) {
+ if (previewDart2) {
assertErrors(source, [StaticTypeWarningCode.UNDEFINED_OPERATOR]);
} else {
assertErrors(source, [HintCode.UNDEFINED_OPERATOR]);
@@ -4200,12 +4094,7 @@
}
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [
- StaticTypeWarningCode.UNDEFINED_METHOD,
- StaticTypeWarningCode.UNDEFINED_METHOD
- ]);
- } else if (previewDart2) {
+ if (previewDart2) {
assertErrors(source, [StaticTypeWarningCode.UNDEFINED_OPERATOR]);
} else {
assertErrors(source, [HintCode.UNDEFINED_OPERATOR]);
@@ -4221,9 +4110,7 @@
}
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [StaticTypeWarningCode.UNDEFINED_METHOD]);
- } else if (previewDart2) {
+ if (previewDart2) {
assertErrors(source, [StaticTypeWarningCode.UNDEFINED_OPERATOR]);
} else {
assertErrors(source, [HintCode.UNDEFINED_OPERATOR]);
@@ -4239,9 +4126,7 @@
}
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [StaticTypeWarningCode.UNDEFINED_METHOD]);
- } else if (previewDart2) {
+ if (previewDart2) {
assertErrors(source, [StaticTypeWarningCode.UNDEFINED_OPERATOR]);
} else {
assertErrors(source, [HintCode.UNDEFINED_OPERATOR]);
diff --git a/pkg/analyzer/test/generated/invalid_code_driver_test.dart b/pkg/analyzer/test/generated/invalid_code_driver_test.dart
index 6c3ffaa..cdccd25 100644
--- a/pkg/analyzer/test/generated/invalid_code_driver_test.dart
+++ b/pkg/analyzer/test/generated/invalid_code_driver_test.dart
@@ -16,19 +16,4 @@
class InvalidCodeTest_Driver extends InvalidCodeTest {
@override
bool get enableNewAnalysisDriver => true;
-
- /**
- * This fails because we have a method with the empty name, and the default
- * constructor, which also has the empty name. Then, when we link, we get
- * a reference to this empty-named method, so we resynthesize a
- * `MethodHandle` with the corresponding `ElementLocation`. But at the level
- * of `ElementLocation` we cannot distinguish a reference to a method or
- * a constructor. So, we return a `ConstructorElement`, and cast to
- * `MethodElement` fails.
- */
- @failingTest
- @override
- test_constructorAndMethodNameCollision() async {
- return super.test_constructorAndMethodNameCollision();
- }
}
diff --git a/pkg/analyzer/test/generated/invalid_code_kernel_test.dart b/pkg/analyzer/test/generated/invalid_code_kernel_test.dart
deleted file mode 100644
index eaeb057..0000000
--- a/pkg/analyzer/test/generated/invalid_code_kernel_test.dart
+++ /dev/null
@@ -1,28 +0,0 @@
-// 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:test_reflective_loader/test_reflective_loader.dart';
-
-import 'invalid_code_test.dart';
-
-main() {
- defineReflectiveSuite(() {
- defineReflectiveTests(InvalidCodeTest_Kernel);
- });
-}
-
-@reflectiveTest
-class InvalidCodeTest_Kernel extends InvalidCodeTest {
- @override
- bool get enableKernelDriver => true;
-
- @override
- bool get enableNewAnalysisDriver => true;
-
- @override
- bool get useCFE => true;
-
- @override
- bool get usingFastaParser => true;
-}
diff --git a/pkg/analyzer/test/generated/non_error_resolver_kernel_test.dart b/pkg/analyzer/test/generated/non_error_resolver_kernel_test.dart
deleted file mode 100644
index f4f1192..0000000
--- a/pkg/analyzer/test/generated/non_error_resolver_kernel_test.dart
+++ /dev/null
@@ -1,183 +0,0 @@
-// 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:test_reflective_loader/test_reflective_loader.dart';
-
-import 'non_error_resolver_driver_test.dart';
-
-main() {
- defineReflectiveSuite(() {
- defineReflectiveTests(NonErrorResolverTest_Kernel);
- });
-}
-
-/// Tests marked with this annotation fail because they test features that
-/// were implemented in Analyzer, but are intentionally not included into
-/// the Dart 2.0 plan, or disabled for Dart 2.0 altogether.
-const notForDart2 = const Object();
-
-/// Tests marked with this annotation fail because of an Analyzer problem.
-class AnalyzerProblem {
- const AnalyzerProblem(String issueUri);
-}
-
-/// Tests marked with this annotation fail because of a Fasta problem.
-class FastaProblem {
- const FastaProblem(String issueUri);
-}
-
-@reflectiveTest
-class NonErrorResolverTest_Kernel extends NonErrorResolverTest_Driver {
- @override
- bool get enableKernelDriver => true;
-
- @override
- bool get useCFE => true;
-
- @override
- bool get usingFastaParser => true;
-
- @override
- @failingTest
- @FastaProblem('https://github.com/dart-lang/sdk/issues/31604')
- test_commentReference_beforeConstructor() async {
- return super.test_commentReference_beforeConstructor();
- }
-
- @override
- @failingTest
- @FastaProblem('https://github.com/dart-lang/sdk/issues/31604')
- test_commentReference_beforeEnum() async {
- return super.test_commentReference_beforeEnum();
- }
-
- @override
- @failingTest
- @FastaProblem('https://github.com/dart-lang/sdk/issues/31604')
- test_commentReference_beforeFunction_blockBody() async {
- return super.test_commentReference_beforeFunction_blockBody();
- }
-
- @override
- @failingTest
- @FastaProblem('https://github.com/dart-lang/sdk/issues/31604')
- test_commentReference_beforeFunction_expressionBody() async {
- return super.test_commentReference_beforeFunction_expressionBody();
- }
-
- @override
- @failingTest
- @FastaProblem('https://github.com/dart-lang/sdk/issues/31604')
- test_commentReference_beforeFunctionTypeAlias() async {
- return super.test_commentReference_beforeFunctionTypeAlias();
- }
-
- @override
- @failingTest
- @FastaProblem('https://github.com/dart-lang/sdk/issues/31604')
- test_commentReference_beforeGenericTypeAlias() async {
- return super.test_commentReference_beforeGenericTypeAlias();
- }
-
- @override
- @failingTest
- @FastaProblem('https://github.com/dart-lang/sdk/issues/31604')
- test_commentReference_beforeGetter() async {
- return super.test_commentReference_beforeGetter();
- }
-
- @override
- @failingTest
- @FastaProblem('https://github.com/dart-lang/sdk/issues/31604')
- test_commentReference_beforeMethod() async {
- return super.test_commentReference_beforeMethod();
- }
-
- @override
- @failingTest
- @FastaProblem('https://github.com/dart-lang/sdk/issues/31604')
- test_commentReference_class() async {
- return super.test_commentReference_class();
- }
-
- @override
- @failingTest
- @FastaProblem('https://github.com/dart-lang/sdk/issues/31604')
- test_commentReference_setter() async {
- return super.test_commentReference_setter();
- }
-
- @override
- test_conflictingStaticSetterAndInstanceMember_thisClass_method() async {
- return super
- .test_conflictingStaticSetterAndInstanceMember_thisClass_method();
- }
-
- @override
- test_constConstructorWithMixinWithField_withoutSuperMixins() async {
- return super.test_constConstructorWithMixinWithField_withoutSuperMixins();
- }
-
- @override
- @failingTest
- test_constConstructorWithMixinWithField_withSuperMixins() async {
- return super.test_constConstructorWithMixinWithField_withSuperMixins();
- }
-
- @override
- @failingTest
- test_finalNotInitialized_hasNativeClause_hasConstructor() async {
- return super.test_finalNotInitialized_hasNativeClause_hasConstructor();
- }
-
- @override
- @failingTest
- test_finalNotInitialized_hasNativeClause_noConstructor() async {
- return super.test_finalNotInitialized_hasNativeClause_noConstructor();
- }
-
- @override
- @failingTest
- @FastaProblem('https://github.com/dart-lang/sdk/issues/33799')
- test_functionTypeAlias_scope_signature() async {
- return super.test_functionTypeAlias_scope_signature();
- }
-
- @override // passes with kernel
- test_infer_mixin() => super.test_infer_mixin();
-
- @override // Passes with kernel
- test_infer_mixin_multiplyConstrained() =>
- super.test_infer_mixin_multiplyConstrained();
-
- @override
- @failingTest
- @FastaProblem('https://github.com/dart-lang/sdk/issues/30609')
- test_metadata_enumConstantDeclaration() {
- // Failed to resolve 2 nodes
- return super.test_metadata_enumConstantDeclaration();
- }
-
- @override
- @failingTest
- test_nativeConstConstructor() {
- return super.test_nativeConstConstructor();
- }
-
- @override
- test_null_callMethod() async {
- return super.test_null_callMethod();
- }
-
- @override
- test_null_callOperator() async {
- return super.test_null_callOperator();
- }
-
- @override
- @failingTest
- test_undefinedIdentifier_synthetic_whenMethodName() async {
- return super.test_undefinedIdentifier_synthetic_whenMethodName();
- }
-}
diff --git a/pkg/analyzer/test/generated/non_error_resolver_test.dart b/pkg/analyzer/test/generated/non_error_resolver_test.dart
index 58d3b70..a215f04 100644
--- a/pkg/analyzer/test/generated/non_error_resolver_test.dart
+++ b/pkg/analyzer/test/generated/non_error_resolver_test.dart
@@ -189,6 +189,23 @@
verify([source]);
}
+ test_ambiguousImport_dart_implicitHide() async {
+ Source source = addSource(r'''
+import 'dart:async';
+import 'lib.dart';
+main() {
+ print(Future.zero);
+}
+''');
+ addNamedSource('/lib.dart', r'''
+class Future {
+ static const zero = 0;
+}
+''');
+ await computeAnalysisResult(source);
+ assertNoErrors(source);
+ }
+
test_ambiguousImport_hideCombinator() async {
Source source = addSource(r'''
import 'lib1.dart';
@@ -1231,19 +1248,6 @@
verify([source]);
}
- test_conflictingInstanceGetterAndSuperclassMember_instance() async {
- Source source = addSource(r'''
-class A {
- get v => 0;
-}
-class B extends A {
- get v => 1;
-}''');
- await computeAnalysisResult(source);
- assertNoErrors(source);
- verify([source]);
- }
-
test_conflictingStaticGetterAndInstanceSetter_thisClass() async {
Source source = addSource(r'''
class A {
@@ -1263,15 +1267,7 @@
static set x(int p) {}
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [
- CompileTimeErrorCode.CONFLICTS_WITH_MEMBER,
- CompileTimeErrorCode.CONFLICTS_WITH_MEMBER
- ]);
- } else {
- assertErrors(
- source, [CompileTimeErrorCode.CONFLICTING_GETTER_AND_METHOD]);
- }
+ assertErrors(source, [CompileTimeErrorCode.CONFLICTING_GETTER_AND_METHOD]);
verify([source]);
}
@@ -1381,12 +1377,8 @@
const B(): super();
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [StaticTypeWarningCode.UNDEFINED_SUPER_METHOD]);
- } else {
- assertErrors(source,
- [CompileTimeErrorCode.UNDEFINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT]);
- }
+ assertErrors(source,
+ [CompileTimeErrorCode.UNDEFINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT]);
verify([source]);
}
@@ -3591,11 +3583,7 @@
v();
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [StaticTypeWarningCode.UNDEFINED_METHOD]);
- } else {
- assertErrors(source, [StaticTypeWarningCode.INVOCATION_OF_NON_FUNCTION]);
- }
+ assertErrors(source, [StaticTypeWarningCode.INVOCATION_OF_NON_FUNCTION]);
verify([source]);
}
@@ -3712,16 +3700,6 @@
verify([source]);
}
- test_memberWithClassName_setter() async {
- Source source = addSource(r'''
-class A {
- set A(v) {}
-}''');
- await computeAnalysisResult(source);
- assertNoErrors(source);
- verify([source]);
- }
-
test_metadata_enumConstantDeclaration() async {
Source source = addSource(r'''
const x = 1;
@@ -4032,7 +4010,7 @@
const factory Foo.foo() native 'Foo_Foo_foo';
}''');
await computeAnalysisResult(source);
- assertNoErrors(source);
+ assertErrors(source, [ParserErrorCode.CONST_CONSTRUCTOR_WITH_BODY]);
// Cannot verify the AST because the import's URI cannot be resolved.
}
@@ -5965,14 +5943,7 @@
print(is String);
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [
- ParserErrorCode.MISSING_IDENTIFIER,
- StaticTypeWarningCode.UNDEFINED_GETTER
- ]);
- } else {
- assertErrors(source, [ParserErrorCode.MISSING_IDENTIFIER]);
- }
+ assertErrors(source, [ParserErrorCode.MISSING_IDENTIFIER]);
}
test_undefinedIdentifier_synthetic_whenMethodName() async {
@@ -5982,7 +5953,11 @@
p.();
}''');
await computeAnalysisResult(source);
- assertErrors(source, [ParserErrorCode.MISSING_IDENTIFIER]);
+ assertErrors(source, [
+ ParserErrorCode.MISSING_IDENTIFIER,
+ ParserErrorCode.MISSING_IDENTIFIER,
+ StaticTypeWarningCode.UNDEFINED_GETTER
+ ]);
}
test_undefinedMethod_functionExpression_callMethod() async {
diff --git a/pkg/analyzer/test/generated/non_hint_code_kernel_test.dart b/pkg/analyzer/test/generated/non_hint_code_kernel_test.dart
deleted file mode 100644
index 61ad9cc..0000000
--- a/pkg/analyzer/test/generated/non_hint_code_kernel_test.dart
+++ /dev/null
@@ -1,43 +0,0 @@
-// 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:test_reflective_loader/test_reflective_loader.dart';
-
-import 'non_hint_code_driver_test.dart';
-
-main() {
- defineReflectiveSuite(() {
- defineReflectiveTests(NonHintCodeTest_Kernel);
- });
-}
-
-@reflectiveTest
-class NonHintCodeTest_Kernel extends NonHintCodeTest_Driver {
- @override
- bool get enableKernelDriver => true;
-
- @override
- bool get useCFE => true;
-
- @override
- bool get usingFastaParser => true;
-
- @override
- @failingTest
- test_deadCode_afterForEachWithBreakLabel() async {
- await super.test_deadCode_afterForEachWithBreakLabel();
- }
-
- @override
- @failingTest
- test_deadCode_afterForWithBreakLabel() async {
- await super.test_deadCode_afterForWithBreakLabel();
- }
-
- @override
- @failingTest
- test_unusedImport_annotationOnDirective() async {
- await super.test_unusedImport_annotationOnDirective();
- }
-}
diff --git a/pkg/analyzer/test/generated/non_hint_code_test.dart b/pkg/analyzer/test/generated/non_hint_code_test.dart
index 8ac787c..9def3f0 100644
--- a/pkg/analyzer/test/generated/non_hint_code_test.dart
+++ b/pkg/analyzer/test/generated/non_hint_code_test.dart
@@ -977,9 +977,7 @@
}
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [StaticTypeWarningCode.UNDEFINED_METHOD]);
- } else if (previewDart2) {
+ if (previewDart2) {
assertErrors(source, [StaticTypeWarningCode.UNDEFINED_OPERATOR]);
} else {
assertNoErrors(source);
@@ -998,12 +996,7 @@
}
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [
- StaticTypeWarningCode.UNDEFINED_METHOD,
- StaticTypeWarningCode.UNDEFINED_METHOD
- ]);
- } else if (previewDart2) {
+ if (previewDart2) {
assertErrors(source, [StaticTypeWarningCode.UNDEFINED_OPERATOR]);
} else {
assertNoErrors(source);
@@ -1022,9 +1015,7 @@
}
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [StaticTypeWarningCode.UNDEFINED_METHOD]);
- } else if (previewDart2) {
+ if (previewDart2) {
assertErrors(source, [StaticTypeWarningCode.UNDEFINED_OPERATOR]);
} else {
assertNoErrors(source);
@@ -1043,9 +1034,7 @@
}
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [StaticTypeWarningCode.UNDEFINED_METHOD]);
- } else if (previewDart2) {
+ if (previewDart2) {
assertErrors(source, [StaticTypeWarningCode.UNDEFINED_OPERATOR]);
} else {
assertNoErrors(source);
@@ -1179,9 +1168,7 @@
(c ? f(): new Future.value(0) as Future<int>).then((int value) {});
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [HintCode.UNNECESSARY_CAST]);
- } else if (previewDart2 && enableNewAnalysisDriver) {
+ if (previewDart2 && enableNewAnalysisDriver) {
assertErrors(source, [HintCode.UNNECESSARY_CAST]);
} else {
assertNoErrors(source);
@@ -1494,11 +1481,7 @@
// TODO(brianwilkerson) It isn't clear what the right semantics are in Dart
// 2 (https://github.com/dart-lang/sdk/issues/33951). This test should be
// updated when that issue is closed.
- if (useCFE) {
- assertErrors(source, [StaticTypeWarningCode.UNDEFINED_SUPER_GETTER]);
- } else {
- assertNoErrors(source);
- }
+ assertNoErrors(source);
verify([source]);
}
}
diff --git a/pkg/analyzer/test/generated/parser_fasta_listener.dart b/pkg/analyzer/test/generated/parser_fasta_listener.dart
index d61baab..f6325f8 100644
--- a/pkg/analyzer/test/generated/parser_fasta_listener.dart
+++ b/pkg/analyzer/test/generated/parser_fasta_listener.dart
@@ -380,9 +380,9 @@
@override
void beginMethod(Token externalToken, Token staticToken, Token covariantToken,
- Token varFinalOrConst, Token name) {
- super.beginMethod(
- externalToken, staticToken, covariantToken, varFinalOrConst, name);
+ Token varFinalOrConst, Token getOrSet, Token name) {
+ super.beginMethod(externalToken, staticToken, covariantToken,
+ varFinalOrConst, getOrSet, name);
begin('Method');
}
@@ -755,16 +755,11 @@
}
@override
- void endFormalParameter(
- Token thisKeyword,
- Token periodAfterThis,
- Token nameToken,
- FormalParameterKind kind,
- MemberKind memberKind,
- Token endToken) {
+ void endFormalParameter(Token thisKeyword, Token periodAfterThis,
+ Token nameToken, FormalParameterKind kind, MemberKind memberKind) {
end('FormalParameter');
super.endFormalParameter(
- thisKeyword, periodAfterThis, nameToken, kind, memberKind, endToken);
+ thisKeyword, periodAfterThis, nameToken, kind, memberKind);
}
@override
@@ -1139,6 +1134,12 @@
}
@override
+ void handleRecoverMixinHeader() {
+ expectIn('MixinDeclaration');
+ listener.handleRecoverMixinHeader();
+ }
+
+ @override
void handleInvalidMember(Token endToken) {
expectIn('Member');
super.handleInvalidMember(endToken);
diff --git a/pkg/analyzer/test/generated/parser_fasta_test.dart b/pkg/analyzer/test/generated/parser_fasta_test.dart
index 118210a..5b1826d 100644
--- a/pkg/analyzer/test/generated/parser_fasta_test.dart
+++ b/pkg/analyzer/test/generated/parser_fasta_test.dart
@@ -7,13 +7,19 @@
import 'package:analyzer/dart/ast/token.dart' show Token, TokenType;
import 'package:analyzer/error/error.dart';
import 'package:analyzer/error/listener.dart' show ErrorReporter;
+import 'package:analyzer/src/dart/ast/ast.dart';
import 'package:analyzer/src/dart/ast/token.dart';
import 'package:analyzer/src/dart/scanner/scanner.dart';
+import 'package:analyzer/src/fasta/ast_builder.dart';
import 'package:analyzer/src/generated/parser.dart' as analyzer;
import 'package:analyzer/src/generated/utilities_dart.dart';
import 'package:analyzer/src/string_source.dart';
+import 'package:front_end/src/fasta/scanner.dart'
+ show ScannerResult, scanString;
+import 'package:front_end/src/fasta/parser/parser.dart' as fasta;
import 'package:front_end/src/fasta/scanner/error_token.dart' show ErrorToken;
import 'package:front_end/src/fasta/scanner/string_scanner.dart';
+import 'package:front_end/src/scanner/errors.dart' show translateErrorToken;
import 'package:test/test.dart';
import 'package:test_reflective_loader/test_reflective_loader.dart';
@@ -42,54 +48,14 @@
@reflectiveTest
class ClassMemberParserTest_Fasta extends FastaParserTestCase
- with ClassMemberParserTestMixin {
- @override
- void test_parseClassMember_method_generic_comment_noReturnType() {
- // Ignored: Fasta does not support the generic comment syntax.
- }
-
- @override
- void test_parseClassMember_method_generic_comment_parameterType() {
- // Ignored: Fasta does not support the generic comment syntax.
- }
-
- @override
- void test_parseClassMember_method_generic_comment_returnType() {
- // Ignored: Fasta does not support the generic comment syntax.
- }
-
- @override
- void test_parseClassMember_method_generic_comment_returnType_bound() {
- // Ignored: Fasta does not support the generic comment syntax.
- }
-
- @override
- void test_parseClassMember_method_generic_comment_returnType_complex() {
- // Ignored: Fasta does not support the generic comment syntax.
- }
-
- @override
- void test_parseClassMember_method_generic_comment_void() {
- // Ignored: Fasta does not support the generic comment syntax.
- }
-
- @override
- void test_parseClassMember_method_static_generic_comment_returnType() {
- // Ignored: Fasta does not support the generic comment syntax.
- }
-}
+ with ClassMemberParserTestMixin {}
/**
* Tests of the fasta parser based on [ComplexParserTestMixin].
*/
@reflectiveTest
class ComplexParserTest_Fasta extends FastaParserTestCase
- with ComplexParserTestMixin {
- @override
- void test_assignableExpression_arguments_normal_chain_typeArgumentComments() {
- // Ignored: Fasta does not support the generic comment syntax.
- }
-}
+ with ComplexParserTestMixin {}
/**
* Tests of the fasta parser based on [ErrorParserTest].
@@ -126,15 +92,11 @@
}
}
- @override
- void test_method_invalidTypeParameterComments() {
- // Ignored: Fasta does not support the generic comment syntax.
- }
-
- @override
- void test_method_invalidTypeParameterExtendsComment() {
- // Fasta no longer supports type comment based syntax
- // super.test_method_invalidTypeParameterExtendsComment();
+ void test_invalidOperatorAfterSuper_constructorInitializer2() {
+ parseCompilationUnit('class C { C() : super?.namedConstructor(); }',
+ errors: [
+ expectedError(ParserErrorCode.INVALID_OPERATOR_FOR_SUPER, 21, 2)
+ ]);
}
}
@@ -145,113 +107,6 @@
class ExpressionParserTest_Fasta extends FastaParserTestCase
with ExpressionParserTestMixin {
@override
- void
- test_parseAssignableExpression_expression_args_dot_typeArgumentComments() {
- // Ignored: Fasta does not support the generic comment syntax.
- }
-
- @override
- void
- test_parseAssignableExpression_identifier_args_dot_typeArgumentComments() {
- // Ignored: Fasta does not support the generic comment syntax.
- }
-
- @override
- void test_parseCascadeSection_ia_typeArgumentComments() {
- // Ignored: Fasta does not support the generic comment syntax.
- }
-
- @override
- void test_parseCascadeSection_ii_typeArgumentComments() {
- // Ignored: Fasta does not support the generic comment syntax.
- }
-
- @override
- void test_parseCascadeSection_pa_typeArgumentComments() {
- // Ignored: Fasta does not support the generic comment syntax.
- }
-
- @override
- void test_parseCascadeSection_paa_typeArgumentComments() {
- // Ignored: Fasta does not support the generic comment syntax.
- }
-
- @override
- void test_parseCascadeSection_paapaa_typeArgumentComments() {
- // Ignored: Fasta does not support the generic comment syntax.
- }
-
- @override
- void test_parseConstExpression_listLiteral_typed_genericComment() {
- // Ignored: Fasta does not support the generic comment syntax.
- }
-
- @override
- void test_parseConstExpression_mapLiteral_typed_genericComment() {
- // Ignored: Fasta does not support the generic comment syntax.
- }
-
- @override
- void test_parseExpression_superMethodInvocation_typeArgumentComments() {
- // Ignored: Fasta does not support the generic comment syntax.
- }
-
- @override
- void
- test_parseExpressionWithoutCascade_superMethodInvocation_typeArgumentComments() {
- // Ignored: Fasta does not support the generic comment syntax.
- }
-
- @override
- void test_parseFunctionExpression_typeParameterComments() {
- // Ignored: Fasta does not support the generic comment syntax.
- }
-
- @override
- void
- test_parseInstanceCreationExpression_qualifiedType_named_typeArgumentComments() {
- // Ignored: Fasta does not support the generic comment syntax.
- }
-
- @override
- void
- test_parseInstanceCreationExpression_qualifiedType_typeArgumentComments() {
- // Ignored: Fasta does not support the generic comment syntax.
- }
-
- @override
- void test_parseInstanceCreationExpression_type_named_typeArgumentComments() {
- // Ignored: Fasta does not support the generic comment syntax.
- }
-
- @override
- void test_parseInstanceCreationExpression_type_typeArgumentComments() {
- // Ignored: Fasta does not support the generic comment syntax.
- }
-
- @override
- void
- test_parsePostfixExpression_none_methodInvocation_question_dot_typeArgumentComments() {
- // Ignored: Fasta does not support the generic comment syntax.
- }
-
- @override
- void
- test_parsePostfixExpression_none_methodInvocation_typeArgumentComments() {
- // Ignored: Fasta does not support the generic comment syntax.
- }
-
- @override
- void test_parsePrimaryExpression_listLiteral_typed_genericComment() {
- // Ignored: Fasta does not support the generic comment syntax.
- }
-
- @override
- void test_parsePrimaryExpression_mapLiteral_typed_genericComment() {
- // Ignored: Fasta does not support the generic comment syntax.
- }
-
- @override
@failingTest
void test_parseUnaryExpression_decrement_super() {
// TODO(danrubel) Reports a different error and different token stream.
@@ -285,12 +140,6 @@
@override
bool allowNativeClause = false;
- /**
- * Whether generic method comments should be enabled for the test.
- */
- bool get enableGenericMethodComments => false;
- void set enableGenericMethodComments(bool enable) {}
-
@override
set enableLazyAssignmentOperators(bool value) {
// Lazy assignment operators are always enabled
@@ -352,11 +201,9 @@
@override
void createParser(String content, {int expectedEndOffset}) {
var scanner = new StringScanner(content, includeComments: true);
- scanner.scanGenericMethodComments = enableGenericMethodComments;
_fastaTokens = scanner.tokenize();
_parserProxy = new ParserProxy(_fastaTokens,
allowNativeClause: allowNativeClause,
- enableGenericMethodComments: enableGenericMethodComments,
expectedEndOffset: expectedEndOffset);
}
@@ -464,16 +311,39 @@
CompilationUnit parseCompilationUnit2(
String content, GatheringErrorListener listener) {
- // Scan tokens
var source = new StringSource(content, 'parser_test_StringSource.dart');
- var scanner = new Scanner.fasta(source, listener);
- scanner.scanGenericMethodComments = enableGenericMethodComments;
- _fastaTokens = scanner.tokenize();
+
+ void reportError(
+ ScannerErrorCode errorCode, int offset, List<Object> arguments) {
+ listener
+ .onError(new AnalysisError(source, offset, 1, errorCode, arguments));
+ }
+
+ // Scan tokens
+ ScannerResult result = scanString(content, includeComments: true);
+ Token token = result.tokens;
+ if (result.hasErrors) {
+ // The default recovery strategy used by scanString
+ // places all error tokens at the head of the stream.
+ while (token.type == TokenType.BAD_INPUT) {
+ translateErrorToken(token, reportError);
+ token = token.next;
+ }
+ }
+ _fastaTokens = token;
// Run parser
- analyzer.Parser parser =
- new analyzer.Parser(source, listener, useFasta: true);
- CompilationUnit unit = parser.parseCompilationUnit(_fastaTokens);
+ ErrorReporter errorReporter = new ErrorReporter(listener, source);
+ fasta.Parser parser = new fasta.Parser(null);
+ AstBuilder astBuilder = new AstBuilder(errorReporter, source.uri, true);
+ parser.listener = astBuilder;
+ parser.isMixinSupportEnabled = true;
+ astBuilder.parser = parser;
+ astBuilder.allowNativeClause = allowNativeClause;
+ parser.parseUnit(_fastaTokens);
+ CompilationUnitImpl unit = astBuilder.pop();
+ unit.localDeclarations = astBuilder.localDeclarations;
+
expect(unit, isNotNull);
return unit;
}
@@ -766,22 +636,7 @@
*/
@reflectiveTest
class FormalParameterParserTest_Fasta extends FastaParserTestCase
- with FormalParameterParserTestMixin {
- @override
- void test_parseNormalFormalParameter_function_noType_typeParameterComments() {
- // Ignored: Fasta does not support the generic comment syntax.
- }
-
- @override
- void test_parseNormalFormalParameter_function_type_typeParameterComments() {
- // Ignored: Fasta does not support the generic comment syntax.
- }
-
- @override
- void test_parseNormalFormalParameter_function_void_typeParameterComments() {
- // Ignored: Fasta does not support the generic comment syntax.
- }
-}
+ with FormalParameterParserTestMixin {}
/**
* Proxy implementation of the analyzer parser, implemented in terms of the
@@ -805,26 +660,20 @@
* Fasta token.
*/
factory ParserProxy(analyzer.Token firstToken,
- {bool allowNativeClause: false,
- bool enableGenericMethodComments: false,
- int expectedEndOffset}) {
+ {bool allowNativeClause: false, int expectedEndOffset}) {
TestSource source = new TestSource();
var errorListener = new GatheringErrorListener(checkRanges: true);
var errorReporter = new ErrorReporter(errorListener, source);
return new ParserProxy._(firstToken, errorReporter, null, errorListener,
allowNativeClause: allowNativeClause,
- enableGenericMethodComments: enableGenericMethodComments,
expectedEndOffset: expectedEndOffset);
}
ParserProxy._(analyzer.Token firstToken, ErrorReporter errorReporter,
Uri fileUri, this._errorListener,
- {bool allowNativeClause: false,
- bool enableGenericMethodComments: false,
- this.expectedEndOffset})
+ {bool allowNativeClause: false, this.expectedEndOffset})
: super(firstToken, errorReporter, fileUri,
- allowNativeClause: allowNativeClause,
- enableGenericMethodComments: enableGenericMethodComments) {
+ allowNativeClause: allowNativeClause) {
_eventListener = new ForwardingTestListener(astBuilder);
fastaParser.listener = _eventListener;
}
@@ -1055,43 +904,7 @@
*/
@reflectiveTest
class StatementParserTest_Fasta extends FastaParserTestCase
- with StatementParserTestMixin {
- @override
- void test_parseFunctionDeclarationStatement_typeParameterComments() {
- // Ignored: Fasta does not support the generic comment syntax.
- }
-
- @override
- void
- test_parseStatement_functionDeclaration_noReturnType_typeParameterComments() {
- // Ignored: Fasta does not support the generic comment syntax.
- }
-
- @override
- void test_parseVariableDeclarationListAfterMetadata_const_typeComment() {
- // Ignored: Fasta does not support the generic comment syntax.
- }
-
- @override
- void test_parseVariableDeclarationListAfterMetadata_dynamic_typeComment() {
- // Ignored: Fasta does not support the generic comment syntax.
- }
-
- @override
- void test_parseVariableDeclarationListAfterMetadata_final_typeComment() {
- // Ignored: Fasta does not support the generic comment syntax.
- }
-
- @override
- void test_parseVariableDeclarationListAfterMetadata_type_typeComment() {
- // Ignored: Fasta does not support the generic comment syntax.
- }
-
- @override
- void test_parseVariableDeclarationListAfterMetadata_var_typeComment() {
- // Ignored: Fasta does not support the generic comment syntax.
- }
-}
+ with StatementParserTestMixin {}
/**
* Tests of the fasta parser based on [TopLevelParserTestMixin].
diff --git a/pkg/analyzer/test/generated/parser_test.dart b/pkg/analyzer/test/generated/parser_test.dart
index 1a32e5f..2bbf423 100644
--- a/pkg/analyzer/test/generated/parser_test.dart
+++ b/pkg/analyzer/test/generated/parser_test.dart
@@ -9,7 +9,6 @@
import 'package:analyzer/error/error.dart';
import 'package:analyzer/error/listener.dart';
import 'package:analyzer/src/dart/ast/token.dart';
-import 'package:analyzer/src/dart/error/hint_codes.dart';
import 'package:analyzer/src/error/codes.dart';
import 'package:analyzer/src/generated/parser.dart';
import 'package:analyzer/src/generated/source.dart';
@@ -55,8 +54,6 @@
void set allowNativeClause(bool value);
- void set enableGenericMethodComments(bool value);
-
void set enableLazyAssignmentOperators(bool value);
void set enableNnbd(bool value);
@@ -736,177 +733,6 @@
expect(method.returnType, isNotNull);
}
- void test_parseClassMember_method_generic_comment_noReturnType() {
- enableGenericMethodComments = true;
- createParser('m/*<T>*/() {}');
- ClassMember member = parser.parseClassMember('C');
- expect(member, isNotNull);
- if (usingFastaParser) {
- assertNoErrors();
- } else {
- assertErrorsWithCodes([HintCode.GENERIC_METHOD_COMMENT]);
- }
- expect(member, new TypeMatcher<MethodDeclaration>());
- MethodDeclaration method = member;
- expect(method.documentationComment, isNull);
- expect(method.externalKeyword, isNull);
- expect(method.modifierKeyword, isNull);
- expect(method.propertyKeyword, isNull);
- expect(method.returnType, isNull);
- expect(method.name, isNotNull);
- expect(method.operatorKeyword, isNull);
- expect(method.typeParameters, isNotNull);
- expect(method.parameters, isNotNull);
- expect(method.body, isNotNull);
- }
-
- void test_parseClassMember_method_generic_comment_parameterType() {
- enableGenericMethodComments = true;
- createParser('m/*<T>*/(dynamic /*=T*/ p) => null;');
- ClassMember member = parser.parseClassMember('C');
- expect(member, isNotNull);
- if (usingFastaParser) {
- assertNoErrors();
- } else {
- assertErrorsWithCodes(
- [HintCode.GENERIC_METHOD_COMMENT, HintCode.GENERIC_METHOD_COMMENT]);
- }
- expect(member, new TypeMatcher<MethodDeclaration>());
- MethodDeclaration method = member;
- expect(method.documentationComment, isNull);
- expect(method.externalKeyword, isNull);
- expect(method.modifierKeyword, isNull);
- expect(method.propertyKeyword, isNull);
- expect(method.returnType, isNull);
- expect(method.name, isNotNull);
- expect(method.operatorKeyword, isNull);
- expect(method.typeParameters, isNotNull);
-
- FormalParameterList parameters = method.parameters;
- expect(parameters, isNotNull);
- expect(parameters.parameters, hasLength(1));
- var parameter = parameters.parameters[0] as SimpleFormalParameter;
- var parameterType = parameter.type as TypeName;
- expect(parameterType.name.name, 'T');
-
- expect(method.body, isNotNull);
- }
-
- void test_parseClassMember_method_generic_comment_returnType() {
- enableGenericMethodComments = true;
- createParser('/*=T*/ m/*<T>*/() {}');
- ClassMember member = parser.parseClassMember('C');
- expect(member, isNotNull);
- if (usingFastaParser) {
- assertNoErrors();
- } else {
- assertErrorsWithCodes(
- [HintCode.GENERIC_METHOD_COMMENT, HintCode.GENERIC_METHOD_COMMENT]);
- }
- expect(member, new TypeMatcher<MethodDeclaration>());
- MethodDeclaration method = member;
- expect(method.documentationComment, isNull);
- expect(method.externalKeyword, isNull);
- expect(method.modifierKeyword, isNull);
- expect(method.propertyKeyword, isNull);
- expect(method.returnType, isNotNull);
- expect((method.returnType as TypeName).name.name, 'T');
- expect(method.name, isNotNull);
- expect(method.operatorKeyword, isNull);
- expect(method.typeParameters, isNotNull);
- expect(method.parameters, isNotNull);
- expect(method.body, isNotNull);
- }
-
- void test_parseClassMember_method_generic_comment_returnType_bound() {
- enableGenericMethodComments = true;
- createParser('num/*=T*/ m/*<T extends num>*/() {}');
- ClassMember member = parser.parseClassMember('C');
- expect(member, isNotNull);
- if (usingFastaParser) {
- assertNoErrors();
- } else {
- assertErrorsWithCodes(
- [HintCode.GENERIC_METHOD_COMMENT, HintCode.GENERIC_METHOD_COMMENT]);
- }
- expect(member, new TypeMatcher<MethodDeclaration>());
- MethodDeclaration method = member;
- expect(method.documentationComment, isNull);
- expect(method.externalKeyword, isNull);
- expect(method.modifierKeyword, isNull);
- expect(method.propertyKeyword, isNull);
- expect((method.returnType as TypeName).name.name, 'T');
- expect(method.name, isNotNull);
- expect(method.operatorKeyword, isNull);
- expect(method.typeParameters, isNotNull);
- TypeParameter tp = method.typeParameters.typeParameters[0];
- expect(tp.name.name, 'T');
- expect(tp.extendsKeyword, isNotNull);
- expect((tp.bound as TypeName).name.name, 'num');
- expect(method.parameters, isNotNull);
- expect(method.body, isNotNull);
- }
-
- void test_parseClassMember_method_generic_comment_returnType_complex() {
- enableGenericMethodComments = true;
- createParser('dynamic /*=Map<int, T>*/ m/*<T>*/() => null;');
- ClassMember member = parser.parseClassMember('C');
- expect(member, isNotNull);
- if (usingFastaParser) {
- assertNoErrors();
- } else {
- assertErrorsWithCodes(
- [HintCode.GENERIC_METHOD_COMMENT, HintCode.GENERIC_METHOD_COMMENT]);
- }
- expect(member, new TypeMatcher<MethodDeclaration>());
- MethodDeclaration method = member;
- expect(method.documentationComment, isNull);
- expect(method.externalKeyword, isNull);
- expect(method.modifierKeyword, isNull);
- expect(method.propertyKeyword, isNull);
-
- {
- var returnType = method.returnType as TypeName;
- expect(returnType, isNotNull);
- expect(returnType.name.name, 'Map');
-
- List<TypeAnnotation> typeArguments = returnType.typeArguments.arguments;
- expect(typeArguments, hasLength(2));
- expect((typeArguments[0] as TypeName).name.name, 'int');
- expect((typeArguments[1] as TypeName).name.name, 'T');
- }
-
- expect(method.name, isNotNull);
- expect(method.operatorKeyword, isNull);
- expect(method.typeParameters, isNotNull);
- expect(method.parameters, isNotNull);
- expect(method.body, isNotNull);
- }
-
- void test_parseClassMember_method_generic_comment_void() {
- enableGenericMethodComments = true;
- createParser('void m/*<T>*/() {}');
- ClassMember member = parser.parseClassMember('C');
- expect(member, isNotNull);
- if (usingFastaParser) {
- assertNoErrors();
- } else {
- assertErrorsWithCodes([HintCode.GENERIC_METHOD_COMMENT]);
- }
- expect(member, new TypeMatcher<MethodDeclaration>());
- MethodDeclaration method = member;
- expect(method.documentationComment, isNull);
- expect(method.externalKeyword, isNull);
- expect(method.modifierKeyword, isNull);
- expect(method.propertyKeyword, isNull);
- expect(method.returnType, isNotNull);
- expect(method.name, isNotNull);
- expect(method.operatorKeyword, isNull);
- expect(method.typeParameters, isNotNull);
- expect(method.parameters, isNotNull);
- expect(method.body, isNotNull);
- }
-
void test_parseClassMember_method_generic_noReturnType() {
createParser('m<T>() {}');
ClassMember member = parser.parseClassMember('C');
@@ -1120,6 +946,44 @@
expect(method.body, isNotNull);
}
+ void test_parseClassMember_method_get_static_namedAsClass() {
+ createParser('static int get C => 0;');
+ ClassMember member = parser.parseClassMember('C');
+ expect(member, isNotNull);
+ assertNoErrors();
+ expect(member, new TypeMatcher<MethodDeclaration>());
+ MethodDeclaration method = member;
+ expect(method.documentationComment, isNull);
+ expect(method.externalKeyword, isNull);
+ expect(method.modifierKeyword, isNotNull);
+ expect(method.propertyKeyword, isNotNull);
+ expect(method.returnType, isNotNull);
+ expect(method.name, isNotNull);
+ expect(method.operatorKeyword, isNull);
+ expect(method.typeParameters, isNull);
+ expect(method.parameters, isNull);
+ expect(method.body, isNotNull);
+ }
+
+ void test_parseClassMember_method_set_static_namedAsClass() {
+ createParser('static void set C(_) {}');
+ ClassMember member = parser.parseClassMember('C');
+ expect(member, isNotNull);
+ assertNoErrors();
+ expect(member, new TypeMatcher<MethodDeclaration>());
+ MethodDeclaration method = member;
+ expect(method.documentationComment, isNull);
+ expect(method.externalKeyword, isNull);
+ expect(method.modifierKeyword, isNotNull);
+ expect(method.propertyKeyword, isNotNull);
+ expect(method.returnType, isNotNull);
+ expect(method.name, isNotNull);
+ expect(method.operatorKeyword, isNull);
+ expect(method.typeParameters, isNull);
+ expect(method.parameters, isNotNull);
+ expect(method.body, isNotNull);
+ }
+
void test_parseClassMember_method_gftReturnType_noReturnType() {
createParser('''
Function<A>(core.List<core.int> x) m() => null;
@@ -1369,28 +1233,36 @@
expect(method.body, isNotNull);
}
- void test_parseClassMember_method_static_generic_comment_returnType() {
- enableGenericMethodComments = true;
- createParser('static /*=T*/ m/*<T>*/() {}');
- ClassMember member = parser.parseClassMember('C');
- expect(member, isNotNull);
- if (usingFastaParser) {
- assertNoErrors();
- } else {
- assertErrorsWithCodes(
- [HintCode.GENERIC_METHOD_COMMENT, HintCode.GENERIC_METHOD_COMMENT]);
- }
- expect(member, new TypeMatcher<MethodDeclaration>());
- MethodDeclaration method = member;
+ void test_parseClassMember_method_static_class() {
+ var unit = parseCompilationUnit('class C { static void m() {} }');
+
+ ClassDeclaration c = unit.declarations[0];
+ MethodDeclaration method = c.members[0];
expect(method.documentationComment, isNull);
expect(method.externalKeyword, isNull);
expect(method.modifierKeyword, isNotNull);
expect(method.propertyKeyword, isNull);
expect(method.returnType, isNotNull);
- expect((method.returnType as TypeName).name.name, 'T');
expect(method.name, isNotNull);
expect(method.operatorKeyword, isNull);
- expect(method.typeParameters, isNotNull);
+ expect(method.typeParameters, isNull);
+ expect(method.parameters, isNotNull);
+ expect(method.body, isNotNull);
+ }
+
+ void test_parseClassMember_method_static_mixin() {
+ var unit = parseCompilationUnit('mixin C { static void m() {} }');
+
+ MixinDeclaration c = unit.declarations[0];
+ MethodDeclaration method = c.members[0];
+ expect(method.documentationComment, isNull);
+ expect(method.externalKeyword, isNull);
+ expect(method.modifierKeyword, isNotNull);
+ expect(method.propertyKeyword, isNull);
+ expect(method.returnType, isNotNull);
+ expect(method.name, isNotNull);
+ expect(method.operatorKeyword, isNull);
+ expect(method.typeParameters, isNull);
expect(method.parameters, isNotNull);
expect(method.body, isNotNull);
}
@@ -1994,19 +1866,6 @@
expect(argumentList4.arguments, hasLength(1));
}
- void test_assignableExpression_arguments_normal_chain_typeArgumentComments() {
- enableGenericMethodComments = true;
- _validate_assignableExpression_arguments_normal_chain_typeArguments(
- "a/*<E>*/(b)/*<F>*/(c).d/*<G>*/(e).f",
- usingFastaParser
- ? []
- : [
- HintCode.GENERIC_METHOD_COMMENT,
- HintCode.GENERIC_METHOD_COMMENT,
- HintCode.GENERIC_METHOD_COMMENT
- ]);
- }
-
void test_assignableExpression_arguments_normal_chain_typeArguments() {
_validate_assignableExpression_arguments_normal_chain_typeArguments(
"a<E>(b)<F>(c).d<G>(e).f");
@@ -4372,37 +4231,6 @@
]);
}
- void test_method_invalidTypeParameterComments() {
- enableGenericMethodComments = true;
- createParser('void m/*<E, hello!>*/() {}');
- ClassMember member = parser.parseClassMember('C');
- expectNotNullIfNoErrors(member);
- // TODO(brianwilkerson) Seems like this ought to be expecting a single
- // extraneous token error (for the bang).
- if (usingFastaParser) {
- listener.assertErrors([
- expectedError(ParserErrorCode.EXPECTED_TOKEN, 0, 0) /*>*/,
- expectedError(ParserErrorCode.MISSING_IDENTIFIER, 0, 0),
- expectedError(ParserErrorCode.EXPECTED_TOKEN, 0, 0) /*(*/,
- expectedError(ParserErrorCode.EXPECTED_TOKEN, 0, 0) /*)*/,
- expectedError(ParserErrorCode.MISSING_FUNCTION_BODY, 0, 0)
- ]);
- } else {
- listener.assertErrorsWithCodes([
- ParserErrorCode.EXPECTED_TOKEN /*>*/,
- ParserErrorCode.MISSING_IDENTIFIER,
- ParserErrorCode.EXPECTED_TOKEN /*(*/,
- ParserErrorCode.EXPECTED_TOKEN /*)*/,
- ParserErrorCode.MISSING_FUNCTION_BODY,
- HintCode.GENERIC_METHOD_COMMENT
- ]);
- }
- expect(member, new TypeMatcher<MethodDeclaration>());
- MethodDeclaration method = member;
- expect(method.typeParameters.toString(), '<E, hello>',
- reason: 'parser recovers what it can');
- }
-
void test_method_invalidTypeParameterExtends() {
// Regression test for https://github.com/dart-lang/sdk/issues/25739.
@@ -4426,45 +4254,6 @@
reason: 'parser recovers what it can');
}
- void test_method_invalidTypeParameterExtendsComment() {
- // Regression test for https://github.com/dart-lang/sdk/issues/25739.
-
- // TODO(jmesserly): ideally we'd be better at parser recovery here.
- // Also, this behavior is slightly different from how we would parse a
- // normal generic method, because we "discover" the comment at a different
- // point in the parser. This has a slight effect on the AST that results
- // from error recovery.
- enableGenericMethodComments = true;
- createParser('f/*<E>*/(dynamic/*=E extends num*/p);');
- ClassMember member = parser.parseClassMember('C');
- expectNotNullIfNoErrors(member);
- if (usingFastaParser) {
- listener.assertErrors([
- expectedError(
- ParserErrorCode.MISSING_IDENTIFIER, 0, 0), // `extends` is a keyword
- expectedError(ParserErrorCode.EXPECTED_TOKEN, 0, 0), // comma
- expectedError(
- ParserErrorCode.MISSING_IDENTIFIER, 0, 0), // `extends` is a keyword
- expectedError(ParserErrorCode.EXPECTED_TOKEN, 0, 0), // close paren
- expectedError(ParserErrorCode.MISSING_FUNCTION_BODY, 0, 0)
- ]);
- } else {
- listener.assertErrorsWithCodes([
- ParserErrorCode.MISSING_IDENTIFIER, // `extends` is a keyword
- ParserErrorCode.EXPECTED_TOKEN, // comma
- ParserErrorCode.MISSING_IDENTIFIER, // `extends` is a keyword
- ParserErrorCode.EXPECTED_TOKEN, // close paren
- ParserErrorCode.MISSING_FUNCTION_BODY,
- HintCode.GENERIC_METHOD_COMMENT,
- HintCode.GENERIC_METHOD_COMMENT
- ]);
- }
- expect(member, new TypeMatcher<MethodDeclaration>());
- MethodDeclaration method = member;
- expect(method.parameters.toString(), '(E extends, extends)',
- reason: 'parser recovers what it can');
- }
-
void test_method_invalidTypeParameters() {
// TODO(jmesserly): ideally we'd be better at parser recovery here.
// It doesn't try to advance past the invalid token `!` to find the
@@ -6043,28 +5832,6 @@
expect(propertyAccess.propertyName, isNotNull);
}
- void
- test_parseAssignableExpression_expression_args_dot_typeArgumentComments() {
- enableGenericMethodComments = true;
- Expression expression = parseAssignableExpression('(x)/*<F>*/(y).z', false);
- expect(expression, isNotNull);
- if (usingFastaParser) {
- assertNoErrors();
- } else {
- assertErrorsWithCodes([HintCode.GENERIC_METHOD_COMMENT]);
- }
- var propertyAccess = expression as PropertyAccess;
- FunctionExpressionInvocation invocation =
- propertyAccess.target as FunctionExpressionInvocation;
- expect(invocation.function, isNotNull);
- expect(invocation.typeArguments, isNotNull);
- ArgumentList argumentList = invocation.argumentList;
- expect(argumentList, isNotNull);
- expect(argumentList.arguments, hasLength(1));
- expect(propertyAccess.operator, isNotNull);
- expect(propertyAccess.propertyName, isNotNull);
- }
-
void test_parseAssignableExpression_expression_args_dot_typeArguments() {
Expression expression = parseAssignableExpression('(x)<F>(y).z', false);
expect(expression, isNotNull);
@@ -6135,27 +5902,6 @@
expect(propertyAccess.propertyName, isNotNull);
}
- void
- test_parseAssignableExpression_identifier_args_dot_typeArgumentComments() {
- enableGenericMethodComments = true;
- Expression expression = parseAssignableExpression('x/*<E>*/(y).z', false);
- expect(expression, isNotNull);
- if (usingFastaParser) {
- assertNoErrors();
- } else {
- assertErrorsWithCodes([HintCode.GENERIC_METHOD_COMMENT]);
- }
- var propertyAccess = expression as PropertyAccess;
- MethodInvocation invocation = propertyAccess.target as MethodInvocation;
- expect(invocation.methodName.name, "x");
- expect(invocation.typeArguments, isNotNull);
- ArgumentList argumentList = invocation.argumentList;
- expect(argumentList, isNotNull);
- expect(argumentList.arguments, hasLength(1));
- expect(propertyAccess.operator, isNotNull);
- expect(propertyAccess.propertyName, isNotNull);
- }
-
void test_parseAssignableExpression_identifier_args_dot_typeArguments() {
Expression expression = parseAssignableExpression('x<E>(y).z', false);
expect(expression, isNotNull);
@@ -6356,21 +6102,6 @@
expect(section.argumentList, isNotNull);
}
- void test_parseCascadeSection_ia_typeArgumentComments() {
- enableGenericMethodComments = true;
- Expression expression = parseCascadeSection('..[i]/*<E>*/(b)');
- expect(expression, isNotNull);
- if (usingFastaParser) {
- assertNoErrors();
- } else {
- assertErrorsWithCodes([HintCode.GENERIC_METHOD_COMMENT]);
- }
- var section = expression as FunctionExpressionInvocation;
- expect(section.function, new TypeMatcher<IndexExpression>());
- expect(section.typeArguments, isNotNull);
- expect(section.argumentList, isNotNull);
- }
-
void test_parseCascadeSection_ia_typeArguments() {
Expression expression = parseCascadeSection('..[i]<E>(b)');
expect(expression, isNotNull);
@@ -6394,25 +6125,6 @@
expect(section.argumentList.arguments, hasLength(1));
}
- void test_parseCascadeSection_ii_typeArgumentComments() {
- enableGenericMethodComments = true;
- Expression expression = parseCascadeSection('..a/*<E>*/(b).c/*<F>*/(d)');
- expect(expression, isNotNull);
- if (usingFastaParser) {
- assertNoErrors();
- } else {
- assertErrorsWithCodes(
- [HintCode.GENERIC_METHOD_COMMENT, HintCode.GENERIC_METHOD_COMMENT]);
- }
- var section = expression as MethodInvocation;
- expect(section.target, new TypeMatcher<MethodInvocation>());
- expect(section.operator, isNotNull);
- expect(section.methodName, isNotNull);
- expect(section.typeArguments, isNotNull);
- expect(section.argumentList, isNotNull);
- expect(section.argumentList.arguments, hasLength(1));
- }
-
void test_parseCascadeSection_ii_typeArguments() {
Expression expression = parseCascadeSection('..a<E>(b).c<F>(d)');
expect(expression, isNotNull);
@@ -6459,19 +6171,6 @@
(obj) => obj is IntegerLiteral, IntegerLiteral, rhs);
}
- void test_parseCascadeSection_p_assign_withCascade_typeArgumentComments() {
- enableGenericMethodComments = true;
- Expression expression = parseCascadeSection('..a = 3..m/*<E>*/()');
- expect(expression, isNotNull);
- assertNoErrors();
- var section = expression as AssignmentExpression;
- expect(section.leftHandSide, isNotNull);
- expect(section.operator, isNotNull);
- Expression rhs = section.rightHandSide;
- EngineTestCase.assertInstanceOf(
- (obj) => obj is IntegerLiteral, IntegerLiteral, rhs);
- }
-
void test_parseCascadeSection_p_assign_withCascade_typeArguments() {
Expression expression = parseCascadeSection('..a = 3..m<E>()');
expect(expression, isNotNull);
@@ -6507,24 +6206,6 @@
expect(section.argumentList.arguments, hasLength(1));
}
- void test_parseCascadeSection_pa_typeArgumentComments() {
- enableGenericMethodComments = true;
- Expression expression = parseCascadeSection('..a/*<E>*/(b)');
- expect(expression, isNotNull);
- if (usingFastaParser) {
- assertNoErrors();
- } else {
- assertErrorsWithCodes([HintCode.GENERIC_METHOD_COMMENT]);
- }
- var section = expression as MethodInvocation;
- expect(section.target, isNull);
- expect(section.operator, isNotNull);
- expect(section.methodName, isNotNull);
- expect(section.typeArguments, isNotNull);
- expect(section.argumentList, isNotNull);
- expect(section.argumentList.arguments, hasLength(1));
- }
-
void test_parseCascadeSection_pa_typeArguments() {
Expression expression = parseCascadeSection('..a<E>(b)');
expect(expression, isNotNull);
@@ -6549,23 +6230,6 @@
expect(section.argumentList.arguments, hasLength(1));
}
- void test_parseCascadeSection_paa_typeArgumentComments() {
- enableGenericMethodComments = true;
- Expression expression = parseCascadeSection('..a/*<E>*/(b)/*<F>*/(c)');
- expect(expression, isNotNull);
- if (usingFastaParser) {
- assertNoErrors();
- } else {
- assertErrorsWithCodes(
- [HintCode.GENERIC_METHOD_COMMENT, HintCode.GENERIC_METHOD_COMMENT]);
- }
- var section = expression as FunctionExpressionInvocation;
- expect(section.function, new TypeMatcher<MethodInvocation>());
- expect(section.typeArguments, isNotNull);
- expect(section.argumentList, isNotNull);
- expect(section.argumentList.arguments, hasLength(1));
- }
-
void test_parseCascadeSection_paa_typeArguments() {
Expression expression = parseCascadeSection('..a<E>(b)<F>(c)');
expect(expression, isNotNull);
@@ -6588,28 +6252,6 @@
expect(section.argumentList.arguments, hasLength(1));
}
- void test_parseCascadeSection_paapaa_typeArgumentComments() {
- enableGenericMethodComments = true;
- Expression expression =
- parseCascadeSection('..a/*<E>*/(b)/*<F>*/(c).d/*<G>*/(e)/*<H>*/(f)');
- expect(expression, isNotNull);
- if (usingFastaParser) {
- assertNoErrors();
- } else {
- assertErrorsWithCodes([
- HintCode.GENERIC_METHOD_COMMENT,
- HintCode.GENERIC_METHOD_COMMENT,
- HintCode.GENERIC_METHOD_COMMENT,
- HintCode.GENERIC_METHOD_COMMENT
- ]);
- }
- var section = expression as FunctionExpressionInvocation;
- expect(section.function, new TypeMatcher<MethodInvocation>());
- expect(section.typeArguments, isNotNull);
- expect(section.argumentList, isNotNull);
- expect(section.argumentList.arguments, hasLength(1));
- }
-
void test_parseCascadeSection_paapaa_typeArguments() {
Expression expression =
parseCascadeSection('..a<E>(b)<F>(c).d<G>(e)<H>(f)');
@@ -6632,21 +6274,6 @@
expect(section.propertyName, isNotNull);
}
- void test_parseCascadeSection_pap_typeArgumentComments() {
- enableGenericMethodComments = true;
- Expression expression = parseCascadeSection('..a/*<E>*/(b).c');
- expect(expression, isNotNull);
- if (usingFastaParser) {
- assertNoErrors();
- } else {
- assertErrorsWithCodes([HintCode.GENERIC_METHOD_COMMENT]);
- }
- var section = expression as PropertyAccess;
- expect(section.target, isNotNull);
- expect(section.operator, isNotNull);
- expect(section.propertyName, isNotNull);
- }
-
void test_parseCascadeSection_pap_typeArguments() {
Expression expression = parseCascadeSection('..a<E>(b).c');
expect(expression, isNotNull);
@@ -6695,23 +6322,6 @@
expect(literal.rightBracket, isNotNull);
}
- void test_parseConstExpression_listLiteral_typed_genericComment() {
- enableGenericMethodComments = true;
- Expression expression = parseConstExpression('const /*<A>*/ []');
- expect(expression, isNotNull);
- if (usingFastaParser) {
- assertNoErrors();
- } else {
- assertErrorsWithCodes([HintCode.GENERIC_METHOD_COMMENT]);
- }
- var literal = expression as ListLiteral;
- expect(literal.constKeyword, isNotNull);
- expect(literal.typeArguments, isNotNull);
- expect(literal.leftBracket, isNotNull);
- expect(literal.elements, hasLength(0));
- expect(literal.rightBracket, isNotNull);
- }
-
void test_parseConstExpression_listLiteral_untyped() {
Expression expression = parseConstExpression('const []');
expect(expression, isNotNull);
@@ -6735,22 +6345,6 @@
expect(literal.typeArguments, isNotNull);
}
- void test_parseConstExpression_mapLiteral_typed_genericComment() {
- enableGenericMethodComments = true;
- Expression expression = parseConstExpression('const /*<A, B>*/ {}');
- expect(expression, isNotNull);
- if (usingFastaParser) {
- assertNoErrors();
- } else {
- assertErrorsWithCodes([HintCode.GENERIC_METHOD_COMMENT]);
- }
- var literal = expression as MapLiteral;
- expect(literal.leftBracket, isNotNull);
- expect(literal.entries, hasLength(0));
- expect(literal.rightBracket, isNotNull);
- expect(literal.typeArguments, isNotNull);
- }
-
void test_parseConstExpression_mapLiteral_typed_missingGt() {
Expression expression = parseExpression('const <A, B {}',
errors: [expectedError(ParserErrorCode.EXPECTED_TOKEN, 10, 1)]);
@@ -6893,6 +6487,56 @@
expect(invocation.argumentList, isNotNull);
}
+ void test_parseExpression_sendWithTypeParam_afterIndex() {
+ final unit = parseCompilationUnit('main() { factories[C]<num, int>(); }');
+ expect(unit.declarations, hasLength(1));
+ FunctionDeclaration mainMethod = unit.declarations[0];
+ BlockFunctionBody body = mainMethod.functionExpression.body;
+ NodeList<Statement> statements = body.block.statements;
+ expect(statements, hasLength(1));
+ ExpressionStatement statement = statements[0];
+ FunctionExpressionInvocation expression = statement.expression;
+
+ IndexExpression function = expression.function;
+ SimpleIdentifier target = function.target;
+ expect(target.name, 'factories');
+ SimpleIdentifier index = function.index;
+ expect(index.name, 'C');
+
+ NodeList<TypeAnnotation> typeArguments = expression.typeArguments.arguments;
+ expect(typeArguments, hasLength(2));
+ expect((typeArguments[0] as NamedType).name.name, 'num');
+ expect((typeArguments[1] as NamedType).name.name, 'int');
+
+ expect(expression.argumentList.arguments, hasLength(0));
+ }
+
+ void test_parseExpression_sendWithTypeParam_afterSend() {
+ final unit = parseCompilationUnit('main() { factories(C)<num, int>(); }');
+ expect(unit.declarations, hasLength(1));
+ FunctionDeclaration mainMethod = unit.declarations[0];
+ BlockFunctionBody body = mainMethod.functionExpression.body;
+ NodeList<Statement> statements = body.block.statements;
+ expect(statements, hasLength(1));
+ ExpressionStatement statement = statements[0];
+ FunctionExpressionInvocation expression = statement.expression;
+
+ MethodInvocation invocation = expression.function;
+ expect(invocation.methodName.name, 'factories');
+ NodeList<Expression> invocationArguments =
+ invocation.argumentList.arguments;
+ expect(invocationArguments, hasLength(1));
+ SimpleIdentifier index = invocationArguments[0];
+ expect(index.name, 'C');
+
+ NodeList<TypeAnnotation> typeArguments = expression.typeArguments.arguments;
+ expect(typeArguments, hasLength(2));
+ expect((typeArguments[0] as NamedType).name.name, 'num');
+ expect((typeArguments[1] as NamedType).name.name, 'int');
+
+ expect(expression.argumentList.arguments, hasLength(0));
+ }
+
void test_parseExpression_superMethodInvocation() {
Expression expression = parseExpression('super.m()');
var invocation = expression as MethodInvocation;
@@ -6902,18 +6546,6 @@
expect(invocation.argumentList, isNotNull);
}
- void test_parseExpression_superMethodInvocation_typeArgumentComments() {
- enableGenericMethodComments = true;
- Expression expression;
- expression = parseExpression('super.m/*<E>*/()',
- codes: usingFastaParser ? [] : [HintCode.GENERIC_METHOD_COMMENT]);
- var invocation = expression as MethodInvocation;
- expect(invocation.target, isNotNull);
- expect(invocation.methodName, isNotNull);
- expect(invocation.typeArguments, isNotNull);
- expect(invocation.argumentList, isNotNull);
- }
-
void test_parseExpression_superMethodInvocation_typeArguments() {
Expression expression = parseExpression('super.m<E>()');
var invocation = expression as MethodInvocation;
@@ -6983,23 +6615,6 @@
}
void
- test_parseExpressionWithoutCascade_superMethodInvocation_typeArgumentComments() {
- enableGenericMethodComments = true;
- Expression expression = parseExpressionWithoutCascade('super.m/*<E>*/()');
- expect(expression, isNotNull);
- if (usingFastaParser) {
- assertNoErrors();
- } else {
- assertErrorsWithCodes([HintCode.GENERIC_METHOD_COMMENT]);
- }
- var invocation = expression as MethodInvocation;
- expect(invocation.target, isNotNull);
- expect(invocation.methodName, isNotNull);
- expect(invocation.typeArguments, isNotNull);
- expect(invocation.argumentList, isNotNull);
- }
-
- void
test_parseExpressionWithoutCascade_superMethodInvocation_typeArguments() {
Expression expression = parseExpressionWithoutCascade('super.m<E>()');
expect(expression, isNotNull);
@@ -7058,25 +6673,6 @@
}
}
- void test_parseFunctionExpression_typeParameterComments() {
- enableGenericMethodComments = true;
- FunctionExpression expression =
- parseFunctionExpression('/*<E>*/(/*=E*/ i) => i++');
- expect(expression, isNotNull);
- if (usingFastaParser) {
- assertNoErrors();
- } else {
- assertErrorsWithCodes(
- [HintCode.GENERIC_METHOD_COMMENT, HintCode.GENERIC_METHOD_COMMENT]);
- }
- expect(expression.body, isNotNull);
- expect(expression.typeParameters, isNotNull);
- expect(expression.parameters, isNotNull);
- expect((expression.body as ExpressionFunctionBody).semicolon, isNull);
- SimpleFormalParameter p = expression.parameters.parameters[0];
- expect(p.type, isNotNull);
- }
-
void test_parseFunctionExpression_typeParameters() {
FunctionExpression expression = parseFunctionExpression('<E>(E i) => i++');
expect(expression, isNotNull);
@@ -7122,29 +6718,6 @@
}
void
- test_parseInstanceCreationExpression_qualifiedType_named_typeArgumentComments() {
- enableGenericMethodComments = true;
- Token token = TokenFactory.tokenFromKeyword(Keyword.NEW);
- InstanceCreationExpression expression =
- parseInstanceCreationExpression('A.B/*<E>*/.c()', token);
- expect(expression, isNotNull);
- if (usingFastaParser) {
- assertNoErrors();
- } else {
- assertErrorsWithCodes([HintCode.GENERIC_METHOD_COMMENT]);
- }
- expect(expression.keyword.keyword, Keyword.NEW);
- ConstructorName name = expression.constructorName;
- expect(name, isNotNull);
- TypeName type = name.type;
- expect(type, isNotNull);
- expect(type.typeArguments.arguments, hasLength(1));
- expect(name.period, isNotNull);
- expect(name.name, isNotNull);
- expect(expression.argumentList, isNotNull);
- }
-
- void
test_parseInstanceCreationExpression_qualifiedType_named_typeArguments() {
Token token = TokenFactory.tokenFromKeyword(Keyword.NEW);
InstanceCreationExpression expression =
@@ -7162,29 +6735,6 @@
expect(expression.argumentList, isNotNull);
}
- void
- test_parseInstanceCreationExpression_qualifiedType_typeArgumentComments() {
- enableGenericMethodComments = true;
- Token token = TokenFactory.tokenFromKeyword(Keyword.NEW);
- InstanceCreationExpression expression =
- parseInstanceCreationExpression('A.B/*<E>*/()', token);
- expect(expression, isNotNull);
- if (usingFastaParser) {
- assertNoErrors();
- } else {
- assertErrorsWithCodes([HintCode.GENERIC_METHOD_COMMENT]);
- }
- expect(expression.keyword.keyword, Keyword.NEW);
- ConstructorName name = expression.constructorName;
- expect(name, isNotNull);
- TypeName type = name.type;
- expect(type, isNotNull);
- expect(type.typeArguments.arguments, hasLength(1));
- expect(name.period, isNull);
- expect(name.name, isNull);
- expect(expression.argumentList, isNotNull);
- }
-
void test_parseInstanceCreationExpression_qualifiedType_typeArguments() {
Token token = TokenFactory.tokenFromKeyword(Keyword.NEW);
InstanceCreationExpression expression =
@@ -7236,28 +6786,6 @@
expect(expression.argumentList, isNotNull);
}
- void test_parseInstanceCreationExpression_type_named_typeArgumentComments() {
- enableGenericMethodComments = true;
- Token token = TokenFactory.tokenFromKeyword(Keyword.NEW);
- InstanceCreationExpression expression =
- parseInstanceCreationExpression('A/*<B>*/.c()', token);
- expect(expression, isNotNull);
- if (usingFastaParser) {
- assertNoErrors();
- } else {
- assertErrorsWithCodes([HintCode.GENERIC_METHOD_COMMENT]);
- }
- expect(expression.keyword.keyword, Keyword.NEW);
- ConstructorName name = expression.constructorName;
- expect(name, isNotNull);
- TypeName type = name.type;
- expect(type, isNotNull);
- expect(type.typeArguments.arguments, hasLength(1));
- expect(name.period, isNotNull);
- expect(name.name, isNotNull);
- expect(expression.argumentList, isNotNull);
- }
-
void test_parseInstanceCreationExpression_type_named_typeArguments() {
Token token = TokenFactory.tokenFromKeyword(Keyword.NEW);
InstanceCreationExpression expression =
@@ -7275,29 +6803,6 @@
expect(expression.argumentList, isNotNull);
}
- void test_parseInstanceCreationExpression_type_typeArgumentComments() {
- enableGenericMethodComments = true;
- Token token = TokenFactory.tokenFromKeyword(Keyword.NEW);
- InstanceCreationExpression expression =
- parseInstanceCreationExpression('A/*<B>*/()', token);
- expect(expression, isNotNull);
-
- if (usingFastaParser) {
- assertNoErrors();
- } else {
- assertErrorsWithCodes([HintCode.GENERIC_METHOD_COMMENT]);
- }
- expect(expression.keyword.keyword, Keyword.NEW);
- ConstructorName name = expression.constructorName;
- expect(name, isNotNull);
- TypeName type = name.type;
- expect(type, isNotNull);
- expect(type.typeArguments.arguments, hasLength(1));
- expect(name.period, isNull);
- expect(name.name, isNull);
- expect(expression.argumentList, isNotNull);
- }
-
void test_parseInstanceCreationExpression_type_typeArguments() {
Token token = TokenFactory.tokenFromKeyword(Keyword.NEW);
InstanceCreationExpression expression =
@@ -7602,24 +7107,6 @@
}
void
- test_parsePostfixExpression_none_methodInvocation_question_dot_typeArgumentComments() {
- enableGenericMethodComments = true;
- Expression expression = parsePostfixExpression('a?.m/*<E>*/()');
- expect(expression, isNotNull);
- if (usingFastaParser) {
- assertNoErrors();
- } else {
- assertErrorsWithCodes([HintCode.GENERIC_METHOD_COMMENT]);
- }
- var methodInvocation = expression as MethodInvocation;
- expect(methodInvocation.target, isNotNull);
- expect(methodInvocation.operator.type, TokenType.QUESTION_PERIOD);
- expect(methodInvocation.methodName, isNotNull);
- expect(methodInvocation.typeArguments, isNotNull);
- expect(methodInvocation.argumentList, isNotNull);
- }
-
- void
test_parsePostfixExpression_none_methodInvocation_question_dot_typeArguments() {
Expression expression = parsePostfixExpression('a?.m<E>()');
expect(expression, isNotNull);
@@ -7632,24 +7119,6 @@
expect(methodInvocation.argumentList, isNotNull);
}
- void
- test_parsePostfixExpression_none_methodInvocation_typeArgumentComments() {
- enableGenericMethodComments = true;
- Expression expression = parsePostfixExpression('a.m/*<E>*/()');
- expect(expression, isNotNull);
- if (usingFastaParser) {
- assertNoErrors();
- } else {
- assertErrorsWithCodes([HintCode.GENERIC_METHOD_COMMENT]);
- }
- var methodInvocation = expression as MethodInvocation;
- expect(methodInvocation.target, isNotNull);
- expect(methodInvocation.operator.type, TokenType.PERIOD);
- expect(methodInvocation.methodName, isNotNull);
- expect(methodInvocation.typeArguments, isNotNull);
- expect(methodInvocation.argumentList, isNotNull);
- }
-
void test_parsePostfixExpression_none_methodInvocation_typeArguments() {
Expression expression = parsePostfixExpression('a.m<E>()');
expect(expression, isNotNull);
@@ -7798,20 +7267,6 @@
expect(literal.typeArguments.arguments, hasLength(1));
}
- void test_parsePrimaryExpression_listLiteral_typed_genericComment() {
- enableGenericMethodComments = true;
- Expression expression = parsePrimaryExpression('/*<A>*/[ ]');
- expect(expression, isNotNull);
- if (usingFastaParser) {
- assertNoErrors();
- } else {
- assertErrorsWithCodes([HintCode.GENERIC_METHOD_COMMENT]);
- }
- var literal = expression as ListLiteral;
- expect(literal.typeArguments, isNotNull);
- expect(literal.typeArguments.arguments, hasLength(1));
- }
-
void test_parsePrimaryExpression_mapLiteral() {
Expression expression = parsePrimaryExpression('{}');
expect(expression, isNotNull);
@@ -7830,20 +7285,6 @@
expect(literal.typeArguments.arguments, hasLength(2));
}
- void test_parsePrimaryExpression_mapLiteral_typed_genericComment() {
- enableGenericMethodComments = true;
- Expression expression = parsePrimaryExpression('/*<A, B>*/{}');
- expect(expression, isNotNull);
- if (usingFastaParser) {
- assertNoErrors();
- } else {
- assertErrorsWithCodes([HintCode.GENERIC_METHOD_COMMENT]);
- }
- var literal = expression as MapLiteral;
- expect(literal.typeArguments, isNotNull);
- expect(literal.typeArguments.arguments, hasLength(2));
- }
-
void test_parsePrimaryExpression_new() {
Expression expression = parsePrimaryExpression('new A()');
expect(expression, isNotNull);
@@ -9645,19 +9086,6 @@
expect(functionParameter.parameters, isNotNull);
}
- void test_parseNormalFormalParameter_function_noType_typeParameterComments() {
- enableGenericMethodComments = true;
- NormalFormalParameter parameter = parseNormalFormalParameter('a/*<E>*/()',
- errorCodes: usingFastaParser ? [] : [HintCode.GENERIC_METHOD_COMMENT]);
- expect(parameter, isNotNull);
- expect(parameter, new TypeMatcher<FunctionTypedFormalParameter>());
- FunctionTypedFormalParameter functionParameter = parameter;
- expect(functionParameter.returnType, isNull);
- expect(functionParameter.identifier, isNotNull);
- expect(functionParameter.typeParameters, isNotNull);
- expect(functionParameter.parameters, isNotNull);
- }
-
void test_parseNormalFormalParameter_function_noType_typeParameters() {
NormalFormalParameter parameter = parseNormalFormalParameter('a<E>()');
expect(parameter, isNotNull);
@@ -9685,20 +9113,6 @@
expect(functionParameter.question, isNull);
}
- void test_parseNormalFormalParameter_function_type_typeParameterComments() {
- enableGenericMethodComments = true;
- NormalFormalParameter parameter = parseNormalFormalParameter('A a/*<E>*/()',
- errorCodes: usingFastaParser ? [] : [HintCode.GENERIC_METHOD_COMMENT]);
- expect(parameter, isNotNull);
- expect(parameter, new TypeMatcher<FunctionTypedFormalParameter>());
- FunctionTypedFormalParameter functionParameter = parameter;
- expect(functionParameter.returnType, isNotNull);
- expect(functionParameter.identifier, isNotNull);
- expect(functionParameter.typeParameters, isNotNull);
- expect(functionParameter.parameters, isNotNull);
- expect(functionParameter.question, isNull);
- }
-
void test_parseNormalFormalParameter_function_type_typeParameters() {
NormalFormalParameter parameter = parseNormalFormalParameter('A a<E>()');
expect(parameter, isNotNull);
@@ -9739,21 +9153,6 @@
expect(functionParameter.question, isNull);
}
- void test_parseNormalFormalParameter_function_void_typeParameterComments() {
- enableGenericMethodComments = true;
- NormalFormalParameter parameter = parseNormalFormalParameter(
- 'void a/*<E>*/()',
- errorCodes: usingFastaParser ? [] : [HintCode.GENERIC_METHOD_COMMENT]);
- expect(parameter, isNotNull);
- expect(parameter, new TypeMatcher<FunctionTypedFormalParameter>());
- FunctionTypedFormalParameter functionParameter = parameter;
- expect(functionParameter.returnType, isNotNull);
- expect(functionParameter.identifier, isNotNull);
- expect(functionParameter.typeParameters, isNotNull);
- expect(functionParameter.parameters, isNotNull);
- expect(functionParameter.question, isNull);
- }
-
void test_parseNormalFormalParameter_function_void_typeParameters() {
NormalFormalParameter parameter = parseNormalFormalParameter('void a<E>()');
expect(parameter, isNotNull);
@@ -9916,11 +9315,6 @@
bool parseAsync = true;
/**
- * Whether generic method comments should be enabled for the test.
- */
- bool enableGenericMethodComments = false;
-
- /**
* A flag indicating whether lazy assignment operators should be enabled for
* the test.
*/
@@ -9939,6 +9333,12 @@
bool enableOptionalNewAndConst = false;
/**
+ * A flag indicating whether the parser should parse mixin declarations.
+ * https://github.com/dart-lang/language/issues/12
+ */
+ bool isMixinSupportEnabled = false;
+
+ /**
* A flag indicating whether the parser is to parse part-of directives that
* specify a URI rather than a library name.
*/
@@ -9986,7 +9386,6 @@
//
ScannerResult result = scanString(content,
includeComments: true,
- scanGenericMethodComments: enableGenericMethodComments,
scanLazyAssignmentOperators: enableLazyAssignmentOperators);
Token token = result.tokens;
if (result.hasErrors) {
@@ -10003,10 +9402,13 @@
//
parser = new Parser(source, listener);
parser.allowNativeClause = allowNativeClause;
- parser.parseGenericMethodComments = enableGenericMethodComments;
parser.parseFunctionBodies = parseFunctionBodies;
parser.enableNnbd = enableNnbd;
parser.enableOptionalNewAndConst = enableOptionalNewAndConst;
+ if (parser is ParserAdapter) {
+ (parser as ParserAdapter).fastaParser.isMixinSupportEnabled =
+ isMixinSupportEnabled;
+ }
parser.currentToken = token;
}
@@ -10139,7 +9541,6 @@
//
ScannerResult result = scanString(content,
includeComments: true,
- scanGenericMethodComments: enableGenericMethodComments,
scanLazyAssignmentOperators: enableLazyAssignmentOperators);
Token token = result.tokens;
if (result.hasErrors) {
@@ -10154,6 +9555,9 @@
Parser parser = new Parser(source, listener);
parser.enableOptionalNewAndConst = enableOptionalNewAndConst;
+ if (parser is ParserAdapter) {
+ parser.fastaParser.isMixinSupportEnabled = isMixinSupportEnabled;
+ }
CompilationUnit unit = parser.parseCompilationUnit(token);
expect(unit, isNotNull);
if (codes != null) {
@@ -10185,7 +9589,6 @@
//
ScannerResult result = scanString(content,
includeComments: true,
- scanGenericMethodComments: enableGenericMethodComments,
scanLazyAssignmentOperators: enableLazyAssignmentOperators);
Token token = result.tokens;
if (result.hasErrors) {
@@ -10539,7 +9942,6 @@
//
ScannerResult result = scanString(content,
includeComments: true,
- scanGenericMethodComments: enableGenericMethodComments,
scanLazyAssignmentOperators: enableLazyAssignmentOperators);
Token token = result.tokens;
if (result.hasErrors) {
@@ -10553,7 +9955,6 @@
listener.setLineInfo(source, result.lineStarts);
Parser parser = new Parser(source, listener);
- parser.parseGenericMethodComments = enableGenericMethodComments;
parser.enableOptionalNewAndConst = enableOptionalNewAndConst;
Statement statement = parser.parseStatement(token);
expect(statement, isNotNull);
@@ -10586,7 +9987,6 @@
// Scan the source.
//
ScannerResult result = scanString(content,
- scanGenericMethodComments: enableGenericMethodComments,
scanLazyAssignmentOperators: enableLazyAssignmentOperators);
Token token = result.tokens;
if (result.hasErrors) {
@@ -15598,27 +14998,6 @@
expect(statement.functionDeclaration, isNotNull);
}
- void test_parseFunctionDeclarationStatement_typeParameterComments() {
- enableGenericMethodComments = true;
- var statement = parseStatement('/*=E*/ f/*<E>*/(/*=E*/ p) => p * 2;')
- as FunctionDeclarationStatement;
- if (usingFastaParser) {
- assertNoErrors();
- } else {
- assertErrorsWithCodes([
- HintCode.GENERIC_METHOD_COMMENT,
- HintCode.GENERIC_METHOD_COMMENT,
- HintCode.GENERIC_METHOD_COMMENT
- ]);
- }
- FunctionDeclaration f = statement.functionDeclaration;
- expect(f, isNotNull);
- expect(f.functionExpression.typeParameters, isNotNull);
- expect(f.returnType, isNotNull);
- SimpleFormalParameter p = f.functionExpression.parameters.parameters[0];
- expect(p.type, isNotNull);
- }
-
void test_parseFunctionDeclarationStatement_typeParameters() {
var statement =
parseStatement('E f<E>(E p) => p * 2;') as FunctionDeclarationStatement;
@@ -15982,21 +15361,6 @@
expect(statement.expression, isNotNull);
}
- void
- test_parseStatement_functionDeclaration_noReturnType_typeParameterComments() {
- enableGenericMethodComments = true;
- var statement =
- parseStatement('f/*<E>*/(a, b) {}') as FunctionDeclarationStatement;
- if (usingFastaParser) {
- assertNoErrors();
- } else {
- assertErrorsWithCodes([HintCode.GENERIC_METHOD_COMMENT]);
- }
- expect(statement.functionDeclaration, isNotNull);
- expect(statement.functionDeclaration.functionExpression.typeParameters,
- isNotNull);
- }
-
void test_parseStatement_functionDeclaration_noReturnType_typeParameters() {
var statement =
parseStatement('f<E>(a, b) {}') as FunctionDeclarationStatement;
@@ -16372,30 +15736,6 @@
expect(declarationList.variables, hasLength(1));
}
- void test_parseVariableDeclarationListAfterMetadata_const_typeComment() {
- enableGenericMethodComments = true;
- var declarationList = parseVariableDeclarationList('const/*=T*/ a');
- if (usingFastaParser) {
- assertNoErrors();
- } else {
- assertErrorsWithCodes([HintCode.GENERIC_METHOD_COMMENT]);
- }
- expect((declarationList.type as TypeName).name.name, 'T');
- expect(declarationList.isConst, true);
- }
-
- void test_parseVariableDeclarationListAfterMetadata_dynamic_typeComment() {
- enableGenericMethodComments = true;
- var declarationList = parseVariableDeclarationList('dynamic/*=T*/ a');
- if (usingFastaParser) {
- assertNoErrors();
- } else {
- assertErrorsWithCodes([HintCode.GENERIC_METHOD_COMMENT]);
- }
- expect((declarationList.type as TypeName).name.name, 'T');
- expect(declarationList.keyword, isNull);
- }
-
void test_parseVariableDeclarationListAfterMetadata_final_noType() {
var declarationList = parseVariableDeclarationList('final a');
assertNoErrors();
@@ -16412,18 +15752,6 @@
expect(declarationList.variables, hasLength(1));
}
- void test_parseVariableDeclarationListAfterMetadata_final_typeComment() {
- enableGenericMethodComments = true;
- var declarationList = parseVariableDeclarationList('final/*=T*/ a');
- if (usingFastaParser) {
- assertNoErrors();
- } else {
- assertErrorsWithCodes([HintCode.GENERIC_METHOD_COMMENT]);
- }
- expect((declarationList.type as TypeName).name.name, 'T');
- expect(declarationList.isFinal, true);
- }
-
void test_parseVariableDeclarationListAfterMetadata_type_multiple() {
var declarationList = parseVariableDeclarationList('A a, b, c');
assertNoErrors();
@@ -16440,18 +15768,6 @@
expect(declarationList.variables, hasLength(1));
}
- void test_parseVariableDeclarationListAfterMetadata_type_typeComment() {
- enableGenericMethodComments = true;
- var declarationList = parseVariableDeclarationList('int/*=T*/ a');
- if (usingFastaParser) {
- assertNoErrors();
- } else {
- assertErrorsWithCodes([HintCode.GENERIC_METHOD_COMMENT]);
- }
- expect((declarationList.type as TypeName).name.name, 'T');
- expect(declarationList.keyword, isNull);
- }
-
void test_parseVariableDeclarationListAfterMetadata_var_multiple() {
var declarationList = parseVariableDeclarationList('var a, b, c');
assertNoErrors();
@@ -16468,18 +15784,6 @@
expect(declarationList.variables, hasLength(1));
}
- void test_parseVariableDeclarationListAfterMetadata_var_typeComment() {
- enableGenericMethodComments = true;
- var declarationList = parseVariableDeclarationList('var/*=T*/ a');
- if (usingFastaParser) {
- assertNoErrors();
- } else {
- assertErrorsWithCodes([HintCode.GENERIC_METHOD_COMMENT]);
- }
- expect((declarationList.type as TypeName).name.name, 'T');
- expect(declarationList.keyword, isNull);
- }
-
void test_parseVariableDeclarationStatementAfterMetadata_multiple() {
var statement =
parseStatement('var x, y, z;') as VariableDeclarationStatement;
@@ -17911,31 +17215,6 @@
expect(declaration.propertyKeyword, isNull);
}
- void test_parseFunctionDeclaration_functionWithTypeParameters_comment() {
- if (usingFastaParser) {
- // Ignored: Fasta does not support the generic comment syntax.
- return;
- }
- enableGenericMethodComments = true;
- createParser('/// Doc\nT f/*<E>*/() {}');
- FunctionDeclaration declaration = parseFullCompilationUnitMember();
- expect(declaration, isNotNull);
- if (usingFastaParser) {
- assertNoErrors();
- } else {
- assertErrorsWithCodes([HintCode.GENERIC_METHOD_COMMENT]);
- }
- expectCommentText(declaration.documentationComment, '/// Doc');
- expect((declaration.returnType as TypeName).name.name, 'T');
- expect(declaration.name, isNotNull);
- FunctionExpression expression = declaration.functionExpression;
- expect(expression, isNotNull);
- expect(expression.body, isNotNull);
- expect(expression.typeParameters, isNotNull);
- expect(expression.parameters, isNotNull);
- expect(declaration.propertyKeyword, isNull);
- }
-
void test_parseFunctionDeclaration_getter() {
createParser('/// Doc\nT get p => 0;');
FunctionDeclaration declaration = parseFullCompilationUnitMember();
@@ -17952,37 +17231,6 @@
expect(declaration.propertyKeyword, isNotNull);
}
- void test_parseFunctionDeclaration_getter_generic_comment_returnType() {
- if (usingFastaParser) {
- // Ignored: Fasta does not support the generic comment syntax.
- return;
- }
- enableGenericMethodComments = true;
- createParser('/*=T*/ f/*<S, T>*/(/*=S*/ s) => null;');
- var member = parseFullCompilationUnitMember();
- expect(member, isNotNull);
-
- if (usingFastaParser) {
- assertNoErrors();
- } else {
- assertErrorsWithCodes([
- HintCode.GENERIC_METHOD_COMMENT,
- HintCode.GENERIC_METHOD_COMMENT,
- HintCode.GENERIC_METHOD_COMMENT
- ]);
- }
- var functionDeclaration = member as FunctionDeclaration;
- var functionExpression = functionDeclaration.functionExpression;
- expect(functionDeclaration.documentationComment, isNull);
- expect(functionDeclaration.externalKeyword, isNull);
- expect(functionDeclaration.propertyKeyword, isNull);
- expect((functionDeclaration.returnType as TypeName).name.name, 'T');
- expect(functionDeclaration.name, isNotNull);
- expect(functionExpression.typeParameters, isNotNull);
- expect(functionExpression.parameters, isNotNull);
- expect(functionExpression.body, isNotNull);
- }
-
void test_parseFunctionDeclaration_metadata() {
createParser(
'T f(@A a, @B(2) Foo b, {@C.foo(3) c : 0, @d.E.bar(4, 5) x:0}) {}');
diff --git a/pkg/analyzer/test/generated/resolver_kernel_test.dart b/pkg/analyzer/test/generated/resolver_kernel_test.dart
deleted file mode 100644
index 86724f9..0000000
--- a/pkg/analyzer/test/generated/resolver_kernel_test.dart
+++ /dev/null
@@ -1,25 +0,0 @@
-// 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:test_reflective_loader/test_reflective_loader.dart';
-
-import 'resolver_driver_test.dart';
-
-main() {
- defineReflectiveSuite(() {
- defineReflectiveTests(StrictModeTest_Kernel);
- });
-}
-
-@reflectiveTest
-class StrictModeTest_Kernel extends StrictModeTest_Driver {
- @override
- bool get enableKernelDriver => true;
-
- @override
- bool get useCFE => true;
-
- @override
- bool get usingFastaParser => true;
-}
diff --git a/pkg/analyzer/test/generated/resolver_test.dart b/pkg/analyzer/test/generated/resolver_test.dart
index 068fe92..0b44b59 100644
--- a/pkg/analyzer/test/generated/resolver_test.dart
+++ b/pkg/analyzer/test/generated/resolver_test.dart
@@ -214,7 +214,10 @@
Source source = addSource(code);
TestAnalysisResult analysisResult = await computeAnalysisResult(source);
- assertErrors(source, [ParserErrorCode.GETTER_IN_FUNCTION]);
+ assertErrors(source, [
+ ParserErrorCode.MISSING_FUNCTION_PARAMETERS,
+ ParserErrorCode.EXPECTED_TOKEN
+ ]);
CompilationUnitElement unit = analysisResult.unit.declaredElement;
LibraryElement library = unit.library;
@@ -624,11 +627,7 @@
return n & 0x0F;
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [StaticTypeWarningCode.UNDEFINED_METHOD]);
- } else {
- assertErrors(source, [StaticTypeWarningCode.UNDEFINED_OPERATOR]);
- }
+ assertErrors(source, [StaticTypeWarningCode.UNDEFINED_OPERATOR]);
}
test_conditional_and_is() async {
@@ -655,11 +654,7 @@
return (n is! int) ? 0 : n & 0x0F;
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [StaticTypeWarningCode.UNDEFINED_METHOD]);
- } else {
- assertErrors(source, [StaticTypeWarningCode.UNDEFINED_OPERATOR]);
- }
+ assertErrors(source, [StaticTypeWarningCode.UNDEFINED_OPERATOR]);
}
test_conditional_or_is() async {
@@ -668,11 +663,7 @@
return (n is! int || n < 0) ? 0 : n & 0x0F;
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [StaticTypeWarningCode.UNDEFINED_METHOD]);
- } else {
- assertErrors(source, [StaticTypeWarningCode.UNDEFINED_OPERATOR]);
- }
+ assertErrors(source, [StaticTypeWarningCode.UNDEFINED_OPERATOR]);
}
test_forEach() async {
@@ -684,11 +675,7 @@
}
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [StaticTypeWarningCode.UNDEFINED_METHOD]);
- } else {
- assertErrors(source, [StaticTypeWarningCode.UNDEFINED_OPERATOR]);
- }
+ assertErrors(source, [StaticTypeWarningCode.UNDEFINED_OPERATOR]);
}
test_if_and_is() async {
@@ -725,11 +712,7 @@
}
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [StaticTypeWarningCode.UNDEFINED_METHOD]);
- } else {
- assertErrors(source, [StaticTypeWarningCode.UNDEFINED_OPERATOR]);
- }
+ assertErrors(source, [StaticTypeWarningCode.UNDEFINED_OPERATOR]);
}
test_if_isNot_abrupt() async {
@@ -741,11 +724,7 @@
return n & 0x0F;
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [StaticTypeWarningCode.UNDEFINED_METHOD]);
- } else {
- assertErrors(source, [StaticTypeWarningCode.UNDEFINED_OPERATOR]);
- }
+ assertErrors(source, [StaticTypeWarningCode.UNDEFINED_OPERATOR]);
}
test_if_or_is() async {
@@ -758,11 +737,7 @@
}
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [StaticTypeWarningCode.UNDEFINED_METHOD]);
- } else {
- assertErrors(source, [StaticTypeWarningCode.UNDEFINED_OPERATOR]);
- }
+ assertErrors(source, [StaticTypeWarningCode.UNDEFINED_OPERATOR]);
}
test_localVar() async {
@@ -772,11 +747,7 @@
return n & 0x0F;
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [StaticTypeWarningCode.UNDEFINED_METHOD]);
- } else {
- assertErrors(source, [StaticTypeWarningCode.UNDEFINED_OPERATOR]);
- }
+ assertErrors(source, [StaticTypeWarningCode.UNDEFINED_OPERATOR]);
}
}
diff --git a/pkg/analyzer/test/generated/resolver_test_case.dart b/pkg/analyzer/test/generated/resolver_test_case.dart
index 1898824..b16d635 100644
--- a/pkg/analyzer/test/generated/resolver_test_case.dart
+++ b/pkg/analyzer/test/generated/resolver_test_case.dart
@@ -348,8 +348,6 @@
*/
AnalysisOptions get defaultAnalysisOptions => new AnalysisOptionsImpl();
- bool get enableKernelDriver => false;
-
bool get enableNewAnalysisDriver => false;
/// TODO(brianwilkerson) Remove this getter.
@@ -380,8 +378,6 @@
*/
TypeSystem get typeSystem => analysisContext2.typeSystem;
- bool get useCFE => false;
-
/**
* Add a source file with the given [filePath] in the root of the file system.
* The file path should be absolute. The file will have the given [contents]
@@ -665,9 +661,6 @@
}
options ??= defaultAnalysisOptions;
if (enableNewAnalysisDriver) {
- if (useCFE) {
- (options as AnalysisOptionsImpl)..useFastaParser = true;
- }
DartSdk sdk = new MockSdk(resourceProvider: resourceProvider)
..context.analysisOptions = options;
@@ -699,8 +692,7 @@
fileContentOverlay,
null,
sourceFactory,
- options,
- useCFE: enableKernelDriver);
+ options);
scheduler.start();
} else {
if (packages != null) {
diff --git a/pkg/analyzer/test/generated/scanner_test.dart b/pkg/analyzer/test/generated/scanner_test.dart
index 7dfebb2..62165ac 100644
--- a/pkg/analyzer/test/generated/scanner_test.dart
+++ b/pkg/analyzer/test/generated/scanner_test.dart
@@ -165,11 +165,9 @@
}
Token _scanWithListener(String source, GatheringErrorListener listener,
- {bool genericMethodComments: false,
- bool lazyAssignmentOperators: false}) {
+ {bool lazyAssignmentOperators: false}) {
Scanner scanner =
new Scanner(null, new CharSequenceReader(source), listener);
- scanner.scanGenericMethodComments = genericMethodComments;
scanner.scanLazyAssignmentOperators = lazyAssignmentOperators;
Token result = scanner.tokenize();
listener.setLineInfo(new TestSource(), scanner.lineStarts);
diff --git a/pkg/analyzer/test/generated/sdk_test.dart b/pkg/analyzer/test/generated/sdk_test.dart
index 7761536..0d2d841 100644
--- a/pkg/analyzer/test/generated/sdk_test.dart
+++ b/pkg/analyzer/test/generated/sdk_test.dart
@@ -88,8 +88,10 @@
void test_equals_samePaths_differentOptions() {
String path = '/a/b/c';
- AnalysisOptionsImpl leftOptions = new AnalysisOptionsImpl()..useCFE = false;
- AnalysisOptionsImpl rightOptions = new AnalysisOptionsImpl()..useCFE = true;
+ AnalysisOptionsImpl leftOptions = new AnalysisOptionsImpl()
+ ..useFastaParser = false;
+ AnalysisOptionsImpl rightOptions = new AnalysisOptionsImpl()
+ ..useFastaParser = true;
SdkDescription left = new SdkDescription(<String>[path], leftOptions);
SdkDescription right = new SdkDescription(<String>[path], rightOptions);
expect(left == right, isFalse);
diff --git a/pkg/analyzer/test/generated/simple_resolver_test.dart b/pkg/analyzer/test/generated/simple_resolver_test.dart
index 732ed20..f38ced1 100644
--- a/pkg/analyzer/test/generated/simple_resolver_test.dart
+++ b/pkg/analyzer/test/generated/simple_resolver_test.dart
@@ -1070,7 +1070,10 @@
ClassElement a = unit.getType('A');
expect(a.isValidMixin, isFalse);
await computeAnalysisResult(source);
- assertErrors(source, [CompileTimeErrorCode.MIXIN_DECLARES_CONSTRUCTOR]);
+ assertErrors(
+ source,
+ [CompileTimeErrorCode.MIXIN_CLASS_DECLARES_CONSTRUCTOR],
+ );
verify([source]);
}
@@ -1088,7 +1091,10 @@
ClassElement a = unit.getType('A');
expect(a.isValidMixin, isFalse);
await computeAnalysisResult(source);
- assertErrors(source, [CompileTimeErrorCode.MIXIN_DECLARES_CONSTRUCTOR]);
+ assertErrors(
+ source,
+ [CompileTimeErrorCode.MIXIN_CLASS_DECLARES_CONSTRUCTOR],
+ );
verify([source]);
}
diff --git a/pkg/analyzer/test/generated/static_type_analyzer_kernel_test.dart b/pkg/analyzer/test/generated/static_type_analyzer_kernel_test.dart
deleted file mode 100644
index 75bb7db..0000000
--- a/pkg/analyzer/test/generated/static_type_analyzer_kernel_test.dart
+++ /dev/null
@@ -1,25 +0,0 @@
-// 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:test_reflective_loader/test_reflective_loader.dart';
-
-import 'static_type_analyzer_driver_test.dart';
-
-main() {
- defineReflectiveSuite(() {
- defineReflectiveTests(StaticTypeAnalyzer2Test_Kernel);
- });
-}
-
-@reflectiveTest
-class StaticTypeAnalyzer2Test_Kernel extends StaticTypeAnalyzer2Test_Driver {
- @override
- bool get enableKernelDriver => true;
-
- @override
- bool get useCFE => true;
-
- @override
- bool get usingFastaParser => true;
-}
diff --git a/pkg/analyzer/test/generated/static_type_warning_code_kernel_test.dart b/pkg/analyzer/test/generated/static_type_warning_code_kernel_test.dart
deleted file mode 100644
index 95b7019..0000000
--- a/pkg/analyzer/test/generated/static_type_warning_code_kernel_test.dart
+++ /dev/null
@@ -1,343 +0,0 @@
-// 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:test_reflective_loader/test_reflective_loader.dart';
-
-import 'static_type_warning_code_driver_test.dart';
-
-main() {
- defineReflectiveSuite(() {
- defineReflectiveTests(StaticTypeWarningCodeTest_Kernel);
- defineReflectiveTests(StrongModeStaticTypeWarningCodeTest_Kernel);
- });
-}
-
-/// Tests marked with this annotation fail because of a Fasta problem.
-class FastaProblem {
- const FastaProblem(String issueUri);
-}
-
-@reflectiveTest
-class StaticTypeWarningCodeTest_Kernel
- extends StaticTypeWarningCodeTest_Driver {
- @override
- bool get enableKernelDriver => true;
-
- @override
- bool get useCFE => true;
-
- @override
- bool get usingFastaParser => true;
-
- @override
- @failingTest
- test_assert_message_suppresses_type_promotion() async {
- await super.test_assert_message_suppresses_type_promotion();
- }
-
- @override
- @failingTest
- test_instanceAccessToStaticMember_method_invocation() async {
- await super.test_instanceAccessToStaticMember_method_invocation();
- }
-
- @override
- @failingTest
- test_instanceAccessToStaticMember_method_reference() async {
- await super.test_instanceAccessToStaticMember_method_reference();
- }
-
- @override
- @failingTest
- test_instanceAccessToStaticMember_propertyAccess_field() async {
- await super.test_instanceAccessToStaticMember_propertyAccess_field();
- }
-
- @override
- @failingTest
- test_instanceAccessToStaticMember_propertyAccess_getter() async {
- await super.test_instanceAccessToStaticMember_propertyAccess_getter();
- }
-
- @override
- @failingTest
- test_instanceAccessToStaticMember_propertyAccess_setter() async {
- await super.test_instanceAccessToStaticMember_propertyAccess_setter();
- }
-
- @override
- @failingTest
- test_invalidAssignment_dynamic() async {
- await super.test_invalidAssignment_dynamic();
- }
-
- @override
- @failingTest
- test_nonTypeAsTypeArgument_notAType() async {
- await super.test_nonTypeAsTypeArgument_notAType();
- }
-
- @override
- @failingTest
- test_returnOfInvalidType_async_future_int_mismatches_int() async {
- await super.test_returnOfInvalidType_async_future_int_mismatches_int();
- }
-
- @override
- @failingTest
- test_typeArgumentNotMatchingBounds_classTypeAlias() async {
- await super.test_typeArgumentNotMatchingBounds_classTypeAlias();
- }
-
- @override
- @failingTest
- test_typeArgumentNotMatchingBounds_extends() async {
- await super.test_typeArgumentNotMatchingBounds_extends();
- }
-
- @override
- @failingTest
- test_typeArgumentNotMatchingBounds_extends_regressionInIssue18468Fix() async {
- await super
- .test_typeArgumentNotMatchingBounds_extends_regressionInIssue18468Fix();
- }
-
- @override
- @failingTest
- test_typeArgumentNotMatchingBounds_fieldFormalParameter() async {
- await super.test_typeArgumentNotMatchingBounds_fieldFormalParameter();
- }
-
- @override
- @failingTest
- test_typeArgumentNotMatchingBounds_functionReturnType() async {
- await super.test_typeArgumentNotMatchingBounds_functionReturnType();
- }
-
- @override
- @failingTest
- test_typeArgumentNotMatchingBounds_functionTypeAlias() async {
- await super.test_typeArgumentNotMatchingBounds_functionTypeAlias();
- }
-
- @override
- @failingTest
- test_typeArgumentNotMatchingBounds_functionTypedFormalParameter() async {
- await super
- .test_typeArgumentNotMatchingBounds_functionTypedFormalParameter();
- }
-
- @override
- @failingTest
- test_typeArgumentNotMatchingBounds_implements() async {
- await super.test_typeArgumentNotMatchingBounds_implements();
- }
-
- @override
- @failingTest
- test_typeArgumentNotMatchingBounds_is() async {
- await super.test_typeArgumentNotMatchingBounds_is();
- }
-
- @override
- @failingTest
- test_typeArgumentNotMatchingBounds_methodInvocation_localFunction() async {
- await super
- .test_typeArgumentNotMatchingBounds_methodInvocation_localFunction();
- }
-
- @override
- @failingTest
- test_typeArgumentNotMatchingBounds_methodInvocation_method() async {
- await super.test_typeArgumentNotMatchingBounds_methodInvocation_method();
- }
-
- @override
- @failingTest
- test_typeArgumentNotMatchingBounds_methodInvocation_topLevelFunction() async {
- await super
- .test_typeArgumentNotMatchingBounds_methodInvocation_topLevelFunction();
- }
-
- @override
- @failingTest
- test_typeArgumentNotMatchingBounds_methodReturnType() async {
- await super.test_typeArgumentNotMatchingBounds_methodReturnType();
- }
-
- @override
- @failingTest
- test_typeArgumentNotMatchingBounds_new() async {
- await super.test_typeArgumentNotMatchingBounds_new();
- }
-
- @override
- @failingTest
- test_typeArgumentNotMatchingBounds_new_superTypeOfUpperBound() async {
- await super.test_typeArgumentNotMatchingBounds_new_superTypeOfUpperBound();
- }
-
- @override
- @failingTest
- test_typeArgumentNotMatchingBounds_parameter() async {
- await super.test_typeArgumentNotMatchingBounds_parameter();
- }
-
- @override
- @failingTest
- test_typeArgumentNotMatchingBounds_redirectingConstructor() async {
- await super.test_typeArgumentNotMatchingBounds_redirectingConstructor();
- }
-
- @override
- @failingTest
- test_typeArgumentNotMatchingBounds_typeArgumentList() async {
- await super.test_typeArgumentNotMatchingBounds_typeArgumentList();
- }
-
- @override
- @failingTest
- test_typeArgumentNotMatchingBounds_typeParameter() async {
- await super.test_typeArgumentNotMatchingBounds_typeParameter();
- }
-
- @override
- @failingTest
- test_typeArgumentNotMatchingBounds_variableDeclaration() async {
- await super.test_typeArgumentNotMatchingBounds_variableDeclaration();
- }
-
- @override
- @failingTest
- test_typeArgumentNotMatchingBounds_with() async {
- await super.test_typeArgumentNotMatchingBounds_with();
- }
-
- @override
- @failingTest
- test_typeParameterSupertypeOfItsBound() async {
- await super.test_typeParameterSupertypeOfItsBound();
- }
-
- @override
- @failingTest
- test_typePromotion_booleanAnd_useInRight_mutatedInLeft() async {
- await super.test_typePromotion_booleanAnd_useInRight_mutatedInLeft();
- }
-
- @override
- @failingTest
- test_typePromotion_if_and_right_hasAssignment() async {
- await super.test_typePromotion_if_and_right_hasAssignment();
- }
-
- @override
- @failingTest
- test_undefinedGetter_wrongNumberOfTypeArguments_tooLittle() async {
- await super.test_undefinedGetter_wrongNumberOfTypeArguments_tooLittle();
- }
-
- @override
- @failingTest
- test_undefinedGetter_wrongNumberOfTypeArguments_tooMany() async {
- await super.test_undefinedGetter_wrongNumberOfTypeArguments_tooMany();
- }
-
- @override
- @failingTest
- test_undefinedMethod_generic_function_call() async {
- await super.test_undefinedMethod_generic_function_call();
- }
-
- @override
- @failingTest
- test_undefinedMethod_ignoreTypePropagation() async {
- await super.test_undefinedMethod_ignoreTypePropagation();
- }
-
- @override
- @failingTest
- test_undefinedMethod_leastUpperBoundWithNull() async {
- await super.test_undefinedMethod_leastUpperBoundWithNull();
- }
-
- @override
- @failingTest
- test_undefinedMethod_object_call() async {
- await super.test_undefinedMethod_object_call();
- }
-
- @override
- @failingTest
- test_undefinedMethod_ofNull() async {
- await super.test_undefinedMethod_ofNull();
- }
-
- @override
- @failingTest
- test_undefinedMethod_proxy_annotation_fakeProxy() async {
- await super.test_undefinedMethod_proxy_annotation_fakeProxy();
- }
-
- @override
- @failingTest
- test_undefinedMethod_typeLiteral_cascadeTarget() async {
- await super.test_undefinedMethod_typeLiteral_cascadeTarget();
- }
-
- @override
- @failingTest
- test_undefinedSuperMethod() async {
- await super.test_undefinedSuperMethod();
- }
-
- @override
- @failingTest
- test_wrongNumberOfTypeArguments_typeParameter() async {
- await super.test_wrongNumberOfTypeArguments_typeParameter();
- }
-
- @override
- @failingTest
- test_yield_async_to_basic_type() async {
- await super.test_yield_async_to_basic_type();
- }
-
- @override
- @failingTest
- test_yield_async_to_iterable() async {
- await super.test_yield_async_to_iterable();
- }
-
- @override
- @failingTest
- test_yield_sync_to_basic_type() async {
- await super.test_yield_sync_to_basic_type();
- }
-
- @override
- @failingTest
- test_yield_sync_to_stream() async {
- await super.test_yield_sync_to_stream();
- }
-}
-
-@reflectiveTest
-class StrongModeStaticTypeWarningCodeTest_Kernel
- extends StrongModeStaticTypeWarningCodeTest_Driver {
- @override
- bool get enableKernelDriver => true;
-
- @override
- bool get useCFE => true;
-
- @override
- bool get usingFastaParser => true;
-
- @override
- @failingTest
- test_genericMethodWrongNumberOfTypeArguments() async {
- await super.test_genericMethodWrongNumberOfTypeArguments();
- }
-}
diff --git a/pkg/analyzer/test/generated/static_type_warning_code_test.dart b/pkg/analyzer/test/generated/static_type_warning_code_test.dart
index 21a69fe..e650103 100644
--- a/pkg/analyzer/test/generated/static_type_warning_code_test.dart
+++ b/pkg/analyzer/test/generated/static_type_warning_code_test.dart
@@ -118,15 +118,7 @@
library lib2;
f() {}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [
- StaticTypeWarningCode.UNDEFINED_METHOD,
- HintCode.UNUSED_IMPORT,
- HintCode.UNUSED_IMPORT
- ]);
- } else {
- assertErrors(source, [StaticWarningCode.AMBIGUOUS_IMPORT]);
- }
+ assertErrors(source, [StaticWarningCode.AMBIGUOUS_IMPORT]);
}
test_assert_message_suppresses_type_promotion() async {
@@ -542,8 +534,7 @@
}
test_inconsistentMethodInheritance_paramCount() async {
- await assertErrorsInCode(
- r'''
+ await assertErrorsInCode(r'''
abstract class A {
int x();
}
@@ -551,15 +542,11 @@
int x(int y);
}
class C implements A, B {
-}''',
- useCFE
- ? [StaticWarningCode.INVALID_OVERRIDE_REQUIRED]
- : [StaticTypeWarningCode.INCONSISTENT_METHOD_INHERITANCE]);
+}''', [StaticTypeWarningCode.INCONSISTENT_METHOD_INHERITANCE]);
}
test_inconsistentMethodInheritance_paramType() async {
- await assertErrorsInCode(
- r'''
+ await assertErrorsInCode(r'''
abstract class A {
x(int i);
}
@@ -567,15 +554,11 @@
x(String s);
}
abstract class C implements A, B {}
-''',
- useCFE
- ? [StrongModeCode.INVALID_METHOD_OVERRIDE]
- : [StaticTypeWarningCode.INCONSISTENT_METHOD_INHERITANCE]);
+''', [StaticTypeWarningCode.INCONSISTENT_METHOD_INHERITANCE]);
}
test_inconsistentMethodInheritance_returnType() async {
- await assertErrorsInCode(
- r'''
+ await assertErrorsInCode(r'''
abstract class A {
int x();
}
@@ -583,80 +566,57 @@
String x();
}
abstract class C implements A, B {}
-''',
- useCFE
- ? [StrongModeCode.INVALID_METHOD_OVERRIDE]
- : [StaticTypeWarningCode.INCONSISTENT_METHOD_INHERITANCE]);
+''', [StaticTypeWarningCode.INCONSISTENT_METHOD_INHERITANCE]);
}
test_instanceAccessToStaticMember_method_invocation() async {
- await assertErrorsInCode(
- r'''
+ await assertErrorsInCode(r'''
class A {
static m() {}
}
main(A a) {
a.m();
-}''',
- useCFE
- ? [StaticTypeWarningCode.UNDEFINED_METHOD]
- : [StaticTypeWarningCode.INSTANCE_ACCESS_TO_STATIC_MEMBER]);
+}''', [StaticTypeWarningCode.INSTANCE_ACCESS_TO_STATIC_MEMBER]);
}
test_instanceAccessToStaticMember_method_reference() async {
- await assertErrorsInCode(
- r'''
+ await assertErrorsInCode(r'''
class A {
static m() {}
}
main(A a) {
a.m;
-}''',
- useCFE
- ? [StaticTypeWarningCode.UNDEFINED_GETTER]
- : [StaticTypeWarningCode.INSTANCE_ACCESS_TO_STATIC_MEMBER]);
+}''', [StaticTypeWarningCode.INSTANCE_ACCESS_TO_STATIC_MEMBER]);
}
test_instanceAccessToStaticMember_propertyAccess_field() async {
- await assertErrorsInCode(
- r'''
+ await assertErrorsInCode(r'''
class A {
static var f;
}
main(A a) {
a.f;
-}''',
- useCFE
- ? [StaticTypeWarningCode.UNDEFINED_GETTER]
- : [StaticTypeWarningCode.INSTANCE_ACCESS_TO_STATIC_MEMBER]);
+}''', [StaticTypeWarningCode.INSTANCE_ACCESS_TO_STATIC_MEMBER]);
}
test_instanceAccessToStaticMember_propertyAccess_getter() async {
- await assertErrorsInCode(
- r'''
+ await assertErrorsInCode(r'''
class A {
static get f => 42;
}
main(A a) {
a.f;
-}''',
- useCFE
- ? [StaticTypeWarningCode.UNDEFINED_GETTER]
- : [StaticTypeWarningCode.INSTANCE_ACCESS_TO_STATIC_MEMBER]);
+}''', [StaticTypeWarningCode.INSTANCE_ACCESS_TO_STATIC_MEMBER]);
}
test_instanceAccessToStaticMember_propertyAccess_setter() async {
- await assertErrorsInCode(
- r'''
+ await assertErrorsInCode(r'''
class A {
static set f(x) {}
}
main(A a) {
a.f = 42;
-}''',
- useCFE
- ? [StaticTypeWarningCode.UNDEFINED_SETTER]
- : [StaticTypeWarningCode.INSTANCE_ACCESS_TO_STATIC_MEMBER]);
+}''', [StaticTypeWarningCode.INSTANCE_ACCESS_TO_STATIC_MEMBER]);
}
test_invalidAssignment_compoundAssignment() async {
@@ -789,31 +749,22 @@
}
test_invocationOfNonFunction_localObject() async {
- await assertErrorsInCode(
- '''
+ await assertErrorsInCode('''
f(Object o) {
return o();
-}''',
- useCFE
- ? [StaticTypeWarningCode.UNDEFINED_METHOD]
- : [StaticTypeWarningCode.INVOCATION_OF_NON_FUNCTION]);
+}''', [StaticTypeWarningCode.INVOCATION_OF_NON_FUNCTION]);
}
test_invocationOfNonFunction_localVariable() async {
- await assertErrorsInCode(
- r'''
+ await assertErrorsInCode(r'''
f() {
int x;
return x();
-}''',
- useCFE
- ? [StaticTypeWarningCode.UNDEFINED_METHOD]
- : [StaticTypeWarningCode.INVOCATION_OF_NON_FUNCTION]);
+}''', [StaticTypeWarningCode.INVOCATION_OF_NON_FUNCTION]);
}
test_invocationOfNonFunction_ordinaryInvocation() async {
- await assertErrorsInCode(
- r'''
+ await assertErrorsInCode(r'''
class A {
static int x;
}
@@ -821,31 +772,23 @@
m() {
A.x();
}
-}''',
- useCFE
- ? [StaticTypeWarningCode.UNDEFINED_METHOD]
- : [StaticTypeWarningCode.INVOCATION_OF_NON_FUNCTION]);
+}''', [StaticTypeWarningCode.INVOCATION_OF_NON_FUNCTION]);
// A call to verify(source) fails as A.x() cannot be resolved.
}
test_invocationOfNonFunction_staticInvocation() async {
- await assertErrorsInCode(
- r'''
+ await assertErrorsInCode(r'''
class A {
static int get g => 0;
f() {
A.g();
}
-}''',
- useCFE
- ? [StaticTypeWarningCode.UNDEFINED_METHOD]
- : [StaticTypeWarningCode.INVOCATION_OF_NON_FUNCTION]);
+}''', [StaticTypeWarningCode.INVOCATION_OF_NON_FUNCTION]);
// A call to verify(source) fails as g() cannot be resolved.
}
test_invocationOfNonFunction_superExpression() async {
- await assertErrorsInCode(
- r'''
+ await assertErrorsInCode(r'''
class A {
int get g => 0;
}
@@ -853,74 +796,48 @@
m() {
var v = super.g();
}
-}''',
- useCFE
- ? [StaticTypeWarningCode.UNDEFINED_METHOD]
- : [StaticTypeWarningCode.INVOCATION_OF_NON_FUNCTION]);
+}''', [StaticTypeWarningCode.INVOCATION_OF_NON_FUNCTION]);
}
test_invocationOfNonFunctionExpression_literal() async {
- await assertErrorsInCode(
- r'''
+ await assertErrorsInCode(r'''
f() {
3(5);
-}''',
- useCFE
- ? [StaticTypeWarningCode.UNDEFINED_METHOD]
- : [StaticTypeWarningCode.INVOCATION_OF_NON_FUNCTION_EXPRESSION]);
+}''', [StaticTypeWarningCode.INVOCATION_OF_NON_FUNCTION_EXPRESSION]);
}
test_nonBoolCondition_conditional() async {
- await assertErrorsInCode(
- "f() { return 3 ? 2 : 1; }",
- useCFE
- ? [StaticTypeWarningCode.INVALID_ASSIGNMENT]
- : [StaticTypeWarningCode.NON_BOOL_CONDITION]);
+ await assertErrorsInCode("f() { return 3 ? 2 : 1; }",
+ [StaticTypeWarningCode.NON_BOOL_CONDITION]);
}
test_nonBoolCondition_do() async {
- await assertErrorsInCode(
- r'''
+ await assertErrorsInCode(r'''
f() {
do {} while (3);
-}''',
- useCFE
- ? [StaticTypeWarningCode.INVALID_ASSIGNMENT]
- : [StaticTypeWarningCode.NON_BOOL_CONDITION]);
+}''', [StaticTypeWarningCode.NON_BOOL_CONDITION]);
}
test_nonBoolCondition_for() async {
// https://github.com/dart-lang/sdk/issues/24713
- await assertErrorsInCode(
- r'''
+ await assertErrorsInCode(r'''
f() {
for (;3;) {}
-}''',
- useCFE
- ? [StaticTypeWarningCode.INVALID_ASSIGNMENT]
- : [StaticTypeWarningCode.NON_BOOL_CONDITION]);
+}''', [StaticTypeWarningCode.NON_BOOL_CONDITION]);
}
test_nonBoolCondition_if() async {
- await assertErrorsInCode(
- r'''
+ await assertErrorsInCode(r'''
f() {
if (3) return 2; else return 1;
-}''',
- useCFE
- ? [StaticTypeWarningCode.INVALID_ASSIGNMENT]
- : [StaticTypeWarningCode.NON_BOOL_CONDITION]);
+}''', [StaticTypeWarningCode.NON_BOOL_CONDITION]);
}
test_nonBoolCondition_while() async {
- await assertErrorsInCode(
- r'''
+ await assertErrorsInCode(r'''
f() {
while (3) {}
-}''',
- useCFE
- ? [StaticTypeWarningCode.INVALID_ASSIGNMENT]
- : [StaticTypeWarningCode.NON_BOOL_CONDITION]);
+}''', [StaticTypeWarningCode.NON_BOOL_CONDITION]);
}
test_nonBoolExpression_functionType_bool() async {
@@ -930,90 +847,58 @@
assert(makeAssertion);
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [StaticTypeWarningCode.INVALID_ASSIGNMENT]);
- } else {
- assertErrors(source, [StaticTypeWarningCode.NON_BOOL_EXPRESSION]);
- }
+ assertErrors(source, [StaticTypeWarningCode.NON_BOOL_EXPRESSION]);
verify([source]);
}
test_nonBoolExpression_functionType_int() async {
- await assertErrorsInCode(
- r'''
+ await assertErrorsInCode(r'''
int makeAssertion() => 1;
f() {
assert(makeAssertion);
-}''',
- useCFE
- ? [StaticTypeWarningCode.INVALID_ASSIGNMENT]
- : [StaticTypeWarningCode.NON_BOOL_EXPRESSION]);
+}''', [StaticTypeWarningCode.NON_BOOL_EXPRESSION]);
}
test_nonBoolExpression_interfaceType() async {
- await assertErrorsInCode(
- r'''
+ await assertErrorsInCode(r'''
f() {
assert(0);
-}''',
- useCFE
- ? [StaticTypeWarningCode.INVALID_ASSIGNMENT]
- : [StaticTypeWarningCode.NON_BOOL_EXPRESSION]);
+}''', [StaticTypeWarningCode.NON_BOOL_EXPRESSION]);
}
test_nonBoolNegationExpression() async {
- await assertErrorsInCode(
- r'''
+ await assertErrorsInCode(r'''
f() {
!42;
-}''',
- useCFE
- ? [StaticTypeWarningCode.INVALID_ASSIGNMENT]
- : [StaticTypeWarningCode.NON_BOOL_NEGATION_EXPRESSION]);
+}''', [StaticTypeWarningCode.NON_BOOL_NEGATION_EXPRESSION]);
}
test_nonBoolOperand_and_left() async {
- await assertErrorsInCode(
- r'''
+ await assertErrorsInCode(r'''
bool f(int left, bool right) {
return left && right;
-}''',
- useCFE
- ? [StaticTypeWarningCode.INVALID_ASSIGNMENT]
- : [StaticTypeWarningCode.NON_BOOL_OPERAND]);
+}''', [StaticTypeWarningCode.NON_BOOL_OPERAND]);
}
test_nonBoolOperand_and_right() async {
- await assertErrorsInCode(
- r'''
+ await assertErrorsInCode(r'''
bool f(bool left, String right) {
return left && right;
-}''',
- useCFE
- ? [StaticTypeWarningCode.INVALID_ASSIGNMENT]
- : [StaticTypeWarningCode.NON_BOOL_OPERAND]);
+}''', [StaticTypeWarningCode.NON_BOOL_OPERAND]);
}
test_nonBoolOperand_or_left() async {
- await assertErrorsInCode(
- r'''
+ await assertErrorsInCode(r'''
bool f(List<int> left, bool right) {
return left || right;
-}''',
- useCFE
- ? [StaticTypeWarningCode.INVALID_ASSIGNMENT]
- : [StaticTypeWarningCode.NON_BOOL_OPERAND]);
+}''', [StaticTypeWarningCode.NON_BOOL_OPERAND]);
}
test_nonBoolOperand_or_right() async {
- await assertErrorsInCode(
- r'''
+ await assertErrorsInCode(r'''
bool f(bool left, double right) {
return left || right;
-}''',
- useCFE
- ? [StaticTypeWarningCode.INVALID_ASSIGNMENT]
- : [StaticTypeWarningCode.NON_BOOL_OPERAND]);
+}''', [StaticTypeWarningCode.NON_BOOL_OPERAND]);
}
test_nonTypeAsTypeArgument_notAType() async {
@@ -1024,43 +909,28 @@
}
test_nonTypeAsTypeArgument_undefinedIdentifier() async {
- await assertErrorsInCode(
- r'''
+ await assertErrorsInCode(r'''
class B<E> {}
-f(B<A> b) {}''',
- useCFE
- ? [
- StaticWarningCode.NOT_A_TYPE,
- CompileTimeErrorCode.UNDEFINED_CLASS
- ]
- : [StaticTypeWarningCode.NON_TYPE_AS_TYPE_ARGUMENT]);
+f(B<A> b) {}''', [StaticTypeWarningCode.NON_TYPE_AS_TYPE_ARGUMENT]);
}
test_returnOfInvalidType_async_future_future_int_mismatches_future_int() async {
- await assertErrorsInCode(
- '''
+ await assertErrorsInCode('''
import 'dart:async';
Future<int> f() async {
return g();
}
Future<Future<int>> g() => null;
-''',
- useCFE
- ? [StaticTypeWarningCode.INVALID_ASSIGNMENT]
- : [StaticTypeWarningCode.RETURN_OF_INVALID_TYPE]);
+''', [StaticTypeWarningCode.RETURN_OF_INVALID_TYPE]);
}
test_returnOfInvalidType_async_future_int_mismatches_future_string() async {
- await assertErrorsInCode(
- '''
+ await assertErrorsInCode('''
import 'dart:async';
Future<String> f() async {
return 5;
}
-''',
- useCFE
- ? [StaticTypeWarningCode.INVALID_ASSIGNMENT]
- : [StaticTypeWarningCode.RETURN_OF_INVALID_TYPE]);
+''', [StaticTypeWarningCode.RETURN_OF_INVALID_TYPE]);
}
test_returnOfInvalidType_async_future_int_mismatches_int() async {
@@ -1076,84 +946,56 @@
test_returnOfInvalidType_expressionFunctionBody_function() async {
await assertErrorsInCode(
- "int f() => '0';",
- useCFE
- ? [StaticTypeWarningCode.INVALID_ASSIGNMENT]
- : [StaticTypeWarningCode.RETURN_OF_INVALID_TYPE]);
+ "int f() => '0';", [StaticTypeWarningCode.RETURN_OF_INVALID_TYPE]);
}
test_returnOfInvalidType_expressionFunctionBody_getter() async {
await assertErrorsInCode(
- "int get g => '0';",
- useCFE
- ? [StaticTypeWarningCode.INVALID_ASSIGNMENT]
- : [StaticTypeWarningCode.RETURN_OF_INVALID_TYPE]);
+ "int get g => '0';", [StaticTypeWarningCode.RETURN_OF_INVALID_TYPE]);
}
test_returnOfInvalidType_expressionFunctionBody_localFunction() async {
- await assertErrorsInCode(
- r'''
+ await assertErrorsInCode(r'''
class A {
String m() {
int f() => '0';
return '0';
}
-}''',
- useCFE
- ? [StaticTypeWarningCode.INVALID_ASSIGNMENT]
- : [StaticTypeWarningCode.RETURN_OF_INVALID_TYPE]);
+}''', [StaticTypeWarningCode.RETURN_OF_INVALID_TYPE]);
}
test_returnOfInvalidType_expressionFunctionBody_method() async {
- await assertErrorsInCode(
- r'''
+ await assertErrorsInCode(r'''
class A {
int f() => '0';
-}''',
- useCFE
- ? [StaticTypeWarningCode.INVALID_ASSIGNMENT]
- : [StaticTypeWarningCode.RETURN_OF_INVALID_TYPE]);
+}''', [StaticTypeWarningCode.RETURN_OF_INVALID_TYPE]);
}
test_returnOfInvalidType_function() async {
- await assertErrorsInCode(
- "int f() { return '0'; }",
- useCFE
- ? [StaticTypeWarningCode.INVALID_ASSIGNMENT]
- : [StaticTypeWarningCode.RETURN_OF_INVALID_TYPE]);
+ await assertErrorsInCode("int f() { return '0'; }",
+ [StaticTypeWarningCode.RETURN_OF_INVALID_TYPE]);
}
test_returnOfInvalidType_getter() async {
- await assertErrorsInCode(
- "int get g { return '0'; }",
- useCFE
- ? [StaticTypeWarningCode.INVALID_ASSIGNMENT]
- : [StaticTypeWarningCode.RETURN_OF_INVALID_TYPE]);
+ await assertErrorsInCode("int get g { return '0'; }",
+ [StaticTypeWarningCode.RETURN_OF_INVALID_TYPE]);
}
test_returnOfInvalidType_localFunction() async {
- await assertErrorsInCode(
- r'''
+ await assertErrorsInCode(r'''
class A {
String m() {
int f() { return '0'; }
return '0';
}
-}''',
- useCFE
- ? [StaticTypeWarningCode.INVALID_ASSIGNMENT]
- : [StaticTypeWarningCode.RETURN_OF_INVALID_TYPE]);
+}''', [StaticTypeWarningCode.RETURN_OF_INVALID_TYPE]);
}
test_returnOfInvalidType_method() async {
- await assertErrorsInCode(
- r'''
+ await assertErrorsInCode(r'''
class A {
int f() { return '0'; }
-}''',
- useCFE
- ? [StaticTypeWarningCode.INVALID_ASSIGNMENT]
- : [StaticTypeWarningCode.RETURN_OF_INVALID_TYPE]);
+}''', [StaticTypeWarningCode.RETURN_OF_INVALID_TYPE]);
}
test_returnOfInvalidType_not_issued_for_expressionFunctionBody_void() async {
@@ -1601,28 +1443,20 @@
}
test_undefinedFunction() async {
- await assertErrorsInCode(
- r'''
+ await assertErrorsInCode(r'''
void f() {
g();
-}''',
- useCFE
- ? [StaticTypeWarningCode.UNDEFINED_METHOD]
- : [StaticTypeWarningCode.UNDEFINED_FUNCTION]);
+}''', [StaticTypeWarningCode.UNDEFINED_FUNCTION]);
}
test_undefinedFunction_inCatch() async {
- await assertErrorsInCode(
- r'''
+ await assertErrorsInCode(r'''
void f() {
try {
} on Object {
g();
}
-}''',
- useCFE
- ? [StaticTypeWarningCode.UNDEFINED_METHOD]
- : [StaticTypeWarningCode.UNDEFINED_FUNCTION]);
+}''', [StaticTypeWarningCode.UNDEFINED_FUNCTION]);
}
test_undefinedFunction_inImportedLib() async {
@@ -1633,11 +1467,7 @@
library lib;
h() {}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [StaticTypeWarningCode.UNDEFINED_METHOD]);
- } else {
- assertErrors(source, [StaticTypeWarningCode.UNDEFINED_FUNCTION]);
- }
+ assertErrors(source, [StaticTypeWarningCode.UNDEFINED_FUNCTION]);
}
test_undefinedGetter() async {
@@ -1726,37 +1556,22 @@
}
test_undefinedGetter_wrongOfTypeArgument() async {
- await assertErrorsInCode(
- r'''
+ await assertErrorsInCode(r'''
class A<E> {
E element;
}
main(A<NoSuchType> a) {
a.element.anyGetterExistsInDynamic;
-}''',
- useCFE
- ? [
- StaticTypeWarningCode.UNDEFINED_GETTER,
- StaticWarningCode.NOT_A_TYPE,
- CompileTimeErrorCode.UNDEFINED_CLASS
- ]
- : [StaticTypeWarningCode.NON_TYPE_AS_TYPE_ARGUMENT]);
+}''', [StaticTypeWarningCode.NON_TYPE_AS_TYPE_ARGUMENT]);
}
test_undefinedMethod() async {
- await assertErrorsInCode(
- r'''
+ await assertErrorsInCode(r'''
class A {
void m() {
n();
}
-}''',
- useCFE
- ? [
- StaticTypeWarningCode.UNDEFINED_METHOD,
- StaticTypeWarningCode.UNDEFINED_METHOD
- ]
- : [StaticTypeWarningCode.UNDEFINED_METHOD]);
+}''', [StaticTypeWarningCode.UNDEFINED_METHOD]);
}
test_undefinedMethod_assignmentExpression() async {
@@ -1825,20 +1640,13 @@
class A {
_foo() {}
}''');
- await assertErrorsInCode(
- r'''
+ await assertErrorsInCode(r'''
import 'lib.dart';
class B extends A {
test() {
_foo();
}
-}''',
- useCFE
- ? [
- StaticTypeWarningCode.UNDEFINED_METHOD,
- StaticTypeWarningCode.UNDEFINED_METHOD
- ]
- : [StaticTypeWarningCode.UNDEFINED_METHOD]);
+}''', [StaticTypeWarningCode.UNDEFINED_METHOD]);
}
test_undefinedMethod_proxy_annotation_fakeProxy() async {
@@ -1892,78 +1700,51 @@
}
test_undefinedOperator_indexBoth() async {
- await assertErrorsInUnverifiedCode(
- r'''
+ await assertErrorsInUnverifiedCode(r'''
class A {}
f(A a) {
a[0]++;
-}''',
- useCFE
- ? [
- StaticTypeWarningCode.UNDEFINED_METHOD,
- StaticTypeWarningCode.UNDEFINED_METHOD
- ]
- : [StaticTypeWarningCode.UNDEFINED_OPERATOR]);
+}''', [StaticTypeWarningCode.UNDEFINED_OPERATOR]);
}
test_undefinedOperator_indexGetter() async {
- await assertErrorsInUnverifiedCode(
- r'''
+ await assertErrorsInUnverifiedCode(r'''
class A {}
f(A a) {
a[0];
-}''',
- useCFE
- ? [StaticTypeWarningCode.UNDEFINED_METHOD]
- : [StaticTypeWarningCode.UNDEFINED_OPERATOR]);
+}''', [StaticTypeWarningCode.UNDEFINED_OPERATOR]);
}
test_undefinedOperator_indexSetter() async {
- await assertErrorsInUnverifiedCode(
- r'''
+ await assertErrorsInUnverifiedCode(r'''
class A {}
f(A a) {
a[0] = 1;
-}''',
- useCFE
- ? [StaticTypeWarningCode.UNDEFINED_METHOD]
- : [StaticTypeWarningCode.UNDEFINED_OPERATOR]);
+}''', [StaticTypeWarningCode.UNDEFINED_OPERATOR]);
}
test_undefinedOperator_plus() async {
- await assertErrorsInUnverifiedCode(
- r'''
+ await assertErrorsInUnverifiedCode(r'''
class A {}
f(A a) {
a + 1;
-}''',
- useCFE
- ? [StaticTypeWarningCode.UNDEFINED_METHOD]
- : [StaticTypeWarningCode.UNDEFINED_OPERATOR]);
+}''', [StaticTypeWarningCode.UNDEFINED_OPERATOR]);
}
test_undefinedOperator_postfixExpression() async {
- await assertErrorsInCode(
- r'''
+ await assertErrorsInCode(r'''
class A {}
f(A a) {
a++;
-}''',
- useCFE
- ? [StaticTypeWarningCode.UNDEFINED_METHOD]
- : [StaticTypeWarningCode.UNDEFINED_OPERATOR]);
+}''', [StaticTypeWarningCode.UNDEFINED_OPERATOR]);
}
test_undefinedOperator_prefixExpression() async {
- await assertErrorsInCode(
- r'''
+ await assertErrorsInCode(r'''
class A {}
f(A a) {
++a;
-}''',
- useCFE
- ? [StaticTypeWarningCode.UNDEFINED_METHOD]
- : [StaticTypeWarningCode.UNDEFINED_OPERATOR]);
+}''', [StaticTypeWarningCode.UNDEFINED_OPERATOR]);
}
test_undefinedSetter() async {
@@ -2007,48 +1788,33 @@
}
test_undefinedSuperOperator_binaryExpression() async {
- await assertErrorsInUnverifiedCode(
- r'''
+ await assertErrorsInUnverifiedCode(r'''
class A {}
class B extends A {
operator +(value) {
return super + value;
}
-}''',
- useCFE
- ? [StaticTypeWarningCode.UNDEFINED_SUPER_METHOD]
- : [StaticTypeWarningCode.UNDEFINED_SUPER_OPERATOR]);
+}''', [StaticTypeWarningCode.UNDEFINED_SUPER_OPERATOR]);
}
test_undefinedSuperOperator_indexBoth() async {
- await assertErrorsInUnverifiedCode(
- r'''
+ await assertErrorsInUnverifiedCode(r'''
class A {}
class B extends A {
operator [](index) {
return super[index]++;
}
-}''',
- useCFE
- ? [
- StaticTypeWarningCode.UNDEFINED_SUPER_METHOD,
- StaticTypeWarningCode.UNDEFINED_SUPER_METHOD
- ]
- : [StaticTypeWarningCode.UNDEFINED_SUPER_OPERATOR]);
+}''', [StaticTypeWarningCode.UNDEFINED_SUPER_OPERATOR]);
}
test_undefinedSuperOperator_indexGetter() async {
- await assertErrorsInUnverifiedCode(
- r'''
+ await assertErrorsInUnverifiedCode(r'''
class A {}
class B extends A {
operator [](index) {
return super[index + 1];
}
-}''',
- useCFE
- ? [StaticTypeWarningCode.UNDEFINED_SUPER_METHOD]
- : [StaticTypeWarningCode.UNDEFINED_SUPER_OPERATOR]);
+}''', [StaticTypeWarningCode.UNDEFINED_SUPER_OPERATOR]);
}
test_undefinedSuperOperator_indexSetter() async {
@@ -2060,17 +1826,12 @@
return super[index] = 0;
}
}''',
- useCFE
+ previewDart2
? [
StaticTypeWarningCode.RETURN_OF_INVALID_TYPE,
- StaticTypeWarningCode.UNDEFINED_SUPER_METHOD
+ StaticTypeWarningCode.UNDEFINED_SUPER_OPERATOR
]
- : (previewDart2
- ? [
- StaticTypeWarningCode.RETURN_OF_INVALID_TYPE,
- StaticTypeWarningCode.UNDEFINED_SUPER_OPERATOR
- ]
- : [StaticTypeWarningCode.UNDEFINED_SUPER_OPERATOR]));
+ : [StaticTypeWarningCode.UNDEFINED_SUPER_OPERATOR]);
}
test_undefinedSuperSetter() async {
@@ -2084,8 +1845,7 @@
}
test_unqualifiedReferenceToNonLocalStaticMember_getter() async {
- await assertErrorsInCode(
- r'''
+ await assertErrorsInCode(r'''
class A {
static int get a => 0;
}
@@ -2093,21 +1853,11 @@
int b() {
return a;
}
-}''',
- useCFE
- ? [
- StaticTypeWarningCode.UNDEFINED_GETTER,
- StaticTypeWarningCode.UNDEFINED_GETTER
- ]
- : [
- StaticTypeWarningCode
- .UNQUALIFIED_REFERENCE_TO_NON_LOCAL_STATIC_MEMBER
- ]);
+}''', [StaticTypeWarningCode.UNQUALIFIED_REFERENCE_TO_NON_LOCAL_STATIC_MEMBER]);
}
test_unqualifiedReferenceToNonLocalStaticMember_getter_invokeTarget() async {
- await assertErrorsInCode(
- r'''
+ await assertErrorsInCode(r'''
class A {
static int foo;
}
@@ -2117,18 +1867,11 @@
foo.abs();
}
}
-''',
- useCFE
- ? [StaticTypeWarningCode.UNDEFINED_GETTER]
- : [
- StaticTypeWarningCode
- .UNQUALIFIED_REFERENCE_TO_NON_LOCAL_STATIC_MEMBER
- ]);
+''', [StaticTypeWarningCode.UNQUALIFIED_REFERENCE_TO_NON_LOCAL_STATIC_MEMBER]);
}
test_unqualifiedReferenceToNonLocalStaticMember_method() async {
- await assertErrorsInCode(
- r'''
+ await assertErrorsInCode(r'''
class A {
static void a() {}
}
@@ -2136,21 +1879,11 @@
void b() {
a();
}
-}''',
- useCFE
- ? [
- StaticTypeWarningCode.UNDEFINED_METHOD,
- StaticTypeWarningCode.UNDEFINED_METHOD
- ]
- : [
- StaticTypeWarningCode
- .UNQUALIFIED_REFERENCE_TO_NON_LOCAL_STATIC_MEMBER
- ]);
+}''', [StaticTypeWarningCode.UNQUALIFIED_REFERENCE_TO_NON_LOCAL_STATIC_MEMBER]);
}
test_unqualifiedReferenceToNonLocalStaticMember_setter() async {
- await assertErrorsInCode(
- r'''
+ await assertErrorsInCode(r'''
class A {
static set a(x) {}
}
@@ -2158,16 +1891,7 @@
b(y) {
a = y;
}
-}''',
- useCFE
- ? [
- StaticTypeWarningCode.UNDEFINED_SETTER,
- StaticTypeWarningCode.UNDEFINED_SETTER
- ]
- : [
- StaticTypeWarningCode
- .UNQUALIFIED_REFERENCE_TO_NON_LOCAL_STATIC_MEMBER
- ]);
+}''', [StaticTypeWarningCode.UNQUALIFIED_REFERENCE_TO_NON_LOCAL_STATIC_MEMBER]);
}
test_wrongNumberOfTypeArguments_class_tooFew() async {
@@ -2245,67 +1969,47 @@
}
test_yield_async_to_mistyped_stream() async {
- await assertErrorsInCode(
- '''
+ await assertErrorsInCode('''
import 'dart:async';
Stream<int> f() async* {
yield "foo";
}
-''',
- useCFE
- ? [StaticTypeWarningCode.INVALID_ASSIGNMENT]
- : [StaticTypeWarningCode.YIELD_OF_INVALID_TYPE]);
+''', [StaticTypeWarningCode.YIELD_OF_INVALID_TYPE]);
}
test_yield_each_async_non_stream() async {
- await assertErrorsInCode(
- '''
+ await assertErrorsInCode('''
f() async* {
yield* 0;
}
-''',
- useCFE
- ? [StaticTypeWarningCode.INVALID_ASSIGNMENT]
- : [StaticTypeWarningCode.YIELD_OF_INVALID_TYPE]);
+''', [StaticTypeWarningCode.YIELD_OF_INVALID_TYPE]);
}
test_yield_each_async_to_mistyped_stream() async {
- await assertErrorsInCode(
- '''
+ await assertErrorsInCode('''
import 'dart:async';
Stream<int> f() async* {
yield* g();
}
Stream<String> g() => null;
-''',
- useCFE
- ? [StaticTypeWarningCode.INVALID_ASSIGNMENT]
- : [StaticTypeWarningCode.YIELD_OF_INVALID_TYPE]);
+''', [StaticTypeWarningCode.YIELD_OF_INVALID_TYPE]);
}
test_yield_each_sync_non_iterable() async {
- await assertErrorsInCode(
- '''
+ await assertErrorsInCode('''
f() sync* {
yield* 0;
}
-''',
- useCFE
- ? [StaticTypeWarningCode.INVALID_ASSIGNMENT]
- : [StaticTypeWarningCode.YIELD_OF_INVALID_TYPE]);
+''', [StaticTypeWarningCode.YIELD_OF_INVALID_TYPE]);
}
test_yield_each_sync_to_mistyped_iterable() async {
- await assertErrorsInCode(
- '''
+ await assertErrorsInCode('''
Iterable<int> f() sync* {
yield* g();
}
Iterable<String> g() => null;
-''',
- useCFE
- ? [StaticTypeWarningCode.INVALID_ASSIGNMENT]
- : [StaticTypeWarningCode.YIELD_OF_INVALID_TYPE]);
+''', [StaticTypeWarningCode.YIELD_OF_INVALID_TYPE]);
}
test_yield_sync_to_basic_type() async {
@@ -2320,15 +2024,11 @@
}
test_yield_sync_to_mistyped_iterable() async {
- await assertErrorsInCode(
- '''
+ await assertErrorsInCode('''
Iterable<int> f() sync* {
yield "foo";
}
-''',
- useCFE
- ? [StaticTypeWarningCode.INVALID_ASSIGNMENT]
- : [StaticTypeWarningCode.YIELD_OF_INVALID_TYPE]);
+''', [StaticTypeWarningCode.YIELD_OF_INVALID_TYPE]);
}
test_yield_sync_to_stream() async {
diff --git a/pkg/analyzer/test/generated/static_warning_code_kernel_test.dart b/pkg/analyzer/test/generated/static_warning_code_kernel_test.dart
deleted file mode 100644
index 6040a18..0000000
--- a/pkg/analyzer/test/generated/static_warning_code_kernel_test.dart
+++ /dev/null
@@ -1,579 +0,0 @@
-// 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:test_reflective_loader/test_reflective_loader.dart';
-
-import 'static_warning_code_driver_test.dart';
-
-main() {
- defineReflectiveSuite(() {
- defineReflectiveTests(StaticWarningCodeTest_Kernel);
- });
-}
-
-/// Tests marked with this annotation fail because of a Fasta problem.
-class FastaProblem {
- const FastaProblem(String issueUri);
-}
-
-@reflectiveTest
-class StaticWarningCodeTest_Kernel extends StaticWarningCodeTest_Driver {
- @override
- bool get enableKernelDriver => true;
-
- @override
- bool get useCFE => true;
-
- @override
- bool get usingFastaParser => true;
-
- @override
- @failingTest
- test_ambiguousImport_as() async {
- return super.test_ambiguousImport_as();
- }
-
- @override
- @failingTest
- test_ambiguousImport_extends() async {
- return super.test_ambiguousImport_extends();
- }
-
- @override
- @failingTest
- test_ambiguousImport_implements() async {
- return super.test_ambiguousImport_implements();
- }
-
- @override
- @failingTest
- test_ambiguousImport_inPart() async {
- return super.test_ambiguousImport_inPart();
- }
-
- @override
- @failingTest
- test_ambiguousImport_instanceCreation() async {
- return super.test_ambiguousImport_instanceCreation();
- }
-
- @override
- @failingTest
- test_ambiguousImport_is() async {
- return super.test_ambiguousImport_is();
- }
-
- @override
- @failingTest
- test_ambiguousImport_qualifier() async {
- return super.test_ambiguousImport_qualifier();
- }
-
- @override
- @failingTest
- test_ambiguousImport_typeAnnotation() async {
- return super.test_ambiguousImport_typeAnnotation();
- }
-
- @override
- @failingTest
- test_ambiguousImport_typeArgument_annotation() async {
- return super.test_ambiguousImport_typeArgument_annotation();
- }
-
- @override
- @failingTest
- test_ambiguousImport_typeArgument_instanceCreation() async {
- return super.test_ambiguousImport_typeArgument_instanceCreation();
- }
-
- @override
- @failingTest
- test_ambiguousImport_varRead() async {
- return super.test_ambiguousImport_varRead();
- }
-
- @override
- @failingTest
- test_ambiguousImport_varWrite() async {
- return super.test_ambiguousImport_varWrite();
- }
-
- @override
- @failingTest
- test_ambiguousImport_withPrefix() async {
- return super.test_ambiguousImport_withPrefix();
- }
-
- @override
- @failingTest
- test_argumentTypeNotAssignable_const_super() async {
- return super.test_argumentTypeNotAssignable_const_super();
- }
-
- @override
- @failingTest
- test_assignmentToClass() async {
- return super.test_assignmentToClass();
- }
-
- @override
- @failingTest
- test_assignmentToConst_instanceVariable() async {
- return super.test_assignmentToConst_instanceVariable();
- }
-
- @override
- @failingTest
- test_assignmentToConst_instanceVariable_plusEq() async {
- return super.test_assignmentToConst_instanceVariable_plusEq();
- }
-
- @override
- @failingTest
- test_assignmentToConst_localVariable() async {
- return super.test_assignmentToConst_localVariable();
- }
-
- @override
- @failingTest
- test_assignmentToConst_localVariable_plusEq() async {
- return super.test_assignmentToConst_localVariable_plusEq();
- }
-
- @override
- @failingTest
- test_assignmentToEnumType() async {
- return super.test_assignmentToEnumType();
- }
-
- @override
- @failingTest
- test_assignmentToFinal_instanceVariable() async {
- return super.test_assignmentToFinal_instanceVariable();
- }
-
- @override
- @failingTest
- test_assignmentToFinal_instanceVariable_plusEq() async {
- return super.test_assignmentToFinal_instanceVariable_plusEq();
- }
-
- @override
- @failingTest
- test_assignmentToFinalNoSetter_prefixedIdentifier() async {
- return super.test_assignmentToFinalNoSetter_prefixedIdentifier();
- }
-
- @override
- @failingTest
- test_assignmentToMethod() async {
- return super.test_assignmentToMethod();
- }
-
- @override
- @failingTest
- test_assignmentToTypedef() async {
- return super.test_assignmentToTypedef();
- }
-
- @override
- @failingTest
- test_assignmentToTypeParameter() async {
- return super.test_assignmentToTypeParameter();
- }
-
- @override
- @failingTest
- test_castToNonType() async {
- return super.test_castToNonType();
- }
-
- @override
- @failingTest
- test_conflictingDartImport() async {
- return super.test_conflictingDartImport();
- }
-
- @override
- @failingTest
- test_conflictingInstanceGetterAndSuperclassMember_declField_direct_setter() async {
- return super
- .test_conflictingInstanceGetterAndSuperclassMember_declField_direct_setter();
- }
-
- @override
- @failingTest
- test_conflictingInstanceGetterAndSuperclassMember_declGetter_direct_getter() async {
- return super
- .test_conflictingInstanceGetterAndSuperclassMember_declGetter_direct_getter();
- }
-
- @override
- @failingTest
- test_conflictingInstanceGetterAndSuperclassMember_declGetter_direct_method() async {
- return super
- .test_conflictingInstanceGetterAndSuperclassMember_declGetter_direct_method();
- }
-
- @override
- @failingTest
- test_conflictingInstanceGetterAndSuperclassMember_declGetter_direct_setter() async {
- return super
- .test_conflictingInstanceGetterAndSuperclassMember_declGetter_direct_setter();
- }
-
- @override
- @failingTest
- test_conflictingInstanceGetterAndSuperclassMember_declGetter_indirect() async {
- return super
- .test_conflictingInstanceGetterAndSuperclassMember_declGetter_indirect();
- }
-
- @override
- @failingTest
- test_conflictingInstanceGetterAndSuperclassMember_declGetter_mixin() async {
- return super
- .test_conflictingInstanceGetterAndSuperclassMember_declGetter_mixin();
- }
-
- @override
- @failingTest
- test_conflictingInstanceGetterAndSuperclassMember_direct_field() async {
- return super
- .test_conflictingInstanceGetterAndSuperclassMember_direct_field();
- }
-
- @override
- @failingTest
- test_conflictingInstanceSetterAndSuperclassMember() async {
- return super.test_conflictingInstanceSetterAndSuperclassMember();
- }
-
- @override
- @failingTest
- test_exportDuplicatedLibraryNamed() async {
- return super.test_exportDuplicatedLibraryNamed();
- }
-
- @override
- @failingTest
- test_fieldInitializingFormalNotAssignable() async {
- return super.test_fieldInitializingFormalNotAssignable();
- }
-
- @override
- @failingTest
- @FastaProblem('https://github.com/dart-lang/sdk/issues/31073')
- test_finalNotInitialized_inConstructor_1() async {
- return super.test_finalNotInitialized_inConstructor_1();
- }
-
- @override
- @failingTest
- @FastaProblem('https://github.com/dart-lang/sdk/issues/31073')
- test_finalNotInitialized_inConstructor_2() async {
- return super.test_finalNotInitialized_inConstructor_2();
- }
-
- @override
- @failingTest
- @FastaProblem('https://github.com/dart-lang/sdk/issues/31073')
- test_finalNotInitialized_inConstructor_3() async {
- return super.test_finalNotInitialized_inConstructor_3();
- }
-
- @override
- @failingTest
- test_generalizedVoid_invocationOfVoidFieldError() async {
- return super.test_generalizedVoid_invocationOfVoidFieldError();
- }
-
- @override
- @failingTest
- test_generalizedVoid_useOfVoidInConditionalLhsError() async {
- return super.test_generalizedVoid_useOfVoidInConditionalLhsError();
- }
-
- @override
- @failingTest
- test_generalizedVoid_useOfVoidInConditionalRhsError() async {
- return super.test_generalizedVoid_useOfVoidInConditionalRhsError();
- }
-
- @override
- @failingTest
- test_generalizedVoid_useOfVoidInForeachVariableError() async {
- return super.test_generalizedVoid_useOfVoidInForeachVariableError();
- }
-
- @override
- @failingTest
- test_generalizedVoid_useOfVoidReturnInNonVoidFunctionError() async {
- return super.test_generalizedVoid_useOfVoidReturnInNonVoidFunctionError();
- }
-
- @override
- @failingTest
- test_importDuplicatedLibraryNamed() async {
- return super.test_importDuplicatedLibraryNamed();
- }
-
- @override
- @failingTest
- @FastaProblem('https://github.com/dart-lang/sdk/issues/30959')
- test_importOfNonLibrary() async {
- return super.test_importOfNonLibrary();
- }
-
- @override
- @failingTest
- test_mismatchedAccessorTypes_class() async {
- return super.test_mismatchedAccessorTypes_class();
- }
-
- @override
- @failingTest
- test_mismatchedAccessorTypes_getterAndSuperSetter() async {
- return super.test_mismatchedAccessorTypes_getterAndSuperSetter();
- }
-
- @override
- @failingTest
- test_mismatchedAccessorTypes_setterAndSuperGetter() async {
- return super.test_mismatchedAccessorTypes_setterAndSuperGetter();
- }
-
- @override
- @failingTest
- test_mismatchedAccessorTypes_topLevel() async {
- return super.test_mismatchedAccessorTypes_topLevel();
- }
-
- @override
- @failingTest
- test_missingEnumConstantInSwitch() async {
- return super.test_missingEnumConstantInSwitch();
- }
-
- @override
- @failingTest
- test_mixedReturnTypes_localFunction() async {
- return super.test_mixedReturnTypes_localFunction();
- }
-
- @override
- @failingTest
- test_mixedReturnTypes_method() async {
- return super.test_mixedReturnTypes_method();
- }
-
- @override
- @failingTest
- test_mixedReturnTypes_topLevelFunction() async {
- return super.test_mixedReturnTypes_topLevelFunction();
- }
-
- @override
- @failingTest
- test_newWithInvalidTypeParameters() async {
- return super.test_newWithInvalidTypeParameters();
- }
-
- @override
- @failingTest
- test_newWithInvalidTypeParameters_tooFew() async {
- return super.test_newWithInvalidTypeParameters_tooFew();
- }
-
- @override
- @failingTest
- test_newWithInvalidTypeParameters_tooMany() async {
- return super.test_newWithInvalidTypeParameters_tooMany();
- }
-
- @override
- @failingTest
- test_newWithNonType() async {
- return super.test_newWithNonType();
- }
-
- @override
- @failingTest
- test_nonAbstractClassInheritsAbstractMemberOne_ensureCorrectFunctionSubtypeIsUsedInImplementation() async {
- return super
- .test_nonAbstractClassInheritsAbstractMemberOne_ensureCorrectFunctionSubtypeIsUsedInImplementation();
- }
-
- @override
- @failingTest
- test_nonAbstractClassInheritsAbstractMemberOne_method_optionalParamCount() async {
- return super
- .test_nonAbstractClassInheritsAbstractMemberOne_method_optionalParamCount();
- }
-
- @override
- @failingTest
- test_nonTypeInCatchClause_notType() async {
- return super.test_nonTypeInCatchClause_notType();
- }
-
- @override
- @failingTest
- test_nonVoidReturnForOperator() async {
- return super.test_nonVoidReturnForOperator();
- }
-
- @override
- @failingTest
- test_nonVoidReturnForSetter_function() async {
- return super.test_nonVoidReturnForSetter_function();
- }
-
- @override
- @failingTest
- test_nonVoidReturnForSetter_method() async {
- return super.test_nonVoidReturnForSetter_method();
- }
-
- @override
- @failingTest
- test_redirectToInvalidFunctionType() async {
- return super.test_redirectToInvalidFunctionType();
- }
-
- @override
- @failingTest
- test_redirectToInvalidReturnType() async {
- return super.test_redirectToInvalidReturnType();
- }
-
- @override
- @failingTest
- test_redirectToMissingConstructor_named() async {
- return super.test_redirectToMissingConstructor_named();
- }
-
- @override
- @failingTest
- test_redirectToMissingConstructor_unnamed() async {
- return super.test_redirectToMissingConstructor_unnamed();
- }
-
- @override
- @failingTest
- test_redirectToNonClass_notAType() async {
- return super.test_redirectToNonClass_notAType();
- }
-
- @override
- @failingTest
- test_redirectToNonClass_undefinedIdentifier() async {
- return super.test_redirectToNonClass_undefinedIdentifier();
- }
-
- @override
- @failingTest
- test_returnWithoutValue_async() async {
- return super.test_returnWithoutValue_async();
- }
-
- @override
- @failingTest
- test_returnWithoutValue_async_future_object_with_return() {
- return super.test_returnWithoutValue_async_future_object_with_return();
- }
-
- @override
- @failingTest
- test_returnWithoutValue_factoryConstructor() async {
- return super.test_returnWithoutValue_factoryConstructor();
- }
-
- @override
- @failingTest
- test_returnWithoutValue_function() async {
- return super.test_returnWithoutValue_function();
- }
-
- @override
- @failingTest
- test_returnWithoutValue_method() async {
- return super.test_returnWithoutValue_method();
- }
-
- @override
- @failingTest
- test_returnWithoutValue_mixedReturnTypes_function() async {
- return super.test_returnWithoutValue_mixedReturnTypes_function();
- }
-
- @override
- @failingTest
- test_staticAccessToInstanceMember_method_reference() async {
- return super.test_staticAccessToInstanceMember_method_reference();
- }
-
- @override
- @failingTest
- test_staticAccessToInstanceMember_propertyAccess_field() async {
- return super.test_staticAccessToInstanceMember_propertyAccess_field();
- }
-
- @override
- @failingTest
- test_staticAccessToInstanceMember_propertyAccess_getter() async {
- return super.test_staticAccessToInstanceMember_propertyAccess_getter();
- }
-
- @override
- @failingTest
- test_staticAccessToInstanceMember_propertyAccess_setter() async {
- return super.test_staticAccessToInstanceMember_propertyAccess_setter();
- }
-
- @override
- @failingTest
- test_switchExpressionNotAssignable() async {
- return super.test_switchExpressionNotAssignable();
- }
-
- @override
- @failingTest
- test_typeAnnotationDeferredClass_functionDeclaration_returnType() async {
- return super
- .test_typeAnnotationDeferredClass_functionDeclaration_returnType();
- }
-
- @override
- @failingTest
- test_typeAnnotationDeferredClass_methodDeclaration_returnType() async {
- return super
- .test_typeAnnotationDeferredClass_methodDeclaration_returnType();
- }
-
- @override
- @failingTest
- test_typeAnnotationDeferredClass_typeParameter_bound() async {
- return super.test_typeAnnotationDeferredClass_typeParameter_bound();
- }
-
- @override
- @failingTest
- test_typeTestNonType() async {
- return super.test_typeTestNonType();
- }
-
- @override
- @failingTest
- test_undefinedIdentifier_for() async {
- return super.test_undefinedIdentifier_for();
- }
-
- @override
- @failingTest
- test_undefinedIdentifier_function() async {
- return super.test_undefinedIdentifier_function();
- }
-}
diff --git a/pkg/analyzer/test/generated/static_warning_code_test.dart b/pkg/analyzer/test/generated/static_warning_code_test.dart
index 7582ed5..8ee7ee7 100644
--- a/pkg/analyzer/test/generated/static_warning_code_test.dart
+++ b/pkg/analyzer/test/generated/static_warning_code_test.dart
@@ -83,6 +83,19 @@
assertErrors(source, [StaticWarningCode.AMBIGUOUS_IMPORT]);
}
+ test_ambiguousImport_dart() async {
+ Source source = addSource(r'''
+import 'dart:async';
+import 'dart:async2';
+
+Future v;
+''');
+ await computeAnalysisResult(source);
+ if (enableNewAnalysisDriver) {
+ assertErrors(source, [StaticWarningCode.AMBIGUOUS_IMPORT]);
+ }
+ }
+
test_ambiguousImport_extends() async {
Source source = addSource(r'''
import 'lib1.dart';
@@ -658,11 +671,7 @@
A.v = 1;
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [StaticTypeWarningCode.UNDEFINED_SETTER]);
- } else {
- assertErrors(source, [StaticWarningCode.ASSIGNMENT_TO_CONST]);
- }
+ assertErrors(source, [StaticWarningCode.ASSIGNMENT_TO_CONST]);
verify([source]);
}
@@ -675,11 +684,7 @@
A.v += 1;
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [StaticTypeWarningCode.UNDEFINED_SETTER]);
- } else {
- assertErrors(source, [StaticWarningCode.ASSIGNMENT_TO_CONST]);
- }
+ assertErrors(source, [StaticWarningCode.ASSIGNMENT_TO_CONST]);
verify([source]);
}
@@ -726,11 +731,7 @@
a.v = 1;
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [StaticTypeWarningCode.UNDEFINED_SETTER]);
- } else {
- assertErrors(source, [StaticWarningCode.ASSIGNMENT_TO_FINAL]);
- }
+ assertErrors(source, [StaticWarningCode.ASSIGNMENT_TO_FINAL]);
verify([source]);
}
@@ -744,11 +745,7 @@
a.v += 1;
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [StaticTypeWarningCode.UNDEFINED_SETTER]);
- } else {
- assertErrors(source, [StaticWarningCode.ASSIGNMENT_TO_FINAL]);
- }
+ assertErrors(source, [StaticWarningCode.ASSIGNMENT_TO_FINAL]);
verify([source]);
}
@@ -759,11 +756,7 @@
x = 1;
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [StaticTypeWarningCode.UNDEFINED_SETTER]);
- } else {
- assertErrors(source, [StaticWarningCode.ASSIGNMENT_TO_FINAL_LOCAL]);
- }
+ assertErrors(source, [StaticWarningCode.ASSIGNMENT_TO_FINAL_LOCAL]);
verify([source]);
}
@@ -774,11 +767,7 @@
x += 1;
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [StaticTypeWarningCode.UNDEFINED_SETTER]);
- } else {
- assertErrors(source, [StaticWarningCode.ASSIGNMENT_TO_FINAL_LOCAL]);
- }
+ assertErrors(source, [StaticWarningCode.ASSIGNMENT_TO_FINAL_LOCAL]);
verify([source]);
}
@@ -788,11 +777,7 @@
x = 1;
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [StaticTypeWarningCode.UNDEFINED_SETTER]);
- } else {
- assertErrors(source, [StaticWarningCode.ASSIGNMENT_TO_FINAL_LOCAL]);
- }
+ assertErrors(source, [StaticWarningCode.ASSIGNMENT_TO_FINAL_LOCAL]);
verify([source]);
}
@@ -803,11 +788,7 @@
x--;
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [StaticTypeWarningCode.UNDEFINED_SETTER]);
- } else {
- assertErrors(source, [StaticWarningCode.ASSIGNMENT_TO_FINAL_LOCAL]);
- }
+ assertErrors(source, [StaticWarningCode.ASSIGNMENT_TO_FINAL_LOCAL]);
verify([source]);
}
@@ -818,11 +799,7 @@
x++;
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [StaticTypeWarningCode.UNDEFINED_SETTER]);
- } else {
- assertErrors(source, [StaticWarningCode.ASSIGNMENT_TO_FINAL_LOCAL]);
- }
+ assertErrors(source, [StaticWarningCode.ASSIGNMENT_TO_FINAL_LOCAL]);
verify([source]);
}
@@ -833,11 +810,7 @@
--x;
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [StaticTypeWarningCode.UNDEFINED_SETTER]);
- } else {
- assertErrors(source, [StaticWarningCode.ASSIGNMENT_TO_FINAL_LOCAL]);
- }
+ assertErrors(source, [StaticWarningCode.ASSIGNMENT_TO_FINAL_LOCAL]);
verify([source]);
}
@@ -848,11 +821,7 @@
++x;
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [StaticTypeWarningCode.UNDEFINED_SETTER]);
- } else {
- assertErrors(source, [StaticWarningCode.ASSIGNMENT_TO_FINAL_LOCAL]);
- }
+ assertErrors(source, [StaticWarningCode.ASSIGNMENT_TO_FINAL_LOCAL]);
verify([source]);
}
@@ -863,11 +832,7 @@
x--;
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [StaticTypeWarningCode.UNDEFINED_SETTER]);
- } else {
- assertErrors(source, [StaticWarningCode.ASSIGNMENT_TO_FINAL_LOCAL]);
- }
+ assertErrors(source, [StaticWarningCode.ASSIGNMENT_TO_FINAL_LOCAL]);
verify([source]);
}
@@ -878,11 +843,7 @@
x++;
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [StaticTypeWarningCode.UNDEFINED_SETTER]);
- } else {
- assertErrors(source, [StaticWarningCode.ASSIGNMENT_TO_FINAL_LOCAL]);
- }
+ assertErrors(source, [StaticWarningCode.ASSIGNMENT_TO_FINAL_LOCAL]);
verify([source]);
}
@@ -891,11 +852,7 @@
final x = 0;
f() { x = 1; }''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [StaticTypeWarningCode.UNDEFINED_SETTER]);
- } else {
- assertErrors(source, [StaticWarningCode.ASSIGNMENT_TO_FINAL_LOCAL]);
- }
+ assertErrors(source, [StaticWarningCode.ASSIGNMENT_TO_FINAL_LOCAL]);
verify([source]);
}
@@ -909,11 +866,7 @@
a.x = 0;
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [StaticTypeWarningCode.UNDEFINED_SETTER]);
- } else {
- assertErrors(source, [StaticWarningCode.ASSIGNMENT_TO_FINAL_NO_SETTER]);
- }
+ assertErrors(source, [StaticWarningCode.ASSIGNMENT_TO_FINAL_NO_SETTER]);
verify([source]);
}
@@ -929,11 +882,7 @@
B.a.x = 0;
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [StaticTypeWarningCode.UNDEFINED_SETTER]);
- } else {
- assertErrors(source, [StaticWarningCode.ASSIGNMENT_TO_FINAL_NO_SETTER]);
- }
+ assertErrors(source, [StaticWarningCode.ASSIGNMENT_TO_FINAL_NO_SETTER]);
verify([source]);
}
@@ -944,11 +893,7 @@
f = null;
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [StaticTypeWarningCode.UNDEFINED_SETTER]);
- } else {
- assertErrors(source, [StaticWarningCode.ASSIGNMENT_TO_FUNCTION]);
- }
+ assertErrors(source, [StaticWarningCode.ASSIGNMENT_TO_FUNCTION]);
verify([source]);
}
@@ -961,11 +906,7 @@
a.m = () {};
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [StaticTypeWarningCode.UNDEFINED_SETTER]);
- } else {
- assertErrors(source, [StaticWarningCode.ASSIGNMENT_TO_METHOD]);
- }
+ assertErrors(source, [StaticWarningCode.ASSIGNMENT_TO_METHOD]);
verify([source]);
}
@@ -1041,118 +982,6 @@
verify([source]);
}
- test_conflictingDartImport() async {
- Source source = addSource(r'''
-import 'lib.dart';
-import 'dart:async';
-Future f = null;
-Stream s;''');
- addNamedSource("/lib.dart", r'''
-library lib;
-class Future {}''');
- await computeAnalysisResult(source);
- assertErrors(source, [StaticWarningCode.CONFLICTING_DART_IMPORT]);
- }
-
- test_conflictingInstanceGetterAndSuperclassMember_declField_direct_setter() async {
- Source source = addSource(r'''
-class A {
- static set v(x) {}
-}
-class B extends A {
- var v;
-}''');
- await computeAnalysisResult(source);
- assertErrors(source,
- [StaticWarningCode.CONFLICTING_INSTANCE_GETTER_AND_SUPERCLASS_MEMBER]);
- verify([source]);
- }
-
- test_conflictingInstanceGetterAndSuperclassMember_declGetter_direct_getter() async {
- Source source = addSource(r'''
-class A {
- static get v => 0;
-}
-class B extends A {
- get v => 0;
-}''');
- await computeAnalysisResult(source);
- assertErrors(source,
- [StaticWarningCode.CONFLICTING_INSTANCE_GETTER_AND_SUPERCLASS_MEMBER]);
- verify([source]);
- }
-
- test_conflictingInstanceGetterAndSuperclassMember_declGetter_direct_method() async {
- Source source = addSource(r'''
-class A {
- static v() {}
-}
-class B extends A {
- get v => 0;
-}''');
- await computeAnalysisResult(source);
- assertErrors(source,
- [StaticWarningCode.CONFLICTING_INSTANCE_GETTER_AND_SUPERCLASS_MEMBER]);
- verify([source]);
- }
-
- test_conflictingInstanceGetterAndSuperclassMember_declGetter_direct_setter() async {
- Source source = addSource(r'''
-class A {
- static set v(x) {}
-}
-class B extends A {
- get v => 0;
-}''');
- await computeAnalysisResult(source);
- assertErrors(source,
- [StaticWarningCode.CONFLICTING_INSTANCE_GETTER_AND_SUPERCLASS_MEMBER]);
- verify([source]);
- }
-
- test_conflictingInstanceGetterAndSuperclassMember_declGetter_indirect() async {
- Source source = addSource(r'''
-class A {
- static int v;
-}
-class B extends A {}
-class C extends B {
- get v => 0;
-}''');
- await computeAnalysisResult(source);
- assertErrors(source,
- [StaticWarningCode.CONFLICTING_INSTANCE_GETTER_AND_SUPERCLASS_MEMBER]);
- verify([source]);
- }
-
- test_conflictingInstanceGetterAndSuperclassMember_declGetter_mixin() async {
- Source source = addSource(r'''
-class M {
- static int v;
-}
-class B extends Object with M {
- get v => 0;
-}''');
- await computeAnalysisResult(source);
- assertErrors(source,
- [StaticWarningCode.CONFLICTING_INSTANCE_GETTER_AND_SUPERCLASS_MEMBER]);
- verify([source]);
- }
-
- test_conflictingInstanceGetterAndSuperclassMember_direct_field() async {
- Source source = addSource(r'''
-class A {
- static int v;
-}
-class B extends A {
- get v => 0;
-}''');
- await computeAnalysisResult(source);
- assertErrors(source,
- [StaticWarningCode.CONFLICTING_INSTANCE_GETTER_AND_SUPERCLASS_MEMBER]);
- verify([source]);
- }
-
test_conflictingInstanceMethodSetter2() async {
Source source = addSource(r'''
class A {
@@ -1160,13 +989,8 @@
set foo(a) {}
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source,
- [CompileTimeErrorCode.DECLARED_MEMBER_CONFLICTS_WITH_INHERITED]);
- } else {
- assertErrors(
- source, [StaticWarningCode.CONFLICTING_INSTANCE_METHOD_SETTER2]);
- }
+ assertErrors(
+ source, [StaticWarningCode.CONFLICTING_INSTANCE_METHOD_SETTER2]);
verify([source]);
}
@@ -1177,13 +1001,8 @@
foo() {}
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source,
- [CompileTimeErrorCode.DECLARED_MEMBER_CONFLICTS_WITH_INHERITED]);
- } else {
- assertErrors(
- source, [StaticWarningCode.CONFLICTING_INSTANCE_METHOD_SETTER]);
- }
+ assertErrors(
+ source, [StaticWarningCode.CONFLICTING_INSTANCE_METHOD_SETTER]);
verify([source]);
}
@@ -1196,13 +1015,8 @@
foo() {}
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source,
- [CompileTimeErrorCode.DECLARED_MEMBER_CONFLICTS_WITH_INHERITED]);
- } else {
- assertErrors(
- source, [StaticWarningCode.CONFLICTING_INSTANCE_METHOD_SETTER]);
- }
+ assertErrors(
+ source, [StaticWarningCode.CONFLICTING_INSTANCE_METHOD_SETTER]);
verify([source]);
}
@@ -1215,27 +1029,8 @@
foo() {}
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source,
- [CompileTimeErrorCode.DECLARED_MEMBER_CONFLICTS_WITH_INHERITED]);
- } else {
- assertErrors(
- source, [StaticWarningCode.CONFLICTING_INSTANCE_METHOD_SETTER]);
- }
- verify([source]);
- }
-
- test_conflictingInstanceSetterAndSuperclassMember() async {
- Source source = addSource(r'''
-class A {
- static int v;
-}
-class B extends A {
- set v(x) {}
-}''');
- await computeAnalysisResult(source);
- assertErrors(source,
- [StaticWarningCode.CONFLICTING_INSTANCE_SETTER_AND_SUPERCLASS_MEMBER]);
+ assertErrors(
+ source, [StaticWarningCode.CONFLICTING_INSTANCE_METHOD_SETTER]);
verify([source]);
}
@@ -1248,13 +1043,8 @@
static get x => 0;
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source,
- [CompileTimeErrorCode.DECLARED_MEMBER_CONFLICTS_WITH_INHERITED]);
- } else {
- assertErrors(source,
- [StaticWarningCode.CONFLICTING_STATIC_GETTER_AND_INSTANCE_SETTER]);
- }
+ assertErrors(source,
+ [StaticWarningCode.CONFLICTING_STATIC_GETTER_AND_INSTANCE_SETTER]);
verify([source]);
}
@@ -1267,13 +1057,8 @@
static get x => 0;
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source,
- [CompileTimeErrorCode.DECLARED_MEMBER_CONFLICTS_WITH_INHERITED]);
- } else {
- assertErrors(source,
- [StaticWarningCode.CONFLICTING_STATIC_GETTER_AND_INSTANCE_SETTER]);
- }
+ assertErrors(source,
+ [StaticWarningCode.CONFLICTING_STATIC_GETTER_AND_INSTANCE_SETTER]);
verify([source]);
}
@@ -1284,13 +1069,8 @@
set x(int p) {}
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source,
- [CompileTimeErrorCode.DECLARED_MEMBER_CONFLICTS_WITH_INHERITED]);
- } else {
- assertErrors(source,
- [StaticWarningCode.CONFLICTING_STATIC_GETTER_AND_INSTANCE_SETTER]);
- }
+ assertErrors(source,
+ [StaticWarningCode.CONFLICTING_STATIC_GETTER_AND_INSTANCE_SETTER]);
verify([source]);
}
@@ -1301,13 +1081,8 @@
static set x(int p) {}
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source,
- [CompileTimeErrorCode.DECLARED_MEMBER_CONFLICTS_WITH_INHERITED]);
- } else {
- assertErrors(source,
- [StaticWarningCode.CONFLICTING_STATIC_SETTER_AND_INSTANCE_MEMBER]);
- }
+ assertErrors(source,
+ [StaticWarningCode.CONFLICTING_STATIC_SETTER_AND_INSTANCE_MEMBER]);
verify([source]);
}
@@ -1318,13 +1093,8 @@
static set x(int p) {}
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source,
- [CompileTimeErrorCode.DECLARED_MEMBER_CONFLICTS_WITH_INHERITED]);
- } else {
- assertErrors(source,
- [StaticWarningCode.CONFLICTING_STATIC_SETTER_AND_INSTANCE_MEMBER]);
- }
+ assertErrors(source,
+ [StaticWarningCode.CONFLICTING_STATIC_SETTER_AND_INSTANCE_MEMBER]);
verify([source]);
}
@@ -1337,14 +1107,7 @@
A a = const A();
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [
- CompileTimeErrorCode.NOT_CONSTANT_EXPRESSION,
- StaticWarningCode.NEW_WITH_ABSTRACT_CLASS
- ]);
- } else {
- assertErrors(source, [StaticWarningCode.CONST_WITH_ABSTRACT_CLASS]);
- }
+ assertErrors(source, [StaticWarningCode.CONST_WITH_ABSTRACT_CLASS]);
verify([source]);
}
@@ -1357,14 +1120,7 @@
var a = const A<int>();
}''');
TestAnalysisResult result = await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [
- CompileTimeErrorCode.NOT_CONSTANT_EXPRESSION,
- StaticWarningCode.NEW_WITH_ABSTRACT_CLASS
- ]);
- } else {
- assertErrors(source, [StaticWarningCode.CONST_WITH_ABSTRACT_CLASS]);
- }
+ assertErrors(source, [StaticWarningCode.CONST_WITH_ABSTRACT_CLASS]);
verify([source]);
ClassDeclaration classA = result.unit.declarations[0];
@@ -1426,11 +1182,7 @@
f(0, 1, '2');
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [CompileTimeErrorCode.EXTRA_POSITIONAL_ARGUMENTS]);
- } else {
- assertErrors(source, [StaticWarningCode.EXTRA_POSITIONAL_ARGUMENTS]);
- }
+ assertErrors(source, [StaticWarningCode.EXTRA_POSITIONAL_ARGUMENTS]);
verify([source]);
}
@@ -1440,11 +1192,7 @@
(int x) {} (0, 1);
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [CompileTimeErrorCode.EXTRA_POSITIONAL_ARGUMENTS]);
- } else {
- assertErrors(source, [StaticWarningCode.EXTRA_POSITIONAL_ARGUMENTS]);
- }
+ assertErrors(source, [StaticWarningCode.EXTRA_POSITIONAL_ARGUMENTS]);
verify([source]);
}
@@ -1455,13 +1203,8 @@
f(0, 1, '2');
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source,
- [CompileTimeErrorCode.EXTRA_POSITIONAL_ARGUMENTS_COULD_BE_NAMED]);
- } else {
- assertErrors(source,
- [StaticWarningCode.EXTRA_POSITIONAL_ARGUMENTS_COULD_BE_NAMED]);
- }
+ assertErrors(
+ source, [StaticWarningCode.EXTRA_POSITIONAL_ARGUMENTS_COULD_BE_NAMED]);
verify([source]);
}
@@ -1471,13 +1214,8 @@
(int x, {int y}) {} (0, 1);
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source,
- [CompileTimeErrorCode.EXTRA_POSITIONAL_ARGUMENTS_COULD_BE_NAMED]);
- } else {
- assertErrors(source,
- [StaticWarningCode.EXTRA_POSITIONAL_ARGUMENTS_COULD_BE_NAMED]);
- }
+ assertErrors(
+ source, [StaticWarningCode.EXTRA_POSITIONAL_ARGUMENTS_COULD_BE_NAMED]);
verify([source]);
}
@@ -1488,14 +1226,8 @@
A() : x = 1 {}
}''');
await computeAnalysisResult(source);
- assertErrors(
- source,
- useCFE
- ? [CompileTimeErrorCode.FINAL_INITIALIZED_MULTIPLE_TIMES]
- : [
- StaticWarningCode
- .FIELD_INITIALIZED_IN_INITIALIZER_AND_DECLARATION
- ]);
+ assertErrors(source,
+ [StaticWarningCode.FIELD_INITIALIZED_IN_INITIALIZER_AND_DECLARATION]);
verify([source]);
}
@@ -1506,12 +1238,7 @@
A() : x = '';
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [StaticTypeWarningCode.INVALID_ASSIGNMENT]);
- } else {
- assertErrors(
- source, [StaticWarningCode.FIELD_INITIALIZER_NOT_ASSIGNABLE]);
- }
+ assertErrors(source, [StaticWarningCode.FIELD_INITIALIZER_NOT_ASSIGNABLE]);
verify([source]);
}
@@ -1550,13 +1277,8 @@
A() : x = 0 {}
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(
- source, [CompileTimeErrorCode.FINAL_INITIALIZED_MULTIPLE_TIMES]);
- } else {
- assertErrors(source,
- [StaticWarningCode.FIELD_INITIALIZED_IN_INITIALIZER_AND_DECLARATION]);
- }
+ assertErrors(source,
+ [StaticWarningCode.FIELD_INITIALIZED_IN_INITIALIZER_AND_DECLARATION]);
verify([source]);
}
@@ -1567,14 +1289,8 @@
A(this.x) {}
}''');
await computeAnalysisResult(source);
- assertErrors(
- source,
- useCFE
- ? [CompileTimeErrorCode.FINAL_INITIALIZED_MULTIPLE_TIMES]
- : [
- StaticWarningCode
- .FINAL_INITIALIZED_IN_DECLARATION_AND_CONSTRUCTOR
- ]);
+ assertErrors(source,
+ [StaticWarningCode.FINAL_INITIALIZED_IN_DECLARATION_AND_CONSTRUCTOR]);
verify([source]);
}
@@ -1784,14 +1500,7 @@
}
''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [
- StaticWarningCode.USE_OF_VOID_RESULT,
- StaticTypeWarningCode.UNDEFINED_METHOD
- ]);
- } else {
- assertErrors(source, [StaticWarningCode.USE_OF_VOID_RESULT]);
- }
+ assertErrors(source, [StaticWarningCode.USE_OF_VOID_RESULT]);
}
test_generalizedVoid_invocationOfVoidResultError() async {
@@ -1801,14 +1510,7 @@
}
''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [
- StaticWarningCode.USE_OF_VOID_RESULT,
- StaticTypeWarningCode.UNDEFINED_METHOD
- ]);
- } else {
- assertErrors(source, [StaticWarningCode.USE_OF_VOID_RESULT]);
- }
+ assertErrors(source, [StaticWarningCode.USE_OF_VOID_RESULT]);
}
test_generalizedVoid_invocationOfVoidToplevelError() async {
@@ -1819,14 +1521,7 @@
}
''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [
- StaticWarningCode.USE_OF_VOID_RESULT,
- StaticTypeWarningCode.UNDEFINED_METHOD
- ]);
- } else {
- assertErrors(source, [StaticWarningCode.USE_OF_VOID_RESULT]);
- }
+ assertErrors(source, [StaticWarningCode.USE_OF_VOID_RESULT]);
}
test_generalizedVoid_throwVoidValueError() async {
@@ -1892,14 +1587,7 @@
}
''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [
- StaticWarningCode.USE_OF_VOID_RESULT,
- StaticTypeWarningCode.UNDEFINED_METHOD
- ]);
- } else {
- assertErrors(source, [StaticWarningCode.USE_OF_VOID_RESULT]);
- }
+ assertErrors(source, [StaticWarningCode.USE_OF_VOID_RESULT]);
}
test_generalizedVoid_useOfVoidCallMethodError() async {
@@ -1932,14 +1620,7 @@
}
''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [
- StaticWarningCode.USE_OF_VOID_RESULT,
- StaticTypeWarningCode.UNDEFINED_SETTER
- ]);
- } else {
- assertErrors(source, [StaticWarningCode.USE_OF_VOID_RESULT]);
- }
+ assertErrors(source, [StaticWarningCode.USE_OF_VOID_RESULT]);
}
test_generalizedVoid_useOfVoidCascadeError() async {
@@ -1950,14 +1631,7 @@
}
''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [
- StaticWarningCode.USE_OF_VOID_RESULT,
- StaticWarningCode.USE_OF_VOID_RESULT
- ]);
- } else {
- assertErrors(source, [StaticWarningCode.USE_OF_VOID_RESULT]);
- }
+ assertErrors(source, [StaticWarningCode.USE_OF_VOID_RESULT]);
}
test_generalizedVoid_useOfVoidCastsOk() async {
@@ -2161,14 +1835,7 @@
}
''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [
- StaticTypeWarningCode.UNDEFINED_METHOD,
- StaticWarningCode.USE_OF_VOID_RESULT
- ]);
- } else {
- assertErrors(source, [StaticWarningCode.USE_OF_VOID_RESULT]);
- }
+ assertErrors(source, [StaticWarningCode.USE_OF_VOID_RESULT]);
}
test_generalizedVoid_useOfVoidInSwitchExpressionError() async {
@@ -2201,14 +1868,7 @@
}
''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [
- StaticWarningCode.USE_OF_VOID_RESULT,
- StaticTypeWarningCode.UNDEFINED_GETTER
- ]);
- } else {
- assertErrors(source, [StaticWarningCode.USE_OF_VOID_RESULT]);
- }
+ assertErrors(source, [StaticWarningCode.USE_OF_VOID_RESULT]);
}
test_generalizedVoid_useOfVoidPropertyAccessError() async {
@@ -2219,14 +1879,7 @@
}
''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [
- StaticWarningCode.USE_OF_VOID_RESULT,
- StaticTypeWarningCode.UNDEFINED_GETTER
- ]);
- } else {
- assertErrors(source, [StaticWarningCode.USE_OF_VOID_RESULT]);
- }
+ assertErrors(source, [StaticWarningCode.USE_OF_VOID_RESULT]);
}
@failingTest
@@ -2317,16 +1970,8 @@
class C implements A, B {
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [
- CompileTimeErrorCode.CONFLICTS_WITH_INHERITED_MEMBER,
- StaticWarningCode.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER
- ]);
- } else {
- assertErrors(source, [
- StaticWarningCode.INCONSISTENT_METHOD_INHERITANCE_GETTER_AND_METHOD
- ]);
- }
+ assertErrors(source,
+ [StaticWarningCode.INCONSISTENT_METHOD_INHERITANCE_GETTER_AND_METHOD]);
verify([source]);
}
@@ -2357,9 +2002,7 @@
int f;
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [StrongModeCode.INVALID_METHOD_OVERRIDE]);
- } else if (previewDart2) {
+ if (previewDart2) {
assertErrors(source, [
StrongModeCode.INVALID_METHOD_OVERRIDE,
StrongModeCode.INVALID_METHOD_OVERRIDE
@@ -2387,12 +2030,7 @@
String get getter => null;
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [
- StrongModeCode.INVALID_METHOD_OVERRIDE,
- StrongModeCode.INVALID_METHOD_OVERRIDE
- ]);
- } else if (previewDart2) {
+ if (previewDart2) {
assertErrors(source, [StrongModeCode.INVALID_METHOD_OVERRIDE]);
} else {
assertErrors(
@@ -2413,12 +2051,7 @@
double get g => null;
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [
- StrongModeCode.INVALID_METHOD_OVERRIDE,
- StrongModeCode.INVALID_METHOD_OVERRIDE
- ]);
- } else if (previewDart2) {
+ if (previewDart2) {
assertErrors(source, [StrongModeCode.INVALID_METHOD_OVERRIDE]);
} else {
assertErrors(
@@ -2540,12 +2173,7 @@
m(double d) {}
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [
- StrongModeCode.INVALID_METHOD_OVERRIDE,
- StrongModeCode.INVALID_METHOD_OVERRIDE
- ]);
- } else if (previewDart2) {
+ if (previewDart2) {
assertErrors(source, [StrongModeCode.INVALID_METHOD_OVERRIDE]);
} else {
assertErrors(source,
@@ -2701,12 +2329,7 @@
String m() => '';
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [
- StrongModeCode.INVALID_METHOD_OVERRIDE,
- StrongModeCode.INVALID_METHOD_OVERRIDE
- ]);
- } else if (previewDart2) {
+ if (previewDart2) {
assertErrors(source, [StrongModeCode.INVALID_METHOD_OVERRIDE]);
} else {
assertErrors(
@@ -2894,7 +2517,7 @@
m({a}) {}
}''');
await computeAnalysisResult(source);
- if (previewDart2 && !useCFE) {
+ if (previewDart2) {
assertErrors(source, [StrongModeCode.INVALID_METHOD_OVERRIDE]);
} else {
assertErrors(source, [StaticWarningCode.INVALID_OVERRIDE_NAMED]);
@@ -2911,7 +2534,7 @@
m({a, c}) {}
}''');
await computeAnalysisResult(source);
- if (previewDart2 && !useCFE) {
+ if (previewDart2) {
assertErrors(source, [StrongModeCode.INVALID_METHOD_OVERRIDE]);
} else {
assertErrors(source, [StaticWarningCode.INVALID_OVERRIDE_NAMED]);
@@ -2928,7 +2551,7 @@
m([a]) {}
}''');
await computeAnalysisResult(source);
- if (previewDart2 && !useCFE) {
+ if (previewDart2) {
assertErrors(source, [StrongModeCode.INVALID_METHOD_OVERRIDE]);
} else {
assertErrors(source, [StaticWarningCode.INVALID_OVERRIDE_POSITIONAL]);
@@ -2945,7 +2568,7 @@
m(a, b, [c]) {}
}''');
await computeAnalysisResult(source);
- if (previewDart2 && !useCFE) {
+ if (previewDart2) {
assertErrors(source, [StrongModeCode.INVALID_METHOD_OVERRIDE]);
} else {
assertErrors(source, [StaticWarningCode.INVALID_OVERRIDE_POSITIONAL]);
@@ -2962,7 +2585,7 @@
m(a, [c, d]) {}
}''');
await computeAnalysisResult(source);
- if (previewDart2 && !useCFE) {
+ if (previewDart2) {
assertErrors(source, [StrongModeCode.INVALID_METHOD_OVERRIDE]);
} else {
assertErrors(source, [StaticWarningCode.INVALID_OVERRIDE_POSITIONAL]);
@@ -2979,7 +2602,7 @@
m(a, b) {}
}''');
await computeAnalysisResult(source);
- if (previewDart2 && !useCFE) {
+ if (previewDart2) {
assertErrors(source, [StrongModeCode.INVALID_METHOD_OVERRIDE]);
} else {
assertErrors(source, [StaticWarningCode.INVALID_OVERRIDE_REQUIRED]);
@@ -3018,9 +2641,7 @@
set setter14(String _) => null;
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [StrongModeCode.INVALID_METHOD_OVERRIDE]);
- } else if (previewDart2) {
+ if (previewDart2) {
assertErrors(source, [
StrongModeCode.INVALID_METHOD_OVERRIDE,
StrongModeCode.INVALID_METHOD_OVERRIDE,
@@ -3068,12 +2689,7 @@
set s(double d) {}
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [
- StrongModeCode.INVALID_METHOD_OVERRIDE,
- StrongModeCode.INVALID_METHOD_OVERRIDE
- ]);
- } else if (previewDart2) {
+ if (previewDart2) {
assertErrors(source, [StrongModeCode.INVALID_METHOD_OVERRIDE]);
} else {
assertErrors(source,
@@ -3085,34 +2701,21 @@
test_listElementTypeNotAssignable() async {
Source source = addSource("var v = <String> [42];");
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [StaticTypeWarningCode.INVALID_ASSIGNMENT]);
- } else {
- assertErrors(
- source, [StaticWarningCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE]);
- }
+ assertErrors(source, [StaticWarningCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE]);
verify([source]);
}
test_mapKeyTypeNotAssignable() async {
Source source = addSource("var v = <String, int > {1 : 2};");
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [StaticTypeWarningCode.INVALID_ASSIGNMENT]);
- } else {
- assertErrors(source, [StaticWarningCode.MAP_KEY_TYPE_NOT_ASSIGNABLE]);
- }
+ assertErrors(source, [StaticWarningCode.MAP_KEY_TYPE_NOT_ASSIGNABLE]);
verify([source]);
}
test_mapValueTypeNotAssignable() async {
Source source = addSource("var v = <String, String> {'a' : 2};");
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [StaticTypeWarningCode.INVALID_ASSIGNMENT]);
- } else {
- assertErrors(source, [StaticWarningCode.MAP_VALUE_TYPE_NOT_ASSIGNABLE]);
- }
+ assertErrors(source, [StaticWarningCode.MAP_VALUE_TYPE_NOT_ASSIGNABLE]);
verify([source]);
}
@@ -3326,11 +2929,7 @@
lib.B b;''');
await computeAnalysisResult(source1);
await computeAnalysisResult(source2);
- if (useCFE) {
- assertErrors(source2, [StaticTypeWarningCode.UNDEFINED_METHOD]);
- } else {
- assertErrors(source2, [StaticWarningCode.NEW_WITH_NON_TYPE]);
- }
+ assertErrors(source2, [StaticWarningCode.NEW_WITH_NON_TYPE]);
verify([source1]);
}
@@ -3343,11 +2942,7 @@
new A.name();
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [StaticTypeWarningCode.UNDEFINED_METHOD]);
- } else {
- assertErrors(source, [StaticWarningCode.NEW_WITH_UNDEFINED_CONSTRUCTOR]);
- }
+ assertErrors(source, [StaticWarningCode.NEW_WITH_UNDEFINED_CONSTRUCTOR]);
// no verify(), 'name' is not resolved
}
@@ -3360,12 +2955,8 @@
new A();
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [StaticTypeWarningCode.UNDEFINED_METHOD]);
- } else {
- assertErrors(
- source, [StaticWarningCode.NEW_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT]);
- }
+ assertErrors(
+ source, [StaticWarningCode.NEW_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT]);
verify([source]);
}
@@ -3381,14 +2972,9 @@
class C extends A {
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(
- source, [StaticWarningCode.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER]);
- } else {
- assertErrors(source, [
- StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FIVE_PLUS
- ]);
- }
+ assertErrors(source, [
+ StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FIVE_PLUS
+ ]);
verify([source]);
}
@@ -3403,13 +2989,8 @@
class C extends A {
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(
- source, [StaticWarningCode.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER]);
- } else {
- assertErrors(source,
- [StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FOUR]);
- }
+ assertErrors(source,
+ [StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FOUR]);
verify([source]);
}
@@ -3423,13 +3004,8 @@
}
class B = A with M implements I;''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(
- source, [StaticWarningCode.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER]);
- } else {
- assertErrors(source,
- [StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE]);
- }
+ assertErrors(source,
+ [StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE]);
verify([source]);
}
@@ -3442,13 +3018,8 @@
abstract class A {}
class B = A with M;''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(
- source, [StaticWarningCode.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER]);
- } else {
- assertErrors(source,
- [StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE]);
- }
+ assertErrors(source,
+ [StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE]);
verify([source]);
}
@@ -3461,13 +3032,8 @@
}
class B = A with M;''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(
- source, [StaticWarningCode.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER]);
- } else {
- assertErrors(source,
- [StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE]);
- }
+ assertErrors(source,
+ [StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE]);
verify([source]);
}
@@ -3499,13 +3065,8 @@
class C implements I {
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(
- source, [StaticWarningCode.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER]);
- } else {
- assertErrors(source,
- [StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE]);
- }
+ assertErrors(source,
+ [StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE]);
verify([source]);
}
@@ -3517,13 +3078,8 @@
class C extends A {
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(
- source, [StaticWarningCode.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER]);
- } else {
- assertErrors(source,
- [StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE]);
- }
+ assertErrors(source,
+ [StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE]);
verify([source]);
}
@@ -3535,13 +3091,8 @@
class C implements I {
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(
- source, [StaticWarningCode.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER]);
- } else {
- assertErrors(source,
- [StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE]);
- }
+ assertErrors(source,
+ [StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE]);
verify([source]);
}
@@ -3554,13 +3105,8 @@
noSuchMethod(v);
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(
- source, [StaticWarningCode.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER]);
- } else {
- assertErrors(source,
- [StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE]);
- }
+ assertErrors(source,
+ [StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE]);
verify([source]);
}
@@ -3589,13 +3135,8 @@
class C implements I {
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(
- source, [StaticWarningCode.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER]);
- } else {
- assertErrors(source,
- [StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE]);
- }
+ assertErrors(source,
+ [StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE]);
verify([source]);
}
@@ -3607,13 +3148,8 @@
class C extends A {
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(
- source, [StaticWarningCode.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER]);
- } else {
- assertErrors(source,
- [StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE]);
- }
+ assertErrors(source,
+ [StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE]);
verify([source]);
}
@@ -3641,13 +3177,8 @@
abstract class B implements A { get g1 => 1; }
class C extends Object with B {}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(
- source, [StaticWarningCode.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER]);
- } else {
- assertErrors(source,
- [StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE]);
- }
+ assertErrors(source,
+ [StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE]);
}
test_nonAbstractClassInheritsAbstractMemberOne_mixinInherits_method() async {
@@ -3657,13 +3188,8 @@
abstract class B implements A { m1() => 1; }
class C extends Object with B {}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(
- source, [StaticWarningCode.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER]);
- } else {
- assertErrors(source,
- [StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE]);
- }
+ assertErrors(source,
+ [StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE]);
}
test_nonAbstractClassInheritsAbstractMemberOne_mixinInherits_setter() async {
@@ -3673,13 +3199,8 @@
abstract class B implements A { set s1(v) {} }
class C extends Object with B {}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(
- source, [StaticWarningCode.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER]);
- } else {
- assertErrors(source,
- [StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE]);
- }
+ assertErrors(source,
+ [StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE]);
}
test_nonAbstractClassInheritsAbstractMemberOne_noSuchMethod_interface() async {
@@ -3694,13 +3215,8 @@
class B extends A implements I {
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(
- source, [StaticWarningCode.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER]);
- } else {
- assertErrors(source,
- [StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE]);
- }
+ assertErrors(source,
+ [StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE]);
verify([source]);
}
@@ -3717,13 +3233,8 @@
get field => 0;
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(
- source, [StaticWarningCode.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER]);
- } else {
- assertErrors(source,
- [StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE]);
- }
+ assertErrors(source,
+ [StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE]);
verify([source]);
}
@@ -3735,13 +3246,8 @@
class C implements I {
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(
- source, [StaticWarningCode.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER]);
- } else {
- assertErrors(source,
- [StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE]);
- }
+ assertErrors(source,
+ [StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE]);
verify([source]);
}
@@ -3753,13 +3259,8 @@
class C extends A {
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(
- source, [StaticWarningCode.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER]);
- } else {
- assertErrors(source,
- [StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE]);
- }
+ assertErrors(source,
+ [StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE]);
verify([source]);
}
@@ -3775,13 +3276,8 @@
class C extends B {
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(
- source, [StaticWarningCode.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER]);
- } else {
- assertErrors(source,
- [StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE]);
- }
+ assertErrors(source,
+ [StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE]);
verify([source]);
}
@@ -3795,13 +3291,8 @@
set v(_) {}
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(
- source, [StaticWarningCode.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER]);
- } else {
- assertErrors(source,
- [StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE]);
- }
+ assertErrors(source,
+ [StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE]);
verify([source]);
}
@@ -3815,13 +3306,8 @@
get v => 1;
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(
- source, [StaticWarningCode.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER]);
- } else {
- assertErrors(source,
- [StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE]);
- }
+ assertErrors(source,
+ [StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE]);
verify([source]);
}
@@ -3835,14 +3321,8 @@
class C extends A {
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(
- source, [StaticWarningCode.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER]);
- } else {
- assertErrors(source, [
- StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_THREE
- ]);
- }
+ assertErrors(source,
+ [StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_THREE]);
verify([source]);
}
@@ -3855,13 +3335,8 @@
class C extends A {
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(
- source, [StaticWarningCode.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER]);
- } else {
- assertErrors(source,
- [StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_TWO]);
- }
+ assertErrors(source,
+ [StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_TWO]);
verify([source]);
}
@@ -3874,13 +3349,8 @@
class C implements I {
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(
- source, [StaticWarningCode.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER]);
- } else {
- assertErrors(source,
- [StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_TWO]);
- }
+ assertErrors(source,
+ [StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_TWO]);
verify([source]);
}
@@ -3895,13 +3365,8 @@
class C extends Object with B {}
''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(
- source, [StaticWarningCode.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER]);
- } else {
- assertErrors(source,
- [StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_TWO]);
- }
+ assertErrors(source,
+ [StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_TWO]);
verify([source]);
}
@@ -3913,11 +3378,7 @@
}
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [StaticWarningCode.NOT_A_TYPE]);
- } else {
- assertErrors(source, [StaticWarningCode.NON_TYPE_IN_CATCH_CLAUSE]);
- }
+ assertErrors(source, [StaticWarningCode.NON_TYPE_IN_CATCH_CLAUSE]);
verify([source]);
}
@@ -3984,12 +3445,7 @@
f();
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(
- source, [CompileTimeErrorCode.NOT_ENOUGH_REQUIRED_ARGUMENTS]);
- } else {
- assertErrors(source, [StaticWarningCode.NOT_ENOUGH_REQUIRED_ARGUMENTS]);
- }
+ assertErrors(source, [StaticWarningCode.NOT_ENOUGH_REQUIRED_ARGUMENTS]);
verify([source]);
}
@@ -3999,12 +3455,7 @@
(int x) {} ();
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(
- source, [CompileTimeErrorCode.NOT_ENOUGH_REQUIRED_ARGUMENTS]);
- } else {
- assertErrors(source, [StaticWarningCode.NOT_ENOUGH_REQUIRED_ARGUMENTS]);
- }
+ assertErrors(source, [StaticWarningCode.NOT_ENOUGH_REQUIRED_ARGUMENTS]);
verify([source]);
}
@@ -4016,12 +3467,7 @@
getter();
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(
- source, [CompileTimeErrorCode.NOT_ENOUGH_REQUIRED_ARGUMENTS]);
- } else {
- assertErrors(source, [StaticWarningCode.NOT_ENOUGH_REQUIRED_ARGUMENTS]);
- }
+ assertErrors(source, [StaticWarningCode.NOT_ENOUGH_REQUIRED_ARGUMENTS]);
verify([source]);
}
@@ -4189,12 +3635,7 @@
A.m();
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [StaticTypeWarningCode.UNDEFINED_METHOD]);
- } else {
- assertErrors(
- source, [StaticWarningCode.STATIC_ACCESS_TO_INSTANCE_MEMBER]);
- }
+ assertErrors(source, [StaticWarningCode.STATIC_ACCESS_TO_INSTANCE_MEMBER]);
verify([source]);
}
@@ -4207,12 +3648,7 @@
A.m;
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [StaticTypeWarningCode.UNDEFINED_GETTER]);
- } else {
- assertErrors(
- source, [StaticWarningCode.STATIC_ACCESS_TO_INSTANCE_MEMBER]);
- }
+ assertErrors(source, [StaticWarningCode.STATIC_ACCESS_TO_INSTANCE_MEMBER]);
verify([source]);
}
@@ -4225,12 +3661,7 @@
A.f;
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [StaticTypeWarningCode.UNDEFINED_GETTER]);
- } else {
- assertErrors(
- source, [StaticWarningCode.STATIC_ACCESS_TO_INSTANCE_MEMBER]);
- }
+ assertErrors(source, [StaticWarningCode.STATIC_ACCESS_TO_INSTANCE_MEMBER]);
verify([source]);
}
@@ -4243,12 +3674,7 @@
A.f;
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [StaticTypeWarningCode.UNDEFINED_GETTER]);
- } else {
- assertErrors(
- source, [StaticWarningCode.STATIC_ACCESS_TO_INSTANCE_MEMBER]);
- }
+ assertErrors(source, [StaticWarningCode.STATIC_ACCESS_TO_INSTANCE_MEMBER]);
verify([source]);
}
@@ -4261,12 +3687,7 @@
A.f = 42;
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [StaticTypeWarningCode.UNDEFINED_SETTER]);
- } else {
- assertErrors(
- source, [StaticWarningCode.STATIC_ACCESS_TO_INSTANCE_MEMBER]);
- }
+ assertErrors(source, [StaticWarningCode.STATIC_ACCESS_TO_INSTANCE_MEMBER]);
verify([source]);
}
@@ -4507,15 +3928,8 @@
static m(K k) {}
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [
- StaticWarningCode.TYPE_PARAMETER_REFERENCED_BY_STATIC,
- StaticWarningCode.TYPE_PARAMETER_REFERENCED_BY_STATIC
- ]);
- } else {
- assertErrors(
- source, [StaticWarningCode.TYPE_PARAMETER_REFERENCED_BY_STATIC]);
- }
+ assertErrors(
+ source, [StaticWarningCode.TYPE_PARAMETER_REFERENCED_BY_STATIC]);
verify([source]);
}
@@ -4536,15 +3950,8 @@
static set s(K k) {}
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [
- StaticWarningCode.TYPE_PARAMETER_REFERENCED_BY_STATIC,
- StaticWarningCode.TYPE_PARAMETER_REFERENCED_BY_STATIC
- ]);
- } else {
- assertErrors(
- source, [StaticWarningCode.TYPE_PARAMETER_REFERENCED_BY_STATIC]);
- }
+ assertErrors(
+ source, [StaticWarningCode.TYPE_PARAMETER_REFERENCED_BY_STATIC]);
verify([source]);
}
@@ -4600,42 +4007,26 @@
}
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [StaticWarningCode.NOT_A_TYPE]);
- } else {
- assertErrors(source, [StaticWarningCode.TYPE_TEST_WITH_UNDEFINED_NAME]);
- }
+ assertErrors(source, [StaticWarningCode.TYPE_TEST_WITH_UNDEFINED_NAME]);
verify([source]);
}
test_undefinedClass_instanceCreation() async {
Source source = addSource("f() { new C(); }");
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [StaticTypeWarningCode.UNDEFINED_METHOD]);
- } else {
- assertErrors(source, [StaticWarningCode.UNDEFINED_CLASS]);
- }
+ assertErrors(source, [StaticWarningCode.UNDEFINED_CLASS]);
}
test_undefinedClass_variableDeclaration() async {
Source source = addSource("f() { C c; }");
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [StaticWarningCode.NOT_A_TYPE]);
- } else {
- assertErrors(source, [StaticWarningCode.UNDEFINED_CLASS]);
- }
+ assertErrors(source, [StaticWarningCode.UNDEFINED_CLASS]);
}
test_undefinedClassBoolean_variableDeclaration() async {
Source source = addSource("f() { boolean v; }");
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [StaticWarningCode.NOT_A_TYPE]);
- } else {
- assertErrors(source, [StaticWarningCode.UNDEFINED_CLASS_BOOLEAN]);
- }
+ assertErrors(source, [StaticWarningCode.UNDEFINED_CLASS_BOOLEAN]);
}
test_undefinedGetter_fromLibrary() async {
@@ -4647,11 +4038,7 @@
}''');
await computeAnalysisResult(source1);
await computeAnalysisResult(source2);
- if (useCFE) {
- assertErrors(source2, [StaticTypeWarningCode.UNDEFINED_GETTER]);
- } else {
- assertErrors(source2, [StaticWarningCode.UNDEFINED_GETTER]);
- }
+ assertErrors(source2, [StaticWarningCode.UNDEFINED_GETTER]);
verify([source1]);
}
@@ -4679,31 +4066,19 @@
String;
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [StaticTypeWarningCode.UNDEFINED_GETTER]);
- } else {
- assertErrors(source, [StaticWarningCode.UNDEFINED_IDENTIFIER]);
- }
+ assertErrors(source, [StaticWarningCode.UNDEFINED_IDENTIFIER]);
}
test_undefinedIdentifier_initializer() async {
Source source = addSource("var a = b;");
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [StaticTypeWarningCode.UNDEFINED_GETTER]);
- } else {
- assertErrors(source, [StaticWarningCode.UNDEFINED_IDENTIFIER]);
- }
+ assertErrors(source, [StaticWarningCode.UNDEFINED_IDENTIFIER]);
}
test_undefinedIdentifier_methodInvocation() async {
Source source = addSource("f() { C.m(); }");
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [StaticTypeWarningCode.UNDEFINED_GETTER]);
- } else {
- assertErrors(source, [StaticWarningCode.UNDEFINED_IDENTIFIER]);
- }
+ assertErrors(source, [StaticWarningCode.UNDEFINED_IDENTIFIER]);
}
test_undefinedIdentifier_private_getter() async {
@@ -4720,14 +4095,7 @@
}
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [
- StaticTypeWarningCode.UNDEFINED_GETTER,
- StaticTypeWarningCode.UNDEFINED_GETTER
- ]);
- } else {
- assertErrors(source, [StaticWarningCode.UNDEFINED_IDENTIFIER]);
- }
+ assertErrors(source, [StaticWarningCode.UNDEFINED_IDENTIFIER]);
}
test_undefinedIdentifier_private_setter() async {
@@ -4744,24 +4112,13 @@
}
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [
- StaticTypeWarningCode.UNDEFINED_SETTER,
- StaticTypeWarningCode.UNDEFINED_SETTER
- ]);
- } else {
- assertErrors(source, [StaticWarningCode.UNDEFINED_IDENTIFIER]);
- }
+ assertErrors(source, [StaticWarningCode.UNDEFINED_IDENTIFIER]);
}
test_undefinedIdentifierAwait_function() async {
Source source = addSource("void a() { await; }");
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [StaticTypeWarningCode.UNDEFINED_GETTER]);
- } else {
- assertErrors(source, [StaticWarningCode.UNDEFINED_IDENTIFIER_AWAIT]);
- }
+ assertErrors(source, [StaticWarningCode.UNDEFINED_IDENTIFIER_AWAIT]);
}
test_undefinedNamedParameter() async {
@@ -4771,11 +4128,7 @@
f(c: 1);
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [CompileTimeErrorCode.UNDEFINED_NAMED_PARAMETER]);
- } else {
- assertErrors(source, [StaticWarningCode.UNDEFINED_NAMED_PARAMETER]);
- }
+ assertErrors(source, [StaticWarningCode.UNDEFINED_NAMED_PARAMETER]);
// no verify(), 'c' is not resolved
}
@@ -4787,11 +4140,7 @@
lib.gg = null;
}''');
await computeAnalysisResult(source2);
- if (useCFE) {
- assertErrors(source2, [StaticTypeWarningCode.UNDEFINED_SETTER]);
- } else {
- assertErrors(source2, [StaticWarningCode.UNDEFINED_SETTER]);
- }
+ assertErrors(source2, [StaticWarningCode.UNDEFINED_SETTER]);
}
test_undefinedStaticMethodOrGetter_getter() async {
@@ -4863,11 +4212,7 @@
}
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [StaticWarningCode.USE_OF_VOID_RESULT]);
- } else {
- assertErrors(source, [StaticWarningCode.USE_OF_VOID_RESULT]);
- }
+ assertErrors(source, [StaticWarningCode.USE_OF_VOID_RESULT]);
verify([source]);
}
@@ -4881,11 +4226,7 @@
}
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [StaticWarningCode.USE_OF_VOID_RESULT]);
- } else {
- assertErrors(source, [StaticWarningCode.USE_OF_VOID_RESULT]);
- }
+ assertErrors(source, [StaticWarningCode.USE_OF_VOID_RESULT]);
verify([source]);
}
diff --git a/pkg/analyzer/test/generated/strong_mode_kernel_test.dart b/pkg/analyzer/test/generated/strong_mode_kernel_test.dart
deleted file mode 100644
index ef83790..0000000
--- a/pkg/analyzer/test/generated/strong_mode_kernel_test.dart
+++ /dev/null
@@ -1,370 +0,0 @@
-// 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:test/test.dart';
-import 'package:test_reflective_loader/test_reflective_loader.dart';
-
-import 'strong_mode_test.dart';
-
-main() {
- defineReflectiveSuite(() {
- defineReflectiveTests(StrongModeLocalInferenceTest_Kernel);
- defineReflectiveTests(StrongModeStaticTypeAnalyzer2Test_Kernel);
- defineReflectiveTests(StrongModeTypePropagationTest_Kernel);
- });
-}
-
-@reflectiveTest
-class StrongModeLocalInferenceTest_Kernel extends StrongModeLocalInferenceTest {
- @override
- bool get enableKernelDriver => true;
-
- @override
- bool get enableNewAnalysisDriver => true;
-
- @override
- bool get useCFE => true;
-
- @override
- bool get usingFastaParser => true;
-
- @override
- @failingTest
- test_constrainedByBounds2() async {
- await super.test_constrainedByBounds2();
- }
-
- @override
- @failingTest
- test_constrainedByBounds3() async {
- await super.test_constrainedByBounds3();
- }
-
- @override
- @failingTest
- test_constrainedByBounds5() async {
- await super.test_constrainedByBounds5();
- }
-
- @override
- @failingTest
- test_covarianceChecks() async {
- await super.test_covarianceChecks();
- }
-
- @override
- @failingTest
- test_covarianceChecks_genericMethods() async {
- await super.test_covarianceChecks_genericMethods();
- }
-
- @override
- @failingTest
- test_covarianceChecks_returnFunction() async {
- await super.test_covarianceChecks_returnFunction();
- }
-
- @override
- @failingTest
- test_covarianceChecks_superclass() async {
- await super.test_covarianceChecks_superclass();
- }
-
- @override
- @failingTest
- test_futureOr_downwards8() async {
- await super.test_futureOr_downwards8();
- }
-
- @override
- @failingTest
- test_futureOr_methods2() async {
- await super.test_futureOr_methods2();
- }
-
- @override
- @failingTest
- test_futureOr_methods3() async {
- await super.test_futureOr_methods3();
- }
-
- @override
- @failingTest
- test_futureOr_methods4() async {
- await super.test_futureOr_methods4();
- }
-
- @override
- @failingTest
- test_futureOr_no_return() async {
- await super.test_futureOr_no_return();
- }
-
- @override
- @failingTest
- test_futureOr_no_return_value() async {
- await super.test_futureOr_no_return_value();
- }
-
- @override
- @failingTest
- test_futureOr_return_null() async {
- await super.test_futureOr_return_null();
- }
-
- @override
- @failingTest
- test_futureOr_upwards2() async {
- await super.test_futureOr_upwards2();
- }
-
- @override
- @failingTest
- test_generic_partial() async {
- await super.test_generic_partial();
- // TODO(brianwilkerson) This test periodically fails (by not throwing an
- // exception), so I am temporarily disabling it. The cause of the flaky
- // behavior needs to be investigated.
- fail('Flaky test');
- }
-
- @override
- @failingTest
- test_inference_error_arguments() async {
- await super.test_inference_error_arguments();
- }
-
- @override
- @failingTest
- test_inference_error_arguments2() async {
- await super.test_inference_error_arguments2();
- }
-
- @override
- @failingTest
- test_inference_error_extendsFromReturn() async {
- await super.test_inference_error_extendsFromReturn();
- }
-
- @override
- @failingTest
- test_inference_error_extendsFromReturn2() async {
- await super.test_inference_error_extendsFromReturn2();
- }
-
- @override
- @failingTest
- test_inference_error_genericFunction() async {
- await super.test_inference_error_genericFunction();
- }
-
- @override
- @failingTest
- test_inference_error_returnContext() async {
- await super.test_inference_error_returnContext();
- }
-
- @override
- @failingTest
- test_inferGenericInstantiation2() async {
- await super.test_inferGenericInstantiation2();
- }
-
- @override
- @failingTest
- test_instanceCreation() async {
- await super.test_instanceCreation();
- // TODO(brianwilkerson) This test fails as expected when run as part of a
- // larger group of tests, but does not fail when run individually (such as
- // on the bots).
- fail('Flaky test');
- }
-
- @override
- @failingTest
- test_pinning_multipleConstraints1() async {
- await super.test_pinning_multipleConstraints1();
- }
-
- @override
- @failingTest
- test_pinning_multipleConstraints3() async {
- await super.test_pinning_multipleConstraints3();
- }
-
- @override
- @failingTest
- test_redirectedConstructor_named() {
- return super.test_redirectedConstructor_named();
- }
-
- @override
- @failingTest
- test_redirectedConstructor_unnamed() {
- return super.test_redirectedConstructor_unnamed();
- }
-
- @override
- @failingTest
- test_redirectingConstructor_propagation() async {
- await super.test_redirectingConstructor_propagation();
- // TODO(brianwilkerson) Figure out why this test is flaky.
- fail('Flaky test');
- }
-}
-
-@reflectiveTest
-class StrongModeStaticTypeAnalyzer2Test_Kernel
- extends StrongModeStaticTypeAnalyzer2Test {
- @override
- bool get enableKernelDriver => true;
-
- @override
- bool get enableNewAnalysisDriver => true;
-
- @override
- bool get useCFE => true;
-
- @override
- bool get usingFastaParser => true;
-
- @override
- @failingTest
- test_genericFunction_parameter() async {
- await super.test_genericFunction_parameter();
- }
-
- @override
- @failingTest
- test_genericMethod_explicitTypeParams() async {
- await super.test_genericMethod_explicitTypeParams();
- }
-
- @override
- @failingTest
- test_genericMethod_functionExpressionInvocation_explicit() async {
- await super.test_genericMethod_functionExpressionInvocation_explicit();
- }
-
- @override
- @failingTest
- test_genericMethod_functionExpressionInvocation_functionTypedParameter_explicit() {
- return super
- .test_genericMethod_functionExpressionInvocation_functionTypedParameter_explicit();
- }
-
- @override
- @failingTest
- test_genericMethod_functionExpressionInvocation_functionTypedParameter_inferred() {
- return super
- .test_genericMethod_functionExpressionInvocation_functionTypedParameter_inferred();
- }
-
- @override
- @failingTest
- test_genericMethod_functionExpressionInvocation_inferred() async {
- await super.test_genericMethod_functionExpressionInvocation_inferred();
- }
-
- @override
- @failingTest
- test_genericMethod_functionInvocation_explicit() async {
- await super.test_genericMethod_functionInvocation_explicit();
- }
-
- @override
- @failingTest
- test_genericMethod_functionInvocation_functionTypedParameter_explicit() {
- return super
- .test_genericMethod_functionInvocation_functionTypedParameter_explicit();
- }
-
- @override
- @failingTest
- test_genericMethod_functionInvocation_functionTypedParameter_inferred() {
- return super
- .test_genericMethod_functionInvocation_functionTypedParameter_inferred();
- }
-
- @override
- @failingTest
- test_genericMethod_functionInvocation_inferred() async {
- await super.test_genericMethod_functionInvocation_inferred();
- }
-
- @override
- @failingTest
- test_genericMethod_functionTypedParameter_tearoff() {
- return super.test_genericMethod_functionTypedParameter_tearoff();
- }
-
- @override
- @failingTest
- test_genericMethod_implicitDynamic() async {
- await super.test_genericMethod_implicitDynamic();
- }
-
- @override
- @failingTest
- test_genericMethod_nestedCapture() async {
- await super.test_genericMethod_nestedCapture();
- }
-
- @override
- @failingTest
- test_genericMethod_partiallyAppliedErrorWithBound() async {
- await super.test_genericMethod_partiallyAppliedErrorWithBound();
- }
-
- @override
- @failingTest
- test_genericMethod_tearoff() async {
- await super.test_genericMethod_tearoff();
- }
-
- @override
- @failingTest
- test_genericMethod_toplevel_field_staticTearoff() {
- return super.test_genericMethod_toplevel_field_staticTearoff();
- }
-
- @override
- test_notInstantiatedBound_class_error_recursion_less_direct() async {
- return super.test_notInstantiatedBound_class_error_recursion_less_direct();
- }
-
- @override
- @failingTest
- test_notInstantiatedBound_class_error_recursion_typedef() {
- return super.test_notInstantiatedBound_class_error_recursion_typedef();
- }
-
- @override
- @failingTest
- test_setterWithDynamicTypeIsError() async {
- await super.test_setterWithDynamicTypeIsError();
- }
-
- @override
- @failingTest
- test_setterWithOtherTypeIsError() async {
- await super.test_setterWithOtherTypeIsError();
- }
-}
-
-@reflectiveTest
-class StrongModeTypePropagationTest_Kernel
- extends StrongModeTypePropagationTest {
- @override
- bool get enableKernelDriver => true;
-
- @override
- bool get enableNewAnalysisDriver => true;
-
- @override
- bool get useCFE => true;
-
- @override
- bool get usingFastaParser => true;
-}
diff --git a/pkg/analyzer/test/generated/strong_mode_test.dart b/pkg/analyzer/test/generated/strong_mode_test.dart
index a3c29fe..0456a6f 100644
--- a/pkg/analyzer/test/generated/strong_mode_test.dart
+++ b/pkg/analyzer/test/generated/strong_mode_test.dart
@@ -3460,12 +3460,7 @@
T f<T extends B>(T x) => null;
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(
- source, [StaticWarningCode.INVALID_METHOD_OVERRIDE_TYPE_PARAMETERS]);
- } else {
- assertErrors(source, [StrongModeCode.INVALID_METHOD_OVERRIDE]);
- }
+ assertErrors(source, [StrongModeCode.INVALID_METHOD_OVERRIDE]);
verify([source]);
}
@@ -3480,12 +3475,7 @@
T f<T extends A>(T x) => null;
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(
- source, [StaticWarningCode.INVALID_METHOD_OVERRIDE_TYPE_PARAMETERS]);
- } else {
- assertErrors(source, [StrongModeCode.INVALID_METHOD_OVERRIDE]);
- }
+ assertErrors(source, [StrongModeCode.INVALID_METHOD_OVERRIDE]);
verify([source]);
}
@@ -3511,15 +3501,7 @@
S f<T, S>(T x) => null;
}''');
await computeAnalysisResult(source);
- if (useCFE) {
- assertErrors(source, [
- StaticWarningCode.INVALID_METHOD_OVERRIDE_TYPE_PARAMETERS,
- StrongModeCode.INVALID_METHOD_OVERRIDE,
- StrongModeCode.INVALID_METHOD_OVERRIDE
- ]);
- } else {
- assertErrors(source, [StrongModeCode.INVALID_METHOD_OVERRIDE]);
- }
+ assertErrors(source, [StrongModeCode.INVALID_METHOD_OVERRIDE]);
verify([source]);
}
diff --git a/pkg/analyzer/test/generated/test_all.dart b/pkg/analyzer/test/generated/test_all.dart
index 52a3081..8e490e9 100644
--- a/pkg/analyzer/test/generated/test_all.dart
+++ b/pkg/analyzer/test/generated/test_all.dart
@@ -8,43 +8,33 @@
import 'bazel_test.dart' as bazel_test;
import 'checked_mode_compile_time_error_code_driver_test.dart'
as checked_mode_compile_time_error_code_driver_test;
-import 'checked_mode_compile_time_error_code_kernel_test.dart'
- as checked_mode_compile_time_error_code_kernel_test;
import 'checked_mode_compile_time_error_code_test.dart'
as checked_mode_compile_time_error_code_test;
import 'compile_time_error_code_driver_test.dart'
as compile_time_error_code_driver_test;
-import 'compile_time_error_code_kernel_test.dart'
- as compile_time_error_code_kernel_test;
import 'compile_time_error_code_test.dart' as compile_time_error_code_test;
import 'constant_test.dart' as constant_test;
import 'declaration_resolver_test.dart' as declaration_resolver_test;
import 'element_resolver_test.dart' as element_resolver_test;
import 'engine_test.dart' as engine_test;
import 'error_suppression_driver_test.dart' as error_suppression_driver_test;
-import 'error_suppression_kernel_test.dart' as error_suppression_kernel_test;
import 'error_suppression_test.dart' as error_suppression_test;
import 'gn_test.dart' as gn_test;
import 'hint_code_driver_test.dart' as hint_code_driver_test;
-import 'hint_code_kernel_test.dart' as hint_code_kernel_test;
import 'hint_code_test.dart' as hint_code_test;
import 'inheritance_manager_test.dart' as inheritance_manager_test;
import 'invalid_code_driver_test.dart' as invalid_code_driver_test;
-import 'invalid_code_kernel_test.dart' as invalid_code_kernel_test;
import 'invalid_code_test.dart' as invalid_code_test;
import 'java_core_test.dart' as java_core_test;
import 'java_io_test.dart' as java_io_test;
import 'non_error_resolver_driver_test.dart' as non_error_resolver_driver_test;
-import 'non_error_resolver_kernel_test.dart' as non_error_resolver_kernel_test;
import 'non_error_resolver_test.dart' as non_error_resolver_test;
import 'non_hint_code_driver_test.dart' as non_hint_code_driver_test;
-import 'non_hint_code_kernel_test.dart' as non_hint_code_kernel_test;
import 'non_hint_code_test.dart' as non_hint_code_test;
import 'package_test.dart' as package_test;
import 'parser_fasta_test.dart' as parser_fasta_test;
import 'parser_test.dart' as parser_test;
import 'resolver_driver_test.dart' as resolver_driver_test;
-import 'resolver_kernel_test.dart' as resolver_kernel_test;
import 'resolver_test.dart' as resolver_test;
import 'scanner_test.dart' as scanner_test;
import 'sdk_test.dart' as sdk_test;
@@ -52,21 +42,14 @@
import 'source_factory_test.dart' as source_factory_test;
import 'static_type_analyzer_driver_test.dart'
as static_type_analyzer_driver_test;
-import 'static_type_analyzer_kernel_test.dart'
- as static_type_analyzer_kernel_test;
import 'static_type_analyzer_test.dart' as static_type_analyzer_test;
import 'static_type_warning_code_driver_test.dart'
as static_type_warning_code_driver_test;
-import 'static_type_warning_code_kernel_test.dart'
- as static_type_warning_code_kernel_test;
import 'static_type_warning_code_test.dart' as static_type_warning_code_test;
import 'static_warning_code_driver_test.dart'
as static_warning_code_driver_test;
-import 'static_warning_code_kernel_test.dart'
- as static_warning_code_kernel_test;
import 'static_warning_code_test.dart' as static_warning_code_test;
import 'strong_mode_driver_test.dart' as strong_mode_driver_test;
-import 'strong_mode_kernel_test.dart' as strong_mode_kernel_test;
import 'strong_mode_test.dart' as strong_mode_test;
import 'type_system_test.dart' as type_system_test;
import 'utilities_dart_test.dart' as utilities_dart_test;
@@ -77,55 +60,43 @@
all_the_rest.main();
bazel_test.main();
checked_mode_compile_time_error_code_driver_test.main();
- checked_mode_compile_time_error_code_kernel_test.main();
checked_mode_compile_time_error_code_test.main();
compile_time_error_code_driver_test.main();
- compile_time_error_code_kernel_test.main();
compile_time_error_code_test.main();
constant_test.main();
declaration_resolver_test.main();
element_resolver_test.main();
engine_test.main();
error_suppression_driver_test.main();
- error_suppression_kernel_test.main();
error_suppression_test.main();
gn_test.main();
hint_code_driver_test.main();
- hint_code_kernel_test.main();
hint_code_test.main();
inheritance_manager_test.main();
invalid_code_driver_test.main();
- invalid_code_kernel_test.main();
invalid_code_test.main();
java_core_test.main();
java_io_test.main();
non_error_resolver_driver_test.main();
- non_error_resolver_kernel_test.main();
non_error_resolver_test.main();
non_hint_code_driver_test.main();
- non_hint_code_kernel_test.main();
non_hint_code_test.main();
package_test.main();
parser_fasta_test.main();
parser_test.main();
resolver_driver_test.main();
- resolver_kernel_test.main();
resolver_test.main();
scanner_test.main();
sdk_test.main();
simple_resolver_test.main();
source_factory_test.main();
static_type_analyzer_driver_test.main();
- static_type_analyzer_kernel_test.main();
static_type_analyzer_test.main();
static_type_warning_code_driver_test.main();
- static_type_warning_code_kernel_test.main();
static_type_warning_code_test.main();
static_warning_code_driver_test.main();
- static_warning_code_kernel_test.main();
static_warning_code_test.main();
strong_mode_driver_test.main();
- strong_mode_kernel_test.main();
strong_mode_test.main();
type_system_test.main();
utilities_dart_test.main();
diff --git a/pkg/analyzer/test/generated/utilities_test.dart b/pkg/analyzer/test/generated/utilities_test.dart
index 84369c0..43d2d3b 100644
--- a/pkg/analyzer/test/generated/utilities_test.dart
+++ b/pkg/analyzer/test/generated/utilities_test.dart
@@ -909,7 +909,7 @@
}
void test_visitRethrowExpression() {
- _assertCloneExpression('rethrow');
+ _assertCloneStatement('rethrow;');
}
void test_visitReturnStatement_expression() {
diff --git a/pkg/analyzer/test/src/context/context_test.dart b/pkg/analyzer/test/src/context/context_test.dart
index 65c2c1f..b242bb1 100644
--- a/pkg/analyzer/test/src/context/context_test.dart
+++ b/pkg/analyzer/test/src/context/context_test.dart
@@ -2384,7 +2384,6 @@
_assertNoExceptions();
}
- @failingTest // TODO(paulberry): Remove the annotation when dartbug.com/28515 is fixed.
void test_resolveCompilationUnit_existingElementModel() {
prepareAnalysisContext(new AnalysisOptionsImpl());
Source source = addSource('/test.dart', r'''
diff --git a/pkg/analyzer/test/src/context/mock_sdk.dart b/pkg/analyzer/test/src/context/mock_sdk.dart
index acbef13..73c70d6 100644
--- a/pkg/analyzer/test/src/context/mock_sdk.dart
+++ b/pkg/analyzer/test/src/context/mock_sdk.dart
@@ -98,6 +98,13 @@
'''
});
+const _MockSdkLibrary _LIB_ASYNC2 =
+ const _MockSdkLibrary('dart:async2', '$sdkRoot/lib/async2/async2.dart', '''
+library dart.async2;
+
+class Future {}
+''');
+
const _MockSdkLibrary _LIB_COLLECTION = const _MockSdkLibrary(
'dart:collection', '$sdkRoot/lib/collection/collection.dart', '''
library dart.collection;
@@ -314,7 +321,7 @@
class Duration implements Comparable<Duration> {}
class Exception {
- factory Exception([var message]);
+ factory Exception([var message]) => null;
}
external bool identical(Object a, Object b);
@@ -443,6 +450,7 @@
const List<SdkLibrary> _LIBRARIES = const [
_LIB_CORE,
_LIB_ASYNC,
+ _LIB_ASYNC2,
_LIB_COLLECTION,
_LIB_CONVERT,
_LIB_FOREIGN_HELPER,
@@ -458,6 +466,7 @@
"dart:core": "$sdkRoot/lib/core/core.dart",
"dart:html": "$sdkRoot/lib/html/dartium/html_dartium.dart",
"dart:async": "$sdkRoot/lib/async/async.dart",
+ "dart:async2": "$sdkRoot/lib/async2/async2.dart",
"dart:async/stream.dart": "$sdkRoot/lib/async/stream.dart",
"dart:collection": "$sdkRoot/lib/collection/collection.dart",
"dart:convert": "$sdkRoot/lib/convert/convert.dart",
@@ -511,8 +520,6 @@
if (generateSummaryFiles) {
List<int> bytes = _computeLinkedBundleBytes();
provider.newFileWithBytes(
- provider.convertPath('/lib/_internal/spec.sum'), bytes);
- provider.newFileWithBytes(
provider.convertPath('/lib/_internal/strong.sum'), bytes);
}
}
@@ -572,7 +579,7 @@
PackageBundle getLinkedBundle() {
if (_bundle == null) {
resource.File summaryFile =
- provider.getFile(provider.convertPath('/lib/_internal/spec.sum'));
+ provider.getFile(provider.convertPath('/lib/_internal/strong.sum'));
List<int> bytes;
if (summaryFile.exists) {
bytes = summaryFile.readAsBytesSync();
@@ -614,7 +621,7 @@
List<Source> librarySources = sdkLibraries
.map((SdkLibrary library) => mapDartUri(library.shortName))
.toList();
- return new SummaryBuilder(librarySources, context, true).build();
+ return new SummaryBuilder(librarySources, context).build();
}
}
diff --git a/pkg/analyzer/test/src/dart/analysis/base.dart b/pkg/analyzer/test/src/dart/analysis/base.dart
index 3c1ae2c..a3f21c0 100644
--- a/pkg/analyzer/test/src/dart/analysis/base.dart
+++ b/pkg/analyzer/test/src/dart/analysis/base.dart
@@ -11,6 +11,7 @@
import 'package:analyzer/src/dart/analysis/status.dart';
import 'package:analyzer/src/file_system/file_system.dart';
import 'package:analyzer/src/generated/engine.dart' show AnalysisOptionsImpl;
+import 'package:analyzer/src/generated/parser.dart' as analyzer;
import 'package:analyzer/src/generated/sdk.dart';
import 'package:analyzer/src/generated/source.dart';
import 'package:analyzer/src/source/package_map_resolver.dart';
@@ -66,11 +67,6 @@
String testFile;
String testCode;
- /**
- * Whether to enable the Dart 2.0 Common Front End.
- */
- bool useCFE = false;
-
bool get disableChangesAndCacheAllResults => false;
void addTestFile(String content, {bool priority: false}) {
@@ -105,12 +101,11 @@
], null, provider),
createAnalysisOptions(),
disableChangesAndCacheAllResults: disableChangesAndCacheAllResults,
- externalSummaries: externalSummaries,
- useCFE: useCFE);
+ externalSummaries: externalSummaries);
}
AnalysisOptionsImpl createAnalysisOptions() =>
- new AnalysisOptionsImpl()..useFastaParser = useCFE;
+ new AnalysisOptionsImpl()..useFastaParser = analyzer.Parser.useFasta;
int findOffset(String search) {
int offset = testCode.indexOf(search);
diff --git a/pkg/analyzer/test/src/dart/analysis/defined_names_test.dart b/pkg/analyzer/test/src/dart/analysis/defined_names_test.dart
index 6b5131c..336414a 100644
--- a/pkg/analyzer/test/src/dart/analysis/defined_names_test.dart
+++ b/pkg/analyzer/test/src/dart/analysis/defined_names_test.dart
@@ -17,7 +17,7 @@
@reflectiveTest
class DefinedNamesTest extends ParserTestCase {
- test_classMemberNames() {
+ test_classMemberNames_class() {
DefinedNames names = _computeDefinedNames('''
class A {
int a, b;
@@ -36,6 +36,25 @@
unorderedEquals(['a', 'b', 'd', 'e', 'f', 'g']));
}
+ test_classMemberNames_mixin() {
+ DefinedNames names = _computeDefinedNames('''
+mixin A {
+ int a, b;
+ A();
+ A.c();
+ d() {}
+ get e => null;
+ set f(_) {}
+}
+mixin B {
+ g() {}
+}
+''');
+ expect(names.topLevelNames, unorderedEquals(['A', 'B']));
+ expect(names.classMemberNames,
+ unorderedEquals(['a', 'b', 'd', 'e', 'f', 'g']));
+ }
+
test_topLevelNames() {
DefinedNames names = _computeDefinedNames('''
class A {}
@@ -45,9 +64,10 @@
get E => null;
set F(_) {}
var G, H;
+mixin M {}
''');
expect(names.topLevelNames,
- unorderedEquals(['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H']));
+ unorderedEquals(['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'M']));
expect(names.classMemberNames, isEmpty);
}
diff --git a/pkg/analyzer/test/src/dart/analysis/driver_kernel_test.dart b/pkg/analyzer/test/src/dart/analysis/driver_kernel_test.dart
deleted file mode 100644
index 0663b45..0000000
--- a/pkg/analyzer/test/src/dart/analysis/driver_kernel_test.dart
+++ /dev/null
@@ -1,229 +0,0 @@
-// 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:test/test.dart';
-import 'package:test_reflective_loader/test_reflective_loader.dart';
-
-import 'driver_test.dart';
-
-main() {
- defineReflectiveSuite(() {
- defineReflectiveTests(AnalysisDriverTest_Kernel);
- });
-}
-
-/// Wrapper around the test package's `fail` function.
-///
-/// Unlike the test package's `fail` function, this function is not annotated
-/// with @alwaysThrows, so we can call it at the top of a test method without
-/// causing the rest of the method to be flagged as dead code.
-void _fail(String message) {
- fail(message);
-}
-
-@reflectiveTest
-class AnalysisDriverTest_Kernel extends AnalysisDriverTest {
- @override
- bool get useCFE => true;
-
- @override
- test_asyncChangesDuringAnalysis_getErrors() async {
- // TODO(brianwilkerson) Re-enable this test. It was disabled because it
- // appears to be flaky (possibly OS specific).
- // Unexpected exceptions:
- // Path: /test/lib/test.dart
- // Exception: NoSuchMethodError: The getter 'iterator' was called on null.
- // Receiver: null
- // Tried calling: iterator
- // #0 Object.noSuchMethod (dart:core-patch/dart:core/object_patch.dart:46)
- // #1 _LibraryWalker.evaluateScc (package:front_end/src/incremental/file_state.dart:581:35)
- // #2 _LibraryWalker.evaluate (package:front_end/src/incremental/file_state.dart:571:5)
- // #3 DependencyWalker.walk.strongConnect (package:front_end/src/dependency_walker.dart:149:13)
- // #4 DependencyWalker.walk (package:front_end/src/dependency_walker.dart:168:18)
- // #5 FileState.topologicalOrder (package:front_end/src/incremental/file_state.dart:147:19)
- // #6 KernelDriver.getKernelSequence.<anonymous closure>.<anonymous closure> (package:front_end/src/incremental/kernel_driver.dart:282:50)
- // #7 PerformanceLog.run (package:front_end/src/base/performance_logger.dart:34:15)
- // #8 KernelDriver.getKernelSequence.<anonymous closure> (package:front_end/src/incremental/kernel_driver.dart:281:43)
-// await super.test_asyncChangesDuringAnalysis_getErrors();
- }
-
- test_componentMetadata_incremental_merge() async {
- var a = _p('/a.dart');
- var b = _p('/b.dart');
- provider.newFile(a, r'''
-class A {
- A.a();
-}
-''');
- provider.newFile(b, r'''
-class B {
- B.b();
-}
-''');
- await driver.getResult(a);
- await driver.getResult(b);
-
- // This will fail if compilation of 'b' removed metadata for 'a'.
- // We use metadata to get constructor name offsets.
- await driver.getResult(a);
-
- // And check that 'b' still has its metadata as well.
- await driver.getResult(b);
- }
-
- @override
- @failingTest
- @FastaProblem('https://github.com/dart-lang/sdk/issues/33719')
- test_errors_uriDoesNotExist_export() async {
- await super.test_errors_uriDoesNotExist_export();
- }
-
- @override
- @failingTest
- @FastaProblem('https://github.com/dart-lang/sdk/issues/33719')
- test_errors_uriDoesNotExist_import() async {
- await super.test_errors_uriDoesNotExist_import();
- }
-
- @override
- @failingTest
- @FastaProblem('https://github.com/dart-lang/sdk/issues/33719')
- test_errors_uriDoesNotExist_import_deferred() async {
- await super.test_errors_uriDoesNotExist_import_deferred();
- }
-
- @override
- @failingTest
- @FastaProblem('https://github.com/dart-lang/sdk/issues/33719')
- test_errors_uriDoesNotExist_part() async {
- await super.test_errors_uriDoesNotExist_part();
- }
-
- @override
- test_externalSummaries() {
- // Skipped by design.
- }
-
- @override
- test_externalSummaries_partReuse() {
- // Skipped by design.
- }
-
- @override
- @failingTest
- @FastaProblem('https://github.com/dart-lang/sdk/issues/33719')
- test_getResult_doesNotExist() async {
- await super.test_getResult_doesNotExist();
- }
-
- @failingTest
- @override
- test_getResult_importLibrary_thenRemoveIt() async {
- await super.test_getResult_importLibrary_thenRemoveIt();
- }
-
- @failingTest
- @override
- test_getResult_invalid_annotation_functionAsConstructor() async {
- await super.test_getResult_invalid_annotation_functionAsConstructor();
- }
-
- @failingTest
- @override
- test_getResult_invalidUri() async {
- await super.test_getResult_invalidUri();
- }
-
- @failingTest
- @override
- test_getResult_invalidUri_exports_dart() async {
- await super.test_getResult_invalidUri_exports_dart();
- }
-
- @failingTest
- @override
- test_getResult_invalidUri_imports_dart() async {
- await super.test_getResult_invalidUri_imports_dart();
- }
-
- @failingTest
- @override
- test_getResult_invalidUri_metadata() async {
- await super.test_getResult_invalidUri_metadata();
- }
-
- @failingTest
- @override
- test_getResult_mix_fileAndPackageUris() async {
- await super.test_getResult_mix_fileAndPackageUris();
- }
-
- @failingTest
- @FastaProblem('https://github.com/dart-lang/sdk/issues/31409')
- @override
- test_getResult_nameConflict_local() async {
- await super.test_getResult_nameConflict_local();
- }
-
- @failingTest
- @FastaProblem('https://github.com/dart-lang/sdk/issues/31409')
- @override
- test_getResult_nameConflict_local_typeInference() async {
- await super.test_getResult_nameConflict_local_typeInference();
- }
-
- @override
- @failingTest
- test_missingDartLibrary_async() {
- return super.test_missingDartLibrary_async();
- }
-
- @override
- @failingTest
- test_missingDartLibrary_core() {
- return super.test_missingDartLibrary_core();
- }
-
- @failingTest
- @FastaProblem('https://github.com/dart-lang/sdk/issues/30959')
- @override
- test_part_getResult_noLibrary() async {
- await super.test_part_getResult_noLibrary();
- }
-
- @failingTest
- @FastaProblem('https://github.com/dart-lang/sdk/issues/30959')
- @override
- test_part_getUnitElement_noLibrary() async {
- _fail('This test fails even with @failingTest');
- await super.test_part_getUnitElement_noLibrary();
- }
-
- @failingTest
- @FastaProblem('https://github.com/dart-lang/sdk/issues/30959')
- @override
- test_part_results_afterLibrary() async {
- await super.test_part_results_afterLibrary();
- }
-
- @failingTest
- @FastaProblem('https://github.com/dart-lang/sdk/issues/30959')
- @override
- test_part_results_noLibrary() async {
- await super.test_part_results_noLibrary();
- }
-
- @failingTest
- @override
- test_removeFile_invalidate_importers() async {
- await super.test_removeFile_invalidate_importers();
- }
-
- String _p(String path) => provider.convertPath(path);
-}
-
-/// Tests marked with this annotation fail because of a Fasta problem.
-class FastaProblem {
- const FastaProblem(String issueUri);
-}
diff --git a/pkg/analyzer/test/src/dart/analysis/driver_resolution_kernel_test.dart b/pkg/analyzer/test/src/dart/analysis/driver_resolution_kernel_test.dart
deleted file mode 100644
index 1a18218..0000000
--- a/pkg/analyzer/test/src/dart/analysis/driver_resolution_kernel_test.dart
+++ /dev/null
@@ -1,78 +0,0 @@
-// 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:test_reflective_loader/test_reflective_loader.dart';
-
-import 'driver_resolution_test.dart';
-
-main() {
- defineReflectiveSuite(() {
- defineReflectiveTests(AnalysisDriverResolutionTest_Kernel);
- });
-}
-
-@reflectiveTest
-class AnalysisDriverResolutionTest_Kernel extends AnalysisDriverResolutionTest {
- @override
- bool get useCFE => true;
-
- @override
- @failingTest
- test_generic_function_type() async {
- await super.test_generic_function_type();
- }
-
- @override
- @failingTest
- test_invalid_annotation_on_variable_declaration_for() async {
- await super.test_invalid_annotation_on_variable_declaration_for();
- }
-
- @override
- @failingTest
- test_invalid_constructor_initializer_field_importPrefix() async {
- await super.test_invalid_constructor_initializer_field_importPrefix();
- }
-
- @override
- @failingTest
- test_methodInvocation_topLevelFunction_generic() async {
- await super.test_methodInvocation_topLevelFunction_generic();
- }
-
- @override
- @failingTest
- test_unresolved_assignment_left_indexed1_simple() async {
- await super.test_unresolved_assignment_left_indexed1_simple();
- }
-
- @override
- @failingTest
- test_unresolved_assignment_left_indexed2_simple() async {
- await super.test_unresolved_assignment_left_indexed2_simple();
- }
-
- @override
- @failingTest
- test_unresolved_assignment_left_indexed3_simple() async {
- await super.test_unresolved_assignment_left_indexed3_simple();
- }
-
- @override
- @failingTest
- test_unresolved_assignment_left_indexed4_simple() async {
- await super.test_unresolved_assignment_left_indexed4_simple();
- }
-
- @override
- @failingTest
- test_unresolved_redirectingFactory_22() async {
- await super.test_unresolved_redirectingFactory_22();
- }
-}
-
-/// Tests marked with this annotation fail because of a Fasta problem.
-class FastaProblem {
- const FastaProblem(String issueUri);
-}
diff --git a/pkg/analyzer/test/src/dart/analysis/driver_resolution_test.dart b/pkg/analyzer/test/src/dart/analysis/driver_resolution_test.dart
index 8624cb8..57c42eb 100644
--- a/pkg/analyzer/test/src/dart/analysis/driver_resolution_test.dart
+++ b/pkg/analyzer/test/src/dart/analysis/driver_resolution_test.dart
@@ -9,17 +9,17 @@
import 'package:analyzer/dart/element/element.dart';
import 'package:analyzer/dart/element/type.dart';
import 'package:analyzer/src/dart/analysis/driver.dart';
-import 'package:analyzer/src/dart/ast/utilities.dart';
import 'package:analyzer/src/dart/element/element.dart';
import 'package:analyzer/src/dart/element/member.dart';
import 'package:analyzer/src/dart/element/type.dart';
-import 'package:analyzer/src/generated/parser.dart';
import 'package:analyzer/src/generated/resolver.dart';
import 'package:analyzer/src/generated/utilities_dart.dart';
import 'package:test/test.dart';
import 'package:test_reflective_loader/test_reflective_loader.dart';
import '../../../utils.dart';
+import '../resolution/find_element.dart';
+import '../resolution/find_node.dart';
import 'base.dart';
main() {
@@ -153,17 +153,16 @@
expect(name.prefix.staticType, isNull);
assertElement(name.identifier, expectedElement);
- if (useCFE) {
- assertType(name.identifier, expectedType);
- }
+ expect(name.identifier.staticType, isNull);
}
}
+ void assertTypeNull(Identifier node) {
+ expect(node.staticType, isNull);
+ }
+
void assertUnresolvedInvokeType(DartType invokeType) {
- if (useCFE) {
- // TODO(scheglov) https://github.com/dart-lang/sdk/issues/33682
- expect(invokeType.toString(), '() → dynamic');
- }
+ expect(invokeType, isDynamicType);
}
/// Creates a function that checks that an expression is a reference to a top
@@ -216,8 +215,8 @@
Future resolveTestFile() async {
result = await driver.getResult(testFile);
- findNode = new FindNode(result);
- findElement = new FindElement(result);
+ findNode = new FindNode(result.content, result.unit);
+ findElement = new FindElement(result.unit);
}
test_adjacentStrings() async {
@@ -887,1059 +886,6 @@
}
}
- test_assign_in_const_context() async {
- addTestFile('''
-void f(num x, int y) {
- const [x = y];
-}
-''');
- await resolveTestFile();
-
- var xRef = findNode.simple('x =');
- assertType(xRef, 'num');
- assertElement(xRef, findElement.parameter('x'));
- var yRef = findNode.simple('y]');
- assertType(yRef, 'int');
- assertElement(yRef, findElement.parameter('y'));
- }
-
- test_assign_to_ambiguous_type() async {
- provider.newFile(_p('/test/lib/a.dart'), 'class C {}');
- provider.newFile(_p('/test/lib/b.dart'), 'class C {}');
- addTestFile('''
-import 'a.dart';
-import 'b.dart';
-void f(int x) {
- C = x;
-}
-''');
- await resolveTestFile();
-
- var xRef = findNode.simple('x;');
- assertType(xRef, 'int');
- assertElement(xRef, findElement.parameter('x'));
- }
-
- test_assign_to_class() async {
- addTestFile('''
-class C {}
-void f(int x) {
- C = x;
-}
-''');
- await resolveTestFile();
-
- var cRef = findNode.simple('C =');
- assertType(cRef, 'Type');
- assertElement(cRef, findElement.class_('C'));
- var xRef = findNode.simple('x;');
- assertType(xRef, 'int');
- assertElement(xRef, findElement.parameter('x'));
- }
-
- test_assign_to_non_lvalue() async {
- addTestFile('''
-void f(int x, double y, String z) {
- x + y = z;
-}
-''');
- await resolveTestFile();
-
- var xRef = findNode.simple('x +');
- assertType(xRef, 'int');
- assertElement(xRef, findElement.parameter('x'));
- var yRef = findNode.simple('y =');
- assertType(yRef, 'double');
- assertElement(yRef, findElement.parameter('y'));
- var zRef = findNode.simple('z;');
- assertType(zRef, 'String');
- assertElement(zRef, findElement.parameter('z'));
- }
-
- test_assign_to_postfix_increment() async {
- addTestFile('''
-void f(num x, int y) {
- x++ = y;
-}
-''');
- await resolveTestFile();
-
- var xRef = findNode.simple('x++');
- assertType(xRef, 'num');
- assertElement(xRef, findElement.parameter('x'));
- var yRef = findNode.simple('y;');
- assertType(yRef, 'int');
- assertElement(yRef, findElement.parameter('y'));
- }
-
- test_assign_to_postfix_increment_compound() async {
- addTestFile('''
-void f(num x, int y) {
- x++ += y;
-}
-''');
- await resolveTestFile();
-
- var xRef = findNode.simple('x++');
- assertType(xRef, 'num');
- assertElement(xRef, findElement.parameter('x'));
- var yRef = findNode.simple('y;');
- assertType(yRef, 'int');
- assertElement(yRef, findElement.parameter('y'));
- }
-
- test_assign_to_postfix_increment_null_aware() async {
- addTestFile('''
-void f(num x, int y) {
- x++ ??= y;
-}
-''');
- await resolveTestFile();
-
- var xRef = findNode.simple('x++');
- assertType(xRef, 'num');
- assertElement(xRef, findElement.parameter('x'));
- var yRef = findNode.simple('y;');
- assertType(yRef, 'int');
- assertElement(yRef, findElement.parameter('y'));
- }
-
- test_assign_to_prefix_increment() async {
- addTestFile('''
-void f(num x, int y) {
- ++x = y;
-}
-''');
- await resolveTestFile();
-
- var xRef = findNode.simple('x =');
- assertType(xRef, 'num');
- assertElement(xRef, findElement.parameter('x'));
- var yRef = findNode.simple('y;');
- assertType(yRef, 'int');
- assertElement(yRef, findElement.parameter('y'));
- }
-
- test_assign_to_prefix_increment_compound() async {
- addTestFile('''
-void f(num x, int y) {
- ++x += y;
-}
-''');
- await resolveTestFile();
-
- var xRef = findNode.simple('x +=');
- assertType(xRef, 'num');
- assertElement(xRef, findElement.parameter('x'));
- var yRef = findNode.simple('y;');
- assertType(yRef, 'int');
- assertElement(yRef, findElement.parameter('y'));
- }
-
- test_assign_to_prefix_increment_null_aware() async {
- addTestFile('''
-void f(num x, int y) {
- ++x ??= y;
-}
-''');
- await resolveTestFile();
-
- var xRef = findNode.simple('x ??=');
- assertType(xRef, 'num');
- assertElement(xRef, findElement.parameter('x'));
- var yRef = findNode.simple('y;');
- assertType(yRef, 'int');
- assertElement(yRef, findElement.parameter('y'));
- }
-
- test_assign_with_synthetic_lhs() async {
- addTestFile('''
-void f(int x) {
- = x;
-}
-''');
- await resolveTestFile();
-
- var xRef = findNode.simple('x;');
- assertType(xRef, 'int');
- assertElement(xRef, findElement.parameter('x'));
- }
-
- test_assign_with_synthetic_lhs_in_method() async {
- addTestFile('''
-class C {
- void f(int x) {
- = x;
- }
-}
-''');
- await resolveTestFile();
-
- var xRef = findNode.simple('x;');
- assertType(xRef, 'int');
- assertElement(xRef, findElement.parameter('x'));
- }
-
- test_assignment_to_final_parameter() async {
- addTestFile('''
-f(final int x) {
- x += 2;
-}
-''');
- await resolveTestFile();
- expect(result.errors, isNotEmpty);
-
- var xElement = findNode.simple('x)').staticElement;
- expect(xElement, isNotNull);
- var xReference = findNode.simple('x +=');
- expect(xReference.staticElement, same(xElement));
- expect(xReference.staticType.toString(), 'int');
- }
-
- test_assignment_to_final_variable_local() async {
- addTestFile('''
-main() {
- final x = 1;
- x += 2;
-}
-''');
- await resolveTestFile();
- expect(result.errors, isNotEmpty);
-
- var xElement = findNode.simple('x =').staticElement;
- expect(xElement, isNotNull);
- var xReference = findNode.simple('x +=');
- expect(xReference.staticElement, same(xElement));
- expect(xReference.staticType.toString(), 'int');
- }
-
- test_assignment_to_getter_instance_direct() async {
- addTestFile('''
-class C {
- int get x => 0;
-}
-f(C c) {
- c.x += 2;
-}
-''');
- await resolveTestFile();
- expect(result.errors, isNotEmpty);
-
- var xElement = findElement.getter('x');
- expect(xElement, isNotNull);
- var xReference = findNode.simple('x +=');
- expect(xReference.staticElement, useCFE ? isNull : same(xElement));
- expect(xReference.staticType.toString(), useCFE ? 'dynamic' : 'int');
- }
-
- test_assignment_to_getter_instance_via_implicit_this() async {
- addTestFile('''
-class C {
- int get x => 0;
- f() {
- x += 2;
- }
-}
-''');
- await resolveTestFile();
- expect(result.errors, isNotEmpty);
-
- var xElement = findElement.getter('x');
- expect(xElement, isNotNull);
- var xReference = findNode.simple('x +=');
- expect(xReference.staticElement, useCFE ? isNull : same(xElement));
- expect(xReference.staticType.toString(), useCFE ? 'dynamic' : 'int');
- }
-
- test_assignment_to_getter_static_direct() async {
- addTestFile('''
-class C {
- static int get x => 0;
-}
-main() {
- C.x += 2;
-}
-''');
- await resolveTestFile();
- expect(result.errors, isNotEmpty);
-
- var xElement = findElement.getter('x');
- expect(xElement, isNotNull);
- var xReference = findNode.simple('x +=');
- expect(xReference.staticElement, useCFE ? isNull : same(xElement));
- expect(xReference.staticType.toString(), useCFE ? 'dynamic' : 'int');
- }
-
- test_assignment_to_getter_static_via_scope() async {
- addTestFile('''
-class C {
- static int get x => 0;
- f() {
- x += 2;
- }
-}
-''');
- await resolveTestFile();
- expect(result.errors, isNotEmpty);
-
- var xElement = findElement.getter('x');
- expect(xElement, isNotNull);
- var xReference = findNode.simple('x +=');
- expect(xReference.staticElement, useCFE ? isNull : same(xElement));
- expect(xReference.staticType.toString(), useCFE ? 'dynamic' : 'int');
- }
-
- test_assignment_to_getter_top_level() async {
- addTestFile('''
-int get x => 0;
-main() {
- x += 2;
-}
-''');
- await resolveTestFile();
- expect(result.errors, isNotEmpty);
-
- var xElement = findElement.topGet('x');
- expect(xElement, isNotNull);
- var xReference = findNode.simple('x +=');
- expect(xReference.staticElement, useCFE ? isNull : same(xElement));
- expect(xReference.staticType.toString(), useCFE ? 'dynamic' : 'int');
- }
-
- test_assignment_to_prefix() async {
- var a = _p('/test/lib/a.dart');
- provider.newFile(a, '''
-var x = 0;
-''');
- addTestFile('''
-import 'a.dart' as p;
-main() {
- p += 2;
-}
-''');
- await resolveTestFile();
- expect(result.errors, isNotEmpty);
-
- var pElement = findElement.prefix('p');
- expect(pElement, isNotNull);
- var pReference = findNode.simple('p +=');
- expect(pReference.staticElement, same(pElement));
- expect(pReference.staticType, isNull);
- }
-
- test_assignmentExpression_compound_indexExpression() async {
- String content = r'''
-main() {
- var items = <num>[1, 2, 3];
- items[0] += 4;
-}
-''';
- addTestFile(content);
-
- await resolveTestFile();
- CompilationUnit unit = result.unit;
-
- var typeProvider = unit.declaredElement.context.typeProvider;
- InterfaceType numType = typeProvider.numType;
- InterfaceType intType = typeProvider.intType;
- InterfaceType listType = typeProvider.listType;
- InterfaceType listNumType = listType.instantiate([numType]);
-
- List<Statement> mainStatements = _getMainStatements(result);
-
- VariableElement itemsElement;
- {
- VariableDeclarationStatement statement = mainStatements[0];
- VariableDeclaration itemsNode = statement.variables.variables[0];
- itemsElement = itemsNode.declaredElement;
- expect(itemsElement.type, listNumType);
- }
-
- {
- ExpressionStatement statement = mainStatements[1];
-
- AssignmentExpression assignment = statement.expression;
- expect(assignment.operator.type, TokenType.PLUS_EQ);
- expect(assignment.staticElement, isNotNull);
- expect(assignment.staticElement.name, '+');
- expect(assignment.staticType, typeProvider.numType); // num + int = num
-
- IndexExpression indexExpression = assignment.leftHandSide;
- expect(indexExpression.staticType, numType);
- expect(indexExpression.index.staticType, intType);
-
- MethodMember actualElement = indexExpression.staticElement;
- MethodMember expectedElement = listNumType.getMethod('[]=');
- expect(actualElement.name, '[]=');
- expect(actualElement.baseElement, same(expectedElement.baseElement));
- expect(actualElement.returnType, VoidTypeImpl.instance);
- expect(actualElement.parameters[0].type, intType);
-
- Expression right = assignment.rightHandSide;
- expect(right.staticType, typeProvider.intType);
- }
- }
-
- test_assignmentExpression_compound_local() async {
- String content = r'''
-main() {
- num v = 0;
- v += 3;
-}
-''';
- addTestFile(content);
-
- await resolveTestFile();
- CompilationUnit unit = result.unit;
- var typeProvider = unit.declaredElement.context.typeProvider;
-
- List<Statement> mainStatements = _getMainStatements(result);
-
- VariableElement v;
- {
- VariableDeclarationStatement statement = mainStatements[0];
- v = statement.variables.variables[0].declaredElement;
- expect(v.type, typeProvider.numType);
- }
-
- {
- ExpressionStatement statement = mainStatements[1];
-
- AssignmentExpression assignment = statement.expression;
- expect(assignment.operator.type, TokenType.PLUS_EQ);
- expect(assignment.staticElement, isNotNull);
- expect(assignment.staticElement.name, '+');
- expect(assignment.staticType, typeProvider.numType); // num + int = num
-
- SimpleIdentifier left = assignment.leftHandSide;
- expect(left.staticElement, same(v));
- expect(left.staticType, typeProvider.numType);
-
- Expression right = assignment.rightHandSide;
- expect(right.staticType, typeProvider.intType);
- }
- }
-
- test_assignmentExpression_compound_prefixedIdentifier() async {
- String content = r'''
-main() {
- var c = new C();
- c.f += 2;
-}
-class C {
- num f;
-}
-''';
- addTestFile(content);
-
- await resolveTestFile();
- CompilationUnit unit = result.unit;
- var typeProvider = unit.declaredElement.context.typeProvider;
-
- ClassDeclaration cClassDeclaration = unit.declarations[1];
- ClassElement cClassElement = cClassDeclaration.declaredElement;
- FieldElement fElement = cClassElement.getField('f');
-
- List<Statement> mainStatements = _getMainStatements(result);
-
- VariableElement c;
- {
- VariableDeclarationStatement statement = mainStatements[0];
- c = statement.variables.variables[0].declaredElement;
- expect(c.type, cClassElement.type);
- }
-
- {
- ExpressionStatement statement = mainStatements[1];
-
- AssignmentExpression assignment = statement.expression;
- expect(assignment.operator.type, TokenType.PLUS_EQ);
- expect(assignment.staticElement, isNotNull);
- expect(assignment.staticElement.name, '+');
- expect(assignment.staticType, typeProvider.numType); // num + int = num
-
- PrefixedIdentifier left = assignment.leftHandSide;
- expect(left.staticElement, same(fElement.setter));
- expect(left.staticType, typeProvider.numType);
-
- expect(left.prefix.staticElement, c);
- expect(left.prefix.staticType, cClassElement.type);
-
- expect(left.identifier.staticElement, same(fElement.setter));
- expect(left.identifier.staticType, typeProvider.numType);
-
- Expression right = assignment.rightHandSide;
- expect(right.staticType, typeProvider.intType);
- }
- }
-
- test_assignmentExpression_compound_propertyAccess() async {
- String content = r'''
-main() {
- new C().f += 2;
-}
-class C {
- num f;
-}
-''';
- addTestFile(content);
-
- await resolveTestFile();
- CompilationUnit unit = result.unit;
- var typeProvider = unit.declaredElement.context.typeProvider;
-
- ClassDeclaration cClassDeclaration = unit.declarations[1];
- ClassElement cClassElement = cClassDeclaration.declaredElement;
- FieldElement fElement = cClassElement.getField('f');
-
- List<Statement> mainStatements = _getMainStatements(result);
-
- {
- ExpressionStatement statement = mainStatements[0];
-
- AssignmentExpression assignment = statement.expression;
- expect(assignment.operator.type, TokenType.PLUS_EQ);
- expect(assignment.staticElement, isNotNull);
- expect(assignment.staticElement.name, '+');
- expect(assignment.staticType, typeProvider.numType); // num + int = num
-
- PropertyAccess left = assignment.leftHandSide;
- expect(left.staticType, typeProvider.numType);
-
- InstanceCreationExpression newC = left.target;
- expect(newC.staticElement, cClassElement.unnamedConstructor);
-
- expect(left.propertyName.staticElement, same(fElement.setter));
- expect(left.propertyName.staticType, typeProvider.numType);
-
- Expression right = assignment.rightHandSide;
- expect(right.staticType, typeProvider.intType);
- }
- }
-
- test_assignmentExpression_nullAware_local() async {
- String content = r'''
-main() {
- String v;
- v ??= 'test';
-}
-''';
- addTestFile(content);
-
- await resolveTestFile();
- CompilationUnit unit = result.unit;
- var typeProvider = unit.declaredElement.context.typeProvider;
-
- List<Statement> mainStatements = _getMainStatements(result);
-
- VariableElement v;
- {
- VariableDeclarationStatement statement = mainStatements[0];
- v = statement.variables.variables[0].declaredElement;
- }
-
- {
- ExpressionStatement statement = mainStatements[1];
-
- AssignmentExpression assignment = statement.expression;
- expect(assignment.operator.type, TokenType.QUESTION_QUESTION_EQ);
- expect(assignment.staticElement, isNull);
- expect(assignment.staticType, typeProvider.stringType);
-
- SimpleIdentifier left = assignment.leftHandSide;
- expect(left.staticElement, same(v));
- expect(left.staticType, typeProvider.stringType);
-
- Expression right = assignment.rightHandSide;
- expect(right.staticType, typeProvider.stringType);
- }
- }
-
- test_assignmentExpression_propertyAccess_forwardingStub() async {
- String content = r'''
-class A {
- int f;
-}
-abstract class I<T> {
- T f;
-}
-class B extends A implements I<int> {}
-main() {
- new B().f = 1;
-}
-''';
- addTestFile(content);
-
- await resolveTestFile();
- CompilationUnit unit = result.unit;
- var typeProvider = unit.declaredElement.context.typeProvider;
-
- ClassDeclaration aNode = unit.declarations[0];
- ClassElement aElement = aNode.declaredElement;
- FieldElement fElement = aElement.getField('f');
-
- ClassDeclaration bNode = unit.declarations[2];
- ClassElement bElement = bNode.declaredElement;
-
- List<Statement> mainStatements = _getMainStatements(result);
- ExpressionStatement statement = mainStatements[0];
-
- AssignmentExpression assignment = statement.expression;
- expect(assignment.staticType, typeProvider.intType);
-
- PropertyAccess left = assignment.leftHandSide;
- expect(left.staticType, typeProvider.intType);
-
- InstanceCreationExpression newB = left.target;
- expect(newB.staticElement, bElement.unnamedConstructor);
-
- expect(left.propertyName.staticElement, same(fElement.setter));
- expect(left.propertyName.staticType, typeProvider.intType);
-
- Expression right = assignment.rightHandSide;
- expect(right.staticType, typeProvider.intType);
- }
-
- test_assignmentExpression_simple_indexExpression() async {
- String content = r'''
-main() {
- var items = <int>[1, 2, 3];
- items[0] = 4;
-}
-''';
- addTestFile(content);
-
- await resolveTestFile();
- CompilationUnit unit = result.unit;
-
- var typeProvider = unit.declaredElement.context.typeProvider;
- InterfaceType intType = typeProvider.intType;
- InterfaceType listType = typeProvider.listType;
- InterfaceType listIntType = listType.instantiate([intType]);
-
- List<Statement> mainStatements = _getMainStatements(result);
-
- VariableElement itemsElement;
- {
- VariableDeclarationStatement statement = mainStatements[0];
- VariableDeclaration itemsNode = statement.variables.variables[0];
- itemsElement = itemsNode.declaredElement;
- expect(itemsElement.type, listIntType);
- }
-
- {
- ExpressionStatement statement = mainStatements[1];
-
- AssignmentExpression assignment = statement.expression;
- expect(assignment.operator.type, TokenType.EQ);
- expect(assignment.staticElement, isNull);
- expect(assignment.staticType, typeProvider.intType);
-
- IndexExpression indexExpression = assignment.leftHandSide;
- expect(indexExpression.staticType, intType);
- expect(indexExpression.index.staticType, intType);
-
- MethodMember actualElement = indexExpression.staticElement;
- MethodMember expectedElement = listIntType.getMethod('[]=');
- expect(actualElement.name, '[]=');
- expect(actualElement.baseElement, same(expectedElement.baseElement));
- expect(actualElement.returnType, VoidTypeImpl.instance);
- expect(actualElement.parameters[0].type, intType);
-
- Expression right = assignment.rightHandSide;
- expect(right.staticType, typeProvider.intType);
- }
- }
-
- test_assignmentExpression_simple_instanceField_unqualified() async {
- String content = r'''
-class C {
- num f = 0;
- foo() {
- f = 2;
- }
-}
-''';
- addTestFile(content);
-
- await resolveTestFile();
- CompilationUnit unit = result.unit;
- var typeProvider = unit.declaredElement.context.typeProvider;
-
- ClassDeclaration cDeclaration = unit.declarations[0];
- FieldElement fElement = cDeclaration.declaredElement.fields[0];
-
- MethodDeclaration fooDeclaration = cDeclaration.members[1];
- BlockFunctionBody fooBody = fooDeclaration.body;
-
- {
- ExpressionStatement statement = fooBody.block.statements[0];
-
- AssignmentExpression assignment = statement.expression;
- expect(assignment.operator.type, TokenType.EQ);
- expect(assignment.staticElement, isNull);
- expect(assignment.staticType, typeProvider.intType);
-
- SimpleIdentifier left = assignment.leftHandSide;
- expect(left.staticElement, same(fElement.setter));
- expect(left.staticType, typeProvider.numType);
-
- Expression right = assignment.rightHandSide;
- expect(right.staticType, typeProvider.intType);
- }
- }
-
- test_assignmentExpression_simple_local() async {
- String content = r'''
-main() {
- num v = 0;
- v = 2;
-}
-''';
- addTestFile(content);
-
- await resolveTestFile();
- CompilationUnit unit = result.unit;
- var typeProvider = unit.declaredElement.context.typeProvider;
-
- List<Statement> mainStatements = _getMainStatements(result);
-
- VariableElement v;
- {
- VariableDeclarationStatement statement = mainStatements[0];
- v = statement.variables.variables[0].declaredElement;
- expect(v.type, typeProvider.numType);
- }
-
- {
- ExpressionStatement statement = mainStatements[1];
-
- AssignmentExpression assignment = statement.expression;
- expect(assignment.operator.type, TokenType.EQ);
- expect(assignment.staticElement, isNull);
- expect(assignment.staticType, typeProvider.intType);
-
- SimpleIdentifier left = assignment.leftHandSide;
- expect(left.staticElement, same(v));
- expect(left.staticType, typeProvider.numType);
-
- Expression right = assignment.rightHandSide;
- expect(right.staticType, typeProvider.intType);
- }
- }
-
- test_assignmentExpression_simple_prefixedIdentifier() async {
- String content = r'''
-main() {
- var c = new C();
- c.f = 2;
-}
-class C {
- num f;
-}
-''';
- addTestFile(content);
-
- await resolveTestFile();
- CompilationUnit unit = result.unit;
- var typeProvider = unit.declaredElement.context.typeProvider;
-
- ClassDeclaration cClassDeclaration = unit.declarations[1];
- ClassElement cClassElement = cClassDeclaration.declaredElement;
- FieldElement fElement = cClassElement.getField('f');
-
- List<Statement> mainStatements = _getMainStatements(result);
-
- VariableElement c;
- {
- VariableDeclarationStatement statement = mainStatements[0];
- c = statement.variables.variables[0].declaredElement;
- expect(c.type, cClassElement.type);
- }
-
- {
- ExpressionStatement statement = mainStatements[1];
-
- AssignmentExpression assignment = statement.expression;
- expect(assignment.staticType, typeProvider.intType);
-
- PrefixedIdentifier left = assignment.leftHandSide;
- expect(left.staticElement, same(fElement.setter));
- expect(left.staticType, typeProvider.numType);
-
- expect(left.prefix.staticElement, c);
- expect(left.prefix.staticType, cClassElement.type);
-
- expect(left.identifier.staticElement, same(fElement.setter));
- expect(left.identifier.staticType, typeProvider.numType);
-
- Expression right = assignment.rightHandSide;
- expect(right.staticType, typeProvider.intType);
- }
- }
-
- test_assignmentExpression_simple_prefixedIdentifier_staticField() async {
- String content = r'''
-main() {
- C.f = 2;
-}
-class C {
- static num f;
-}
-''';
- addTestFile(content);
-
- await resolveTestFile();
- CompilationUnit unit = result.unit;
- var typeProvider = unit.declaredElement.context.typeProvider;
-
- ClassDeclaration cClassDeclaration = unit.declarations[1];
- ClassElement cClassElement = cClassDeclaration.declaredElement;
- FieldElement fElement = cClassElement.getField('f');
-
- List<Statement> mainStatements = _getMainStatements(result);
-
- {
- ExpressionStatement statement = mainStatements[0];
-
- AssignmentExpression assignment = statement.expression;
- expect(assignment.staticType, typeProvider.intType);
-
- PrefixedIdentifier left = assignment.leftHandSide;
- expect(left.staticElement, same(fElement.setter));
- expect(left.staticType, typeProvider.numType);
-
- expect(left.prefix.staticElement, cClassElement);
- expect(left.prefix.staticType, cClassElement.type);
-
- expect(left.identifier.staticElement, same(fElement.setter));
- expect(left.identifier.staticType, typeProvider.numType);
-
- Expression right = assignment.rightHandSide;
- expect(right.staticType, typeProvider.intType);
- }
- }
-
- test_assignmentExpression_simple_propertyAccess() async {
- String content = r'''
-main() {
- new C().f = 2;
-}
-class C {
- num f;
-}
-''';
- addTestFile(content);
-
- await resolveTestFile();
- CompilationUnit unit = result.unit;
- var typeProvider = unit.declaredElement.context.typeProvider;
-
- ClassDeclaration cClassDeclaration = unit.declarations[1];
- ClassElement cClassElement = cClassDeclaration.declaredElement;
- FieldElement fElement = cClassElement.getField('f');
-
- List<Statement> mainStatements = _getMainStatements(result);
-
- {
- ExpressionStatement statement = mainStatements[0];
-
- AssignmentExpression assignment = statement.expression;
- expect(assignment.staticType, typeProvider.intType);
-
- PropertyAccess left = assignment.leftHandSide;
- expect(left.staticType, typeProvider.numType);
-
- InstanceCreationExpression newC = left.target;
- expect(newC.staticElement, cClassElement.unnamedConstructor);
-
- expect(left.propertyName.staticElement, same(fElement.setter));
- expect(left.propertyName.staticType, typeProvider.numType);
-
- Expression right = assignment.rightHandSide;
- expect(right.staticType, typeProvider.intType);
- }
- }
-
- test_assignmentExpression_simple_propertyAccess_chained() async {
- String content = r'''
-main() {
- var a = new A();
- a.b.f = 2;
-}
-class A {
- B b;
-}
-class B {
- num f;
-}
-''';
- addTestFile(content);
-
- await resolveTestFile();
- CompilationUnit unit = result.unit;
- var typeProvider = unit.declaredElement.context.typeProvider;
-
- ClassDeclaration aClassDeclaration = unit.declarations[1];
- ClassElement aClassElement = aClassDeclaration.declaredElement;
- FieldElement bElement = aClassElement.getField('b');
-
- ClassDeclaration bClassDeclaration = unit.declarations[2];
- ClassElement bClassElement = bClassDeclaration.declaredElement;
- FieldElement fElement = bClassElement.getField('f');
-
- List<Statement> mainStatements = _getMainStatements(result);
-
- VariableElement a;
- {
- VariableDeclarationStatement statement = mainStatements[0];
- a = statement.variables.variables[0].declaredElement;
- expect(a.type, aClassElement.type);
- }
-
- {
- ExpressionStatement statement = mainStatements[1];
-
- AssignmentExpression assignment = statement.expression;
- expect(assignment.staticType, typeProvider.intType);
-
- PropertyAccess fAccess = assignment.leftHandSide;
- expect(fAccess.propertyName.name, 'f');
- expect(fAccess.propertyName.staticElement, same(fElement.setter));
- expect(fAccess.propertyName.staticType, typeProvider.numType);
-
- PrefixedIdentifier bAccess = fAccess.target;
- expect(bAccess.identifier.name, 'b');
- expect(bAccess.identifier.staticElement, same(bElement.getter));
- expect(bAccess.identifier.staticType, bClassElement.type);
-
- SimpleIdentifier aIdentifier = bAccess.prefix;
- expect(aIdentifier.name, 'a');
- expect(aIdentifier.staticElement, a);
- expect(aIdentifier.staticType, aClassElement.type);
-
- Expression right = assignment.rightHandSide;
- expect(right.staticType, typeProvider.intType);
- }
- }
-
- test_assignmentExpression_simple_propertyAccess_setter() async {
- String content = r'''
-main() {
- new C().f = 2;
-}
-class C {
- void set f(num _) {}
-}
-''';
- addTestFile(content);
-
- await resolveTestFile();
- CompilationUnit unit = result.unit;
- var typeProvider = unit.declaredElement.context.typeProvider;
-
- ClassDeclaration cClassDeclaration = unit.declarations[1];
- ClassElement cClassElement = cClassDeclaration.declaredElement;
- FieldElement fElement = cClassElement.getField('f');
-
- List<Statement> mainStatements = _getMainStatements(result);
-
- {
- ExpressionStatement statement = mainStatements[0];
-
- AssignmentExpression assignment = statement.expression;
- expect(assignment.staticType, typeProvider.intType);
-
- PropertyAccess left = assignment.leftHandSide;
- expect(left.staticType, typeProvider.numType);
-
- InstanceCreationExpression newC = left.target;
- expect(newC.staticElement, cClassElement.unnamedConstructor);
-
- expect(left.propertyName.staticElement, same(fElement.setter));
- expect(left.propertyName.staticType, typeProvider.numType);
-
- Expression right = assignment.rightHandSide;
- expect(right.staticType, typeProvider.intType);
- }
- }
-
- test_assignmentExpression_simple_staticField_unqualified() async {
- String content = r'''
-class C {
- static num f = 0;
- foo() {
- f = 2;
- }
-}
-''';
- addTestFile(content);
-
- await resolveTestFile();
- CompilationUnit unit = result.unit;
- var typeProvider = unit.declaredElement.context.typeProvider;
-
- ClassDeclaration cDeclaration = unit.declarations[0];
- FieldElement fElement = cDeclaration.declaredElement.fields[0];
-
- MethodDeclaration fooDeclaration = cDeclaration.members[1];
- BlockFunctionBody fooBody = fooDeclaration.body;
-
- {
- ExpressionStatement statement = fooBody.block.statements[0];
-
- AssignmentExpression assignment = statement.expression;
- expect(assignment.operator.type, TokenType.EQ);
- expect(assignment.staticElement, isNull);
- expect(assignment.staticType, typeProvider.intType);
-
- SimpleIdentifier left = assignment.leftHandSide;
- expect(left.staticElement, same(fElement.setter));
- expect(left.staticType, typeProvider.numType);
-
- Expression right = assignment.rightHandSide;
- expect(right.staticType, typeProvider.intType);
- }
- }
-
- test_assignmentExpression_simple_topLevelVariable() async {
- String content = r'''
-main() {
- v = 2;
-}
-num v = 0;
-''';
- addTestFile(content);
-
- await resolveTestFile();
- CompilationUnit unit = result.unit;
- var typeProvider = unit.declaredElement.context.typeProvider;
-
- TopLevelVariableElement v;
- {
- TopLevelVariableDeclaration declaration = unit.declarations[1];
- v = declaration.variables.variables[0].declaredElement;
- expect(v.type, typeProvider.numType);
- }
-
- List<Statement> mainStatements = _getMainStatements(result);
- {
- ExpressionStatement statement = mainStatements[0];
-
- AssignmentExpression assignment = statement.expression;
- expect(assignment.operator.type, TokenType.EQ);
- expect(assignment.staticElement, isNull);
- expect(assignment.staticType, typeProvider.intType);
-
- SimpleIdentifier left = assignment.leftHandSide;
- expect(left.staticElement, same(v.setter));
- expect(left.staticType, typeProvider.numType);
-
- Expression right = assignment.rightHandSide;
- expect(right.staticType, typeProvider.intType);
- }
- }
-
test_binary_operator_with_synthetic_operands() async {
addTestFile('''
void main() {
@@ -2589,6 +1535,7 @@
}
}
+ @failingTest
test_deferredImport_loadLibrary_invocation() async {
var a = _p('/test/lib/a.dart');
provider.newFile(a, '');
@@ -2611,9 +1558,10 @@
var name = invocation.methodName;
assertElement(name, import.importedLibrary.loadLibraryFunction);
- assertType(name, useCFE ? '() → Future<dynamic>' : null);
+ assertType(name, '() → Future<dynamic>');
}
+ @failingTest
test_deferredImport_loadLibrary_invocation_argument() async {
var a = _p('/test/lib/a.dart');
provider.newFile(a, '');
@@ -2638,7 +1586,7 @@
var name = invocation.methodName;
assertElement(name, import.importedLibrary.loadLibraryFunction);
- assertType(name, useCFE ? '() → Future<dynamic>' : null);
+ assertType(name, '() → Future<dynamic>');
var bRef = invocation.argumentList.arguments[0];
assertElement(bRef, findElement.topGet('b'));
@@ -3098,18 +2046,17 @@
''');
await resolveTestFile();
- ClassDeclaration aNode = result.unit.declarations[0];
- ClassElement eElement = aNode.declaredElement;
- MethodElement mElement = eElement.getMethod('m');
+// ClassDeclaration aNode = result.unit.declarations[0];
+// ClassElement eElement = aNode.declaredElement;
+// MethodElement mElement = eElement.getMethod('m');
List<Statement> mainStatements = _getMainStatements(result);
ExpressionStatement statement = mainStatements[0];
MethodInvocation invocation = statement.expression;
expect(invocation.staticInvokeType.toString(), '(int) → void');
- if (useCFE) {
- expect(invocation.methodName.staticElement, same(mElement));
- }
+ // TODO(scheglov) Check for MethodElement
+// expect(invocation.methodName.staticElement, same(mElement));
}
test_function_call_with_synthetic_arguments() async {
@@ -3221,30 +2168,6 @@
expect(actualElement.parameters[0].type, intType);
}
- test_indexExpression_cascade_assign() async {
- addTestFile(r'''
-main() {
- <int, int>{}..[1] = 10;
-}
-''');
- await resolveTestFile();
-
- var cascade = findNode.cascade('<int, int>');
- assertType(cascade, 'Map<int, int>');
-
- MapLiteral map = cascade.target;
- assertType(map, 'Map<int, int>');
- assertTypeArguments(map.typeArguments, [intType, intType]);
-
- AssignmentExpression assignment = cascade.cascadeSections[0];
- assertElementNull(assignment);
- assertType(assignment, 'int');
-
- IndexExpression indexed = assignment.leftHandSide;
- assertMember(indexed, 'Map<int, int>', mapElement.getMethod('[]='));
- assertType(indexed, 'int');
- }
-
test_instanceCreation_factory() async {
String content = r'''
class C {
@@ -3443,11 +2366,7 @@
PrefixedIdentifier typeIdentifier = typeName.name;
expect(typeIdentifier.staticElement, same(cElement));
- if (useCFE) {
- expect(typeIdentifier.staticType, cTypeInt);
- } else {
- expect(typeIdentifier.staticType, cTypeDynamic);
- }
+ expect(typeIdentifier.staticType, cTypeDynamic);
SimpleIdentifier typePrefix = typeIdentifier.prefix;
expect(typePrefix.name, 'p');
@@ -3472,11 +2391,7 @@
PrefixedIdentifier typeIdentifier = typeName.name;
expect(typeIdentifier.staticElement, cElement);
- if (useCFE) {
- expect(typeIdentifier.staticType, cTypeDouble);
- } else {
- expect(typeIdentifier.staticType, cTypeDynamic);
- }
+ expect(typeIdentifier.staticType, cTypeDynamic);
SimpleIdentifier typePrefix = typeIdentifier.prefix;
expect(typePrefix.name, 'p');
@@ -3520,6 +2435,7 @@
}
}
+ @failingTest
test_instanceCreation_unprefixed() async {
addTestFile(r'''
main() {
@@ -3543,7 +2459,6 @@
ConstructorElement defaultConstructor = cElement.constructors[0];
ConstructorElement namedConstructor = cElement.constructors[1];
InterfaceType cType = cElement.type;
- var cTypeDynamic = cType.instantiate([DynamicTypeImpl.instance]);
var statements = _getMainStatements(result);
{
@@ -3559,11 +2474,7 @@
SimpleIdentifier typeIdentifier = typeName.name;
expect(typeIdentifier.staticElement, same(cElement));
- if (useCFE) {
- expect(typeIdentifier.staticType, cTypeInt);
- } else {
- expect(typeIdentifier.staticType, cTypeDynamic);
- }
+ expect(typeIdentifier.staticType, isNull);
expect(creation.constructorName.name, isNull);
}
@@ -3583,7 +2494,7 @@
SimpleIdentifier typeIdentifier = typeName.name;
expect(typeIdentifier.staticElement, same(cElement));
- expect(typeIdentifier.staticType, cTypeBool);
+ expect(typeIdentifier.staticType, isNull);
expect(creation.constructorName.name, isNull);
}
@@ -3601,11 +2512,7 @@
SimpleIdentifier typeIdentifier = typeName.name;
expect(typeIdentifier.staticElement, cElement);
- if (useCFE) {
- expect(typeIdentifier.staticType, cTypeDouble);
- } else {
- expect(typeIdentifier.staticType, cTypeDynamic);
- }
+ expect(typeIdentifier.staticType, isNull);
expect(typeIdentifier.staticElement, same(cElement));
@@ -3629,7 +2536,7 @@
SimpleIdentifier typeIdentifier = typeName.name;
expect(typeIdentifier.staticElement, cElement);
- expect(typeIdentifier.staticType, cTypeBool);
+ expect(typeIdentifier.staticType, isNull);
SimpleIdentifier constructorName = creation.constructorName.name;
expect(constructorName.staticElement, namedConstructor);
@@ -3721,93 +2628,6 @@
// analyzer/FE integration.
}
- test_invalid_assign_notLValue_parenthesized() async {
- addTestFile(r'''
-int a, b;
-double c = 0.0;
-main() {
- (a + b) = c;
-}
-''');
- await resolveTestFile();
- expect(result.errors, isNotEmpty);
-
- var parenthesized = findNode.parenthesized('(a + b)');
- assertType(parenthesized, 'int');
-
- assertTopGetRef('a + b', 'a');
- assertTopGetRef('b)', 'b');
- assertTopGetRef('c;', 'c');
-
- var assignment = findNode.assignment('= c');
- if (useCFE) {
- assertElementNull(assignment);
- assertTypeDynamic(assignment);
- }
- }
-
- test_invalid_assignment_types_local() async {
- addTestFile(r'''
-int a;
-bool b;
-main() {
- a = b;
-}
-''');
- await resolveTestFile();
- expect(result.errors, isNotEmpty);
-
- var assignment = findNode.assignment('a = b');
- assertElementNull(assignment);
- assertType(assignment, 'bool');
-
- SimpleIdentifier aRef = assignment.leftHandSide;
- assertElement(aRef, findElement.topVar('a').setter);
- assertType(aRef, 'int');
-
- SimpleIdentifier bRef = assignment.rightHandSide;
- assertElement(bRef, findElement.topVar('b').getter);
- assertType(bRef, 'bool');
- }
-
- test_invalid_assignment_types_top() async {
- addTestFile(r'''
-int a = 0;
-bool b = a;
-''');
- await resolveTestFile();
- expect(result.errors, isNotEmpty);
-
- var bDeclaration = findNode.variableDeclaration('b =');
- TopLevelVariableElement bElement = bDeclaration.declaredElement;
- assertElement(bDeclaration.name, bElement);
- assertType(bDeclaration.name, 'bool');
- expect(bElement.type.toString(), 'bool');
-
- SimpleIdentifier aRef = bDeclaration.initializer;
- assertElement(aRef, findElement.topGet('a'));
- assertType(aRef, 'int');
- }
-
- test_invalid_assignment_types_top_const() async {
- addTestFile(r'''
-const int a = 0;
-const bool b = a;
-''');
- await resolveTestFile();
- expect(result.errors, isNotEmpty);
-
- var bDeclaration = findNode.variableDeclaration('b =');
- TopLevelVariableElement bElement = bDeclaration.declaredElement;
- assertElement(bDeclaration.name, bElement);
- assertType(bDeclaration.name, 'bool');
- expect(bElement.type.toString(), 'bool');
-
- SimpleIdentifier aRef = bDeclaration.initializer;
- assertElement(aRef, findElement.topGet('a'));
- assertType(aRef, 'int');
- }
-
test_invalid_catch_parameters_3() async {
addTestFile(r'''
main() {
@@ -3841,8 +2661,7 @@
expect(result.errors, isNotEmpty);
assertTypeDynamic(findNode.simple('e,'));
- assertType(findNode.simple('s})'),
- useCFE || Parser.useFasta ? 'StackTrace' : 'dynamic');
+ assertType(findNode.simple('s})'), 'StackTrace');
}
test_invalid_catch_parameters_optional_stack() async {
@@ -3855,8 +2674,7 @@
expect(result.errors, isNotEmpty);
assertTypeDynamic(findNode.simple('e,'));
- assertType(findNode.simple('s])'),
- useCFE || Parser.useFasta ? 'StackTrace' : 'dynamic');
+ assertType(findNode.simple('s])'), 'StackTrace');
}
test_invalid_const_as() async {
@@ -3996,11 +2814,7 @@
expect(result.errors, isNotEmpty);
var xRef = findNode.simple('X = ');
- if (useCFE) {
- assertElement(xRef, findElement.class_('X'));
- } else {
- assertElementNull(xRef);
- }
+ assertElementNull(xRef);
var aRef = findNode.simple('a;');
assertElement(aRef, findElement.topGet('a'));
@@ -4038,11 +2852,7 @@
expect(result.errors, isNotEmpty);
var xRef = findNode.simple('x = ');
- if (useCFE) {
- assertElement(xRef, findElement.import('dart:async').prefix);
- } else {
- assertElementNull(xRef);
- }
+ assertElementNull(xRef);
var aRef = findNode.simple('a;');
assertElement(aRef, findElement.topGet('a'));
@@ -4061,11 +2871,7 @@
expect(result.errors, isNotEmpty);
var xRef = findNode.simple('x = ');
- if (useCFE) {
- assertElement(xRef, findElement.method('x'));
- } else {
- assertElementNull(xRef);
- }
+ assertElementNull(xRef);
var aRef = findNode.simple('a;');
assertElement(aRef, findElement.topGet('a'));
@@ -4103,11 +2909,7 @@
expect(result.errors, isNotEmpty);
var xRef = findNode.simple('x = ');
- if (useCFE) {
- assertElement(xRef, findElement.topFunction('x'));
- } else {
- assertElementNull(xRef);
- }
+ assertElementNull(xRef);
var aRef = findNode.simple('a;');
assertElement(aRef, findElement.topGet('a'));
@@ -4126,11 +2928,7 @@
expect(result.errors, isNotEmpty);
var xRef = findNode.simple('x = ');
- if (useCFE) {
- assertElement(xRef, findElement.topVar('x'));
- } else {
- assertElementNull(xRef);
- }
+ assertElementNull(xRef);
var aRef = findNode.simple('a;');
assertElement(aRef, findElement.topGet('a'));
@@ -4148,11 +2946,7 @@
expect(result.errors, isNotEmpty);
var tRef = findNode.simple('T = ');
- if (useCFE) {
- assertElement(tRef, findElement.typeParameter('T'));
- } else {
- assertElementNull(tRef);
- }
+ assertElementNull(tRef);
var aRef = findNode.simple('a;');
assertElement(aRef, findElement.topGet('a'));
@@ -4344,17 +3138,16 @@
await resolveTestFile();
expect(result.errors, isNotEmpty);
- if (useCFE) {
- var aRef = findNode.simple('a;');
- assertElement(aRef, findElement.parameter('a'));
- assertType(aRef, 'int');
+ var aRef = findNode.simple('a;');
+ assertElement(aRef, findElement.parameter('a'));
+ assertType(aRef, 'int');
- var bRef = findNode.simple('b;');
- assertElement(bRef, findElement.parameter('b'));
- assertType(bRef, 'double');
- }
+ var bRef = findNode.simple('b;');
+ assertElement(bRef, findElement.parameter('b'));
+ assertType(bRef, 'double');
}
+ @failingTest
test_invalid_instanceCreation_abstract() async {
addTestFile(r'''
abstract class C<T> {
@@ -4385,7 +3178,7 @@
TypeName type = constructorName.type;
expect(type.typeArguments, isNull);
assertElement(type.name, c);
- assertType(type.name, useCFE ? 'C<int>' : 'C<dynamic>');
+ assertTypeNull(type.name);
SimpleIdentifier aRef = creation.argumentList.arguments[0];
assertElement(aRef, findElement.topGet('a'));
@@ -4402,7 +3195,7 @@
TypeName type = constructorName.type;
expect(type.typeArguments, isNull);
assertElement(type.name, c);
- assertType(type.name, useCFE ? 'C<bool>' : 'C<dynamic>');
+ assertType(type.name, 'C<bool>');
SimpleIdentifier bRef = creation.argumentList.arguments[0];
assertElement(bRef, findElement.topGet('b'));
@@ -4537,6 +3330,7 @@
assertType(aRef, 'int');
}
+ @failingTest
test_invalid_instanceCreation_prefixAsType() async {
addTestFile(r'''
import 'dart:math' as p;
@@ -4551,10 +3345,8 @@
ImportElement import = findNode.import('dart:math').element;
var pRef = findNode.simple('p(a)');
- if (useCFE) {
- assertElement(pRef, import.prefix);
- assertTypeDynamic(pRef);
- }
+ assertElement(pRef, import.prefix);
+ assertTypeDynamic(pRef);
var aRef = findNode.simple('a);');
assertElement(aRef, findElement.topGet('a'));
@@ -4767,13 +3559,14 @@
var pRef = invocation.methodName;
assertElement(pRef, import.prefix);
- assertType(pRef, useCFE ? null : 'dynamic');
+ assertTypeDynamic(pRef);
var aRef = findNode.simple('a);');
assertElement(aRef, findElement.topGet('a'));
assertType(aRef, 'int');
}
+ @failingTest
test_invalid_methodInvocation_simpleIdentifier() async {
addTestFile(r'''
int foo = 0;
@@ -4798,6 +3591,7 @@
expect(name.staticType, typeProvider.intType);
}
+ @failingTest
test_invalid_nonTypeAsType_class_constructor() async {
addTestFile(r'''
class A {
@@ -4812,13 +3606,14 @@
var aRef = findNode.simple('A.T v;');
assertElement(aRef, findElement.class_('A'));
- assertType(aRef, useCFE ? 'dynamic' : null);
+ assertTypeDynamic(aRef);
var tRef = findNode.simple('T v;');
assertElement(tRef, null);
- assertType(tRef, useCFE ? 'dynamic' : null);
+ assertTypeDynamic(tRef);
}
+ @failingTest
test_invalid_nonTypeAsType_class_instanceField() async {
addTestFile(r'''
class A {
@@ -4833,13 +3628,14 @@
var aRef = findNode.simple('A.T v;');
assertElement(aRef, findElement.class_('A'));
- assertType(aRef, useCFE ? 'dynamic' : null);
+ assertTypeDynamic(aRef);
var tRef = findNode.simple('T v;');
assertElement(tRef, null);
- assertType(tRef, useCFE ? 'dynamic' : null);
+ assertTypeDynamic(tRef);
}
+ @failingTest
test_invalid_nonTypeAsType_class_instanceMethod() async {
addTestFile(r'''
class A {
@@ -4854,13 +3650,14 @@
var aRef = findNode.simple('A.T v;');
assertElement(aRef, findElement.class_('A'));
- assertType(aRef, useCFE ? 'dynamic' : null);
+ assertTypeDynamic(aRef);
var tRef = findNode.simple('T v;');
assertElement(tRef, null);
- assertType(tRef, useCFE ? 'dynamic' : null);
+ assertTypeDynamic(tRef);
}
+ @failingTest
test_invalid_nonTypeAsType_class_staticField() async {
addTestFile(r'''
class A {
@@ -4875,13 +3672,14 @@
var aRef = findNode.simple('A.T v;');
assertElement(aRef, findElement.class_('A'));
- assertType(aRef, useCFE ? 'dynamic' : null);
+ assertTypeDynamic(aRef);
var tRef = findNode.simple('T v;');
assertElement(tRef, null);
- assertType(tRef, useCFE ? 'dynamic' : null);
+ assertTypeDynamic(tRef);
}
+ @failingTest
test_invalid_nonTypeAsType_class_staticMethod() async {
addTestFile(r'''
class A {
@@ -4896,13 +3694,14 @@
var aRef = findNode.simple('A.T v;');
assertElement(aRef, findElement.class_('A'));
- assertType(aRef, useCFE ? 'dynamic' : null);
+ assertTypeDynamic(aRef);
var tRef = findNode.simple('T v;');
assertElement(tRef, null);
- assertType(tRef, useCFE ? 'dynamic' : null);
+ assertTypeDynamic(tRef);
}
+ @failingTest
test_invalid_nonTypeAsType_topLevelFunction() async {
addTestFile(r'''
int T() => 0;
@@ -4914,10 +3713,11 @@
expect(result.errors, isNotEmpty);
var tRef = findNode.simple('T v;');
- assertElement(tRef, useCFE ? findElement.topFunction('T') : null);
+ assertElement(tRef, findElement.topFunction('T'));
assertTypeDynamic(tRef);
}
+ @failingTest
test_invalid_nonTypeAsType_topLevelFunction_prefixed() async {
var a = _p('/test/lib/a.dart');
provider.newFile(a, r'''
@@ -4943,13 +3743,14 @@
expect(pRef.staticType, null);
var tRef = prefixedName.identifier;
- assertElement(tRef, useCFE ? tElement : null);
- expect(pRef.staticType, null);
+ assertElement(tRef, tElement);
+ assertTypeDynamic(tRef);
TypeName typeName = prefixedName.parent;
expect(typeName.type, isDynamicType);
}
+ @failingTest
test_invalid_nonTypeAsType_topLevelVariable() async {
addTestFile(r'''
int T;
@@ -4961,10 +3762,11 @@
expect(result.errors, isNotEmpty);
var tRef = findNode.simple('T v;');
- assertElement(tRef, useCFE ? findElement.topGet('T') : null);
+ assertElement(tRef, findElement.topGet('T'));
assertTypeDynamic(tRef);
}
+ @failingTest
test_invalid_nonTypeAsType_topLevelVariable_name() async {
addTestFile(r'''
int A;
@@ -4977,13 +3779,14 @@
var aRef = findNode.simple('A.T v;');
assertElement(aRef, findElement.topGet('A'));
- assertType(aRef, useCFE ? 'dynamic' : null);
+ assertTypeDynamic(aRef);
var tRef = findNode.simple('T v;');
assertElement(tRef, null);
- assertType(tRef, useCFE ? 'dynamic' : null);
+ assertTypeDynamic(tRef);
}
+ @failingTest
test_invalid_nonTypeAsType_topLevelVariable_prefixed() async {
var a = _p('/test/lib/a.dart');
provider.newFile(a, r'''
@@ -5009,13 +3812,14 @@
expect(pRef.staticType, null);
var tRef = prefixedName.identifier;
- assertElement(tRef, useCFE ? tElement : null);
- expect(pRef.staticType, null);
+ assertElement(tRef, tElement);
+ assertTypeDynamic(tRef);
TypeName typeName = prefixedName.parent;
expect(typeName.type, isDynamicType);
}
+ @failingTest
test_invalid_nonTypeAsType_typeParameter_name() async {
addTestFile(r'''
main<T>() {
@@ -5026,13 +3830,12 @@
expect(result.errors, isNotEmpty);
var tRef = findNode.simple('T.U v;');
- if (useCFE) {
- var tElement = findNode.typeParameter('T>()').declaredElement;
- assertElement(tRef, tElement);
- assertTypeDynamic(tRef);
- }
+ var tElement = findNode.typeParameter('T>()').declaredElement;
+ assertElement(tRef, tElement);
+ assertTypeDynamic(tRef);
}
+ @failingTest
test_invalid_nonTypeAsType_unresolved_name() async {
addTestFile(r'''
main() {
@@ -5044,7 +3847,7 @@
var tRef = findNode.simple('T.U v;');
assertElementNull(tRef);
- assertType(tRef, useCFE ? 'dynamic' : null);
+ assertTypeDynamic(tRef);
}
test_invalid_rethrow() async {
@@ -5314,6 +4117,7 @@
// analyzer/FE integration.
}
+ @failingTest
test_local_function_generic() async {
addTestFile(r'''
void main() {
@@ -5398,12 +4202,9 @@
MethodInvocation fInvocation = vDeclaration.initializer;
expect(fInvocation.methodName.staticElement, same(fElement));
expect(fInvocation.staticType, typeProvider.intType);
- // TODO(scheglov) We don't support invoke types well.
-// if (useCFE) {
-// String fInstantiatedType = '(int, String) → int';
-// expect(fInvocation.methodName.staticType.toString(), fInstantiatedType);
-// expect(fInvocation.staticInvokeType.toString(), fInstantiatedType);
-// }
+
+ assertTypeNull(fInvocation.methodName);
+ expect(fInvocation.staticInvokeType.toString(), '(int, String) → int');
}
test_local_function_generic_f_bounded() async {
@@ -6586,13 +5387,8 @@
expect(target.staticType.toString(), '(int) → double');
SimpleIdentifier methodName = invocation.methodName;
- if (useCFE) {
- expect(methodName.staticElement, isNull);
- expect(methodName.staticType, isNull);
- } else {
- expect(methodName.staticElement, same(parameter));
- expect(methodName.staticType, parameter.type);
- }
+ expect(methodName.staticElement, same(parameter));
+ expect(methodName.staticType, parameter.type);
}
test_methodInvocation_instanceMethod_forwardingStub() async {
@@ -6672,8 +5468,7 @@
assertInvokeType(invocation, invokeTypeStr);
assertMember(invocation.methodName, 'C<int>', mElement);
- assertType(invocation.methodName,
- useCFE ? invokeTypeStr : '<U>(int, U) → Map<int, U>');
+ assertType(invocation.methodName, '<U>(int, U) → Map<int, U>');
_assertArgumentToParameter(arguments[0], mElement.parameters[0]);
_assertArgumentToParameter(arguments[1], mElement.parameters[1]);
@@ -6726,11 +5521,7 @@
ExpressionStatement statement = fooStatements[0];
MethodInvocation invocation = statement.expression;
expect(invocation.methodName.staticElement, same(fElement.getter));
- if (useCFE) {
- _assertDynamicFunctionType(invocation.staticInvokeType);
- } else {
- expect(invocation.staticInvokeType, DynamicTypeImpl.instance);
- }
+ expect(invocation.staticInvokeType, DynamicTypeImpl.instance);
expect(invocation.staticType, DynamicTypeImpl.instance);
List<Expression> arguments = invocation.argumentList.arguments;
@@ -6760,11 +5551,7 @@
ExpressionStatement statement = fooStatements[0];
MethodInvocation invocation = statement.expression;
expect(invocation.methodName.staticElement, same(fElement));
- if (useCFE) {
- _assertDynamicFunctionType(invocation.staticInvokeType);
- } else {
- expect(invocation.staticInvokeType, DynamicTypeImpl.instance);
- }
+ expect(invocation.staticInvokeType, DynamicTypeImpl.instance);
expect(invocation.staticType, DynamicTypeImpl.instance);
List<Expression> arguments = invocation.argumentList.arguments;
@@ -6827,7 +5614,7 @@
ExpressionStatement statement = mainStatements[0];
MethodInvocation invocation = statement.expression;
expect(invocation.methodName.staticElement, same(fElement));
- _assertDynamicFunctionType(invocation.staticInvokeType);
+ expect(invocation.staticInvokeType, isDynamicType);
expect(invocation.staticType, DynamicTypeImpl.instance);
List<Expression> arguments = invocation.argumentList.arguments;
@@ -6881,7 +5668,7 @@
ExpressionStatement statement = mainStatements[0];
MethodInvocation invocation = statement.expression;
expect(invocation.methodName.staticElement, same(fElement.getter));
- _assertDynamicFunctionType(invocation.staticInvokeType);
+ expect(invocation.staticInvokeType, isDynamicType);
expect(invocation.staticType, DynamicTypeImpl.instance);
List<Expression> arguments = invocation.argumentList.arguments;
@@ -6922,9 +5709,7 @@
var invokeTypeStr = '(int) → void';
expect(invocation.staticType.toString(), 'void');
expect(invocation.staticInvokeType.toString(), invokeTypeStr);
- if (!useCFE) {
- expect(invocation.staticInvokeType.element, same(mElement));
- }
+ expect(invocation.staticInvokeType.element, same(mElement));
expect(invocation.methodName.staticElement, same(mElement));
expect(invocation.methodName.staticType.toString(), invokeTypeStr);
@@ -6946,9 +5731,7 @@
var invokeTypeStr = '(int) → void';
expect(invocation.staticType.toString(), 'void');
expect(invocation.staticInvokeType.toString(), invokeTypeStr);
- if (!useCFE) {
- expect(invocation.staticInvokeType.element, same(mElement));
- }
+ expect(invocation.staticInvokeType.element, same(mElement));
expect(invocation.methodName.staticElement, same(mElement));
expect(invocation.methodName.staticType.toString(), invokeTypeStr);
@@ -7010,6 +5793,7 @@
_assertArgumentToParameter(arguments[1], fElement.parameters[1]);
}
+ @failingTest
test_methodInvocation_topLevelFunction_generic() async {
addTestFile(r'''
void main() {
@@ -7051,9 +5835,7 @@
List<Expression> arguments = invocation.argumentList.arguments;
expect(invocation.methodName.staticElement, same(fElement));
- if (useCFE) {
- expect(invocation.methodName.staticType.toString(), fTypeString);
- }
+ expect(invocation.methodName.staticType.toString(), fTypeString);
expect(invocation.staticType, VoidTypeImpl.instance);
expect(invocation.staticInvokeType.toString(), fTypeString);
@@ -7071,9 +5853,7 @@
List<Expression> arguments = invocation.argumentList.arguments;
expect(invocation.methodName.staticElement, same(fElement));
- if (useCFE) {
- expect(invocation.methodName.staticType.toString(), fTypeString);
- }
+ expect(invocation.methodName.staticType.toString(), fTypeString);
expect(invocation.staticType, VoidTypeImpl.instance);
expect(invocation.staticInvokeType.toString(), fTypeString);
@@ -7116,6 +5896,7 @@
}
}
+ @failingTest
test_optionalConst_prefixed() async {
provider.newFile(_p('/test/lib/a.dart'), r'''
class C {
@@ -7229,11 +6010,7 @@
expect(result.errors, isNotEmpty);
var tRef = findNode.typeName('T<');
- assertTypeName(
- tRef,
- findElement.typeParameter('T'),
- useCFE ? 'dynamic' : 'T',
- );
+ assertTypeName(tRef, findElement.typeParameter('T'), 'T');
var intRef = findNode.typeName('int,');
assertTypeName(intRef, intElement, 'int');
@@ -7309,11 +6086,7 @@
expect(result.errors, isNotEmpty);
var tRef = findNode.typeName('T<');
- assertTypeName(
- tRef,
- findElement.typeParameter('T'),
- useCFE ? 'dynamic' : 'T',
- );
+ assertTypeName(tRef, findElement.typeParameter('T'), 'T');
var intRef = findNode.typeName('int,');
assertTypeName(intRef, intElement, 'int');
@@ -7648,11 +6421,7 @@
SimpleIdentifier methodName = prefixed.identifier;
expect(methodName.staticElement, isNull);
- if (useCFE) {
- expect(methodName.staticType, isNull);
- } else {
- expect(methodName.staticType, typeProvider.dynamicType);
- }
+ expect(methodName.staticType, typeProvider.dynamicType);
}
test_prefixedIdentifier_importPrefix_className() async {
@@ -9343,353 +8112,7 @@
assertType(identifier, 'Type');
}
- test_unresolved_assignment_left_identifier_compound() async {
- addTestFile(r'''
-int b;
-main() {
- a += b;
-}
-''');
- await resolveTestFile();
- expect(result.errors, isNotEmpty);
-
- var assignment = findNode.assignment('a += b');
- assertElementNull(assignment);
- assertTypeDynamic(assignment);
-
- assertElementNull(assignment.leftHandSide);
- assertTypeDynamic(assignment.leftHandSide);
-
- assertElement(assignment.rightHandSide, findElement.topGet('b'));
- assertType(assignment.rightHandSide, 'int');
- }
-
- test_unresolved_assignment_left_identifier_simple() async {
- addTestFile(r'''
-int b;
-main() {
- a = b;
-}
-''');
- await resolveTestFile();
- expect(result.errors, isNotEmpty);
-
- var assignment = findNode.assignment('a = b');
- assertElementNull(assignment);
- if (useCFE) {
- assertType(assignment, 'int');
- }
-
- assertElementNull(assignment.leftHandSide);
- assertTypeDynamic(assignment.leftHandSide);
-
- assertElement(assignment.rightHandSide, findElement.topGet('b'));
- assertType(assignment.rightHandSide, 'int');
- }
-
- test_unresolved_assignment_left_indexed1_simple() async {
- addTestFile(r'''
-int c;
-main() {
- a[b] = c;
-}
-''');
- await resolveTestFile();
- expect(result.errors, isNotEmpty);
-
- var assignment = findNode.assignment('a[b] = c');
- assertElementNull(assignment);
- if (useCFE) {
- assertType(assignment, 'int');
- }
-
- IndexExpression indexed = assignment.leftHandSide;
- assertElementNull(indexed);
- assertTypeDynamic(indexed);
-
- assertElementNull(indexed.target);
- assertTypeDynamic(indexed.target);
-
- assertElementNull(indexed.index);
- assertTypeDynamic(indexed.index);
-
- assertElement(assignment.rightHandSide, findElement.topGet('c'));
- assertType(assignment.rightHandSide, 'int');
- }
-
- test_unresolved_assignment_left_indexed2_simple() async {
- addTestFile(r'''
-A a;
-int c;
-main() {
- a[b] = c;
-}
-class A {}
-''');
- await resolveTestFile();
- expect(result.errors, isNotEmpty);
-
- var assignment = findNode.assignment('a[b] = c');
- assertElementNull(assignment);
- if (useCFE) {
- assertType(assignment, 'int');
- }
-
- IndexExpression indexed = assignment.leftHandSide;
- assertElementNull(indexed);
- assertTypeDynamic(indexed);
-
- assertElement(indexed.target, findElement.topGet('a'));
- assertType(indexed.target, 'A');
-
- assertElementNull(indexed.index);
- assertTypeDynamic(indexed.index);
-
- assertElement(assignment.rightHandSide, findElement.topGet('c'));
- assertType(assignment.rightHandSide, 'int');
- }
-
- test_unresolved_assignment_left_indexed3_simple() async {
- addTestFile(r'''
-A a;
-int c;
-main() {
- a[b] = c;
-}
-class A {
- operator[]=(double b) {}
-}
-''');
- await resolveTestFile();
- expect(result.errors, isNotEmpty);
-
- var assignment = findNode.assignment('a[b] = c');
- assertElementNull(assignment);
- if (useCFE) {
- assertType(assignment, 'int');
- }
-
- IndexExpression indexed = assignment.leftHandSide;
- assertElement(indexed, findElement.method('[]='));
- assertTypeDynamic(indexed);
-
- assertElement(indexed.target, findElement.topGet('a'));
- assertType(indexed.target, 'A');
-
- assertElementNull(indexed.index);
- assertTypeDynamic(indexed.index);
-
- assertElement(assignment.rightHandSide, findElement.topGet('c'));
- assertType(assignment.rightHandSide, 'int');
- }
-
- test_unresolved_assignment_left_indexed4_simple() async {
- addTestFile(r'''
-double b;
-int c;
-main() {
- a[b] = c;
-}
-''');
- await resolveTestFile();
- expect(result.errors, isNotEmpty);
-
- var assignment = findNode.assignment('a[b] = c');
- assertElementNull(assignment);
- if (useCFE) {
- assertType(assignment, 'int');
- }
-
- IndexExpression indexed = assignment.leftHandSide;
- assertElementNull(indexed);
- assertTypeDynamic(indexed);
-
- assertElementNull(indexed.target);
- assertTypeDynamic(indexed.target);
-
- assertElement(indexed.index, findElement.topGet('b'));
- assertType(indexed.index, 'double');
-
- assertElement(assignment.rightHandSide, findElement.topGet('c'));
- assertType(assignment.rightHandSide, 'int');
- }
-
- test_unresolved_assignment_left_prefixed1_simple() async {
- addTestFile(r'''
-int c;
-main() {
- a.b = c;
-}
-''');
- await resolveTestFile();
- expect(result.errors, isNotEmpty);
-
- var assignment = findNode.assignment('a.b = c');
- assertElementNull(assignment);
- if (useCFE) {
- assertType(assignment, 'int');
- }
-
- PrefixedIdentifier prefixed = assignment.leftHandSide;
- assertElementNull(prefixed);
- assertTypeDynamic(prefixed);
-
- assertElementNull(prefixed.prefix);
- assertTypeDynamic(prefixed.prefix);
-
- assertElementNull(prefixed.identifier);
- assertTypeDynamic(prefixed.identifier);
-
- assertElement(assignment.rightHandSide, findElement.topGet('c'));
- assertType(assignment.rightHandSide, 'int');
- }
-
- test_unresolved_assignment_left_prefixed2_simple() async {
- addTestFile(r'''
-class A {}
-A a;
-int c;
-main() {
- a.b = c;
-}
-''');
- await resolveTestFile();
- expect(result.errors, isNotEmpty);
-
- var assignment = findNode.assignment('a.b = c');
- assertElementNull(assignment);
- if (useCFE) {
- assertType(assignment, 'int');
- }
-
- PrefixedIdentifier prefixed = assignment.leftHandSide;
- assertElementNull(prefixed);
- assertTypeDynamic(prefixed);
-
- assertElement(prefixed.prefix, findElement.topGet('a'));
- assertType(prefixed.prefix, 'A');
-
- assertElementNull(prefixed.identifier);
- assertTypeDynamic(prefixed.identifier);
-
- assertElement(assignment.rightHandSide, findElement.topGet('c'));
- assertType(assignment.rightHandSide, 'int');
- }
-
- test_unresolved_assignment_left_property1_simple() async {
- addTestFile(r'''
-int d;
-main() {
- a.b.c = d;
-}
-''');
- await resolveTestFile();
- expect(result.errors, isNotEmpty);
-
- var assignment = findNode.assignment('a.b.c = d');
- assertElementNull(assignment);
- if (useCFE) {
- assertType(assignment, 'int');
- }
-
- PropertyAccess access = assignment.leftHandSide;
- assertTypeDynamic(access);
-
- PrefixedIdentifier prefixed = access.target;
- assertElementNull(prefixed);
- assertTypeDynamic(prefixed);
-
- assertElementNull(prefixed.prefix);
- assertTypeDynamic(prefixed.prefix);
-
- assertElementNull(prefixed.identifier);
- assertTypeDynamic(prefixed.identifier);
-
- assertElementNull(access.propertyName);
- assertTypeDynamic(access.propertyName);
-
- assertElement(assignment.rightHandSide, findElement.topGet('d'));
- assertType(assignment.rightHandSide, 'int');
- }
-
- test_unresolved_assignment_left_property2_simple() async {
- addTestFile(r'''
-A a;
-int d;
-main() {
- a.b.c = d;
-}
-class A {}
-''');
- await resolveTestFile();
- expect(result.errors, isNotEmpty);
-
- var assignment = findNode.assignment('a.b.c = d');
- assertElementNull(assignment);
- if (useCFE) {
- assertType(assignment, 'int');
- }
-
- PropertyAccess access = assignment.leftHandSide;
- assertTypeDynamic(access);
-
- PrefixedIdentifier prefixed = access.target;
- assertElementNull(prefixed);
- assertTypeDynamic(prefixed);
-
- assertElement(prefixed.prefix, findElement.topGet('a'));
- assertType(prefixed.prefix, 'A');
-
- assertElementNull(prefixed.identifier);
- assertTypeDynamic(prefixed.identifier);
-
- assertElementNull(access.propertyName);
- assertTypeDynamic(access.propertyName);
-
- assertElement(assignment.rightHandSide, findElement.topGet('d'));
- assertType(assignment.rightHandSide, 'int');
- }
-
- test_unresolved_assignment_left_property3_simple() async {
- addTestFile(r'''
-A a;
-int d;
-main() {
- a.b.c = d;
-}
-class A { B b; }
-class B {}
-''');
- await resolveTestFile();
- expect(result.errors, isNotEmpty);
- var bElement = findElement.field('b');
-
- var assignment = findNode.assignment('a.b.c = d');
- assertElementNull(assignment);
- if (useCFE) {
- assertType(assignment, 'int');
- }
-
- PropertyAccess access = assignment.leftHandSide;
- assertTypeDynamic(access);
-
- PrefixedIdentifier prefixed = access.target;
- assertElement(prefixed, bElement.getter);
- assertType(prefixed, 'B');
-
- assertElement(prefixed.prefix, findElement.topGet('a'));
- assertType(prefixed.prefix, 'A');
-
- assertElement(prefixed.identifier, bElement.getter);
- assertType(prefixed.identifier, 'B');
-
- assertElementNull(access.propertyName);
- assertTypeDynamic(access.propertyName);
-
- assertElement(assignment.rightHandSide, findElement.topGet('d'));
- assertType(assignment.rightHandSide, 'int');
- }
-
+ @failingTest
test_unresolved_instanceCreation_name_11() async {
addTestFile(r'''
int arg1, arg2;
@@ -9704,29 +8127,24 @@
ExpressionStatement statement = statements[0];
InstanceCreationExpression creation = statement.expression;
- if (useCFE) {
- expect(creation.staticType, isDynamicType);
- }
+ expect(creation.staticType, isDynamicType);
ConstructorName constructorName = creation.constructorName;
expect(constructorName.name, isNull);
TypeName typeName = constructorName.type;
- if (useCFE) {
- expect(typeName.type, isDynamicType);
- }
+ expect(typeName.type, isDynamicType);
SimpleIdentifier typeIdentifier = typeName.name;
expect(typeIdentifier.staticElement, isNull);
- if (useCFE) {
- expect(typeIdentifier.staticType, isDynamicType);
- }
+ expect(typeIdentifier.staticType, isDynamicType);
assertTypeArguments(typeName.typeArguments, [intType, doubleType]);
_assertInvocationArguments(creation.argumentList,
[checkTopVarRef('arg1'), checkTopVarUndefinedNamedRef('arg2')]);
}
+ @failingTest
test_unresolved_instanceCreation_name_21() async {
addTestFile(r'''
int arg1, arg2;
@@ -9741,23 +8159,17 @@
ExpressionStatement statement = statements[0];
InstanceCreationExpression creation = statement.expression;
- if (useCFE) {
- expect(creation.staticType, isDynamicType);
- }
+ expect(creation.staticType, isDynamicType);
ConstructorName constructorName = creation.constructorName;
expect(constructorName.name, isNull);
TypeName typeName = constructorName.type;
- if (useCFE) {
- expect(typeName.type, isDynamicType);
- }
+ expect(typeName.type, isDynamicType);
PrefixedIdentifier typePrefixed = typeName.name;
expect(typePrefixed.staticElement, isNull);
- if (useCFE) {
- expect(typePrefixed.staticType, isDynamicType);
- }
+ expect(typePrefixed.staticType, isDynamicType);
SimpleIdentifier typePrefix = typePrefixed.prefix;
expect(typePrefix.staticElement, isNull);
@@ -9765,15 +8177,14 @@
SimpleIdentifier typeIdentifier = typePrefixed.identifier;
expect(typeIdentifier.staticElement, isNull);
- if (useCFE) {
- expect(typeIdentifier.staticType, isDynamicType);
- }
+ expect(typeIdentifier.staticType, isDynamicType);
assertTypeArguments(typeName.typeArguments, [intType, doubleType]);
_assertInvocationArguments(creation.argumentList,
[checkTopVarRef('arg1'), checkTopVarUndefinedNamedRef('arg2')]);
}
+ @failingTest
test_unresolved_instanceCreation_name_22() async {
addTestFile(r'''
import 'dart:math' as foo;
@@ -9792,23 +8203,17 @@
ExpressionStatement statement = statements[0];
InstanceCreationExpression creation = statement.expression;
- if (useCFE) {
- expect(creation.staticType, isDynamicType);
- }
+ expect(creation.staticType, isDynamicType);
ConstructorName constructorName = creation.constructorName;
expect(constructorName.name, isNull);
TypeName typeName = constructorName.type;
- if (useCFE) {
- expect(typeName.type, isDynamicType);
- }
+ expect(typeName.type, isDynamicType);
PrefixedIdentifier typePrefixed = typeName.name;
expect(typePrefixed.staticElement, isNull);
- if (useCFE) {
- expect(typePrefixed.staticType, isDynamicType);
- }
+ expect(typePrefixed.staticType, isDynamicType);
SimpleIdentifier typePrefix = typePrefixed.prefix;
expect(typePrefix.staticElement, same(foo));
@@ -9816,15 +8221,14 @@
SimpleIdentifier typeIdentifier = typePrefixed.identifier;
expect(typeIdentifier.staticElement, isNull);
- if (useCFE) {
- expect(typeIdentifier.staticType, isDynamicType);
- }
+ expect(typeIdentifier.staticType, isDynamicType);
assertTypeArguments(typeName.typeArguments, [intType, doubleType]);
_assertInvocationArguments(creation.argumentList,
[checkTopVarRef('arg1'), checkTopVarUndefinedNamedRef('arg2')]);
}
+ @failingTest
test_unresolved_instanceCreation_name_31() async {
addTestFile(r'''
int arg1, arg2;
@@ -9839,41 +8243,34 @@
ExpressionStatement statement = statements[0];
InstanceCreationExpression creation = statement.expression;
- if (useCFE) {
- expect(creation.staticType, isDynamicType);
- }
+ expect(creation.staticType, isUndefinedType);
ConstructorName constructorName = creation.constructorName;
TypeName typeName = constructorName.type;
- if (useCFE) {
- expect(typeName.type, isDynamicType);
- }
+ expect(typeName.type, isUndefinedType);
PrefixedIdentifier typePrefixed = typeName.name;
- expect(typePrefixed.staticElement, isNull);
- if (useCFE) {
- expect(typePrefixed.staticType, isDynamicType);
- }
+ assertElementNull(typePrefixed);
+ assertTypeNull(typePrefixed);
SimpleIdentifier typePrefix = typePrefixed.prefix;
- expect(typePrefix.staticElement, isNull);
- expect(typePrefix.staticType, isNull);
+ assertElementNull(typePrefix);
+ assertTypeNull(typePrefix);
SimpleIdentifier typeIdentifier = typePrefixed.identifier;
- expect(typeIdentifier.staticElement, isNull);
- if (useCFE) {
- expect(typeIdentifier.staticType, isDynamicType);
- }
+ assertElementNull(typeIdentifier);
+ assertTypeNull(typeIdentifier);
- expect(constructorName.name.staticElement, isNull);
- expect(constructorName.name.staticType, isNull);
+ assertElementNull(constructorName.name);
+ assertTypeNull(constructorName.name);
assertTypeArguments(typeName.typeArguments, [intType, doubleType]);
_assertInvocationArguments(creation.argumentList,
[checkTopVarRef('arg1'), checkTopVarUndefinedNamedRef('arg2')]);
}
+ @failingTest
test_unresolved_instanceCreation_name_32() async {
addTestFile(r'''
import 'dart:math' as foo;
@@ -9893,41 +8290,34 @@
ExpressionStatement statement = statements[0];
InstanceCreationExpression creation = statement.expression;
- if (useCFE) {
- expect(creation.staticType, isDynamicType);
- }
+ expect(creation.staticType, isUndefinedType);
ConstructorName constructorName = creation.constructorName;
TypeName typeName = constructorName.type;
- if (useCFE) {
- expect(typeName.type, isDynamicType);
- }
+ expect(typeName.type, isUndefinedType);
PrefixedIdentifier typePrefixed = typeName.name;
- expect(typePrefixed.staticElement, isNull);
- if (useCFE) {
- expect(typePrefixed.staticType, isDynamicType);
- }
+ assertElementNull(typePrefixed);
+ assertTypeNull(typePrefixed);
SimpleIdentifier typePrefix = typePrefixed.prefix;
- expect(typePrefix.staticElement, same(foo));
- expect(typePrefix.staticType, isNull);
+ assertElement(typePrefix, foo);
+ assertTypeNull(typePrefix);
SimpleIdentifier typeIdentifier = typePrefixed.identifier;
- expect(typeIdentifier.staticElement, isNull);
- if (useCFE) {
- expect(typeIdentifier.staticType, isDynamicType);
- }
+ assertElementNull(typeIdentifier);
+ assertTypeNull(typeIdentifier);
- expect(constructorName.name.staticElement, isNull);
- expect(constructorName.name.staticType, isNull);
+ assertElementNull(constructorName.name);
+ assertTypeNull(constructorName.name);
assertTypeArguments(typeName.typeArguments, [intType, doubleType]);
_assertInvocationArguments(creation.argumentList,
[checkTopVarRef('arg1'), checkTopVarUndefinedNamedRef('arg2')]);
}
+ @failingTest
test_unresolved_instanceCreation_name_33() async {
addTestFile(r'''
import 'dart:math' as foo;
@@ -9948,31 +8338,27 @@
ExpressionStatement statement = statements[0];
InstanceCreationExpression creation = statement.expression;
- if (useCFE) {
- expect(creation.staticType, isDynamicType);
- }
+ expect(creation.staticType, randomElement.type);
ConstructorName constructorName = creation.constructorName;
TypeName typeName = constructorName.type;
- if (useCFE) {
- expect(typeName.type, isDynamicType);
- }
+ assertType(typeName, 'Random');
PrefixedIdentifier typePrefixed = typeName.name;
- expect(typePrefixed.staticElement, same(randomElement));
- expect(typePrefixed.staticType, useCFE ? dynamicType : randomElement.type);
+ assertElement(typePrefixed, randomElement);
+ assertTypeNull(typePrefixed);
SimpleIdentifier typePrefix = typePrefixed.prefix;
- expect(typePrefix.staticElement, same(foo));
- expect(typePrefix.staticType, isNull);
+ assertElement(typePrefix, foo);
+ assertTypeNull(typePrefix);
SimpleIdentifier typeIdentifier = typePrefixed.identifier;
- expect(typeIdentifier.staticElement, same(randomElement));
- expect(typeIdentifier.staticType, useCFE ? dynamicType : null);
+ assertElement(typeIdentifier, randomElement);
+ assertTypeNull(typeIdentifier);
- expect(constructorName.name.staticElement, isNull);
- expect(constructorName.name.staticType, isNull);
+ assertElementNull(constructorName.name);
+ assertTypeNull(constructorName.name);
assertTypeArguments(typeName.typeArguments, [intType, doubleType]);
_assertInvocationArguments(creation.argumentList,
@@ -10331,7 +8717,7 @@
var namedRef = findNode.simple('named;');
assertElementNull(namedRef);
- expect(namedRef.staticType, useCFE ? isDynamicType : isNull);
+ assertTypeNull(namedRef);
}
test_unresolved_simpleIdentifier() async {
@@ -10413,9 +8799,9 @@
assertType(intRef, 'int');
}
- /// Assert that the [argument] is associated with the [expected],
- /// if [useCFE] is `null`. If the [argument] is a [NamedExpression],
- /// the name must be resolved to the parameter in both cases.
+ /// Assert that the [argument] is associated with the [expected]. If the
+ /// [argument] is a [NamedExpression], the name must be resolved to the
+ /// parameter.
void _assertArgumentToParameter(
Expression argument, ParameterElement expected,
{DartType memberType}) {
@@ -10474,15 +8860,6 @@
name: name, offset: offset, kind: kind, type: type);
}
- /// Assert that the [type] is a function type `() -> dynamic`.
- void _assertDynamicFunctionType(DartType type) {
- if (useCFE) {
- expect(type.toString(), '() → dynamic');
- } else {
- expect(type, DynamicTypeImpl.instance);
- }
- }
-
/// Test that [argumentList] has exactly two arguments - required `arg1`, and
/// unresolved named `arg2`, both are the reference to top-level variables.
void _assertInvocationArguments(ArgumentList argumentList,
@@ -10558,325 +8935,3 @@
*/
String _p(String path) => provider.convertPath(path);
}
-
-class FindElement {
- final AnalysisResult result;
-
- FindElement(this.result);
-
- CompilationUnitElement get unitElement => result.unit.declaredElement;
-
- ClassElement class_(String name) {
- for (var class_ in unitElement.types) {
- if (class_.name == name) {
- return class_;
- }
- }
- fail('Not found class: $name');
- }
-
- ExportElement export(String targetUri) {
- ExportElement exportElement;
- for (var export in unitElement.library.exports) {
- var exportedUri = export.exportedLibrary.source.uri.toString();
- if (exportedUri == targetUri) {
- if (exportElement != null) {
- throw new StateError('Not unique $targetUri export.');
- }
- exportElement = export;
- }
- }
- if (exportElement != null) {
- return exportElement;
- }
- fail('Not found export: $targetUri');
- }
-
- FieldElement field(String name) {
- for (var type in unitElement.types) {
- for (var field in type.fields) {
- if (field.name == name) {
- return field;
- }
- }
- }
- fail('Not found class field: $name');
- }
-
- FunctionElement function(String name) {
- for (var function in unitElement.functions) {
- if (function.name == name) {
- return function;
- }
- }
- fail('Not found top-level function: $name');
- }
-
- PropertyAccessorElement getter(String name) {
- for (var class_ in unitElement.types) {
- for (var accessor in class_.accessors) {
- if (accessor.isGetter && accessor.displayName == name) {
- return accessor;
- }
- }
- }
- fail('Not found class accessor: $name');
- }
-
- ImportElement import(String targetUri) {
- ImportElement importElement;
- for (var import in unitElement.library.imports) {
- var importedUri = import.importedLibrary.source.uri.toString();
- if (importedUri == targetUri) {
- if (importElement != null) {
- throw new StateError('Not unique $targetUri import.');
- }
- importElement = import;
- }
- }
- if (importElement != null) {
- return importElement;
- }
- fail('Not found import: $targetUri');
- }
-
- MethodElement method(String name) {
- for (var type in unitElement.types) {
- for (var method in type.methods) {
- if (method.name == name) {
- return method;
- }
- }
- }
- fail('Not found class method: $name');
- }
-
- ParameterElement parameter(String name) {
- ParameterElement parameterElement;
- void considerParameter(ParameterElement parameter) {
- if (parameter.name == name) {
- if (parameterElement != null) {
- throw new StateError('Parameter name $name is not unique.');
- }
- parameterElement = parameter;
- }
- }
-
- for (var accessor in unitElement.accessors) {
- accessor.parameters.forEach(considerParameter);
- }
- for (var function in unitElement.functions) {
- function.parameters.forEach(considerParameter);
- }
- for (var function in unitElement.functionTypeAliases) {
- function.parameters.forEach(considerParameter);
- }
- for (var class_ in unitElement.types) {
- for (var constructor in class_.constructors) {
- constructor.parameters.forEach(considerParameter);
- }
- for (var method in class_.methods) {
- method.parameters.forEach(considerParameter);
- }
- }
- if (parameterElement != null) {
- return parameterElement;
- }
- fail('No parameter found with name $name');
- }
-
- PrefixElement prefix(String name) {
- for (var import_ in unitElement.library.imports) {
- var prefix = import_.prefix;
- if (prefix != null && prefix.name == name) {
- return prefix;
- }
- }
- fail('Prefix not found: $name');
- }
-
- PropertyAccessorElement setter(String name) {
- for (var class_ in unitElement.types) {
- for (var accessor in class_.accessors) {
- if (accessor.isSetter && accessor.displayName == name) {
- return accessor;
- }
- }
- }
- fail('Not found class accessor: $name');
- }
-
- FunctionElement topFunction(String name) {
- for (var function in unitElement.functions) {
- if (function.name == name) {
- return function;
- }
- }
- fail('Not found top-level function: $name');
- }
-
- PropertyAccessorElement topGet(String name) {
- return topVar(name).getter;
- }
-
- PropertyAccessorElement topSet(String name) {
- return topVar(name).setter;
- }
-
- TopLevelVariableElement topVar(String name) {
- for (var variable in unitElement.topLevelVariables) {
- if (variable.name == name) {
- return variable;
- }
- }
- fail('Not found top-level variable: $name');
- }
-
- TypeParameterElement typeParameter(String name) {
- TypeParameterElement result;
-
- void consider(TypeParameterElement candidate) {
- if (candidate.name == name) {
- if (result != null) {
- throw new StateError('Type parameter $name is not unique.');
- }
- result = candidate;
- }
- }
-
- for (var type in unitElement.functionTypeAliases) {
- type.typeParameters.forEach(consider);
- }
- for (var type in unitElement.types) {
- type.typeParameters.forEach(consider);
- }
- if (result != null) {
- return result;
- }
- fail('Not found type parameter: $name');
- }
-}
-
-class FindNode {
- final AnalysisResult result;
-
- FindNode(this.result);
-
- LibraryDirective get libraryDirective {
- return result.unit.directives.singleWhere((d) => d is LibraryDirective);
- }
-
- AssignmentExpression assignment(String search) {
- return _node(search).getAncestor((n) => n is AssignmentExpression);
- }
-
- CascadeExpression cascade(String search) {
- return _node(search).getAncestor((n) => n is CascadeExpression);
- }
-
- ExportDirective export(String search) {
- return _node(search).getAncestor((n) => n is ExportDirective);
- }
-
- FunctionExpression functionExpression(String search) {
- return _node(search).getAncestor((n) => n is FunctionExpression);
- }
-
- GenericFunctionType genericFunctionType(String search) {
- return _node(search).getAncestor((n) => n is GenericFunctionType);
- }
-
- ImportDirective import(String search) {
- return _node(search).getAncestor((n) => n is ImportDirective);
- }
-
- InstanceCreationExpression instanceCreation(String search) {
- return _node(search).getAncestor((n) => n is InstanceCreationExpression);
- }
-
- ListLiteral listLiteral(String search) {
- return _node(search).getAncestor((n) => n is ListLiteral);
- }
-
- MapLiteral mapLiteral(String search) {
- return _node(search).getAncestor((n) => n is MapLiteral);
- }
-
- MethodInvocation methodInvocation(String search) {
- return _node(search).getAncestor((n) => n is MethodInvocation);
- }
-
- ParenthesizedExpression parenthesized(String search) {
- return _node(search).getAncestor((n) => n is ParenthesizedExpression);
- }
-
- PartDirective part(String search) {
- return _node(search).getAncestor((n) => n is PartDirective);
- }
-
- PartOfDirective partOf(String search) {
- return _node(search).getAncestor((n) => n is PartOfDirective);
- }
-
- PostfixExpression postfix(String search) {
- return _node(search).getAncestor((n) => n is PostfixExpression);
- }
-
- PrefixExpression prefix(String search) {
- return _node(search).getAncestor((n) => n is PrefixExpression);
- }
-
- PrefixedIdentifier prefixed(String search) {
- return _node(search).getAncestor((n) => n is PrefixedIdentifier);
- }
-
- RethrowExpression rethrow_(String search) {
- return _node(search).getAncestor((n) => n is RethrowExpression);
- }
-
- SimpleIdentifier simple(String search) {
- return _node(search);
- }
-
- SimpleFormalParameter simpleParameter(String search) {
- return _node(search).getAncestor((n) => n is SimpleFormalParameter);
- }
-
- StringLiteral stringLiteral(String search) {
- return _node(search).getAncestor((n) => n is StringLiteral);
- }
-
- SuperExpression super_(String search) {
- return _node(search).getAncestor((n) => n is SuperExpression);
- }
-
- ThisExpression this_(String search) {
- return _node(search).getAncestor((n) => n is ThisExpression);
- }
-
- ThrowExpression throw_(String search) {
- return _node(search).getAncestor((n) => n is ThrowExpression);
- }
-
- TypeName typeName(String search) {
- return _node(search).getAncestor((n) => n is TypeName);
- }
-
- TypeParameter typeParameter(String search) {
- return _node(search).getAncestor((n) => n is TypeParameter);
- }
-
- VariableDeclaration variableDeclaration(String search) {
- return _node(search).getAncestor((n) => n is VariableDeclaration);
- }
-
- AstNode _node(String search) {
- var content = result.content;
- var index = content.indexOf(search);
- if (content.indexOf(search, index + 1) != -1) {
- fail('The pattern |$search| is not unique in:\n$content');
- }
- expect(index, greaterThanOrEqualTo(0));
- return new NodeLocator2(index).searchWithin(result.unit);
- }
-}
diff --git a/pkg/analyzer/test/src/dart/analysis/driver_test.dart b/pkg/analyzer/test/src/dart/analysis/driver_test.dart
index b533f9b..d8db996 100644
--- a/pkg/analyzer/test/src/dart/analysis/driver_test.dart
+++ b/pkg/analyzer/test/src/dart/analysis/driver_test.dart
@@ -1365,7 +1365,7 @@
} on ArgumentError {}
}
- test_getFilesDefiningClassMemberName() async {
+ test_getFilesDefiningClassMemberName_class() async {
var a = _p('/test/bin/a.dart');
var b = _p('/test/bin/b.dart');
var c = _p('/test/bin/c.dart');
@@ -1391,6 +1391,32 @@
unorderedEquals([d]));
}
+ test_getFilesDefiningClassMemberName_mixin() async {
+ var a = _p('/test/bin/a.dart');
+ var b = _p('/test/bin/b.dart');
+ var c = _p('/test/bin/c.dart');
+ var d = _p('/test/bin/d.dart');
+
+ provider.newFile(a, 'mixin A { m1() {} }');
+ provider.newFile(b, 'mixin B { m2() {} }');
+ provider.newFile(c, 'mixin C { m2() {} }');
+ provider.newFile(d, 'mixin D { m3() {} }');
+
+ driver.addFile(a);
+ driver.addFile(b);
+ driver.addFile(c);
+ driver.addFile(d);
+
+ expect(await driver.getFilesDefiningClassMemberName('m1'),
+ unorderedEquals([a]));
+
+ expect(await driver.getFilesDefiningClassMemberName('m2'),
+ unorderedEquals([b, c]));
+
+ expect(await driver.getFilesDefiningClassMemberName('m3'),
+ unorderedEquals([d]));
+ }
+
test_getFilesReferencingName() async {
var a = _p('/test/bin/a.dart');
var b = _p('/test/bin/b.dart');
diff --git a/pkg/analyzer/test/src/dart/analysis/index_test.dart b/pkg/analyzer/test/src/dart/analysis/index_test.dart
index dbd664a..9a28fc6 100644
--- a/pkg/analyzer/test/src/dart/analysis/index_test.dart
+++ b/pkg/analyzer/test/src/dart/analysis/index_test.dart
@@ -197,6 +197,28 @@
..isReferencedAt('B; // 3', false);
}
+ test_isImplementedBy_MixinDeclaration_implementsClause() async {
+ await _indexTestUnit('''
+class A {} // 1
+mixin M implements A {} // 2
+''');
+ ClassElement elementA = findElement('A');
+ assertThat(elementA)
+ ..isImplementedAt('A {} // 2', false)
+ ..isReferencedAt('A {} // 2', false);
+ }
+
+ test_isImplementedBy_MixinDeclaration_onClause() async {
+ await _indexTestUnit('''
+class A {} // 1
+mixin M on A {} // 2
+''');
+ ClassElement elementA = findElement('A');
+ assertThat(elementA)
+ ..isImplementedAt('A {} // 2', false)
+ ..isReferencedAt('A {} // 2', false);
+ }
+
test_isInvokedBy_FieldElement() async {
await _indexTestUnit('''
class A {
@@ -338,7 +360,7 @@
..isInvokedAt('ggg(); // nq', false);
}
- test_isMixedInBy_ClassDeclaration() async {
+ test_isMixedInBy_ClassDeclaration_class() async {
await _indexTestUnit('''
class A {} // 1
class B extends Object with A {} // 2
@@ -361,7 +383,18 @@
assertThat(elementA).isMixedInAt('A {} // 2', true);
}
- test_isMixedInBy_ClassTypeAlias() async {
+ test_isMixedInBy_ClassDeclaration_mixin() async {
+ await _indexTestUnit('''
+mixin A {} // 1
+class B extends Object with A {} // 2
+''');
+ ClassElement elementA = findElement('A');
+ assertThat(elementA)
+ ..isMixedInAt('A {} // 2', false)
+ ..isReferencedAt('A {} // 2', false);
+ }
+
+ test_isMixedInBy_ClassTypeAlias_class() async {
await _indexTestUnit('''
class A {} // 1
class B = Object with A; // 2
@@ -370,6 +403,15 @@
assertThat(elementA).isMixedInAt('A; // 2', false);
}
+ test_isMixedInBy_ClassTypeAlias_mixin() async {
+ await _indexTestUnit('''
+mixin A {} // 1
+class B = Object with A; // 2
+''');
+ ClassElement elementA = findElement('A');
+ assertThat(elementA).isMixedInAt('A; // 2', false);
+ }
+
test_isReferencedBy_ClassElement() async {
await _indexTestUnit('''
class A {
diff --git a/pkg/analyzer/test/src/dart/analysis/search_test.dart b/pkg/analyzer/test/src/dart/analysis/search_test.dart
index 53e073e..cbadbb3 100644
--- a/pkg/analyzer/test/src/dart/analysis/search_test.dart
+++ b/pkg/analyzer/test/src/dart/analysis/search_test.dart
@@ -21,7 +21,6 @@
main() {
defineReflectiveSuite(() {
defineReflectiveTests(SearchTest);
- defineReflectiveTests(SearchTest_UseCFE);
});
}
@@ -74,7 +73,7 @@
CompilationUnitElement testUnitElement;
LibraryElement testLibraryElement;
- test_classMembers() async {
+ test_classMembers_class() async {
await _resolveTestUnit('''
class A {
test() {}
@@ -100,6 +99,25 @@
expect(await driver.search.classMembers('test'), isEmpty);
}
+ test_classMembers_mixin() async {
+ await _resolveTestUnit('''
+mixin A {
+ test() {}
+}
+mixin B {
+ int test = 1;
+ int testTwo = 2;
+ main() {
+ int test = 3;
+ }
+}
+''');
+ ClassElement a = _findElement('A');
+ ClassElement b = _findElement('B');
+ expect(await driver.search.classMembers('test'),
+ unorderedEquals([a.methods[0], b.fields[0]]));
+ }
+
test_declarations_class() async {
await _resolveTestUnit('''
class C {
@@ -200,6 +218,30 @@
expect(declarations, hasLength(2));
}
+ test_declarations_mixin() async {
+ await _resolveTestUnit('''
+mixin M {
+ int f;
+ int get g => 0;
+ void set s(_) {}
+ void m() {}
+}
+''');
+ var files = new LinkedHashSet<String>();
+ List<Declaration> declarations =
+ await driver.search.declarations(null, null, files);
+ _assertHasDeclaration(declarations, 'M', DeclarationKind.MIXIN,
+ offset: 6, codeOffset: 0, codeLength: 71);
+ _assertHasDeclaration(declarations, 'f', DeclarationKind.FIELD,
+ offset: 16, codeOffset: 12, codeLength: 5, mixinName: 'M');
+ _assertHasDeclaration(declarations, 'g', DeclarationKind.GETTER,
+ offset: 29, codeOffset: 21, codeLength: 15, mixinName: 'M');
+ _assertHasDeclaration(declarations, 's', DeclarationKind.SETTER,
+ offset: 48, codeOffset: 39, codeLength: 16, mixinName: 'M');
+ _assertHasDeclaration(declarations, 'm', DeclarationKind.METHOD,
+ offset: 63, codeOffset: 58, codeLength: 11, mixinName: 'M');
+ }
+
test_declarations_onlyForFile() async {
var a = _p('/test/lib/a.dart');
var b = _p('/test/lib/b.dart');
@@ -657,6 +699,19 @@
await _verifyReferences(element, expected);
}
+ test_searchReferences_ClassElement_mixin() async {
+ await _resolveTestUnit('''
+mixin A {}
+class B extends Object with A {} // with
+''');
+ ClassElement element = _findElementAtString('A {}');
+ Element b = _findElement('B');
+ var expected = [
+ _expectId(b, SearchResultKind.REFERENCE, 'A {} // with'),
+ ];
+ await _verifyReferences(element, expected);
+ }
+
test_searchReferences_CompilationUnitElement() async {
provider.newFile(_p('$testProject/foo.dart'), '');
await _resolveTestUnit('''
@@ -1643,6 +1698,22 @@
await _verifyReferences(element, expected);
}
+ test_searchSubtypes_mixinDeclaration() async {
+ await _resolveTestUnit('''
+class T {}
+mixin A on T {} // A
+mixin B implements T {} // B
+''');
+ ClassElement element = _findElement('T');
+ ClassElement a = _findElement('A');
+ ClassElement b = _findElement('B');
+ var expected = [
+ _expectId(a, SearchResultKind.REFERENCE, 'T {} // A'),
+ _expectId(b, SearchResultKind.REFERENCE, 'T {} // B'),
+ ];
+ await _verifyReferences(element, expected);
+ }
+
test_subtypes() async {
await _resolveTestUnit('''
class A {}
@@ -1844,31 +1915,38 @@
await _resolveTestUnit('''
class A {} // A
class B = Object with A;
-typedef C();
-D() {}
-var e = null;
-class NoMatchABCDE {}
+mixin C {}
+typedef D();
+e() {}
+var f = null;
+class NoMatchABCDEF {}
''');
Element a = _findElement('A');
Element b = _findElement('B');
Element c = _findElement('C');
Element d = _findElement('D');
Element e = _findElement('e');
- RegExp regExp = new RegExp(r'^[ABCDe]$');
+ Element f = _findElement('f');
+ RegExp regExp = new RegExp(r'^[ABCDef]$');
expect(await driver.search.topLevelElements(regExp),
- unorderedEquals([a, b, c, d, e]));
+ unorderedEquals([a, b, c, d, e, f]));
}
Declaration _assertHasDeclaration(
List<Declaration> declarations, String name, DeclarationKind kind,
- {int offset, int codeOffset, int codeLength, String className}) {
+ {int offset,
+ int codeOffset,
+ int codeLength,
+ String className,
+ String mixinName}) {
for (var declaration in declarations) {
if (declaration.name == name &&
declaration.kind == kind &&
(offset == null || declaration.offset == offset) &&
(codeOffset == null || declaration.codeOffset == codeOffset) &&
(codeLength == null || declaration.codeLength == codeLength) &&
- declaration.className == className) {
+ declaration.className == className &&
+ declaration.mixinName == mixinName) {
return declaration;
}
}
@@ -1977,23 +2055,3 @@
expect(matches, unorderedEquals(expectedMatches));
}
}
-
-@reflectiveTest
-class SearchTest_UseCFE extends SearchTest {
- @override
- bool get useCFE => true;
-
- @failingTest
- @override
- test_classMembers_importNotDart() => super.test_classMembers_importNotDart();
-
- @failingTest
- @override
- test_searchReferences_LabelElement() =>
- super.test_searchReferences_LabelElement();
-
- @failingTest
- @override
- test_subtypes_partWithoutLibrary() =>
- super.test_subtypes_partWithoutLibrary();
-}
diff --git a/pkg/analyzer/test/src/dart/analysis/test_all.dart b/pkg/analyzer/test/src/dart/analysis/test_all.dart
index 20acbf2..7c74b6b 100644
--- a/pkg/analyzer/test/src/dart/analysis/test_all.dart
+++ b/pkg/analyzer/test/src/dart/analysis/test_all.dart
@@ -9,8 +9,6 @@
import 'context_locator_test.dart' as context_locator;
import 'context_root_test.dart' as context_root;
import 'defined_names_test.dart' as defined_names;
-import 'driver_kernel_test.dart' as driver_kernel;
-import 'driver_resolution_kernel_test.dart' as driver_resolution_kernel;
import 'driver_resolution_test.dart' as driver_resolution;
import 'driver_test.dart' as driver;
import 'file_state_test.dart' as file_state;
@@ -30,9 +28,7 @@
context_root.main();
defined_names.main();
driver.main();
- driver_kernel.main();
driver_resolution.main();
- driver_resolution_kernel.main();
file_state.main();
index.main();
mutex.main();
diff --git a/pkg/analyzer/test/src/dart/constant/value_test.dart b/pkg/analyzer/test/src/dart/constant/value_test.dart
index 3d02cda..c0eab74 100644
--- a/pkg/analyzer/test/src/dart/constant/value_test.dart
+++ b/pkg/analyzer/test/src/dart/constant/value_test.dart
@@ -1289,6 +1289,10 @@
_assertRemainder(_intValue(1), _intValue(7), _intValue(2));
}
+ void test_remainder_knownInt_knownInt_zero() {
+ _assertRemainder(null, _intValue(7), _intValue(0));
+ }
+
void test_remainder_knownInt_knownString() {
_assertRemainder(null, _intValue(7), _stringValue("2"));
}
@@ -1325,6 +1329,10 @@
_assertShiftLeft(_intValue(48), _intValue(6), _intValue(3));
}
+ void test_shiftLeft_knownInt_knownInt_negative() {
+ _assertShiftLeft(null, _intValue(1), _intValue(-1));
+ }
+
void test_shiftLeft_knownInt_knownString() {
_assertShiftLeft(null, _intValue(6), _stringValue(null));
}
@@ -1357,6 +1365,10 @@
_assertShiftRight(_intValue(6), _intValue(48), _intValue(3));
}
+ void test_shiftRight_knownInt_knownInt_negative() {
+ _assertShiftRight(null, _intValue(1), _intValue(-1));
+ }
+
void test_shiftRight_knownInt_knownString() {
_assertShiftRight(null, _intValue(48), _stringValue(null));
}
diff --git a/pkg/analyzer/test/src/dart/element/element_test.dart b/pkg/analyzer/test/src/dart/element/element_test.dart
index 45e17dcb..15e8e7b 100644
--- a/pkg/analyzer/test/src/dart/element/element_test.dart
+++ b/pkg/analyzer/test/src/dart/element/element_test.dart
@@ -41,7 +41,6 @@
defineReflectiveTests(LibraryElementImplTest);
defineReflectiveTests(MethodElementImplTest);
defineReflectiveTests(MethodMemberTest);
- defineReflectiveTests(MultiplyDefinedElementImplTest);
defineReflectiveTests(ParameterElementImplTest);
defineReflectiveTests(PropertyAccessorElementImplTest);
defineReflectiveTests(TopLevelVariableElementImplTest);
@@ -3910,68 +3909,6 @@
}
@reflectiveTest
-class MultiplyDefinedElementImplTest extends EngineTestCase {
- void test_fromElements_conflicting() {
- TopLevelVariableElement firstElement =
- ElementFactory.topLevelVariableElement2('xx');
- TopLevelVariableElement secondElement =
- ElementFactory.topLevelVariableElement2('yy');
- _addToLibrary([firstElement, secondElement]);
- Element result = MultiplyDefinedElementImpl.fromElements(
- null, firstElement, secondElement);
- EngineTestCase.assertInstanceOf(
- (obj) => obj is MultiplyDefinedElement, MultiplyDefinedElement, result);
- List<Element> elements =
- (result as MultiplyDefinedElement).conflictingElements;
- expect(elements, hasLength(2));
- for (int i = 0; i < elements.length; i++) {
- EngineTestCase.assertInstanceOf((obj) => obj is TopLevelVariableElement,
- TopLevelVariableElement, elements[i]);
- }
- }
-
- void test_fromElements_multiple() {
- TopLevelVariableElement firstElement =
- ElementFactory.topLevelVariableElement2('xx');
- TopLevelVariableElement secondElement =
- ElementFactory.topLevelVariableElement2('yy');
- TopLevelVariableElement thirdElement =
- ElementFactory.topLevelVariableElement2('zz');
- _addToLibrary([firstElement, secondElement, thirdElement]);
- Element result = MultiplyDefinedElementImpl.fromElements(
- null,
- MultiplyDefinedElementImpl.fromElements(
- null, firstElement, secondElement),
- thirdElement);
- EngineTestCase.assertInstanceOf(
- (obj) => obj is MultiplyDefinedElement, MultiplyDefinedElement, result);
- List<Element> elements =
- (result as MultiplyDefinedElement).conflictingElements;
- expect(elements, hasLength(3));
- for (int i = 0; i < elements.length; i++) {
- EngineTestCase.assertInstanceOf((obj) => obj is TopLevelVariableElement,
- TopLevelVariableElement, elements[i]);
- }
- }
-
- void test_fromElements_nonConflicting() {
- TopLevelVariableElement element =
- ElementFactory.topLevelVariableElement2('xx');
- _addToLibrary([element]);
- expect(MultiplyDefinedElementImpl.fromElements(null, element, element),
- same(element));
- }
-
- void _addToLibrary(List<TopLevelVariableElement> variables) {
- CompilationUnitElementImpl compilationUnit =
- ElementFactory.compilationUnit('lib.dart');
- LibraryElementImpl library = ElementFactory.library(null, 'lib');
- library.definingCompilationUnit = compilationUnit;
- compilationUnit.topLevelVariables = variables;
- }
-}
-
-@reflectiveTest
class ParameterElementImplTest extends EngineTestCase {
void test_computeNode_DefaultFormalParameter() {
AnalysisContextHelper contextHelper = new AnalysisContextHelper();
diff --git a/pkg/analyzer/test/src/dart/resolution/assignment_test.dart b/pkg/analyzer/test/src/dart/resolution/assignment_test.dart
new file mode 100644
index 0000000..6316ceb
--- /dev/null
+++ b/pkg/analyzer/test/src/dart/resolution/assignment_test.dart
@@ -0,0 +1,1247 @@
+import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer/dart/element/element.dart';
+import 'package:test/test.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'driver_resolution.dart';
+import 'resolution.dart';
+import 'task_resolution.dart';
+
+main() {
+ defineReflectiveSuite(() {
+ defineReflectiveTests(AssignmentDriverResolutionTest);
+ defineReflectiveTests(AssignmentTaskResolutionTest);
+ });
+}
+
+@reflectiveTest
+class AssignmentDriverResolutionTest extends DriverResolutionTest
+ with AssignmentResolutionMixin {}
+
+abstract class AssignmentResolutionMixin implements ResolutionTest {
+ test_compound_indexExpression() async {
+ addTestFile(r'''
+main() {
+ var x = <num>[1, 2, 3];
+ x[0] += 4;
+}
+''');
+ await resolveTestFile();
+
+ AssignmentExpression assignment = findNode.assignment('+= 4');
+ assertElement(assignment, numElement.getMethod('+'));
+ assertType(assignment, 'num'); // num + int = num
+
+ IndexExpression indexed = assignment.leftHandSide;
+ assertMember(indexed, 'List<num>', listElement.getMethod('[]='));
+ assertType(indexed, 'num');
+
+ SimpleIdentifier xRef = indexed.target;
+ assertElement(xRef, findElement.localVar('x'));
+ assertType(xRef, 'List<num>');
+
+ IntegerLiteral index = indexed.index;
+ assertType(index, 'int');
+
+ Expression right = assignment.rightHandSide;
+ assertType(right, 'int');
+ }
+
+ test_compound_local() async {
+ addTestFile(r'''
+main() {
+ num v = 0;
+ v += 3;
+}
+''');
+ await resolveTestFile();
+
+ var assignment = findNode.assignment('v += 3');
+ assertElement(assignment, numElement.getMethod('+'));
+ assertType(assignment, 'num'); // num + int = num
+
+ SimpleIdentifier left = assignment.leftHandSide;
+ assertElement(left, findElement.localVar('x'));
+ assertType(left, 'num');
+
+ Expression right = assignment.rightHandSide;
+ assertType(right, 'int');
+ }
+
+ test_compound_prefixedIdentifier() async {
+ addTestFile(r'''
+main() {
+ var c = new C();
+ c.f += 2;
+}
+class C {
+ num f;
+}
+''');
+ await resolveTestFile();
+
+ var assignment = findNode.assignment('c.f += 2');
+ assertElement(assignment, numElement.getMethod('+'));
+ assertType(assignment, 'num'); // num + int = num
+
+ PrefixedIdentifier left = assignment.leftHandSide;
+ assertType(left, 'num');
+
+ var cRef = left.prefix;
+ assertElement(cRef, findElement.localVar('c'));
+ assertType(cRef, 'C');
+
+ var fRef = left.identifier;
+ assertElement(fRef, findElement.setter('f'));
+ assertType(fRef, 'num');
+
+ var right = assignment.rightHandSide;
+ assertType(right, 'int');
+ }
+
+ test_compound_propertyAccess() async {
+ addTestFile(r'''
+main() {
+ new C().f += 2;
+}
+class C {
+ num f;
+}
+''');
+ await resolveTestFile();
+
+ var assignment = findNode.assignment('f += 2');
+ assertElement(assignment, numElement.getMethod('+'));
+ assertType(assignment, 'num'); // num + int = num
+
+ PropertyAccess left = assignment.leftHandSide;
+ assertType(left, 'num');
+
+ InstanceCreationExpression creation = left.target;
+ assertElement(creation, findElement.unnamedConstructor('C'));
+ assertType(creation, 'C');
+
+ var fRef = left.propertyName;
+ assertElement(fRef, findElement.setter('f'));
+ assertType(fRef, 'num');
+
+ var right = assignment.rightHandSide;
+ assertType(right, 'int');
+ }
+
+ test_in_const_context() async {
+ addTestFile('''
+void f(num x, int y) {
+ const [x = y];
+}
+''');
+ await resolveTestFile();
+ expect(result.errors, isNotEmpty);
+
+ var xRef = findNode.simple('x =');
+ assertElement(xRef, findElement.parameter('x'));
+ assertType(xRef, 'num');
+
+ var yRef = findNode.simple('y]');
+ assertElement(yRef, findElement.parameter('y'));
+ assertType(yRef, 'int');
+ }
+
+ test_indexExpression_cascade() async {
+ addTestFile(r'''
+main() {
+ <int, double>{}..[1] = 2.0;
+}
+''');
+ await resolveTestFile();
+
+ var cascade = findNode.cascade('<int, double>');
+ assertType(cascade, 'Map<int, double>');
+
+ MapLiteral map = cascade.target;
+ assertType(map, 'Map<int, double>');
+ assertTypeName(map.typeArguments.arguments[0], intElement, 'int');
+ assertTypeName(map.typeArguments.arguments[1], doubleElement, 'double');
+
+ AssignmentExpression assignment = cascade.cascadeSections[0];
+ assertElementNull(assignment);
+ assertType(assignment, 'double');
+
+ IndexExpression indexed = assignment.leftHandSide;
+ assertMember(indexed, 'Map<int, double>', mapElement.getMethod('[]='));
+ assertType(indexed, 'double');
+ }
+
+ test_notLValue_parenthesized() async {
+ addTestFile(r'''
+int a, b;
+double c = 0.0;
+main() {
+ (a + b) = c;
+}
+''');
+ await resolveTestFile();
+ expect(result.errors, isNotEmpty);
+
+ var parenthesized = findNode.parenthesized('(a + b)');
+ assertType(parenthesized, 'int');
+
+ assertTopGetRef('a + b', 'a');
+ assertTopGetRef('b)', 'b');
+ assertTopGetRef('c;', 'c');
+
+ var assignment = findNode.assignment('= c');
+ assertElementNull(assignment);
+ assertType(assignment, 'double');
+ }
+
+ test_nullAware_local() async {
+ addTestFile(r'''
+main() {
+ String v;
+ v ??= 'test';
+}
+''');
+ await resolveTestFile();
+
+ var assignment = findNode.assignment('v ??=');
+ assertElementNull(assignment);
+ assertType(assignment, 'String');
+
+ SimpleIdentifier left = assignment.leftHandSide;
+ assertElement(left, findElement.localVar('v'));
+ assertType(left, 'String');
+
+ Expression right = assignment.rightHandSide;
+ assertType(right, 'String');
+ }
+
+ test_propertyAccess_forwardingStub() async {
+ addTestFile(r'''
+class A {
+ int f;
+}
+abstract class I<T> {
+ T f;
+}
+class B extends A implements I<int> {}
+main() {
+ new B().f = 1;
+}
+''');
+ await resolveTestFile();
+
+ var assignment = findNode.assignment('f = 1');
+ assertElementNull(assignment);
+ assertType(assignment, 'int');
+
+ PropertyAccess left = assignment.leftHandSide;
+ assertType(left, 'int');
+
+ InstanceCreationExpression creation = left.target;
+ assertElement(creation, findElement.unnamedConstructor('B'));
+ assertType(creation, 'B');
+
+ var fRef = left.propertyName;
+ assertElement(fRef, findElement.setter('f', inClass: 'A'));
+ assertType(fRef, 'int');
+
+ var right = assignment.rightHandSide;
+ assertType(right, 'int');
+ }
+
+ test_simple_indexExpression() async {
+ addTestFile(r'''
+main() {
+ var x = <int>[1, 2, 3];
+ x[0] = 4;
+}
+''');
+ await resolveTestFile();
+
+ AssignmentExpression assignment = findNode.assignment('= 4');
+ assertElementNull(assignment);
+ assertType(assignment, 'int');
+
+ IndexExpression indexed = assignment.leftHandSide;
+ assertMember(indexed, 'List<int>', listElement.getMethod('[]='));
+ assertType(indexed, 'int');
+
+ var xRef = indexed.target;
+ assertElement(xRef, findElement.localVar('x'));
+ assertType(xRef, 'List<int>');
+
+ IntegerLiteral index = indexed.index;
+ assertType(index, 'int');
+
+ Expression right = assignment.rightHandSide;
+ assertType(right, 'int');
+ }
+
+ test_simple_instanceField_unqualified() async {
+ addTestFile(r'''
+class C {
+ num f = 0;
+ foo() {
+ f = 2;
+ }
+}
+''');
+ await resolveTestFile();
+
+ var assignment = findNode.assignment('f = 2;');
+ assertElementNull(assignment);
+ assertType(assignment, 'int');
+
+ SimpleIdentifier left = assignment.leftHandSide;
+ assertElement(left, findElement.setter('f'));
+ assertType(left, 'num');
+
+ Expression right = assignment.rightHandSide;
+ assertType(right, 'int');
+ }
+
+ test_simple_local() async {
+ addTestFile(r'''
+main() {
+ num v = 0;
+ v = 2;
+}
+''');
+ await resolveTestFile();
+
+ var assignment = findNode.assignment('v = 2;');
+ assertElementNull(assignment);
+ assertType(assignment, 'int');
+
+ SimpleIdentifier left = assignment.leftHandSide;
+ assertElement(left, findElement.localVar('v'));
+ assertType(left, 'num');
+
+ Expression right = assignment.rightHandSide;
+ assertType(right, 'int');
+ }
+
+ test_simple_prefixedIdentifier() async {
+ addTestFile(r'''
+main() {
+ var c = new C();
+ c.f = 2;
+}
+class C {
+ num f;
+}
+''');
+ await resolveTestFile();
+
+ var assignment = findNode.assignment('c.f = 2');
+ assertElementNull(assignment);
+ assertType(assignment, 'int');
+
+ PrefixedIdentifier left = assignment.leftHandSide;
+ assertType(left, 'num');
+
+ var cRef = left.prefix;
+ assertElement(cRef, findElement.localVar('c'));
+ assertType(cRef, 'C');
+
+ var fRef = left.identifier;
+ assertElement(fRef, findElement.setter('f'));
+ assertType(fRef, 'num');
+
+ var right = assignment.rightHandSide;
+ assertType(right, 'int');
+ }
+
+ test_simple_prefixedIdentifier_staticField() async {
+ addTestFile(r'''
+main() {
+ C.f = 2;
+}
+class C {
+ static num f;
+}
+''');
+
+ await resolveTestFile();
+
+ var assignment = findNode.assignment('C.f = 2');
+ assertElementNull(assignment);
+ assertType(assignment, 'int');
+
+ PrefixedIdentifier left = assignment.leftHandSide;
+ assertType(left, 'num');
+
+ var cRef = left.prefix;
+ assertElement(cRef, findElement.class_('C'));
+ // TODO(scheglov) Why not `Type`? Should it even have a type?
+ assertType(cRef, 'C');
+
+ var fRef = left.identifier;
+ assertElement(fRef, findElement.setter('f'));
+ assertType(fRef, 'num');
+
+ var right = assignment.rightHandSide;
+ assertType(right, 'int');
+ }
+
+ test_simple_propertyAccess() async {
+ addTestFile(r'''
+main() {
+ new C().f = 2;
+}
+class C {
+ num f;
+}
+''');
+ await resolveTestFile();
+
+ var assignment = findNode.assignment('f = 2');
+ assertElementNull(assignment);
+ assertType(assignment, 'int');
+
+ PropertyAccess left = assignment.leftHandSide;
+ assertType(left, 'num');
+
+ InstanceCreationExpression creation = left.target;
+ assertElement(creation, findElement.unnamedConstructor('C'));
+ assertType(creation, 'C');
+
+ var fRef = left.propertyName;
+ assertElement(fRef, findElement.setter('f'));
+ assertType(fRef, 'num');
+
+ var right = assignment.rightHandSide;
+ assertType(right, 'int');
+ }
+
+ test_simple_propertyAccess_chained() async {
+ addTestFile(r'''
+main() {
+ var a = new A();
+ a.b.f = 2;
+}
+class A {
+ B b;
+}
+class B {
+ num f;
+}
+''');
+ await resolveTestFile();
+
+ var assignment = findNode.assignment('a.b.f = 2');
+ assertElementNull(assignment);
+ assertType(assignment, 'int');
+
+ PropertyAccess left = assignment.leftHandSide;
+ assertType(left, 'num');
+
+ PrefixedIdentifier ab = left.target;
+ assertType(ab, 'B');
+
+ var aRef = ab.prefix;
+ assertElement(aRef, findElement.localVar('a'));
+ assertType(aRef, 'A');
+
+ var bRef = ab.identifier;
+ assertElement(bRef, findElement.getter('b'));
+ assertType(bRef, 'B');
+
+ var fRef = left.propertyName;
+ assertElement(fRef, findElement.setter('f'));
+ assertType(fRef, 'num');
+
+ var right = assignment.rightHandSide;
+ assertType(right, 'int');
+ }
+
+ test_simple_propertyAccess_setter() async {
+ addTestFile(r'''
+main() {
+ new C().f = 2;
+}
+class C {
+ void set f(num _) {}
+}
+''');
+ await resolveTestFile();
+
+ var assignment = findNode.assignment('f = 2');
+ assertElementNull(assignment);
+ assertType(assignment, 'int');
+
+ PropertyAccess left = assignment.leftHandSide;
+ assertType(left, 'num');
+
+ InstanceCreationExpression creation = left.target;
+ assertElement(creation, findElement.unnamedConstructor('C'));
+ assertType(creation, 'C');
+
+ var fRef = left.propertyName;
+ assertElement(fRef, findElement.setter('f'));
+ assertType(fRef, 'num');
+
+ var right = assignment.rightHandSide;
+ assertType(right, 'int');
+ }
+
+ test_simple_staticField_unqualified() async {
+ addTestFile(r'''
+class C {
+ static num f = 0;
+ foo() {
+ f = 2;
+ }
+}
+''');
+ await resolveTestFile();
+
+ var assignment = findNode.assignment('f = 2');
+ assertElementNull(assignment);
+ assertType(assignment, 'int');
+
+ SimpleIdentifier left = assignment.leftHandSide;
+ assertElement(left, findElement.setter('f'));
+ assertType(left, 'num');
+
+ var right = assignment.rightHandSide;
+ assertType(right, 'int');
+ }
+
+ test_simple_topLevelVariable() async {
+ addTestFile(r'''
+main() {
+ v = 2;
+}
+num v = 0;
+''');
+ await resolveTestFile();
+
+ var assignment = findNode.assignment('v = 2');
+ assertElementNull(assignment);
+ assertType(assignment, 'int');
+
+ SimpleIdentifier left = assignment.leftHandSide;
+ assertElement(left, findElement.topSet('v'));
+ assertType(left, 'num');
+
+ var right = assignment.rightHandSide;
+ assertType(right, 'int');
+ }
+
+ test_to_class() async {
+ addTestFile('''
+class C {}
+void f(int x) {
+ C = x;
+}
+''');
+ await resolveTestFile();
+ expect(result.errors, isNotEmpty);
+
+ var cRef = findNode.simple('C =');
+ assertElement(cRef, findElement.class_('C'));
+ assertType(cRef, 'Type');
+
+ var xRef = findNode.simple('x;');
+ assertElement(xRef, findElement.parameter('x'));
+ assertType(xRef, 'int');
+ }
+
+ test_to_class_ambiguous() async {
+ newFile('/test/lib/a.dart', content: 'class C {}');
+ newFile('/test/lib/b.dart', content: 'class C {}');
+ addTestFile('''
+import 'a.dart';
+import 'b.dart';
+void f(int x) {
+ C = x;
+}
+''');
+ await resolveTestFile();
+ expect(result.errors, isNotEmpty);
+
+ var xRef = findNode.simple('x;');
+ assertElement(xRef, findElement.parameter('x'));
+ assertType(xRef, 'int');
+ }
+
+ test_to_final_parameter() async {
+ addTestFile('''
+f(final int x) {
+ x += 2;
+}
+''');
+ await resolveTestFile();
+ expect(result.errors, isNotEmpty);
+
+ var xRef = findNode.simple('x +=');
+ assertElement(xRef, findElement.parameter('x'));
+ assertType(xRef, 'int');
+ }
+
+ test_to_final_variable_local() async {
+ addTestFile('''
+main() {
+ final x = 1;
+ x += 2;
+}
+''');
+ await resolveTestFile();
+ expect(result.errors, isNotEmpty);
+
+ var xRef = findNode.simple('x +=');
+ assertElement(xRef, findElement.localVar('x'));
+ assertType(xRef, 'int');
+ }
+
+ test_to_getter_instance_direct() async {
+ addTestFile('''
+class C {
+ int get x => 0;
+}
+f(C c) {
+ c.x += 2;
+}
+''');
+ await resolveTestFile();
+ expect(result.errors, isNotEmpty);
+
+ var xRef = findNode.simple('x +=');
+ assertElement(xRef, findElement.getter('x'));
+ assertType(xRef, 'int');
+ }
+
+ test_to_getter_instance_via_implicit_this() async {
+ addTestFile('''
+class C {
+ int get x => 0;
+ f() {
+ x += 2;
+ }
+}
+''');
+ await resolveTestFile();
+ expect(result.errors, isNotEmpty);
+
+ var xRef = findNode.simple('x +=');
+ assertElement(xRef, findElement.getter('x'));
+ assertType(xRef, 'int');
+ }
+
+ test_to_getter_static_direct() async {
+ addTestFile('''
+class C {
+ static int get x => 0;
+}
+main() {
+ C.x += 2;
+}
+''');
+ await resolveTestFile();
+ expect(result.errors, isNotEmpty);
+
+ var xRef = findNode.simple('x +=');
+ assertElement(xRef, findElement.getter('x'));
+ assertType(xRef, 'int');
+ }
+
+ test_to_getter_static_via_scope() async {
+ addTestFile('''
+class C {
+ static int get x => 0;
+ f() {
+ x += 2;
+ }
+}
+''');
+ await resolveTestFile();
+ expect(result.errors, isNotEmpty);
+
+ var xRef = findNode.simple('x +=');
+ assertElement(xRef, findElement.getter('x'));
+ assertType(xRef, 'int');
+ }
+
+ test_to_getter_top_level() async {
+ addTestFile('''
+int get x => 0;
+main() {
+ x += 2;
+}
+''');
+ await resolveTestFile();
+ expect(result.errors, isNotEmpty);
+
+ var xRef = findNode.simple('x +=');
+ assertElement(xRef, findElement.topGet('x'));
+ assertType(xRef, 'int');
+ }
+
+ test_to_non_lvalue() async {
+ addTestFile('''
+void f(int x, double y, String z) {
+ x + y = z;
+}
+''');
+ await resolveTestFile();
+ expect(result.errors, isNotEmpty);
+
+ var xRef = findNode.simple('x +');
+ assertElement(xRef, findElement.parameter('x'));
+ assertType(xRef, 'int');
+
+ var yRef = findNode.simple('y =');
+ assertElement(yRef, findElement.parameter('y'));
+ assertType(yRef, 'double');
+
+ var zRef = findNode.simple('z;');
+ assertElement(zRef, findElement.parameter('z'));
+ assertType(zRef, 'String');
+ }
+
+ test_to_postfix_increment() async {
+ addTestFile('''
+void f(num x, int y) {
+ x++ = y;
+}
+''');
+ await resolveTestFile();
+ expect(result.errors, isNotEmpty);
+
+ var xRef = findNode.simple('x++');
+ assertElement(xRef, findElement.parameter('x'));
+ assertType(xRef, 'num');
+
+ var yRef = findNode.simple('y;');
+ assertElement(yRef, findElement.parameter('y'));
+ assertType(yRef, 'int');
+ }
+
+ test_to_postfix_increment_compound() async {
+ addTestFile('''
+void f(num x, int y) {
+ x++ += y;
+}
+''');
+ await resolveTestFile();
+ expect(result.errors, isNotEmpty);
+
+ var xRef = findNode.simple('x++');
+ assertElement(xRef, findElement.parameter('x'));
+ assertType(xRef, 'num');
+
+ var yRef = findNode.simple('y;');
+ assertElement(yRef, findElement.parameter('y'));
+ assertType(yRef, 'int');
+ }
+
+ test_to_postfix_increment_null_aware() async {
+ addTestFile('''
+void f(num x, int y) {
+ x++ ??= y;
+}
+''');
+ await resolveTestFile();
+ expect(result.errors, isNotEmpty);
+
+ var xRef = findNode.simple('x++');
+ assertElement(xRef, findElement.parameter('x'));
+ assertType(xRef, 'num');
+
+ var yRef = findNode.simple('y;');
+ assertElement(yRef, findElement.parameter('y'));
+ assertType(yRef, 'int');
+ }
+
+ test_to_prefix() async {
+ newFile('/test/lib/a.dart', content: '''
+var x = 0;
+''');
+ addTestFile('''
+import 'a.dart' as p;
+main() {
+ p += 2;
+}
+''');
+ await resolveTestFile();
+ expect(result.errors, isNotEmpty);
+
+ var pRef = findNode.simple('p +=');
+ assertElement(pRef, findElement.prefix('p'));
+ assertTypeDynamic(pRef);
+ }
+
+ test_to_prefix_increment() async {
+ addTestFile('''
+void f(num x, int y) {
+ ++x = y;
+}
+''');
+ await resolveTestFile();
+ expect(result.errors, isNotEmpty);
+
+ var xRef = findNode.simple('x =');
+ assertElement(xRef, findElement.parameter('x'));
+ assertType(xRef, 'num');
+
+ var yRef = findNode.simple('y;');
+ assertElement(yRef, findElement.parameter('y'));
+ assertType(yRef, 'int');
+ }
+
+ test_to_prefix_increment_compound() async {
+ addTestFile('''
+void f(num x, int y) {
+ ++x += y;
+}
+''');
+ await resolveTestFile();
+ expect(result.errors, isNotEmpty);
+
+ var xRef = findNode.simple('x +=');
+ assertElement(xRef, findElement.parameter('x'));
+ assertType(xRef, 'num');
+
+ var yRef = findNode.simple('y;');
+ assertElement(yRef, findElement.parameter('y'));
+ assertType(yRef, 'int');
+ }
+
+ test_to_prefix_increment_null_aware() async {
+ addTestFile('''
+void f(num x, int y) {
+ ++x ??= y;
+}
+''');
+ await resolveTestFile();
+ expect(result.errors, isNotEmpty);
+
+ var xRef = findNode.simple('x ??=');
+ assertElement(xRef, findElement.parameter('x'));
+ assertType(xRef, 'num');
+
+ var yRef = findNode.simple('y;');
+ assertElement(yRef, findElement.parameter('y'));
+ assertType(yRef, 'int');
+ }
+
+ test_types_local() async {
+ addTestFile(r'''
+int a;
+bool b;
+main() {
+ a = b;
+}
+''');
+ await resolveTestFile();
+ expect(result.errors, isNotEmpty);
+
+ var assignment = findNode.assignment('a = b');
+ assertElementNull(assignment);
+ assertType(assignment, 'bool');
+
+ assertIdentifierTopSetRef(assignment.leftHandSide, 'a');
+ assertIdentifierTopGetRef(assignment.rightHandSide, 'b');
+ }
+
+ test_types_top() async {
+ addTestFile(r'''
+int a = 0;
+bool b = a;
+''');
+ await resolveTestFile();
+ expect(result.errors, isNotEmpty);
+
+ var bDeclaration = findNode.variableDeclaration('b =');
+ TopLevelVariableElement bElement = bDeclaration.declaredElement;
+ assertElement(bDeclaration.name, findElement.topVar('b'));
+ assertType(bDeclaration.name, 'bool');
+ expect(bElement.type.toString(), 'bool');
+
+ SimpleIdentifier aRef = bDeclaration.initializer;
+ assertElement(aRef, findElement.topGet('a'));
+ assertType(aRef, 'int');
+ }
+
+ test_types_top_const() async {
+ addTestFile(r'''
+const int a = 0;
+const bool b = a;
+''');
+ await resolveTestFile();
+ expect(result.errors, isNotEmpty);
+
+ var bDeclaration = findNode.variableDeclaration('b =');
+ TopLevelVariableElement bElement = bDeclaration.declaredElement;
+ assertElement(bDeclaration.name, bElement);
+ assertType(bDeclaration.name, 'bool');
+ expect(bElement.type.toString(), 'bool');
+
+ SimpleIdentifier aRef = bDeclaration.initializer;
+ assertElement(aRef, findElement.topGet('a'));
+ assertType(aRef, 'int');
+ }
+
+ test_unresolved_left_identifier_compound() async {
+ addTestFile(r'''
+int b;
+main() {
+ a += b;
+}
+''');
+ await resolveTestFile();
+ expect(result.errors, isNotEmpty);
+
+ var assignment = findNode.assignment('a += b');
+ assertElementNull(assignment);
+ assertTypeDynamic(assignment);
+
+ assertElementNull(assignment.leftHandSide);
+ assertTypeDynamic(assignment.leftHandSide);
+
+ assertElement(assignment.rightHandSide, findElement.topGet('b'));
+ assertType(assignment.rightHandSide, 'int');
+ }
+
+ test_unresolved_left_identifier_simple() async {
+ addTestFile(r'''
+int b;
+main() {
+ a = b;
+}
+''');
+ await resolveTestFile();
+ expect(result.errors, isNotEmpty);
+
+ var assignment = findNode.assignment('a = b');
+ assertElementNull(assignment);
+ assertType(assignment, 'int');
+
+ assertElementNull(assignment.leftHandSide);
+ assertTypeDynamic(assignment.leftHandSide);
+
+ assertElement(assignment.rightHandSide, findElement.topGet('b'));
+ assertType(assignment.rightHandSide, 'int');
+ }
+
+ test_unresolved_left_indexed1_simple() async {
+ addTestFile(r'''
+int c;
+main() {
+ a[b] = c;
+}
+''');
+ await resolveTestFile();
+ expect(result.errors, isNotEmpty);
+
+ var assignment = findNode.assignment('a[b] = c');
+ assertElementNull(assignment);
+ assertType(assignment, 'int');
+
+ IndexExpression indexed = assignment.leftHandSide;
+ assertElementNull(indexed);
+ assertTypeDynamic(indexed);
+
+ assertElementNull(indexed.target);
+ assertTypeDynamic(indexed.target);
+
+ assertElementNull(indexed.index);
+ assertTypeDynamic(indexed.index);
+
+ assertElement(assignment.rightHandSide, findElement.topGet('c'));
+ assertType(assignment.rightHandSide, 'int');
+ }
+
+ test_unresolved_left_indexed2_simple() async {
+ addTestFile(r'''
+A a;
+int c;
+main() {
+ a[b] = c;
+}
+class A {}
+''');
+ await resolveTestFile();
+ expect(result.errors, isNotEmpty);
+
+ var assignment = findNode.assignment('a[b] = c');
+ assertElementNull(assignment);
+ assertType(assignment, 'int');
+
+ IndexExpression indexed = assignment.leftHandSide;
+ assertElementNull(indexed);
+ assertTypeDynamic(indexed);
+
+ assertElement(indexed.target, findElement.topGet('a'));
+ assertType(indexed.target, 'A');
+
+ assertElementNull(indexed.index);
+ assertTypeDynamic(indexed.index);
+
+ assertElement(assignment.rightHandSide, findElement.topGet('c'));
+ assertType(assignment.rightHandSide, 'int');
+ }
+
+ test_unresolved_left_indexed3_simple() async {
+ addTestFile(r'''
+A a;
+int c;
+main() {
+ a[b] = c;
+}
+class A {
+ operator[]=(double b) {}
+}
+''');
+ await resolveTestFile();
+ expect(result.errors, isNotEmpty);
+
+ var assignment = findNode.assignment('a[b] = c');
+ assertElementNull(assignment);
+ assertType(assignment, 'int');
+
+ IndexExpression indexed = assignment.leftHandSide;
+ assertElement(indexed, findElement.method('[]='));
+ assertTypeDynamic(indexed);
+
+ assertElement(indexed.target, findElement.topGet('a'));
+ assertType(indexed.target, 'A');
+
+ assertElementNull(indexed.index);
+ assertTypeDynamic(indexed.index);
+
+ assertElement(assignment.rightHandSide, findElement.topGet('c'));
+ assertType(assignment.rightHandSide, 'int');
+ }
+
+ test_unresolved_left_indexed4_simple() async {
+ addTestFile(r'''
+double b;
+int c;
+main() {
+ a[b] = c;
+}
+''');
+ await resolveTestFile();
+ expect(result.errors, isNotEmpty);
+
+ var assignment = findNode.assignment('a[b] = c');
+ assertElementNull(assignment);
+ assertType(assignment, 'int');
+
+ IndexExpression indexed = assignment.leftHandSide;
+ assertElementNull(indexed);
+ assertTypeDynamic(indexed);
+
+ assertElementNull(indexed.target);
+ assertTypeDynamic(indexed.target);
+
+ assertElement(indexed.index, findElement.topGet('b'));
+ assertType(indexed.index, 'double');
+
+ assertElement(assignment.rightHandSide, findElement.topGet('c'));
+ assertType(assignment.rightHandSide, 'int');
+ }
+
+ test_unresolved_left_prefixed1_simple() async {
+ addTestFile(r'''
+int c;
+main() {
+ a.b = c;
+}
+''');
+ await resolveTestFile();
+ expect(result.errors, isNotEmpty);
+
+ var assignment = findNode.assignment('a.b = c');
+ assertElementNull(assignment);
+ assertType(assignment, 'int');
+
+ PrefixedIdentifier prefixed = assignment.leftHandSide;
+ assertElementNull(prefixed);
+ assertTypeDynamic(prefixed);
+
+ assertElementNull(prefixed.prefix);
+ assertTypeDynamic(prefixed.prefix);
+
+ assertElementNull(prefixed.identifier);
+ assertTypeDynamic(prefixed.identifier);
+
+ assertElement(assignment.rightHandSide, findElement.topGet('c'));
+ assertType(assignment.rightHandSide, 'int');
+ }
+
+ test_unresolved_left_prefixed2_simple() async {
+ addTestFile(r'''
+class A {}
+A a;
+int c;
+main() {
+ a.b = c;
+}
+''');
+ await resolveTestFile();
+ expect(result.errors, isNotEmpty);
+
+ var assignment = findNode.assignment('a.b = c');
+ assertElementNull(assignment);
+ assertType(assignment, 'int');
+
+ PrefixedIdentifier prefixed = assignment.leftHandSide;
+ assertElementNull(prefixed);
+ assertTypeDynamic(prefixed);
+
+ assertElement(prefixed.prefix, findElement.topGet('a'));
+ assertType(prefixed.prefix, 'A');
+
+ assertElementNull(prefixed.identifier);
+ assertTypeDynamic(prefixed.identifier);
+
+ assertElement(assignment.rightHandSide, findElement.topGet('c'));
+ assertType(assignment.rightHandSide, 'int');
+ }
+
+ test_unresolved_left_property1_simple() async {
+ addTestFile(r'''
+int d;
+main() {
+ a.b.c = d;
+}
+''');
+ await resolveTestFile();
+ expect(result.errors, isNotEmpty);
+
+ var assignment = findNode.assignment('a.b.c = d');
+ assertElementNull(assignment);
+ assertType(assignment, 'int');
+
+ PropertyAccess access = assignment.leftHandSide;
+ assertTypeDynamic(access);
+
+ PrefixedIdentifier prefixed = access.target;
+ assertElementNull(prefixed);
+ assertTypeDynamic(prefixed);
+
+ assertElementNull(prefixed.prefix);
+ assertTypeDynamic(prefixed.prefix);
+
+ assertElementNull(prefixed.identifier);
+ assertTypeDynamic(prefixed.identifier);
+
+ assertElementNull(access.propertyName);
+ assertTypeDynamic(access.propertyName);
+
+ assertElement(assignment.rightHandSide, findElement.topGet('d'));
+ assertType(assignment.rightHandSide, 'int');
+ }
+
+ test_unresolved_left_property2_simple() async {
+ addTestFile(r'''
+A a;
+int d;
+main() {
+ a.b.c = d;
+}
+class A {}
+''');
+ await resolveTestFile();
+ expect(result.errors, isNotEmpty);
+
+ var assignment = findNode.assignment('a.b.c = d');
+ assertElementNull(assignment);
+ assertType(assignment, 'int');
+
+ PropertyAccess access = assignment.leftHandSide;
+ assertTypeDynamic(access);
+
+ PrefixedIdentifier prefixed = access.target;
+ assertElementNull(prefixed);
+ assertTypeDynamic(prefixed);
+
+ assertElement(prefixed.prefix, findElement.topGet('a'));
+ assertType(prefixed.prefix, 'A');
+
+ assertElementNull(prefixed.identifier);
+ assertTypeDynamic(prefixed.identifier);
+
+ assertElementNull(access.propertyName);
+ assertTypeDynamic(access.propertyName);
+
+ assertElement(assignment.rightHandSide, findElement.topGet('d'));
+ assertType(assignment.rightHandSide, 'int');
+ }
+
+ test_unresolved_left_property3_simple() async {
+ addTestFile(r'''
+A a;
+int d;
+main() {
+ a.b.c = d;
+}
+class A { B b; }
+class B {}
+''');
+ await resolveTestFile();
+ expect(result.errors, isNotEmpty);
+ var bElement = findElement.field('b');
+
+ var assignment = findNode.assignment('a.b.c = d');
+ assertElementNull(assignment);
+ assertType(assignment, 'int');
+
+ PropertyAccess access = assignment.leftHandSide;
+ assertTypeDynamic(access);
+
+ PrefixedIdentifier prefixed = access.target;
+ assertElement(prefixed, bElement.getter);
+ assertType(prefixed, 'B');
+
+ assertElement(prefixed.prefix, findElement.topGet('a'));
+ assertType(prefixed.prefix, 'A');
+
+ assertElement(prefixed.identifier, bElement.getter);
+ assertType(prefixed.identifier, 'B');
+
+ assertElementNull(access.propertyName);
+ assertTypeDynamic(access.propertyName);
+
+ assertElement(assignment.rightHandSide, findElement.topGet('d'));
+ assertType(assignment.rightHandSide, 'int');
+ }
+
+ test_with_synthetic_lhs() async {
+ addTestFile('''
+void f(int x) {
+ = x;
+}
+''');
+ await resolveTestFile();
+ expect(result.errors, isNotEmpty);
+
+ var xRef = findNode.simple('x;');
+ assertElement(xRef, findElement.parameter('x'));
+ assertType(xRef, 'int');
+ }
+
+ test_with_synthetic_lhs_in_method() async {
+ addTestFile('''
+class C {
+ void f(int x) {
+ = x;
+ }
+}
+''');
+ await resolveTestFile();
+ expect(result.errors, isNotEmpty);
+
+ var xRef = findNode.simple('x;');
+ assertElement(xRef, findElement.parameter('x'));
+ assertType(xRef, 'int');
+ }
+}
+
+@reflectiveTest
+class AssignmentTaskResolutionTest extends TaskResolutionTest
+ with AssignmentResolutionMixin {}
diff --git a/pkg/analyzer/test/src/dart/resolution/class_test.dart b/pkg/analyzer/test/src/dart/resolution/class_test.dart
new file mode 100644
index 0000000..166176c
--- /dev/null
+++ b/pkg/analyzer/test/src/dart/resolution/class_test.dart
@@ -0,0 +1,73 @@
+import 'package:analyzer/src/error/codes.dart';
+import 'package:test/test.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'driver_resolution.dart';
+import 'resolution.dart';
+import 'task_resolution.dart';
+
+main() {
+ defineReflectiveSuite(() {
+ defineReflectiveTests(ClassDriverResolutionTest);
+ defineReflectiveTests(ClassTaskResolutionTest);
+ });
+}
+
+@reflectiveTest
+class ClassDriverResolutionTest extends DriverResolutionTest
+ with ClassResolutionMixin {}
+
+abstract class ClassResolutionMixin implements ResolutionTest {
+ test_error_memberWithClassName_getter() async {
+ addTestFile(r'''
+class C {
+ int get C => null;
+}
+''');
+ await resolveTestFile();
+ assertTestErrors([CompileTimeErrorCode.MEMBER_WITH_CLASS_NAME]);
+ }
+
+ test_error_memberWithClassName_getter_static() async {
+ addTestFile(r'''
+class C {
+ static int get C => null;
+}
+''');
+ await resolveTestFile();
+ assertTestErrors([CompileTimeErrorCode.MEMBER_WITH_CLASS_NAME]);
+
+ var method = findNode.methodDeclaration('C =>');
+ expect(method.isGetter, isTrue);
+ expect(method.isStatic, isTrue);
+ assertElement(method, findElement.getter('C'));
+ }
+
+ test_error_memberWithClassName_setter() async {
+ addTestFile(r'''
+class C {
+ set C(_) {}
+}
+''');
+ await resolveTestFile();
+ assertTestErrors([CompileTimeErrorCode.MEMBER_WITH_CLASS_NAME]);
+ }
+
+ test_error_memberWithClassName_setter_static() async {
+ addTestFile(r'''
+class C {
+ static set C(_) {}
+}
+''');
+ await resolveTestFile();
+ assertTestErrors([CompileTimeErrorCode.MEMBER_WITH_CLASS_NAME]);
+
+ var method = findNode.methodDeclaration('C(_)');
+ expect(method.isSetter, isTrue);
+ expect(method.isStatic, isTrue);
+ }
+}
+
+@reflectiveTest
+class ClassTaskResolutionTest extends TaskResolutionTest
+ with ClassResolutionMixin {}
diff --git a/pkg/analyzer/test/src/dart/resolution/driver_resolution.dart b/pkg/analyzer/test/src/dart/resolution/driver_resolution.dart
new file mode 100644
index 0000000..9c93015
--- /dev/null
+++ b/pkg/analyzer/test/src/dart/resolution/driver_resolution.dart
@@ -0,0 +1,67 @@
+import 'dart:async';
+
+import 'package:analyzer/file_system/file_system.dart';
+import 'package:analyzer/src/dart/analysis/byte_store.dart';
+import 'package:analyzer/src/dart/analysis/driver.dart';
+import 'package:analyzer/src/dart/analysis/file_state.dart';
+import 'package:analyzer/src/dart/analysis/performance_logger.dart';
+import 'package:analyzer/src/generated/engine.dart' show AnalysisOptionsImpl;
+import 'package:analyzer/src/generated/sdk.dart';
+import 'package:analyzer/src/generated/source.dart';
+import 'package:analyzer/src/source/package_map_resolver.dart';
+import 'package:analyzer/src/test_utilities/resource_provider_mixin.dart';
+
+import '../../context/mock_sdk.dart';
+import 'resolution.dart';
+
+/// [AnalysisDriver] based implementation of [ResolutionTest].
+class DriverResolutionTest extends Object
+ with ResourceProviderMixin, ResolutionTest {
+ final ByteStore byteStore = new MemoryByteStore();
+
+ final StringBuffer logBuffer = new StringBuffer();
+ PerformanceLog logger;
+
+ DartSdk sdk;
+ AnalysisDriverScheduler scheduler;
+ AnalysisDriver driver;
+
+ @override
+ Future<TestAnalysisResult> resolveFile(String path) async {
+ AnalysisResult result = await driver.getResult(path);
+ return new TestAnalysisResult(
+ path,
+ result.content,
+ result.unit,
+ result.errors,
+ );
+ }
+
+ void setUp() {
+ sdk = new MockSdk(resourceProvider: resourceProvider);
+ logger = new PerformanceLog(logBuffer);
+ scheduler = new AnalysisDriverScheduler(logger);
+
+ Map<String, List<Folder>> packageMap = <String, List<Folder>>{
+ 'test': [getFolder('/test/lib')],
+ 'aaa': [getFolder('/aaa/lib')],
+ 'bbb': [getFolder('/bbb/lib')],
+ };
+
+ driver = new AnalysisDriver(
+ scheduler,
+ logger,
+ resourceProvider,
+ byteStore,
+ new FileContentOverlay(),
+ null,
+ new SourceFactory([
+ new DartUriResolver(sdk),
+ new PackageMapUriResolver(resourceProvider, packageMap),
+ new ResourceUriResolver(resourceProvider)
+ ], null, resourceProvider),
+ new AnalysisOptionsImpl());
+
+ scheduler.start();
+ }
+}
diff --git a/pkg/analyzer/test/src/dart/resolution/find_element.dart b/pkg/analyzer/test/src/dart/resolution/find_element.dart
new file mode 100644
index 0000000..0b1ed90
--- /dev/null
+++ b/pkg/analyzer/test/src/dart/resolution/find_element.dart
@@ -0,0 +1,267 @@
+import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer/dart/element/element.dart';
+import 'package:analyzer/dart/element/type.dart';
+import 'package:test/test.dart';
+
+import 'function_ast_visitor.dart';
+
+class FindElement {
+ final CompilationUnit unit;
+
+ FindElement(this.unit);
+
+ CompilationUnitElement get unitElement => unit.declaredElement;
+
+ ClassElement class_(String name) {
+ for (var class_ in unitElement.types) {
+ if (class_.name == name) {
+ return class_;
+ }
+ }
+ fail('Not found class: $name');
+ }
+
+ ClassElement enum_(String name) {
+ for (var enum_ in unitElement.enums) {
+ if (enum_.name == name) {
+ return enum_;
+ }
+ }
+ fail('Not found enum: $name');
+ }
+
+ ExportElement export(String targetUri) {
+ ExportElement exportElement;
+ for (var export in unitElement.library.exports) {
+ var exportedUri = export.exportedLibrary.source.uri.toString();
+ if (exportedUri == targetUri) {
+ if (exportElement != null) {
+ throw new StateError('Not unique $targetUri export.');
+ }
+ exportElement = export;
+ }
+ }
+ if (exportElement != null) {
+ return exportElement;
+ }
+ fail('Not found export: $targetUri');
+ }
+
+ FieldElement field(String name) {
+ for (var type in unitElement.mixins) {
+ for (var field in type.fields) {
+ if (field.name == name) {
+ return field;
+ }
+ }
+ }
+ for (var type in unitElement.types) {
+ for (var field in type.fields) {
+ if (field.name == name) {
+ return field;
+ }
+ }
+ }
+ fail('Not found class field: $name');
+ }
+
+ FunctionElement function(String name) {
+ for (var function in unitElement.functions) {
+ if (function.name == name) {
+ return function;
+ }
+ }
+ fail('Not found top-level function: $name');
+ }
+
+ PropertyAccessorElement getter(String name) {
+ for (var class_ in unitElement.types) {
+ for (var accessor in class_.accessors) {
+ if (accessor.isGetter && accessor.displayName == name) {
+ return accessor;
+ }
+ }
+ }
+ fail('Not found class accessor: $name');
+ }
+
+ ImportElement import(String targetUri) {
+ ImportElement importElement;
+ for (var import in unitElement.library.imports) {
+ var importedUri = import.importedLibrary.source.uri.toString();
+ if (importedUri == targetUri) {
+ if (importElement != null) {
+ throw new StateError('Not unique $targetUri import.');
+ }
+ importElement = import;
+ }
+ }
+ if (importElement != null) {
+ return importElement;
+ }
+ fail('Not found import: $targetUri');
+ }
+
+ InterfaceType interfaceType(String name) {
+ return class_(name).type;
+ }
+
+ LocalVariableElement localVar(String name) {
+ LocalVariableElement result;
+ unit.accept(new FunctionAstVisitor(
+ variableDeclaration: (node) {
+ var element = node.declaredElement;
+ if (element is LocalVariableElement) {
+ if (result != null) {
+ throw new StateError('Local variable name $name is not unique.');
+ }
+ result = element;
+ }
+ },
+ ));
+ if (result == null) {
+ fail('Not found local variable: $name');
+ }
+ return result;
+ }
+
+ MethodElement method(String name) {
+ for (var type in unitElement.types) {
+ for (var method in type.methods) {
+ if (method.name == name) {
+ return method;
+ }
+ }
+ }
+ fail('Not found class method: $name');
+ }
+
+ ClassElement mixin(String name) {
+ for (var mixin in unitElement.mixins) {
+ if (mixin.name == name) {
+ return mixin;
+ }
+ }
+ fail('Not found mixin: $name');
+ }
+
+ ParameterElement parameter(String name) {
+ ParameterElement parameterElement;
+ void considerParameter(ParameterElement parameter) {
+ if (parameter.name == name) {
+ if (parameterElement != null) {
+ throw new StateError('Parameter name $name is not unique.');
+ }
+ parameterElement = parameter;
+ }
+ }
+
+ for (var accessor in unitElement.accessors) {
+ accessor.parameters.forEach(considerParameter);
+ }
+ for (var function in unitElement.functions) {
+ function.parameters.forEach(considerParameter);
+ }
+ for (var function in unitElement.functionTypeAliases) {
+ function.parameters.forEach(considerParameter);
+ }
+ for (var class_ in unitElement.types) {
+ for (var constructor in class_.constructors) {
+ constructor.parameters.forEach(considerParameter);
+ }
+ for (var method in class_.methods) {
+ method.parameters.forEach(considerParameter);
+ }
+ }
+ if (parameterElement != null) {
+ return parameterElement;
+ }
+ fail('No parameter found with name $name');
+ }
+
+ PrefixElement prefix(String name) {
+ for (var import_ in unitElement.library.imports) {
+ var prefix = import_.prefix;
+ if (prefix != null && prefix.name == name) {
+ return prefix;
+ }
+ }
+ fail('Prefix not found: $name');
+ }
+
+ PropertyAccessorElement setter(String name, {String inClass}) {
+ PropertyAccessorElement result;
+ for (var class_ in unitElement.types) {
+ if (inClass != null && class_.name != inClass) {
+ continue;
+ }
+ for (var accessor in class_.accessors) {
+ if (accessor.isSetter && accessor.displayName == name) {
+ if (result == null) {
+ result = accessor;
+ } else {
+ throw new StateError('Class setter $name is not unique.');
+ }
+ }
+ }
+ }
+ if (result == null) {
+ fail('Not found class setter: $name');
+ }
+ return result;
+ }
+
+ FunctionElement topFunction(String name) {
+ for (var function in unitElement.functions) {
+ if (function.name == name) {
+ return function;
+ }
+ }
+ fail('Not found top-level function: $name');
+ }
+
+ PropertyAccessorElement topGet(String name) {
+ return topVar(name).getter;
+ }
+
+ PropertyAccessorElement topSet(String name) {
+ return topVar(name).setter;
+ }
+
+ TopLevelVariableElement topVar(String name) {
+ for (var variable in unitElement.topLevelVariables) {
+ if (variable.name == name) {
+ return variable;
+ }
+ }
+ fail('Not found top-level variable: $name');
+ }
+
+ TypeParameterElement typeParameter(String name) {
+ TypeParameterElement result;
+
+ void consider(TypeParameterElement candidate) {
+ if (candidate.name == name) {
+ if (result != null) {
+ throw new StateError('Type parameter $name is not unique.');
+ }
+ result = candidate;
+ }
+ }
+
+ for (var type in unitElement.functionTypeAliases) {
+ type.typeParameters.forEach(consider);
+ }
+ for (var type in unitElement.types) {
+ type.typeParameters.forEach(consider);
+ }
+ if (result != null) {
+ return result;
+ }
+ fail('Not found type parameter: $name');
+ }
+
+ ConstructorElement unnamedConstructor(String name) {
+ return class_(name).unnamedConstructor;
+ }
+}
diff --git a/pkg/analyzer/test/src/dart/resolution/find_node.dart b/pkg/analyzer/test/src/dart/resolution/find_node.dart
new file mode 100644
index 0000000..55998cc
--- /dev/null
+++ b/pkg/analyzer/test/src/dart/resolution/find_node.dart
@@ -0,0 +1,157 @@
+import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer/src/dart/ast/utilities.dart';
+import 'package:test/test.dart';
+
+class FindNode {
+ final String content;
+ final CompilationUnit unit;
+
+ FindNode(this.content, this.unit);
+
+ LibraryDirective get libraryDirective {
+ return unit.directives.singleWhere((d) => d is LibraryDirective);
+ }
+
+ Annotation annotation(String search) {
+ return _node(search, (n) => n is Annotation);
+ }
+
+ AssignmentExpression assignment(String search) {
+ return _node(search, (n) => n is AssignmentExpression);
+ }
+
+ CascadeExpression cascade(String search) {
+ return _node(search, (n) => n is CascadeExpression);
+ }
+
+ CommentReference commentReference(String search) {
+ return _node(search, (n) => n is CommentReference);
+ }
+
+ ConstructorDeclaration constructor(String search) {
+ return _node(search, (n) => n is ConstructorDeclaration);
+ }
+
+ ExportDirective export(String search) {
+ return _node(search, (n) => n is ExportDirective);
+ }
+
+ FieldFormalParameter fieldFormalParameter(String search) {
+ return _node(search, (n) => n is FieldFormalParameter);
+ }
+
+ FunctionExpression functionExpression(String search) {
+ return _node(search, (n) => n is FunctionExpression);
+ }
+
+ GenericFunctionType genericFunctionType(String search) {
+ return _node(search, (n) => n is GenericFunctionType);
+ }
+
+ ImportDirective import(String search) {
+ return _node(search, (n) => n is ImportDirective);
+ }
+
+ InstanceCreationExpression instanceCreation(String search) {
+ return _node(search, (n) => n is InstanceCreationExpression);
+ }
+
+ ListLiteral listLiteral(String search) {
+ return _node(search, (n) => n is ListLiteral);
+ }
+
+ MapLiteral mapLiteral(String search) {
+ return _node(search, (n) => n is MapLiteral);
+ }
+
+ MethodDeclaration methodDeclaration(String search) {
+ return _node(search, (n) => n is MethodDeclaration);
+ }
+
+ MethodInvocation methodInvocation(String search) {
+ return _node(search, (n) => n is MethodInvocation);
+ }
+
+ MixinDeclaration mixin(String search) {
+ return _node(search, (n) => n is MixinDeclaration);
+ }
+
+ ParenthesizedExpression parenthesized(String search) {
+ return _node(search, (n) => n is ParenthesizedExpression);
+ }
+
+ PartDirective part(String search) {
+ return _node(search, (n) => n is PartDirective);
+ }
+
+ PartOfDirective partOf(String search) {
+ return _node(search, (n) => n is PartOfDirective);
+ }
+
+ PostfixExpression postfix(String search) {
+ return _node(search, (n) => n is PostfixExpression);
+ }
+
+ PrefixExpression prefix(String search) {
+ return _node(search, (n) => n is PrefixExpression);
+ }
+
+ PrefixedIdentifier prefixed(String search) {
+ return _node(search, (n) => n is PrefixedIdentifier);
+ }
+
+ RethrowExpression rethrow_(String search) {
+ return _node(search, (n) => n is RethrowExpression);
+ }
+
+ SimpleIdentifier simple(String search) {
+ return _node(search, (_) => true);
+ }
+
+ SimpleFormalParameter simpleParameter(String search) {
+ return _node(search, (n) => n is SimpleFormalParameter);
+ }
+
+ StringLiteral stringLiteral(String search) {
+ return _node(search, (n) => n is StringLiteral);
+ }
+
+ SuperExpression super_(String search) {
+ return _node(search, (n) => n is SuperExpression);
+ }
+
+ ThisExpression this_(String search) {
+ return _node(search, (n) => n is ThisExpression);
+ }
+
+ ThrowExpression throw_(String search) {
+ return _node(search, (n) => n is ThrowExpression);
+ }
+
+ TypeName typeName(String search) {
+ return _node(search, (n) => n is TypeName);
+ }
+
+ TypeParameter typeParameter(String search) {
+ return _node(search, (n) => n is TypeParameter);
+ }
+
+ VariableDeclaration variableDeclaration(String search) {
+ return _node(search, (n) => n is VariableDeclaration);
+ }
+
+ AstNode _node(String search, bool Function(AstNode) predicate) {
+ var index = content.indexOf(search);
+ if (content.indexOf(search, index + 1) != -1) {
+ fail('The pattern |$search| is not unique in:\n$content');
+ }
+ expect(index, greaterThanOrEqualTo(0));
+
+ var node = new NodeLocator2(index).searchWithin(unit);
+ expect(node, isNotNull);
+
+ var result = node.getAncestor(predicate);
+ expect(result, isNotNull);
+ return result;
+ }
+}
diff --git a/pkg/analyzer/test/src/dart/resolution/for_in_test.dart b/pkg/analyzer/test/src/dart/resolution/for_in_test.dart
new file mode 100644
index 0000000..3062f41
--- /dev/null
+++ b/pkg/analyzer/test/src/dart/resolution/for_in_test.dart
@@ -0,0 +1,44 @@
+import 'package:test/test.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'driver_resolution.dart';
+import 'resolution.dart';
+import 'task_resolution.dart';
+
+main() {
+ defineReflectiveSuite(() {
+ defineReflectiveTests(ForInDriverResolutionTest);
+ defineReflectiveTests(ForInTaskResolutionTest);
+ });
+}
+
+@reflectiveTest
+class ForInDriverResolutionTest extends DriverResolutionTest
+ with ForInResolutionMixin {}
+
+abstract class ForInResolutionMixin implements ResolutionTest {
+ test_importPrefix_asIterable() async {
+ // TODO(scheglov) Remove this test (already tested as import prefix).
+ // TODO(scheglov) Move other for-in tests here.
+ addTestFile(r'''
+import 'dart:async' as p;
+
+main() {
+ for (var x in p) {}
+}
+''');
+ await resolveTestFile();
+ assertHasTestErrors();
+
+ var xRef = findNode.simple('x in');
+ expect(xRef.staticElement, isNotNull);
+
+ var pRef = findNode.simple('p) {}');
+ assertElement(pRef, findElement.prefix('p'));
+ assertTypeDynamic(pRef);
+ }
+}
+
+@reflectiveTest
+class ForInTaskResolutionTest extends TaskResolutionTest
+ with ForInResolutionMixin {}
diff --git a/pkg/analyzer/test/src/dart/resolution/function_ast_visitor.dart b/pkg/analyzer/test/src/dart/resolution/function_ast_visitor.dart
new file mode 100644
index 0000000..d860e9c
--- /dev/null
+++ b/pkg/analyzer/test/src/dart/resolution/function_ast_visitor.dart
@@ -0,0 +1,26 @@
+import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer/dart/ast/visitor.dart';
+
+/// [RecursiveAstVisitor] that delegates visit methods to functions.
+class FunctionAstVisitor extends RecursiveAstVisitor<void> {
+ final void Function(SimpleIdentifier) simpleIdentifier;
+ final void Function(VariableDeclaration) variableDeclaration;
+
+ FunctionAstVisitor({this.simpleIdentifier, this.variableDeclaration});
+
+ @override
+ void visitSimpleIdentifier(SimpleIdentifier node) {
+ if (simpleIdentifier != null) {
+ simpleIdentifier(node);
+ }
+ super.visitSimpleIdentifier(node);
+ }
+
+ @override
+ void visitVariableDeclaration(VariableDeclaration node) {
+ if (variableDeclaration != null) {
+ variableDeclaration(node);
+ }
+ super.visitVariableDeclaration(node);
+ }
+}
diff --git a/pkg/analyzer/test/src/dart/resolution/import_prefix_test.dart b/pkg/analyzer/test/src/dart/resolution/import_prefix_test.dart
new file mode 100644
index 0000000..ea22bc8
--- /dev/null
+++ b/pkg/analyzer/test/src/dart/resolution/import_prefix_test.dart
@@ -0,0 +1,115 @@
+import 'package:analyzer/src/error/codes.dart';
+import 'package:test/test.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'driver_resolution.dart';
+import 'resolution.dart';
+import 'task_resolution.dart';
+
+main() {
+ defineReflectiveSuite(() {
+ defineReflectiveTests(ImportPrefixDriverResolutionTest);
+ defineReflectiveTests(ImportPrefixTaskResolutionTest);
+ });
+}
+
+@reflectiveTest
+class ImportPrefixDriverResolutionTest extends DriverResolutionTest
+ with ImportPrefixResolutionMixin {}
+
+abstract class ImportPrefixResolutionMixin implements ResolutionTest {
+ test_asExpression_expressionStatement() async {
+ addTestFile(r'''
+import 'dart:async' as p;
+
+main() {
+ p; // use
+}
+''');
+ await resolveTestFile();
+ assertTestErrors([
+ CompileTimeErrorCode.PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT,
+ ]);
+
+ var pRef = findNode.simple('p; // use');
+ assertElement(pRef, findElement.prefix('p'));
+ assertTypeDynamic(pRef);
+ }
+
+ test_asExpression_forIn_iterable() async {
+ addTestFile(r'''
+import 'dart:async' as p;
+
+main() {
+ for (var x in p) {}
+}
+''');
+ await resolveTestFile();
+ assertHasTestErrors();
+
+ var xRef = findNode.simple('x in');
+ expect(xRef.staticElement, isNotNull);
+
+ var pRef = findNode.simple('p) {}');
+ assertElement(pRef, findElement.prefix('p'));
+ assertTypeDynamic(pRef);
+ }
+
+ test_asExpression_instanceCreation_argument() async {
+ addTestFile(r'''
+import 'dart:async' as p;
+
+class C<T> {
+ C(a);
+}
+
+main() {
+ var x = new C(p);
+}
+''');
+ await resolveTestFile();
+ assertTestErrors([
+ CompileTimeErrorCode.PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT,
+ ]);
+
+ var pRef = findNode.simple('p);');
+ assertElement(pRef, findElement.prefix('p'));
+ assertTypeDynamic(pRef);
+ }
+
+ test_asPrefix_methodInvocation() async {
+ addTestFile(r'''
+import 'dart:math' as p;
+
+main() {
+ p.max(0, 0);
+}
+''');
+ await resolveTestFile();
+ assertNoTestErrors();
+
+ var pRef = findNode.simple('p.max');
+ assertElement(pRef, findElement.prefix('p'));
+ assertTypeNull(pRef);
+ }
+
+ test_asPrefix_prefixedIdentifier() async {
+ addTestFile(r'''
+import 'dart:async' as p;
+
+main() {
+ p.Future;
+}
+''');
+ await resolveTestFile();
+ assertNoTestErrors();
+
+ var pRef = findNode.simple('p.Future');
+ assertElement(pRef, findElement.prefix('p'));
+ assertTypeNull(pRef);
+ }
+}
+
+@reflectiveTest
+class ImportPrefixTaskResolutionTest extends TaskResolutionTest
+ with ImportPrefixResolutionMixin {}
diff --git a/pkg/analyzer/test/src/dart/resolution/mixin_test.dart b/pkg/analyzer/test/src/dart/resolution/mixin_test.dart
new file mode 100644
index 0000000..2440c6a
--- /dev/null
+++ b/pkg/analyzer/test/src/dart/resolution/mixin_test.dart
@@ -0,0 +1,684 @@
+import 'package:analyzer/dart/element/element.dart';
+import 'package:analyzer/src/error/codes.dart';
+import 'package:test/test.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'driver_resolution.dart';
+import 'resolution.dart';
+import 'task_resolution.dart';
+
+main() {
+ defineReflectiveSuite(() {
+ defineReflectiveTests(MixinDriverResolutionTest);
+ defineReflectiveTests(MixinTaskResolutionTest);
+ });
+}
+
+@reflectiveTest
+class MixinDriverResolutionTest extends DriverResolutionTest
+ with MixinResolutionMixin {}
+
+abstract class MixinResolutionMixin implements ResolutionTest {
+ test_accessor_getter() async {
+ addTestFile(r'''
+mixin M {
+ int get g => 0;
+}
+''');
+ await resolveTestFile();
+ assertNoTestErrors();
+
+ var element = findElement.mixin('M');
+
+ var accessors = element.accessors;
+ expect(accessors, hasLength(1));
+
+ var gElement = accessors[0];
+ assertElementName(gElement, 'g', offset: 20);
+
+ var gNode = findNode.methodDeclaration('g =>');
+ assertElement(gNode.name, gElement);
+
+ var fields = element.fields;
+ expect(fields, hasLength(1));
+ assertElementName(fields[0], 'g', isSynthetic: true);
+ }
+
+ test_accessor_method() async {
+ addTestFile(r'''
+mixin M {
+ void foo() {}
+}
+''');
+ await resolveTestFile();
+ assertNoTestErrors();
+
+ var element = findElement.mixin('M');
+
+ var methods = element.methods;
+ expect(methods, hasLength(1));
+
+ var fooElement = methods[0];
+ assertElementName(fooElement, 'foo', offset: 17);
+
+ var fooNode = findNode.methodDeclaration('foo()');
+ assertElement(fooNode.name, fooElement);
+ }
+
+ test_accessor_setter() async {
+ addTestFile(r'''
+mixin M {
+ void set s(int _) {}
+}
+''');
+ await resolveTestFile();
+ assertNoTestErrors();
+
+ var element = findElement.mixin('M');
+
+ var accessors = element.accessors;
+ expect(accessors, hasLength(1));
+
+ var sElement = accessors[0];
+ assertElementName(sElement, 's=', offset: 21);
+
+ var gNode = findNode.methodDeclaration('s(int _)');
+ assertElement(gNode.name, sElement);
+
+ var fields = element.fields;
+ expect(fields, hasLength(1));
+ assertElementName(fields[0], 's', isSynthetic: true);
+ }
+
+ test_classDeclaration_with() async {
+ addTestFile(r'''
+mixin M {}
+class A extends Object with M {} // A
+''');
+ await resolveTestFile();
+ assertNoTestErrors();
+
+ var mElement = findElement.mixin('M');
+
+ var aElement = findElement.class_('A');
+ assertElementTypes(aElement.mixins, [mElement.type]);
+
+ var mRef = findNode.typeName('M {} // A');
+ assertTypeName(mRef, mElement, 'M');
+ }
+
+ test_classTypeAlias_with() async {
+ addTestFile(r'''
+mixin M {}
+class A = Object with M;
+''');
+ await resolveTestFile();
+ assertNoTestErrors();
+
+ var mElement = findElement.mixin('M');
+
+ var aElement = findElement.class_('A');
+ assertElementTypes(aElement.mixins, [mElement.type]);
+
+ var mRef = findNode.typeName('M;');
+ assertTypeName(mRef, mElement, 'M');
+ }
+
+ test_commentReference() async {
+ addTestFile(r'''
+const a = 0;
+
+/// Reference [a] in documentation.
+mixin M {}
+''');
+ await resolveTestFile();
+ assertNoTestErrors();
+
+ var aRef = findNode.commentReference('a]').identifier;
+ assertElement(aRef, findElement.topGet('a'));
+ assertTypeNull(aRef);
+ }
+
+ test_element() async {
+ addTestFile(r'''
+mixin M {}
+''');
+ await resolveTestFile();
+ assertNoTestErrors();
+
+ var mixin = findNode.mixin('mixin M');
+ var element = findElement.mixin('M');
+ assertElement(mixin, element);
+
+ expect(element.typeParameters, isEmpty);
+ assertElementTypes(element.superclassConstraints, [objectType]);
+ }
+
+ test_error_conflictingTypeVariableAndClass() async {
+ addTestFile(r'''
+mixin M<M> {}
+''');
+ await resolveTestFile();
+ assertTestErrors([
+ CompileTimeErrorCode.CONFLICTING_TYPE_VARIABLE_AND_CLASS,
+ ]);
+ }
+
+ test_error_conflictingTypeVariableAndMember_field() async {
+ addTestFile(r'''
+mixin M<T> {
+ var T;
+}
+''');
+ await resolveTestFile();
+ assertTestErrors([
+ CompileTimeErrorCode.CONFLICTING_TYPE_VARIABLE_AND_MEMBER,
+ ]);
+ }
+
+ test_error_conflictingTypeVariableAndMember_getter() async {
+ addTestFile(r'''
+mixin M<T> {
+ get T => null;
+}
+''');
+ await resolveTestFile();
+ assertTestErrors([
+ CompileTimeErrorCode.CONFLICTING_TYPE_VARIABLE_AND_MEMBER,
+ ]);
+ }
+
+ test_error_conflictingTypeVariableAndMember_method() async {
+ addTestFile(r'''
+mixin M<T> {
+ T() {}
+}
+''');
+ await resolveTestFile();
+ assertTestErrors([
+ CompileTimeErrorCode.CONFLICTING_TYPE_VARIABLE_AND_MEMBER,
+ ]);
+ }
+
+ test_error_conflictingTypeVariableAndMember_method_static() async {
+ addTestFile(r'''
+mixin M<T> {
+ static T() {}
+}
+''');
+ await resolveTestFile();
+ assertTestErrors([
+ CompileTimeErrorCode.CONFLICTING_TYPE_VARIABLE_AND_MEMBER,
+ ]);
+ }
+
+ test_error_conflictingTypeVariableAndMember_setter() async {
+ addTestFile(r'''
+mixin M<T> {
+ void set T(_) {}
+}
+''');
+ await resolveTestFile();
+ assertTestErrors([
+ CompileTimeErrorCode.CONFLICTING_TYPE_VARIABLE_AND_MEMBER,
+ ]);
+ }
+
+ test_error_duplicateDefinition_field() async {
+ addTestFile(r'''
+mixin M {
+ int t;
+ int t;
+}
+''');
+ await resolveTestFile();
+ assertTestErrors([CompileTimeErrorCode.DUPLICATE_DEFINITION]);
+ }
+
+ test_error_duplicateDefinition_field_method() async {
+ addTestFile(r'''
+mixin M {
+ int t;
+ void t() {}
+}
+''');
+ await resolveTestFile();
+ assertTestErrors([CompileTimeErrorCode.DUPLICATE_DEFINITION]);
+ }
+
+ test_error_duplicateDefinition_getter() async {
+ addTestFile(r'''
+mixin M {
+ int get t => 0;
+ int get t => 0;
+}
+''');
+ await resolveTestFile();
+ assertTestErrors([CompileTimeErrorCode.DUPLICATE_DEFINITION]);
+ }
+
+ test_error_duplicateDefinition_method() async {
+ addTestFile(r'''
+mixin M {
+ void t() {}
+ void t() {}
+}
+''');
+ await resolveTestFile();
+ assertTestErrors([CompileTimeErrorCode.DUPLICATE_DEFINITION]);
+ }
+
+ test_error_duplicateDefinition_setter() async {
+ addTestFile(r'''
+mixin M {
+ void set t(_) {}
+ void set t(_) {}
+}
+''');
+ await resolveTestFile();
+ assertTestErrors([CompileTimeErrorCode.DUPLICATE_DEFINITION]);
+ }
+
+ test_error_finalNotInitialized() async {
+ addTestFile(r'''
+mixin M {
+ final int f;
+}
+''');
+ await resolveTestFile();
+ assertTestErrors([StaticWarningCode.FINAL_NOT_INITIALIZED]);
+ }
+
+ test_error_finalNotInitialized_OK() async {
+ addTestFile(r'''
+mixin M {
+ final int f = 0;
+}
+''');
+ await resolveTestFile();
+ assertNoTestErrors();
+ }
+
+ test_error_finalNotInitializedConstructor() async {
+ addTestFile(r'''
+mixin M {
+ final int f;
+ M();
+}
+''');
+ await resolveTestFile();
+ assertTestErrors([
+ CompileTimeErrorCode.MIXIN_DECLARES_CONSTRUCTOR,
+ StaticWarningCode.FINAL_NOT_INITIALIZED_CONSTRUCTOR_1,
+ ]);
+ }
+
+ test_error_finalNotInitializedConstructor_OK() async {
+ addTestFile(r'''
+mixin M {
+ final int f;
+ M(this.f);
+}
+''');
+ await resolveTestFile();
+ assertTestErrors([CompileTimeErrorCode.MIXIN_DECLARES_CONSTRUCTOR]);
+
+ var element = findElement.mixin('M');
+ var constructorElement = element.constructors.single;
+
+ var fpNode = findNode.fieldFormalParameter('f);');
+ assertElement(fpNode.identifier, constructorElement.parameters[0]);
+
+ FieldFormalParameterElement fpElement = fpNode.declaredElement;
+ expect(fpElement.field, same(findElement.field('f')));
+ }
+
+ test_error_getterAndMethodWithSameName() async {
+ addTestFile(r'''
+mixin M {
+ void t() {}
+ int get t => 0;
+}
+''');
+ await resolveTestFile();
+ assertTestErrors([CompileTimeErrorCode.GETTER_AND_METHOD_WITH_SAME_NAME]);
+ }
+
+ test_error_implementsClause_deferredClass() async {
+ addTestFile(r'''
+import 'dart:math' deferred as math;
+mixin M implements math.Random {}
+''');
+ await resolveTestFile();
+ var mathImport = findElement.import('dart:math');
+ var randomElement = mathImport.importedLibrary.getType('Random');
+
+ assertTestErrors([
+ CompileTimeErrorCode.IMPLEMENTS_DEFERRED_CLASS,
+ ]);
+
+ var element = findElement.mixin('M');
+ assertElementTypes(element.interfaces, [randomElement.type]);
+
+ var typeRef = findNode.typeName('Random {}');
+ assertTypeName(typeRef, randomElement, 'Random',
+ expectedPrefix: mathImport.prefix);
+ }
+
+ test_error_implementsClause_disallowedClass_int() async {
+ addTestFile(r'''
+mixin M implements int {}
+''');
+ await resolveTestFile();
+
+ assertTestErrors([
+ CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS,
+ ]);
+
+ var element = findElement.mixin('M');
+ assertElementTypes(element.interfaces, [intType]);
+
+ var typeRef = findNode.typeName('int {}');
+ assertTypeName(typeRef, intElement, 'int');
+ }
+
+ test_error_implementsClause_nonClass_void() async {
+ addTestFile(r'''
+mixin M implements void {}
+''');
+ await resolveTestFile();
+
+ assertTestErrors([
+ CompileTimeErrorCode.IMPLEMENTS_NON_CLASS,
+ ]);
+
+ var element = findElement.mixin('M');
+ assertElementTypes(element.interfaces, []);
+
+ var typeRef = findNode.typeName('void {}');
+ assertTypeName(typeRef, null, 'void');
+ }
+
+ test_error_memberWithClassName_getter() async {
+ addTestFile(r'''
+mixin M {
+ int get M => 0;
+}
+''');
+ await resolveTestFile();
+ assertTestErrors([CompileTimeErrorCode.MEMBER_WITH_CLASS_NAME]);
+ }
+
+ test_error_memberWithClassName_getter_static() async {
+ addTestFile(r'''
+mixin M {
+ static int get M => 0;
+}
+''');
+ await resolveTestFile();
+ assertTestErrors([CompileTimeErrorCode.MEMBER_WITH_CLASS_NAME]);
+ }
+
+ test_error_memberWithClassName_setter() async {
+ addTestFile(r'''
+mixin M {
+ void set M(_) {}
+}
+''');
+ await resolveTestFile();
+ assertTestErrors([CompileTimeErrorCode.MEMBER_WITH_CLASS_NAME]);
+ }
+
+ test_error_memberWithClassName_setter_static() async {
+ addTestFile(r'''
+mixin M {
+ static void set M(_) {}
+}
+''');
+ await resolveTestFile();
+ assertTestErrors([CompileTimeErrorCode.MEMBER_WITH_CLASS_NAME]);
+ }
+
+ test_error_methodAndGetterWithSameName() async {
+ addTestFile(r'''
+mixin M {
+ int get t => 0;
+ void t() {}
+}
+''');
+ await resolveTestFile();
+ assertTestErrors([CompileTimeErrorCode.METHOD_AND_GETTER_WITH_SAME_NAME]);
+ }
+
+ test_error_mixinDeclaresConstructor() async {
+ addTestFile(r'''
+mixin M {
+ M(int a) {
+ a; // read
+ }
+}
+''');
+ await resolveTestFile();
+ assertTestErrors([CompileTimeErrorCode.MIXIN_DECLARES_CONSTRUCTOR]);
+
+ // Even though it is an error for a mixin to declare a constructor,
+ // we still build elements for constructors, and resolve them.
+
+ var element = findElement.mixin('M');
+ var constructors = element.constructors;
+ expect(constructors, hasLength(1));
+ var constructorElement = constructors[0];
+
+ var constructorNode = findNode.constructor('M(int a)');
+ assertElement(constructorNode, constructorElement);
+
+ var aElement = constructorElement.parameters[0];
+ var aNode = constructorNode.parameters.parameters[0];
+ assertElement(aNode, aElement);
+
+ var aRef = findNode.simple('a; // read');
+ assertElement(aRef, aElement);
+ assertType(aRef, 'int');
+ }
+
+ test_error_onClause_deferredClass() async {
+ addTestFile(r'''
+import 'dart:math' deferred as math;
+mixin M on math.Random {}
+''');
+ await resolveTestFile();
+ var mathImport = findElement.import('dart:math');
+ var randomElement = mathImport.importedLibrary.getType('Random');
+
+ assertTestErrors([
+ CompileTimeErrorCode.MIXIN_SUPER_CLASS_CONSTRAINT_DEFERRED_CLASS,
+ ]);
+
+ var element = findElement.mixin('M');
+ assertElementTypes(element.superclassConstraints, [randomElement.type]);
+
+ var typeRef = findNode.typeName('Random {}');
+ assertTypeName(typeRef, randomElement, 'Random',
+ expectedPrefix: mathImport.prefix);
+ }
+
+ test_error_onClause_disallowedClass_int() async {
+ addTestFile(r'''
+mixin M on int {}
+''');
+ await resolveTestFile();
+
+ assertTestErrors([
+ CompileTimeErrorCode.MIXIN_SUPER_CLASS_CONSTRAINT_DISALLOWED_CLASS,
+ ]);
+
+ var element = findElement.mixin('M');
+ assertElementTypes(element.superclassConstraints, [intType]);
+
+ var typeRef = findNode.typeName('int {}');
+ assertTypeName(typeRef, intElement, 'int');
+ }
+
+ test_error_onClause_nonClass_dynamic() async {
+ addTestFile(r'''
+mixin M on dynamic {}
+''');
+ await resolveTestFile();
+
+ assertTestErrors([
+ CompileTimeErrorCode.MIXIN_SUPER_CLASS_CONSTRAINT_NON_CLASS,
+ ]);
+
+ var element = findElement.mixin('M');
+ assertElementTypes(element.superclassConstraints, [objectType]);
+
+ var typeRef = findNode.typeName('dynamic {}');
+ assertTypeName(typeRef, dynamicElement, 'dynamic');
+ }
+
+ test_error_onClause_nonClass_enum() async {
+ addTestFile(r'''
+enum E {E1, E2, E3}
+mixin M on E {}
+''');
+ await resolveTestFile();
+
+ assertTestErrors([
+ CompileTimeErrorCode.MIXIN_SUPER_CLASS_CONSTRAINT_NON_CLASS,
+ ]);
+
+ var element = findElement.mixin('M');
+ assertElementTypes(element.superclassConstraints, [objectType]);
+
+ var typeRef = findNode.typeName('E {}');
+ assertTypeName(typeRef, findElement.enum_('E'), 'E');
+ }
+
+ test_error_onClause_nonClass_void() async {
+ addTestFile(r'''
+mixin M on void {}
+''');
+ await resolveTestFile();
+
+ assertTestErrors([
+ CompileTimeErrorCode.MIXIN_SUPER_CLASS_CONSTRAINT_NON_CLASS,
+ ]);
+
+ var element = findElement.mixin('M');
+ assertElementTypes(element.superclassConstraints, [objectType]);
+
+ var typeRef = findNode.typeName('void {}');
+ assertTypeName(typeRef, null, 'void');
+ }
+
+ test_field() async {
+ addTestFile(r'''
+mixin M<T> {
+ T f;
+}
+''');
+ await resolveTestFile();
+ assertNoTestErrors();
+
+ var element = findElement.mixin('M');
+
+ var typeParameters = element.typeParameters;
+ expect(typeParameters, hasLength(1));
+
+ var tElement = typeParameters.single;
+ assertElementName(tElement, 'T', offset: 8);
+ assertEnclosingElement(tElement, element);
+
+ var tNode = findNode.typeParameter('T> {');
+ assertElement(tNode.name, tElement);
+
+ var fields = element.fields;
+ expect(fields, hasLength(1));
+
+ var fElement = fields[0];
+ assertElementName(fElement, 'f', offset: 17);
+ assertEnclosingElement(fElement, element);
+
+ var fNode = findNode.variableDeclaration('f;');
+ assertElement(fNode.name, fElement);
+
+ assertTypeName(findNode.typeName('T f'), tElement, 'T');
+
+ var accessors = element.accessors;
+ expect(accessors, hasLength(2));
+ assertElementName(accessors[0], 'f', isSynthetic: true);
+ assertElementName(accessors[1], 'f=', isSynthetic: true);
+ }
+
+ test_implementsClause() async {
+ addTestFile(r'''
+class A {}
+class B {}
+
+mixin M implements A, B {} // M
+''');
+ await resolveTestFile();
+ assertNoTestErrors();
+
+ var element = findElement.mixin('M');
+ assertElementTypes(element.interfaces, [
+ findElement.interfaceType('A'),
+ findElement.interfaceType('B'),
+ ]);
+
+ var aRef = findNode.typeName('A, ');
+ assertTypeName(aRef, findElement.class_('A'), 'A');
+
+ var bRef = findNode.typeName('B {} // M');
+ assertTypeName(bRef, findElement.class_('B'), 'B');
+ }
+
+ test_metadata() async {
+ addTestFile(r'''
+const a = 0;
+
+@a
+mixin M {}
+''');
+ await resolveTestFile();
+ assertNoTestErrors();
+
+ var a = findElement.topGet('a');
+ var element = findElement.mixin('M');
+
+ var metadata = element.metadata;
+ expect(metadata, hasLength(1));
+ expect(metadata[0].element, same(a));
+
+ var annotation = findNode.annotation('@a');
+ assertElement(annotation, a);
+ expect(annotation.elementAnnotation, same(metadata[0]));
+ }
+
+ test_onClause() async {
+ addTestFile(r'''
+class A {}
+class B {}
+
+mixin M on A, B {} // M
+''');
+ await resolveTestFile();
+ assertNoTestErrors();
+
+ var element = findElement.mixin('M');
+ assertElementTypes(element.superclassConstraints, [
+ findElement.interfaceType('A'),
+ findElement.interfaceType('B'),
+ ]);
+
+ var aRef = findNode.typeName('A, ');
+ assertTypeName(aRef, findElement.class_('A'), 'A');
+
+ var bRef = findNode.typeName('B {} // M');
+ assertTypeName(bRef, findElement.class_('B'), 'B');
+ }
+}
+
+@reflectiveTest
+class MixinTaskResolutionTest extends TaskResolutionTest
+ with MixinResolutionMixin {}
diff --git a/pkg/analyzer/test/src/dart/resolution/resolution.dart b/pkg/analyzer/test/src/dart/resolution/resolution.dart
new file mode 100644
index 0000000..eacf271
--- /dev/null
+++ b/pkg/analyzer/test/src/dart/resolution/resolution.dart
@@ -0,0 +1,236 @@
+import 'dart:async';
+
+import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer/dart/element/element.dart';
+import 'package:analyzer/dart/element/type.dart';
+import 'package:analyzer/error/error.dart';
+import 'package:analyzer/src/dart/element/member.dart';
+import 'package:analyzer/src/dart/element/type.dart';
+import 'package:analyzer/src/dart/error/hint_codes.dart';
+import 'package:analyzer/src/generated/resolver.dart' show TypeProvider;
+import 'package:analyzer/src/test_utilities/resource_provider_mixin.dart';
+import 'package:test/test.dart';
+
+import '../../../generated/test_support.dart';
+import 'find_element.dart';
+import 'find_node.dart';
+
+final isBottomType = new TypeMatcher<BottomTypeImpl>();
+
+final isDynamicType = new TypeMatcher<DynamicTypeImpl>();
+
+final isUndefinedType = new TypeMatcher<UndefinedTypeImpl>();
+
+final isVoidType = new TypeMatcher<VoidTypeImpl>();
+
+/// Base for resolution tests.
+abstract class ResolutionTest implements ResourceProviderMixin {
+ TestAnalysisResult result;
+ FindNode findNode;
+ FindElement findElement;
+
+ ClassElement get doubleElement => typeProvider.doubleType.element;
+
+ InterfaceType get doubleType => typeProvider.doubleType;
+
+ Element get dynamicElement => typeProvider.dynamicType.element;
+
+ ClassElement get intElement => typeProvider.intType.element;
+
+ InterfaceType get intType => typeProvider.intType;
+
+ ClassElement get listElement => typeProvider.listType.element;
+
+ ClassElement get mapElement => typeProvider.mapType.element;
+
+ ClassElement get numElement => typeProvider.numType.element;
+
+ InterfaceType get objectType => typeProvider.objectType;
+
+ TypeProvider get typeProvider =>
+ result.unit.declaredElement.context.typeProvider;
+
+ void addTestFile(String content) {
+ newFile('/test/lib/test.dart', content: content);
+ }
+
+ void assertElement(AstNode node, Element expected) {
+ Element actual = getNodeElement(node);
+ expect(actual, same(expected));
+ }
+
+ void assertElementName(Element element, String name,
+ {bool isSynthetic = false, int offset}) {
+ expect(element.name, name);
+ expect(element.isSynthetic, isSynthetic);
+ if (offset != null) {
+ expect(element.nameOffset, offset);
+ }
+ }
+
+ void assertElementNull(Expression node) {
+ Element actual = getNodeElement(node);
+ expect(actual, isNull);
+ }
+
+ void assertElementType(DartType type, DartType expected) {
+ expect(type, expected);
+ }
+
+ void assertElementTypes(List<DartType> types, List<DartType> expected) {
+ expect(types, hasLength(expected.length));
+ for (var i = 0; i < types.length; ++i) {
+ assertElementType(types[i], expected[i]);
+ }
+ }
+
+ void assertEnclosingElement(Element element, Element expectedEnclosing) {
+ expect(element.enclosingElement, expectedEnclosing);
+ }
+
+ /**
+ * Assert that the number of error codes in reported [errors] matches the
+ * number of [expected] error codes. The order of errors is ignored.
+ */
+ void assertErrors(List<AnalysisError> errors,
+ [List<ErrorCode> expected = const <ErrorCode>[]]) {
+ var errorListener = new GatheringErrorListener();
+ for (AnalysisError error in result.errors) {
+ ErrorCode errorCode = error.errorCode;
+ if (errorCode == HintCode.UNUSED_CATCH_CLAUSE ||
+ errorCode == HintCode.UNUSED_CATCH_STACK ||
+ errorCode == HintCode.UNUSED_ELEMENT ||
+ errorCode == HintCode.UNUSED_FIELD ||
+ errorCode == HintCode.UNUSED_LOCAL_VARIABLE) {
+ continue;
+ }
+ errorListener.onError(error);
+ }
+ errorListener.assertErrorsWithCodes(expected);
+ }
+
+ void assertHasTestErrors() {
+ expect(result.errors, isNotEmpty);
+ }
+
+ void assertIdentifierTopGetRef(SimpleIdentifier ref, String name) {
+ var getter = findElement.topGet(name);
+ assertElement(ref, getter);
+
+ var type = getter.returnType.toString();
+ assertType(ref, type);
+ }
+
+ void assertIdentifierTopSetRef(SimpleIdentifier ref, String name) {
+ var setter = findElement.topSet(name);
+ assertElement(ref, setter);
+
+ var type = setter.parameters[0].type.toString();
+ assertType(ref, type);
+ }
+
+ void assertMember(
+ Expression node, String expectedDefiningType, Element expectedBase) {
+ Member actual = getNodeElement(node);
+ expect(actual.definingType.toString(), expectedDefiningType);
+ expect(actual.baseElement, same(expectedBase));
+ }
+
+ void assertNoTestErrors() {
+ expect(result.errors, isEmpty);
+ }
+
+ void assertTestErrors(List<ErrorCode> expected) {
+ assertErrors(result.errors, expected);
+ }
+
+ void assertTopGetRef(String search, String name) {
+ var ref = findNode.simple(search);
+ assertIdentifierTopGetRef(ref, name);
+ }
+
+ void assertType(AstNode node, String expected) {
+ DartType actual;
+ if (node is Expression) {
+ actual = node.staticType;
+ } else if (node is GenericFunctionType) {
+ actual = node.type;
+ } else if (node is TypeName) {
+ actual = node.type;
+ } else {
+ fail('Unsupported node: (${node.runtimeType}) $node');
+ }
+ expect(actual?.toString(), expected);
+ }
+
+ void assertTypeDynamic(Expression expression) {
+ DartType actual = expression.staticType;
+ expect(actual, isDynamicType);
+ }
+
+ void assertTypeName(
+ TypeName node, Element expectedElement, String expectedType,
+ {PrefixElement expectedPrefix}) {
+ assertType(node, expectedType);
+
+ if (expectedPrefix == null) {
+ var name = node.name as SimpleIdentifier;
+ assertElement(name, expectedElement);
+ assertType(name, expectedType);
+ } else {
+ var name = node.name as PrefixedIdentifier;
+
+ assertElement(name.prefix, expectedPrefix);
+ expect(name.prefix.staticType, isNull);
+
+ assertElement(name.identifier, expectedElement);
+ expect(name.identifier.staticType, isNull);
+ }
+ }
+
+ void assertTypeNull(Expression node) {
+ expect(node.staticType, isNull);
+ }
+
+ Element getNodeElement(AstNode node) {
+ if (node is Annotation) {
+ return node.element;
+ } else if (node is AssignmentExpression) {
+ return node.staticElement;
+ } else if (node is Declaration) {
+ return node.declaredElement;
+ } else if (node is FormalParameter) {
+ return node.declaredElement;
+ } else if (node is Identifier) {
+ return node.staticElement;
+ } else if (node is IndexExpression) {
+ return node.staticElement;
+ } else if (node is InstanceCreationExpression) {
+ return node.staticElement;
+ } else if (node is PostfixExpression) {
+ return node.staticElement;
+ } else if (node is PrefixExpression) {
+ return node.staticElement;
+ } else {
+ fail('Unsupported node: (${node.runtimeType}) $node');
+ }
+ }
+
+ Future<TestAnalysisResult> resolveFile(String path);
+
+ Future<void> resolveTestFile() async {
+ var path = convertPath('/test/lib/test.dart');
+ result = await resolveFile(path);
+ findNode = new FindNode(result.content, result.unit);
+ findElement = new FindElement(result.unit);
+ }
+}
+
+class TestAnalysisResult {
+ final String path;
+ final String content;
+ final CompilationUnit unit;
+ final List<AnalysisError> errors;
+
+ TestAnalysisResult(this.path, this.content, this.unit, this.errors);
+}
diff --git a/pkg/analyzer/test/src/dart/resolution/task_resolution.dart b/pkg/analyzer/test/src/dart/resolution/task_resolution.dart
new file mode 100644
index 0000000..4d8448e
--- /dev/null
+++ b/pkg/analyzer/test/src/dart/resolution/task_resolution.dart
@@ -0,0 +1,53 @@
+import 'dart:async';
+
+import 'package:analyzer/file_system/file_system.dart';
+import 'package:analyzer/src/generated/engine.dart';
+import 'package:analyzer/src/generated/sdk.dart';
+import 'package:analyzer/src/generated/source.dart';
+import 'package:analyzer/src/source/package_map_resolver.dart';
+import 'package:analyzer/src/test_utilities/resource_provider_mixin.dart';
+
+import '../../../generated/analysis_context_factory.dart';
+import '../../context/mock_sdk.dart';
+import 'resolution.dart';
+
+/// Task model based implementation of [ResolutionTest].
+class TaskResolutionTest extends Object
+ with ResourceProviderMixin, ResolutionTest {
+ DartSdk sdk;
+
+ SourceFactory sourceFactory;
+ InternalAnalysisContext analysisContext;
+
+ @override
+ Future<TestAnalysisResult> resolveFile(String path) async {
+ var file = resourceProvider.getFile(path);
+ var content = file.readAsStringSync();
+ var source = file.createSource();
+
+ analysisContext.computeKindOf(source);
+ List<Source> libraries = analysisContext.getLibrariesContaining(source);
+ Source library = libraries.first;
+
+ var unit = analysisContext.resolveCompilationUnit2(source, library);
+ var errors = analysisContext.computeErrors(source);
+
+ return new TestAnalysisResult(path, content, unit, errors);
+ }
+
+ void setUp() {
+ sdk = new MockSdk(resourceProvider: resourceProvider);
+
+ Map<String, List<Folder>> packageMap = <String, List<Folder>>{
+ 'test': [getFolder('/test/lib')],
+ 'aaa': [getFolder('/aaa/lib')],
+ 'bbb': [getFolder('/bbb/lib')],
+ };
+
+ analysisContext = AnalysisContextFactory.contextWithCore(
+ contributedResolver:
+ new PackageMapUriResolver(resourceProvider, packageMap),
+ resourceProvider: resourceProvider,
+ );
+ }
+}
diff --git a/pkg/analyzer/test/src/dart/resolution/test_all.dart b/pkg/analyzer/test/src/dart/resolution/test_all.dart
new file mode 100644
index 0000000..6863f71
--- /dev/null
+++ b/pkg/analyzer/test/src/dart/resolution/test_all.dart
@@ -0,0 +1,21 @@
+// 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:test_reflective_loader/test_reflective_loader.dart';
+
+import 'assignment_test.dart' as assignment_test;
+import 'class_test.dart' as class_test;
+import 'for_in_test.dart' as for_in_test;
+import 'import_prefix_test.dart' as import_prefix_test;
+import 'mixin_test.dart' as mixin_test;
+
+main() {
+ defineReflectiveSuite(() {
+ assignment_test.main();
+ class_test.main();
+ for_in_test.main();
+ import_prefix_test.main();
+ mixin_test.main();
+ }, name: 'resolution');
+}
diff --git a/pkg/analyzer/test/src/dart/sdk/patch_test.dart b/pkg/analyzer/test/src/dart/sdk/patch_test.dart
index e6f1c71..6ffbf04 100644
--- a/pkg/analyzer/test/src/dart/sdk/patch_test.dart
+++ b/pkg/analyzer/test/src/dart/sdk/patch_test.dart
@@ -721,8 +721,8 @@
};
File file = provider.newFile(_p('/sdk/lib/test/test.dart'), '');
Source source = file.createSource(Uri.parse('dart:test'));
- CompilationUnit unit = SdkPatcher.parse(source, true, listener);
- patcher.patch(provider, true, patchPaths, listener, source, unit);
+ CompilationUnit unit = SdkPatcher.parse(source, listener);
+ patcher.patch(provider, patchPaths, listener, source, unit);
}, throwsArgumentError);
}
@@ -756,8 +756,8 @@
_createSdk();
Source source = file.createSource(Uri.parse('dart:_internal'));
- CompilationUnit unit = SdkPatcher.parse(source, true, listener);
- patcher.patch(provider, true, patchPaths, listener, source, unit);
+ CompilationUnit unit = SdkPatcher.parse(source, listener);
+ patcher.patch(provider, patchPaths, listener, source, unit);
_assertUnitCode(
unit,
'library dart._internal; class A {} '
@@ -808,8 +808,8 @@
{
Uri uri = Uri.parse('dart:test');
Source source = fileLib.createSource(uri);
- CompilationUnit unit = SdkPatcher.parse(source, true, listener);
- patcher.patch(provider, true, patchPaths, listener, source, unit);
+ CompilationUnit unit = SdkPatcher.parse(source, listener);
+ patcher.patch(provider, patchPaths, listener, source, unit);
_assertUnitCode(
unit,
"library test; part 'test_part.dart'; import 'foo.dart'; "
@@ -819,8 +819,8 @@
{
Uri uri = Uri.parse('dart:test/test_part.dart');
Source source = filePart.createSource(uri);
- CompilationUnit unit = SdkPatcher.parse(source, true, listener);
- patcher.patch(provider, true, patchPaths, listener, source, unit);
+ CompilationUnit unit = SdkPatcher.parse(source, listener);
+ patcher.patch(provider, patchPaths, listener, source, unit);
_assertUnitCode(unit, "part of test; class B {int _b() => 1;}");
}
}
@@ -1072,8 +1072,8 @@
_createSdk();
Source source = file.createSource(Uri.parse('dart:test'));
- CompilationUnit unit = SdkPatcher.parse(source, true, listener);
- patcher.patch(provider, true, patchPaths, listener, source, unit);
+ CompilationUnit unit = SdkPatcher.parse(source, listener);
+ patcher.patch(provider, patchPaths, listener, source, unit);
return unit;
}
diff --git a/pkg/analyzer/test/src/dart/test_all.dart b/pkg/analyzer/test/src/dart/test_all.dart
index 78ac68f..7855e3e 100644
--- a/pkg/analyzer/test/src/dart/test_all.dart
+++ b/pkg/analyzer/test/src/dart/test_all.dart
@@ -10,6 +10,7 @@
import 'ast/test_all.dart' as ast;
import 'constant/test_all.dart' as constant;
import 'element/test_all.dart' as element;
+import 'resolution/test_all.dart' as resolution;
import 'sdk/test_all.dart' as sdk;
/// Utility for manually running all tests.
@@ -19,6 +20,7 @@
ast.main();
constant.main();
element.main();
+ resolution.main();
sdk.main();
}, name: 'dart');
}
diff --git a/pkg/analyzer/test/src/fasta/body_builder_test_helper.dart b/pkg/analyzer/test/src/fasta/body_builder_test_helper.dart
deleted file mode 100644
index 22a2cc8..0000000
--- a/pkg/analyzer/test/src/fasta/body_builder_test_helper.dart
+++ /dev/null
@@ -1,141 +0,0 @@
-// 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:io' show File;
-
-import 'package:analyzer/dart/element/element.dart';
-import 'package:analyzer/src/dart/element/element.dart';
-import 'package:analyzer/src/dart/element/type.dart';
-import "package:front_end/src/api_prototype/front_end.dart";
-import "package:front_end/src/api_prototype/memory_file_system.dart";
-import "package:front_end/src/base/processed_options.dart";
-import "package:front_end/src/compute_platform_binaries_location.dart";
-import 'package:front_end/src/fasta/compiler_context.dart';
-import 'package:front_end/src/fasta/dill/dill_target.dart';
-import "package:front_end/src/fasta/fasta_codes.dart";
-import "package:front_end/src/fasta/kernel/kernel_target.dart";
-import 'package:front_end/src/fasta/ticker.dart';
-import 'package:front_end/src/fasta/uri_translator_impl.dart';
-import 'package:kernel/class_hierarchy.dart' as kernel;
-import 'package:kernel/core_types.dart' as kernel;
-import 'package:kernel/kernel.dart' as kernel;
-import 'package:test/test.dart';
-
-Element _buildElement(kernel.Class coreType) {
- ClassElementImpl element =
- new ClassElementImpl(coreType.name, coreType.fileOffset);
- element.typeParameters = coreType.typeParameters.map((parameter) {
- TypeParameterElementImpl element =
- new TypeParameterElementImpl(parameter.name, parameter.fileOffset);
- element.type = new TypeParameterTypeImpl(element);
- return element;
- }).toList();
- return element;
-}
-
-class CompilerTestContext extends CompilerContext {
- KernelTarget kernelTarget;
-
- CompilerTestContext(ProcessedOptions options) : super(options);
-
- Uri get entryPoint => options.inputs.single;
-
- static Future<T> runWithTestOptions<T>(
- Future<T> action(CompilerTestContext c)) async {
- // TODO(danrubel): Consider HybridFileSystem.
- final MemoryFileSystem fs =
- new MemoryFileSystem(Uri.parse("org-dartlang-test:///"));
-
- /// The custom URI used to locate the dill file in the MemoryFileSystem.
- final Uri sdkSummary = fs.currentDirectory.resolve("vm_platform.dill");
-
- /// The in memory test code URI
- final Uri entryPoint = fs.currentDirectory.resolve("main.dart");
-
- // Read the dill file containing kernel platform summaries into memory.
- List<int> sdkSummaryBytes = await new File.fromUri(
- computePlatformBinariesLocation().resolve("vm_platform.dill"))
- .readAsBytes();
- fs.entityForUri(sdkSummary).writeAsBytesSync(sdkSummaryBytes);
-
- final CompilerOptions optionBuilder = new CompilerOptions()
- ..strongMode = false // TODO(danrubel): enable strong mode.
- ..reportMessages = true
- ..verbose = false
- ..fileSystem = fs
- ..sdkSummary = sdkSummary
- ..onProblem = (FormattedMessage problem, Severity severity,
- List<FormattedMessage> context) {
- // TODO(danrubel): Capture problems and check against expectations.
-// print(problem.formatted);
- };
-
- final ProcessedOptions options =
- new ProcessedOptions(optionBuilder, [entryPoint]);
-
- UriTranslatorImpl uriTranslator = await options.getUriTranslator();
-
- return await new CompilerTestContext(options)
- .runInContext<T>((CompilerContext _c) async {
- CompilerTestContext c = _c;
- DillTarget dillTarget = new DillTarget(
- new Ticker(isVerbose: false), uriTranslator, options.target);
-
- c.kernelTarget = new KernelTarget(fs, true, dillTarget, uriTranslator);
-
- // Load the dill file containing platform code.
- dillTarget.loader.read(Uri.parse('dart:core'), -1, fileUri: sdkSummary);
- kernel.Component sdkComponent =
- kernel.loadComponentFromBytes(sdkSummaryBytes);
- dillTarget.loader
- .appendLibraries(sdkComponent, byteCount: sdkSummaryBytes.length);
- await dillTarget.buildOutlines();
- await c.kernelTarget.buildOutlines();
- c.kernelTarget.computeCoreTypes();
- assert(c.kernelTarget.loader.coreTypes != null);
-
- // Initialize the typeProvider if types should be resolved.
- Map<String, Element> map = <String, Element>{};
- var coreTypes = c.kernelTarget.loader.coreTypes;
- for (var coreType in [
- coreTypes.boolClass,
- coreTypes.doubleClass,
- coreTypes.functionClass,
- coreTypes.futureClass,
- coreTypes.futureOrClass,
- coreTypes.intClass,
- coreTypes.iterableClass,
- coreTypes.iteratorClass,
- coreTypes.listClass,
- coreTypes.mapClass,
- coreTypes.nullClass,
- coreTypes.numClass,
- coreTypes.objectClass,
- coreTypes.stackTraceClass,
- coreTypes.streamClass,
- coreTypes.stringClass,
- coreTypes.symbolClass,
- coreTypes.typeClass
- ]) {
- map[coreType.name] = _buildElement(coreType);
- }
-
- T result;
- Completer<T> completer = new Completer<T>();
- // Since we're using `package:test_reflective_loader`, we can't rely on
- // normal async behavior, as `defineReflectiveSuite` doesn't return a
- // future. However, since it's built on top of `package:test`, we can
- // obtain a future that completes when all the tests are done using
- // `tearDownAll`. This allows this function to complete no earlier than
- // when the tests are done. This is important, as we don't want to call
- // `CompilerContext.clear` before then.
- tearDownAll(() => completer.complete(result));
- result = await action(c);
- return completer.future;
- });
- }
-
- static CompilerTestContext get current => CompilerContext.current;
-}
diff --git a/pkg/analyzer/test/src/fasta/recovery/code_order_test.dart b/pkg/analyzer/test/src/fasta/recovery/code_order_test.dart
index 9701fbc..bb6f791 100644
--- a/pkg/analyzer/test/src/fasta/recovery/code_order_test.dart
+++ b/pkg/analyzer/test/src/fasta/recovery/code_order_test.dart
@@ -14,6 +14,7 @@
defineReflectiveTests(CompilationUnitMemberTest);
defineReflectiveTests(ImportDirectiveTest);
defineReflectiveTests(MisplacedMetadataTest);
+ defineReflectiveTests(MixinDeclarationTest);
defineReflectiveTests(TryStatementTest);
});
}
@@ -339,6 +340,58 @@
}
/**
+ * Test how well the parser recovers when the clauses in a mixin declaration are
+ * out of order.
+ */
+@reflectiveTest
+class MixinDeclarationTest extends AbstractRecoveryTest {
+ void test_implementsBeforeOn() {
+ testRecovery('''
+mixin A implements B on C {}
+''', [ParserErrorCode.IMPLEMENTS_BEFORE_ON], '''
+mixin A on C implements B {}
+''');
+ }
+
+ void test_multipleOn() {
+ testRecovery('''
+mixin A on B on C {}
+''', [ParserErrorCode.MULTIPLE_ON_CLAUSES], '''
+mixin A on B, C {}
+''');
+ }
+
+ void test_multipleImplements() {
+ testRecovery('''
+mixin A implements B implements C, D {}
+''', [ParserErrorCode.MULTIPLE_IMPLEMENTS_CLAUSES], '''
+mixin A implements B, C, D {}
+''');
+ }
+
+ @failingTest
+ void test_typing_implements() {
+ testRecovery('''
+mixin Foo imple
+mixin UnrelatedMixin on Bar {}
+''', [ParserErrorCode.MULTIPLE_WITH_CLAUSES], '''
+mixin Foo {}
+mixin UnrelatedMixin on Bar {}
+''');
+ }
+
+ void test_typing_implements_identifier() {
+ testRecovery('''
+mixin Foo implements CurrentlyTypingHere
+mixin UnrelatedMixin on Bar {}
+''', [ParserErrorCode.MISSING_CLASS_BODY], '''
+mixin Foo implements CurrentlyTypingHere {}
+mixin UnrelatedMixin on Bar {}
+''');
+ }
+}
+
+/**
* Test how well the parser recovers when the clauses in a try statement are
* out of order.
*/
diff --git a/pkg/analyzer/test/src/fasta/recovery/partial_code/constructor_test.dart b/pkg/analyzer/test/src/fasta/recovery/partial_code/constructor_test.dart
new file mode 100644
index 0000000..c61a1dc
--- /dev/null
+++ b/pkg/analyzer/test/src/fasta/recovery/partial_code/constructor_test.dart
@@ -0,0 +1,88 @@
+import 'package:analyzer/analyzer.dart';
+import 'package:analyzer/dart/ast/token.dart';
+import 'package:analyzer/src/dart/error/syntactic_errors.dart';
+
+import 'partial_code_support.dart';
+
+main() {
+ new ConstructorTest().buildAll();
+}
+
+class ConstructorTest extends PartialCodeTest {
+ buildAll() {
+ buildTests(
+ 'constructor',
+ [
+ new TestDescriptor(
+ 'colon',
+ 'C() :',
+ [
+ ParserErrorCode.MISSING_INITIALIZER,
+ ParserErrorCode.MISSING_FUNCTION_BODY
+ ],
+ 'C() {}',
+ adjustValidUnitBeforeComparison: setSeparator,
+ failing: ['methodNonVoid', 'getter', 'setter'],
+ ),
+ new TestDescriptor(
+ 'colon_block',
+ 'C() : {}',
+ [ParserErrorCode.MISSING_INITIALIZER],
+ 'C() {}',
+ adjustValidUnitBeforeComparison: setSeparator,
+ ),
+ new TestDescriptor(
+ 'colon_semicolon',
+ 'C() : ;',
+ [ParserErrorCode.MISSING_INITIALIZER],
+ 'C();',
+ adjustValidUnitBeforeComparison: setSeparator,
+ ),
+ new TestDescriptor(
+ 'super',
+ 'C() : super',
+ [
+ ParserErrorCode.EXPECTED_TOKEN,
+ ParserErrorCode.MISSING_FUNCTION_BODY
+ ],
+ 'C() : super() {}',
+ ),
+ new TestDescriptor(
+ 'super_dot',
+ 'C() : super.',
+ [
+ ParserErrorCode.EXPECTED_TOKEN,
+ ParserErrorCode.MISSING_IDENTIFIER,
+ ParserErrorCode.MISSING_FUNCTION_BODY
+ ],
+ 'C() : super._s_() {}',
+ failing: ['fieldConst', 'methodNonVoid', 'getter', 'setter'],
+ ),
+ new TestDescriptor(
+ 'super_qdot',
+ 'C() : super?.',
+ [
+ ParserErrorCode.INVALID_OPERATOR_FOR_SUPER,
+ ParserErrorCode.EXPECTED_TOKEN,
+ ParserErrorCode.MISSING_FUNCTION_BODY,
+ ],
+ 'C() : super?._s_() {}',
+ expectedErrorsInValidCode: [
+ ParserErrorCode.INVALID_OPERATOR_FOR_SUPER
+ ],
+ failing: ['methodNonVoid', 'getter', 'setter'],
+ ),
+ ],
+ PartialCodeTest.classMemberSuffixes,
+ head: 'class C {',
+ tail: '}');
+ }
+
+ CompilationUnit setSeparator(CompilationUnit unit) {
+ ClassDeclaration declaration = unit.declarations[0];
+ ConstructorDeclaration member = declaration.members[0];
+ member.separator =
+ new Token(TokenType.COLON, member.parameters.endToken.charOffset + 1);
+ return unit;
+ }
+}
diff --git a/pkg/analyzer/test/src/fasta/recovery/partial_code/mixin_declaration_test.dart b/pkg/analyzer/test/src/fasta/recovery/partial_code/mixin_declaration_test.dart
new file mode 100644
index 0000000..e2e5d7b
--- /dev/null
+++ b/pkg/analyzer/test/src/fasta/recovery/partial_code/mixin_declaration_test.dart
@@ -0,0 +1,102 @@
+// 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 'partial_code_support.dart';
+
+main() {
+ new MixinDeclarationTest().buildAll();
+}
+
+class MixinDeclarationTest extends PartialCodeTest {
+ buildAll() {
+ buildTests(
+ 'mixin_declaration',
+ [
+ new TestDescriptor(
+ 'keyword',
+ 'mixin',
+ [
+ ParserErrorCode.MISSING_IDENTIFIER,
+ ParserErrorCode.MISSING_CLASS_BODY
+ ],
+ 'mixin _s_ {}',
+ failing: ['functionNonVoid', 'getter']),
+ new TestDescriptor('named', 'mixin A',
+ [ParserErrorCode.MISSING_CLASS_BODY], 'mixin A {}'),
+ new TestDescriptor(
+ 'on',
+ 'mixin A on',
+ [
+ ParserErrorCode.EXPECTED_TYPE_NAME,
+ ParserErrorCode.MISSING_CLASS_BODY
+ ],
+ 'mixin A on _s_ {}',
+ failing: ['functionVoid', 'functionNonVoid', 'getter']),
+ new TestDescriptor('onBody', 'mixin A on {}',
+ [ParserErrorCode.EXPECTED_TYPE_NAME], 'mixin A on _s_ {}'),
+ new TestDescriptor(
+ 'onNameComma',
+ 'mixin A on B,',
+ [
+ ParserErrorCode.EXPECTED_TYPE_NAME,
+ ParserErrorCode.MISSING_CLASS_BODY
+ ],
+ 'mixin A on B, _s_ {}',
+ failing: ['functionVoid', 'functionNonVoid', 'getter']),
+ new TestDescriptor('onNameCommaBody', 'mixin A on B, {}',
+ [ParserErrorCode.EXPECTED_TYPE_NAME], 'mixin A on B, _s_ {}'),
+ new TestDescriptor(
+ 'onImplementsNameBody',
+ 'mixin A on implements B {}',
+ [ParserErrorCode.EXPECTED_TYPE_NAME],
+ 'mixin A on _s_ implements B {}',
+ allFailing: true),
+ new TestDescriptor(
+ 'onNameImplements',
+ 'mixin A on B implements',
+ [
+ ParserErrorCode.EXPECTED_TYPE_NAME,
+ ParserErrorCode.MISSING_CLASS_BODY
+ ],
+ 'mixin A on B implements _s_ {}',
+ failing: ['functionVoid', 'functionNonVoid', 'getter']),
+ new TestDescriptor(
+ 'onNameImplements',
+ 'mixin A on B implements {}',
+ [ParserErrorCode.EXPECTED_TYPE_NAME],
+ 'mixin A on B implements _s_ {}'),
+ new TestDescriptor(
+ 'implements',
+ 'mixin A implements',
+ [
+ ParserErrorCode.EXPECTED_TYPE_NAME,
+ ParserErrorCode.MISSING_CLASS_BODY
+ ],
+ 'mixin A implements _s_ {}',
+ failing: ['functionVoid', 'functionNonVoid', 'getter']),
+ new TestDescriptor(
+ 'implementsBody',
+ 'mixin A implements {}',
+ [ParserErrorCode.EXPECTED_TYPE_NAME],
+ 'mixin A implements _s_ {}'),
+ new TestDescriptor(
+ 'implementsNameComma',
+ 'mixin A implements B,',
+ [
+ ParserErrorCode.EXPECTED_TYPE_NAME,
+ ParserErrorCode.MISSING_CLASS_BODY
+ ],
+ 'mixin A implements B, _s_ {}',
+ failing: ['functionVoid', 'functionNonVoid', 'getter']),
+ new TestDescriptor(
+ 'implementsNameCommaBody',
+ 'mixin A implements B, {}',
+ [ParserErrorCode.EXPECTED_TYPE_NAME],
+ 'mixin A implements B, _s_ {}'),
+ ],
+ PartialCodeTest.declarationSuffixes);
+ }
+}
diff --git a/pkg/analyzer/test/src/fasta/recovery/partial_code/partial_code_support.dart b/pkg/analyzer/test/src/fasta/recovery/partial_code/partial_code_support.dart
index 676666d..62a722f 100644
--- a/pkg/analyzer/test/src/fasta/recovery/partial_code/partial_code_support.dart
+++ b/pkg/analyzer/test/src/fasta/recovery/partial_code/partial_code_support.dart
@@ -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 'package:analyzer/analyzer.dart';
import 'package:analyzer/error/error.dart';
import 'package:analyzer/src/dart/error/syntactic_errors.dart';
import 'package:test/test.dart';
@@ -9,6 +10,8 @@
import '../../../../generated/test_support.dart';
import '../recovery_test_support.dart';
+typedef CompilationUnit AdjustValidUnitBeforeComparison(CompilationUnit unit);
+
/**
* A base class that adds support for tests that test how well the parser
* recovers when the user has entered an incomplete (but otherwise correct)
@@ -198,6 +201,8 @@
try {
testRecovery(
invalid.toString(), expectedInvalidCodeErrors, valid.toString(),
+ adjustValidUnitBeforeComparison:
+ descriptor.adjustValidUnitBeforeComparison,
expectedErrorsInValidCode: expectedValidCodeErrors);
failed = true;
} catch (e) {
@@ -209,6 +214,8 @@
} else {
testRecovery(
invalid.toString(), expectedInvalidCodeErrors, valid.toString(),
+ adjustValidUnitBeforeComparison:
+ descriptor.adjustValidUnitBeforeComparison,
expectedErrorsInValidCode: expectedValidCodeErrors);
}
});
@@ -257,10 +264,19 @@
final List<String> failing;
/**
+ * A function that modifies the valid compilation unit before it is compared
+ * with the invalid compilation unit, or `null` if no modification needed.
+ */
+ AdjustValidUnitBeforeComparison adjustValidUnitBeforeComparison;
+
+ /**
* Initialize a newly created test descriptor.
*/
TestDescriptor(this.name, this.invalid, this.errorCodes, this.valid,
- {this.allFailing: false, this.failing, this.expectedErrorsInValidCode});
+ {this.allFailing: false,
+ this.failing,
+ this.expectedErrorsInValidCode,
+ this.adjustValidUnitBeforeComparison});
}
/**
diff --git a/pkg/analyzer/test/src/fasta/recovery/partial_code/test_all.dart b/pkg/analyzer/test/src/fasta/recovery/partial_code/test_all.dart
index 56d8b47..e5abf74 100644
--- a/pkg/analyzer/test/src/fasta/recovery/partial_code/test_all.dart
+++ b/pkg/analyzer/test/src/fasta/recovery/partial_code/test_all.dart
@@ -8,6 +8,8 @@
import 'assert_statement_test.dart' as assert_statement;
import 'break_statement_test.dart' as break_statement;
import 'class_declaration_test.dart' as class_declaration;
+import 'constructor_test.dart' as constructor;
+import 'mixin_declaration_test.dart' as mixin_declaration;
import 'continue_statement_test.dart' as continue_statement;
import 'do_statement_test.dart' as do_statement;
import 'enum_declaration_test.dart' as enum_declaration;
@@ -38,6 +40,7 @@
assert_statement.main();
break_statement.main();
class_declaration.main();
+ constructor.main();
continue_statement.main();
do_statement.main();
enum_declaration.main();
@@ -51,6 +54,7 @@
library_directive.main();
local_variable.main();
method_declaration.main();
+ mixin_declaration.main();
parameter.main();
part_directive.main();
part_of_directive.main();
diff --git a/pkg/analyzer/test/src/summary/element_text.dart b/pkg/analyzer/test/src/summary/element_text.dart
index 935abfb..09b1a87 100644
--- a/pkg/analyzer/test/src/summary/element_text.dart
+++ b/pkg/analyzer/test/src/summary/element_text.dart
@@ -173,6 +173,8 @@
if (e.isEnum) {
buffer.write('enum ');
+ } else if (e.isMixin) {
+ buffer.write('mixin ');
} else {
buffer.write('class ');
}
@@ -189,6 +191,13 @@
writeType(e.supertype);
}
+ if (e.isMixin) {
+ if (e.superclassConstraints.isEmpty) {
+ throw new StateError('At least Object is expected.');
+ }
+ writeList(' on ', '', e.superclassConstraints, ', ', writeType);
+ }
+
writeList(' with ', '', e.mixins, ', ', writeType);
writeList(' implements ', '', e.interfaces, ', ', writeType);
@@ -661,13 +670,6 @@
fail('Unknown parameter kind');
}
- // Kernel desugars omitted default parameter values to 'null'.
- // Analyzer does not set initializer at all.
- // It is not an interesting distinction, so we skip NullLiteral(s).
- if (defaultValue is NullLiteral) {
- defaultValue = null;
- }
-
writeMetadata(e, '', ' ');
writeIf(e.isCovariant, 'covariant ');
@@ -885,6 +887,7 @@
e.functionTypeAliases.forEach(writeFunctionTypeAliasElement);
e.enums.forEach(writeClassElement);
e.types.forEach(writeClassElement);
+ e.mixins.forEach(writeClassElement);
e.topLevelVariables.forEach(writePropertyInducingElement);
e.accessors.forEach(writePropertyAccessorElement);
e.functions.forEach(writeFunctionElement);
diff --git a/pkg/analyzer/test/src/summary/expr_builder_test.dart b/pkg/analyzer/test/src/summary/expr_builder_test.dart
index b15753d..ef991be 100644
--- a/pkg/analyzer/test/src/summary/expr_builder_test.dart
+++ b/pkg/analyzer/test/src/summary/expr_builder_test.dart
@@ -446,6 +446,48 @@
checkSimpleExpression('({x}) => 0');
}
+ @failingTest
+ void test_pushLocalFunctionReference_nested() {
+ prepareAnalysisContext(new AnalysisOptionsImpl()..previewDart2 = false);
+ var expr =
+ checkSimpleExpression('(x) => (y) => x + y') as FunctionExpression;
+ var outerFunctionElement = expr.declaredElement;
+ var xElement = outerFunctionElement.parameters[0];
+ var x = expr.parameters.parameters[0];
+ expect(x.declaredElement, same(xElement));
+ var outerBody = expr.body as ExpressionFunctionBody;
+ var outerBodyExpr = outerBody.expression as FunctionExpression;
+ var innerFunctionElement = outerBodyExpr.declaredElement;
+ var yElement = innerFunctionElement.parameters[0];
+ var y = outerBodyExpr.parameters.parameters[0];
+ expect(y.declaredElement, same(yElement));
+ var innerBody = outerBodyExpr.body as ExpressionFunctionBody;
+ var innerBodyExpr = innerBody.expression as BinaryExpression;
+ var xRef = innerBodyExpr.leftOperand as SimpleIdentifier;
+ var yRef = innerBodyExpr.rightOperand as SimpleIdentifier;
+ expect(xRef.staticElement, same(xElement));
+ expect(yRef.staticElement, same(yElement));
+ }
+
+ @failingTest
+ void test_pushLocalFunctionReference_paramReference() {
+ prepareAnalysisContext(new AnalysisOptionsImpl()..previewDart2 = false);
+ var expr = checkSimpleExpression('(x, y) => x + y') as FunctionExpression;
+ var localFunctionElement = expr.declaredElement;
+ var xElement = localFunctionElement.parameters[0];
+ var yElement = localFunctionElement.parameters[1];
+ var x = expr.parameters.parameters[0];
+ var y = expr.parameters.parameters[1];
+ expect(x.declaredElement, same(xElement));
+ expect(y.declaredElement, same(yElement));
+ var body = expr.body as ExpressionFunctionBody;
+ var bodyExpr = body.expression as BinaryExpression;
+ var xRef = bodyExpr.leftOperand as SimpleIdentifier;
+ var yRef = bodyExpr.rightOperand as SimpleIdentifier;
+ expect(xRef.staticElement, same(xElement));
+ expect(yRef.staticElement, same(yElement));
+ }
+
void test_pushLocalFunctionReference_positionalParam_untyped() {
checkSimpleExpression('([x]) => 0');
}
@@ -522,48 +564,4 @@
void test_typeCheck_negated() {
checkSimpleExpression('0 is! num', expectedText: '!(0 is num)');
}
-
- void xtest_pushLocalFunctionReference_nested() {
- // TODO(devoncarew): This test fails when run in strong mode.
- // Failed assertion: line 5116 pos 16:
- // 'Linker._initializerTypeInferenceCycle == null': is not true.
- prepareAnalysisContext(new AnalysisOptionsImpl()..previewDart2 = false);
- var expr =
- checkSimpleExpression('(x) => (y) => x + y') as FunctionExpression;
- var outerFunctionElement = expr.declaredElement;
- var xElement = outerFunctionElement.parameters[0];
- var x = expr.parameters.parameters[0];
- expect(x.declaredElement, same(xElement));
- var outerBody = expr.body as ExpressionFunctionBody;
- var outerBodyExpr = outerBody.expression as FunctionExpression;
- var innerFunctionElement = outerBodyExpr.declaredElement;
- var yElement = innerFunctionElement.parameters[0];
- var y = outerBodyExpr.parameters.parameters[0];
- expect(y.declaredElement, same(yElement));
- var innerBody = outerBodyExpr.body as ExpressionFunctionBody;
- var innerBodyExpr = innerBody.expression as BinaryExpression;
- var xRef = innerBodyExpr.leftOperand as SimpleIdentifier;
- var yRef = innerBodyExpr.rightOperand as SimpleIdentifier;
- expect(xRef.staticElement, same(xElement));
- expect(yRef.staticElement, same(yElement));
- }
-
- void xtest_pushLocalFunctionReference_paramReference() {
- // TODO(devoncarew): This test fails when run in strong mode.
- prepareAnalysisContext(new AnalysisOptionsImpl()..previewDart2 = false);
- var expr = checkSimpleExpression('(x, y) => x + y') as FunctionExpression;
- var localFunctionElement = expr.declaredElement;
- var xElement = localFunctionElement.parameters[0];
- var yElement = localFunctionElement.parameters[1];
- var x = expr.parameters.parameters[0];
- var y = expr.parameters.parameters[1];
- expect(x.declaredElement, same(xElement));
- expect(y.declaredElement, same(yElement));
- var body = expr.body as ExpressionFunctionBody;
- var bodyExpr = body.expression as BinaryExpression;
- var xRef = bodyExpr.leftOperand as SimpleIdentifier;
- var yRef = bodyExpr.rightOperand as SimpleIdentifier;
- expect(xRef.staticElement, same(xElement));
- expect(yRef.staticElement, same(yElement));
- }
}
diff --git a/pkg/analyzer/test/src/summary/linker_test.dart b/pkg/analyzer/test/src/summary/linker_test.dart
index fe04b53..12b8e8c 100644
--- a/pkg/analyzer/test/src/summary/linker_test.dart
+++ b/pkg/analyzer/test/src/summary/linker_test.dart
@@ -4,13 +4,12 @@
import 'package:analyzer/dart/element/type.dart';
import 'package:analyzer/src/dart/element/element.dart';
-import 'package:analyzer/src/summary/format.dart';
import 'package:analyzer/src/summary/idl.dart';
import 'package:analyzer/src/summary/link.dart';
import 'package:test/test.dart';
import 'package:test_reflective_loader/test_reflective_loader.dart';
-import 'summarize_ast_test.dart';
+import 'test_strategies.dart';
main() {
defineReflectiveSuite(() {
@@ -19,87 +18,21 @@
}
@reflectiveTest
-class LinkerUnitTest extends SummaryLinkerTest {
- Linker linker;
+class LinkerUnitTest extends SummaryLinkerTestStrategyTwoPhase
+ with LinkerUnitTestCases {}
- LinkerInputs linkerInputs;
- LibraryElementInBuildUnit _testLibrary;
- @override
- bool get allowMissingFiles => false;
-
+/// Test cases that exercise the summary linker in a white-box fashion.
+///
+/// These test cases may be mixed into any class derived from
+/// [SummaryLinkerTestStrategy], allowing the linker to be unit-tested in a
+/// variety of ways.
+abstract class LinkerUnitTestCases implements SummaryLinkerTestStrategy {
Matcher get isUndefined => const TypeMatcher<UndefinedElementForLink>();
- LibraryElementInBuildUnit get testLibrary => _testLibrary ??=
- linker.getLibrary(linkerInputs.testDartUri) as LibraryElementInBuildUnit;
-
- void createLinker(String text, {String path: '/test.dart'}) {
- linkerInputs = createLinkerInputs(text, path: path);
- Map<String, LinkedLibraryBuilder> linkedLibraries = setupForLink(
- linkerInputs.linkedLibraries,
- linkerInputs.getUnit,
- linkerInputs.getDeclaredVariable);
- linker = new Linker(linkedLibraries, linkerInputs.getDependency,
- linkerInputs.getUnit, true);
- }
-
LibraryElementForLink getLibrary(String uri) {
return linker.getLibrary(Uri.parse(uri));
}
- void test_apiSignature_apiChanges() {
- var bundle0 =
- createPackageBundle('f(int i) { print(i); }', path: '/test.dart');
- var bundle1 =
- createPackageBundle('f(String s) { print(s); }', path: '/test.dart');
- expect(bundle0.apiSignature, isNotEmpty);
- expect(bundle1.apiSignature, isNotEmpty);
- expect(bundle0.apiSignature, isNot(bundle1.apiSignature));
- }
-
- void test_apiSignature_localChanges() {
- var bundle0 = createPackageBundle('f() { print(0); }', path: '/test.dart');
- var bundle1 = createPackageBundle('f() { print(1); }', path: '/test.dart');
- expect(bundle0.apiSignature, isNotEmpty);
- expect(bundle1.apiSignature, isNotEmpty);
- expect(bundle0.apiSignature, bundle1.apiSignature);
- }
-
- void test_apiSignature_orderChange() {
- // A change to the order in which files are processed should not affect the
- // API signature.
- addNamedSource('/a.dart', 'class A {}');
- var bundle0 = createPackageBundle('class B {}', path: '/b.dart');
- addNamedSource('/b.dart', 'class B {}');
- var bundle1 = createPackageBundle('class A {}', path: '/a.dart');
- expect(bundle0.apiSignature, isNotEmpty);
- expect(bundle1.apiSignature, isNotEmpty);
- expect(bundle0.apiSignature, bundle1.apiSignature);
- }
-
- void test_apiSignature_unlinkedOnly() {
- // The API signature of a package bundle should only contain unlinked
- // information. In this test, the linked information for bundle2 and
- // bundle3 refer to class C as existing in different files. But the
- // unlinked information for bundle2 and bundle3 should be the same, so their
- // API signatures should be the same.
- addNamedSource('/a.dart', 'class C {}');
- var bundle0 = createPackageBundle('', path: '/b.dart');
- addNamedSource('/a.dart', '');
- var bundle1 = createPackageBundle('class C {}', path: '/b.dart');
- var text = '''
-import 'a.dart';
-import 'b.dart';
-class D extends C {}
-''';
- addBundle('/bundle0.ds', bundle0);
- var bundle2 = createPackageBundle(text, path: '/c.dart');
- addBundle('/bundle1.ds', bundle1);
- var bundle3 = createPackageBundle(text, path: '/c.dart');
- expect(bundle2.apiSignature, isNotEmpty);
- expect(bundle3.apiSignature, isNotEmpty);
- expect(bundle2.apiSignature, bundle3.apiSignature);
- }
-
void test_baseClass_genericWithAccessor() {
createLinker('''
class B<T> {
@@ -109,7 +42,7 @@
var j;
}
''');
- LibraryElementForLink library = linker.getLibrary(linkerInputs.testDartUri);
+ LibraryElementForLink library = linker.getLibrary(testDartUri);
library.libraryCycleForLink.ensureLinked();
// No assertions--just make sure it doesn't crash.
}
@@ -123,7 +56,7 @@
void f() {}
}
''');
- LibraryElementForLink library = linker.getLibrary(linkerInputs.testDartUri);
+ LibraryElementForLink library = linker.getLibrary(testDartUri);
library.libraryCycleForLink.ensureLinked();
// No assertions--just make sure it doesn't crash.
}
@@ -137,7 +70,7 @@
void f(g) {}
}
''');
- LibraryElementForLink library = linker.getLibrary(linkerInputs.testDartUri);
+ LibraryElementForLink library = linker.getLibrary(testDartUri);
library.libraryCycleForLink.ensureLinked();
// No assertions--just make sure it doesn't crash.
}
@@ -151,7 +84,7 @@
var j;
}
''');
- LibraryElementForLink library = linker.getLibrary(linkerInputs.testDartUri);
+ LibraryElementForLink library = linker.getLibrary(testDartUri);
library.libraryCycleForLink.ensureLinked();
// No assertions--just make sure it doesn't crash.
}
@@ -166,7 +99,7 @@
Future<T> f() => null;
}
''');
- LibraryElementForLink library = linker.getLibrary(linkerInputs.testDartUri);
+ LibraryElementForLink library = linker.getLibrary(testDartUri);
library.libraryCycleForLink.ensureLinked();
// No assertions--just make sure it doesn't crash.
}
@@ -180,7 +113,7 @@
void f() {}
}
''');
- LibraryElementForLink library = linker.getLibrary(linkerInputs.testDartUri);
+ LibraryElementForLink library = linker.getLibrary(testDartUri);
library.libraryCycleForLink.ensureLinked();
}
@@ -193,7 +126,7 @@
var c;
}
''');
- LibraryElementForLink library = linker.getLibrary(linkerInputs.testDartUri);
+ LibraryElementForLink library = linker.getLibrary(testDartUri);
library.libraryCycleForLink.ensureLinked();
// No assertions--just make sure it doesn't crash.
}
@@ -213,7 +146,7 @@
import "b.dart";
var z = y;
''');
- LibraryElementForLink library = linker.getLibrary(linkerInputs.testDartUri);
+ LibraryElementForLink library = linker.getLibrary(testDartUri);
expect(_getVariable(library.getContainedName('z')).inferredType.toString(),
'int');
}
@@ -291,7 +224,7 @@
F<int> f;
}
''');
- LibraryElementForLink library = linker.getLibrary(linkerInputs.testDartUri);
+ LibraryElementForLink library = linker.getLibrary(testDartUri);
library.libraryCycleForLink.ensureLinked();
ClassElementForLink_Class B = library.getContainedName('B');
@@ -302,28 +235,28 @@
void test_getContainedName_nonStaticField() {
createLinker('class C { var f; }');
- LibraryElementForLink library = linker.getLibrary(linkerInputs.testDartUri);
+ LibraryElementForLink library = linker.getLibrary(testDartUri);
ClassElementForLink_Class c = library.getContainedName('C');
expect(c.getContainedName('f'), isNot(isUndefined));
}
void test_getContainedName_nonStaticGetter() {
createLinker('class C { get g => null; }');
- LibraryElementForLink library = linker.getLibrary(linkerInputs.testDartUri);
+ LibraryElementForLink library = linker.getLibrary(testDartUri);
ClassElementForLink_Class c = library.getContainedName('C');
expect(c.getContainedName('g'), isNot(isUndefined));
}
void test_getContainedName_nonStaticMethod() {
createLinker('class C { m() {} }');
- LibraryElementForLink library = linker.getLibrary(linkerInputs.testDartUri);
+ LibraryElementForLink library = linker.getLibrary(testDartUri);
ClassElementForLink_Class c = library.getContainedName('C');
expect(c.getContainedName('m'), isNot(isUndefined));
}
void test_getContainedName_nonStaticSetter() {
createLinker('class C { void set s(value) {} }');
- LibraryElementForLink library = linker.getLibrary(linkerInputs.testDartUri);
+ LibraryElementForLink library = linker.getLibrary(testDartUri);
ClassElementForLink_Class c = library.getContainedName('C');
expect(c.getContainedName('s='), isNot(isUndefined));
}
@@ -337,7 +270,7 @@
import 'a.dart';
var y = x;
''');
- LibraryElementForLink library = linker.getLibrary(linkerInputs.testDartUri);
+ LibraryElementForLink library = linker.getLibrary(testDartUri);
expect(_getVariable(library.getContainedName('y')).inferredType.toString(),
'() → Null');
}
@@ -357,7 +290,7 @@
import 'a.dart';
var y = C.x;
''');
- LibraryElementForLink library = linker.getLibrary(linkerInputs.testDartUri);
+ LibraryElementForLink library = linker.getLibrary(testDartUri);
expect(_getVariable(library.getContainedName('y')).inferredType.toString(),
'(D) → E');
}
@@ -378,7 +311,7 @@
void foo(bar) {}
}
''');
- LibraryElementForLink library = linker.getLibrary(linkerInputs.testDartUri);
+ LibraryElementForLink library = linker.getLibrary(testDartUri);
library.libraryCycleForLink.ensureLinked();
ClassElementForLink_Class cls = library.getContainedName('C');
expect(cls.methods, hasLength(1));
@@ -394,7 +327,7 @@
final f = true ? <T>(T t) => 0 : <T>(T t) => 1;
}
''');
- LibraryElementForLink library = linker.getLibrary(linkerInputs.testDartUri);
+ LibraryElementForLink library = linker.getLibrary(testDartUri);
library.libraryCycleForLink.ensureLinked();
ClassElementForLink_Class cls = library.getContainedName('C');
expect(cls.fields, hasLength(1));
@@ -409,7 +342,7 @@
var f = x; // Inferred type: dynamic
}
''');
- LibraryElementForLink library = linker.getLibrary(linkerInputs.testDartUri);
+ LibraryElementForLink library = linker.getLibrary(testDartUri);
library.libraryCycleForLink.ensureLinked();
ClassElementForLink_Class cls = library.getContainedName('C');
expect(cls.fields, hasLength(1));
@@ -426,7 +359,7 @@
f(x) {} // Inferred param type: dynamic
}
''');
- LibraryElementForLink library = linker.getLibrary(linkerInputs.testDartUri);
+ LibraryElementForLink library = linker.getLibrary(testDartUri);
library.libraryCycleForLink.ensureLinked();
ClassElementForLink_Class cls = library.getContainedName('C');
expect(cls.methods, hasLength(1));
@@ -444,7 +377,7 @@
void m(p) {}
}
''');
- LibraryElementForLink library = linker.getLibrary(linkerInputs.testDartUri);
+ LibraryElementForLink library = linker.getLibrary(testDartUri);
library.libraryCycleForLink.ensureLinked();
ClassElementForLink_Class cls = library.getContainedName('B');
expect(cls.methods, hasLength(1));
@@ -463,7 +396,7 @@
f() {} // Inferred return type: dynamic
}
''');
- LibraryElementForLink library = linker.getLibrary(linkerInputs.testDartUri);
+ LibraryElementForLink library = linker.getLibrary(testDartUri);
library.libraryCycleForLink.ensureLinked();
ClassElementForLink_Class cls = library.getContainedName('C');
expect(cls.methods, hasLength(1));
@@ -479,7 +412,7 @@
f() {}
}
''');
- LibraryElementForLink library = linker.getLibrary(linkerInputs.testDartUri);
+ LibraryElementForLink library = linker.getLibrary(testDartUri);
library.libraryCycleForLink.ensureLinked();
ClassElementForLink_Class cls = library.getContainedName('C');
expect(cls.methods, hasLength(1));
@@ -499,7 +432,7 @@
map<R2>(f) => null;
}
''');
- LibraryElementForLink library = linker.getLibrary(linkerInputs.testDartUri);
+ LibraryElementForLink library = linker.getLibrary(testDartUri);
library.libraryCycleForLink.ensureLinked();
ClassElementForLink_Class c = library.getContainedName('C');
expect(c.methods, hasLength(1));
@@ -524,7 +457,7 @@
map<R2>(fs) => null;
}
''');
- LibraryElementForLink library = linker.getLibrary(linkerInputs.testDartUri);
+ LibraryElementForLink library = linker.getLibrary(testDartUri);
library.libraryCycleForLink.ensureLinked();
ClassElementForLink_Class c = library.getContainedName('C');
expect(c.methods, hasLength(1));
@@ -546,7 +479,7 @@
''');
expect(
_getVariable(linker
- .getLibrary(linkerInputs.testDartUri)
+ .getLibrary(testDartUri)
.getContainedName('C')
.getContainedName('y'))
.inferredType
@@ -560,9 +493,7 @@
var y = x;
''');
expect(
- _getVariable(linker
- .getLibrary(linkerInputs.testDartUri)
- .getContainedName('y'))
+ _getVariable(linker.getLibrary(testDartUri).getContainedName('y'))
.inferredType
.toString(),
'dynamic');
@@ -578,7 +509,7 @@
import 'a.dart';
var z = y; // Inferred type: dynamic
''');
- LibraryElementForLink library = linker.getLibrary(linkerInputs.testDartUri);
+ LibraryElementForLink library = linker.getLibrary(testDartUri);
expect(_getVariable(library.getContainedName('z')).inferredType.toString(),
'dynamic');
}
@@ -594,7 +525,7 @@
import 'a.dart';
var x = new C().f; // Inferred type: int
''');
- LibraryElementForLink library = linker.getLibrary(linkerInputs.testDartUri);
+ LibraryElementForLink library = linker.getLibrary(testDartUri);
expect(_getVariable(library.getContainedName('x')).inferredType.toString(),
'int');
}
@@ -612,7 +543,7 @@
var g = new C().f; // Inferred type: int
}
''');
- LibraryElementForLink library = linker.getLibrary(linkerInputs.testDartUri);
+ LibraryElementForLink library = linker.getLibrary(testDartUri);
ClassElementForLink_Class classD = library.getContainedName('D');
expect(classD.fields[0].inferredType.toString(), 'int');
}
@@ -633,7 +564,7 @@
f(i) {} // Inferred param type: int
}
''');
- LibraryElementForLink library = linker.getLibrary(linkerInputs.testDartUri);
+ LibraryElementForLink library = linker.getLibrary(testDartUri);
library.libraryCycleForLink.ensureLinked();
ClassElementForLink_Class cls = library.getContainedName('D');
expect(cls.methods, hasLength(1));
@@ -656,7 +587,7 @@
import 'a.dart';
var x = new C().f(); // Inferred type: int
''');
- LibraryElementForLink library = linker.getLibrary(linkerInputs.testDartUri);
+ LibraryElementForLink library = linker.getLibrary(testDartUri);
expect(_getVariable(library.getContainedName('x')).inferredType.toString(),
'int');
}
@@ -677,7 +608,7 @@
f() => 2; //Inferred return type: int
}
''');
- LibraryElementForLink library = linker.getLibrary(linkerInputs.testDartUri);
+ LibraryElementForLink library = linker.getLibrary(testDartUri);
library.libraryCycleForLink.ensureLinked();
ClassElementForLink_Class cls = library.getContainedName('D');
expect(cls.methods, hasLength(1));
@@ -690,9 +621,7 @@
addBundle('/a.ds', bundle);
createLinker('import "a.dart"; var x = C.f;', path: '/b.dart');
expect(
- _getVariable(linker
- .getLibrary(linkerInputs.testDartUri)
- .getContainedName('x'))
+ _getVariable(linker.getLibrary(testDartUri).getContainedName('x'))
.inferredType
.toString(),
'int');
@@ -703,9 +632,7 @@
addBundle('/a.ds', bundle);
createLinker('import "a.dart"; var b = a;', path: '/b.dart');
expect(
- _getVariable(linker
- .getLibrary(linkerInputs.testDartUri)
- .getContainedName('b'))
+ _getVariable(linker.getLibrary(testDartUri).getContainedName('b'))
.inferredType
.toString(),
'int');
@@ -732,7 +659,7 @@
void foo(X2 x) {}
}
''');
- LibraryElementForLink library = linker.getLibrary(linkerInputs.testDartUri);
+ LibraryElementForLink library = linker.getLibrary(testDartUri);
library.libraryCycleForLink.ensureLinked();
ClassElementForLink_Class C = library.getContainedName('C');
@@ -748,7 +675,7 @@
class D<T extends num> {}
final x = new C<D>();
''');
- LibraryElementForLink library = linker.getLibrary(linkerInputs.testDartUri);
+ LibraryElementForLink library = linker.getLibrary(testDartUri);
library.libraryCycleForLink.ensureLinked();
PropertyAccessorElementForLink_Variable x = library.getContainedName('x');
ParameterizedType type1 = x.returnType;
@@ -766,7 +693,7 @@
class C<T extends num> {}
final x = new C();
''');
- LibraryElementForLink library = linker.getLibrary(linkerInputs.testDartUri);
+ LibraryElementForLink library = linker.getLibrary(testDartUri);
library.libraryCycleForLink.ensureLinked();
PropertyAccessorElementForLink_Variable x = library.getContainedName('x');
ParameterizedType type1 = x.returnType;
@@ -781,7 +708,7 @@
typedef T F<T extends num>();
final x = new List<F>();
''');
- LibraryElementForLink library = linker.getLibrary(linkerInputs.testDartUri);
+ LibraryElementForLink library = linker.getLibrary(testDartUri);
library.libraryCycleForLink.ensureLinked();
PropertyAccessorElementForLink_Variable x = library.getContainedName('x');
ParameterizedType type1 = x.returnType;
@@ -801,7 +728,7 @@
'f': f
};
''');
- LibraryElementForLink library = linker.getLibrary(linkerInputs.testDartUri);
+ LibraryElementForLink library = linker.getLibrary(testDartUri);
library.libraryCycleForLink.ensureLinked();
// No assertions--just make sure it doesn't crash.
}
@@ -903,7 +830,7 @@
void f() {}
}
''');
- LibraryElementForLink library = linker.getLibrary(linkerInputs.testDartUri);
+ LibraryElementForLink library = linker.getLibrary(testDartUri);
library.libraryCycleForLink.ensureLinked();
// No assertions--just make sure it doesn't crash.
}
@@ -938,21 +865,21 @@
void test_topLevelFunction_isStatic() {
createLinker('f() {}');
- LibraryElementForLink library = linker.getLibrary(linkerInputs.testDartUri);
+ LibraryElementForLink library = linker.getLibrary(testDartUri);
TopLevelFunctionElementForLink f = library.getContainedName('f');
expect(f.isStatic, true);
}
void test_topLevelGetter_isStatic() {
createLinker('get x => null;');
- LibraryElementForLink library = linker.getLibrary(linkerInputs.testDartUri);
+ LibraryElementForLink library = linker.getLibrary(testDartUri);
PropertyAccessorElementForLink_Executable x = library.getContainedName('x');
expect(x.isStatic, true);
}
void test_topLevelSetter_isStatic() {
createLinker('void set x(value) {}');
- LibraryElementForLink library = linker.getLibrary(linkerInputs.testDartUri);
+ LibraryElementForLink library = linker.getLibrary(testDartUri);
PropertyAccessorElementForLink_Executable x =
library.getContainedName('x=');
expect(x.isStatic, true);
@@ -960,7 +887,7 @@
void test_topLevelVariable_isStatic() {
createLinker('var x;');
- LibraryElementForLink library = linker.getLibrary(linkerInputs.testDartUri);
+ LibraryElementForLink library = linker.getLibrary(testDartUri);
PropertyAccessorElementForLink_Variable x = library.getContainedName('x');
expect(x.isStatic, true);
expect(x.variable.isStatic, true);
@@ -1019,7 +946,7 @@
int j;
var v = 0;
''');
- LibraryElementForLink library = linker.getLibrary(linkerInputs.testDartUri);
+ LibraryElementForLink library = linker.getLibrary(testDartUri);
PropertyAccessorElementForLink_Variable c = library.getContainedName('c');
expect(c.variable.initializer, isNotNull);
PropertyAccessorElementForLink_Variable i = library.getContainedName('i');
diff --git a/pkg/analyzer/test/src/summary/prelinker_test.dart b/pkg/analyzer/test/src/summary/prelinker_test.dart
index abc11be..6ac254a 100644
--- a/pkg/analyzer/test/src/summary/prelinker_test.dart
+++ b/pkg/analyzer/test/src/summary/prelinker_test.dart
@@ -2,12 +2,10 @@
// 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/summary/idl.dart';
-import 'package:analyzer/src/summary/prelink.dart';
import 'package:test_reflective_loader/test_reflective_loader.dart';
-import 'summarize_ast_test.dart';
import 'summary_common.dart';
+import 'test_strategies.dart';
main() {
defineReflectiveSuite(() {
@@ -15,34 +13,11 @@
});
}
-/**
- * Override of [SummaryTest] which verifies the correctness of the prelinker by
- * creating summaries from the element model, discarding their prelinked
- * information, and then recreating it using the prelinker.
- */
+/// Tests for the pre-linker which exercise it using the old (two-phase) summary
+/// generation strategy.
+///
+/// TODO(paulberry): eliminate these tests once we have transitioned over to
+/// one-step summary generation.
@reflectiveTest
-class PrelinkerTest extends LinkedSummarizeAstTest {
- @override
- bool get skipFullyLinkedData => true;
-
- @override
- void serializeLibraryText(String text, {bool allowErrors: false}) {
- super.serializeLibraryText(text, allowErrors: allowErrors);
-
- UnlinkedUnit getPart(String absoluteUri) {
- return linkerInputs.getUnit(absoluteUri);
- }
-
- UnlinkedPublicNamespace getImport(String absoluteUri) {
- return getPart(absoluteUri)?.publicNamespace;
- }
-
- linked = new LinkedLibrary.fromBuffer(prelink(
- linkerInputs.testDartUri.toString(),
- linkerInputs.unlinkedDefiningUnit,
- getPart,
- getImport,
- (String declaredVariable) => null).toBuffer());
- validateLinkedLibrary(linked);
- }
-}
+class PrelinkerTest extends SummaryBlackBoxTestStrategyPrelink
+ with SummaryTestCases {}
diff --git a/pkg/analyzer/test/src/summary/resynthesize_ast_test.dart b/pkg/analyzer/test/src/summary/resynthesize_ast_test.dart
index 43cccd7..c103ef5 100644
--- a/pkg/analyzer/test/src/summary/resynthesize_ast_test.dart
+++ b/pkg/analyzer/test/src/summary/resynthesize_ast_test.dart
@@ -28,7 +28,7 @@
import '../context/abstract_context.dart';
import 'element_text.dart';
import 'resynthesize_common.dart';
-import 'summary_common.dart';
+import 'test_strategies.dart';
main() {
defineReflectiveSuite(() {
@@ -94,7 +94,7 @@
.toSet();
Map<String, LinkedLibrary> linkedSummaries = link(nonSdkLibraryUris,
- getDependency, getUnit, context.declaredVariables.get, true);
+ getDependency, getUnit, context.declaredVariables.get);
return new TestSummaryResynthesizer(
context,
@@ -259,7 +259,9 @@
@override
AnalysisOptionsImpl createOptions() {
if (isStrongMode) {
- return super.createOptions()..previewDart2 = true;
+ return super.createOptions()
+ ..previewDart2 = true
+ ..isMixinSupportEnabled = true;
} else {
return super.createOptions()..previewDart2 = false;
}
diff --git a/pkg/analyzer/test/src/summary/resynthesize_common.dart b/pkg/analyzer/test/src/summary/resynthesize_common.dart
index 50151bf..ccf3ed2 100644
--- a/pkg/analyzer/test/src/summary/resynthesize_common.dart
+++ b/pkg/analyzer/test/src/summary/resynthesize_common.dart
@@ -285,12 +285,22 @@
expect(resynthesized.source, original.source);
expect(resynthesized.librarySource, original.librarySource);
compareLineInfo(resynthesized.lineInfo, original.lineInfo);
+
expect(resynthesized.types.length, original.types.length,
reason: '$desc.types.length');
for (int i = 0; i < resynthesized.types.length; i++) {
compareClassElements(
resynthesized.types[i], original.types[i], original.types[i].name);
}
+
+ // TODO(scheglov) Uncomment once the tasks based implementation is ready.
+// expect(resynthesized.mixins.length, original.mixins.length,
+// reason: '$desc.mixins.length');
+// for (int i = 0; i < resynthesized.mixins.length; i++) {
+// compareClassElements(
+// resynthesized.mixins[i], original.mixins[i], original.mixins[i].name);
+// }
+
expect(resynthesized.topLevelVariables.length,
original.topLevelVariables.length,
reason: '$desc.topLevelVariables.length');
@@ -8991,7 +9001,7 @@
class C {
dynamic x;
C([@
- a/*location: test.dart;a?*/ dynamic this.x]);
+ a/*location: test.dart;a?*/ dynamic this.x = null]);
}
const dynamic a = null;
''');
@@ -9064,7 +9074,7 @@
checkElementText(library, r'''
const dynamic a = null;
dynamic f([@
- a/*location: test.dart;a?*/ () → dynamic g]) {}
+ a/*location: test.dart;a?*/ () → dynamic g = null]) {}
''');
}
@@ -9222,7 +9232,7 @@
checkElementText(library, r'''
const dynamic a = null;
dynamic f([@
- a/*location: test.dart;a?*/ dynamic x]) {}
+ a/*location: test.dart;a?*/ dynamic x = null]) {}
''');
}
@@ -9415,6 +9425,48 @@
}
}
+ test_mixin() async {
+ var library = await checkLibrary(r'''
+class A {}
+class B {}
+class C {}
+class D {}
+
+mixin M<T extends num, U> on A, B implements C, D {
+ T f;
+ U get g => 0;
+ set s(int v) {}
+ int m(double v) => 0;
+}
+''');
+ checkElementText(library, r'''
+class A {
+}
+class B {
+}
+class C {
+}
+class D {
+}
+mixin M<T extends num, U> on A, B implements C, D {
+ T f;
+ U get g {}
+ void set s(int v) {}
+ int m(double v) {}
+}
+''');
+ }
+
+ test_mixin_implicitObjectSuperclassConstraint() async {
+ var library = await checkLibrary(r'''
+mixin M {}
+''');
+ checkElementText(library, r'''
+mixin M on Object {
+}
+''');
+ }
+
test_nameConflict_exportedAndLocal() async {
namesThatCannotBeResolved.add('V');
addLibrarySource('/a.dart', 'class C {}');
diff --git a/pkg/analyzer/test/src/summary/resynthesize_kernel_test.dart b/pkg/analyzer/test/src/summary/resynthesize_kernel_test.dart
deleted file mode 100644
index 4e30ddc..0000000
--- a/pkg/analyzer/test/src/summary/resynthesize_kernel_test.dart
+++ /dev/null
@@ -1,287 +0,0 @@
-// 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.
-
-library analyzer.test.src.summary.resynthesize_kernel_test;
-
-import 'dart:async';
-import 'dart:typed_data';
-
-import 'package:analyzer/dart/element/element.dart';
-import 'package:analyzer/file_system/file_system.dart';
-import 'package:analyzer/file_system/memory_file_system.dart';
-import 'package:analyzer/src/dart/analysis/file_state.dart';
-import 'package:analyzer/src/dart/analysis/frontend_resolution.dart';
-import 'package:analyzer/src/dart/analysis/kernel_context.dart';
-import 'package:analyzer/src/dart/element/element.dart';
-import 'package:analyzer/src/generated/engine.dart';
-import 'package:analyzer/src/generated/source.dart';
-import 'package:analyzer/src/kernel/resynthesize.dart';
-import 'package:front_end/src/api_prototype/byte_store.dart';
-import 'package:front_end/src/base/performance_logger.dart';
-import 'package:test/src/frontend/expect.dart';
-import 'package:test_reflective_loader/test_reflective_loader.dart';
-
-import '../context/mock_sdk.dart';
-import 'element_text.dart';
-import 'resynthesize_common.dart';
-
-main() {
- defineReflectiveSuite(() {
- defineReflectiveTests(ResynthesizeTest_Kernel);
- });
-}
-
-/// Tests marked with this annotation fail because they test features that
-/// were implemented in Analyzer, but are intentionally not included into
-/// the Dart 2.0 plan, so will not be implemented by Fasta.
-const notForDart2 = const Object();
-
-/// Tests marked with this annotation fail because of a Fasta problem.
-class FastaProblem {
- const FastaProblem(String issueUri);
-}
-
-@reflectiveTest
-class ResynthesizeTest_Kernel extends ResynthesizeTest {
- final resourceProvider = new MemoryResourceProvider();
-
- @override
- bool get isSharedFrontEnd => true;
-
- @override
- bool get isStrongMode => true;
-
- @override
- Source addLibrarySource(String path, String content) {
- path = resourceProvider.convertPath(path);
- File file = resourceProvider.newFile(path, content);
- return file.createSource();
- }
-
- @override
- Source addSource(String path, String content) {
- path = resourceProvider.convertPath(path);
- File file = resourceProvider.newFile(path, content);
- return file.createSource();
- }
-
- @override
- Future<LibraryElementImpl> checkLibrary(String text,
- {bool allowErrors: false, bool dumpSummaries: false}) async {
- new MockSdk(resourceProvider: resourceProvider);
-
- String testPath = resourceProvider.convertPath('/test.dart');
- File testFile = resourceProvider.newFile(testPath, text);
- Uri testUri = testFile.toUri();
- String testUriStr = testUri.toString();
-
- KernelResynthesizer resynthesizer = await _createResynthesizer(testUri);
- return resynthesizer.getLibrary(testUriStr);
- }
-
- @failingTest
- @FastaProblem('https://github.com/dart-lang/sdk/issues/30857')
- test_class_constructor_field_formal_multiple_matching_fields() async {
- await super.test_class_constructor_field_formal_multiple_matching_fields();
- }
-
- @override
- test_class_setter_invalid_named_parameter() async {
- var library = await checkLibrary('class C { void set x({a}) {} }');
- checkElementText(library, r'''
-class C {
- void set x(dynamic #synthetic) {}
-}
-''');
- }
-
- @override
- test_class_setter_invalid_no_parameter() async {
- var library = await checkLibrary('class C { void set x() {} }');
- checkElementText(library, r'''
-class C {
- void set x(dynamic #synthetic) {}
-}
-''');
- }
-
- @override
- test_class_setter_invalid_optional_parameter() async {
- var library = await checkLibrary('class C { void set x([a]) {} }');
- checkElementText(library, r'''
-class C {
- void set x(dynamic #synthetic) {}
-}
-''');
- }
-
- @override
- test_class_setter_invalid_too_many_parameters() async {
- var library = await checkLibrary('class C { void set x(a, b) {} }');
- checkElementText(library, r'''
-class C {
- void set x(dynamic #synthetic) {}
-}
-''');
- }
-
- @failingTest // See dartbug.com/32290
- test_const_constructor_inferred_args() =>
- super.test_const_constructor_inferred_args();
-
- @failingTest
- @notForDart2
- test_export_configurations_useFirst() async {
- await super.test_export_configurations_useFirst();
- }
-
- @failingTest
- @notForDart2
- test_export_configurations_useSecond() async {
- await super.test_export_configurations_useSecond();
- }
-
- @failingTest
- @notForDart2
- test_exportImport_configurations_useFirst() async {
- await super.test_exportImport_configurations_useFirst();
- }
-
- test_getElement_unit() async {
- String text = 'class C {}';
- Source source = addLibrarySource('/test.dart', text);
-
- new MockSdk(resourceProvider: resourceProvider);
- var resynthesizer = await _createResynthesizer(source.uri);
-
- CompilationUnitElement unitElement = resynthesizer.getElement(
- new ElementLocationImpl.con3(
- [source.uri.toString(), source.uri.toString()]));
- expect(unitElement.librarySource, source);
- expect(unitElement.source, source);
-
- // TODO(scheglov) Add some more checks?
- // TODO(scheglov) Add tests for other elements
- }
-
- @failingTest
- @notForDart2
- test_import_configurations_useFirst() async {
- await super.test_import_configurations_useFirst();
- }
-
- @failingTest
- @FastaProblem('https://github.com/dart-lang/sdk/issues/30725')
- test_import_invalidUri_metadata() async {
- await super.test_import_invalidUri_metadata();
- }
-
- @failingTest
- @FastaProblem('https://github.com/dart-lang/sdk/issues/30267')
- test_invalid_nameConflict_imported() async {
- await super.test_invalid_nameConflict_imported();
- }
-
- @failingTest
- @FastaProblem('https://github.com/dart-lang/sdk/issues/30267')
- test_invalid_nameConflict_imported_exported() async {
- await super.test_invalid_nameConflict_imported_exported();
- }
-
- @failingTest
- @FastaProblem('https://github.com/dart-lang/sdk/issues/30267')
- test_invalid_nameConflict_local() async {
- await super.test_invalid_nameConflict_local();
- }
-
- @failingTest
- @FastaProblem('https://github.com/dart-lang/sdk/issues/30725')
- test_invalidUri_part_emptyUri() async {
- await super.test_invalidUri_part_emptyUri();
- }
-
- @failingTest
- test_invalidUris() async {
- await super.test_invalidUris();
- }
-
- @failingTest
- test_metadata_enumConstantDeclaration() async {
- await super.test_metadata_enumConstantDeclaration();
- }
-
- @failingTest
- @notForDart2
- test_parameter_checked_inherited() async {
- // @checked is deprecated, use `covariant` instead.
- await super.test_parameter_checked_inherited();
- }
-
- @override
- @failingTest
- @FastaProblem('https://github.com/dart-lang/sdk/issues/33719')
- test_parts_invalidUri() async {
- await super.test_parts_invalidUri();
- }
-
- @failingTest
- test_setter_inferred_type_conflictingInheritance() async {
- await super.test_setter_inferred_type_conflictingInheritance();
- }
-
- @failingTest
- @FastaProblem('https://github.com/dart-lang/sdk/issues/30267')
- test_unresolved_annotation_instanceCreation_argument_super() async {
- await super.test_unresolved_annotation_instanceCreation_argument_super();
- }
-
- @override
- @failingTest
- @FastaProblem('https://github.com/dart-lang/sdk/issues/33719')
- test_unresolved_export() async {
- await super.test_unresolved_export();
- }
-
- @override
- @failingTest
- @FastaProblem('https://github.com/dart-lang/sdk/issues/33719')
- test_unresolved_import() async {
- await super.test_unresolved_import();
- }
-
- @override
- @failingTest
- @FastaProblem('https://github.com/dart-lang/sdk/issues/33719')
- test_unresolved_part() async {
- await super.test_unresolved_part();
- }
-
- Future<KernelResynthesizer> _createResynthesizer(Uri testUri) async {
- var logger = new PerformanceLog(null);
- var byteStore = new MemoryByteStore();
- var analysisOptions = new AnalysisOptionsImpl();
-
- var fsState = new FileSystemState(
- logger,
- byteStore,
- new FileContentOverlay(),
- resourceProvider,
- sourceFactory,
- analysisOptions,
- new Uint32List(0));
-
- var compiler = new FrontEndCompiler(
- logger,
- new MemoryByteStore(),
- analysisOptions,
- null,
- sourceFactory,
- fsState,
- resourceProvider.pathContext);
-
- LibraryCompilationResult libraryResult = await compiler.compile(testUri);
-
- return KernelContext.buildResynthesizer(fsState, libraryResult, context);
- }
-}
diff --git a/pkg/analyzer/test/src/summary/summarize_ast_one_phase_test.dart b/pkg/analyzer/test/src/summary/summarize_ast_one_phase_test.dart
new file mode 100644
index 0000000..10863d3
--- /dev/null
+++ b/pkg/analyzer/test/src/summary/summarize_ast_one_phase_test.dart
@@ -0,0 +1,108 @@
+// 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:test_reflective_loader/test_reflective_loader.dart';
+
+import 'summary_common.dart';
+import 'test_strategies.dart';
+
+main() {
+ defineReflectiveSuite(() {
+ defineReflectiveTests(SummarizeAstOnePhaseTest);
+ });
+}
+
+@reflectiveTest
+class SummarizeAstOnePhaseTest extends SummaryBlackBoxTestStrategyOnePhase
+ with SummaryTestCases {
+ @override
+ @failingTest
+ test_bottom_reference_shared() {
+ super.test_bottom_reference_shared();
+ }
+
+ @override
+ @failingTest
+ test_closure_executable_with_imported_return_type() {
+ super.test_closure_executable_with_imported_return_type();
+ }
+
+ @override
+ @failingTest
+ test_closure_executable_with_return_type_from_closure() {
+ super.test_closure_executable_with_return_type_from_closure();
+ }
+
+ @override
+ @failingTest
+ test_closure_executable_with_unimported_return_type() {
+ super.test_closure_executable_with_unimported_return_type();
+ }
+
+ @override
+ @failingTest
+ test_implicit_dependencies_follow_other_dependencies() {
+ super.test_implicit_dependencies_follow_other_dependencies();
+ }
+
+ @override
+ @failingTest
+ test_inferred_type_refers_to_function_typed_param_of_typedef() {
+ super.test_inferred_type_refers_to_function_typed_param_of_typedef();
+ }
+
+ @override
+ @failingTest
+ test_inferred_type_refers_to_nested_function_typed_param() {
+ super.test_inferred_type_refers_to_nested_function_typed_param();
+ }
+
+ @override
+ @failingTest
+ test_inferred_type_refers_to_nested_function_typed_param_named() {
+ super.test_inferred_type_refers_to_nested_function_typed_param_named();
+ }
+
+ @override
+ @failingTest
+ test_initializer_executable_with_bottom_return_type() {
+ super.test_initializer_executable_with_bottom_return_type();
+ }
+
+ @override
+ @failingTest
+ test_initializer_executable_with_imported_return_type() {
+ super.test_initializer_executable_with_imported_return_type();
+ }
+
+ @override
+ @failingTest
+ test_initializer_executable_with_return_type_from_closure() {
+ super.test_initializer_executable_with_return_type_from_closure();
+ }
+
+ @override
+ @failingTest
+ test_initializer_executable_with_return_type_from_closure_field() {
+ super.test_initializer_executable_with_return_type_from_closure_field();
+ }
+
+ @override
+ @failingTest
+ test_initializer_executable_with_unimported_return_type() {
+ super.test_initializer_executable_with_unimported_return_type();
+ }
+
+ @override
+ @failingTest
+ test_syntheticFunctionType_genericClosure() {
+ super.test_syntheticFunctionType_genericClosure();
+ }
+
+ @override
+ @failingTest
+ test_syntheticFunctionType_inGenericClass() {
+ super.test_syntheticFunctionType_inGenericClass();
+ }
+}
diff --git a/pkg/analyzer/test/src/summary/summarize_ast_strong_test.dart b/pkg/analyzer/test/src/summary/summarize_ast_strong_test.dart
index a6f9de1..6c2d84c 100644
--- a/pkg/analyzer/test/src/summary/summarize_ast_strong_test.dart
+++ b/pkg/analyzer/test/src/summary/summarize_ast_strong_test.dart
@@ -4,7 +4,8 @@
import 'package:test_reflective_loader/test_reflective_loader.dart';
-import 'summarize_ast_test.dart';
+import 'summary_common.dart';
+import 'test_strategies.dart';
main() {
defineReflectiveSuite(() {
@@ -12,11 +13,9 @@
});
}
-/**
- * Override of [LinkedSummarizeAstTest] which uses strong mode.
- */
@reflectiveTest
-class LinkedSummarizeAstStrongTest extends LinkedSummarizeAstTest {
+class LinkedSummarizeAstStrongTest extends SummaryBlackBoxTestStrategyTwoPhase
+ with SummaryTestCases {
@override
@failingTest
test_bottom_reference_shared() {
diff --git a/pkg/analyzer/test/src/summary/summarize_ast_test.dart b/pkg/analyzer/test/src/summary/summarize_ast_test.dart
deleted file mode 100644
index 9cdd293..0000000
--- a/pkg/analyzer/test/src/summary/summarize_ast_test.dart
+++ /dev/null
@@ -1,254 +0,0 @@
-// 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 'package:analyzer/analyzer.dart';
-import 'package:analyzer/dart/ast/ast.dart';
-import 'package:analyzer/dart/ast/token.dart';
-import 'package:analyzer/error/listener.dart';
-import 'package:analyzer/src/dart/scanner/reader.dart';
-import 'package:analyzer/src/dart/scanner/scanner.dart';
-import 'package:analyzer/src/generated/parser.dart';
-import 'package:analyzer/src/generated/source.dart';
-import 'package:analyzer/src/summary/format.dart';
-import 'package:analyzer/src/summary/idl.dart';
-import 'package:analyzer/src/summary/link.dart';
-import 'package:analyzer/src/summary/package_bundle_reader.dart';
-import 'package:analyzer/src/summary/summarize_ast.dart';
-import 'package:analyzer/src/summary/summarize_elements.dart';
-import 'package:test/test.dart';
-import 'package:test_reflective_loader/test_reflective_loader.dart';
-
-import 'summary_common.dart';
-
-main() {}
-
-/**
- * Override of [SummaryTest] which creates linked summaries directly from the
- * AST.
- */
-@reflectiveTest
-abstract class LinkedSummarizeAstTest extends SummaryLinkerTest
- with SummaryTest {
- @override
- LinkedLibrary linked;
-
- @override
- List<UnlinkedUnit> unlinkedUnits;
-
- LinkerInputs linkerInputs;
-
- @override
- bool get skipFullyLinkedData => false;
-
- @override
- void serializeLibraryText(String text, {bool allowErrors: false}) {
- Map<String, UnlinkedUnitBuilder> uriToUnit = this._filesToLink.uriToUnit;
- linkerInputs = createLinkerInputs(text);
- linked = link(
- linkerInputs.linkedLibraries,
- linkerInputs.getDependency,
- linkerInputs.getUnit,
- (name) => null,
- true)[linkerInputs.testDartUri.toString()];
- expect(linked, isNotNull);
- validateLinkedLibrary(linked);
- unlinkedUnits = <UnlinkedUnit>[linkerInputs.unlinkedDefiningUnit];
- for (String relativeUriStr
- in linkerInputs.unlinkedDefiningUnit.publicNamespace.parts) {
- Uri relativeUri;
- try {
- relativeUri = Uri.parse(relativeUriStr);
- } on FormatException {
- unlinkedUnits.add(new UnlinkedUnitBuilder());
- continue;
- }
-
- UnlinkedUnit unit = uriToUnit[
- resolveRelativeUri(linkerInputs.testDartUri, relativeUri).toString()];
- if (unit == null) {
- if (!allowMissingFiles) {
- fail('Test referred to unknown unit $relativeUriStr');
- }
- } else {
- unlinkedUnits.add(unit);
- }
- }
- }
-
- test_class_no_superclass() {
- UnlinkedClass cls = serializeClassText('part of dart.core; class Object {}',
- className: 'Object');
- expect(cls.supertype, isNull);
- expect(cls.hasNoSupertype, isTrue);
- }
-}
-
-/**
- * Instances of the class [LinkerInputs] encapsulate the necessary information
- * to pass to the summary linker.
- */
-class LinkerInputs {
- final bool _allowMissingFiles;
- final Map<String, UnlinkedUnit> _uriToUnit;
- final Uri testDartUri;
- final UnlinkedUnit unlinkedDefiningUnit;
- final Map<String, LinkedLibrary> _dependentLinkedLibraries;
- final Map<String, UnlinkedUnit> _dependentUnlinkedUnits;
-
- LinkerInputs(
- this._allowMissingFiles,
- this._uriToUnit,
- this.testDartUri,
- this.unlinkedDefiningUnit,
- this._dependentLinkedLibraries,
- this._dependentUnlinkedUnits);
-
- Set<String> get linkedLibraries => _uriToUnit.keys.toSet();
-
- String getDeclaredVariable(String name) {
- return null;
- }
-
- LinkedLibrary getDependency(String absoluteUri) {
- Map<String, LinkedLibrary> sdkLibraries =
- SerializedMockSdk.instance.uriToLinkedLibrary;
- LinkedLibrary linkedLibrary =
- sdkLibraries[absoluteUri] ?? _dependentLinkedLibraries[absoluteUri];
- if (linkedLibrary == null && !_allowMissingFiles) {
- Set<String> librariesAvailable = sdkLibraries.keys.toSet();
- librariesAvailable.addAll(_dependentLinkedLibraries.keys);
- fail('Linker unexpectedly requested LinkedLibrary for "$absoluteUri".'
- ' Libraries available: ${librariesAvailable.toList()}');
- }
- return linkedLibrary;
- }
-
- UnlinkedUnit getUnit(String absoluteUri) {
- if (absoluteUri == null) {
- return null;
- }
- UnlinkedUnit unit = _uriToUnit[absoluteUri] ??
- SerializedMockSdk.instance.uriToUnlinkedUnit[absoluteUri] ??
- _dependentUnlinkedUnits[absoluteUri];
- if (unit == null && !_allowMissingFiles) {
- fail('Linker unexpectedly requested unit for "$absoluteUri".');
- }
- return unit;
- }
-}
-
-/**
- * Base class providing the ability to run the summary linker using summaries
- * build from ASTs.
- */
-abstract class SummaryLinkerTest {
- /**
- * Information about the files to be linked.
- */
- _FilesToLink _filesToLink = new _FilesToLink();
-
- /**
- * A test will set this to `true` if it contains `import`, `export`, or
- * `part` declarations that deliberately refer to non-existent files.
- */
- bool get allowMissingFiles;
-
- /**
- * Add the given package bundle as a dependency so that it may be referenced
- * by the files under test.
- */
- void addBundle(String path, PackageBundle bundle) {
- _filesToLink.summaryDataStore.addBundle(path, bundle);
- }
-
- /**
- * Add the given source file so that it may be referenced by the file under
- * test.
- */
- Source addNamedSource(String filePath, String contents) {
- CompilationUnit unit = _parseText(contents);
- UnlinkedUnitBuilder unlinkedUnit = serializeAstUnlinked(unit);
- _filesToLink.uriToUnit[absUri(filePath)] = unlinkedUnit;
- // Tests using SummaryLinkerTest don't actually need the returned
- // Source, so we can safely return `null`.
- return null;
- }
-
- LinkerInputs createLinkerInputs(String text,
- {String path: '/test.dart', String uri}) {
- uri ??= absUri(path);
- Uri testDartUri = Uri.parse(uri);
- UnlinkedUnitBuilder unlinkedDefiningUnit =
- createUnlinkedSummary(testDartUri, text);
- _filesToLink.uriToUnit[testDartUri.toString()] = unlinkedDefiningUnit;
- LinkerInputs linkerInputs = new LinkerInputs(
- allowMissingFiles,
- _filesToLink.uriToUnit,
- testDartUri,
- unlinkedDefiningUnit,
- _filesToLink.summaryDataStore.linkedMap,
- _filesToLink.summaryDataStore.unlinkedMap);
- // Reset _filesToLink in case the test needs to start a new package bundle.
- _filesToLink = new _FilesToLink();
- return linkerInputs;
- }
-
- /**
- * Link together the given file, along with any other files passed to
- * [addNamedSource], to form a package bundle. Reset the state of the buffers
- * accumulated by [addNamedSource] and [addBundle] so that further bundles
- * can be created.
- */
- PackageBundleBuilder createPackageBundle(String text,
- {String path: '/test.dart', String uri}) {
- PackageBundleAssembler assembler = new PackageBundleAssembler();
- LinkerInputs linkerInputs = createLinkerInputs(text, path: path, uri: uri);
- Map<String, LinkedLibraryBuilder> linkedLibraries = link(
- linkerInputs.linkedLibraries,
- linkerInputs.getDependency,
- linkerInputs.getUnit,
- linkerInputs.getDeclaredVariable,
- true);
- linkedLibraries.forEach(assembler.addLinkedLibrary);
- linkerInputs._uriToUnit.forEach((String uri, UnlinkedUnit unit) {
- // Note: it doesn't matter what we store for the hash because it isn't
- // used in these tests.
- assembler.addUnlinkedUnitWithHash(uri, unit, 'HASH');
- });
- return assembler.assemble();
- }
-
- UnlinkedUnitBuilder createUnlinkedSummary(Uri uri, String text) =>
- serializeAstUnlinked(_parseText(text));
-
- CompilationUnit _parseText(String text) {
- CharSequenceReader reader = new CharSequenceReader(text);
- Scanner scanner =
- new Scanner(null, reader, AnalysisErrorListener.NULL_LISTENER);
- Token token = scanner.tokenize();
- Parser parser = new Parser(
- NonExistingSource.unknown, AnalysisErrorListener.NULL_LISTENER);
- CompilationUnit unit = parser.parseCompilationUnit(token);
- unit.lineInfo = new LineInfo(scanner.lineStarts);
- return unit;
- }
-}
-
-/**
- * [_FilesToLink] stores information about a set of files to be linked together.
- * This information is grouped into a class to allow it to be reset easily when
- * [SummaryLinkerTest.createLinkerInputs] is called.
- */
-class _FilesToLink {
- /**
- * Map from absolute URI to the [UnlinkedUnit] for each compilation unit
- * passed to [addNamedSource].
- */
- Map<String, UnlinkedUnitBuilder> uriToUnit = <String, UnlinkedUnitBuilder>{};
-
- /**
- * Information about summaries to be included in the link process.
- */
- SummaryDataStore summaryDataStore = new SummaryDataStore([]);
-}
diff --git a/pkg/analyzer/test/src/summary/summary_common.dart b/pkg/analyzer/test/src/summary/summary_common.dart
index 980639d..22eb0d3 100644
--- a/pkg/analyzer/test/src/summary/summary_common.dart
+++ b/pkg/analyzer/test/src/summary/summary_common.dart
@@ -14,18 +14,9 @@
import 'package:analyzer/src/summary/idl.dart';
import 'package:analyzer/src/summary/public_namespace_computer.dart'
as public_namespace;
-import 'package:path/path.dart' show posix;
import 'package:test/test.dart';
-import '../context/mock_sdk.dart';
-
-/**
- * Convert the given Posix style file [path] to the corresponding absolute URI.
- */
-String absUri(String path) {
- String absolutePath = posix.absolute(path);
- return posix.toUri(absolutePath).toString();
-}
+import 'test_strategies.dart';
/**
* Convert a summary object (or a portion of one) into a canonical form that
@@ -83,85 +74,18 @@
*/
typedef void _EntityRefValidator(EntityRef entityRef);
-/**
- * [SerializedMockSdk] is a singleton class representing the result of
- * serializing the mock SDK to summaries. It is computed once and then shared
- * among test invocations so that we don't bog down the tests.
- *
- * Note: should an exception occur during computation of [instance], it will
- * silently be set to null to allow other tests to complete quickly.
- */
-class SerializedMockSdk {
- static final SerializedMockSdk instance = _serializeMockSdk();
-
- final Map<String, UnlinkedUnit> uriToUnlinkedUnit;
-
- final Map<String, LinkedLibrary> uriToLinkedLibrary;
- SerializedMockSdk._(this.uriToUnlinkedUnit, this.uriToLinkedLibrary);
-
- static SerializedMockSdk _serializeMockSdk() {
- try {
- Map<String, UnlinkedUnit> uriToUnlinkedUnit = <String, UnlinkedUnit>{};
- Map<String, LinkedLibrary> uriToLinkedLibrary = <String, LinkedLibrary>{};
- PackageBundle bundle = new MockSdk().getLinkedBundle();
- for (int i = 0; i < bundle.unlinkedUnitUris.length; i++) {
- String uri = bundle.unlinkedUnitUris[i];
- uriToUnlinkedUnit[uri] = bundle.unlinkedUnits[i];
- }
- for (int i = 0; i < bundle.linkedLibraryUris.length; i++) {
- String uri = bundle.linkedLibraryUris[i];
- uriToLinkedLibrary[uri] = bundle.linkedLibraries[i];
- }
- return new SerializedMockSdk._(uriToUnlinkedUnit, uriToLinkedLibrary);
- } catch (_) {
- return null;
- }
- }
-}
-
-/**
- * Base class containing most summary tests. This allows summary tests to be
- * re-used to exercise all the different ways in which summaries can be
- * generated (e.g. direct from the AST, from the element model, from a
- * "relinking" process, etc.)
- */
-abstract class SummaryTest {
- /**
- * A test will set this to `true` if it contains `import`, `export`, or
- * `part` declarations that deliberately refer to non-existent files.
- */
- bool allowMissingFiles = false;
-
+/// Test cases that exercise summary generation in a black-box fashion.
+///
+/// These test cases may be mixed into any class derived from
+/// [SummaryBlackBoxTestStrategy], allowing summary generation to be unit-tested
+/// in a variety of ways.
+abstract class SummaryTestCases implements SummaryBlackBoxTestStrategy {
/**
* Get access to the linked defining compilation unit.
*/
LinkedUnit get definingUnit => linked.units[0];
/**
- * Get access to the linked summary that results from serializing and
- * then deserializing the library under test.
- */
- LinkedLibrary get linked;
-
- /**
- * `true` if the linked portion of the summary only contains prelinked data.
- * This happens because we don't yet have a full linker; only a prelinker.
- */
- bool get skipFullyLinkedData;
-
- /**
- * Get access to the unlinked compilation unit summaries that result from
- * serializing and deserializing the library under test.
- */
- List<UnlinkedUnit> get unlinkedUnits;
-
- /**
- * Add the given source file so that it may be referenced by the file under
- * test.
- */
- Source addNamedSource(String filePath, String contents);
-
- /**
* TODO(scheglov) rename "Const" to "Expr" everywhere
*/
void assertUnlinkedConst(UnlinkedExpr constExpr,
@@ -691,6 +615,26 @@
}
/**
+ * Find the mixin with the given [name] in the summary, and return its
+ * [UnlinkedClass] data structure.
+ */
+ UnlinkedClass findMixin(String name) {
+ UnlinkedClass result;
+ for (UnlinkedClass mixin in unlinkedUnits[0].mixins) {
+ if (mixin.name == name) {
+ if (result != null) {
+ fail('Duplicate mixin $name');
+ }
+ result = mixin;
+ }
+ }
+ if (result == null) {
+ fail('Mixin $name not found in serialized output.');
+ }
+ return result;
+ }
+
+ /**
* Find the parameter with the given [name] in [parameters].
*/
UnlinkedParam findParameter(List<UnlinkedParam> parameters, String name) {
@@ -798,12 +742,6 @@
}
/**
- * Serialize the given library [text], then deserialize it and store its
- * summary in [lib].
- */
- void serializeLibraryText(String text, {bool allowErrors: false});
-
- /**
* Serialize the given method [text] and return the summary of the executable
* with the given [executableName].
*/
@@ -816,6 +754,16 @@
}
/**
+ * Serialize the given library [text] and return the summary of the mixin
+ * with the given [name].
+ */
+ UnlinkedClass serializeMixinText(String text,
+ {String name: 'M', bool allowErrors: false}) {
+ serializeLibraryText(text, allowErrors: allowErrors);
+ return findMixin(name);
+ }
+
+ /**
* Serialize the given library [text] and return the summary of the typedef
* with the given [typedefName].
*/
@@ -1389,6 +1337,13 @@
expect(cls.mixins, isEmpty);
}
+ test_class_no_superclass() {
+ UnlinkedClass cls = serializeClassText('part of dart.core; class Object {}',
+ className: 'Object');
+ expect(cls.supertype, isNull);
+ expect(cls.hasNoSupertype, isTrue);
+ }
+
test_class_no_type_param() {
UnlinkedClass cls = serializeClassText('class C {}');
expect(cls.typeParameters, isEmpty);
@@ -8623,6 +8578,11 @@
.annotations);
}
+ test_metadata_mixinDeclaration() {
+ checkAnnotationA(
+ serializeMixinText('const a = null; @a mixin M {}').annotations);
+ }
+
test_metadata_multiple_annotations() {
UnlinkedClass cls =
serializeClassText('const a = null, b = null; @a @b class C {}');
@@ -8797,6 +8757,119 @@
expect(f.inferredReturnTypeSlot, 0);
}
+ test_mixin() {
+ UnlinkedClass mixin = serializeMixinText('mixin M {}');
+ expect(mixin.name, 'M');
+ expect(mixin.nameOffset, 6);
+
+ expect(mixin.executables, isEmpty);
+ expect(mixin.interfaces, isEmpty);
+ expect(mixin.mixins, isEmpty);
+ expect(mixin.superclassConstraints, isEmpty);
+ }
+
+ test_mixin_codeRange() {
+ UnlinkedClass mixin = serializeMixinText(' mixin M {}');
+ _assertCodeRange(mixin.codeRange, 1, 10);
+ }
+
+ test_mixin_documented() {
+ String text = '''
+// Extra comment so doc comment offset != 0
+/**
+ * Docs
+ */
+mixin M {}''';
+ UnlinkedClass mixin = serializeMixinText(text);
+ expect(mixin.documentationComment, isNotNull);
+ checkDocumentationComment(mixin.documentationComment, text);
+ }
+
+ test_mixin_documented_tripleSlash() {
+ String text = '''
+/// aaa
+/// bbbb
+/// cc
+mixin M {}''';
+ UnlinkedClass mixin = serializeMixinText(text);
+ UnlinkedDocumentationComment comment = mixin.documentationComment;
+ expect(comment, isNotNull);
+ expect(comment.text, '/// aaa\n/// bbbb\n/// cc');
+ }
+
+ test_mixin_executables() {
+ UnlinkedClass mixin = serializeMixinText(r'''
+mixin M {
+ double f;
+ int get g => 0;
+ set s(int v) {}
+ int m(int v) => 0;
+}
+''');
+ expect(mixin.fields, hasLength(1));
+ expect(mixin.fields[0].name, 'f');
+ checkTypeRef(mixin.fields[0].type, 'dart:core', 'double');
+
+ expect(mixin.executables, hasLength(3));
+
+ expect(mixin.executables[0].name, 'g');
+ expect(mixin.executables[0].kind, UnlinkedExecutableKind.getter);
+ checkTypeRef(mixin.executables[0].returnType, 'dart:core', 'int');
+
+ expect(mixin.executables[1].name, 's=');
+ expect(mixin.executables[1].kind, UnlinkedExecutableKind.setter);
+
+ expect(mixin.executables[2].name, 'm');
+ expect(mixin.executables[2].kind, UnlinkedExecutableKind.functionOrMethod);
+ checkTypeRef(mixin.executables[2].returnType, 'dart:core', 'int');
+ }
+
+ test_mixin_implements() {
+ UnlinkedClass mixin = serializeMixinText(r'''
+class A {}
+class B {}
+mixin M implements A, B {}
+''');
+ expect(mixin.executables, isEmpty);
+ expect(mixin.mixins, isEmpty);
+ expect(mixin.superclassConstraints, isEmpty);
+
+ expect(mixin.interfaces, hasLength(2));
+ checkTypeRef(mixin.interfaces[0], null, 'A');
+ checkTypeRef(mixin.interfaces[1], null, 'B');
+ }
+
+ test_mixin_superclassConstraints() {
+ UnlinkedClass mixin = serializeMixinText(r'''
+class A {}
+class B {}
+class C {}
+class D {}
+mixin M on A, B implements C, D {}
+''');
+ expect(mixin.executables, isEmpty);
+ expect(mixin.mixins, isEmpty);
+
+ expect(mixin.superclassConstraints, hasLength(2));
+ checkTypeRef(mixin.superclassConstraints[0], null, 'A');
+ checkTypeRef(mixin.superclassConstraints[1], null, 'B');
+
+ expect(mixin.interfaces, hasLength(2));
+ checkTypeRef(mixin.interfaces[0], null, 'C');
+ checkTypeRef(mixin.interfaces[1], null, 'D');
+ }
+
+ test_mixin_typeParameters() {
+ UnlinkedClass mixin = serializeMixinText('mixin M<T extends num, U> {}');
+ expect(mixin.typeParameters, hasLength(2));
+
+ expect(mixin.typeParameters[0].name, 'T');
+ checkTypeRef(mixin.typeParameters[0].bound, 'dart:core', 'num');
+
+ expect(mixin.typeParameters[1].name, 'U');
+ expect(mixin.typeParameters[1].bound, isNull);
+ }
+
test_nested_generic_functions() {
UnlinkedExecutable executable = serializeVariableText('''
var v = (() {
@@ -9831,42 +9904,6 @@
}
/**
- * Verify invariants of the given [linkedLibrary].
- */
- void validateLinkedLibrary(LinkedLibrary linkedLibrary) {
- for (LinkedUnit unit in linkedLibrary.units) {
- for (LinkedReference reference in unit.references) {
- switch (reference.kind) {
- case ReferenceKind.classOrEnum:
- case ReferenceKind.topLevelPropertyAccessor:
- case ReferenceKind.topLevelFunction:
- case ReferenceKind.typedef:
- // This reference can have either a zero or a nonzero dependency,
- // since it refers to top level element which might or might not be
- // imported from another library.
- break;
- case ReferenceKind.prefix:
- // Prefixes should have a dependency of 0, since they come from the
- // current library.
- expect(reference.dependency, 0,
- reason: 'Nonzero dependency for prefix');
- break;
- case ReferenceKind.unresolved:
- // Unresolved references always have a dependency of 0.
- expect(reference.dependency, 0,
- reason: 'Nonzero dependency for undefined');
- break;
- default:
- // This reference should have a dependency of 0, since it refers to
- // an element that is contained within some other element.
- expect(reference.dependency, 0,
- reason: 'Nonzero dependency for ${reference.kind}');
- }
- }
- }
- }
-
- /**
* Assert that serializing the given [expr] of form `(a op= 1 + 2) + 3`
* uses the given [expectedAssignOperator].
*/
diff --git a/pkg/analyzer/test/src/summary/test_all.dart b/pkg/analyzer/test/src/summary/test_all.dart
index d064155..fd2f7a4 100644
--- a/pkg/analyzer/test/src/summary/test_all.dart
+++ b/pkg/analyzer/test/src/summary/test_all.dart
@@ -11,9 +11,8 @@
import 'package_bundle_reader_test.dart' as package_bundle_reader_test;
import 'prelinker_test.dart' as prelinker_test;
import 'resynthesize_ast_test.dart' as resynthesize_ast_test;
-import 'resynthesize_kernel_test.dart' as resynthesize_kernel_test;
+import 'summarize_ast_one_phase_test.dart' as summarize_ast_one_phase_test;
import 'summarize_ast_strong_test.dart' as summarize_ast_strong_test;
-import 'summarize_ast_test.dart' as summarize_ast_test;
import 'top_level_inference_test.dart' as top_level_inference_test;
main() {
@@ -25,9 +24,8 @@
package_bundle_reader_test.main();
prelinker_test.main();
resynthesize_ast_test.main();
- resynthesize_kernel_test.main();
+ summarize_ast_one_phase_test.main();
summarize_ast_strong_test.main();
- summarize_ast_test.main();
top_level_inference_test.main();
}, name: 'summary');
}
diff --git a/pkg/analyzer/test/src/summary/test_strategies.dart b/pkg/analyzer/test/src/summary/test_strategies.dart
new file mode 100644
index 0000000..b12f5da
--- /dev/null
+++ b/pkg/analyzer/test/src/summary/test_strategies.dart
@@ -0,0 +1,565 @@
+// 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:analyzer/dart/ast/ast.dart';
+import 'package:analyzer/dart/ast/token.dart';
+import 'package:analyzer/error/listener.dart';
+import 'package:analyzer/src/dart/scanner/reader.dart';
+import 'package:analyzer/src/dart/scanner/scanner.dart';
+import 'package:analyzer/src/generated/parser.dart';
+import 'package:analyzer/src/generated/source.dart';
+import 'package:analyzer/src/generated/utilities_dart.dart';
+import 'package:analyzer/src/summary/format.dart';
+import 'package:analyzer/src/summary/idl.dart';
+import 'package:analyzer/src/summary/link.dart';
+import 'package:analyzer/src/summary/one_phase.dart';
+import 'package:analyzer/src/summary/package_bundle_reader.dart';
+import 'package:analyzer/src/summary/prelink.dart';
+import 'package:analyzer/src/summary/summarize_ast.dart';
+import 'package:analyzer/src/summary/summarize_elements.dart';
+import 'package:path/path.dart' show posix;
+import 'package:test/test.dart';
+
+import '../context/mock_sdk.dart';
+
+/**
+ * Convert the given Posix style file [path] to the corresponding absolute URI.
+ */
+String absUri(String path) {
+ String absolutePath = posix.absolute(path);
+ return posix.toUri(absolutePath).toString();
+}
+
+CompilationUnit _parseText(String text) {
+ CharSequenceReader reader = new CharSequenceReader(text);
+ Scanner scanner =
+ new Scanner(null, reader, AnalysisErrorListener.NULL_LISTENER);
+ Token token = scanner.tokenize();
+ Parser parser = new Parser(
+ NonExistingSource.unknown, AnalysisErrorListener.NULL_LISTENER);
+ (parser as ParserAdapter).fastaParser.isMixinSupportEnabled = true;
+ CompilationUnit unit = parser.parseCompilationUnit(token);
+ unit.lineInfo = new LineInfo(scanner.lineStarts);
+ return unit;
+}
+
+/**
+ * Verify invariants of the given [linkedLibrary].
+ */
+void _validateLinkedLibrary(LinkedLibrary linkedLibrary) {
+ for (LinkedUnit unit in linkedLibrary.units) {
+ for (LinkedReference reference in unit.references) {
+ switch (reference.kind) {
+ case ReferenceKind.classOrEnum:
+ case ReferenceKind.topLevelPropertyAccessor:
+ case ReferenceKind.topLevelFunction:
+ case ReferenceKind.typedef:
+ // This reference can have either a zero or a nonzero dependency,
+ // since it refers to top level element which might or might not be
+ // imported from another library.
+ break;
+ case ReferenceKind.prefix:
+ // Prefixes should have a dependency of 0, since they come from the
+ // current library.
+ expect(reference.dependency, 0,
+ reason: 'Nonzero dependency for prefix');
+ break;
+ case ReferenceKind.unresolved:
+ // Unresolved references always have a dependency of 0.
+ expect(reference.dependency, 0,
+ reason: 'Nonzero dependency for undefined');
+ break;
+ default:
+ // This reference should have a dependency of 0, since it refers to
+ // an element that is contained within some other element.
+ expect(reference.dependency, 0,
+ reason: 'Nonzero dependency for ${reference.kind}');
+ }
+ }
+ }
+}
+
+/**
+ * [SerializedMockSdk] is a singleton class representing the result of
+ * serializing the mock SDK to summaries. It is computed once and then shared
+ * among test invocations so that we don't bog down the tests.
+ *
+ * Note: should an exception occur during computation of [instance], it will
+ * silently be set to null to allow other tests to complete quickly.
+ */
+class SerializedMockSdk {
+ static final SerializedMockSdk instance = _serializeMockSdk();
+
+ final Map<String, UnlinkedUnit> uriToUnlinkedUnit;
+
+ final Map<String, LinkedLibrary> uriToLinkedLibrary;
+ SerializedMockSdk._(this.uriToUnlinkedUnit, this.uriToLinkedLibrary);
+
+ static SerializedMockSdk _serializeMockSdk() {
+ try {
+ Map<String, UnlinkedUnit> uriToUnlinkedUnit = <String, UnlinkedUnit>{};
+ Map<String, LinkedLibrary> uriToLinkedLibrary = <String, LinkedLibrary>{};
+ PackageBundle bundle = new MockSdk().getLinkedBundle();
+ for (int i = 0; i < bundle.unlinkedUnitUris.length; i++) {
+ String uri = bundle.unlinkedUnitUris[i];
+ uriToUnlinkedUnit[uri] = bundle.unlinkedUnits[i];
+ }
+ for (int i = 0; i < bundle.linkedLibraryUris.length; i++) {
+ String uri = bundle.linkedLibraryUris[i];
+ uriToLinkedLibrary[uri] = bundle.linkedLibraries[i];
+ }
+ return new SerializedMockSdk._(uriToUnlinkedUnit, uriToLinkedLibrary);
+ } catch (_) {
+ return null;
+ }
+ }
+}
+
+/// Abstract base class for tests involving summaries.
+///
+/// Test classes should not extend this class directly; they should extend a
+/// class that implements this class with methods that drive summary generation.
+/// The tests themselves can then be provided via mixin, allowing summaries to
+/// be tested in a variety of ways.
+abstract class SummaryBaseTestStrategy {
+ /**
+ * Add the given source file so that it may be referenced by the file under
+ * test.
+ */
+ void addNamedSource(String filePath, String contents);
+}
+
+/// Abstract base class for black-box tests of summaries.
+///
+/// Test classes should not extend this class directly; they should extend a
+/// class that implements this class with methods that drive summary generation.
+/// The tests themselves can then be provided via mixin, allowing summaries to
+/// be tested in a variety of ways.
+abstract class SummaryBlackBoxTestStrategy extends SummaryBaseTestStrategy {
+ /**
+ * A test will set this to `true` if it contains `import`, `export`, or
+ * `part` declarations that deliberately refer to non-existent files.
+ */
+ void set allowMissingFiles(bool value);
+
+ /**
+ * Get access to the linked summary that results from serializing and
+ * then deserializing the library under test.
+ */
+ LinkedLibrary get linked;
+
+ /**
+ * `true` if the linked portion of the summary only contains prelinked data.
+ * This happens because we don't yet have a full linker; only a prelinker.
+ */
+ bool get skipFullyLinkedData;
+
+ /**
+ * Get access to the unlinked compilation unit summaries that result from
+ * serializing and deserializing the library under test.
+ */
+ List<UnlinkedUnit> get unlinkedUnits;
+
+ /**
+ * Serialize the given library [text], then deserialize it and store its
+ * summary in [lib].
+ */
+ void serializeLibraryText(String text, {bool allowErrors: false});
+}
+
+/// Implementation of [SummaryBlackBoxTestStrategy] that drives summary
+/// generation using the new one-phase API.
+class SummaryBlackBoxTestStrategyOnePhase
+ implements SummaryBlackBoxTestStrategy {
+ /// Information about the files to be summarized.
+ final _filesToSummarize = _FilesToLink<CompilationUnit>();
+
+ final _testUriString = absUri('/test.dart');
+
+ bool _allowMissingFiles = false;
+
+ @override
+ LinkedLibrary linked;
+
+ @override
+ List<UnlinkedUnit> unlinkedUnits;
+
+ SummaryBlackBoxTestStrategyOnePhase() {
+ // TODO(paulberry): cache the bundle?
+ _filesToSummarize.summaryDataStore
+ .addBundle(null, new MockSdk().getLinkedBundle());
+ }
+
+ @override
+ void set allowMissingFiles(bool value) {
+ _allowMissingFiles = value;
+ }
+
+ @override
+ bool get skipFullyLinkedData => false;
+
+ @override
+ void addNamedSource(String filePath, String contents) {
+ _filesToSummarize.uriToUnit[absUri(filePath)] = _parseText(contents);
+ }
+
+ @override
+ void serializeLibraryText(String text, {bool allowErrors = false}) {
+ addNamedSource('/test.dart', text);
+ var assembler = PackageBundleAssembler();
+ summarize(_filesToSummarize.uriToUnit, _filesToSummarize.summaryDataStore,
+ assembler, (name) => null, _allowMissingFiles);
+ var result = assembler.assemble();
+ linked = _findLinkedLibrary(result, _testUriString);
+ unlinkedUnits =
+ _findUnlinkedUnits(result, _testUriString, _allowMissingFiles);
+ }
+
+ static LinkedLibrary _findLinkedLibrary(
+ PackageBundle bundle, String uriString) {
+ for (int i = 0; i < bundle.linkedLibraryUris.length; i++) {
+ if (bundle.linkedLibraryUris[i] == uriString) {
+ return bundle.linkedLibraries[i];
+ }
+ }
+ throw new StateError('LinkedLibrary $uriString not found in bundle');
+ }
+
+ static List<UnlinkedUnit> _findUnlinkedUnits(
+ PackageBundle bundle, String uriString, bool allowMissingFiles) {
+ var uriToUnlinkedUnit = <String, UnlinkedUnit>{};
+ for (int i = 0; i < bundle.unlinkedUnitUris.length; i++) {
+ uriToUnlinkedUnit[bundle.unlinkedUnitUris[i]] = bundle.unlinkedUnits[i];
+ }
+ var unlinkedDefiningUnit = uriToUnlinkedUnit[uriString];
+ var unlinkedUnits = <UnlinkedUnit>[unlinkedDefiningUnit];
+ var definingUnitUri = Uri.parse(uriString);
+ for (String relativeUriStr in unlinkedDefiningUnit.publicNamespace.parts) {
+ Uri relativeUri;
+ try {
+ relativeUri = Uri.parse(relativeUriStr);
+ } on FormatException {
+ unlinkedUnits.add(new UnlinkedUnitBuilder());
+ continue;
+ }
+
+ UnlinkedUnit unit = uriToUnlinkedUnit[
+ resolveRelativeUri(definingUnitUri, relativeUri).toString()];
+ if (unit == null) {
+ if (!allowMissingFiles) {
+ fail('Test referred to unknown unit $relativeUriStr');
+ }
+ } else {
+ unlinkedUnits.add(unit);
+ }
+ }
+ return unlinkedUnits;
+ }
+}
+
+/// Implementation of [SummaryBlackBoxTestStrategy] that drives summary
+/// generation using the old two-phase API, and exercises the pre-linker only.
+class SummaryBlackBoxTestStrategyPrelink
+ extends _SummaryBlackBoxTestStrategyTwoPhase
+ implements SummaryBlackBoxTestStrategy {
+ @override
+ bool get skipFullyLinkedData => true;
+
+ @override
+ void serializeLibraryText(String text, {bool allowErrors: false}) {
+ super.serializeLibraryText(text, allowErrors: allowErrors);
+
+ UnlinkedUnit getPart(String absoluteUri) {
+ return _linkerInputs.getUnit(absoluteUri);
+ }
+
+ UnlinkedPublicNamespace getImport(String absoluteUri) {
+ return getPart(absoluteUri)?.publicNamespace;
+ }
+
+ linked = new LinkedLibrary.fromBuffer(prelink(
+ _linkerInputs._testDartUri.toString(),
+ _linkerInputs._unlinkedDefiningUnit,
+ getPart,
+ getImport,
+ (String declaredVariable) => null).toBuffer());
+ _validateLinkedLibrary(linked);
+ }
+}
+
+/// Implementation of [SummaryBlackBoxTestStrategy] that drives summary
+/// generation using the old two-phase API, and exercises full summary
+/// generation.
+class SummaryBlackBoxTestStrategyTwoPhase
+ extends _SummaryBlackBoxTestStrategyTwoPhase
+ implements SummaryBlackBoxTestStrategy {
+ @override
+ bool get skipFullyLinkedData => false;
+}
+
+/// Abstract base class for unit tests of the summary linker.
+///
+/// Test classes should not extend this class directly; they should extend a
+/// class that implements this class with methods that drive summary generation.
+/// The tests themselves can then be provided via mixin, allowing summaries to
+/// be tested in a variety of ways.
+abstract class SummaryLinkerTestStrategy extends SummaryBaseTestStrategy {
+ Linker get linker;
+
+ /// Gets the URI of the main library under test.
+ ///
+ /// May only be called after [createLinker].
+ Uri get testDartUri;
+
+ LibraryElementInBuildUnit get testLibrary;
+
+ /**
+ * Add the given package bundle as a dependency so that it may be referenced
+ * by the files under test.
+ */
+ void addBundle(String path, PackageBundle bundle);
+
+ void createLinker(String text, {String path: '/test.dart'});
+
+ /**
+ * Link together the given file, along with any other files passed to
+ * [addNamedSource], to form a package bundle. Reset the state of the buffers
+ * accumulated by [addNamedSource] and [addBundle] so that further bundles
+ * can be created.
+ */
+ PackageBundleBuilder createPackageBundle(String text,
+ {String path: '/test.dart', String uri});
+}
+
+/// Implementation of [SummaryLinkerTestStrategy] that drives summary generation
+/// using the old two-phase API.
+class SummaryLinkerTestStrategyTwoPhase extends _SummaryBaseTestStrategyTwoPhase
+ implements SummaryLinkerTestStrategy {
+ LibraryElementInBuildUnit _testLibrary;
+
+ @override
+ Linker linker;
+
+ @override
+ Uri get testDartUri => _linkerInputs._testDartUri;
+
+ @override
+ LibraryElementInBuildUnit get testLibrary =>
+ _testLibrary ??= linker.getLibrary(_linkerInputs._testDartUri)
+ as LibraryElementInBuildUnit;
+
+ @override
+ bool get _allowMissingFiles => false;
+
+ @override
+ void addBundle(String path, PackageBundle bundle) {
+ _filesToLink.summaryDataStore.addBundle(path, bundle);
+ }
+
+ @override
+ void createLinker(String text, {String path: '/test.dart'}) {
+ _linkerInputs = _createLinkerInputs(text, path: path);
+ Map<String, LinkedLibraryBuilder> linkedLibraries = setupForLink(
+ _linkerInputs.linkedLibraries,
+ _linkerInputs.getUnit,
+ _linkerInputs.getDeclaredVariable);
+ linker = new Linker(
+ linkedLibraries, _linkerInputs.getDependency, _linkerInputs.getUnit);
+ }
+
+ @override
+ PackageBundleBuilder createPackageBundle(String text,
+ {String path: '/test.dart', String uri}) {
+ PackageBundleAssembler assembler = new PackageBundleAssembler();
+ _LinkerInputs linkerInputs =
+ _createLinkerInputs(text, path: path, uri: uri);
+ Map<String, LinkedLibraryBuilder> linkedLibraries = link(
+ linkerInputs.linkedLibraries,
+ linkerInputs.getDependency,
+ linkerInputs.getUnit,
+ linkerInputs.getDeclaredVariable);
+ linkedLibraries.forEach(assembler.addLinkedLibrary);
+ linkerInputs._uriToUnit.forEach((String uri, UnlinkedUnit unit) {
+ assembler.addUnlinkedUnitViaUri(uri, unit);
+ });
+ return assembler.assemble();
+ }
+}
+
+/**
+ * [_FilesToLink] stores information about a set of files to be linked together.
+ * This information is grouped into a class to allow it to be reset easily when
+ * [_SummaryBaseTestStrategyTwoPhase._createLinkerInputs] is called.
+ *
+ * The generic parameter [U] is the type of information stored for each
+ * compilation unit.
+ */
+class _FilesToLink<U> {
+ /**
+ * Map from absolute URI to the [U] for each compilation unit passed to
+ * [addNamedSource].
+ */
+ Map<String, U> uriToUnit = <String, U>{};
+
+ /**
+ * Information about summaries to be included in the link process.
+ */
+ SummaryDataStore summaryDataStore = new SummaryDataStore([]);
+}
+
+/**
+ * Instances of the class [_LinkerInputs] encapsulate the necessary information
+ * to pass to the summary linker.
+ */
+class _LinkerInputs {
+ final bool _allowMissingFiles;
+ final Map<String, UnlinkedUnit> _uriToUnit;
+ final Uri _testDartUri;
+ final UnlinkedUnit _unlinkedDefiningUnit;
+ final Map<String, LinkedLibrary> _dependentLinkedLibraries;
+ final Map<String, UnlinkedUnit> _dependentUnlinkedUnits;
+
+ _LinkerInputs(
+ this._allowMissingFiles,
+ this._uriToUnit,
+ this._testDartUri,
+ this._unlinkedDefiningUnit,
+ this._dependentLinkedLibraries,
+ this._dependentUnlinkedUnits);
+
+ Set<String> get linkedLibraries => _uriToUnit.keys.toSet();
+
+ String getDeclaredVariable(String name) {
+ return null;
+ }
+
+ LinkedLibrary getDependency(String absoluteUri) {
+ Map<String, LinkedLibrary> sdkLibraries =
+ SerializedMockSdk.instance.uriToLinkedLibrary;
+ LinkedLibrary linkedLibrary =
+ sdkLibraries[absoluteUri] ?? _dependentLinkedLibraries[absoluteUri];
+ if (linkedLibrary == null && !_allowMissingFiles) {
+ Set<String> librariesAvailable = sdkLibraries.keys.toSet();
+ librariesAvailable.addAll(_dependentLinkedLibraries.keys);
+ fail('Linker unexpectedly requested LinkedLibrary for "$absoluteUri".'
+ ' Libraries available: ${librariesAvailable.toList()}');
+ }
+ return linkedLibrary;
+ }
+
+ UnlinkedUnit getUnit(String absoluteUri) {
+ if (absoluteUri == null) {
+ return null;
+ }
+ UnlinkedUnit unit = _uriToUnit[absoluteUri] ??
+ SerializedMockSdk.instance.uriToUnlinkedUnit[absoluteUri] ??
+ _dependentUnlinkedUnits[absoluteUri];
+ if (unit == null && !_allowMissingFiles) {
+ fail('Linker unexpectedly requested unit for "$absoluteUri".');
+ }
+ return unit;
+ }
+}
+
+/// Implementation of [SummaryBaseTestStrategy] that drives summary generation
+/// using the old two-phase API.
+abstract class _SummaryBaseTestStrategyTwoPhase
+ implements SummaryBaseTestStrategy {
+ /**
+ * Information about the files to be linked.
+ */
+ _FilesToLink<UnlinkedUnitBuilder> _filesToLink =
+ new _FilesToLink<UnlinkedUnitBuilder>();
+
+ _LinkerInputs _linkerInputs;
+
+ bool get _allowMissingFiles;
+
+ @override
+ void addNamedSource(String filePath, String contents) {
+ CompilationUnit unit = _parseText(contents);
+ UnlinkedUnitBuilder unlinkedUnit = serializeAstUnlinked(unit);
+ _filesToLink.uriToUnit[absUri(filePath)] = unlinkedUnit;
+ }
+
+ UnlinkedUnitBuilder createUnlinkedSummary(Uri uri, String text) =>
+ serializeAstUnlinked(_parseText(text));
+
+ _LinkerInputs _createLinkerInputs(String text,
+ {String path: '/test.dart', String uri}) {
+ uri ??= absUri(path);
+ Uri testDartUri = Uri.parse(uri);
+ UnlinkedUnitBuilder unlinkedDefiningUnit =
+ createUnlinkedSummary(testDartUri, text);
+ _filesToLink.uriToUnit[testDartUri.toString()] = unlinkedDefiningUnit;
+ _LinkerInputs linkerInputs = new _LinkerInputs(
+ _allowMissingFiles,
+ _filesToLink.uriToUnit,
+ testDartUri,
+ unlinkedDefiningUnit,
+ _filesToLink.summaryDataStore.linkedMap,
+ _filesToLink.summaryDataStore.unlinkedMap);
+ // Reset _filesToLink in case the test needs to start a new package bundle.
+ _filesToLink = new _FilesToLink<UnlinkedUnitBuilder>();
+ return linkerInputs;
+ }
+}
+
+/// Implementation of [SummaryBlackBoxTestStrategy] that drives summary
+/// generation using the old two-phase API.
+///
+/// Not intended to be used directly; instead use a derived class that either
+/// exercises the full summary algorithmm or just pre-linking.
+abstract class _SummaryBlackBoxTestStrategyTwoPhase
+ extends _SummaryBaseTestStrategyTwoPhase
+ implements SummaryBlackBoxTestStrategy {
+ @override
+ List<UnlinkedUnit> unlinkedUnits;
+
+ @override
+ LinkedLibrary linked;
+
+ @override
+ bool _allowMissingFiles = false;
+
+ @override
+ void set allowMissingFiles(bool value) {
+ _allowMissingFiles = value;
+ }
+
+ @override
+ void serializeLibraryText(String text, {bool allowErrors: false}) {
+ Map<String, UnlinkedUnitBuilder> uriToUnit = this._filesToLink.uriToUnit;
+ _linkerInputs = _createLinkerInputs(text);
+ linked = link(
+ _linkerInputs.linkedLibraries,
+ _linkerInputs.getDependency,
+ _linkerInputs.getUnit,
+ (name) => null)[_linkerInputs._testDartUri.toString()];
+ expect(linked, isNotNull);
+ _validateLinkedLibrary(linked);
+ unlinkedUnits = <UnlinkedUnit>[_linkerInputs._unlinkedDefiningUnit];
+ for (String relativeUriStr
+ in _linkerInputs._unlinkedDefiningUnit.publicNamespace.parts) {
+ Uri relativeUri;
+ try {
+ relativeUri = Uri.parse(relativeUriStr);
+ } on FormatException {
+ unlinkedUnits.add(new UnlinkedUnitBuilder());
+ continue;
+ }
+
+ UnlinkedUnit unit = uriToUnit[
+ resolveRelativeUri(_linkerInputs._testDartUri, relativeUri)
+ .toString()];
+ if (unit == null) {
+ if (!_allowMissingFiles) {
+ fail('Test referred to unknown unit $relativeUriStr');
+ }
+ } else {
+ unlinkedUnits.add(unit);
+ }
+ }
+ }
+}
diff --git a/pkg/analyzer/test/src/task/strong/checker_test.dart b/pkg/analyzer/test/src/task/strong/checker_test.dart
index 9aa47e4..2bd64ac 100644
--- a/pkg/analyzer/test/src/task/strong/checker_test.dart
+++ b/pkg/analyzer/test/src/task/strong/checker_test.dart
@@ -2646,17 +2646,17 @@
}
class T1 extends Base {
- /*warning:MISMATCHED_GETTER_AND_SETTER_TYPES_FROM_SUPERTYPE,error:INVALID_METHOD_OVERRIDE*/B get f => null;
+ /*error:MISMATCHED_GETTER_AND_SETTER_TYPES_FROM_SUPERTYPE,error:INVALID_METHOD_OVERRIDE*/B get f => null;
}
class T2 extends Base {
- /*warning:MISMATCHED_GETTER_AND_SETTER_TYPES_FROM_SUPERTYPE,error:INVALID_METHOD_OVERRIDE*/set f(
+ /*error:MISMATCHED_GETTER_AND_SETTER_TYPES_FROM_SUPERTYPE,error:INVALID_METHOD_OVERRIDE*/set f(
B b) => null;
}
class T3 extends Base {
/*error:INVALID_METHOD_OVERRIDE*/final B
- /*warning:FINAL_NOT_INITIALIZED*/f;
+ /*error:FINAL_NOT_INITIALIZED*/f;
}
class T4 extends Base {
// two: one for the getter one for the setter.
@@ -2664,11 +2664,11 @@
}
class /*error:NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE*/T5 implements Base {
- /*warning:MISMATCHED_GETTER_AND_SETTER_TYPES_FROM_SUPERTYPE, error:INVALID_METHOD_OVERRIDE*/B get f => null;
+ /*error:MISMATCHED_GETTER_AND_SETTER_TYPES_FROM_SUPERTYPE, error:INVALID_METHOD_OVERRIDE*/B get f => null;
}
class /*error:NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE*/T6 implements Base {
- /*warning:MISMATCHED_GETTER_AND_SETTER_TYPES_FROM_SUPERTYPE, error:INVALID_METHOD_OVERRIDE*/set f(B b) => null;
+ /*error:MISMATCHED_GETTER_AND_SETTER_TYPES_FROM_SUPERTYPE, error:INVALID_METHOD_OVERRIDE*/set f(B b) => null;
}
class /*error:NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE*/T7 implements Base {
@@ -3676,12 +3676,12 @@
set b(y) => voidFn();
void set c(y) => 4;
void set d(y) => voidFn();
- /*warning:NON_VOID_RETURN_FOR_SETTER*/int set e(y) => 4;
- /*warning:NON_VOID_RETURN_FOR_SETTER*/int set f(y) =>
+ /*error:NON_VOID_RETURN_FOR_SETTER*/int set e(y) => 4;
+ /*error:NON_VOID_RETURN_FOR_SETTER*/int set f(y) =>
/*error:RETURN_OF_INVALID_TYPE*/voidFn();
set g(y) {return /*error:RETURN_OF_INVALID_TYPE*/4;}
void set h(y) {return /*error:RETURN_OF_INVALID_TYPE*/4;}
- /*warning:NON_VOID_RETURN_FOR_SETTER*/int set i(y) {return 4;}
+ /*error:NON_VOID_RETURN_FOR_SETTER*/int set i(y) {return 4;}
}
''');
}
diff --git a/pkg/analyzer/test/src/task/strong/non_null_checker_test.dart b/pkg/analyzer/test/src/task/strong/non_null_checker_test.dart
index 458b4c1..9ae9154 100644
--- a/pkg/analyzer/test/src/task/strong/non_null_checker_test.dart
+++ b/pkg/analyzer/test/src/task/strong/non_null_checker_test.dart
@@ -280,7 +280,7 @@
class A {
final int x;
- /*warning:FINAL_NOT_INITIALIZED_CONSTRUCTOR_1*/A();
+ /*error:FINAL_NOT_INITIALIZED_CONSTRUCTOR_1*/A();
}
''');
await check(nonnullableTypes: <String>['dart:core,int']);
diff --git a/pkg/analyzer/tool/analyzer_cfe_progress.dart b/pkg/analyzer/tool/analyzer_cfe_progress.dart
deleted file mode 100644
index 86783f6..0000000
--- a/pkg/analyzer/tool/analyzer_cfe_progress.dart
+++ /dev/null
@@ -1,142 +0,0 @@
-// 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:io' as io;
-
-import 'package:analyzer/dart/analysis/context_builder.dart';
-import 'package:analyzer/dart/analysis/context_locator.dart';
-import 'package:analyzer/dart/analysis/context_root.dart';
-import 'package:analyzer/dart/analysis/results.dart';
-import 'package:analyzer/dart/analysis/session.dart';
-import 'package:analyzer/dart/ast/ast.dart';
-import 'package:analyzer/file_system/file_system.dart';
-import 'package:analyzer/file_system/physical_file_system.dart';
-import 'package:path/path.dart' as path;
-
-/// Count failing Analyzer CFE integration tests.
-///
-/// We look for classes ending in *Test_UseCFE or *Test_Kernel with test
-/// methods that are marked with @failingTest annotations.
-///
-/// In addition, we count the test exclusions from pkg/pkg.status related to
-/// using Fasta with the Analyzer.
-void main() {
- if (!io.FileSystemEntity.isDirectorySync('pkg')) {
- io.stderr
- .writeln('This tool should be run from the top level sdk directory.');
- io.exit(1);
- }
-
- final List<String> analysisPaths = [
- 'pkg/analysis_server',
- 'pkg/analyzer_cli',
- 'pkg/analyzer_plugin',
- 'pkg/analyzer',
- ];
-
- final ResourceProvider resourceProvider = PhysicalResourceProvider.INSTANCE;
- ContextLocator locator =
- new ContextLocator(resourceProvider: resourceProvider);
- List<ContextRoot> contextRoots =
- locator.locateRoots(includedPaths: analysisPaths);
- ContextBuilder builder =
- new ContextBuilder(resourceProvider: resourceProvider);
-
- for (ContextRoot contextRoot in contextRoots) {
- if (!analysisPaths
- .any((analysisPath) => contextRoot.root.path.endsWith(analysisPath))) {
- continue;
- }
-
- AnalysisSession analysisSession =
- builder.createContext(contextRoot: contextRoot).currentSession;
- print('\nCFE tests for ${path.relative(contextRoot.root.path)}:');
-
- int totalFailingCount = 0;
-
- for (String analyzedPath in contextRoot.analyzedFiles()) {
- if (!analyzedPath.endsWith('_test.dart')) {
- continue;
- }
-
- ParseResult result = analysisSession.getParsedAstSync(analyzedPath);
- CompilationUnit unit = result.unit;
-
- for (ClassDeclaration member
- in unit.declarations.where((member) => member is ClassDeclaration)) {
- String className = member.name.toString();
- if (!className.endsWith('Test_UseCFE') &&
- !className.endsWith('Test_Kernel')) {
- continue;
- }
-
- int failingCount = 0;
-
- for (MethodDeclaration method
- in member.members.where((member) => member is MethodDeclaration)) {
- String methodName = method.name.toString();
- if (!methodName.startsWith('test_')) {
- continue;
- }
-
- if (method.metadata.any((Annotation annotation) =>
- annotation.name.toString() == 'failingTest')) {
- failingCount++;
- }
- }
-
- totalFailingCount += failingCount;
- }
- }
-
- print(' $totalFailingCount failing tests');
- }
-
- // tests/language_2/language_2_analyzer.status:
- // [ $compiler == dart2analyzer && $fasta ]
- print('\nCFE tests for tests/language_2:');
- int useCfeLanguage2 = countExclusions(
- 'tests/language_2/language_2_analyzer.status',
- r'[ $compiler == dart2analyzer && $fasta ]');
- print(' $useCfeLanguage2 failing tests');
-
- // Also count the Fasta '-DuseFastaParser=true' tests.
- print('\n--use-fasta-parser exclusions from status files');
-
- int testExclusions = 0;
-
- // pkg/pkg.status:
- // [ $builder_tag == analyzer_use_fasta && $runtime == vm ]
- testExclusions += countExclusions('pkg/pkg.status',
- r'[ $builder_tag == analyzer_use_fasta && $runtime == vm ]');
-
- // tests/language_2/language_2_analyzer.status:
- // [ $compiler == dart2analyzer && $analyzer_use_fasta_parser ]
- testExclusions += countExclusions(
- 'tests/language_2/language_2_analyzer.status',
- r'[ $compiler == dart2analyzer && $analyzer_use_fasta_parser ]');
-
- print(' $testExclusions failing tests');
-}
-
-int countExclusions(String filePath, String exclusionHeader) {
- io.File file = new io.File(filePath);
- List<String> lines = file.readAsLinesSync();
- lines = lines
- .where((line) => line.trim().isNotEmpty && !line.trim().startsWith('#'))
- .toList();
-
- int index = lines.indexOf(exclusionHeader);
- if (index == -1) {
- print('error parsing ${file.path}');
- }
-
- lines = lines.sublist(index + 1);
- int endIndex = lines.indexWhere((line) => line.startsWith('['));
- if (endIndex >= 0) {
- lines = lines.sublist(0, endIndex);
- }
-
- return lines.length;
-}
diff --git a/pkg/analyzer/tool/summary/build_sdk_summaries.dart b/pkg/analyzer/tool/summary/build_sdk_summaries.dart
index 4596071..78642c2 100644
--- a/pkg/analyzer/tool/summary/build_sdk_summaries.dart
+++ b/pkg/analyzer/tool/summary/build_sdk_summaries.dart
@@ -24,9 +24,9 @@
//
// Validate the SDK path.
//
- sdkPath ??= FolderBasedDartSdk
- .defaultSdkDirectory(PhysicalResourceProvider.INSTANCE)
- .path;
+ sdkPath ??=
+ FolderBasedDartSdk.defaultSdkDirectory(PhysicalResourceProvider.INSTANCE)
+ .path;
if (!FileSystemEntity.isDirectorySync('$sdkPath/lib')) {
print("'$sdkPath/lib' does not exist.");
_printUsage();
@@ -36,10 +36,8 @@
//
// Handle commands.
//
- if (command == 'build-spec') {
- _buildSummary(sdkPath, outFilePath, false);
- } else if (command == 'build-strong') {
- _buildSummary(sdkPath, outFilePath, true);
+ if (command == 'build-strong') {
+ _buildSummary(sdkPath, outFilePath);
} else {
_printUsage();
return;
@@ -51,11 +49,10 @@
*/
const BINARY_NAME = "build_sdk_summaries";
-void _buildSummary(String sdkPath, String outPath, bool strong) {
- String modeName = strong ? 'strong' : 'spec';
- print('Generating $modeName mode summary.');
+void _buildSummary(String sdkPath, String outPath) {
+ print('Generating strong mode summary.');
Stopwatch sw = new Stopwatch()..start();
- List<int> bytes = new SummaryBuilder.forSdk(sdkPath, strong).build();
+ List<int> bytes = new SummaryBuilder.forSdk(sdkPath).build();
new File(outPath).writeAsBytesSync(bytes, mode: FileMode.writeOnly);
print('\tDone in ${sw.elapsedMilliseconds} ms.');
}
@@ -66,8 +63,6 @@
void _printUsage() {
print('Usage: $BINARY_NAME command arguments');
print('Where command can be one of the following:');
- print(' build-spec output_file [sdk_path]');
- print(' Generate spec mode summary file.');
print(' build-strong output_file [sdk_path]');
print(' Generate strong mode summary file.');
}
diff --git a/pkg/analyzer/tool/summary/dump_inferred_types.dart b/pkg/analyzer/tool/summary/dump_inferred_types.dart
index 2107faa..e0eec04 100644
--- a/pkg/analyzer/tool/summary/dump_inferred_types.dart
+++ b/pkg/analyzer/tool/summary/dump_inferred_types.dart
@@ -40,7 +40,7 @@
InferredTypeCollector(
GetDependencyCallback getDependency, GetUnitCallback getUnit)
- : _linker = new Linker({}, getDependency, getUnit, true);
+ : _linker = new Linker({}, getDependency, getUnit);
/**
* If an inferred type exists matching the given [slot], record that it is the
diff --git a/pkg/analyzer/tool/summary/generate.dart b/pkg/analyzer/tool/summary/generate.dart
index 1604d01..97495b4 100644
--- a/pkg/analyzer/tool/summary/generate.dart
+++ b/pkg/analyzer/tool/summary/generate.dart
@@ -215,6 +215,7 @@
for (CompilationUnitMember decl in idlParsed.declarations) {
if (decl is ClassDeclaration) {
bool isTopLevel = false;
+ bool isDeprecated = false;
String fileIdentifier;
String clsName = decl.name;
for (Annotation annotation in decl.metadata) {
@@ -222,14 +223,6 @@
annotation.name == 'TopLevel' &&
annotation.constructorName == null) {
isTopLevel = true;
- if (annotation.arguments == null) {
- throw new Exception(
- 'Class `$clsName`: TopLevel requires parenthesis');
- }
- if (annotation.constructorName != null) {
- throw new Exception(
- "Class `$clsName`: TopLevel doesn't have named constructors");
- }
if (annotation.arguments.length == 1) {
Expression arg = annotation.arguments[0];
if (arg is StringLiteral) {
@@ -243,11 +236,15 @@
throw new Exception(
'Class `$clsName`: TopLevel requires 0 or 1 arguments');
}
+ } else if (annotation.arguments == null &&
+ annotation.name == 'deprecated' &&
+ annotation.constructorName == null) {
+ isDeprecated = true;
}
}
String doc = _getNodeDoc(decl);
idlModel.ClassDeclaration cls = new idlModel.ClassDeclaration(
- doc, clsName, isTopLevel, fileIdentifier);
+ doc, clsName, isTopLevel, fileIdentifier, isDeprecated);
_idl.classes[clsName] = cls;
String expectedBase = 'base.SummaryClass';
if (decl.superclass == null || decl.superclass.name != expectedBase) {
@@ -445,18 +442,22 @@
out();
}
for (idlModel.ClassDeclaration cls in _idl.classes.values) {
- _generateBuilder(cls);
- out();
+ if (!cls.isDeprecated) {
+ _generateBuilder(cls);
+ out();
+ }
if (cls.isTopLevel) {
_generateReadFunction(cls);
out();
}
- _generateReader(cls);
- out();
- _generateImpl(cls);
- out();
- _generateMixin(cls);
- out();
+ if (!cls.isDeprecated) {
+ _generateReader(cls);
+ out();
+ _generateImpl(cls);
+ out();
+ _generateMixin(cls);
+ out();
+ }
}
}
@@ -529,8 +530,9 @@
String builderName = name + 'Builder';
String mixinName = '_${name}Mixin';
List<String> constructorParams = <String>[];
- out('class $builderName extends Object with $mixinName '
- 'implements ${idlPrefix(name)} {');
+ var implementsClause =
+ cls.isDeprecated ? '' : ' implements ${idlPrefix(name)}';
+ out('class $builderName extends Object with $mixinName$implementsClause {');
indent(() {
// Generate fields.
for (idlModel.FieldDeclaration field in cls.fields) {
@@ -549,7 +551,7 @@
out();
out('@override');
if (field.isDeprecated) {
- out('$typeStr get $fieldName => $_throwDeprecated;');
+ out('Null get $fieldName => $_throwDeprecated;');
} else {
out('$typeStr get $fieldName => _$fieldName$defSuffix;');
out();
@@ -842,7 +844,7 @@
out('@override');
String returnType = dartType(type);
if (field.isDeprecated) {
- out('$returnType get $fieldName => $_throwDeprecated;');
+ out('Null get $fieldName => $_throwDeprecated;');
} else {
out('$returnType get $fieldName {');
indent(() {
diff --git a/pkg/analyzer/tool/summary/idl_model.dart b/pkg/analyzer/tool/summary/idl_model.dart
index 375dcb2..79bae0e 100644
--- a/pkg/analyzer/tool/summary/idl_model.dart
+++ b/pkg/analyzer/tool/summary/idl_model.dart
@@ -29,8 +29,13 @@
*/
final String fileIdentifier;
- ClassDeclaration(
- String documentation, String name, this.isTopLevel, this.fileIdentifier)
+ /**
+ * Indicates whether the class has the `deprecated` annotation.
+ */
+ final bool isDeprecated;
+
+ ClassDeclaration(String documentation, String name, this.isTopLevel,
+ this.fileIdentifier, this.isDeprecated)
: super(documentation, name);
/**
diff --git a/pkg/analyzer/tool/summary/mini_ast.dart b/pkg/analyzer/tool/summary/mini_ast.dart
index 4c4eb38..518a6c4 100644
--- a/pkg/analyzer/tool/summary/mini_ast.dart
+++ b/pkg/analyzer/tool/summary/mini_ast.dart
@@ -2,7 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-import 'package:front_end/src/fasta/messages.dart' show Message;
+import 'package:front_end/src/fasta/messages.dart' show LocatedMessage, Message;
import 'package:front_end/src/fasta/parser.dart';
import 'package:front_end/src/fasta/problems.dart'
show internalProblem, unsupported;
@@ -147,8 +147,9 @@
Uri get uri => null;
@override
- void addCompileTimeError(Message message, int offset, int length) {
- internalProblem(message, offset, uri);
+ void addProblem(Message message, int charOffset, int length,
+ {bool wasHandled: false, List<LocatedMessage> context}) {
+ internalProblem(message, charOffset, uri);
}
@override
@@ -240,13 +241,8 @@
}
@override
- void endFormalParameter(
- Token thisKeyword,
- Token periodAfterThis,
- Token nameToken,
- FormalParameterKind kind,
- MemberKind memberKind,
- Token endToken) {
+ void endFormalParameter(Token thisKeyword, Token periodAfterThis,
+ Token nameToken, FormalParameterKind kind, MemberKind memberKind) {
debugEvent("FormalParameter");
pop(); // Name
pop(); // Type
diff --git a/pkg/analyzer_cli/lib/src/build_mode.dart b/pkg/analyzer_cli/lib/src/build_mode.dart
index ac0e2f1..729ce0d 100644
--- a/pkg/analyzer_cli/lib/src/build_mode.dart
+++ b/pkg/analyzer_cli/lib/src/build_mode.dart
@@ -321,12 +321,8 @@
UnlinkedUnit getUnit(String absoluteUri) =>
summaryDataStore.unlinkedMap[absoluteUri] ?? uriToUnit[absoluteUri];
- Map<String, LinkedLibraryBuilder> linkResult = link(
- libraryUris,
- getDependency,
- getUnit,
- analysisDriver.declaredVariables.get,
- options.strongMode);
+ Map<String, LinkedLibraryBuilder> linkResult = link(libraryUris,
+ getDependency, getUnit, analysisDriver.declaredVariables.get);
linkResult.forEach(assembler.addLinkedLibrary);
});
}
@@ -404,7 +400,7 @@
createAnalysisOptionsForCommandLineOptions(options, rootPath);
dartSdk.useSummary = !options.buildSummaryOnly;
sdk = dartSdk;
- sdkBundle = dartSdk.getSummarySdkBundle(true);
+ sdkBundle = dartSdk.getSummarySdkBundle();
}
// Include SDK bundle to avoid parsing SDK sources.
diff --git a/pkg/analyzer_cli/lib/src/context_cache.dart b/pkg/analyzer_cli/lib/src/context_cache.dart
index 6cec179..0e875ce 100644
--- a/pkg/analyzer_cli/lib/src/context_cache.dart
+++ b/pkg/analyzer_cli/lib/src/context_cache.dart
@@ -97,10 +97,6 @@
contextOptions.generateSdkErrors = clOptions.showSdkWarnings;
contextOptions.previewDart2 = clOptions.previewDart2;
contextOptions.useFastaParser = clOptions.useFastaParser;
- if (clOptions.useCFE) {
- contextOptions.useFastaParser = true;
- contextOptions.useCFE = true;
- }
return contextOptions;
}
diff --git a/pkg/analyzer_cli/lib/src/driver.dart b/pkg/analyzer_cli/lib/src/driver.dart
index bf39031..db9192d 100644
--- a/pkg/analyzer_cli/lib/src/driver.dart
+++ b/pkg/analyzer_cli/lib/src/driver.dart
@@ -617,12 +617,6 @@
PerformanceLog log = new PerformanceLog(null);
AnalysisDriverScheduler scheduler = new AnalysisDriverScheduler(log);
- file_system.Folder kernelPlatformBinariesFolder;
- if (options.useCFE && options.dartSdkPlatformBinariesPath != null) {
- kernelPlatformBinariesFolder =
- resourceProvider.getFolder(options.dartSdkPlatformBinariesPath);
- }
-
analysisDriver = new AnalysisDriver(
scheduler,
log,
@@ -631,9 +625,7 @@
new FileContentOverlay(),
null,
sourceFactory,
- analysisOptions,
- useCFE: options.useCFE,
- kernelPlatformFolder: kernelPlatformBinariesFolder);
+ analysisOptions);
analysisDriver.results.listen((_) {});
analysisDriver.exceptions.listen((_) {});
scheduler.start();
diff --git a/pkg/analyzer_cli/lib/src/options.dart b/pkg/analyzer_cli/lib/src/options.dart
index 9b5fd17..7667945 100644
--- a/pkg/analyzer_cli/lib/src/options.dart
+++ b/pkg/analyzer_cli/lib/src/options.dart
@@ -107,9 +107,6 @@
/// (Or null if not enabled.)
final String perfReport;
- /// Whether to enable the Dart 2.0 Common Front End.
- final bool useCFE;
-
/// Whether to enable parsing via the Fasta parser.
final bool useFastaParser;
@@ -189,7 +186,6 @@
log = cast(args['log']),
machineFormat = args['format'] == 'machine',
perfReport = cast(args['x-perf-report']),
- useCFE = cast(args['use-cfe']),
useFastaParser = cast(args['use-fasta-parser']),
batchMode = cast(args['batch']),
showPackageWarnings = cast(args['show-package-warnings']) ||
@@ -506,14 +502,9 @@
'of "libraryUri".',
splitCommas: false,
hide: hide)
- ..addFlag('use-cfe',
- help:
- 'Enable the Dart 2.0 Common Front End implementation (experimental).',
- defaultsTo: false,
- hide: hide)
..addFlag('use-fasta-parser',
help: 'Whether to enable parsing via the Fasta parser.',
- defaultsTo: false,
+ defaultsTo: true,
hide: hide)
..addFlag('preview-dart-2',
help: 'Enable the Dart 2.0 preview.',
diff --git a/pkg/analyzer_cli/pubspec.yaml b/pkg/analyzer_cli/pubspec.yaml
index 513c1ce..bfa2b84 100644
--- a/pkg/analyzer_cli/pubspec.yaml
+++ b/pkg/analyzer_cli/pubspec.yaml
@@ -9,7 +9,7 @@
linter: ^0.1.16
package_config: '>=0.1.5 <2.0.0'
plugin: '>=0.1.0 <0.3.0'
- protobuf: ^0.8.0
+ protobuf: ^0.9.0
telemetry: ^0.0.1
yaml: ^2.1.2
dev_dependencies:
diff --git a/pkg/analyzer_cli/test/data/file_with_warning.dart b/pkg/analyzer_cli/test/data/file_with_warning.dart
deleted file mode 100644
index 97dfd3f..0000000
--- a/pkg/analyzer_cli/test/data/file_with_warning.dart
+++ /dev/null
@@ -1,3 +0,0 @@
-main() {
- final String foo;
-}
diff --git a/pkg/analyzer_cli/test/driver_test.dart b/pkg/analyzer_cli/test/driver_test.dart
index 26b682b..1f57ac0 100644
--- a/pkg/analyzer_cli/test/driver_test.dart
+++ b/pkg/analyzer_cli/test/driver_test.dart
@@ -28,14 +28,11 @@
defineReflectiveTests(BuildModeTest);
defineReflectiveTests(ExitCodesTest);
defineReflectiveTests(ExitCodesTest_PreviewDart2);
- defineReflectiveTests(ExitCodesTest_UseCFE);
defineReflectiveTests(LinterTest);
defineReflectiveTests(LinterTest_PreviewDart2);
- defineReflectiveTests(LinterTest_UseCFE);
defineReflectiveTests(NonDartFilesTest);
defineReflectiveTests(OptionsTest);
defineReflectiveTests(OptionsTest_PreviewDart2);
- defineReflectiveTests(OptionsTest_UseCFE);
}, name: 'Driver');
}
@@ -79,8 +76,6 @@
AnalysisOptions get analysisOptions => driver.analysisDriver.analysisOptions;
- bool get useCFE => false;
-
bool get usePreviewDart2 => false;
/// Normalize text with bullets.
@@ -116,9 +111,6 @@
if (usePreviewDart2) {
cmd.insert(0, '--preview-dart-2');
}
- if (useCFE) {
- cmd.insert(0, '--use-cfe');
- }
await driver.start(cmd);
}
@@ -535,7 +527,7 @@
Set<String> triedDirectories = new Set<String>();
bool isSuitable(String sdkDir) {
triedDirectories.add(sdkDir);
- return new File(path.join(sdkDir, 'lib', '_internal', 'spec.sum'))
+ return new File(path.join(sdkDir, 'lib', '_internal', 'strong.sum'))
.existsSync();
}
@@ -625,11 +617,6 @@
expect(exitCode, 1);
}
- test_fatalWarnings() async {
- await drive('data/file_with_warning.dart', args: ['--fatal-warnings']);
- expect(exitCode, 2);
- }
-
test_missingDartFile() async {
await drive('data/NO_DART_FILE_HERE.dart');
expect(exitCode, 3);
@@ -645,11 +632,6 @@
expect(exitCode, 0);
}
- test_notFatalWarnings() async {
- await drive('data/file_with_warning.dart');
- expect(exitCode, 0);
- }
-
test_partFile() async {
await driveMany([
path.join(testDirectory, 'data/library_and_parts/lib.dart'),
@@ -689,12 +671,6 @@
}
@reflectiveTest
-class ExitCodesTest_UseCFE extends ExitCodesTest {
- @override
- bool get useCFE => true;
-}
-
-@reflectiveTest
class LinterTest extends BaseTest {
String get optionsFileName => AnalysisEngine.ANALYSIS_OPTIONS_YAML_FILE;
@@ -797,12 +773,6 @@
}
@reflectiveTest
-class LinterTest_UseCFE extends LinterTest {
- @override
- bool get useCFE => true;
-}
-
-@reflectiveTest
class NonDartFilesTest extends BaseTest {
test_analysisOptionsYaml() async {
await withTempDirAsync((tempDir) async {
@@ -932,26 +902,11 @@
expect(outSink.toString(), contains('Avoid empty else statements'));
}
- test_previewDart2() async {
- await drive('data/options_tests_project/test_file.dart',
- args: ['--preview-dart-2']);
- expect(analysisOptions.useFastaParser, isFalse);
- }
-
test_todo() async {
await drive('data/file_with_todo.dart');
expect(outSink.toString().contains('[info]'), isFalse);
}
- @failingTest
- test_useCFE() async {
- // Disabled until integration with the CFE has been restarted.
- fail('Times out when run on a VM with --preview-dart-2 enabled');
-// await drive('data/options_tests_project/test_file.dart',
-// args: ['--use-cfe']);
-// expect(driver.context.analysisOptions.useFastaParser, isTrue);
- }
-
test_withFlags_overrideFatalWarning() async {
await drive('data/options_tests_project/test_file.dart',
args: ['--fatal-warnings'],
@@ -993,46 +948,6 @@
bool get usePreviewDart2 => true;
}
-@reflectiveTest
-class OptionsTest_UseCFE extends OptionsTest {
- @override
- bool get useCFE => true;
-
- @override
- @failingTest
- test_analysisOptions_excludes() =>
- callFailingTest(super.test_analysisOptions_excludes);
-
- @override
- @failingTest
- test_analysisOptions_excludesRelativeToAnalysisOptions_explicit() =>
- callFailingTest(super
- .test_analysisOptions_excludesRelativeToAnalysisOptions_explicit);
-
- @override
- @failingTest
- test_analysisOptions_excludesRelativeToAnalysisOptions_inferred() =>
- callFailingTest(super
- .test_analysisOptions_excludesRelativeToAnalysisOptions_inferred);
-
- @override
- @failingTest
- test_basic_filters() => callFailingTest(super.test_basic_filters);
-
- @override
- @failingTest
- test_includeDirective() => callFailingTest(super.test_includeDirective);
-
- @override
- @failingTest
- test_previewDart2() => callFailingTest(super.test_previewDart2);
-
- @override
- @failingTest
- test_withFlags_overrideFatalWarning() =>
- callFailingTest(super.test_withFlags_overrideFatalWarning);
-}
-
class TestSource implements Source {
TestSource();
diff --git a/pkg/analyzer_cli/test/options_test.dart b/pkg/analyzer_cli/test/options_test.dart
index 621cefb..7b88142 100644
--- a/pkg/analyzer_cli/test/options_test.dart
+++ b/pkg/analyzer_cli/test/options_test.dart
@@ -73,7 +73,6 @@
expect(options.warningsAreFatal, isFalse);
expect(options.strongMode, isTrue);
expect(options.lintsAreFatal, isFalse);
- expect(options.useCFE, isFalse);
expect(options.previewDart2, isTrue);
});
@@ -84,33 +83,33 @@
});
test('defined variables', () {
- CommandLineOptions options = CommandLineOptions
- .parse(['--dart-sdk', '.', '-Dfoo=bar', 'foo.dart']);
+ CommandLineOptions options = CommandLineOptions.parse(
+ ['--dart-sdk', '.', '-Dfoo=bar', 'foo.dart']);
expect(options.definedVariables['foo'], equals('bar'));
expect(options.definedVariables['bar'], isNull);
});
test('disable cache flushing', () {
- CommandLineOptions options = CommandLineOptions
- .parse(['--dart-sdk', '.', '--disable-cache-flushing', 'foo.dart']);
+ CommandLineOptions options = CommandLineOptions.parse(
+ ['--dart-sdk', '.', '--disable-cache-flushing', 'foo.dart']);
expect(options.disableCacheFlushing, isTrue);
});
test('enable super mixins', () {
- CommandLineOptions options = CommandLineOptions
- .parse(['--dart-sdk', '.', '--supermixin', 'foo.dart']);
+ CommandLineOptions options = CommandLineOptions.parse(
+ ['--dart-sdk', '.', '--supermixin', 'foo.dart']);
expect(options.enableSuperMixins, isTrue);
});
test('hintsAreFatal', () {
- CommandLineOptions options = CommandLineOptions
- .parse(['--dart-sdk', '.', '--fatal-hints', 'foo.dart']);
+ CommandLineOptions options = CommandLineOptions.parse(
+ ['--dart-sdk', '.', '--fatal-hints', 'foo.dart']);
expect(options.infosAreFatal, isTrue);
});
test('infosAreFatal', () {
- CommandLineOptions options = CommandLineOptions
- .parse(['--dart-sdk', '.', '--fatal-infos', 'foo.dart']);
+ CommandLineOptions options = CommandLineOptions.parse(
+ ['--dart-sdk', '.', '--fatal-infos', 'foo.dart']);
expect(options.infosAreFatal, isTrue);
});
@@ -121,14 +120,14 @@
});
test('machine format', () {
- CommandLineOptions options = CommandLineOptions
- .parse(['--dart-sdk', '.', '--format=machine', 'foo.dart']);
+ CommandLineOptions options = CommandLineOptions.parse(
+ ['--dart-sdk', '.', '--format=machine', 'foo.dart']);
expect(options.machineFormat, isTrue);
});
test('no-hints', () {
- CommandLineOptions options = CommandLineOptions
- .parse(['--dart-sdk', '.', '--no-hints', 'foo.dart']);
+ CommandLineOptions options = CommandLineOptions.parse(
+ ['--dart-sdk', '.', '--no-hints', 'foo.dart']);
expect(options.disableHints, isTrue);
});
@@ -139,26 +138,26 @@
});
test('lints', () {
- CommandLineOptions options = CommandLineOptions
- .parse(['--dart-sdk', '.', '--lints', 'foo.dart']);
+ CommandLineOptions options = CommandLineOptions.parse(
+ ['--dart-sdk', '.', '--lints', 'foo.dart']);
expect(options.lints, isTrue);
});
test('package root', () {
- CommandLineOptions options = CommandLineOptions
- .parse(['--dart-sdk', '.', '--package-root', 'bar', 'foo.dart']);
+ CommandLineOptions options = CommandLineOptions.parse(
+ ['--dart-sdk', '.', '--package-root', 'bar', 'foo.dart']);
expect(options.packageRootPath, equals('bar'));
});
test('package warnings', () {
- CommandLineOptions options = CommandLineOptions
- .parse(['--dart-sdk', '.', '--package-warnings', 'foo.dart']);
+ CommandLineOptions options = CommandLineOptions.parse(
+ ['--dart-sdk', '.', '--package-warnings', 'foo.dart']);
expect(options.showPackageWarnings, isTrue);
});
test('sdk warnings', () {
- CommandLineOptions options = CommandLineOptions
- .parse(['--dart-sdk', '.', '--sdk-warnings', 'foo.dart']);
+ CommandLineOptions options = CommandLineOptions.parse(
+ ['--dart-sdk', '.', '--sdk-warnings', 'foo.dart']);
expect(options.showSdkWarnings, isTrue);
});
@@ -170,8 +169,8 @@
});
test('warningsAreFatal', () {
- CommandLineOptions options = CommandLineOptions
- .parse(['--dart-sdk', '.', '--fatal-warnings', 'foo.dart']);
+ CommandLineOptions options = CommandLineOptions.parse(
+ ['--dart-sdk', '.', '--fatal-warnings', 'foo.dart']);
expect(options.warningsAreFatal, isTrue);
});
@@ -189,8 +188,8 @@
});
test('hintsAreFatal', () {
- CommandLineOptions options = CommandLineOptions
- .parse(['--dart-sdk', '.', '--fatal-lints', 'foo.dart']);
+ CommandLineOptions options = CommandLineOptions.parse(
+ ['--dart-sdk', '.', '--fatal-lints', 'foo.dart']);
expect(options.lintsAreFatal, isTrue);
});
@@ -232,23 +231,12 @@
});
}
- test('--use-cfe', () {
- CommandLineOptions options =
- CommandLineOptions.parse(['--use-cfe', 'foo.dart']);
- expect(options.useCFE, isTrue);
- });
-
test('--use-fasta-parser', () {
CommandLineOptions options =
CommandLineOptions.parse(['--use-fasta-parser', 'foo.dart']);
expect(options.useFastaParser, isTrue);
});
- test('--no-use-fasta-parser', () {
- CommandLineOptions options = CommandLineOptions.parse(['', 'foo.dart']);
- expect(options.useFastaParser, isFalse);
- });
-
test('--preview-dart-2', () {
CommandLineOptions options =
CommandLineOptions.parse(['--preview-dart-2', 'foo.dart']);
diff --git a/pkg/analyzer_fe_comparison/lib/comparison.dart b/pkg/analyzer_fe_comparison/lib/comparison.dart
new file mode 100644
index 0000000..03138b7
--- /dev/null
+++ b/pkg/analyzer_fe_comparison/lib/comparison.dart
@@ -0,0 +1,23 @@
+// 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:analyzer_fe_comparison/src/analyzer.dart';
+import 'package:analyzer_fe_comparison/src/comparison_node.dart';
+import 'package:analyzer_fe_comparison/src/kernel.dart';
+
+/// Compares the analyzer and kernel representations of a project, and prints
+/// the resulting diff.
+void compare(
+ String platformPath, String projectLibPath, String packagesFilePath) async {
+ ComparisonNode analyzerNode = await driveAnalyzer(projectLibPath);
+ var packagesFileUri = Uri.file(packagesFilePath);
+ var inputs = <Uri>[];
+ for (var library in analyzerNode.children) {
+ inputs.add(Uri.parse(library.text));
+ }
+ var platformUri = Uri.file(platformPath);
+ ComparisonNode kernelNode =
+ await driveKernel(inputs, packagesFileUri, platformUri);
+ print(ComparisonNode.diff(kernelNode, analyzerNode));
+}
diff --git a/pkg/analyzer_fe_comparison/lib/src/analyzer.dart b/pkg/analyzer_fe_comparison/lib/src/analyzer.dart
new file mode 100644
index 0000000..207ede3
--- /dev/null
+++ b/pkg/analyzer_fe_comparison/lib/src/analyzer.dart
@@ -0,0 +1,266 @@
+// 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 'package:analyzer/dart/analysis/analysis_context_collection.dart';
+import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer/dart/ast/visitor.dart';
+import 'package:analyzer/dart/element/element.dart';
+import 'package:analyzer/dart/element/type.dart';
+import 'package:analyzer/src/generated/resolver.dart';
+import 'package:analyzer/src/generated/source.dart' show SourceKind;
+import 'package:analyzer_fe_comparison/src/comparison_node.dart';
+
+/// Analyzes the project located at [libPath] using the analyzer, and returns a
+/// [ComparisonNode] representing it.
+Future<ComparisonNode> driveAnalyzer(String libPath) async {
+ var contextCollection = AnalysisContextCollection(includedPaths: [libPath]);
+ var contexts = contextCollection.contexts;
+ if (contexts.length != 1) {
+ throw new StateError('Expected exactly one context');
+ }
+ var context = contexts[0];
+ var session = context.currentSession;
+ var typeProvider = await session.typeProvider;
+ var uriConverter = session.uriConverter;
+ var contextRoot = context.contextRoot;
+ var libraryNodes = <ComparisonNode>[];
+ for (var filePath in contextRoot.analyzedFiles()) {
+ var kind = await session.getSourceKind(filePath);
+ if (kind == SourceKind.LIBRARY) {
+ var importUri = uriConverter.pathToUri(filePath);
+ var libraryElement = await session.getLibraryByUri(importUri.toString());
+ var childNodes = <ComparisonNode>[];
+ if (libraryElement.name.isNotEmpty) {
+ childNodes.add(ComparisonNode('name=${libraryElement.name}'));
+ }
+ for (var compilationUnit in libraryElement.units) {
+ var unitResult =
+ await session.getResolvedAst(compilationUnit.source.fullName);
+ _AnalyzerVisitor(typeProvider, childNodes)
+ ._visitList(unitResult.unit.declarations);
+ }
+ libraryNodes.add(ComparisonNode.sorted(importUri.toString(), childNodes));
+ }
+ }
+ return ComparisonNode.sorted('Component', libraryNodes);
+}
+
+/// Visitor for serializing the contents of an analyzer AST into
+/// ComparisonNodes.
+///
+/// Results are accumulated into [_resultNodes].
+class _AnalyzerVisitor extends UnifyingAstVisitor<void> {
+ final TypeProvider _typeProvider;
+
+ final List<ComparisonNode> _resultNodes;
+
+ _AnalyzerVisitor(this._typeProvider, this._resultNodes);
+
+ @override
+ void visitClassDeclaration(ClassDeclaration node) {
+ var children = <ComparisonNode>[];
+ var visitor = _AnalyzerVisitor(_typeProvider, children);
+ visitor._visitTypeParameters(node.declaredElement.typeParameters);
+ if (node.declaredElement.supertype != null) {
+ children.add(_translateType('Extends: ', node.declaredElement.supertype));
+ }
+ for (int i = 0; i < node.declaredElement.mixins.length; i++) {
+ children
+ .add(_translateType('Mixin $i: ', node.declaredElement.mixins[i]));
+ }
+ for (int i = 0; i < node.declaredElement.interfaces.length; i++) {
+ children.add(_translateType(
+ 'Implements $i: ', node.declaredElement.interfaces[i]));
+ }
+ visitor._visitList(node.members);
+ _resultNodes
+ .add(ComparisonNode.sorted('Class ${node.name.name}', children));
+ }
+
+ @override
+ void visitConstructorDeclaration(ConstructorDeclaration node) {
+ var children = <ComparisonNode>[];
+ var visitor = _AnalyzerVisitor(_typeProvider, children);
+ visitor._visitParameters(node.parameters);
+ _resultNodes.add(ComparisonNode.sorted(
+ 'Constructor ${node.name?.name ?? '(unnamed)'}', children));
+ }
+
+ @override
+ void visitEnumDeclaration(EnumDeclaration node) {
+ var children = <ComparisonNode>[];
+ for (var enumValue in node.constants) {
+ children.add(ComparisonNode('EnumValue ${enumValue.name.name}'));
+ }
+ _resultNodes.add(ComparisonNode.sorted('Enum ${node.name.name}', children));
+ }
+
+ @override
+ void visitFieldDeclaration(FieldDeclaration node) {
+ node.fields.accept(this);
+ }
+
+ @override
+ void visitFunctionDeclaration(FunctionDeclaration node) {
+ String kind;
+ if (node.isGetter) {
+ kind = 'Getter';
+ } else if (node.isSetter) {
+ kind = 'Setter';
+ } else {
+ // Kernel calls top level functions "methods".
+ kind = 'Method';
+ }
+ var children = <ComparisonNode>[];
+ var visitor = _AnalyzerVisitor(_typeProvider, children);
+ visitor._visitTypeParameters(node.declaredElement.typeParameters);
+ visitor._visitParameters(node.functionExpression.parameters);
+ children
+ .add(_translateType('Return type: ', node.declaredElement.returnType));
+ _resultNodes
+ .add(ComparisonNode.sorted('$kind ${node.name.name}', children));
+ }
+
+ @override
+ void visitFunctionTypeAlias(FunctionTypeAlias node) {
+ _visitTypedef(node);
+ }
+
+ @override
+ void visitGenericTypeAlias(GenericTypeAlias node) {
+ _visitTypedef(node);
+ }
+
+ @override
+ void visitMethodDeclaration(MethodDeclaration node) {
+ String kind;
+ if (node.isGetter) {
+ kind = 'Getter';
+ } else if (node.isSetter) {
+ kind = 'Setter';
+ } else if (node.isOperator) {
+ kind = 'Operator';
+ } else {
+ kind = 'Method';
+ }
+ var children = <ComparisonNode>[];
+ var visitor = _AnalyzerVisitor(_typeProvider, children);
+ visitor._visitTypeParameters(node.declaredElement.typeParameters);
+ visitor._visitParameters(node.parameters);
+ children
+ .add(_translateType('Return type: ', node.declaredElement.returnType));
+ _resultNodes
+ .add(ComparisonNode.sorted('$kind ${node.name.name}', children));
+ }
+
+ @override
+ Null visitNode(AstNode node) {
+ throw new UnimplementedError('AnalyzerVisitor: ${node.runtimeType}');
+ }
+
+ @override
+ void visitTopLevelVariableDeclaration(TopLevelVariableDeclaration node) {
+ node.variables.accept(this);
+ }
+
+ @override
+ void visitVariableDeclarationList(VariableDeclarationList node) {
+ for (var variableDeclaration in node.variables) {
+ var children = <ComparisonNode>[];
+ children.add(
+ _translateType('Type: ', variableDeclaration.declaredElement.type));
+ // Kernel calls both fields and top level variable declarations "fields".
+ _resultNodes.add(ComparisonNode.sorted(
+ 'Field ${variableDeclaration.name.name}', children));
+ }
+ }
+
+ /// Converts the analyzer representation of a type into a ComparisonNode.
+ ComparisonNode _translateType(String prefix, DartType type) {
+ if (type is InterfaceType) {
+ var children = <ComparisonNode>[];
+ children
+ .add(ComparisonNode('Library: ${type.element.librarySource.uri}'));
+ for (int i = 0; i < type.typeArguments.length; i++) {
+ children.add(_translateType('Type arg $i: ', type.typeArguments[i]));
+ }
+ return ComparisonNode('${prefix}InterfaceType ${type.name}', children);
+ }
+ if (type is TypeParameterType) {
+ // TODO(paulberry): disambiguate if needed.
+ return ComparisonNode('${prefix}TypeParameterType: ${type.name}');
+ }
+ if (type.isDynamic) {
+ return ComparisonNode('${prefix}Dynamic');
+ }
+ if (type.isVoid) {
+ return ComparisonNode('${prefix}Void');
+ }
+ if (type is FunctionType) {
+ var children = <ComparisonNode>[];
+ var visitor = _AnalyzerVisitor(_typeProvider, children);
+ visitor._visitTypeParameters(type.typeFormals);
+ int positionalParameterIndex = 0;
+ for (var parameterElement in type.parameters) {
+ var kind = parameterElement.isNotOptional
+ ? 'Required'
+ : parameterElement.isOptionalPositional ? 'Optional' : 'Named';
+ var name = parameterElement.isNamed
+ ? parameterElement.name
+ : '${positionalParameterIndex++}';
+ children.add(
+ _translateType('$kind parameter $name: ', parameterElement.type));
+ }
+ return ComparisonNode.sorted('${prefix}FunctionType', children);
+ }
+ throw new UnimplementedError('_translateType: ${type.runtimeType}');
+ }
+
+ /// Visits all the nodes in [nodes].
+ void _visitList(List<AstNode> nodes) {
+ for (var astNode in nodes) {
+ astNode.accept(this);
+ }
+ }
+
+ void _visitParameters(FormalParameterList parameters) {
+ var children = <ComparisonNode>[];
+ // Note: parameters == null for getters
+ if (parameters != null) {
+ for (var parameter in parameters.parameters) {
+ var element = parameter.declaredElement;
+ var kind = element.isNotOptional
+ ? 'Required'
+ : element.isOptionalPositional ? 'Optional' : 'Named';
+ var parameterChildren = <ComparisonNode>[];
+ parameterChildren.add(_translateType('Type: ', element.type));
+ children.add(
+ ComparisonNode.sorted('$kind: ${element.name}', parameterChildren));
+ }
+ }
+ _resultNodes.add(ComparisonNode('Parameters', children));
+ }
+
+ void _visitTypedef(TypeAlias node) {
+ var children = <ComparisonNode>[];
+ var visitor = _AnalyzerVisitor(_typeProvider, children);
+ GenericTypeAliasElement element = node.declaredElement;
+ visitor._visitTypeParameters(element.typeParameters);
+ children.add(_translateType('Type: ', element.function.type));
+ _resultNodes
+ .add(ComparisonNode.sorted('Typedef ${node.name.name}', children));
+ }
+
+ void _visitTypeParameters(List<TypeParameterElement> typeParameters) {
+ for (int i = 0; i < typeParameters.length; i++) {
+ _resultNodes.add(ComparisonNode(
+ 'Type parameter $i: ${typeParameters[i].name}', [
+ _translateType(
+ 'Bound: ', typeParameters[i].bound ?? _typeProvider.objectType)
+ ]));
+ }
+ }
+}
diff --git a/pkg/analyzer_fe_comparison/lib/src/comparison_node.dart b/pkg/analyzer_fe_comparison/lib/src/comparison_node.dart
new file mode 100644
index 0000000..50e1441c
--- /dev/null
+++ b/pkg/analyzer_fe_comparison/lib/src/comparison_node.dart
@@ -0,0 +1,133 @@
+// 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:math';
+
+/// [ComparisonNode] defines a simple tree structure that can be used to compare
+/// two representations of Dart code.
+///
+/// Each node contains a textual string and a list of child nodes.
+class ComparisonNode {
+ final String text;
+ final List<ComparisonNode> children;
+
+ ComparisonNode(this.text, [List<ComparisonNode> children])
+ : children = children ?? <ComparisonNode>[];
+
+ factory ComparisonNode.sorted(
+ String text, Iterable<ComparisonNode> children) =>
+ ComparisonNode(text, sortList(children));
+
+ @override
+ bool operator ==(Object other) {
+ if (other is ComparisonNode) {
+ if (text != other.text) return false;
+ if (children.length != other.children.length) return false;
+ for (int i = 0; i < children.length; i++) {
+ if (children[i] != other.children[i]) return false;
+ }
+ return true;
+ }
+ return false;
+ }
+
+ String toString({String newline: '\n'}) {
+ var lines = ['$text'];
+ var indentedNewline = '$newline ';
+ for (var child in children) {
+ lines.add(child.toString(newline: indentedNewline));
+ }
+ return lines.join(indentedNewline);
+ }
+
+ static ComparisonNode diff(ComparisonNode a, ComparisonNode b) {
+ String diffText;
+ if (a.text == b.text) {
+ diffText = '= ${a.text}';
+ } else {
+ diffText = 'x ${a.text} -> ${b.text}';
+ }
+ return ComparisonNode(diffText, diffLists(a.children, b.children));
+ }
+
+ static List<ComparisonNode> diffLists(
+ List<ComparisonNode> a, List<ComparisonNode> b) {
+ // Note: this is an O(n) "poor man's" diff algorithm; it produces optimal
+ // results if the incoming results are sorted by text or if there is just
+ // one contiguous hunk of differences. Otherwise it may not find the
+ // shortest diff. This should be sufficient for our purposes, since we are
+ // not expecting many diffs.
+
+ // We'll exclude common nodes at the beginning of both lists
+ var shorterLength = min(a.length, b.length);
+ var commonInitialNodes = 0;
+ while (commonInitialNodes < shorterLength &&
+ a[commonInitialNodes] == b[commonInitialNodes]) {
+ commonInitialNodes++;
+ }
+
+ // Fast exit if a == b
+ if (commonInitialNodes == a.length && a.length == b.length) {
+ return [];
+ }
+
+ // We'll exclude common nodes at the end of both lists (note: we don't want
+ // to overcount by re-testing the common nodes identified above)
+ var commonFinalNodes = 0;
+ while (commonInitialNodes + commonFinalNodes < shorterLength &&
+ a[a.length - commonFinalNodes - 1] ==
+ b[b.length - commonFinalNodes - 1]) {
+ commonFinalNodes++;
+ }
+
+ // Walk the remaining nodes starting at the first node that's different,
+ // matching up nodes by their text.
+ var aIndex = commonInitialNodes;
+ var bIndex = commonInitialNodes;
+ var aEnd = a.length - commonFinalNodes;
+ var bEnd = b.length - commonFinalNodes;
+ var result = <ComparisonNode>[];
+ while (aIndex < aEnd && bIndex < bEnd) {
+ var comparisonResult = a[aIndex].text.compareTo(b[bIndex].text);
+ if (comparisonResult < 0) {
+ // a[aIndex].text sorts before b[bIndex].text. Assume that this means
+ // a[aIndex] was removed.
+ result.add(diff(a[aIndex++], ComparisonNode('(removed)')));
+ } else if (comparisonResult > 0) {
+ // b[bIndex].text sorts before a[aIndex].text. Assume that this means
+ // b[bIndex] was added.
+ result.add(diff(ComparisonNode('(added)'), b[bIndex++]));
+ } else {
+ // a[aIndex].text matches b[bIndex].text, so diff the nodes.
+ var difference = diff(a[aIndex++], b[bIndex++]);
+ if (difference.text.startsWith('=') && difference.children.isEmpty) {
+ // Nodes are identical, so don't add anything
+ } else {
+ result.add(difference);
+ }
+ }
+ }
+
+ // Deal with any nodes left over.
+ while (aIndex < aEnd) {
+ result.add(diff(a[aIndex++], ComparisonNode('(removed)')));
+ }
+ while (bIndex < bEnd) {
+ result.add(diff(ComparisonNode('(added)'), b[bIndex++]));
+ }
+
+ // If we get here and we haven't added any nodes, something has gone wrong.
+ if (result.isEmpty) {
+ throw StateError('Diff produced empty diff for non-matching lists');
+ }
+
+ return result;
+ }
+
+ static List<ComparisonNode> sortList(Iterable<ComparisonNode> nodes) {
+ var result = nodes.toList();
+ result.sort((a, b) => a.text.compareTo(b.text));
+ return result;
+ }
+}
diff --git a/pkg/analyzer_fe_comparison/lib/src/kernel.dart b/pkg/analyzer_fe_comparison/lib/src/kernel.dart
new file mode 100644
index 0000000..935dd2c
--- /dev/null
+++ b/pkg/analyzer_fe_comparison/lib/src/kernel.dart
@@ -0,0 +1,277 @@
+// 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 'package:analyzer_fe_comparison/src/comparison_node.dart';
+import 'package:front_end/src/api_prototype/compiler_options.dart';
+import 'package:front_end/src/api_prototype/kernel_generator.dart';
+import 'package:front_end/src/api_prototype/standard_file_system.dart';
+import 'package:kernel/ast.dart';
+import 'package:kernel/target/targets.dart';
+
+/// Compiles the given [inputs] to kernel using the front_end, and returns a
+/// [ComparisonNode] representing them.
+Future<ComparisonNode> driveKernel(
+ List<Uri> inputs, Uri packagesFileUri, Uri platformUri) async {
+ var targetFlags = TargetFlags(strongMode: true, syncAsync: true);
+ var target = NoneTarget(targetFlags);
+ var fileSystem = StandardFileSystem.instance;
+
+ var compilerOptions = CompilerOptions()
+ ..fileSystem = fileSystem
+ ..packagesFileUri = packagesFileUri
+ ..sdkSummary = platformUri
+ ..strongMode = true
+ ..target = target
+ ..throwOnErrorsForDebugging = true
+ ..embedSourceText = false;
+
+ var component = await kernelForComponent(inputs, compilerOptions);
+ var libraryNodes = <ComparisonNode>[];
+ var visitor = _KernelVisitor(libraryNodes);
+ for (var library in component.libraries) {
+ if (inputs.contains(library.importUri)) {
+ library.accept(visitor);
+ }
+ }
+ return ComparisonNode.sorted('Component', libraryNodes);
+}
+
+/// Visitor for serializing a kernel representation of a program into
+/// ComparisonNodes.
+///
+/// Results are accumulated into [_resultNodes].
+class _KernelVisitor extends TreeVisitor<void> {
+ final List<ComparisonNode> _resultNodes;
+
+ _KernelVisitor(this._resultNodes);
+
+ @override
+ void defaultTreeNode(TreeNode node) {
+ throw new UnimplementedError('KernelVisitor: ${node.runtimeType}');
+ }
+
+ @override
+ void visitClass(Class class_) {
+ if (class_.isAnonymousMixin) return null;
+ var kind = class_.isEnum ? 'Enum' : 'Class';
+ var children = <ComparisonNode>[];
+ var visitor = _KernelVisitor(children);
+ if (class_.isEnum) {
+ for (var field in class_.fields) {
+ if (!field.isStatic) continue;
+ if (field.name.name == 'values') continue;
+ // TODO(paulberry): handle index
+ children.add(ComparisonNode('EnumValue ${field.name.name}'));
+ }
+ } else {
+ visitor._visitTypeParameters(class_.typeParameters);
+ if (class_.supertype != null) {
+ var declaredSupertype = class_.supertype.asInterfaceType;
+ var mixedInTypes = <DartType>[];
+ while (declaredSupertype.classNode.isAnonymousMixin) {
+ // Since we're walking from the class to its declared supertype, we
+ // encounter the mixins in the reverse order that they were declared,
+ // so we have to use [List.insert] to add them to [mixedInTypes].
+ mixedInTypes.insert(
+ 0, declaredSupertype.classNode.mixedInType.asInterfaceType);
+ declaredSupertype =
+ declaredSupertype.classNode.supertype.asInterfaceType;
+ }
+ children.add(_TypeVisitor.translate('Extends: ', declaredSupertype));
+ for (int i = 0; i < mixedInTypes.length; i++) {
+ children.add(_TypeVisitor.translate('Mixin $i: ', mixedInTypes[i]));
+ }
+ }
+ for (int i = 0; i < class_.implementedTypes.length; i++) {
+ children.add(_TypeVisitor.translate(
+ 'Implements $i: ', class_.implementedTypes[i].asInterfaceType));
+ }
+ visitor._visitList(class_.fields);
+ visitor._visitList(class_.constructors);
+ visitor._visitList(class_.procedures);
+ }
+ // TODO(paulberry): handle more fields from Class
+ _resultNodes.add(ComparisonNode.sorted('$kind ${class_.name}', children));
+ }
+
+ @override
+ void visitConstructor(Constructor constructor) {
+ if (constructor.isSynthetic) return null;
+ var name = constructor.name.name;
+ if (name.isEmpty) {
+ name = '(unnamed)';
+ }
+ var children = <ComparisonNode>[];
+ var visitor = _KernelVisitor(children);
+ constructor.function.accept(visitor);
+ // TODO(paulberry): handle more fields from Constructor
+ _resultNodes.add(ComparisonNode.sorted('Constructor $name', children));
+ }
+
+ @override
+ void visitField(Field field) {
+ if (field.name.name == '_redirecting#') return null;
+ var children = <ComparisonNode>[];
+ children.add(_TypeVisitor.translate('Type: ', field.type));
+ // TODO(paulberry): handle more fields from Field
+ _resultNodes
+ .add(ComparisonNode.sorted('Field ${field.name.name}', children));
+ }
+
+ @override
+ void visitFunctionNode(FunctionNode node) {
+ var parent = node.parent;
+ if (!(parent is Constructor || parent is Procedure && parent.isFactory)) {
+ _visitTypeParameters(node.typeParameters);
+ _resultNodes
+ .add(_TypeVisitor.translate('Return type: ', node.returnType));
+ }
+ var parameterChildren = <ComparisonNode>[];
+ var parameterVisitor = _KernelVisitor(parameterChildren);
+ for (int i = 0; i < node.positionalParameters.length; i++) {
+ parameterVisitor._visitParameter(node.positionalParameters[i],
+ i < node.requiredParameterCount ? 'Required' : 'Optional');
+ }
+ for (int i = 0; i < node.namedParameters.length; i++) {
+ parameterVisitor._visitParameter(node.namedParameters[i], 'Named');
+ }
+ _resultNodes.add(ComparisonNode('Parameters', parameterChildren));
+ // TODO(paulberry): handle more fields from FunctionNode
+ }
+
+ @override
+ void visitLibrary(Library library) {
+ var children = <ComparisonNode>[];
+ if (library.name != null) {
+ children.add(ComparisonNode('name=${library.name}'));
+ }
+ var visitor = _KernelVisitor(children);
+ visitor._visitList(library.typedefs);
+ visitor._visitList(library.classes);
+ visitor._visitList(library.procedures);
+ visitor._visitList(library.fields);
+ // TODO(paulberry): handle more fields from Library
+ _resultNodes
+ .add(ComparisonNode.sorted(library.importUri.toString(), children));
+ }
+
+ @override
+ void visitProcedure(Procedure procedure) {
+ if (procedure.isForwardingStub) return null;
+ // TODO(paulberry): add an annotation to the ComparisonNode when the
+ // procedure is a factory.
+ var kind = procedure.isFactory
+ ? 'Constructor'
+ : procedure.kind.toString().replaceAll('ProcedureKind.', '');
+ var name = procedure.name.name;
+ if (name.isEmpty) {
+ name = '(unnamed)';
+ }
+ var children = <ComparisonNode>[];
+ var visitor = _KernelVisitor(children);
+ procedure.function.accept(visitor);
+ // TODO(paulberry): handle more fields from Procedure
+ _resultNodes.add(ComparisonNode.sorted('$kind $name', children));
+ }
+
+ @override
+ void visitTypedef(Typedef typedef) {
+ var children = <ComparisonNode>[];
+ var visitor = _KernelVisitor(children);
+ visitor._visitTypeParameters(typedef.typeParameters);
+ children.add(_TypeVisitor.translate('Type: ', typedef.type));
+ // TODO(paulberry): handle more fields from Typedef
+ _resultNodes
+ .add(ComparisonNode.sorted('Typedef ${typedef.name}', children));
+ }
+
+ /// Visits all the nodes in [nodes].
+ void _visitList(List<TreeNode> nodes) {
+ for (var node in nodes) {
+ node.accept(this);
+ }
+ }
+
+ void _visitParameter(VariableDeclaration parameter, String kind) {
+ var children = <ComparisonNode>[];
+ children.add(_TypeVisitor.translate('Type: ', parameter.type));
+ // TODO(paulberry): handle more fields from VariableDeclaration
+ _resultNodes
+ .add(ComparisonNode.sorted('$kind: ${parameter.name}', children));
+ }
+
+ void _visitTypeParameters(List<TypeParameter> typeParameters) {
+ for (int i = 0; i < typeParameters.length; i++) {
+ _resultNodes.add(ComparisonNode(
+ 'Type parameter $i: ${typeParameters[i].name}',
+ [_TypeVisitor.translate('Bound: ', typeParameters[i].bound)]));
+ }
+ }
+}
+
+/// Visitor for serializing a kernel representation of a type into
+/// ComparisonNodes.
+class _TypeVisitor extends DartTypeVisitor<ComparisonNode> {
+ /// Text to prepend to the node text.
+ String _prefix;
+
+ _TypeVisitor(this._prefix);
+
+ @override
+ ComparisonNode defaultDartType(DartType node) {
+ throw new UnimplementedError('_TypeVisitor: ${node.runtimeType}');
+ }
+
+ @override
+ ComparisonNode visitDynamicType(DynamicType node) {
+ return ComparisonNode('${_prefix}Dynamic');
+ }
+
+ @override
+ ComparisonNode visitFunctionType(FunctionType node) {
+ var children = <ComparisonNode>[];
+ var visitor = _KernelVisitor(children);
+ visitor._visitTypeParameters(node.typeParameters);
+ for (int i = 0; i < node.positionalParameters.length; i++) {
+ var kind = i < node.requiredParameterCount ? 'Required' : 'Optional';
+ children
+ .add(translate('$kind parameter $i: ', node.positionalParameters[i]));
+ }
+ for (var namedType in node.namedParameters) {
+ children
+ .add(translate('Named parameter ${namedType.name}', namedType.type));
+ }
+ return ComparisonNode.sorted('${_prefix}FunctionType', children);
+ }
+
+ @override
+ ComparisonNode visitInterfaceType(InterfaceType node) {
+ var children = <ComparisonNode>[];
+ children.add(ComparisonNode(
+ 'Library: ${node.classNode.enclosingLibrary.importUri}'));
+ for (int i = 0; i < node.typeArguments.length; i++) {
+ children.add(translate('Type arg $i: ', node.typeArguments[i]));
+ }
+ return ComparisonNode(
+ '${_prefix}InterfaceType ${node.classNode.name}', children);
+ }
+
+ @override
+ ComparisonNode visitTypeParameterType(TypeParameterType node) {
+ // TODO(paulberry): disambiguate if needed.
+ return ComparisonNode(
+ '${_prefix}TypeParameterType: ${node.parameter.name}');
+ }
+
+ @override
+ ComparisonNode visitVoidType(VoidType node) {
+ return ComparisonNode('${_prefix}Void');
+ }
+
+ static ComparisonNode translate(String prefix, DartType type) {
+ return type.accept(new _TypeVisitor(prefix));
+ }
+}
diff --git a/pkg/analyzer_fe_comparison/pubspec.yaml b/pkg/analyzer_fe_comparison/pubspec.yaml
new file mode 100644
index 0000000..94e9893
--- /dev/null
+++ b/pkg/analyzer_fe_comparison/pubspec.yaml
@@ -0,0 +1,9 @@
+name: analyzer_fe_comparison
+version: 1.0.0
+author: Dart Team <misc@dartlang.org>
+description: Tool for comparing the behavior of the analyzer and the front end.
+homepage: https://github.com/dart-lang/sdk/tree/master/pkg/analyzer_fe_comparison
+environment:
+ sdk: '>=2.0.0-dev-48.0 <3.0.0'
+dependencies:
+ kernel: ^0.3.4
diff --git a/pkg/analyzer_fe_comparison/tool/compare_packages.dart b/pkg/analyzer_fe_comparison/tool/compare_packages.dart
new file mode 100644
index 0000000..efb0efe
--- /dev/null
+++ b/pkg/analyzer_fe_comparison/tool/compare_packages.dart
@@ -0,0 +1,33 @@
+// 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:io';
+
+import 'package:analyzer_fe_comparison/comparison.dart';
+import 'package:path/path.dart' as path;
+
+/// Compares the analyzer and front_end behavior when compiling a package.
+///
+/// Currently hardcoded to use the package "analyzer".
+main() async {
+ var scriptPath = Platform.script.toFilePath();
+ var sdkRepoPath =
+ path.normalize(path.join(path.dirname(scriptPath), '..', '..', '..'));
+ var buildPath = await _findBuildDir(sdkRepoPath, 'ReleaseX64');
+ var dillPath = path.join(buildPath, 'vm_platform_strong.dill');
+ var analyzerLibPath = path.join(sdkRepoPath, 'pkg', 'analyzer', 'lib');
+ var packagesFilePath = path.join(sdkRepoPath, '.packages');
+ compare(dillPath, analyzerLibPath, packagesFilePath);
+}
+
+Future<String> _findBuildDir(String sdkRepoPath, String targetName) async {
+ for (var subdirName in ['out', 'xcodebuild']) {
+ var candidatePath = path.join(sdkRepoPath, subdirName, targetName);
+ if (await new Directory(candidatePath).exists()) {
+ return candidatePath;
+ }
+ }
+ throw new StateError('Cannot find build directory');
+}
diff --git a/pkg/analyzer_plugin/doc/api.html b/pkg/analyzer_plugin/doc/api.html
index dfe6470..6ab809c 100644
--- a/pkg/analyzer_plugin/doc/api.html
+++ b/pkg/analyzer_plugin/doc/api.html
@@ -1265,7 +1265,7 @@
An enumeration of the kinds of elements.
</p>
- <dl><dt class="value">CLASS</dt><dt class="value">CLASS_TYPE_ALIAS</dt><dt class="value">COMPILATION_UNIT</dt><dt class="value">CONSTRUCTOR</dt><dt class="value">CONSTRUCTOR_INVOCATION</dt><dt class="value">ENUM</dt><dt class="value">ENUM_CONSTANT</dt><dt class="value">FIELD</dt><dt class="value">FILE</dt><dt class="value">FUNCTION</dt><dt class="value">FUNCTION_INVOCATION</dt><dt class="value">FUNCTION_TYPE_ALIAS</dt><dt class="value">GETTER</dt><dt class="value">LABEL</dt><dt class="value">LIBRARY</dt><dt class="value">LOCAL_VARIABLE</dt><dt class="value">METHOD</dt><dt class="value">PARAMETER</dt><dt class="value">PREFIX</dt><dt class="value">SETTER</dt><dt class="value">TOP_LEVEL_VARIABLE</dt><dt class="value">TYPE_PARAMETER</dt><dt class="value">UNIT_TEST_GROUP</dt><dt class="value">UNIT_TEST_TEST</dt><dt class="value">UNKNOWN</dt></dl></dd><dt class="typeDefinition"><a name="type_FilePath">FilePath: String</a></dt><dd>
+ <dl><dt class="value">CLASS</dt><dt class="value">CLASS_TYPE_ALIAS</dt><dt class="value">COMPILATION_UNIT</dt><dt class="value">CONSTRUCTOR</dt><dt class="value">CONSTRUCTOR_INVOCATION</dt><dt class="value">ENUM</dt><dt class="value">ENUM_CONSTANT</dt><dt class="value">FIELD</dt><dt class="value">FILE</dt><dt class="value">FUNCTION</dt><dt class="value">FUNCTION_INVOCATION</dt><dt class="value">FUNCTION_TYPE_ALIAS</dt><dt class="value">GETTER</dt><dt class="value">LABEL</dt><dt class="value">LIBRARY</dt><dt class="value">LOCAL_VARIABLE</dt><dt class="value">METHOD</dt><dt class="value">MIXIN</dt><dt class="value">PARAMETER</dt><dt class="value">PREFIX</dt><dt class="value">SETTER</dt><dt class="value">TOP_LEVEL_VARIABLE</dt><dt class="value">TYPE_PARAMETER</dt><dt class="value">UNIT_TEST_GROUP</dt><dt class="value">UNIT_TEST_TEST</dt><dt class="value">UNKNOWN</dt></dl></dd><dt class="typeDefinition"><a name="type_FilePath">FilePath: String</a></dt><dd>
<p>
The absolute, normalized path of a file.
diff --git a/pkg/analyzer_plugin/lib/protocol/protocol_common.dart b/pkg/analyzer_plugin/lib/protocol/protocol_common.dart
index f696947..6d8ea9c 100644
--- a/pkg/analyzer_plugin/lib/protocol/protocol_common.dart
+++ b/pkg/analyzer_plugin/lib/protocol/protocol_common.dart
@@ -1776,6 +1776,7 @@
* LIBRARY
* LOCAL_VARIABLE
* METHOD
+ * MIXIN
* PARAMETER
* PREFIX
* SETTER
@@ -1829,6 +1830,8 @@
static const ElementKind METHOD = const ElementKind._("METHOD");
+ static const ElementKind MIXIN = const ElementKind._("MIXIN");
+
static const ElementKind PARAMETER = const ElementKind._("PARAMETER");
static const ElementKind PREFIX = const ElementKind._("PREFIX");
@@ -1870,6 +1873,7 @@
LIBRARY,
LOCAL_VARIABLE,
METHOD,
+ MIXIN,
PARAMETER,
PREFIX,
SETTER,
@@ -1921,6 +1925,8 @@
return LOCAL_VARIABLE;
case "METHOD":
return METHOD;
+ case "MIXIN":
+ return MIXIN;
case "PARAMETER":
return PARAMETER;
case "PREFIX":
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 ce39f06..991fe82 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
@@ -1142,9 +1142,14 @@
throw new ArgumentError(
'The function must have a synchronous, non-generator body.');
}
- addInsertion(body.offset, (EditBuilder builder) {
- builder.write('async ');
- });
+ if (body is! EmptyFunctionBody) {
+ addInsertion(body.offset, (EditBuilder builder) {
+ if (_isFusedWithPreviousToken(body.beginToken)) {
+ builder.write(' ');
+ }
+ builder.write('async ');
+ });
+ }
_replaceReturnTypeWithFuture(body, typeProvider);
}
@@ -1449,6 +1454,10 @@
}
}
}
+
+ static bool _isFusedWithPreviousToken(Token token) {
+ return token.previous.end == token.offset;
+ }
}
/**
diff --git a/pkg/analyzer_plugin/pubspec.yaml b/pkg/analyzer_plugin/pubspec.yaml
index 829c396..d310999 100644
--- a/pkg/analyzer_plugin/pubspec.yaml
+++ b/pkg/analyzer_plugin/pubspec.yaml
@@ -8,7 +8,7 @@
sdk: '>=1.8.0 <3.0.0'
dependencies:
- analyzer: '>=0.31.2-alpha.1 <0.33.0'
+ analyzer: '^0.32.5'
charcode: '^1.1.0'
html: '^0.13.1'
meta: ^1.0.2
diff --git a/pkg/analyzer_plugin/test/integration/support/protocol_matchers.dart b/pkg/analyzer_plugin/test/integration/support/protocol_matchers.dart
index 2d6df20..e28e408 100644
--- a/pkg/analyzer_plugin/test/integration/support/protocol_matchers.dart
+++ b/pkg/analyzer_plugin/test/integration/support/protocol_matchers.dart
@@ -268,6 +268,7 @@
* LIBRARY
* LOCAL_VARIABLE
* METHOD
+ * MIXIN
* PARAMETER
* PREFIX
* SETTER
@@ -296,6 +297,7 @@
"LIBRARY",
"LOCAL_VARIABLE",
"METHOD",
+ "MIXIN",
"PARAMETER",
"PREFIX",
"SETTER",
diff --git a/pkg/analyzer_plugin/test/support/mock_sdk.dart b/pkg/analyzer_plugin/test/support/mock_sdk.dart
index bedead0..1b78cca 100644
--- a/pkg/analyzer_plugin/test/support/mock_sdk.dart
+++ b/pkg/analyzer_plugin/test/support/mock_sdk.dart
@@ -288,8 +288,6 @@
if (generateSummaryFiles) {
List<int> bytes = _computeLinkedBundleBytes();
provider.newFileWithBytes(
- provider.convertPath('/lib/_internal/spec.sum'), bytes);
- provider.newFileWithBytes(
provider.convertPath('/lib/_internal/strong.sum'), bytes);
}
}
@@ -356,7 +354,7 @@
PackageBundle getLinkedBundle() {
if (_bundle == null) {
resource.File summaryFile =
- provider.getFile(provider.convertPath('/lib/_internal/spec.sum'));
+ provider.getFile(provider.convertPath('/lib/_internal/strong.sum'));
List<int> bytes;
if (summaryFile.exists) {
bytes = summaryFile.readAsBytesSync();
@@ -407,7 +405,7 @@
List<Source> librarySources = sdkLibraries
.map((SdkLibrary library) => mapDartUri(library.shortName))
.toList();
- return new SummaryBuilder(librarySources, context, true).build();
+ return new SummaryBuilder(librarySources, context).build();
}
}
diff --git a/pkg/analyzer_plugin/tool/spec/common_types_spec.html b/pkg/analyzer_plugin/tool/spec/common_types_spec.html
index ba70882..ed8daca 100644
--- a/pkg/analyzer_plugin/tool/spec/common_types_spec.html
+++ b/pkg/analyzer_plugin/tool/spec/common_types_spec.html
@@ -6,7 +6,7 @@
</head>
<body>
<h1>Common Types</h1>
-<version>1.0.3</version>
+<version>1.1.0</version>
<p>
This document contains a specification of the types that are common between
the analysis server wire protocol and the analysis server plugin wire
@@ -507,6 +507,7 @@
<value><code>LIBRARY</code></value>
<value><code>LOCAL_VARIABLE</code></value>
<value><code>METHOD</code></value>
+ <value><code>MIXIN</code></value>
<value><code>PARAMETER</code></value>
<value><code>PREFIX</code></value>
<value><code>SETTER</code></value>
diff --git a/pkg/compiler/analysis_options.yaml b/pkg/compiler/analysis_options.yaml
index cb84090..050bbb3 100644
--- a/pkg/compiler/analysis_options.yaml
+++ b/pkg/compiler/analysis_options.yaml
@@ -3,7 +3,6 @@
# BSD-style license that can be found in the LICENSE file.
analyzer:
- strong-mode: true
language:
enableSuperMixins: false
errors:
diff --git a/pkg/compiler/analysis_options_dart.yaml b/pkg/compiler/analysis_options_dart.yaml
deleted file mode 100644
index 532b8b5..0000000
--- a/pkg/compiler/analysis_options_dart.yaml
+++ /dev/null
@@ -1,12 +0,0 @@
-# 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.
-
-analyzer:
- strong-mode: false
- language:
- enableSuperMixins: false
- errors:
- todo: ignore
-
- deprecated_member_use: ignore
diff --git a/pkg/compiler/lib/src/backend_strategy.dart b/pkg/compiler/lib/src/backend_strategy.dart
index cced759..d7d5d0d 100644
--- a/pkg/compiler/lib/src/backend_strategy.dart
+++ b/pkg/compiler/lib/src/backend_strategy.dart
@@ -58,6 +58,5 @@
/// Creates the [TypesInferrer] used by this strategy.
TypesInferrer createTypesInferrer(
- JClosedWorld closedWorld, InferredDataBuilder inferredDataBuilder,
- {bool disableTypeInference: false});
+ JClosedWorld closedWorld, InferredDataBuilder inferredDataBuilder);
}
diff --git a/pkg/compiler/lib/src/dump_info.dart b/pkg/compiler/lib/src/dump_info.dart
index b022af7..64423bf 100644
--- a/pkg/compiler/lib/src/dump_info.dart
+++ b/pkg/compiler/lib/src/dump_info.dart
@@ -22,10 +22,7 @@
import 'js_backend/js_backend.dart' show JavaScriptBackend;
import 'types/abstract_value_domain.dart';
import 'types/types.dart'
- show
- GlobalTypeInferenceElementResult,
- GlobalTypeInferenceMemberResult,
- GlobalTypeInferenceResults;
+ show GlobalTypeInferenceMemberResult, GlobalTypeInferenceResults;
import 'universe/world_builder.dart' show CodegenWorldBuilder;
import 'universe/world_impact.dart'
show ImpactUseCase, WorldImpact, WorldImpactVisitorImpl;
@@ -112,7 +109,7 @@
GlobalTypeInferenceMemberResult _resultOfMember(MemberEntity e) =>
_globalInferenceResults.resultOfMember(e);
- GlobalTypeInferenceElementResult _resultOfParameter(Local e) =>
+ AbstractValue _resultOfParameter(Local e) =>
_globalInferenceResults.resultOfParameter(e);
FieldInfo visitField(FieldEntity field, {ClassEntity containingClass}) {
@@ -280,7 +277,7 @@
List<ParameterInfo> parameters = <ParameterInfo>[];
List<String> inferredParameterTypes = <String>[];
codegenWorldBuilder.forEachParameterAsLocal(function, (parameter) {
- inferredParameterTypes.add('${_resultOfParameter(parameter).type}');
+ inferredParameterTypes.add('${_resultOfParameter(parameter)}');
});
int parameterIndex = 0;
codegenWorldBuilder.forEachParameter(function, (type, name, _) {
diff --git a/pkg/compiler/lib/src/inferrer/inferrer_engine.dart b/pkg/compiler/lib/src/inferrer/inferrer_engine.dart
index 777d861..a25c9fc 100644
--- a/pkg/compiler/lib/src/inferrer/inferrer_engine.dart
+++ b/pkg/compiler/lib/src/inferrer/inferrer_engine.dart
@@ -121,8 +121,6 @@
// TODO(johnniwinther): Make this private again.
GlobalTypeInferenceElementData dataOfMember(MemberEntity element);
- GlobalTypeInferenceElementData lookupDataOfMember(MemberEntity element);
-
bool checkIfExposesThis(ConstructorEntity element);
void recordExposesThis(ConstructorEntity element, bool exposesThis);
@@ -225,6 +223,8 @@
bool returnsMapValueType(Selector selector, AbstractValue mask);
+ void close();
+
void clear();
/// Returns true if global optimizations such as type inferencing can apply to
@@ -280,8 +280,6 @@
final Map<ir.Node, TypeInformation> concreteTypes =
new Map<ir.Node, TypeInformation>();
- final Map<ir.Node, TypeInformation> concreteKernelTypes =
- new Map<ir.Node, TypeInformation>();
final Set<ConstructorEntity> generativeConstructorsExposingThis =
new Set<ConstructorEntity>();
@@ -329,9 +327,6 @@
GlobalTypeInferenceElementData dataOfMember(MemberEntity element) =>
_memberData[element] ??= new KernelGlobalTypeInferenceElementData();
- GlobalTypeInferenceElementData lookupDataOfMember(MemberEntity element) =>
- _memberData[element];
-
/**
* Update [sideEffects] with the side effects of [callee] being
* called with [selector].
@@ -1167,11 +1162,18 @@
return info;
}
+ void close() {
+ for (MemberTypeInformation typeInformation
+ in types.memberTypeInformations.values) {
+ typeInformation.computeIsCalledOnce();
+ }
+ }
+
void clear() {
+ if (retainDataForTesting) return;
+
void cleanup(TypeInformation info) {
- if (!retainDataForTesting) {
- info.cleanup();
- }
+ info.cleanup();
}
types.allocatedCalls.forEach(cleanup);
@@ -1195,6 +1197,8 @@
types.allocatedMaps.values.forEach(cleanup);
types.allocatedLists.values.forEach(cleanup);
+
+ _memberData.clear();
}
Iterable<MemberEntity> getCallersOfForTesting(MemberEntity element) {
diff --git a/pkg/compiler/lib/src/inferrer/type_graph_inferrer.dart b/pkg/compiler/lib/src/inferrer/type_graph_inferrer.dart
index 72fad8b..4319b27 100644
--- a/pkg/compiler/lib/src/inferrer/type_graph_inferrer.dart
+++ b/pkg/compiler/lib/src/inferrer/type_graph_inferrer.dart
@@ -11,11 +11,11 @@
import '../compiler.dart';
import '../elements/entities.dart';
import '../js_backend/inferred_data.dart';
+import '../js_model/elements.dart' show JClosureCallMethod;
import '../js_model/locals.dart';
import '../kernel/element_map.dart';
import '../types/abstract_value_domain.dart';
import '../types/types.dart';
-import '../universe/selector.dart' show Selector;
import '../world.dart';
import 'inferrer_engine.dart';
import 'type_graph_nodes.dart';
@@ -53,7 +53,6 @@
class TypeGraphInferrer implements TypesInferrer {
InferrerEngine inferrer;
- final bool _disableTypeInference;
final JClosedWorld closedWorld;
final Compiler _compiler;
@@ -63,21 +62,17 @@
final InferredDataBuilder _inferredDataBuilder;
TypeGraphInferrer(this._compiler, this._elementMap, this._globalLocalsMap,
- this._closureDataLookup, this.closedWorld, this._inferredDataBuilder,
- {bool disableTypeInference: false})
- : this._disableTypeInference = disableTypeInference;
+ this._closureDataLookup, this.closedWorld, this._inferredDataBuilder);
String get name => 'Graph inferrer';
AbstractValueDomain get abstractValueDomain =>
closedWorld.abstractValueDomain;
- AbstractValue get _dynamicType => abstractValueDomain.dynamicType;
-
- void analyzeMain(FunctionEntity main) {
+ GlobalTypeInferenceResults analyzeMain(FunctionEntity main) {
inferrer = createInferrerEngineFor(main);
- if (_disableTypeInference) return;
inferrer.runOverAllElements();
+ return buildResults();
}
InferrerEngine createInferrerEngineFor(FunctionEntity main) {
@@ -96,90 +91,95 @@
_inferredDataBuilder);
}
- AbstractValue getReturnTypeOfMember(MemberEntity element) {
- if (_disableTypeInference) return _dynamicType;
- // Currently, closure calls return dynamic.
- if (element is! FunctionEntity) return _dynamicType;
- return inferrer.types.getInferredTypeOfMember(element).type;
- }
-
- AbstractValue getReturnTypeOfParameter(Local element) {
- if (_disableTypeInference) return _dynamicType;
- return _dynamicType;
- }
-
- AbstractValue getTypeOfMember(MemberEntity element) {
- if (_disableTypeInference) return _dynamicType;
- // The inferrer stores the return type for a function, so we have to
- // be careful to not return it here.
- if (element is FunctionEntity) return abstractValueDomain.functionType;
- return inferrer.types.getInferredTypeOfMember(element).type;
- }
-
- AbstractValue getTypeOfParameter(Local element) {
- if (_disableTypeInference) return _dynamicType;
- // The inferrer stores the return type for a function, so we have to
- // be careful to not return it here.
- return inferrer.types.getInferredTypeOfParameter(element).type;
- }
-
- AbstractValue getTypeForNewList(ir.Node node) {
- if (_disableTypeInference) return _dynamicType;
- return inferrer.types.allocatedLists[node].type;
- }
-
- bool isFixedArrayCheckedForGrowable(ir.Node node) {
- if (_disableTypeInference) return true;
- ListTypeInformation info = inferrer.types.allocatedLists[node];
- return info.checksGrowable;
- }
-
- AbstractValue getTypeOfSelector(Selector selector, AbstractValue receiver) {
- if (_disableTypeInference) return _dynamicType;
- // Bailout for closure calls. We're not tracking types of
- // closures.
- if (selector.isClosureCall) return _dynamicType;
- if (selector.isSetter || selector.isIndexSet) {
- return _dynamicType;
- }
- if (inferrer.returnsListElementType(selector, receiver)) {
- return abstractValueDomain.getContainerElementType(receiver);
- }
- if (inferrer.returnsMapValueType(selector, receiver)) {
- return abstractValueDomain.getMapValueType(receiver);
- }
-
- if (inferrer.closedWorld.includesClosureCall(selector, receiver)) {
- return abstractValueDomain.dynamicType;
- } else {
- Iterable<MemberEntity> elements =
- inferrer.closedWorld.locateMembers(selector, receiver);
- List<AbstractValue> types = <AbstractValue>[];
- for (MemberEntity element in elements) {
- AbstractValue type =
- inferrer.typeOfMemberWithSelector(element, selector).type;
- types.add(type);
- }
- return abstractValueDomain.unionOfMany(types);
- }
- }
-
Iterable<MemberEntity> getCallersOfForTesting(MemberEntity element) {
- if (_disableTypeInference) {
- throw new UnsupportedError(
- "Cannot query the type inferrer when type inference is disabled.");
- }
return inferrer.getCallersOfForTesting(element);
}
- bool isMemberCalledOnce(MemberEntity element) {
- if (_disableTypeInference) return false;
- MemberTypeInformation info =
- inferrer.types.getInferredTypeOfMember(element);
- return info.isCalledOnce();
- }
+ GlobalTypeInferenceResults buildResults() {
+ inferrer.close();
- void clear() {
+ Map<ir.Node, AbstractValue> allocatedLists = <ir.Node, AbstractValue>{};
+ Set<ir.Node> checkedForGrowableLists = new Set<ir.Node>();
+ inferrer.types.allocatedLists
+ .forEach((ir.Node node, ListTypeInformation typeInformation) {
+ ListTypeInformation info = inferrer.types.allocatedLists[node];
+ if (info.checksGrowable) {
+ checkedForGrowableLists.add(node);
+ }
+ allocatedLists[node] = typeInformation.type;
+ });
+
+ Map<MemberEntity, GlobalTypeInferenceMemberResult> memberResults =
+ <MemberEntity, GlobalTypeInferenceMemberResult>{};
+ Map<Local, AbstractValue> parameterResults = <Local, AbstractValue>{};
+
+ void createMemberResults(
+ MemberEntity member, MemberTypeInformation typeInformation) {
+ GlobalTypeInferenceElementData data = inferrer.dataOfMember(member);
+ bool isJsInterop = closedWorld.nativeData.isJsInteropMember(member);
+
+ AbstractValue returnType;
+ AbstractValue type;
+
+ if (isJsInterop) {
+ returnType = type = abstractValueDomain.dynamicType;
+ } else if (member is FunctionEntity) {
+ returnType = typeInformation.type;
+ type = abstractValueDomain.functionType;
+ } else {
+ returnType = abstractValueDomain.dynamicType;
+ type = typeInformation.type;
+ }
+
+ bool throwsAlways =
+ // Always throws if the return type was inferred to be non-null empty.
+ returnType != null && abstractValueDomain.isEmpty(returnType);
+
+ bool isCalledOnce =
+ typeInformation.isCalledOnce(); //isMemberCalledOnce(member);
+
+ memberResults[member] = new GlobalTypeInferenceMemberResultImpl(
+ data, allocatedLists, returnType, type,
+ throwsAlways: throwsAlways, isCalledOnce: isCalledOnce);
+ }
+
+ Set<FieldEntity> freeVariables = new Set<FieldEntity>();
+ inferrer.types.forEachMemberType(
+ (MemberEntity member, MemberTypeInformation typeInformation) {
+ createMemberResults(member, typeInformation);
+ if (member is JClosureCallMethod) {
+ ClosureRepresentationInfo info =
+ _closureDataLookup.getScopeInfo(member);
+ info.forEachFreeVariable((Local from, FieldEntity to) {
+ freeVariables.add(to);
+ });
+ }
+ });
+ for (FieldEntity field in freeVariables) {
+ if (!memberResults.containsKey(field)) {
+ MemberTypeInformation typeInformation =
+ inferrer.types.getInferredTypeOfMember(field);
+ typeInformation.computeIsCalledOnce();
+ createMemberResults(field, typeInformation);
+ }
+ }
+
+ inferrer.types.forEachParameterType(
+ (Local parameter, ParameterTypeInformation typeInformation) {
+ AbstractValue type = typeInformation.type;
+ parameterResults[parameter] = type;
+ });
+
+ GlobalTypeInferenceResults results = new GlobalTypeInferenceResultsImpl(
+ closedWorld,
+ _inferredDataBuilder.close(closedWorld),
+ memberResults,
+ parameterResults,
+ checkedForGrowableLists,
+ inferrer.returnsListElementTypeSet);
+
inferrer.clear();
+
+ return results;
}
}
diff --git a/pkg/compiler/lib/src/inferrer/type_graph_nodes.dart b/pkg/compiler/lib/src/inferrer/type_graph_nodes.dart
index d89a8a8..4b5d61e 100644
--- a/pkg/compiler/lib/src/inferrer/type_graph_nodes.dart
+++ b/pkg/compiler/lib/src/inferrer/type_graph_nodes.dart
@@ -445,6 +445,11 @@
return count == 1;
}
+ void computeIsCalledOnce() {
+ assert(_isCalledOnce == null, "isCalledOnce has already been computed.");
+ _isCalledOnce = _computeIsCalledOnce();
+ }
+
bool get isClosurized => closurizedCount > 0;
// Closurized methods never become stable to ensure that the information in
@@ -501,9 +506,6 @@
}
void cleanup() {
- // This node is on multiple lists so cleanup() can be called twice.
- if (_isCalledOnce != null) return;
- _isCalledOnce = _computeIsCalledOnce();
_callers = null;
super.cleanup();
}
diff --git a/pkg/compiler/lib/src/inferrer/type_system.dart b/pkg/compiler/lib/src/inferrer/type_system.dart
index 75e4ee3..2fb026d 100644
--- a/pkg/compiler/lib/src/inferrer/type_system.dart
+++ b/pkg/compiler/lib/src/inferrer/type_system.dart
@@ -55,16 +55,16 @@
final List<TypeInformation> _orderedTypeInformations = <TypeInformation>[];
/// [ParameterTypeInformation]s for parameters.
- final Map<Local, TypeInformation> parameterTypeInformations =
- new Map<Local, TypeInformation>();
+ final Map<Local, ParameterTypeInformation> parameterTypeInformations =
+ new Map<Local, ParameterTypeInformation>();
/// [MemberTypeInformation]s for members.
- final Map<MemberEntity, TypeInformation> memberTypeInformations =
- new Map<MemberEntity, TypeInformation>();
+ final Map<MemberEntity, MemberTypeInformation> memberTypeInformations =
+ new Map<MemberEntity, MemberTypeInformation>();
/// [ListTypeInformation] for allocated lists.
- final Map<ir.Node, TypeInformation> allocatedLists =
- new Map<ir.Node, TypeInformation>();
+ final Map<ir.Node, ListTypeInformation> allocatedLists =
+ new Map<ir.Node, ListTypeInformation>();
/// [MapTypeInformation] for allocated Maps.
final Map<ir.Node, TypeInformation> allocatedMaps =
@@ -398,12 +398,22 @@
});
}
+ void forEachParameterType(
+ void f(Local parameter, ParameterTypeInformation typeInformation)) {
+ parameterTypeInformations.forEach(f);
+ }
+
MemberTypeInformation getInferredTypeOfMember(MemberEntity member) {
assert(!member.isAbstract,
failedAt(member, "Unexpected abstract member $member."));
return memberTypeInformations[member] ??= _getInferredTypeOfMember(member);
}
+ void forEachMemberType(
+ void f(MemberEntity member, MemberTypeInformation typeInformation)) {
+ memberTypeInformations.forEach(f);
+ }
+
MemberTypeInformation _getInferredTypeOfMember(MemberEntity member) {
MemberTypeInformation typeInformation =
strategy.createMemberTypeInformation(_abstractValueDomain, member);
diff --git a/pkg/compiler/lib/src/js_backend/inferred_data.dart b/pkg/compiler/lib/src/js_backend/inferred_data.dart
index 1f5de05..9ae9b5f 100644
--- a/pkg/compiler/lib/src/js_backend/inferred_data.dart
+++ b/pkg/compiler/lib/src/js_backend/inferred_data.dart
@@ -243,3 +243,27 @@
return _functionsThatMightBePassedToApply.contains(element);
}
}
+
+class TrivialInferredData implements InferredData {
+ final SideEffects _allSideEffects = new SideEffects();
+
+ @override
+ SideEffects getSideEffectsOfElement(FunctionEntity element) {
+ return _allSideEffects;
+ }
+
+ @override
+ bool getMightBePassedToApply(FunctionEntity element) => true;
+
+ @override
+ bool isCalledInLoop(MemberEntity element) => true;
+
+ @override
+ bool getCannotThrow(FunctionEntity element) => false;
+
+ @override
+ SideEffects getSideEffectsOfSelector(
+ Selector selector, AbstractValue receiver) {
+ return _allSideEffects;
+ }
+}
diff --git a/pkg/compiler/lib/src/js_model/js_strategy.dart b/pkg/compiler/lib/src/js_model/js_strategy.dart
index 095117e..e2889cd 100644
--- a/pkg/compiler/lib/src/js_model/js_strategy.dart
+++ b/pkg/compiler/lib/src/js_model/js_strategy.dart
@@ -221,11 +221,9 @@
@override
TypesInferrer createTypesInferrer(
- JClosedWorld closedWorld, InferredDataBuilder inferredDataBuilder,
- {bool disableTypeInference: false}) {
+ JClosedWorld closedWorld, InferredDataBuilder inferredDataBuilder) {
return new TypeGraphInferrer(_compiler, _elementMap, _globalLocalsMap,
- _closureDataLookup, closedWorld, inferredDataBuilder,
- disableTypeInference: disableTypeInference);
+ _closureDataLookup, closedWorld, inferredDataBuilder);
}
}
diff --git a/pkg/compiler/lib/src/kernel/front_end_adapter.dart b/pkg/compiler/lib/src/kernel/front_end_adapter.dart
index 808404d..9d0b6a9 100644
--- a/pkg/compiler/lib/src/kernel/front_end_adapter.dart
+++ b/pkg/compiler/lib/src/kernel/front_end_adapter.dart
@@ -78,7 +78,6 @@
/// [DiagnosticReporter].
void reportFrontEndMessage(
DiagnosticReporter reporter, fe.CompilationMessage message) {
- // TODO(sigmund): translate message kinds using message.dart2jsCode
MessageKind kind = MessageKind.GENERIC;
Spannable span;
if (message.span != null) {
diff --git a/pkg/compiler/lib/src/kernel/kernel_backend_strategy.dart b/pkg/compiler/lib/src/kernel/kernel_backend_strategy.dart
index 7753d69..9b4dae7 100644
--- a/pkg/compiler/lib/src/kernel/kernel_backend_strategy.dart
+++ b/pkg/compiler/lib/src/kernel/kernel_backend_strategy.dart
@@ -121,14 +121,14 @@
class KernelToTypeInferenceMapImpl implements KernelToTypeInferenceMap {
final GlobalTypeInferenceResults _globalInferenceResults;
- GlobalTypeInferenceElementResult _targetResults;
+ GlobalTypeInferenceMemberResult _targetResults;
KernelToTypeInferenceMapImpl(
MemberEntity target, this._globalInferenceResults) {
_targetResults = _resultOf(target);
}
- GlobalTypeInferenceElementResult _resultOf(MemberEntity e) =>
+ GlobalTypeInferenceMemberResult _resultOf(MemberEntity e) =>
_globalInferenceResults
.resultOfMember(e is ConstructorBodyEntity ? e.constructor : e);
diff --git a/pkg/compiler/lib/src/ssa/codegen.dart b/pkg/compiler/lib/src/ssa/codegen.dart
index d70f774..a628953 100644
--- a/pkg/compiler/lib/src/ssa/codegen.dart
+++ b/pkg/compiler/lib/src/ssa/codegen.dart
@@ -8,6 +8,7 @@
import 'package:front_end/src/fasta/util/link.dart' show Link;
import '../common.dart';
+import '../common/names.dart';
import '../common/codegen.dart' show CodegenRegistry, CodegenWorkItem;
import '../common/tasks.dart' show CompilerTask;
import '../constants/constant_system.dart';
@@ -1859,7 +1860,13 @@
// we need to register that fact that we may be calling a closure
// with the same arguments.
MemberEntity target = node.element;
- if (target == null || target.isGetter) {
+ if ((target == null || target.isGetter) &&
+ // TODO(johnniwinther): Remove this when kernel adds an `isFunctionCall`
+ // flag to [ir.MethodInvocation]. Currently we can't tell the difference
+ // between a dynamic call and a function call, but we at least know that
+ // toString is not a getter (a potential function call should otherwise
+ // have been register for string concatenation).
+ selector != Selectors.toString_) {
// TODO(kasperl): If we have a typed selector for the call, we
// may know something about the types of closures that need
// the specific closure call method.
diff --git a/pkg/compiler/lib/src/ssa/kernel_impact.dart b/pkg/compiler/lib/src/ssa/kernel_impact.dart
index 0542e2a..f55d302 100644
--- a/pkg/compiler/lib/src/ssa/kernel_impact.dart
+++ b/pkg/compiler/lib/src/ssa/kernel_impact.dart
@@ -585,6 +585,11 @@
// we need to track the type arguments.
impactBuilder.registerStaticUse(new StaticUse.closureCall(
localFunction, selector.callStructure, typeArguments));
+ // TODO(johnniwinther): Yet, alas, we need the dynamic use for now. Remove
+ // this when kernel adds an `isFunctionCall` flag to
+ // [ir.MethodInvocation].
+ impactBuilder.registerDynamicUse(
+ new ConstrainedDynamicUse(selector, null, typeArguments));
} else {
visitNode(node.receiver);
Object constraint;
diff --git a/pkg/compiler/lib/src/ssa/types.dart b/pkg/compiler/lib/src/ssa/types.dart
index f9b3752..c7dd084 100644
--- a/pkg/compiler/lib/src/ssa/types.dart
+++ b/pkg/compiler/lib/src/ssa/types.dart
@@ -25,7 +25,7 @@
static AbstractValue inferredTypeForParameter(
Local element, GlobalTypeInferenceResults results) {
- return results.resultOfParameter(element).type ??
+ return results.resultOfParameter(element) ??
results.closedWorld.abstractValueDomain.dynamicType;
}
diff --git a/pkg/compiler/lib/src/types/types.dart b/pkg/compiler/lib/src/types/types.dart
index 89c5b8c..83c2bee 100644
--- a/pkg/compiler/lib/src/types/types.dart
+++ b/pkg/compiler/lib/src/types/types.dart
@@ -6,6 +6,7 @@
import 'package:kernel/ast.dart' as ir;
import '../common.dart' show failedAt;
+import '../common/names.dart';
import '../common/tasks.dart' show CompilerTask;
import '../compiler.dart' show Compiler;
import '../elements/entities.dart';
@@ -26,12 +27,19 @@
/// guarantees) and the `subclass of Object or null` type mask for the type
/// based queries (the runtime value could be anything).
abstract class GlobalTypeInferenceElementResult {
- /// Whether the method element associated with this result always throws.
- bool get throwsAlways;
-
/// The inferred type when this result belongs to a parameter or field
/// element, null otherwise.
AbstractValue get type;
+}
+
+abstract class GlobalTypeInferenceMemberResult
+ extends GlobalTypeInferenceElementResult {
+ /// Whether the member associated with this result is only called once in one
+ /// location in the entire program.
+ bool get isCalledOnce;
+
+ /// Whether the method element associated with this result always throws.
+ bool get throwsAlways;
/// The inferred return type when this result belongs to a function element.
AbstractValue get returnType;
@@ -60,91 +68,6 @@
AbstractValue typeOfIteratorCurrent(ir.Node node);
}
-abstract class GlobalTypeInferenceMemberResult
- extends GlobalTypeInferenceElementResult {
- /// Whether the member associated with this result is only called once in one
- /// location in the entire program.
- bool get isCalledOnce;
-}
-
-abstract class GlobalTypeInferenceParameterResult
- extends GlobalTypeInferenceElementResult {}
-
-abstract class GlobalTypeInferenceElementResultImpl
- implements GlobalTypeInferenceElementResult {
- // TODO(sigmund): split - stop using _data after inference is done.
- final GlobalTypeInferenceElementData _data;
-
- // TODO(sigmund): store relevant data & drop reference to inference engine.
- final TypesInferrer _inferrer;
- final bool _isJsInterop;
-
- GlobalTypeInferenceElementResultImpl(
- this._data, this._inferrer, this._isJsInterop);
-
- bool get throwsAlways {
- AbstractValue mask = this.returnType;
- // Always throws if the return type was inferred to be non-null empty.
- return mask != null && _inferrer.abstractValueDomain.isEmpty(mask);
- }
-
- AbstractValue typeOfNewList(ir.Node node) =>
- _inferrer.getTypeForNewList(node);
-
- AbstractValue typeOfListLiteral(ir.Node node) =>
- _inferrer.getTypeForNewList(node);
-
- AbstractValue typeOfSend(ir.Node node) => _data?.typeOfSend(node);
- AbstractValue typeOfGetter(ir.Node node) => _data?.typeOfGetter(node);
- AbstractValue typeOfIterator(ir.Node node) => _data?.typeOfIterator(node);
- AbstractValue typeOfIteratorMoveNext(ir.Node node) =>
- _data?.typeOfIteratorMoveNext(node);
- AbstractValue typeOfIteratorCurrent(ir.Node node) =>
- _data?.typeOfIteratorCurrent(node);
-}
-
-class GlobalTypeInferenceMemberResultImpl
- extends GlobalTypeInferenceElementResultImpl
- implements GlobalTypeInferenceMemberResult {
- // TODO(sigmund): delete, store data directly here.
- final MemberEntity _owner;
-
- GlobalTypeInferenceMemberResultImpl(
- this._owner,
- GlobalTypeInferenceElementData data,
- TypesInferrer inferrer,
- bool isJsInterop)
- : super(data, inferrer, isJsInterop);
-
- bool get isCalledOnce => _inferrer.isMemberCalledOnce(_owner);
-
- AbstractValue get returnType => _isJsInterop
- ? _inferrer.abstractValueDomain.dynamicType
- : _inferrer.getReturnTypeOfMember(_owner);
-
- AbstractValue get type => _isJsInterop
- ? _inferrer.abstractValueDomain.dynamicType
- : _inferrer.getTypeOfMember(_owner);
-}
-
-class GlobalTypeInferenceParameterResultImpl
- extends GlobalTypeInferenceElementResultImpl
- implements GlobalTypeInferenceParameterResult {
- // TODO(sigmund): delete, store data directly here.
- final Local _owner;
-
- GlobalTypeInferenceParameterResultImpl(this._owner, TypesInferrer inferrer)
- : super(null, inferrer, false);
-
- AbstractValue get returnType => _isJsInterop
- ? _inferrer.abstractValueDomain.dynamicType
- : _inferrer.getReturnTypeOfParameter(_owner);
-
- AbstractValue get type => _isJsInterop
- ? _inferrer.abstractValueDomain.dynamicType
- : _inferrer.getTypeOfParameter(_owner);
-}
-
/// Internal data used during type-inference to store intermediate results about
/// a single element.
abstract class GlobalTypeInferenceElementData {
@@ -169,17 +92,7 @@
/// API to interact with the global type-inference engine.
abstract class TypesInferrer {
- AbstractValueDomain get abstractValueDomain;
- void analyzeMain(FunctionEntity element);
- AbstractValue getReturnTypeOfMember(MemberEntity element);
- AbstractValue getReturnTypeOfParameter(Local element);
- AbstractValue getTypeOfMember(MemberEntity element);
- AbstractValue getTypeOfParameter(Local element);
- AbstractValue getTypeForNewList(ir.Node node);
- AbstractValue getTypeOfSelector(Selector selector, AbstractValue receiver);
- void clear();
- bool isMemberCalledOnce(MemberEntity element);
- bool isFixedArrayCheckedForGrowable(ir.Node node);
+ GlobalTypeInferenceResults analyzeMain(FunctionEntity element);
}
/// Results produced by the global type-inference algorithm.
@@ -195,7 +108,7 @@
GlobalTypeInferenceMemberResult resultOfMember(MemberEntity member);
- GlobalTypeInferenceElementResult resultOfParameter(Local parameter);
+ AbstractValue resultOfParameter(Local parameter);
/// Returns the type of a [selector] when applied to a receiver with the given
/// type [mask].
@@ -227,17 +140,15 @@
GlobalTypeInferenceResults runGlobalTypeInference(FunctionEntity mainElement,
JClosedWorld closedWorld, InferredDataBuilder inferredDataBuilder) {
return measure(() {
- typesInferrerInternal ??= compiler.backendStrategy.createTypesInferrer(
- closedWorld, inferredDataBuilder,
- disableTypeInference: compiler.disableTypeInference);
- typesInferrerInternal.analyzeMain(mainElement);
- typesInferrerInternal.clear();
-
- GlobalTypeInferenceResultsImpl results =
- new GlobalTypeInferenceResultsImpl(
- typesInferrerInternal, closedWorld);
+ GlobalTypeInferenceResults results;
+ if (compiler.disableTypeInference) {
+ results = new TrivialGlobalTypeInferenceResults(closedWorld);
+ } else {
+ typesInferrerInternal ??= compiler.backendStrategy
+ .createTypesInferrer(closedWorld, inferredDataBuilder);
+ results = typesInferrerInternal.analyzeMain(mainElement);
+ }
closedWorld.noSuchMethodData.categorizeComplexImplementations(results);
- results.inferredData = inferredDataBuilder.close(closedWorld);
resultsForTesting = results;
return results;
});
@@ -246,35 +157,29 @@
class GlobalTypeInferenceResultsImpl implements GlobalTypeInferenceResults {
final JClosedWorld closedWorld;
- InferredData inferredData;
- final TypeGraphInferrer _inferrer;
- // TODO(sigmund): store relevant data & drop reference to inference engine.
- final Map<MemberEntity, GlobalTypeInferenceMemberResult> _memberResults =
- <MemberEntity, GlobalTypeInferenceMemberResult>{};
- final Map<Local, GlobalTypeInferenceParameterResult> _parameterResults =
- <Local, GlobalTypeInferenceParameterResult>{};
+ final InferredData inferredData;
+ final GlobalTypeInferenceMemberResult _deadFieldResult;
+ final GlobalTypeInferenceMemberResult _deadMethodResult;
+ final AbstractValue _trivialParameterResult;
- GlobalTypeInferenceResultsImpl(this._inferrer, this.closedWorld);
+ final Map<MemberEntity, GlobalTypeInferenceMemberResult> memberResults;
+ final Map<Local, AbstractValue> parameterResults;
+ final Set<ir.Node> checkedForGrowableLists;
+ final Set<Selector> returnsListElementTypeSet;
- GlobalTypeInferenceMemberResult _createMemberResult(
- TypeGraphInferrer inferrer, MemberEntity member,
- {bool isJsInterop: false}) {
- return new GlobalTypeInferenceMemberResultImpl(
- member,
- // We store data in the context of the enclosing method, even
- // for closure elements.
- inferrer.inferrer.lookupDataOfMember(member),
- inferrer,
- isJsInterop);
- }
+ GlobalTypeInferenceResultsImpl(
+ this.closedWorld,
+ this.inferredData,
+ this.memberResults,
+ this.parameterResults,
+ this.checkedForGrowableLists,
+ this.returnsListElementTypeSet)
+ : _deadFieldResult = new DeadFieldGlobalTypeInferenceResult(
+ closedWorld.abstractValueDomain),
+ _deadMethodResult = new DeadMethodGlobalTypeInferenceResult(
+ closedWorld.abstractValueDomain),
+ _trivialParameterResult = closedWorld.abstractValueDomain.dynamicType;
- GlobalTypeInferenceParameterResult _createParameterResult(
- TypeGraphInferrer inferrer, Local parameter) {
- return new GlobalTypeInferenceParameterResultImpl(parameter, inferrer);
- }
-
- // TODO(sigmund,johnniwinther): compute result objects eagerly and make it an
- // error to query for results that don't exist.
@override
GlobalTypeInferenceMemberResult resultOfMember(MemberEntity member) {
assert(
@@ -283,25 +188,93 @@
member,
"unexpected input: ConstructorBodyElements are created"
" after global type inference, no data is avaiable for them."));
-
- bool isJsInterop = closedWorld.nativeData.isJsInteropMember(member);
- return _memberResults.putIfAbsent(member,
- () => _createMemberResult(_inferrer, member, isJsInterop: isJsInterop));
+ // TODO(sigmund,johnniwinther): Make it an error to query for results that
+ // don't exist..
+ /*assert(memberResults.containsKey(member) || member is JSignatureMethod,
+ "No inference result for member $member");*/
+ return memberResults[member] ??
+ (member is FunctionEntity ? _deadMethodResult : _deadFieldResult);
}
- // TODO(sigmund,johnniwinther): compute result objects eagerly and make it an
- // error to query for results that don't exist.
@override
- GlobalTypeInferenceElementResult resultOfParameter(Local parameter) {
- return _parameterResults.putIfAbsent(
- parameter, () => _createParameterResult(_inferrer, parameter));
+ AbstractValue resultOfParameter(Local parameter) {
+ // TODO(sigmund,johnniwinther): Make it an error to query for results that
+ // don't exist.
+ /*assert(parameterResults.containsKey(parameter),
+ "No inference result for parameter $parameter");*/
+ return parameterResults[parameter] ?? _trivialParameterResult;
}
/// Returns the type of a [selector] when applied to a receiver with the given
- /// type [mask].
+ /// [receiver] type.
@override
- AbstractValue typeOfSelector(Selector selector, AbstractValue mask) =>
- _inferrer.getTypeOfSelector(selector, mask);
+ AbstractValue typeOfSelector(Selector selector, AbstractValue receiver) {
+ // Bailout for closure calls. We're not tracking types of
+ // closures.
+ if (selector.isClosureCall)
+ return closedWorld.abstractValueDomain.dynamicType;
+ if (selector.isSetter || selector.isIndexSet) {
+ return closedWorld.abstractValueDomain.dynamicType;
+ }
+ if (returnsListElementType(selector, receiver)) {
+ return closedWorld.abstractValueDomain.getContainerElementType(receiver);
+ }
+ if (returnsMapValueType(selector, receiver)) {
+ return closedWorld.abstractValueDomain.getMapValueType(receiver);
+ }
+
+ if (closedWorld.includesClosureCall(selector, receiver)) {
+ return closedWorld.abstractValueDomain.dynamicType;
+ } else {
+ Iterable<MemberEntity> elements =
+ closedWorld.locateMembers(selector, receiver);
+ List<AbstractValue> types = <AbstractValue>[];
+ for (MemberEntity element in elements) {
+ AbstractValue type = typeOfMemberWithSelector(element, selector);
+ types.add(type);
+ }
+ return closedWorld.abstractValueDomain.unionOfMany(types);
+ }
+ }
+
+ bool returnsListElementType(Selector selector, AbstractValue mask) {
+ return mask != null &&
+ closedWorld.abstractValueDomain.isContainer(mask) &&
+ returnsListElementTypeSet.contains(selector);
+ }
+
+ bool returnsMapValueType(Selector selector, AbstractValue mask) {
+ return mask != null &&
+ closedWorld.abstractValueDomain.isMap(mask) &&
+ selector.isIndex;
+ }
+
+ AbstractValue typeOfMemberWithSelector(
+ MemberEntity element, Selector selector) {
+ if (element.name == Identifiers.noSuchMethod_ &&
+ selector.name != element.name) {
+ // An invocation can resolve to a [noSuchMethod], in which case
+ // we get the return type of [noSuchMethod].
+ return resultOfMember(element).returnType;
+ } else if (selector.isGetter) {
+ if (element.isFunction) {
+ // [functionType] is null if the inferrer did not run.
+ return closedWorld.abstractValueDomain.functionType;
+ } else if (element.isField) {
+ return resultOfMember(element).type;
+ } else if (element.isGetter) {
+ return resultOfMember(element).returnType;
+ } else {
+ assert(false, failedAt(element, "Unexpected member $element"));
+ return closedWorld.abstractValueDomain.dynamicType;
+ }
+ } else if (element.isGetter || element.isField) {
+ assert(selector.isCall || selector.isSetter);
+ return closedWorld.abstractValueDomain.dynamicType;
+ } else {
+ return resultOfMember(element).returnType;
+ }
+ }
/// Returns whether a fixed-length constructor call goes through a growable
/// check.
@@ -309,5 +282,187 @@
// constructor call.
@override
bool isFixedArrayCheckedForGrowable(ir.Node ctorCall) =>
- _inferrer.isFixedArrayCheckedForGrowable(ctorCall);
+ checkedForGrowableLists.contains(ctorCall);
+}
+
+class GlobalTypeInferenceMemberResultImpl
+ implements GlobalTypeInferenceMemberResult {
+ final GlobalTypeInferenceElementData _data;
+ final Map<ir.Node, AbstractValue> _allocatedLists;
+ final AbstractValue returnType;
+ final AbstractValue type;
+ final bool throwsAlways;
+ final bool isCalledOnce;
+
+ GlobalTypeInferenceMemberResultImpl(
+ this._data, this._allocatedLists, this.returnType, this.type,
+ {this.throwsAlways, this.isCalledOnce});
+
+ AbstractValue typeOfSend(ir.Node node) => _data?.typeOfSend(node);
+ AbstractValue typeOfGetter(ir.Node node) => _data?.typeOfGetter(node);
+ AbstractValue typeOfIterator(ir.Node node) => _data?.typeOfIterator(node);
+ AbstractValue typeOfIteratorMoveNext(ir.Node node) =>
+ _data?.typeOfIteratorMoveNext(node);
+ AbstractValue typeOfIteratorCurrent(ir.Node node) =>
+ _data?.typeOfIteratorCurrent(node);
+
+ AbstractValue typeOfNewList(ir.Node node) => _allocatedLists[node];
+
+ AbstractValue typeOfListLiteral(ir.Node node) => _allocatedLists[node];
+}
+
+class TrivialGlobalTypeInferenceResults implements GlobalTypeInferenceResults {
+ final JClosedWorld closedWorld;
+ final TrivialGlobalTypeInferenceMemberResult _trivialMemberResult;
+ final AbstractValue _trivialParameterResult;
+ final InferredData inferredData = new TrivialInferredData();
+
+ TrivialGlobalTypeInferenceResults(this.closedWorld)
+ : _trivialMemberResult = new TrivialGlobalTypeInferenceMemberResult(
+ closedWorld.abstractValueDomain.dynamicType),
+ _trivialParameterResult = closedWorld.abstractValueDomain.dynamicType;
+
+ @override
+ bool isFixedArrayCheckedForGrowable(ir.Node node) => false;
+
+ @override
+ AbstractValue typeOfSelector(Selector selector, AbstractValue mask) {
+ return closedWorld.abstractValueDomain.dynamicType;
+ }
+
+ @override
+ AbstractValue resultOfParameter(Local parameter) {
+ return _trivialParameterResult;
+ }
+
+ @override
+ GlobalTypeInferenceMemberResult resultOfMember(MemberEntity member) {
+ return _trivialMemberResult;
+ }
+}
+
+class TrivialGlobalTypeInferenceMemberResult
+ implements GlobalTypeInferenceMemberResult {
+ final AbstractValue dynamicType;
+
+ TrivialGlobalTypeInferenceMemberResult(this.dynamicType);
+
+ @override
+ AbstractValue get type => dynamicType;
+
+ @override
+ AbstractValue get returnType => dynamicType;
+
+ @override
+ bool get throwsAlways => false;
+
+ @override
+ AbstractValue typeOfIteratorCurrent(ir.Node node) => null;
+
+ @override
+ AbstractValue typeOfIteratorMoveNext(ir.Node node) => null;
+
+ @override
+ AbstractValue typeOfIterator(ir.Node node) => null;
+
+ @override
+ AbstractValue typeOfGetter(ir.Node node) => null;
+
+ @override
+ AbstractValue typeOfSend(ir.Node node) => null;
+
+ @override
+ AbstractValue typeOfListLiteral(ir.Node node) => null;
+
+ @override
+ AbstractValue typeOfNewList(ir.Node node) => null;
+
+ @override
+ bool get isCalledOnce => false;
+}
+
+class DeadFieldGlobalTypeInferenceResult
+ implements GlobalTypeInferenceMemberResult {
+ final AbstractValue dynamicType;
+ final AbstractValue emptyType;
+
+ DeadFieldGlobalTypeInferenceResult(AbstractValueDomain domain)
+ : this.dynamicType = domain.dynamicType,
+ this.emptyType = domain.emptyType;
+
+ @override
+ AbstractValue get type => emptyType;
+
+ @override
+ AbstractValue get returnType => dynamicType;
+
+ @override
+ bool get throwsAlways => false;
+
+ @override
+ AbstractValue typeOfIteratorCurrent(ir.Node node) => null;
+
+ @override
+ AbstractValue typeOfIteratorMoveNext(ir.Node node) => null;
+
+ @override
+ AbstractValue typeOfIterator(ir.Node node) => null;
+
+ @override
+ AbstractValue typeOfGetter(ir.Node node) => null;
+
+ @override
+ AbstractValue typeOfSend(ir.Node node) => null;
+
+ @override
+ AbstractValue typeOfListLiteral(ir.Node node) => null;
+
+ @override
+ AbstractValue typeOfNewList(ir.Node node) => null;
+
+ @override
+ bool get isCalledOnce => false;
+}
+
+class DeadMethodGlobalTypeInferenceResult
+ implements GlobalTypeInferenceMemberResult {
+ final AbstractValue emptyType;
+ final AbstractValue functionType;
+
+ DeadMethodGlobalTypeInferenceResult(AbstractValueDomain domain)
+ : this.functionType = domain.functionType,
+ this.emptyType = domain.emptyType;
+
+ @override
+ AbstractValue get type => functionType;
+
+ @override
+ AbstractValue get returnType => emptyType;
+
+ @override
+ bool get throwsAlways => false;
+
+ @override
+ AbstractValue typeOfIteratorCurrent(ir.Node node) => null;
+
+ @override
+ AbstractValue typeOfIteratorMoveNext(ir.Node node) => null;
+
+ @override
+ AbstractValue typeOfIterator(ir.Node node) => null;
+
+ @override
+ AbstractValue typeOfGetter(ir.Node node) => null;
+
+ @override
+ AbstractValue typeOfSend(ir.Node node) => null;
+
+ @override
+ AbstractValue typeOfListLiteral(ir.Node node) => null;
+
+ @override
+ AbstractValue typeOfNewList(ir.Node node) => null;
+
+ @override
+ bool get isCalledOnce => false;
}
diff --git a/pkg/compiler/testing_dart.json b/pkg/compiler/testing_dart.json
deleted file mode 100644
index 1b68d8b..0000000
--- a/pkg/compiler/testing_dart.json
+++ /dev/null
@@ -1,73 +0,0 @@
-{
-"":"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.",
-
- "packages": "../../.packages",
-
- "analyze": {
- "options": "analysis_options_dart.yaml",
-
- "uris": [
- ".",
- "../../tests/compiler/dart2js/"
- ],
-
- "exclude": [
- "^tests/compiler/dart2js/codegen_helper\\.dart",
- "^tests/compiler/dart2js/codegen/type_inference8_test\\.dart",
- "^tests/compiler/dart2js/deferred/inline_restrictions_test\\.dart",
- "^tests/compiler/dart2js/deferred/load_graph_segmentation2_test\\.dart",
- "^tests/compiler/dart2js/deferred/load_graph_segmentation_test\\.dart",
- "^tests/compiler/dart2js/deferred/not_in_main_test\\.dart",
- "^tests/compiler/dart2js/in_user_code_test\\.dart",
- "^tests/compiler/dart2js/inference/data/call_site\\.dart",
- "^tests/compiler/dart2js/inference/data/general\\.dart",
- "^tests/compiler/dart2js/inference/data/no_such_method\\.dart",
- "^tests/compiler/dart2js/inference/data/no_such_method2\\.dart",
- "^tests/compiler/dart2js/inference/data/postfix_prefix\\.dart",
- "^tests/compiler/dart2js/inference/data/super_invoke\\.dart",
- "^tests/compiler/dart2js/inference/simple_inferrer_closure_test\\.dart",
- "^tests/compiler/dart2js/inference/simple_inferrer_const_closure2_test\\.dart",
- "^tests/compiler/dart2js/inference/simple_inferrer_const_closure_test\\.dart",
- "^tests/compiler/dart2js/inference/simple_inferrer_global_field_closure_test\\.dart",
- "^tests/compiler/dart2js/inference/simple_inferrer_test\\.dart",
- "^tests/compiler/dart2js/inference/type_mask2_test\\.dart",
- "^tests/compiler/dart2js/jsinterop/world_test\\.dart",
- "^tests/compiler/dart2js/kernel/class_hierarchy_test\\.dart",
- "^tests/compiler/dart2js/kernel/closed_world_test\\.dart",
- "^tests/compiler/dart2js/kernel/visitor_test\\.dart",
- "^tests/compiler/dart2js/memory_compiler\\.dart",
- "^tests/compiler/dart2js/mixin_typevariable_test\\.dart",
- "^tests/compiler/dart2js/model/constant_expression_evaluate_test\\.dart",
- "^tests/compiler/dart2js/model/constant_expression_test\\.dart",
- "^tests/compiler/dart2js/needs_no_such_method_test\\.dart",
- "^tests/compiler/dart2js/no_such_method_enabled_test\\.dart",
- "^tests/compiler/dart2js/output_collector\\.dart",
- "^tests/compiler/dart2js/rti/data/future_or_future_or_generic_strong\\.dart",
- "^tests/compiler/dart2js/rti/data/future_or_future_or_strong\\.dart",
- "^tests/compiler/dart2js/rti/data/future_or_generic2_strong\\.dart",
- "^tests/compiler/dart2js/rti/data/future_or_generic_strong\\.dart",
- "^tests/compiler/dart2js/rti/data/future_or_strong\\.dart",
- "^tests/compiler/dart2js/rti/emission/future_or_future_or_generic_strong\\.dart",
- "^tests/compiler/dart2js/rti/emission/future_or_future_or_strong\\.dart",
- "^tests/compiler/dart2js/rti/emission/future_or_generic2_strong\\.dart",
- "^tests/compiler/dart2js/sourcemaps/helpers/source_map_validator_helper\\.dart",
- "^tests/compiler/dart2js/sourcemaps/diff_view\\.dart",
- "^tests/compiler/dart2js/sourcemaps/html_parts\\.dart",
- "^tests/compiler/dart2js/sourcemaps/lax_json\\.dart",
- "^tests/compiler/dart2js/sourcemaps/mapping_test\\.dart",
- "^tests/compiler/dart2js/sourcemaps/nomapping_test\\.dart",
- "^tests/compiler/dart2js/sourcemaps/output_structure\\.dart",
- "^tests/compiler/dart2js/sourcemaps/save\\.dart",
- "^tests/compiler/dart2js/sourcemaps/tools/source_mapping_test_viewer\\.dart",
- "^tests/compiler/dart2js/sourcemaps/helpers/sourcemap_helper\\.dart",
- "^tests/compiler/dart2js/sourcemaps/helpers/sourcemap_html_helper\\.dart",
- "^tests/compiler/dart2js/sourcemaps/stacktrace_test\\.dart",
- "^tests/compiler/dart2js/token_naming_test\\.dart",
- "^tests/compiler/dart2js/type_representation_test\\.dart",
- "^tests/compiler/dart2js/type_variable_occurrence_test\\.dart",
- "^tests/compiler/dart2js/unused_empty_map_test\\.dart"
- ]
- }
-}
diff --git a/pkg/dev_compiler/lib/src/analyzer/code_generator.dart b/pkg/dev_compiler/lib/src/analyzer/code_generator.dart
index 202d2c9..7226e5a 100644
--- a/pkg/dev_compiler/lib/src/analyzer/code_generator.dart
+++ b/pkg/dev_compiler/lib/src/analyzer/code_generator.dart
@@ -309,7 +309,7 @@
null,
sdk is SummaryBasedDartSdk
? sdk.bundle
- : (sdk as FolderBasedDartSdk).getSummarySdkBundle(true));
+ : (sdk as FolderBasedDartSdk).getSummarySdkBundle());
}
var assembler = PackageBundleAssembler();
@@ -327,8 +327,7 @@
uriToUnit.keys.toSet(),
(uri) => summaryData.linkedMap[uri],
(uri) => summaryData.unlinkedMap[uri] ?? uriToUnit[uri],
- context.declaredVariables.get,
- true)
+ context.declaredVariables.get)
.forEach(assembler.addLinkedLibrary);
var bundle = assembler.assemble();
@@ -1813,14 +1812,14 @@
/// (alternatively, a setter), then there is an implicit override of the
/// setter (alternatively, the getter) that does nothing.
JS.Method _emitSuperAccessorWrapper(
- MethodDeclaration method, InterfaceType type) {
- var methodElement = method.declaredElement as PropertyAccessorElement;
- var field = methodElement.variable;
- if (!field.isSynthetic) return null;
+ MethodDeclaration member, InterfaceType type) {
+ var accessorElement = member.declaredElement as PropertyAccessorElement;
+ var field = accessorElement.variable;
+ if (!field.isSynthetic || accessorElement.isAbstract) return null;
// Generate a corresponding virtual getter / setter.
- var name = _declareMemberName(methodElement);
- if (method.isGetter) {
+ var name = _declareMemberName(accessorElement);
+ if (member.isGetter) {
var setter = field.setter;
if ((setter == null || setter.isAbstract) &&
_classProperties.inheritedSetters.contains(field.name)) {
diff --git a/pkg/dev_compiler/lib/src/analyzer/module_compiler.dart b/pkg/dev_compiler/lib/src/analyzer/module_compiler.dart
index 9c6e71e..819be91 100644
--- a/pkg/dev_compiler/lib/src/analyzer/module_compiler.dart
+++ b/pkg/dev_compiler/lib/src/analyzer/module_compiler.dart
@@ -6,7 +6,8 @@
import 'dart:convert' show json;
import 'dart:io' show File;
-import 'package:analyzer/analyzer.dart' show AnalysisError, CompilationUnit;
+import 'package:analyzer/analyzer.dart'
+ show AnalysisError, CompilationUnit, StaticWarningCode;
import 'package:analyzer/dart/analysis/declared_variables.dart';
import 'package:analyzer/dart/element/element.dart'
show LibraryElement, UriReferencedElement;
@@ -188,11 +189,15 @@
var tree = context.resolveCompilationUnit(library.source, library);
trees.add(tree);
- errors.addAll(context.computeErrors(library.source));
+
+ var unitErrors = context.computeErrors(library.source);
+ errors.addAll(_filterJsErrors(library, unitErrors));
for (var part in library.parts) {
trees.add(context.resolveCompilationUnit(part.source, library));
- errors.addAll(context.computeErrors(part.source));
+
+ var unitErrors = context.computeErrors(part.source);
+ errors.addAll(_filterJsErrors(library, unitErrors));
}
}
@@ -200,6 +205,24 @@
CodeGenerator(context, summaryData, options, _extensionTypes, errors);
return codeGenerator.compile(unit, trees);
}
+
+ Iterable<AnalysisError> _filterJsErrors(
+ LibraryElement library, Iterable<AnalysisError> errors) {
+ var libraryUriStr = library.source.uri.toString();
+ if (libraryUriStr == 'dart:html' ||
+ libraryUriStr == 'dart:svg' ||
+ libraryUriStr == 'dart:_interceptors') {
+ return errors.where((error) {
+ return error.errorCode !=
+ StaticWarningCode.FINAL_NOT_INITIALIZED_CONSTRUCTOR_1 &&
+ error.errorCode !=
+ StaticWarningCode.FINAL_NOT_INITIALIZED_CONSTRUCTOR_2 &&
+ error.errorCode !=
+ StaticWarningCode.FINAL_NOT_INITIALIZED_CONSTRUCTOR_3_PLUS;
+ });
+ }
+ return errors;
+ }
}
UriReferencedElement _getDartMirrorsImport(LibraryElement library) {
diff --git a/pkg/dev_compiler/lib/src/compiler/shared_command.dart b/pkg/dev_compiler/lib/src/compiler/shared_command.dart
index ba5b5c7..225d6aa 100644
--- a/pkg/dev_compiler/lib/src/compiler/shared_command.dart
+++ b/pkg/dev_compiler/lib/src/compiler/shared_command.dart
@@ -212,7 +212,17 @@
/// Convert a [source] string to a Uri, where the source may be a
/// dart/file/package URI or a local win/mac/linux path.
Uri sourcePathToUri(String source, {bool windows}) {
- windows ??= Platform.isWindows;
+ if (windows == null) {
+ // Running on the web the Platform check will fail, and we can't use
+ // fromEnvironment because internally it's set to true for dart.library.io.
+ // So just catch the exception and if it fails then we're definitely not on
+ // Windows.
+ try {
+ windows = Platform.isWindows;
+ } catch (e) {
+ windows = false;
+ }
+ }
if (windows) {
source = source.replaceAll("\\", "/");
}
diff --git a/pkg/dev_compiler/lib/src/kernel/compiler.dart b/pkg/dev_compiler/lib/src/kernel/compiler.dart
index 0d008cc..f9ce5c8 100644
--- a/pkg/dev_compiler/lib/src/kernel/compiler.dart
+++ b/pkg/dev_compiler/lib/src/kernel/compiler.dart
@@ -1852,11 +1852,13 @@
/// This is needed because in ES6, if you only override a getter
/// (alternatively, a setter), then there is an implicit override of the
/// setter (alternatively, the getter) that does nothing.
- JS.Method _emitSuperAccessorWrapper(Procedure method,
+ JS.Method _emitSuperAccessorWrapper(Procedure member,
Map<String, Procedure> getters, Map<String, Procedure> setters) {
- var name = method.name.name;
- var memberName = _declareMemberName(method);
- if (method.isGetter) {
+ if (member.isAbstract) return null;
+
+ var name = member.name.name;
+ var memberName = _declareMemberName(member);
+ if (member.isGetter) {
if (!setters.containsKey(name) &&
_classProperties.inheritedSetters.contains(name)) {
// Generate a setter that forwards to super.
@@ -1864,7 +1866,7 @@
return JS.Method(memberName, fn, isSetter: true);
}
} else {
- assert(method.isSetter);
+ assert(member.isSetter);
if (!getters.containsKey(name) &&
_classProperties.inheritedGetters.contains(name)) {
// Generate a getter that forwards to super.
@@ -2496,9 +2498,37 @@
typeParts = [addTypeFormalsAsParameters(typeParts)];
helperCall = 'gFnType(#)';
+
+ /// Whether the type parameter [t] has an explicit bound, like
+ /// `<T extends C>`, `<T extends Object>` or `<T extends dynamic>`.
+ ///
+ /// In contrast, a type parameter like `<T>` has an implicit bound.
+ /// Implicit bounds are a bit unusual, in that `Object` is used as the
+ /// bound for checking, but `dynamic` is filled in as the default value.
+ ///
+ /// Kernel represents `<T>` as `<T extends Object = dynamic>`. We can find
+ /// explicit bounds by looking for anything *except* that.
+ typeParameterHasExplicitBound(TypeParameter t) =>
+ t.bound != types.objectType || t.defaultType != const DynamicType();
+
// If any explicit bounds were passed, emit them.
- if (typeFormals.any((t) => t.bound != null)) {
- var bounds = typeFormals.map((t) => _emitType(t.bound)).toList();
+ if (typeFormals.any(typeParameterHasExplicitBound)) {
+ /// Emits the bound of the type parameter [t] for use in runtime
+ /// checking and the default value (e.g. for dynamic class).
+ ///
+ /// For most type parameters we can use [TypeParameter.bound]. However,
+ /// for *implicit* bounds such as `<T>` (represented in Kernel as
+ /// `<T extends Object = dynamic>`) we need to emit `dynamic` so we use
+ /// the correct default value at runtime.
+ ///
+ /// Because `dynamic` and `Object` are both top types, they'll behave
+ /// identically for the purposes of type checks.
+ emitTypeParameterBound(TypeParameter t) =>
+ typeParameterHasExplicitBound(t)
+ ? _emitType(t.bound)
+ : visitDynamicType(const DynamicType());
+
+ var bounds = typeFormals.map(emitTypeParameterBound).toList();
typeParts.add(addTypeFormalsAsParameters(bounds));
}
} else {
diff --git a/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/types.dart b/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/types.dart
index c74a95b..7d4ab70 100644
--- a/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/types.dart
+++ b/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/types.dart
@@ -55,7 +55,8 @@
class TypeRep implements Type {
String get name => this.toString();
- // TODO(jmesserly): these should never be reached.
+ // TODO(jmesserly): these should never be reached, can be make them abstract?
+ @notNull
@JSExportName('is')
bool is_T(object) => instanceOf(object, this);
@@ -79,40 +80,62 @@
check_T(object) => object;
}
+@notNull
bool _isJsObject(obj) => JS('!', '# === #', getReifiedType(obj), jsobject);
+/// The Dart type that represents a JavaScript class(/constructor) type.
+///
+/// The JavaScript type may not exist, either because it's not loaded yet, or
+/// because it's not available (such as with mocks). To handle this gracefully,
+/// we disable type checks for in these cases, and allow any JS object to work
+/// as if it were an instance of this JS type.
class LazyJSType extends TypeRep {
- final Function() _rawJSType;
+ Function() _getRawJSTypeFn;
+ @notNull
final String _dartName;
+ Object _rawJSType;
- LazyJSType(this._rawJSType, this._dartName);
+ LazyJSType(this._getRawJSTypeFn, this._dartName);
- toString() => typeName(_rawJSType());
+ toString() {
+ var raw = _getRawJSType();
+ return raw != null ? typeName(raw) : "JSObject<$_dartName>";
+ }
- _raw() {
- var raw = _rawJSType();
+ Object _getRawJSType() {
+ var raw = _rawJSType;
+ if (raw != null) return raw;
+
+ // Try to evaluate the JS type. If this fails for any reason, we'll try
+ // again next time.
+ // TODO(jmesserly): is it worth trying again? It may create unnecessary
+ // overhead, especially if exceptions are being thrown. Also it means the
+ // behavior of a given type check can change later on.
+ try {
+ raw = _getRawJSTypeFn();
+ } catch (e) {}
+
if (raw == null) {
_warn('Cannot find native JavaScript type ($_dartName) for type check');
+ } else {
+ _rawJSType = raw;
+ _getRawJSTypeFn = null; // Free the function that computes the JS type.
}
return raw;
}
- rawJSTypeForCheck() {
- var raw = _raw();
- if (raw != null) return raw;
- // Treat as anonymous: return true for any JS object.
- return jsobject;
- }
+ Object rawJSTypeForCheck() => _getRawJSType() ?? jsobject;
- bool isRawType(obj) {
- var raw = _raw();
+ @notNull
+ bool isRawJSType(obj) {
+ var raw = _getRawJSType();
if (raw != null) return JS('!', '# instanceof #', obj, raw);
- // Treat as anonymous: return true for any JS object.
return _isJsObject(obj);
}
+ @notNull
@JSExportName('is')
- bool is_T(obj) => isRawType(obj) || instanceOf(obj, this);
+ bool is_T(obj) => isRawJSType(obj) || instanceOf(obj, this);
@JSExportName('as')
as_T(obj) => obj == null || is_T(obj) ? obj : castError(obj, this, false);
diff --git a/pkg/front_end/lib/src/api_prototype/compilation_message.dart b/pkg/front_end/lib/src/api_prototype/compilation_message.dart
index 87cc67d..0b4f6fe 100644
--- a/pkg/front_end/lib/src/api_prototype/compilation_message.dart
+++ b/pkg/front_end/lib/src/api_prototype/compilation_message.dart
@@ -34,8 +34,4 @@
/// The corresponding analyzer error code, or null if there is no
/// corresponding message in analyzer.
String get analyzerCode;
-
- /// The corresponding dart2js error code, or null if there is no corresponding
- /// message in dart2js.
- String get dart2jsCode;
}
diff --git a/pkg/front_end/lib/src/api_prototype/incremental_kernel_generator.dart b/pkg/front_end/lib/src/api_prototype/incremental_kernel_generator.dart
index 8d4e803..eef20ee 100644
--- a/pkg/front_end/lib/src/api_prototype/incremental_kernel_generator.dart
+++ b/pkg/front_end/lib/src/api_prototype/incremental_kernel_generator.dart
@@ -25,6 +25,13 @@
initializeFromDillUri);
}
+ factory IncrementalKernelGenerator.fromComponent(
+ CompilerOptions options, Uri entryPoint, Component component) {
+ return new IncrementalCompiler.fromComponent(
+ new CompilerContext(new ProcessedOptions(options, [entryPoint])),
+ component);
+ }
+
/// Returns a component whose libraries are the recompiled libraries,
/// or - in the case of [fullComponent] - a full Component.
Future<Component> computeDelta({Uri entryPoint, bool fullComponent});
diff --git a/pkg/front_end/lib/src/base/processed_options.dart b/pkg/front_end/lib/src/base/processed_options.dart
index 0b25e2f..5c81b7b 100644
--- a/pkg/front_end/lib/src/base/processed_options.dart
+++ b/pkg/front_end/lib/src/base/processed_options.dart
@@ -571,7 +571,7 @@
// Infer based on the sdkRoot, but only when `compileSdk` is false,
// otherwise the default intent was to compile the sdk from sources and
// not to load an sdk summary file.
- _sdkSummary = root?.resolve("vm_platform.dill");
+ _sdkSummary = root?.resolve("vm_platform_strong.dill");
}
if (_raw.librariesSpecificationUri != null) {
@@ -689,19 +689,13 @@
String get analyzerCode => _original.code.analyzerCode;
- String get dart2jsCode => _original.code.dart2jsCode;
-
SourceSpan get span {
- var uri = _original.uri;
- var offset = _original.charOffset;
- if (offset == -1) {
- if (uri == null) return null;
- return new SourceLocation(0, sourceUrl: uri).pointSpan();
+ if (_original.charOffset == -1) {
+ if (_original.uri == null) return null;
+ return new SourceLocation(0, sourceUrl: _original.uri).pointSpan();
}
- return new SourceSpan(
- new SourceLocation(offset, sourceUrl: uri),
- new SourceLocation(offset + _original.length, sourceUrl: uri),
- 'X' * _original.length);
+ return new SourceLocation(_original.charOffset, sourceUrl: _original.uri)
+ .pointSpan();
}
_CompilationMessage(this._original, this.severity);
diff --git a/pkg/front_end/lib/src/fasta/builder/builder.dart b/pkg/front_end/lib/src/fasta/builder/builder.dart
index 914ee9e..2efbcb9 100644
--- a/pkg/front_end/lib/src/fasta/builder/builder.dart
+++ b/pkg/front_end/lib/src/fasta/builder/builder.dart
@@ -4,6 +4,14 @@
library fasta.builder;
+export '../identifiers.dart'
+ show
+ Identifier,
+ InitializedIdentifier,
+ QualifiedName,
+ deprecated_extractToken,
+ flattenName;
+
export '../scope.dart' show AccessErrorBuilder, Scope, ScopeBuilder;
export 'builtin_type_builder.dart' show BuiltinTypeBuilder;
@@ -44,8 +52,6 @@
export 'procedure_builder.dart' show ProcedureBuilder;
-export 'qualified_name.dart' show QualifiedName;
-
export 'type_builder.dart' show TypeBuilder;
export 'type_declaration_builder.dart' show TypeDeclarationBuilder;
diff --git a/pkg/front_end/lib/src/fasta/builder/class_builder.dart b/pkg/front_end/lib/src/fasta/builder/class_builder.dart
index b6bad03..d2b9c0f 100644
--- a/pkg/front_end/lib/src/fasta/builder/class_builder.dart
+++ b/pkg/front_end/lib/src/fasta/builder/class_builder.dart
@@ -63,9 +63,6 @@
String get debugName => "ClassBuilder";
- @override
- bool get buildsArguments => true;
-
/// Returns true if this class is the result of applying a mixin to its
/// superclass.
bool get isMixinApplication => mixedInType != null;
@@ -236,15 +233,10 @@
null);
}
- void addCompileTimeError(Message message, int charOffset, int length,
- {List<LocatedMessage> context}) {
- library.addCompileTimeError(message, charOffset, length, fileUri,
- context: context);
- }
-
void addProblem(Message message, int charOffset, int length,
- {List<LocatedMessage> context}) {
- library.addProblem(message, charOffset, length, fileUri, context: context);
+ {bool wasHandled: false, List<LocatedMessage> context}) {
+ library.addProblem(message, charOffset, length, fileUri,
+ wasHandled: wasHandled, context: context);
}
void prepareTopLevelInference() {}
diff --git a/pkg/front_end/lib/src/fasta/builder/constructor_reference_builder.dart b/pkg/front_end/lib/src/fasta/builder/constructor_reference_builder.dart
index bc7a3cb..d3f8d63 100644
--- a/pkg/front_end/lib/src/fasta/builder/constructor_reference_builder.dart
+++ b/pkg/front_end/lib/src/fasta/builder/constructor_reference_builder.dart
@@ -14,7 +14,8 @@
PrefixBuilder,
QualifiedName,
Scope,
- TypeBuilder;
+ TypeBuilder,
+ flattenName;
class ConstructorReferenceBuilder {
final int charOffset;
@@ -34,14 +35,17 @@
Declaration parent, this.charOffset)
: fileUri = parent.fileUri;
- String get fullNameForErrors => "$name${suffix == null ? '' : '.$suffix'}";
+ String get fullNameForErrors {
+ return "${flattenName(name, charOffset, fileUri)}"
+ "${suffix == null ? '' : '.$suffix'}";
+ }
void resolveIn(Scope scope, LibraryBuilder accessingLibrary) {
final name = this.name;
Declaration declaration;
if (name is QualifiedName) {
- String prefix = name.prefix;
- String middle = name.suffix;
+ String prefix = name.qualifier;
+ String middle = name.name;
declaration = scope.lookup(prefix, charOffset, fileUri);
if (declaration is PrefixBuilder) {
PrefixBuilder prefix = declaration;
diff --git a/pkg/front_end/lib/src/fasta/builder/declaration.dart b/pkg/front_end/lib/src/fasta/builder/declaration.dart
index bc3f76b..d340033 100644
--- a/pkg/front_end/lib/src/fasta/builder/declaration.dart
+++ b/pkg/front_end/lib/src/fasta/builder/declaration.dart
@@ -26,12 +26,8 @@
String get fullNameForErrors;
- bool get buildsArguments => false;
-
bool get hasProblem => false;
- bool get hasTarget => false;
-
bool get isConst => false;
bool get isConstructor => false;
diff --git a/pkg/front_end/lib/src/fasta/builder/function_type_alias_builder.dart b/pkg/front_end/lib/src/fasta/builder/function_type_alias_builder.dart
index 5cd87e1..7abb3f3 100644
--- a/pkg/front_end/lib/src/fasta/builder/function_type_alias_builder.dart
+++ b/pkg/front_end/lib/src/fasta/builder/function_type_alias_builder.dart
@@ -24,9 +24,6 @@
String get debugName => "FunctionTypeAliasBuilder";
- @override
- bool get buildsArguments => true;
-
LibraryBuilder get parent => super.parent;
int get typeVariablesCount;
diff --git a/pkg/front_end/lib/src/fasta/builder/library_builder.dart b/pkg/front_end/lib/src/fasta/builder/library_builder.dart
index 5b43657..2f29995 100644
--- a/pkg/front_end/lib/src/fasta/builder/library_builder.dart
+++ b/pkg/front_end/lib/src/fasta/builder/library_builder.dart
@@ -20,6 +20,8 @@
templateInternalProblemNotFoundIn,
templateInternalProblemPrivateConstructorAccess;
+import '../severity.dart' show Severity;
+
import 'builder.dart'
show
ClassBuilder,
@@ -78,23 +80,19 @@
exporters.add(new Export(exporter, this, combinators, charOffset));
}
- /// See `Loader.addCompileTimeError` for an explanation of the
- /// arguments passed to this method.
+ /// Add a problem with a severity determined by the severity of the message.
///
/// If [fileUri] is null, it defaults to `this.fileUri`.
- void addCompileTimeError(
- Message message, int charOffset, int length, Uri fileUri,
- {bool wasHandled: false, List<LocatedMessage> context}) {
- fileUri ??= this.fileUri;
- loader.addCompileTimeError(message, charOffset, length, fileUri,
- wasHandled: wasHandled, context: context);
- }
-
- /// Add a problem with a severity determined by the severity of the message.
+ ///
+ /// See `Loader.addMessage` for an explanation of the
+ /// arguments passed to this method.
void addProblem(Message message, int charOffset, int length, Uri fileUri,
- {List<LocatedMessage> context}) {
+ {bool wasHandled: false,
+ List<LocatedMessage> context,
+ Severity severity}) {
fileUri ??= this.fileUri;
- loader.addProblem(message, charOffset, length, fileUri, context: context);
+ loader.addProblem(message, charOffset, length, fileUri,
+ wasHandled: wasHandled, context: context, severity: severity);
}
/// Returns true if the export scope was modified.
diff --git a/pkg/front_end/lib/src/fasta/builder/member_builder.dart b/pkg/front_end/lib/src/fasta/builder/member_builder.dart
index 759c0f9..827fe5f 100644
--- a/pkg/front_end/lib/src/fasta/builder/member_builder.dart
+++ b/pkg/front_end/lib/src/fasta/builder/member_builder.dart
@@ -17,9 +17,6 @@
MemberBuilder(this.parent, int charOffset) : super(parent, charOffset);
- @override
- bool get hasTarget => true;
-
bool get isInstanceMember => isClassMember && !isStatic;
bool get isClassMember => parent is ClassBuilder;
diff --git a/pkg/front_end/lib/src/fasta/builder/named_type_builder.dart b/pkg/front_end/lib/src/fasta/builder/named_type_builder.dart
index 08b77d8..1a263f0 100644
--- a/pkg/front_end/lib/src/fasta/builder/named_type_builder.dart
+++ b/pkg/front_end/lib/src/fasta/builder/named_type_builder.dart
@@ -6,41 +6,38 @@
import '../fasta_codes.dart'
show
- Message,
+ LocatedMessage,
+ noLength,
templateMissingExplicitTypeArguments,
- templateTypeArgumentMismatch;
+ templateTypeArgumentMismatch,
+ templateTypeNotFound;
-import '../source/outline_listener.dart';
+import '../problems.dart' show unhandled;
import 'builder.dart'
show
Declaration,
+ Identifier,
InvalidTypeBuilder,
LibraryBuilder,
PrefixBuilder,
QualifiedName,
Scope,
TypeBuilder,
- TypeDeclarationBuilder;
+ TypeDeclarationBuilder,
+ flattenName;
abstract class NamedTypeBuilder<T extends TypeBuilder, R> extends TypeBuilder {
- final OutlineListener outlineListener;
final Object name;
List<T> arguments;
TypeDeclarationBuilder<T, R> declaration;
- /// If the number of [arguments] does not correspond to the number of
- /// type parameters in the [declaration], semantically we should replace
- /// [declaration] with [InvalidTypeBuilder]. But we still need to store
- /// the original declaration into [outlineListener].
- TypeDeclarationBuilder<T, R> actualDeclaration;
+ NamedTypeBuilder(this.name, this.arguments);
- NamedTypeBuilder(this.outlineListener, this.name, this.arguments);
-
- InvalidTypeBuilder<T, R> buildInvalidType(int charOffset, Uri fileUri,
- [Message message]);
+ @override
+ InvalidTypeBuilder<T, R> buildInvalidType(LocatedMessage message);
@override
void bind(TypeDeclarationBuilder declaration) {
@@ -54,40 +51,50 @@
final name = this.name;
Declaration member;
if (name is QualifiedName) {
- Declaration prefix = scope.lookup(name.prefix, charOffset, fileUri);
+ Object qualifier = name.qualifier;
+ String prefixName = flattenName(qualifier, charOffset, fileUri);
+ Declaration prefix = scope.lookup(prefixName, charOffset, fileUri);
if (prefix is PrefixBuilder) {
- outlineListener?.store(charOffset, false,
- importIndex: prefix.importIndex);
- member = prefix.lookup(name.suffix, name.charOffset, fileUri);
+ member = prefix.lookup(name.name, name.charOffset, fileUri);
}
- } else {
+ } else if (name is String) {
member = scope.lookup(name, charOffset, fileUri);
+ } else {
+ unhandled("${name.runtimeType}", "resolveIn", charOffset, fileUri);
}
if (member is TypeDeclarationBuilder) {
declaration = member.origin;
if (arguments == null && declaration.typeVariablesCount != 0) {
+ String typeName;
+ int typeNameOffset;
+ if (name is Identifier) {
+ typeName = name.name;
+ typeNameOffset = name.charOffset;
+ } else {
+ typeName = name;
+ typeNameOffset = charOffset;
+ }
library.addProblem(
templateMissingExplicitTypeArguments
.withArguments(declaration.typeVariablesCount),
- charOffset,
- "$name".length,
+ typeNameOffset,
+ typeName.length,
fileUri);
}
return;
}
- declaration = buildInvalidType(charOffset, fileUri);
+ declaration = buildInvalidType(templateTypeNotFound
+ .withArguments(flattenName(name, charOffset, fileUri))
+ .withLocation(fileUri, charOffset, noLength));
}
@override
void check(int charOffset, Uri fileUri) {
if (arguments != null &&
arguments.length != declaration.typeVariablesCount) {
- actualDeclaration = declaration;
- declaration = buildInvalidType(
- charOffset,
- fileUri,
- templateTypeArgumentMismatch.withArguments(
- name, declaration.typeVariablesCount));
+ declaration = buildInvalidType(templateTypeArgumentMismatch
+ .withArguments(declaration.typeVariablesCount)
+ .withLocation(fileUri, charOffset, noLength));
}
}
diff --git a/pkg/front_end/lib/src/fasta/builder/qualified_name.dart b/pkg/front_end/lib/src/fasta/builder/qualified_name.dart
deleted file mode 100644
index e879e46..0000000
--- a/pkg/front_end/lib/src/fasta/builder/qualified_name.dart
+++ /dev/null
@@ -1,15 +0,0 @@
-// 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.
-
-library fasta.qualified_name;
-
-class QualifiedName {
- final prefix;
- final String suffix;
- final int charOffset;
-
- QualifiedName(this.prefix, this.suffix, this.charOffset);
-
- toString() => "$prefix.$suffix";
-}
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 ee13b6f..6f3fad2 100644
--- a/pkg/front_end/lib/src/fasta/builder/type_builder.dart
+++ b/pkg/front_end/lib/src/fasta/builder/type_builder.dart
@@ -4,6 +4,8 @@
library fasta.type_builder;
+import '../fasta_codes.dart' show LocatedMessage;
+
import 'builder.dart'
show LibraryBuilder, Scope, TypeDeclarationBuilder, TypeVariableBuilder;
@@ -40,7 +42,7 @@
build(LibraryBuilder library);
- buildInvalidType(int charOffset, Uri fileUri);
+ buildInvalidType(LocatedMessage message);
String get fullNameForErrors => "${printOn(new StringBuffer())}";
}
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 c853c15..4f3acc7 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
@@ -16,9 +16,6 @@
String name, this.bound, LibraryBuilder compilationUnit, int charOffset)
: super(null, null, name, compilationUnit, charOffset);
- @override
- bool get hasTarget => true;
-
bool get isTypeVariable => true;
String get debugName => "TypeVariableBuilder";
diff --git a/pkg/front_end/lib/src/fasta/builder/unresolved_type.dart b/pkg/front_end/lib/src/fasta/builder/unresolved_type.dart
index 7c5004a..c716335 100644
--- a/pkg/front_end/lib/src/fasta/builder/unresolved_type.dart
+++ b/pkg/front_end/lib/src/fasta/builder/unresolved_type.dart
@@ -22,4 +22,6 @@
/// Normalizes the type arguments in accordance with Dart 1 semantics.
void normalizeType() => builder.normalize(charOffset, fileUri);
+
+ String toString() => "UnresolvedType(@$charOffset, $builder)";
}
diff --git a/pkg/front_end/lib/src/fasta/combinator.dart b/pkg/front_end/lib/src/fasta/combinator.dart
index 5dfcf91..9f97607 100644
--- a/pkg/front_end/lib/src/fasta/combinator.dart
+++ b/pkg/front_end/lib/src/fasta/combinator.dart
@@ -7,30 +7,15 @@
class Combinator {
final bool isShow;
- final List<CombinatorIdentifier> identifiers;
-
final Set<String> names;
- Combinator(
- this.isShow, this.identifiers, this.names, int charOffset, Uri fileUri);
+ Combinator(this.isShow, this.names, int charOffset, Uri fileUri);
- Combinator.hide(List<CombinatorIdentifier> identifiers,
- Iterable<String> names, int charOffset, Uri fileUri)
- : this(false, identifiers, new Set<String>.from(names), charOffset,
- fileUri);
+ Combinator.show(Iterable<String> names, int charOffset, Uri fileUri)
+ : this(true, new Set<String>.from(names), charOffset, fileUri);
- Combinator.show(List<CombinatorIdentifier> identifiers,
- Iterable<String> names, int charOffset, Uri fileUri)
- : this(true, identifiers, new Set<String>.from(names), charOffset,
- fileUri);
+ Combinator.hide(Iterable<String> names, int charOffset, Uri fileUri)
+ : this(false, new Set<String>.from(names), charOffset, fileUri);
bool get isHide => !isShow;
}
-
-class CombinatorIdentifier {
- final int offset;
- final String name;
- final bool isSynthetic;
-
- CombinatorIdentifier(this.offset, this.name, this.isSynthetic);
-}
diff --git a/pkg/front_end/lib/src/fasta/deprecated_problems.dart b/pkg/front_end/lib/src/fasta/deprecated_problems.dart
index 1d0c9fa..86067fb7 100644
--- a/pkg/front_end/lib/src/fasta/deprecated_problems.dart
+++ b/pkg/front_end/lib/src/fasta/deprecated_problems.dart
@@ -25,7 +25,7 @@
/// Used to report an error in input.
///
/// Avoid using this for reporting compile-time errors, instead use
-/// `LibraryBuilder.addCompileTimeError` for those.
+/// `LibraryBuilder.addProblem` for those.
///
/// An input error is any error that isn't an internal error. We use the term
/// "input error" in favor of "user error". This way, if an input error isn't
diff --git a/pkg/front_end/lib/src/fasta/dill/dill_library_builder.dart b/pkg/front_end/lib/src/fasta/dill/dill_library_builder.dart
index c440b0b..ba16545 100644
--- a/pkg/front_end/lib/src/fasta/dill/dill_library_builder.dart
+++ b/pkg/front_end/lib/src/fasta/dill/dill_library_builder.dart
@@ -19,7 +19,12 @@
StringLiteral,
Typedef;
-import '../fasta_codes.dart' show templateUnspecified;
+import '../fasta_codes.dart'
+ show
+ Message,
+ templateDuplicatedDefinition,
+ templateTypeNotFound,
+ templateUnspecified;
import '../problems.dart' show internalProblem, unhandled, unimplemented;
@@ -65,9 +70,6 @@
String get name => library.name;
@override
- bool get hasTarget => true;
-
- @override
Library get target => library;
void becomeCoreLibrary(dynamicType) {
@@ -151,7 +153,11 @@
// mapping `k` to `d` is added to the exported namespace of `L` unless a
// top-level declaration with the name `k` exists in `L`.
if (builder.parent == this) return builder;
- return new KernelInvalidTypeBuilder(name, charOffset, fileUri);
+ return new KernelInvalidTypeBuilder(
+ name,
+ templateDuplicatedDefinition
+ .withArguments(name)
+ .withLocation(fileUri, charOffset, name.length));
}
@override
@@ -160,7 +166,7 @@
}
void finalizeExports() {
- unserializableExports?.forEach((String name, String message) {
+ unserializableExports?.forEach((String name, String messageText) {
Declaration declaration;
switch (name) {
case "dynamic":
@@ -171,13 +177,11 @@
break;
default:
- declaration = new KernelInvalidTypeBuilder(
- name,
- -1,
- null,
- message == null
- ? null
- : templateUnspecified.withArguments(message));
+ Message message = messageText == null
+ ? templateTypeNotFound.withArguments(name)
+ : templateUnspecified.withArguments(messageText);
+ declaration =
+ new KernelInvalidTypeBuilder(name, message.withoutLocation());
}
exportScopeBuilder.addMember(name, declaration);
});
diff --git a/pkg/front_end/lib/src/fasta/dill/dill_member_builder.dart b/pkg/front_end/lib/src/fasta/dill/dill_member_builder.dart
index b7b8496..7b54cd3 100644
--- a/pkg/front_end/lib/src/fasta/dill/dill_member_builder.dart
+++ b/pkg/front_end/lib/src/fasta/dill/dill_member_builder.dart
@@ -30,9 +30,6 @@
String get debugName => "DillMemberBuilder";
- @override
- bool get hasTarget => true;
-
Member get target => member;
String get name => member.name.name;
diff --git a/pkg/front_end/lib/src/fasta/fasta_codes.dart b/pkg/front_end/lib/src/fasta/fasta_codes.dart
index 05f3cde..f5c2da1 100644
--- a/pkg/front_end/lib/src/fasta/fasta_codes.dart
+++ b/pkg/front_end/lib/src/fasta/fasta_codes.dart
@@ -25,12 +25,10 @@
final String analyzerCode;
- final String dart2jsCode;
-
final Severity severity;
const Code(this.name, this.template,
- {this.analyzerCode, this.dart2jsCode, this.severity});
+ {this.analyzerCode, this.severity: Severity.error});
String toString() => name;
}
@@ -62,14 +60,10 @@
const MessageCode(String name,
{String analyzerCode,
- String dart2jsCode,
- Severity severity,
+ Severity severity: Severity.error,
this.message,
this.tip})
- : super(name, null,
- analyzerCode: analyzerCode,
- dart2jsCode: dart2jsCode,
- severity: severity);
+ : super(name, null, analyzerCode: analyzerCode, severity: severity);
Map<String, dynamic> get arguments => const <String, dynamic>{};
diff --git a/pkg/front_end/lib/src/fasta/fasta_codes_generated.dart b/pkg/front_end/lib/src/fasta/fasta_codes_generated.dart
index a695393..4934ff9 100644
--- a/pkg/front_end/lib/src/fasta/fasta_codes_generated.dart
+++ b/pkg/front_end/lib/src/fasta/fasta_codes_generated.dart
@@ -22,7 +22,6 @@
const Code<Message Function(String name)>(
"AbstractClassInstantiation", templateAbstractClassInstantiation,
analyzerCode: "NEW_WITH_ABSTRACT_CLASS",
- dart2jsCode: "*fatal*",
severity: Severity.errorLegacyWarning);
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -39,7 +38,6 @@
const MessageCode messageAbstractClassMember = const MessageCode(
"AbstractClassMember",
analyzerCode: "ABSTRACT_CLASS_MEMBER",
- dart2jsCode: "EXTRANEOUS_MODIFIER",
message: r"""Members of classes can't be declared to be 'abstract'.""",
tip:
r"""Try removing the 'abstract' keyword. You can add the 'abstract' keyword before the class declaration.""");
@@ -50,7 +48,6 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const MessageCode messageAbstractNotSync = const MessageCode("AbstractNotSync",
analyzerCode: "NON_SYNC_ABSTRACT_METHOD",
- dart2jsCode: "*ignored*",
message: r"""Abstract methods can't use 'async', 'async*', or 'sync*'.""");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -70,7 +67,6 @@
"AbstractRedirectedClassInstantiation",
templateAbstractRedirectedClassInstantiation,
analyzerCode: "FACTORY_REDIRECTS_TO_ABSTRACT_CLASS",
- dart2jsCode: "*fatal*",
severity: Severity.errorLegacyWarning);
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -113,15 +109,14 @@
codeAmbiguousSupertypes =
const Code<Message Function(String name, DartType _type, DartType _type2)>(
"AmbiguousSupertypes", templateAmbiguousSupertypes,
- analyzerCode: "AMBIGUOUS_SUPERTYPES",
- dart2jsCode: "*fatal*",
- severity: Severity.error);
+ analyzerCode: "AMBIGUOUS_SUPERTYPES");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsAmbiguousSupertypes(
String name, DartType _type, DartType _type2) {
NameSystem nameSystem = new NameSystem();
- StringBuffer buffer = new StringBuffer();
+ StringBuffer buffer;
+ buffer = new StringBuffer();
new Printer(buffer, syntheticNames: nameSystem).writeNode(_type);
String type = '$buffer';
@@ -153,13 +148,14 @@
codeArgumentTypeNotAssignable =
const Code<Message Function(DartType _type, DartType _type2)>(
"ArgumentTypeNotAssignable", templateArgumentTypeNotAssignable,
- analyzerCode: "ARGUMENT_TYPE_NOT_ASSIGNABLE", dart2jsCode: "*ignored*");
+ analyzerCode: "ARGUMENT_TYPE_NOT_ASSIGNABLE");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsArgumentTypeNotAssignable(
DartType _type, DartType _type2) {
NameSystem nameSystem = new NameSystem();
- StringBuffer buffer = new StringBuffer();
+ StringBuffer buffer;
+ buffer = new StringBuffer();
new Printer(buffer, syntheticNames: nameSystem).writeNode(_type);
String type = '$buffer';
@@ -188,7 +184,7 @@
const Code<Message Function(int codePoint)> codeAsciiControlCharacter =
const Code<Message Function(int codePoint)>(
"AsciiControlCharacter", templateAsciiControlCharacter,
- analyzerCode: "ILLEGAL_CHARACTER", dart2jsCode: "BAD_INPUT_CHARACTER");
+ analyzerCode: "ILLEGAL_CHARACTER");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsAsciiControlCharacter(int codePoint) {
@@ -206,7 +202,6 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const MessageCode messageAssertAsExpression = const MessageCode(
"AssertAsExpression",
- dart2jsCode: "*fatal*",
message: r"""`assert` can't be used as an expression.""");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -215,7 +210,6 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const MessageCode messageAssertExtraneousArgument = const MessageCode(
"AssertExtraneousArgument",
- dart2jsCode: "*fatal*",
message: r"""`assert` can't have more than two arguments.""");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -225,7 +219,6 @@
const MessageCode messageAsyncAsIdentifier = const MessageCode(
"AsyncAsIdentifier",
analyzerCode: "ASYNC_KEYWORD_USED_AS_IDENTIFIER",
- dart2jsCode: "GENERIC",
message:
r"""'async' can't be used as an identifier in 'async', 'async*', or 'sync*' methods.""");
@@ -236,7 +229,6 @@
const MessageCode messageAwaitAsIdentifier = const MessageCode(
"AwaitAsIdentifier",
analyzerCode: "ASYNC_KEYWORD_USED_AS_IDENTIFIER",
- dart2jsCode: "*ignored*",
message:
r"""'await' can't be used as an identifier in 'async', 'async*', or 'sync*' methods.""");
@@ -247,7 +239,6 @@
const MessageCode messageAwaitForNotAsync = const MessageCode(
"AwaitForNotAsync",
analyzerCode: "ASYNC_FOR_IN_WRONG_CONTEXT",
- dart2jsCode: "*ignored*",
message:
r"""The asynchronous for-in can only be used in functions marked with 'async' or 'async*'.""",
tip:
@@ -259,7 +250,6 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const MessageCode messageAwaitNotAsync = const MessageCode("AwaitNotAsync",
analyzerCode: "AWAIT_IN_WRONG_CONTEXT",
- dart2jsCode: "*ignored*",
message: r"""'await' can only be used in 'async' or 'async*' methods.""");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -282,9 +272,7 @@
const Code<Message Function(String name, String name2)>(
"BoundIssueViaCycleNonSimplicity",
templateBoundIssueViaCycleNonSimplicity,
- analyzerCode: "NOT_INSTANTIATED_BOUND",
- dart2jsCode: "*fatal*",
- severity: Severity.error);
+ analyzerCode: "NOT_INSTANTIATED_BOUND");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsBoundIssueViaCycleNonSimplicity(
@@ -311,9 +299,7 @@
const Code<Message Function(String name)> codeBoundIssueViaLoopNonSimplicity =
const Code<Message Function(String name)>("BoundIssueViaLoopNonSimplicity",
templateBoundIssueViaLoopNonSimplicity,
- analyzerCode: "NOT_INSTANTIATED_BOUND",
- dart2jsCode: "*fatal*",
- severity: Severity.error);
+ analyzerCode: "NOT_INSTANTIATED_BOUND");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsBoundIssueViaLoopNonSimplicity(String name) {
@@ -339,9 +325,7 @@
const Code<Message Function(String name)>(
"BoundIssueViaRawTypeWithNonSimpleBounds",
templateBoundIssueViaRawTypeWithNonSimpleBounds,
- analyzerCode: "NOT_INSTANTIATED_BOUND",
- dart2jsCode: "*fatal*",
- severity: Severity.error);
+ analyzerCode: "NOT_INSTANTIATED_BOUND");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsBoundIssueViaRawTypeWithNonSimpleBounds(String name) {
@@ -359,7 +343,6 @@
const MessageCode messageBreakOutsideOfLoop = const MessageCode(
"BreakOutsideOfLoop",
analyzerCode: "BREAK_OUTSIDE_OF_LOOP",
- dart2jsCode: "*ignored*",
message:
r"""A break statement can't be used outside of a loop or switch statement.""",
tip: r"""Try removing the break statement.""");
@@ -375,7 +358,7 @@
const Code<Message Function(String name)> codeBreakTargetOutsideFunction =
const Code<Message Function(String name)>(
"BreakTargetOutsideFunction", templateBreakTargetOutsideFunction,
- analyzerCode: "LABEL_IN_OUTER_SCOPE", dart2jsCode: "*fatal*");
+ analyzerCode: "LABEL_IN_OUTER_SCOPE");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsBreakTargetOutsideFunction(String name) {
@@ -396,8 +379,7 @@
const Code<Message Function(Token token)> codeBuiltInIdentifierAsType =
const Code<Message Function(Token token)>(
"BuiltInIdentifierAsType", templateBuiltInIdentifierAsType,
- analyzerCode: "BUILT_IN_IDENTIFIER_AS_TYPE",
- dart2jsCode: "EXTRANEOUS_MODIFIER");
+ analyzerCode: "BUILT_IN_IDENTIFIER_AS_TYPE");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsBuiltInIdentifierAsType(Token token) {
@@ -420,8 +402,7 @@
const Code<Message Function(Token token)> codeBuiltInIdentifierInDeclaration =
const Code<Message Function(Token token)>("BuiltInIdentifierInDeclaration",
templateBuiltInIdentifierInDeclaration,
- analyzerCode: "BUILT_IN_IDENTIFIER_IN_DECLARATION",
- dart2jsCode: "GENERIC");
+ analyzerCode: "BUILT_IN_IDENTIFIER_IN_DECLARATION");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsBuiltInIdentifierInDeclaration(Token token) {
@@ -471,7 +452,6 @@
const MessageCode messageCannotAssignToParenthesizedExpression =
const MessageCode("CannotAssignToParenthesizedExpression",
analyzerCode: "ASSIGNMENT_TO_PARENTHESIZED_EXPRESSION",
- dart2jsCode: "*fatal*",
message: r"""Can't assign to a parenthesized expression.""");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -481,7 +461,6 @@
const MessageCode messageCannotAssignToSuper = const MessageCode(
"CannotAssignToSuper",
analyzerCode: "NOT_AN_LVALUE",
- dart2jsCode: "*fatal*",
message: r"""Can't assign to super.""");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -563,8 +542,7 @@
const Code<Message Function(String string)> codeCantInferTypeDueToCircularity =
const Code<Message Function(String string)>(
"CantInferTypeDueToCircularity", templateCantInferTypeDueToCircularity,
- analyzerCode: "RECURSIVE_COMPILE_TIME_CONSTANT",
- severity: Severity.error);
+ analyzerCode: "RECURSIVE_COMPILE_TIME_CONSTANT");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsCantInferTypeDueToCircularity(String string) {
@@ -590,9 +568,7 @@
const Code<Message Function(String string)>(
"CantInferTypeDueToInconsistentOverrides",
templateCantInferTypeDueToInconsistentOverrides,
- analyzerCode: "INVALID_METHOD_OVERRIDE",
- dart2jsCode: "*fatal*",
- severity: Severity.error);
+ analyzerCode: "INVALID_METHOD_OVERRIDE");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsCantInferTypeDueToInconsistentOverrides(String string) {
@@ -620,9 +596,7 @@
const Code<Message Function(Token token)> codeCantUseDeferredPrefixAsConstant =
const Code<Message Function(Token token)>("CantUseDeferredPrefixAsConstant",
templateCantUseDeferredPrefixAsConstant,
- analyzerCode: "CONST_DEFERRED_CLASS",
- dart2jsCode: "*fatal*",
- severity: Severity.error);
+ analyzerCode: "CONST_DEFERRED_CLASS");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsCantUseDeferredPrefixAsConstant(Token token) {
@@ -643,8 +617,6 @@
const MessageCode messageCantUsePrefixAsExpression = const MessageCode(
"CantUsePrefixAsExpression",
analyzerCode: "PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT",
- dart2jsCode: "*fatal*",
- severity: Severity.error,
message: r"""A prefix can't be used as an expression.""");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -655,8 +627,6 @@
const MessageCode messageCantUsePrefixWithNullAware = const MessageCode(
"CantUsePrefixWithNullAware",
analyzerCode: "PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT",
- dart2jsCode: "*fatal*",
- severity: Severity.error,
message: r"""A prefix can't be used with null-aware operators.""",
tip: r"""It should be safe to remove the '?' as a prefix is never null.""");
@@ -675,15 +645,16 @@
const Code<Message Function(DartType _type)>
codeCantUseSuperBoundedTypeForInstanceCreation =
const Code<Message Function(DartType _type)>(
- "CantUseSuperBoundedTypeForInstanceCreation",
- templateCantUseSuperBoundedTypeForInstanceCreation,
- severity: Severity.error);
+ "CantUseSuperBoundedTypeForInstanceCreation",
+ templateCantUseSuperBoundedTypeForInstanceCreation,
+);
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsCantUseSuperBoundedTypeForInstanceCreation(
DartType _type) {
NameSystem nameSystem = new NameSystem();
- StringBuffer buffer = new StringBuffer();
+ StringBuffer buffer;
+ buffer = new StringBuffer();
new Printer(buffer, syntheticNames: nameSystem).writeNode(_type);
String type = '$buffer';
@@ -700,7 +671,6 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const MessageCode messageCatchSyntax = const MessageCode("CatchSyntax",
analyzerCode: "CATCH_SYNTAX",
- dart2jsCode: "*ignored*",
message:
r"""'catch' must be followed by '(identifier)' or '(identifier, identifier)'.""",
tip:
@@ -712,7 +682,6 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const MessageCode messageClassInClass = const MessageCode("ClassInClass",
analyzerCode: "CLASS_IN_CLASS",
- dart2jsCode: "*fatal*",
message: r"""Classes can't be declared inside other classes.""",
tip: r"""Try moving the class to the top-level.""");
@@ -723,7 +692,6 @@
const MessageCode messageColonInPlaceOfIn = const MessageCode(
"ColonInPlaceOfIn",
analyzerCode: "COLON_IN_PLACE_OF_IN",
- dart2jsCode: "*fatal*",
message: r"""For-in loops use 'in' rather than a colon.""",
tip: r"""Try replacing the colon with the keyword 'in'.""");
@@ -737,9 +705,7 @@
const Code<Message Function(String name)> codeConflictsWithConstructor =
const Code<Message Function(String name)>(
"ConflictsWithConstructor", templateConflictsWithConstructor,
- analyzerCode: "CONFLICTS_WITH_CONSTRUCTOR",
- dart2jsCode: "*fatal*",
- severity: Severity.error);
+ analyzerCode: "CONFLICTS_WITH_CONSTRUCTOR");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsConflictsWithConstructor(String name) {
@@ -757,8 +723,9 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const Code<Message Function(String name)> codeConflictsWithFactory =
const Code<Message Function(String name)>(
- "ConflictsWithFactory", templateConflictsWithFactory,
- severity: Severity.error);
+ "ConflictsWithFactory",
+ templateConflictsWithFactory,
+);
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsConflictsWithFactory(String name) {
@@ -777,9 +744,7 @@
const Code<Message Function(String name)> codeConflictsWithMember =
const Code<Message Function(String name)>(
"ConflictsWithMember", templateConflictsWithMember,
- analyzerCode: "CONFLICTS_WITH_MEMBER",
- dart2jsCode: "*fatal*",
- severity: Severity.error);
+ analyzerCode: "CONFLICTS_WITH_MEMBER");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsConflictsWithMember(String name) {
@@ -800,7 +765,6 @@
const Code<Message Function(String name)>(
"ConflictsWithMemberWarning", templateConflictsWithMemberWarning,
analyzerCode: "CONFLICTS_WITH_MEMBER",
- dart2jsCode: "*fatal*",
severity: Severity.errorLegacyWarning);
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -820,9 +784,7 @@
const Code<Message Function(String name)> codeConflictsWithSetter =
const Code<Message Function(String name)>(
"ConflictsWithSetter", templateConflictsWithSetter,
- analyzerCode: "CONFLICTS_WITH_MEMBER",
- dart2jsCode: "*fatal*",
- severity: Severity.error);
+ analyzerCode: "CONFLICTS_WITH_MEMBER");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsConflictsWithSetter(String name) {
@@ -843,7 +805,6 @@
const Code<Message Function(String name)>(
"ConflictsWithSetterWarning", templateConflictsWithSetterWarning,
analyzerCode: "CONFLICTS_WITH_MEMBER",
- dart2jsCode: "*fatal*",
severity: Severity.errorLegacyWarning);
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -864,9 +825,7 @@
const Code<Message Function(String name)> codeConflictsWithTypeVariable =
const Code<Message Function(String name)>(
"ConflictsWithTypeVariable", templateConflictsWithTypeVariable,
- analyzerCode: "CONFLICTING_TYPE_VARIABLE_AND_MEMBER",
- dart2jsCode: "*fatal*",
- severity: Severity.error);
+ analyzerCode: "CONFLICTING_TYPE_VARIABLE_AND_MEMBER");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsConflictsWithTypeVariable(String name) {
@@ -892,7 +851,6 @@
const MessageCode messageConstAfterFactory = const MessageCode(
"ConstAfterFactory",
analyzerCode: "CONST_AFTER_FACTORY",
- dart2jsCode: "*ignored*",
message:
r"""The modifier 'const' should be before the modifier 'factory'.""",
tip: r"""Try re-ordering the modifiers.""");
@@ -904,7 +862,6 @@
const MessageCode messageConstAndCovariant = const MessageCode(
"ConstAndCovariant",
analyzerCode: "CONST_AND_COVARIANT",
- dart2jsCode: "*ignored*",
message:
r"""Members can't be declared to be both 'const' and 'covariant'.""",
tip: r"""Try removing either the 'const' or 'covariant' keyword.""");
@@ -915,7 +872,6 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const MessageCode messageConstAndFinal = const MessageCode("ConstAndFinal",
analyzerCode: "CONST_AND_FINAL",
- dart2jsCode: "EXTRANEOUS_MODIFIER",
message: r"""Members can't be declared to be both 'const' and 'final'.""",
tip: r"""Try removing either the 'const' or 'final' keyword.""");
@@ -925,7 +881,6 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const MessageCode messageConstAndVar = const MessageCode("ConstAndVar",
analyzerCode: "CONST_AND_VAR",
- dart2jsCode: "EXTRANEOUS_MODIFIER",
message: r"""Members can't be declared to be both 'const' and 'var'.""",
tip: r"""Try removing either the 'const' or 'var' keyword.""");
@@ -935,7 +890,6 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const MessageCode messageConstClass = const MessageCode("ConstClass",
analyzerCode: "CONST_CLASS",
- dart2jsCode: "EXTRANEOUS_MODIFIER",
message: r"""Classes can't be declared to be 'const'.""",
tip:
r"""Try removing the 'const' keyword. If you're trying to indicate that instances of the class can be constants, place the 'const' keyword on the class' constructor(s).""");
@@ -948,8 +902,6 @@
const MessageCode messageConstConstructorInSubclassOfMixinApplication =
const MessageCode("ConstConstructorInSubclassOfMixinApplication",
analyzerCode: "CONST_CONSTRUCTOR_IN_SUBCLASS_OF_MIXIN_APPLICATION",
- dart2jsCode: "*fatal*",
- severity: Severity.error,
message: r"""Can't extend a mixin application and be 'const'.""");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -960,7 +912,6 @@
const MessageCode messageConstConstructorNonFinalField = const MessageCode(
"ConstConstructorNonFinalField",
analyzerCode: "CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD",
- dart2jsCode: "*fatal*",
message: r"""Constructor is marked 'const' so all fields must be final.""");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -980,8 +931,6 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const MessageCode messageConstConstructorRedirectionToNonConst =
const MessageCode("ConstConstructorRedirectionToNonConst",
- dart2jsCode: "*fatal*",
- severity: Severity.error,
message:
r"""A constant constructor can't call a non-constant constructor.""");
@@ -992,7 +941,6 @@
const MessageCode messageConstConstructorWithBody = const MessageCode(
"ConstConstructorWithBody",
analyzerCode: "CONST_CONSTRUCTOR_WITH_BODY",
- dart2jsCode: "*fatal*",
message: r"""A const constructor can't have a body.""",
tip: r"""Try removing either the 'const' keyword or the body.""");
@@ -1004,7 +952,6 @@
const MessageCode messageConstConstructorWithNonConstSuper = const MessageCode(
"ConstConstructorWithNonConstSuper",
analyzerCode: "CONST_CONSTRUCTOR_WITH_NON_CONST_SUPER",
- dart2jsCode: "*fatal*",
message:
r"""Constant constructor can't call non-constant super constructors.""");
@@ -1019,24 +966,30 @@
const Template<
Message Function(
Constant
- constant)> templateConstEvalDuplicateKey = const Template<
- Message Function(Constant constant)>(
+ _constant)> templateConstEvalDuplicateKey = const Template<
+ Message Function(Constant _constant)>(
messageTemplate:
r"""The key '#constant' conflicts with another existing key in the map.""",
withArguments: _withArgumentsConstEvalDuplicateKey);
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
-const Code<Message Function(Constant constant)> codeConstEvalDuplicateKey =
- const Code<Message Function(Constant constant)>(
+const Code<Message Function(Constant _constant)> codeConstEvalDuplicateKey =
+ const Code<Message Function(Constant _constant)>(
"ConstEvalDuplicateKey", templateConstEvalDuplicateKey,
analyzerCode: "EQUAL_KEYS_IN_MAP");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
-Message _withArgumentsConstEvalDuplicateKey(Constant constant) {
+Message _withArgumentsConstEvalDuplicateKey(Constant _constant) {
+ NameSystem nameSystem = new NameSystem();
+ StringBuffer buffer;
+ buffer = new StringBuffer();
+ new Printer(buffer, syntheticNames: nameSystem).writeNode(_constant);
+ String constant = '$buffer';
+
return new Message(codeConstEvalDuplicateKey,
message:
"""The key '${constant}' conflicts with another existing key in the map.""",
- arguments: {'constant': constant});
+ arguments: {'constant': _constant});
}
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -1074,11 +1027,11 @@
const Template<
Message Function(
String string,
- Constant constant,
+ Constant _constant,
DartType _type,
DartType
_type2)> templateConstEvalInvalidBinaryOperandType = const Template<
- Message Function(String string, Constant constant, DartType _type,
+ Message Function(String string, Constant _constant, DartType _type,
DartType _type2)>(
messageTemplate:
r"""Binary operator '#string' on '#constant' requires operand of type '#type', but was of type '#type2'.""",
@@ -1086,20 +1039,24 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const Code<
- Message Function(
- String string, Constant constant, DartType _type, DartType _type2)>
- codeConstEvalInvalidBinaryOperandType = const Code<
- Message Function(
- String string, Constant constant, DartType _type, DartType _type2)>(
+ Message Function(String string, Constant _constant, DartType _type,
+ DartType _type2)> codeConstEvalInvalidBinaryOperandType = const Code<
+ Message Function(
+ String string, Constant _constant, DartType _type, DartType _type2)>(
"ConstEvalInvalidBinaryOperandType",
templateConstEvalInvalidBinaryOperandType,
);
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsConstEvalInvalidBinaryOperandType(
- String string, Constant constant, DartType _type, DartType _type2) {
+ String string, Constant _constant, DartType _type, DartType _type2) {
NameSystem nameSystem = new NameSystem();
- StringBuffer buffer = new StringBuffer();
+ StringBuffer buffer;
+ buffer = new StringBuffer();
+ new Printer(buffer, syntheticNames: nameSystem).writeNode(_constant);
+ String constant = '$buffer';
+
+ buffer = new StringBuffer();
new Printer(buffer, syntheticNames: nameSystem).writeNode(_type);
String type = '$buffer';
@@ -1112,7 +1069,7 @@
"""Binary operator '${string}' on '${constant}' requires operand of type '${type}', but was of type '${type2}'.""",
arguments: {
'string': string,
- 'constant': constant,
+ 'constant': _constant,
'type': _type,
'type2': _type2
});
@@ -1123,27 +1080,33 @@
Message Function(
String string,
Constant
- constant)> templateConstEvalInvalidMethodInvocation = const Template<
- Message Function(String string, Constant constant)>(
+ _constant)> templateConstEvalInvalidMethodInvocation = const Template<
+ Message Function(String string, Constant _constant)>(
messageTemplate:
r"""The method '#string' can't be invoked on '#constant' within a const context.""",
withArguments: _withArgumentsConstEvalInvalidMethodInvocation);
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
-const Code<Message Function(String string, Constant constant)>
+const Code<Message Function(String string, Constant _constant)>
codeConstEvalInvalidMethodInvocation =
- const Code<Message Function(String string, Constant constant)>(
+ const Code<Message Function(String string, Constant _constant)>(
"ConstEvalInvalidMethodInvocation",
templateConstEvalInvalidMethodInvocation,
analyzerCode: "UNDEFINED_OPERATOR");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsConstEvalInvalidMethodInvocation(
- String string, Constant constant) {
+ String string, Constant _constant) {
+ NameSystem nameSystem = new NameSystem();
+ StringBuffer buffer;
+ buffer = new StringBuffer();
+ new Printer(buffer, syntheticNames: nameSystem).writeNode(_constant);
+ String constant = '$buffer';
+
return new Message(codeConstEvalInvalidMethodInvocation,
message:
"""The method '${string}' can't be invoked on '${constant}' within a const context.""",
- arguments: {'string': string, 'constant': constant});
+ arguments: {'string': string, 'constant': _constant});
}
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -1172,56 +1135,68 @@
}
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
-const Template<Message Function(Constant constant)>
+const Template<Message Function(Constant _constant)>
templateConstEvalInvalidStringInterpolationOperand =
- const Template<Message Function(Constant constant)>(
+ const Template<Message Function(Constant _constant)>(
messageTemplate:
r"""The '#constant' can't be used as part of a string interpolation within a const context, only values of type 'null', 'bool', 'int', 'double', or 'String' can be used.""",
withArguments:
_withArgumentsConstEvalInvalidStringInterpolationOperand);
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
-const Code<Message Function(Constant constant)>
+const Code<Message Function(Constant _constant)>
codeConstEvalInvalidStringInterpolationOperand =
- const Code<Message Function(Constant constant)>(
+ const Code<Message Function(Constant _constant)>(
"ConstEvalInvalidStringInterpolationOperand",
templateConstEvalInvalidStringInterpolationOperand,
analyzerCode: "CONST_EVAL_TYPE_BOOL_NUM_STRING");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsConstEvalInvalidStringInterpolationOperand(
- Constant constant) {
+ Constant _constant) {
+ NameSystem nameSystem = new NameSystem();
+ StringBuffer buffer;
+ buffer = new StringBuffer();
+ new Printer(buffer, syntheticNames: nameSystem).writeNode(_constant);
+ String constant = '$buffer';
+
return new Message(codeConstEvalInvalidStringInterpolationOperand,
message:
"""The '${constant}' can't be used as part of a string interpolation within a const context, only values of type 'null', 'bool', 'int', 'double', or 'String' can be used.""",
- arguments: {'constant': constant});
+ arguments: {'constant': _constant});
}
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const Template<
Message Function(
- Constant constant,
+ Constant _constant,
DartType _type,
DartType
_type2)> templateConstEvalInvalidType = const Template<
- Message Function(Constant constant, DartType _type, DartType _type2)>(
+ Message Function(Constant _constant, DartType _type, DartType _type2)>(
messageTemplate:
r"""Expected constant '#constant' to be of type '#type', but was of type '#type2'.""",
withArguments: _withArgumentsConstEvalInvalidType);
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
-const Code<Message Function(Constant constant, DartType _type, DartType _type2)>
+const Code<
+ Message Function(Constant _constant, DartType _type, DartType _type2)>
codeConstEvalInvalidType = const Code<
- Message Function(Constant constant, DartType _type, DartType _type2)>(
+ Message Function(Constant _constant, DartType _type, DartType _type2)>(
"ConstEvalInvalidType",
templateConstEvalInvalidType,
);
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsConstEvalInvalidType(
- Constant constant, DartType _type, DartType _type2) {
+ Constant _constant, DartType _type, DartType _type2) {
NameSystem nameSystem = new NameSystem();
- StringBuffer buffer = new StringBuffer();
+ StringBuffer buffer;
+ buffer = new StringBuffer();
+ new Printer(buffer, syntheticNames: nameSystem).writeNode(_constant);
+ String constant = '$buffer';
+
+ buffer = new StringBuffer();
new Printer(buffer, syntheticNames: nameSystem).writeNode(_type);
String type = '$buffer';
@@ -1232,7 +1207,7 @@
return new Message(codeConstEvalInvalidType,
message:
"""Expected constant '${constant}' to be of type '${type}', but was of type '${type2}'.""",
- arguments: {'constant': constant, 'type': _type, 'type2': _type2});
+ arguments: {'constant': _constant, 'type': _type, 'type2': _type2});
}
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -1251,8 +1226,9 @@
const Code<Message Function(String string, String string2, String string3)>
codeConstEvalNegativeShift =
const Code<Message Function(String string, String string2, String string3)>(
- "ConstEvalNegativeShift", templateConstEvalNegativeShift,
- dart2jsCode: "INVALID_CONSTANT_SHIFT");
+ "ConstEvalNegativeShift",
+ templateConstEvalNegativeShift,
+);
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsConstEvalNegativeShift(
@@ -1329,8 +1305,7 @@
codeConstEvalZeroDivisor =
const Code<Message Function(String string, String string2)>(
"ConstEvalZeroDivisor", templateConstEvalZeroDivisor,
- analyzerCode: "CONST_EVAL_THROWS_IDBZE",
- dart2jsCode: "INVALID_CONSTANT_DIV");
+ analyzerCode: "CONST_EVAL_THROWS_IDBZE");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsConstEvalZeroDivisor(String string, String string2) {
@@ -1346,13 +1321,25 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const MessageCode messageConstFactory = const MessageCode("ConstFactory",
analyzerCode: "CONST_FACTORY",
- dart2jsCode: "*ignored*",
message:
r"""Only redirecting factory constructors can be declared to be 'const'.""",
tip:
r"""Try removing the 'const' keyword, or replacing the body with '=' followed by a valid target.""");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<Null> codeConstFactoryRedirectionToNonConst =
+ messageConstFactoryRedirectionToNonConst;
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const MessageCode messageConstFactoryRedirectionToNonConst = const MessageCode(
+ "ConstFactoryRedirectionToNonConst",
+ analyzerCode: "REDIRECT_TO_NON_CONST_CONSTRUCTOR",
+ message:
+ r"""Constant factory constructor can't delegate to a non-constant constructor.""",
+ tip:
+ r"""Try redirecting to a different constructor or marking the target constructor 'const'.""");
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const Template<
Message Function(
String
@@ -1367,7 +1354,7 @@
const Code<Message Function(String name)> codeConstFieldWithoutInitializer =
const Code<Message Function(String name)>(
"ConstFieldWithoutInitializer", templateConstFieldWithoutInitializer,
- analyzerCode: "CONST_NOT_INITIALIZED", dart2jsCode: "*ignored*");
+ analyzerCode: "CONST_NOT_INITIALIZED");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsConstFieldWithoutInitializer(String name) {
@@ -1379,12 +1366,22 @@
}
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<Null> codeConstInstanceField = messageConstInstanceField;
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const MessageCode messageConstInstanceField = const MessageCode(
+ "ConstInstanceField",
+ analyzerCode: "CONST_INSTANCE_FIELD",
+ message: r"""Only static fields can be declared as const.""",
+ tip:
+ r"""Try using 'final' instead of 'const', or adding the keyword 'static'.""");
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const Code<Null> codeConstMethod = messageConstMethod;
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const MessageCode messageConstMethod = const MessageCode("ConstMethod",
analyzerCode: "CONST_METHOD",
- dart2jsCode: "*fatal*",
message:
r"""Getters, setters and methods can't be declared to be 'const'.""",
tip: r"""Try removing the 'const' keyword.""");
@@ -1396,8 +1393,6 @@
const MessageCode messageConstructorCyclic = const MessageCode(
"ConstructorCyclic",
analyzerCode: "RECURSIVE_CONSTRUCTOR_REDIRECT",
- dart2jsCode: "*fatal*",
- severity: Severity.error,
message: r"""Redirecting constructers can't be cyclic.""",
tip:
r"""Try to have all constructors eventually redirect to a non-redirecting constructor.""");
@@ -1413,7 +1408,6 @@
const Code<Message Function(String name)>(
"ConstructorNotFound", templateConstructorNotFound,
analyzerCode: "CONSTRUCTOR_NOT_FOUND",
- dart2jsCode: "*fatal*",
severity: Severity.errorLegacyWarning);
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -1430,7 +1424,6 @@
const MessageCode messageConstructorNotSync = const MessageCode(
"ConstructorNotSync",
analyzerCode: "NON_SYNC_CONSTRUCTOR",
- dart2jsCode: "*ignored*",
message:
r"""Constructor bodies can't use 'async', 'async*', or 'sync*'.""");
@@ -1442,11 +1435,22 @@
const MessageCode messageConstructorWithReturnType = const MessageCode(
"ConstructorWithReturnType",
analyzerCode: "CONSTRUCTOR_WITH_RETURN_TYPE",
- dart2jsCode: "*fatal*",
message: r"""Constructors can't have a return type.""",
tip: r"""Try removing the return type.""");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<Null> codeConstructorWithTypeArguments =
+ messageConstructorWithTypeArguments;
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const MessageCode messageConstructorWithTypeArguments = const MessageCode(
+ "ConstructorWithTypeArguments",
+ analyzerCode: "UNDEFINED_CLASS",
+ message:
+ r"""A constructor invocation can't have type arguments on the constructor name.""",
+ tip: r"""Try to place the type arguments on the class name.""");
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const Code<Null> codeConstructorWithTypeParameters =
messageConstructorWithTypeParameters;
@@ -1454,8 +1458,6 @@
const MessageCode messageConstructorWithTypeParameters = const MessageCode(
"ConstructorWithTypeParameters",
analyzerCode: "TYPE_PARAMETER_ON_CONSTRUCTOR",
- dart2jsCode: "*fatal*",
- severity: Severity.error,
message: r"""Constructors can't have type parameters.""");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -1465,8 +1467,6 @@
const MessageCode messageConstructorWithWrongName = const MessageCode(
"ConstructorWithWrongName",
analyzerCode: "INVALID_CONSTRUCTOR_NAME",
- dart2jsCode: "*fatal*",
- severity: Severity.error,
message:
r"""The name of a constructor must match the name of the enclosing class.""");
@@ -1497,7 +1497,6 @@
const MessageCode messageContinueLabelNotTarget = const MessageCode(
"ContinueLabelNotTarget",
analyzerCode: "LABEL_UNDEFINED",
- dart2jsCode: "*fatal*",
message: r"""Target of continue must be a label.""");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -1507,7 +1506,6 @@
const MessageCode messageContinueOutsideOfLoop = const MessageCode(
"ContinueOutsideOfLoop",
analyzerCode: "CONTINUE_OUTSIDE_OF_LOOP",
- dart2jsCode: "*ignored*",
message:
r"""A continue statement can't be used outside of a loop or switch statement.""",
tip: r"""Try removing the continue statement.""");
@@ -1524,7 +1522,7 @@
const Code<Message Function(String name)> codeContinueTargetOutsideFunction =
const Code<Message Function(String name)>(
"ContinueTargetOutsideFunction", templateContinueTargetOutsideFunction,
- analyzerCode: "LABEL_IN_OUTER_SCOPE", dart2jsCode: "*fatal*");
+ analyzerCode: "LABEL_IN_OUTER_SCOPE");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsContinueTargetOutsideFunction(String name) {
@@ -1541,7 +1539,6 @@
const MessageCode messageContinueWithoutLabelInCase = const MessageCode(
"ContinueWithoutLabelInCase",
analyzerCode: "CONTINUE_WITHOUT_LABEL_IN_CASE",
- dart2jsCode: "*ignored*",
message:
r"""A continue statement in a switch statement must have a label as a target.""",
tip:
@@ -1576,7 +1573,6 @@
const MessageCode messageCovariantAfterFinal = const MessageCode(
"CovariantAfterFinal",
analyzerCode: "COVARIANT_AFTER_FINAL",
- dart2jsCode: "EXTRANEOUS_MODIFIER",
message:
r"""The modifier 'covariant' should be before the modifier 'final'.""",
tip: r"""Try re-ordering the modifiers.""");
@@ -1588,7 +1584,6 @@
const MessageCode messageCovariantAfterVar = const MessageCode(
"CovariantAfterVar",
analyzerCode: "COVARIANT_AFTER_VAR",
- dart2jsCode: "EXTRANEOUS_MODIFIER",
message:
r"""The modifier 'covariant' should be before the modifier 'var'.""",
tip: r"""Try re-ordering the modifiers.""");
@@ -1600,7 +1595,6 @@
const MessageCode messageCovariantAndStatic = const MessageCode(
"CovariantAndStatic",
analyzerCode: "COVARIANT_AND_STATIC",
- dart2jsCode: "EXTRANEOUS_MODIFIER",
message:
r"""Members can't be declared to be both 'covariant' and 'static'.""",
tip: r"""Try removing either the 'covariant' or 'static' keyword.""");
@@ -1611,12 +1605,39 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const MessageCode messageCovariantMember = const MessageCode("CovariantMember",
analyzerCode: "COVARIANT_MEMBER",
- dart2jsCode: "EXTRANEOUS_MODIFIER",
message:
r"""Getters, setters and methods can't be declared to be 'covariant'.""",
tip: r"""Try removing the 'covariant' keyword.""");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Template<
+ Message Function(
+ String name,
+ String
+ string)> templateCycleInTypeVariables = const Template<
+ Message Function(String name, String string)>(
+ messageTemplate: r"""Type '#name' is a bound of itself via '#string'.""",
+ tipTemplate:
+ r"""Try breaking the cycle by removing at least on of the 'extends' clauses in the cycle.""",
+ withArguments: _withArgumentsCycleInTypeVariables);
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<Message Function(String name, String string)>
+ codeCycleInTypeVariables =
+ const Code<Message Function(String name, String string)>(
+ "CycleInTypeVariables", templateCycleInTypeVariables,
+ analyzerCode: "TYPE_PARAMETER_SUPERTYPE_OF_ITS_BOUND");
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+Message _withArgumentsCycleInTypeVariables(String name, String string) {
+ return new Message(codeCycleInTypeVariables,
+ message: """Type '${name}' is a bound of itself via '${string}'.""",
+ tip:
+ """Try breaking the cycle by removing at least on of the 'extends' clauses in the cycle.""",
+ arguments: {'name': name, 'string': string});
+}
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const Template<Message Function(String name, String string)>
templateCyclicClassHierarchy =
const Template<Message Function(String name, String string)>(
@@ -1628,9 +1649,7 @@
codeCyclicClassHierarchy =
const Code<Message Function(String name, String string)>(
"CyclicClassHierarchy", templateCyclicClassHierarchy,
- analyzerCode: "RECURSIVE_INTERFACE_INHERITANCE",
- dart2jsCode: "*fatal*",
- severity: Severity.error);
+ analyzerCode: "RECURSIVE_INTERFACE_INHERITANCE");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsCyclicClassHierarchy(String name, String string) {
@@ -1652,9 +1671,7 @@
const Code<Message Function(String name)>(
"CyclicRedirectingFactoryConstructors",
templateCyclicRedirectingFactoryConstructors,
- analyzerCode: "RECURSIVE_FACTORY_REDIRECT",
- dart2jsCode: "*fatal*",
- severity: Severity.error);
+ analyzerCode: "RECURSIVE_FACTORY_REDIRECT");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsCyclicRedirectingFactoryConstructors(String name) {
@@ -1673,8 +1690,7 @@
const Code<Message Function(String name)> codeCyclicTypedef =
const Code<Message Function(String name)>(
"CyclicTypedef", templateCyclicTypedef,
- analyzerCode: "TYPE_ALIAS_CANNOT_REFERENCE_ITSELF",
- dart2jsCode: "*fatal*");
+ analyzerCode: "TYPE_ALIAS_CANNOT_REFERENCE_ITSELF");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsCyclicTypedef(String name) {
@@ -1691,7 +1707,6 @@
const MessageCode messageDeclaredMemberConflictsWithInheritedMember =
const MessageCode("DeclaredMemberConflictsWithInheritedMember",
analyzerCode: "DECLARED_MEMBER_CONFLICTS_WITH_INHERITED",
- dart2jsCode: "*fatal*",
severity: Severity.errorLegacyWarning,
message:
r"""Can't declare a member that conflicts with an inherited one.""");
@@ -1707,13 +1722,39 @@
message: r"""This is the inherited member.""");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Template<Message Function(String name)>
+ templateDefaultValueInRedirectingFactoryConstructor =
+ const Template<Message Function(String name)>(
+ messageTemplate:
+ r"""Can't have a default value here because any default values of '#name' would be used instead.""",
+ tipTemplate: r"""Try removing the default value.""",
+ withArguments:
+ _withArgumentsDefaultValueInRedirectingFactoryConstructor);
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<Message Function(String name)>
+ codeDefaultValueInRedirectingFactoryConstructor =
+ const Code<Message Function(String name)>(
+ "DefaultValueInRedirectingFactoryConstructor",
+ templateDefaultValueInRedirectingFactoryConstructor,
+ analyzerCode: "DEFAULT_VALUE_IN_REDIRECTING_FACTORY_CONSTRUCTOR");
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+Message _withArgumentsDefaultValueInRedirectingFactoryConstructor(String name) {
+ return new Message(codeDefaultValueInRedirectingFactoryConstructor,
+ message:
+ """Can't have a default value here because any default values of '${name}' would be used instead.""",
+ tip: """Try removing the default value.""",
+ arguments: {'name': name});
+}
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const Code<Null> codeDeferredAfterPrefix = messageDeferredAfterPrefix;
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const MessageCode messageDeferredAfterPrefix = const MessageCode(
"DeferredAfterPrefix",
analyzerCode: "DEFERRED_AFTER_PREFIX",
- dart2jsCode: "*fatal*",
message:
r"""The deferred keyword should come immediately before the prefix ('as' clause).""",
tip: r"""Try moving the deferred keyword before the prefix.""");
@@ -1732,7 +1773,7 @@
const Code<Message Function(String name)> codeDeferredPrefixDuplicated =
const Code<Message Function(String name)>(
"DeferredPrefixDuplicated", templateDeferredPrefixDuplicated,
- analyzerCode: "SHARED_DEFERRED_PREFIX", dart2jsCode: "*fatal*");
+ analyzerCode: "SHARED_DEFERRED_PREFIX");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsDeferredPrefixDuplicated(String name) {
@@ -1780,13 +1821,13 @@
const Code<Message Function(DartType _type, String name)>(
"DeferredTypeAnnotation", templateDeferredTypeAnnotation,
analyzerCode: "TYPE_ANNOTATION_DEFERRED_CLASS",
- dart2jsCode: "*fatal*",
severity: Severity.errorLegacyWarning);
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsDeferredTypeAnnotation(DartType _type, String name) {
NameSystem nameSystem = new NameSystem();
- StringBuffer buffer = new StringBuffer();
+ StringBuffer buffer;
+ buffer = new StringBuffer();
new Printer(buffer, syntheticNames: nameSystem).writeNode(_type);
String type = '$buffer';
@@ -1847,7 +1888,6 @@
const MessageCode messageDirectiveAfterDeclaration = const MessageCode(
"DirectiveAfterDeclaration",
analyzerCode: "DIRECTIVE_AFTER_DECLARATION",
- dart2jsCode: "*ignored*",
message: r"""Directives must appear before any declarations.""",
tip: r"""Try moving the directive before any declarations.""");
@@ -1858,7 +1898,6 @@
const MessageCode messageDuplicateDeferred = const MessageCode(
"DuplicateDeferred",
analyzerCode: "DUPLICATE_DEFERRED",
- dart2jsCode: "*fatal*",
message: r"""An import directive can only have one 'deferred' keyword.""",
tip: r"""Try removing all but one 'deferred' keyword.""");
@@ -1875,8 +1914,7 @@
const Code<Message Function(String name)> codeDuplicateLabelInSwitchStatement =
const Code<Message Function(String name)>("DuplicateLabelInSwitchStatement",
templateDuplicateLabelInSwitchStatement,
- analyzerCode: "DUPLICATE_LABEL_IN_SWITCH_STATEMENT",
- dart2jsCode: "*fatal*");
+ analyzerCode: "DUPLICATE_LABEL_IN_SWITCH_STATEMENT");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsDuplicateLabelInSwitchStatement(String name) {
@@ -1893,7 +1931,6 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const MessageCode messageDuplicatePrefix = const MessageCode("DuplicatePrefix",
analyzerCode: "DUPLICATE_PREFIX",
- dart2jsCode: "*fatal*",
message: r"""An import directive can only have one prefix ('as' clause).""",
tip: r"""Try removing all but one prefix.""");
@@ -1930,9 +1967,7 @@
codeDuplicatedExport =
const Code<Message Function(String name, Uri uri_, Uri uri2_)>(
"DuplicatedExport", templateDuplicatedExport,
- analyzerCode: "AMBIGUOUS_EXPORT",
- dart2jsCode: "*ignored*",
- severity: Severity.ignored);
+ analyzerCode: "AMBIGUOUS_EXPORT", severity: Severity.ignored);
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsDuplicatedExport(String name, Uri uri_, Uri uri2_) {
@@ -2005,7 +2040,6 @@
const Code<Message Function(String name, Uri uri_, Uri uri2_)>(
"DuplicatedImportInType", templateDuplicatedImportInType,
analyzerCode: "AMBIGUOUS_IMPORT",
- dart2jsCode: "*fatal*",
severity: Severity.errorLegacyWarning);
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -2028,8 +2062,7 @@
const Code<Message Function(Token token)> codeDuplicatedModifier =
const Code<Message Function(Token token)>(
"DuplicatedModifier", templateDuplicatedModifier,
- analyzerCode: "DUPLICATED_MODIFIER",
- dart2jsCode: "EXTRANEOUS_MODIFIER");
+ analyzerCode: "DUPLICATED_MODIFIER");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsDuplicatedModifier(Token token) {
@@ -2050,9 +2083,7 @@
const Code<Message Function(String name)> codeDuplicatedName =
const Code<Message Function(String name)>(
"DuplicatedName", templateDuplicatedName,
- analyzerCode: "DUPLICATE_DEFINITION",
- dart2jsCode: "*fatal*",
- severity: Severity.error);
+ analyzerCode: "DUPLICATE_DEFINITION");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsDuplicatedName(String name) {
@@ -2094,9 +2125,7 @@
const Code<Message Function(String name)> codeDuplicatedNamePreviouslyUsed =
const Code<Message Function(String name)>(
"DuplicatedNamePreviouslyUsed", templateDuplicatedNamePreviouslyUsed,
- analyzerCode: "REFERENCED_BEFORE_DECLARATION",
- dart2jsCode: "*ignored*",
- severity: Severity.error);
+ analyzerCode: "REFERENCED_BEFORE_DECLARATION");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsDuplicatedNamePreviouslyUsed(String name) {
@@ -2137,9 +2166,7 @@
const Code<Message Function(String name)> codeDuplicatedNamedArgument =
const Code<Message Function(String name)>(
"DuplicatedNamedArgument", templateDuplicatedNamedArgument,
- analyzerCode: "DUPLICATE_NAMED_ARGUMENT",
- dart2jsCode: "*fatal*",
- severity: Severity.error);
+ analyzerCode: "DUPLICATE_NAMED_ARGUMENT");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsDuplicatedNamedArgument(String name) {
@@ -2158,9 +2185,7 @@
const Code<Message Function(String name)> codeDuplicatedParameterName =
const Code<Message Function(String name)>(
"DuplicatedParameterName", templateDuplicatedParameterName,
- analyzerCode: "DUPLICATE_DEFINITION",
- dart2jsCode: "*fatal*",
- severity: Severity.error);
+ analyzerCode: "DUPLICATE_DEFINITION");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsDuplicatedParameterName(String name) {
@@ -2196,7 +2221,6 @@
const MessageCode messageEmptyNamedParameterList = const MessageCode(
"EmptyNamedParameterList",
analyzerCode: "MISSING_IDENTIFIER",
- dart2jsCode: "EMPTY_NAMED_PARAMETER_LIST",
message: r"""Named parameter lists cannot be empty.""",
tip: r"""Try adding a named parameter to the list.""");
@@ -2208,7 +2232,6 @@
const MessageCode messageEmptyOptionalParameterList = const MessageCode(
"EmptyOptionalParameterList",
analyzerCode: "MISSING_IDENTIFIER",
- dart2jsCode: "EMPTY_OPTIONAL_PARAMETER_LIST",
message: r"""Optional parameter lists cannot be empty.""",
tip: r"""Try adding an optional parameter to the list.""");
@@ -2217,7 +2240,7 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const MessageCode messageEncoding = const MessageCode("Encoding",
- dart2jsCode: "*fatal*", message: r"""Unable to decode bytes as UTF-8.""");
+ message: r"""Unable to decode bytes as UTF-8.""");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const Template<
@@ -2233,7 +2256,7 @@
const Code<Message Function(String name)> codeEnumConstantSameNameAsEnclosing =
const Code<Message Function(String name)>("EnumConstantSameNameAsEnclosing",
templateEnumConstantSameNameAsEnclosing,
- analyzerCode: "ENUM_CONSTANT_WITH_ENUM_NAME", dart2jsCode: "*fatal*");
+ analyzerCode: "ENUM_CONSTANT_WITH_ENUM_NAME");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsEnumConstantSameNameAsEnclosing(String name) {
@@ -2250,7 +2273,6 @@
const MessageCode messageEnumDeclarationEmpty = const MessageCode(
"EnumDeclarationEmpty",
analyzerCode: "EMPTY_ENUM_BODY",
- dart2jsCode: "*ignored*",
message: r"""An enum declaration can't be empty.""");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -2259,7 +2281,6 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const MessageCode messageEnumInClass = const MessageCode("EnumInClass",
analyzerCode: "ENUM_IN_CLASS",
- dart2jsCode: "*fatal*",
message: r"""Enums can't be declared inside classes.""",
tip: r"""Try moving the enum to the top-level.""");
@@ -2270,8 +2291,6 @@
const MessageCode messageEnumInstantiation = const MessageCode(
"EnumInstantiation",
analyzerCode: "INSTANTIATE_ENUM",
- dart2jsCode: "*fatal*",
- severity: Severity.error,
message: r"""Enums can't be instantiated.""");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -2282,7 +2301,6 @@
const MessageCode messageEqualityCannotBeEqualityOperand = const MessageCode(
"EqualityCannotBeEqualityOperand",
analyzerCode: "EQUALITY_CANNOT_BE_EQUALITY_OPERAND",
- dart2jsCode: "*fatal*",
message:
r"""An equality expression can't be an operand of another equality expression.""",
tip: r"""Try re-writing the expression.""");
@@ -2297,8 +2315,7 @@
const Code<Message Function(String string)> codeExpectedAfterButGot =
const Code<Message Function(String string)>(
"ExpectedAfterButGot", templateExpectedAfterButGot,
- analyzerCode: "EXPECTED_TOKEN",
- dart2jsCode: "MISSING_TOKEN_AFTER_THIS");
+ analyzerCode: "EXPECTED_TOKEN");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsExpectedAfterButGot(String string) {
@@ -2314,7 +2331,6 @@
const MessageCode messageExpectedAnInitializer = const MessageCode(
"ExpectedAnInitializer",
analyzerCode: "MISSING_INITIALIZER",
- dart2jsCode: "*fatal*",
message: r"""Expected an initializer.""");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -2323,7 +2339,6 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const MessageCode messageExpectedBlock = const MessageCode("ExpectedBlock",
analyzerCode: "EXPECTED_TOKEN",
- dart2jsCode: "*fatal*",
message: r"""Expected a block.""",
tip: r"""Try adding {}.""");
@@ -2334,7 +2349,6 @@
const MessageCode messageExpectedBlockToSkip = const MessageCode(
"ExpectedBlockToSkip",
analyzerCode: "MISSING_FUNCTION_BODY",
- dart2jsCode: "NATIVE_OR_BODY_EXPECTED",
message: r"""Expected a function body or '=>'.""",
tip: r"""Try adding {}.""");
@@ -2344,7 +2358,6 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const MessageCode messageExpectedBody = const MessageCode("ExpectedBody",
analyzerCode: "MISSING_FUNCTION_BODY",
- dart2jsCode: "BODY_EXPECTED",
message: r"""Expected a function body or '=>'.""",
tip: r"""Try adding {}.""");
@@ -2358,8 +2371,7 @@
const Code<Message Function(String string)> codeExpectedButGot =
const Code<Message Function(String string)>(
"ExpectedButGot", templateExpectedButGot,
- analyzerCode: "EXPECTED_TOKEN",
- dart2jsCode: "MISSING_TOKEN_BEFORE_THIS");
+ analyzerCode: "EXPECTED_TOKEN");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsExpectedButGot(String string) {
@@ -2379,7 +2391,7 @@
const Code<Message Function(Token token)> codeExpectedClassBodyToSkip =
const Code<Message Function(Token token)>(
"ExpectedClassBodyToSkip", templateExpectedClassBodyToSkip,
- analyzerCode: "MISSING_CLASS_BODY", dart2jsCode: "*fatal*");
+ analyzerCode: "MISSING_CLASS_BODY");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsExpectedClassBodyToSkip(Token token) {
@@ -2399,7 +2411,7 @@
const Code<Message Function(Token token)> codeExpectedClassMember =
const Code<Message Function(Token token)>(
"ExpectedClassMember", templateExpectedClassMember,
- analyzerCode: "EXPECTED_CLASS_MEMBER", dart2jsCode: "*fatal*");
+ analyzerCode: "EXPECTED_CLASS_MEMBER");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsExpectedClassMember(Token token) {
@@ -2420,7 +2432,7 @@
const Code<Message Function(Token token)> codeExpectedClassOrMixinBody =
const Code<Message Function(Token token)>(
"ExpectedClassOrMixinBody", templateExpectedClassOrMixinBody,
- analyzerCode: "MISSING_CLASS_BODY", dart2jsCode: "*fatal*");
+ analyzerCode: "MISSING_CLASS_BODY");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsExpectedClassOrMixinBody(Token token) {
@@ -2440,7 +2452,7 @@
const Code<Message Function(Token token)> codeExpectedDeclaration =
const Code<Message Function(Token token)>(
"ExpectedDeclaration", templateExpectedDeclaration,
- analyzerCode: "EXPECTED_EXECUTABLE", dart2jsCode: "*fatal*");
+ analyzerCode: "EXPECTED_EXECUTABLE");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsExpectedDeclaration(Token token) {
@@ -2463,7 +2475,7 @@
const Code<Message Function(Token token)> codeExpectedEnumBody =
const Code<Message Function(Token token)>(
"ExpectedEnumBody", templateExpectedEnumBody,
- analyzerCode: "MISSING_ENUM_BODY", dart2jsCode: "*fatal*");
+ analyzerCode: "MISSING_ENUM_BODY");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsExpectedEnumBody(Token token) {
@@ -2485,7 +2497,7 @@
const Code<Message Function(Token token)> codeExpectedFunctionBody =
const Code<Message Function(Token token)>(
"ExpectedFunctionBody", templateExpectedFunctionBody,
- analyzerCode: "MISSING_FUNCTION_BODY", dart2jsCode: "NATIVE_OR_FATAL");
+ analyzerCode: "MISSING_FUNCTION_BODY");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsExpectedFunctionBody(Token token) {
@@ -2502,7 +2514,6 @@
const MessageCode messageExpectedHexDigit = const MessageCode(
"ExpectedHexDigit",
analyzerCode: "MISSING_HEX_DIGIT",
- dart2jsCode: "HEX_DIGIT_EXPECTED",
message: r"""A hex digit (0-9 or A-F) must follow '0x'.""");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -2515,9 +2526,7 @@
const Code<Message Function(Token token)> codeExpectedIdentifier =
const Code<Message Function(Token token)>(
"ExpectedIdentifier", templateExpectedIdentifier,
- analyzerCode: "MISSING_IDENTIFIER",
- dart2jsCode: "*fatal*",
- severity: Severity.error);
+ analyzerCode: "MISSING_IDENTIFIER");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsExpectedIdentifier(Token token) {
@@ -2534,7 +2543,6 @@
const MessageCode messageExpectedNamedArgument = const MessageCode(
"ExpectedNamedArgument",
analyzerCode: "EXTRA_POSITIONAL_ARGUMENTS",
- dart2jsCode: "*fatal*",
message: r"""Expected named argument.""");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -2543,17 +2551,14 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const MessageCode messageExpectedOneExpression = const MessageCode(
"ExpectedOneExpression",
- severity: Severity.error,
message: r"""Expected one expression, but found additional input.""");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const Code<Null> codeExpectedOpenParens = messageExpectedOpenParens;
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
-const MessageCode messageExpectedOpenParens = const MessageCode(
- "ExpectedOpenParens",
- dart2jsCode: "GENERIC",
- message: r"""Expected '('.""");
+const MessageCode messageExpectedOpenParens =
+ const MessageCode("ExpectedOpenParens", message: r"""Expected '('.""");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const Code<Null> codeExpectedStatement = messageExpectedStatement;
@@ -2562,7 +2567,6 @@
const MessageCode messageExpectedStatement = const MessageCode(
"ExpectedStatement",
analyzerCode: "MISSING_STATEMENT",
- dart2jsCode: "*fatal*",
message: r"""Expected a statement.""");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -2575,7 +2579,7 @@
const Code<Message Function(Token token)> codeExpectedString =
const Code<Message Function(Token token)>(
"ExpectedString", templateExpectedString,
- analyzerCode: "EXPECTED_STRING_LITERAL", dart2jsCode: "*fatal*");
+ analyzerCode: "EXPECTED_STRING_LITERAL");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsExpectedString(Token token) {
@@ -2595,7 +2599,7 @@
const Code<Message Function(String string)> codeExpectedToken =
const Code<Message Function(String string)>(
"ExpectedToken", templateExpectedToken,
- analyzerCode: "EXPECTED_TOKEN", dart2jsCode: "*fatal*");
+ analyzerCode: "EXPECTED_TOKEN");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsExpectedToken(String string) {
@@ -2614,9 +2618,7 @@
const Code<Message Function(Token token)> codeExpectedType =
const Code<Message Function(Token token)>(
"ExpectedType", templateExpectedType,
- analyzerCode: "EXPECTED_TYPE_NAME",
- dart2jsCode: "*fatal*",
- severity: Severity.error);
+ analyzerCode: "EXPECTED_TYPE_NAME");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsExpectedType(Token token) {
@@ -2639,7 +2641,6 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const MessageCode messageExportAfterPart = const MessageCode("ExportAfterPart",
analyzerCode: "EXPORT_DIRECTIVE_AFTER_PART_DIRECTIVE",
- dart2jsCode: "*ignored*",
message: r"""Export directives must preceed part directives.""",
tip: r"""Try moving the export directives before the part directives.""");
@@ -2688,9 +2689,7 @@
const Code<Message Function(String name)> codeExtendingEnum =
const Code<Message Function(String name)>(
"ExtendingEnum", templateExtendingEnum,
- analyzerCode: "EXTENDS_ENUM",
- dart2jsCode: "*fatal*",
- severity: Severity.error);
+ analyzerCode: "EXTENDS_ENUM");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsExtendingEnum(String name) {
@@ -2710,7 +2709,7 @@
const Code<Message Function(String name)> codeExtendingRestricted =
const Code<Message Function(String name)>(
"ExtendingRestricted", templateExtendingRestricted,
- analyzerCode: "EXTENDS_DISALLOWED_CLASS", dart2jsCode: "*ignored*");
+ analyzerCode: "EXTENDS_DISALLOWED_CLASS");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsExtendingRestricted(String name) {
@@ -2727,7 +2726,6 @@
const MessageCode messageExternalAfterConst = const MessageCode(
"ExternalAfterConst",
analyzerCode: "EXTERNAL_AFTER_CONST",
- dart2jsCode: "EXTRANEOUS_MODIFIER",
message:
r"""The modifier 'external' should be before the modifier 'const'.""",
tip: r"""Try re-ordering the modifiers.""");
@@ -2739,7 +2737,6 @@
const MessageCode messageExternalAfterFactory = const MessageCode(
"ExternalAfterFactory",
analyzerCode: "EXTERNAL_AFTER_FACTORY",
- dart2jsCode: "*ignored*",
message:
r"""The modifier 'external' should be before the modifier 'factory'.""",
tip: r"""Try re-ordering the modifiers.""");
@@ -2751,7 +2748,6 @@
const MessageCode messageExternalAfterStatic = const MessageCode(
"ExternalAfterStatic",
analyzerCode: "EXTERNAL_AFTER_STATIC",
- dart2jsCode: "EXTRANEOUS_MODIFIER",
message:
r"""The modifier 'external' should be before the modifier 'static'.""",
tip: r"""Try re-ordering the modifiers.""");
@@ -2762,7 +2758,6 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const MessageCode messageExternalClass = const MessageCode("ExternalClass",
analyzerCode: "EXTERNAL_CLASS",
- dart2jsCode: "*ignored*",
message: r"""Classes can't be declared to be 'external'.""",
tip: r"""Try removing the keyword 'external'.""");
@@ -2774,7 +2769,6 @@
const MessageCode messageExternalConstructorWithBody = const MessageCode(
"ExternalConstructorWithBody",
analyzerCode: "EXTERNAL_CONSTRUCTOR_WITH_BODY",
- dart2jsCode: "*ignored*",
message: r"""External constructors can't have a body.""",
tip:
r"""Try removing the body of the constructor, or removing the keyword 'external'.""");
@@ -2787,7 +2781,6 @@
const MessageCode messageExternalConstructorWithFieldInitializers =
const MessageCode("ExternalConstructorWithFieldInitializers",
analyzerCode: "EXTERNAL_CONSTRUCTOR_WITH_FIELD_INITIALIZERS",
- dart2jsCode: "*fatal*",
message: r"""An external constructor can't initialize fields.""",
tip:
r"""Try removing the field initializers, or removing the keyword 'external'.""");
@@ -2798,7 +2791,6 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const MessageCode messageExternalEnum = const MessageCode("ExternalEnum",
analyzerCode: "EXTERNAL_ENUM",
- dart2jsCode: "*ignored*",
message: r"""Enums can't be declared to be 'external'.""",
tip: r"""Try removing the keyword 'external'.""");
@@ -2810,7 +2802,6 @@
const MessageCode messageExternalFactoryRedirection = const MessageCode(
"ExternalFactoryRedirection",
analyzerCode: "EXTERNAL_CONSTRUCTOR_WITH_BODY",
- dart2jsCode: "*ignored*",
message: r"""A redirecting factory can't be external.""",
tip: r"""Try removing the 'external' modifier.""");
@@ -2821,7 +2812,6 @@
const MessageCode messageExternalFactoryWithBody = const MessageCode(
"ExternalFactoryWithBody",
analyzerCode: "EXTERNAL_CONSTRUCTOR_WITH_BODY",
- dart2jsCode: "*ignored*",
message: r"""External factories can't have a body.""",
tip:
r"""Try removing the body of the factory, or removing the keyword 'external'.""");
@@ -2832,7 +2822,6 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const MessageCode messageExternalField = const MessageCode("ExternalField",
analyzerCode: "EXTERNAL_FIELD",
- dart2jsCode: "EXTRANEOUS_MODIFIER",
message: r"""Fields can't be declared to be 'external'.""",
tip: r"""Try removing the keyword 'external'.""");
@@ -2843,7 +2832,6 @@
const MessageCode messageExternalMethodWithBody = const MessageCode(
"ExternalMethodWithBody",
analyzerCode: "EXTERNAL_METHOD_WITH_BODY",
- dart2jsCode: "*ignored*",
message: r"""An external or native method can't have a body.""");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -2852,7 +2840,6 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const MessageCode messageExternalTypedef = const MessageCode("ExternalTypedef",
analyzerCode: "EXTERNAL_TYPEDEF",
- dart2jsCode: "*ignored*",
message: r"""Typedefs can't be declared to be 'external'.""",
tip: r"""Try removing the keyword 'external'.""");
@@ -2867,8 +2854,7 @@
const Code<Message Function(Token token)> codeExtraneousModifier =
const Code<Message Function(Token token)>(
"ExtraneousModifier", templateExtraneousModifier,
- analyzerCode: "EXTRANEOUS_MODIFIER",
- dart2jsCode: "EXTRANEOUS_MODIFIER");
+ analyzerCode: "EXTRANEOUS_MODIFIER");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsExtraneousModifier(Token token) {
@@ -2885,7 +2871,6 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const MessageCode messageFactoryNotSync = const MessageCode("FactoryNotSync",
analyzerCode: "NON_SYNC_FACTORY",
- dart2jsCode: "*ignored*",
message: r"""Factory bodies can't use 'async', 'async*', or 'sync*'.""");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -2896,7 +2881,6 @@
const MessageCode messageFactoryTopLevelDeclaration = const MessageCode(
"FactoryTopLevelDeclaration",
analyzerCode: "FACTORY_TOP_LEVEL_DECLARATION",
- dart2jsCode: "*fatal*",
message: r"""Top-level declarations can't be declared to be 'factory'.""",
tip: r"""Try removing the keyword 'factory'.""");
@@ -2997,7 +2981,6 @@
const MessageCode messageFieldInitializerOutsideConstructor = const MessageCode(
"FieldInitializerOutsideConstructor",
analyzerCode: "FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR",
- dart2jsCode: "*fatal*",
message: r"""Field formal parameters can only be used in a constructor.""",
tip: r"""Try removing 'this.'.""");
@@ -3008,7 +2991,6 @@
const MessageCode messageFinalAndCovariant = const MessageCode(
"FinalAndCovariant",
analyzerCode: "FINAL_AND_COVARIANT",
- dart2jsCode: "*ignored*",
message:
r"""Members can't be declared to be both 'final' and 'covariant'.""",
tip: r"""Try removing either the 'final' or 'covariant' keyword.""");
@@ -3019,7 +3001,6 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const MessageCode messageFinalAndVar = const MessageCode("FinalAndVar",
analyzerCode: "FINAL_AND_VAR",
- dart2jsCode: "EXTRANEOUS_MODIFIER",
message: r"""Members can't be declared to be both 'final' and 'var'.""",
tip: r"""Try removing the keyword 'var'.""");
@@ -3038,9 +3019,7 @@
const Code<Message Function(String name)> codeFinalFieldNotInitialized =
const Code<Message Function(String name)>(
"FinalFieldNotInitialized", templateFinalFieldNotInitialized,
- analyzerCode: "FINAL_NOT_INITIALIZED",
- dart2jsCode: "*fatal*",
- severity: Severity.error);
+ analyzerCode: "FINAL_NOT_INITIALIZED");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsFinalFieldNotInitialized(String name) {
@@ -3069,9 +3048,7 @@
const Code<Message Function(String name)>(
"FinalFieldNotInitializedByConstructor",
templateFinalFieldNotInitializedByConstructor,
- analyzerCode: "FINAL_NOT_INITIALIZED_CONSTRUCTOR_1",
- dart2jsCode: "*fatal*",
- severity: Severity.error);
+ analyzerCode: "FINAL_NOT_INITIALIZED_CONSTRUCTOR_1");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsFinalFieldNotInitializedByConstructor(String name) {
@@ -3098,7 +3075,7 @@
const Code<Message Function(String name)> codeFinalFieldWithoutInitializer =
const Code<Message Function(String name)>(
"FinalFieldWithoutInitializer", templateFinalFieldWithoutInitializer,
- analyzerCode: "FINAL_NOT_INITIALIZED", dart2jsCode: "*ignored*");
+ analyzerCode: "FINAL_NOT_INITIALIZED");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsFinalFieldWithoutInitializer(String name) {
@@ -3124,7 +3101,6 @@
"FinalInstanceVariableAlreadyInitialized",
templateFinalInstanceVariableAlreadyInitialized,
analyzerCode: "FINAL_INITIALIZED_MULTIPLE_TIMES",
- dart2jsCode: "*fatal*",
severity: Severity.errorLegacyWarning);
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -3177,14 +3153,14 @@
const Code<Message Function(DartType _type, DartType _type2)>(
"ForInLoopElementTypeNotAssignable",
templateForInLoopElementTypeNotAssignable,
- analyzerCode: "FOR_IN_OF_INVALID_ELEMENT_TYPE",
- dart2jsCode: "*fatal*");
+ analyzerCode: "FOR_IN_OF_INVALID_ELEMENT_TYPE");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsForInLoopElementTypeNotAssignable(
DartType _type, DartType _type2) {
NameSystem nameSystem = new NameSystem();
- StringBuffer buffer = new StringBuffer();
+ StringBuffer buffer;
+ buffer = new StringBuffer();
new Printer(buffer, syntheticNames: nameSystem).writeNode(_type);
String type = '$buffer';
@@ -3206,7 +3182,6 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const MessageCode messageForInLoopExactlyOneVariable = const MessageCode(
"ForInLoopExactlyOneVariable",
- severity: Severity.error,
message: r"""A for-in loop can't have more than one loop variable.""");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -3215,7 +3190,6 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const MessageCode messageForInLoopNotAssignable = const MessageCode(
"ForInLoopNotAssignable",
- severity: Severity.error,
message:
r"""Can't assign to this, so it can't be used in a for-in loop.""");
@@ -3235,13 +3209,14 @@
codeForInLoopTypeNotIterable =
const Code<Message Function(DartType _type, DartType _type2)>(
"ForInLoopTypeNotIterable", templateForInLoopTypeNotIterable,
- analyzerCode: "FOR_IN_OF_INVALID_TYPE", dart2jsCode: "*fatal*");
+ analyzerCode: "FOR_IN_OF_INVALID_TYPE");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsForInLoopTypeNotIterable(
DartType _type, DartType _type2) {
NameSystem nameSystem = new NameSystem();
- StringBuffer buffer = new StringBuffer();
+ StringBuffer buffer;
+ buffer = new StringBuffer();
new Printer(buffer, syntheticNames: nameSystem).writeNode(_type);
String type = '$buffer';
@@ -3263,7 +3238,6 @@
const MessageCode messageForInLoopWithConstVariable = const MessageCode(
"ForInLoopWithConstVariable",
analyzerCode: "FOR_IN_WITH_CONST_VARIABLE",
- dart2jsCode: "*fatal*",
message: r"""A for-in loop-variable can't be 'const'.""",
tip: r"""Try removing the 'const' modifier.""");
@@ -3274,7 +3248,6 @@
const MessageCode messageFunctionTypeDefaultValue = const MessageCode(
"FunctionTypeDefaultValue",
analyzerCode: "DEFAULT_VALUE_IN_FUNCTION_TYPE",
- dart2jsCode: "*ignored*",
message: r"""Can't have a default value in a function type.""");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -3285,7 +3258,6 @@
const MessageCode messageFunctionTypedParameterVar = const MessageCode(
"FunctionTypedParameterVar",
analyzerCode: "FUNCTION_TYPED_PARAMETER_VAR",
- dart2jsCode: "*fatal*",
message:
r"""Function-typed parameters can't specify 'const', 'final' or 'var' in place of a return type.""",
tip: r"""Try replacing the keyword with a return type.""");
@@ -3297,7 +3269,6 @@
const MessageCode messageGeneratorReturnsValue = const MessageCode(
"GeneratorReturnsValue",
analyzerCode: "RETURN_IN_GENERATOR",
- dart2jsCode: "*ignored*",
message: r"""'sync*' and 'async*' can't return a value.""");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -3308,8 +3279,6 @@
const MessageCode messageGenericFunctionTypeInBound = const MessageCode(
"GenericFunctionTypeInBound",
analyzerCode: "GENERIC_FUNCTION_TYPE_CANNOT_BE_BOUND",
- dart2jsCode: "*fatal*",
- severity: Severity.error,
message:
r"""Type variables can't have generic function types in their bounds.""");
@@ -3339,7 +3308,6 @@
const MessageCode messageGetterWithFormals = const MessageCode(
"GetterWithFormals",
analyzerCode: "GETTER_WITH_PARAMETERS",
- dart2jsCode: "*ignored*",
message: r"""A getter can't have formal parameters.""",
tip: r"""Try removing '(...)'.""");
@@ -3351,7 +3319,6 @@
const MessageCode messageIllegalAssignmentToNonAssignable = const MessageCode(
"IllegalAssignmentToNonAssignable",
analyzerCode: "ILLEGAL_ASSIGNMENT_TO_NON_ASSIGNABLE",
- dart2jsCode: "*fatal*",
message: r"""Illegal assignment to non-assignable expression.""");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -3362,8 +3329,6 @@
const MessageCode messageIllegalAsyncGeneratorReturnType = const MessageCode(
"IllegalAsyncGeneratorReturnType",
analyzerCode: "ILLEGAL_ASYNC_GENERATOR_RETURN_TYPE",
- dart2jsCode: "*fatal*",
- severity: Severity.error,
message:
r"""Functions marked 'async*' must have a return type assignable to 'Stream'.""");
@@ -3374,8 +3339,6 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const MessageCode messageIllegalAsyncGeneratorVoidReturnType =
const MessageCode("IllegalAsyncGeneratorVoidReturnType",
- dart2jsCode: "*fatal*",
- severity: Severity.error,
message:
r"""Functions marked 'async*' can't have return type 'void'.""");
@@ -3386,8 +3349,6 @@
const MessageCode messageIllegalAsyncReturnType = const MessageCode(
"IllegalAsyncReturnType",
analyzerCode: "ILLEGAL_ASYNC_RETURN_TYPE",
- dart2jsCode: "*fatal*",
- severity: Severity.error,
message:
r"""Functions marked 'async' must have a return type assignable to 'Future'.""");
@@ -3401,7 +3362,7 @@
const Code<Message Function(String name)> codeIllegalMixin =
const Code<Message Function(String name)>(
"IllegalMixin", templateIllegalMixin,
- analyzerCode: "ILLEGAL_MIXIN", dart2jsCode: "*fatal*");
+ analyzerCode: "ILLEGAL_MIXIN");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsIllegalMixin(String name) {
@@ -3422,7 +3383,7 @@
const Code<Message Function(String name)> codeIllegalMixinDueToConstructors =
const Code<Message Function(String name)>(
"IllegalMixinDueToConstructors", templateIllegalMixinDueToConstructors,
- analyzerCode: "MIXIN_DECLARES_CONSTRUCTOR", dart2jsCode: "*fatal*");
+ analyzerCode: "MIXIN_DECLARES_CONSTRUCTOR");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsIllegalMixinDueToConstructors(String name) {
@@ -3463,8 +3424,6 @@
const MessageCode messageIllegalSyncGeneratorReturnType = const MessageCode(
"IllegalSyncGeneratorReturnType",
analyzerCode: "ILLEGAL_SYNC_GENERATOR_RETURN_TYPE",
- dart2jsCode: "*fatal*",
- severity: Severity.error,
message:
r"""Functions marked 'sync*' must have a return type assignable to 'Iterable'.""");
@@ -3475,8 +3434,6 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const MessageCode messageIllegalSyncGeneratorVoidReturnType = const MessageCode(
"IllegalSyncGeneratorVoidReturnType",
- dart2jsCode: "*fatal*",
- severity: Severity.error,
message: r"""Functions marked 'sync*' can't have return type 'void'.""");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -3486,18 +3443,26 @@
const MessageCode messageImplementsBeforeExtends = const MessageCode(
"ImplementsBeforeExtends",
analyzerCode: "IMPLEMENTS_BEFORE_EXTENDS",
- dart2jsCode: "*ignored*",
message: r"""The extends clause must be before the implements clause.""",
tip: r"""Try moving the extends clause before the implements clause.""");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<Null> codeImplementsBeforeOn = messageImplementsBeforeOn;
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const MessageCode messageImplementsBeforeOn = const MessageCode(
+ "ImplementsBeforeOn",
+ analyzerCode: "IMPLEMENTS_BEFORE_ON",
+ message: r"""The on clause must be before the implements clause.""",
+ tip: r"""Try moving the on clause before the implements clause.""");
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const Code<Null> codeImplementsBeforeWith = messageImplementsBeforeWith;
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const MessageCode messageImplementsBeforeWith = const MessageCode(
"ImplementsBeforeWith",
analyzerCode: "IMPLEMENTS_BEFORE_WITH",
- dart2jsCode: "*ignored*",
message: r"""The with clause must be before the implements clause.""",
tip: r"""Try moving the with clause before the implements clause.""");
@@ -3507,8 +3472,6 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const MessageCode messageImplementsFutureOr = const MessageCode(
"ImplementsFutureOr",
- dart2jsCode: "*fatal*",
- severity: Severity.error,
message: r"""'FutureOr' can't be used in an 'implements' clause.""");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -3523,7 +3486,7 @@
const Code<Message Function(String name, int count)> codeImplementsRepeated =
const Code<Message Function(String name, int count)>(
"ImplementsRepeated", templateImplementsRepeated,
- analyzerCode: "IMPLEMENTS_REPEATED", dart2jsCode: "*fatal*");
+ analyzerCode: "IMPLEMENTS_REPEATED");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsImplementsRepeated(String name, int count) {
@@ -3548,7 +3511,7 @@
const Code<Message Function(String name)> codeImplementsSuperClass =
const Code<Message Function(String name)>(
"ImplementsSuperClass", templateImplementsSuperClass,
- analyzerCode: "IMPLEMENTS_SUPER_CLASS", dart2jsCode: "*fatal*");
+ analyzerCode: "IMPLEMENTS_SUPER_CLASS");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsImplementsSuperClass(String name) {
@@ -3575,14 +3538,13 @@
const Code<Message Function(DartType _type)> codeImplicitCallOfNonMethod =
const Code<Message Function(DartType _type)>(
"ImplicitCallOfNonMethod", templateImplicitCallOfNonMethod,
- analyzerCode: "IMPLICIT_CALL_OF_NON_METHOD",
- dart2jsCode: "*fatal*",
- severity: Severity.error);
+ analyzerCode: "IMPLICIT_CALL_OF_NON_METHOD");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsImplicitCallOfNonMethod(DartType _type) {
NameSystem nameSystem = new NameSystem();
- StringBuffer buffer = new StringBuffer();
+ StringBuffer buffer;
+ buffer = new StringBuffer();
new Printer(buffer, syntheticNames: nameSystem).writeNode(_type);
String type = '$buffer';
@@ -3599,7 +3561,6 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const MessageCode messageImportAfterPart = const MessageCode("ImportAfterPart",
analyzerCode: "IMPORT_DIRECTIVE_AFTER_PART_DIRECTIVE",
- dart2jsCode: "*ignored*",
message: r"""Import directives must preceed part directives.""",
tip: r"""Try moving the import directives before the part directives.""");
@@ -3635,7 +3596,6 @@
const MessageCode messageInheritedMembersConflict = const MessageCode(
"InheritedMembersConflict",
analyzerCode: "CONFLICTS_WITH_INHERITED_MEMBER",
- dart2jsCode: "*fatal*",
severity: Severity.errorLegacyWarning,
message: r"""Can't inherit members that conflict with each other.""");
@@ -3721,7 +3681,6 @@
const MessageCode messageInitializedVariableInForEach = const MessageCode(
"InitializedVariableInForEach",
analyzerCode: "INITIALIZED_VARIABLE_IN_FOR_EACH",
- dart2jsCode: "*fatal*",
message: r"""The loop variable in a for-each loop can't be initialized.""",
tip:
r"""Try removing the initializer, or using a different kind of loop.""");
@@ -3737,7 +3696,7 @@
const Code<Message Function(String name)> codeInitializerForStaticField =
const Code<Message Function(String name)>(
"InitializerForStaticField", templateInitializerForStaticField,
- analyzerCode: "INITIALIZER_FOR_STATIC_FIELD", dart2jsCode: "*fatal*");
+ analyzerCode: "INITIALIZER_FOR_STATIC_FIELD");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsInitializerForStaticField(String name) {
@@ -3760,8 +3719,7 @@
const Code<Message Function(String name)> codeInitializerOutsideConstructor =
const Code<Message Function(String name)>(
"InitializerOutsideConstructor", templateInitializerOutsideConstructor,
- analyzerCode: "INITIALIZER_OUTSIDE_CONSTRUCTOR",
- dart2jsCode: "*fatal*");
+ analyzerCode: "INITIALIZER_OUTSIDE_CONSTRUCTOR");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsInitializerOutsideConstructor(String name) {
@@ -3792,14 +3750,14 @@
"InitializingFormalTypeMismatch",
templateInitializingFormalTypeMismatch,
analyzerCode: "INVALID_PARAMETER_DECLARATION",
- dart2jsCode: "*fatal*",
severity: Severity.errorLegacyWarning);
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsInitializingFormalTypeMismatch(
String name, DartType _type, DartType _type2) {
NameSystem nameSystem = new NameSystem();
- StringBuffer buffer = new StringBuffer();
+ StringBuffer buffer;
+ buffer = new StringBuffer();
new Printer(buffer, syntheticNames: nameSystem).writeNode(_type);
String type = '$buffer';
@@ -3860,7 +3818,7 @@
const Code<Message Function(Token token)> codeIntegerLiteralIsOutOfRange =
const Code<Message Function(Token token)>(
"IntegerLiteralIsOutOfRange", templateIntegerLiteralIsOutOfRange,
- analyzerCode: "INTEGER_LITERAL_OUT_OF_RANGE", dart2jsCode: "*fatal*");
+ analyzerCode: "INTEGER_LITERAL_OUT_OF_RANGE");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsIntegerLiteralIsOutOfRange(Token token) {
@@ -3983,27 +3941,6 @@
r"""Are calls to the compiler wrapped in CompilerContext.runInContext?""");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
-const Template<Message Function(String string)>
- templateInternalProblemMissingSeverity =
- const Template<Message Function(String string)>(
- messageTemplate: r"""Message code missing severity: #string""",
- withArguments: _withArgumentsInternalProblemMissingSeverity);
-
-// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
-const Code<Message Function(String string)> codeInternalProblemMissingSeverity =
- const Code<Message Function(String string)>(
- "InternalProblemMissingSeverity",
- templateInternalProblemMissingSeverity,
- severity: Severity.internalProblem);
-
-// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
-Message _withArgumentsInternalProblemMissingSeverity(String string) {
- return new Message(codeInternalProblemMissingSeverity,
- message: """Message code missing severity: ${string}""",
- arguments: {'string': string});
-}
-
-// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const Template<Message Function(String name)> templateInternalProblemNotFound =
const Template<Message Function(String name)>(
messageTemplate: r"""Couldn't find '#name'.""",
@@ -4258,7 +4195,6 @@
const MessageCode messageInterpolationInUri = const MessageCode(
"InterpolationInUri",
analyzerCode: "INVALID_LITERAL_IN_CONFIGURATION",
- dart2jsCode: "*fatal*",
message: r"""Can't use string interpolation in a URI.""");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -4279,12 +4215,13 @@
codeInvalidAssignment =
const Code<Message Function(DartType _type, DartType _type2)>(
"InvalidAssignment", templateInvalidAssignment,
- analyzerCode: "INVALID_ASSIGNMENT", dart2jsCode: "*ignored*");
+ analyzerCode: "INVALID_ASSIGNMENT");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsInvalidAssignment(DartType _type, DartType _type2) {
NameSystem nameSystem = new NameSystem();
- StringBuffer buffer = new StringBuffer();
+ StringBuffer buffer;
+ buffer = new StringBuffer();
new Printer(buffer, syntheticNames: nameSystem).writeNode(_type);
String type = '$buffer';
@@ -4305,7 +4242,6 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const MessageCode messageInvalidAwaitFor = const MessageCode("InvalidAwaitFor",
analyzerCode: "INVALID_AWAIT_IN_FOR",
- dart2jsCode: "INVALID_AWAIT_FOR",
message:
r"""The keyword 'await' isn't allowed for a normal 'for' statement.""",
tip: r"""Try removing the keyword, or use a for-each statement.""");
@@ -4319,8 +4255,9 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const Code<Message Function(String name)> codeInvalidBreakTarget =
const Code<Message Function(String name)>(
- "InvalidBreakTarget", templateInvalidBreakTarget,
- dart2jsCode: "*fatal*");
+ "InvalidBreakTarget",
+ templateInvalidBreakTarget,
+);
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsInvalidBreakTarget(String name) {
@@ -4346,12 +4283,13 @@
codeInvalidCastFunctionExpr =
const Code<Message Function(DartType _type, DartType _type2)>(
"InvalidCastFunctionExpr", templateInvalidCastFunctionExpr,
- analyzerCode: "INVALID_CAST_FUNCTION_EXPR", dart2jsCode: "*ignored*");
+ analyzerCode: "INVALID_CAST_FUNCTION_EXPR");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsInvalidCastFunctionExpr(DartType _type, DartType _type2) {
NameSystem nameSystem = new NameSystem();
- StringBuffer buffer = new StringBuffer();
+ StringBuffer buffer;
+ buffer = new StringBuffer();
new Printer(buffer, syntheticNames: nameSystem).writeNode(_type);
String type = '$buffer';
@@ -4384,12 +4322,13 @@
codeInvalidCastLiteralList =
const Code<Message Function(DartType _type, DartType _type2)>(
"InvalidCastLiteralList", templateInvalidCastLiteralList,
- analyzerCode: "INVALID_CAST_LITERAL_LIST", dart2jsCode: "*ignored*");
+ analyzerCode: "INVALID_CAST_LITERAL_LIST");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsInvalidCastLiteralList(DartType _type, DartType _type2) {
NameSystem nameSystem = new NameSystem();
- StringBuffer buffer = new StringBuffer();
+ StringBuffer buffer;
+ buffer = new StringBuffer();
new Printer(buffer, syntheticNames: nameSystem).writeNode(_type);
String type = '$buffer';
@@ -4422,12 +4361,13 @@
codeInvalidCastLiteralMap =
const Code<Message Function(DartType _type, DartType _type2)>(
"InvalidCastLiteralMap", templateInvalidCastLiteralMap,
- analyzerCode: "INVALID_CAST_LITERAL_MAP", dart2jsCode: "*ignored*");
+ analyzerCode: "INVALID_CAST_LITERAL_MAP");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsInvalidCastLiteralMap(DartType _type, DartType _type2) {
NameSystem nameSystem = new NameSystem();
- StringBuffer buffer = new StringBuffer();
+ StringBuffer buffer;
+ buffer = new StringBuffer();
new Printer(buffer, syntheticNames: nameSystem).writeNode(_type);
String type = '$buffer';
@@ -4460,13 +4400,14 @@
codeInvalidCastLocalFunction =
const Code<Message Function(DartType _type, DartType _type2)>(
"InvalidCastLocalFunction", templateInvalidCastLocalFunction,
- analyzerCode: "INVALID_CAST_FUNCTION", dart2jsCode: "*ignored*");
+ analyzerCode: "INVALID_CAST_FUNCTION");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsInvalidCastLocalFunction(
DartType _type, DartType _type2) {
NameSystem nameSystem = new NameSystem();
- StringBuffer buffer = new StringBuffer();
+ StringBuffer buffer;
+ buffer = new StringBuffer();
new Printer(buffer, syntheticNames: nameSystem).writeNode(_type);
String type = '$buffer';
@@ -4499,12 +4440,13 @@
codeInvalidCastNewExpr =
const Code<Message Function(DartType _type, DartType _type2)>(
"InvalidCastNewExpr", templateInvalidCastNewExpr,
- analyzerCode: "INVALID_CAST_NEW_EXPR", dart2jsCode: "*ignored*");
+ analyzerCode: "INVALID_CAST_NEW_EXPR");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsInvalidCastNewExpr(DartType _type, DartType _type2) {
NameSystem nameSystem = new NameSystem();
- StringBuffer buffer = new StringBuffer();
+ StringBuffer buffer;
+ buffer = new StringBuffer();
new Printer(buffer, syntheticNames: nameSystem).writeNode(_type);
String type = '$buffer';
@@ -4537,12 +4479,13 @@
codeInvalidCastStaticMethod =
const Code<Message Function(DartType _type, DartType _type2)>(
"InvalidCastStaticMethod", templateInvalidCastStaticMethod,
- analyzerCode: "INVALID_CAST_METHOD", dart2jsCode: "*ignored*");
+ analyzerCode: "INVALID_CAST_METHOD");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsInvalidCastStaticMethod(DartType _type, DartType _type2) {
NameSystem nameSystem = new NameSystem();
- StringBuffer buffer = new StringBuffer();
+ StringBuffer buffer;
+ buffer = new StringBuffer();
new Printer(buffer, syntheticNames: nameSystem).writeNode(_type);
String type = '$buffer';
@@ -4575,13 +4518,14 @@
codeInvalidCastTopLevelFunction =
const Code<Message Function(DartType _type, DartType _type2)>(
"InvalidCastTopLevelFunction", templateInvalidCastTopLevelFunction,
- analyzerCode: "INVALID_CAST_FUNCTION", dart2jsCode: "*ignored*");
+ analyzerCode: "INVALID_CAST_FUNCTION");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsInvalidCastTopLevelFunction(
DartType _type, DartType _type2) {
NameSystem nameSystem = new NameSystem();
- StringBuffer buffer = new StringBuffer();
+ StringBuffer buffer;
+ buffer = new StringBuffer();
new Printer(buffer, syntheticNames: nameSystem).writeNode(_type);
String type = '$buffer';
@@ -4603,7 +4547,6 @@
const MessageCode messageInvalidCatchArguments = const MessageCode(
"InvalidCatchArguments",
analyzerCode: "INVALID_CATCH_ARGUMENTS",
- dart2jsCode: "*fatal*",
message: r"""Invalid catch arguments.""");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -4613,7 +4556,6 @@
const MessageCode messageInvalidCodePoint = const MessageCode(
"InvalidCodePoint",
analyzerCode: "INVALID_CODE_POINT",
- dart2jsCode: "*fatal*",
message:
r"""The escape sequence starting with '\u' isn't a valid code point.""");
@@ -4626,8 +4568,9 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const Code<Message Function(String name)> codeInvalidContinueTarget =
const Code<Message Function(String name)>(
- "InvalidContinueTarget", templateInvalidContinueTarget,
- dart2jsCode: "*fatal*");
+ "InvalidContinueTarget",
+ templateInvalidContinueTarget,
+);
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsInvalidContinueTarget(String name) {
@@ -4642,7 +4585,6 @@
const MessageCode messageInvalidHexEscape = const MessageCode(
"InvalidHexEscape",
analyzerCode: "INVALID_HEX_ESCAPE",
- dart2jsCode: "*fatal*",
message:
r"""An escape sequence starting with '\x' must be followed by 2 hexidecimal digits.""");
@@ -4653,8 +4595,6 @@
const MessageCode messageInvalidInitializer = const MessageCode(
"InvalidInitializer",
analyzerCode: "INVALID_INITIALIZER",
- dart2jsCode: "*fatal*",
- severity: Severity.error,
message: r"""Not a valid initializer.""",
tip: r"""To initialize a field, use the syntax 'name = value'.""");
@@ -4665,7 +4605,6 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const MessageCode messageInvalidInlineFunctionType = const MessageCode(
"InvalidInlineFunctionType",
- dart2jsCode: "INVALID_INLINE_FUNCTION_TYPE",
message: r"""Invalid inline function type.""",
tip:
r"""Try changing the inline function type (as in 'int f()') to a prefixed function type using the `Function` keyword (as in 'int Function() f').""");
@@ -4681,7 +4620,7 @@
const Code<Message Function(Token token)> codeInvalidOperator =
const Code<Message Function(Token token)>(
"InvalidOperator", templateInvalidOperator,
- analyzerCode: "INVALID_OPERATOR", dart2jsCode: "*fatal*");
+ analyzerCode: "INVALID_OPERATOR");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsInvalidOperator(Token token) {
@@ -4720,7 +4659,6 @@
const MessageCode messageInvalidSyncModifier = const MessageCode(
"InvalidSyncModifier",
analyzerCode: "MISSING_STAR_AFTER_SYNC",
- dart2jsCode: "INVALID_SYNC_MODIFIER",
message: r"""Invalid modifier 'sync'.""",
tip: r"""Try replacing 'sync' with 'sync*'.""");
@@ -4731,7 +4669,6 @@
const MessageCode messageInvalidUnicodeEscape = const MessageCode(
"InvalidUnicodeEscape",
analyzerCode: "INVALID_UNICODE_ESCAPE",
- dart2jsCode: "*fatal*",
message:
r"""An escape sequence starting with '\u' must be followed by 4 hexidecimal digits or from 1 to 6 digits between '{' and '}'.""");
@@ -4743,7 +4680,6 @@
const MessageCode messageInvalidUseOfNullAwareAccess = const MessageCode(
"InvalidUseOfNullAwareAccess",
analyzerCode: "INVALID_USE_OF_NULL_AWARE_ACCESS",
- dart2jsCode: "*fatal*",
message: r"""Cannot use '?.' here.""",
tip: r"""Try using '.'.""");
@@ -4753,14 +4689,32 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const MessageCode messageInvalidVoid = const MessageCode("InvalidVoid",
analyzerCode: "INVALID_USE_OF_VOID",
- dart2jsCode: "VOID_NOT_ALLOWED",
- severity: Severity.error,
message:
r"""Type 'void' can't be used here because it isn't a return type.""",
tip:
r"""Try removing 'void' keyword or replace it with 'var', 'final', or a type.""");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Template<Message Function(String name)> templateInvokeNonFunction =
+ const Template<Message Function(String name)>(
+ messageTemplate:
+ r"""'#name' isn't a function or method and can't be invoked.""",
+ withArguments: _withArgumentsInvokeNonFunction);
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<Message Function(String name)> codeInvokeNonFunction =
+ const Code<Message Function(String name)>(
+ "InvokeNonFunction", templateInvokeNonFunction,
+ analyzerCode: "INVOCATION_OF_NON_FUNCTION");
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+Message _withArgumentsInvokeNonFunction(String name) {
+ return new Message(codeInvokeNonFunction,
+ message: """'${name}' isn't a function or method and can't be invoked.""",
+ arguments: {'name': name});
+}
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const Template<
Message Function(String name)> templateLabelNotFound = const Template<
Message Function(String name)>(
@@ -4773,7 +4727,7 @@
const Code<Message Function(String name)> codeLabelNotFound =
const Code<Message Function(String name)>(
"LabelNotFound", templateLabelNotFound,
- analyzerCode: "LABEL_UNDEFINED", dart2jsCode: "*fatal*");
+ analyzerCode: "LABEL_UNDEFINED");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsLabelNotFound(String name) {
@@ -4791,7 +4745,6 @@
const MessageCode messageLibraryDirectiveNotFirst = const MessageCode(
"LibraryDirectiveNotFirst",
analyzerCode: "LIBRARY_DIRECTIVE_NOT_FIRST",
- dart2jsCode: "*ignored*",
message:
r"""The library directive must appear before all other directives.""",
tip: r"""Try moving the library directive before any other directives.""");
@@ -4804,7 +4757,6 @@
const MessageCode messageListLiteralTooManyTypeArguments = const MessageCode(
"ListLiteralTooManyTypeArguments",
analyzerCode: "EXPECTED_ONE_LIST_TYPE_ARGUMENTS",
- dart2jsCode: "*fatal*",
severity: Severity.errorLegacyWarning,
message: r"""List literal requires exactly one type argument.""");
@@ -4841,7 +4793,6 @@
const MessageCode messageLoadLibraryTakesNoArguments = const MessageCode(
"LoadLibraryTakesNoArguments",
analyzerCode: "LOAD_LIBRARY_TAKES_NO_ARGUMENTS",
- dart2jsCode: "*fatal*",
severity: Severity.errorLegacyWarning,
message: r"""'loadLibrary' takes no arguments.""");
@@ -4899,7 +4850,6 @@
const MessageCode messageMapLiteralTypeArgumentMismatch = const MessageCode(
"MapLiteralTypeArgumentMismatch",
analyzerCode: "EXPECTED_TWO_MAP_TYPE_ARGUMENTS",
- dart2jsCode: "*fatal*",
severity: Severity.errorLegacyWarning,
message: r"""Map literal requires exactly two type arguments.""");
@@ -4920,7 +4870,6 @@
const MessageCode messageMetadataTypeArguments = const MessageCode(
"MetadataTypeArguments",
analyzerCode: "ANNOTATION_WITH_TYPE_ARGUMENTS",
- dart2jsCode: "*ignored*",
message: r"""An annotation (metadata) can't use type arguments.""");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -4948,7 +4897,6 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const MessageCode messageMissingArgumentList = const MessageCode(
"MissingArgumentList",
- severity: Severity.error,
message: r"""Constructor invocations must have an argument list.""");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -4959,7 +4907,6 @@
const MessageCode messageMissingAssignableSelector = const MessageCode(
"MissingAssignableSelector",
analyzerCode: "MISSING_ASSIGNABLE_SELECTOR",
- dart2jsCode: "*fatal*",
message: r"""Missing selector such as '.<identifier>' or '[0]'.""",
tip: r"""Try adding a selector.""");
@@ -4971,7 +4918,6 @@
const MessageCode messageMissingAssignmentInInitializer = const MessageCode(
"MissingAssignmentInInitializer",
analyzerCode: "MISSING_ASSIGNMENT_IN_INITIALIZER",
- dart2jsCode: "*fatal*",
message: r"""Expected an assignment after the field name.""",
tip: r"""To initialize a field, use the syntax 'name = value'.""");
@@ -4983,7 +4929,6 @@
const MessageCode messageMissingConstFinalVarOrType = const MessageCode(
"MissingConstFinalVarOrType",
analyzerCode: "MISSING_CONST_FINAL_VAR_OR_TYPE",
- dart2jsCode: "*fatal*",
message:
r"""Variables must be declared using the keywords 'const', 'final', 'var' or a type name.""",
tip:
@@ -5015,7 +4960,6 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const MessageCode messageMissingExponent = const MessageCode("MissingExponent",
analyzerCode: "MISSING_DIGIT",
- dart2jsCode: "EXPONENT_MISSING",
message:
r"""Numbers in exponential notation should always contain an exponent (an integer number with an optional sign).""",
tip:
@@ -5028,7 +4972,6 @@
const MessageCode messageMissingExpressionInThrow = const MessageCode(
"MissingExpressionInThrow",
analyzerCode: "MISSING_EXPRESSION_IN_THROW",
- dart2jsCode: "*fatal*",
message: r"""Missing expression after 'throw'.""",
tip:
r"""Add an expression after 'throw' or use 'rethrow' to throw a caught exception""");
@@ -5041,7 +4984,6 @@
const MessageCode messageMissingFunctionParameters = const MessageCode(
"MissingFunctionParameters",
analyzerCode: "MISSING_FUNCTION_PARAMETERS",
- dart2jsCode: "*fatal*",
message:
r"""A function declaration needs an explicit list of parameters.""",
tip: r"""Try adding a parameter list to the function declaration.""");
@@ -5090,7 +5032,6 @@
"MissingImplementationNotAbstract",
templateMissingImplementationNotAbstract,
analyzerCode: "CONCRETE_CLASS_WITH_ABSTRACT_MEMBER",
- dart2jsCode: "*fatal*",
severity: Severity.errorLegacyWarning);
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -5121,7 +5062,6 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const MessageCode messageMissingMain = const MessageCode("MissingMain",
- dart2jsCode: "MISSING_MAIN",
message: r"""No 'main' method found.""",
tip: r"""Try adding a method named 'main' to your program.""");
@@ -5132,7 +5072,6 @@
const MessageCode messageMissingMethodParameters = const MessageCode(
"MissingMethodParameters",
analyzerCode: "MISSING_METHOD_PARAMETERS",
- dart2jsCode: "*fatal*",
message: r"""A method declaration needs an explicit list of parameters.""",
tip: r"""Try adding a parameter list to the method declaration.""");
@@ -5143,7 +5082,6 @@
const MessageCode messageMissingOperatorKeyword = const MessageCode(
"MissingOperatorKeyword",
analyzerCode: "MISSING_KEYWORD_OPERATOR",
- dart2jsCode: "*fatal*",
message:
r"""Operator declarations must be preceeded by the keyword 'operator'.""",
tip: r"""Try adding the keyword 'operator'.""");
@@ -5179,7 +5117,6 @@
const MessageCode messageMissingPrefixInDeferredImport = const MessageCode(
"MissingPrefixInDeferredImport",
analyzerCode: "MISSING_PREFIX_IN_DEFERRED_IMPORT",
- dart2jsCode: "*fatal*",
message: r"""Deferred imports should have a prefix.""",
tip: r"""Try adding a prefix to the import.""");
@@ -5190,7 +5127,6 @@
const MessageCode messageMissingTypedefParameters = const MessageCode(
"MissingTypedefParameters",
analyzerCode: "MISSING_TYPEDEF_PARAMETERS",
- dart2jsCode: "*fatal*",
message: r"""A typedef needs an explicit list of parameters.""",
tip: r"""Try adding a parameter list to the typedef.""");
@@ -5211,15 +5147,14 @@
codeMixinInferenceNoMatchingClass =
const Code<Message Function(String name, String name2, DartType _type)>(
"MixinInferenceNoMatchingClass", templateMixinInferenceNoMatchingClass,
- analyzerCode: "MIXIN_INFERENCE_NO_POSSIBLE_SUBSTITUTION",
- dart2jsCode: "*fatal*",
- severity: Severity.error);
+ analyzerCode: "MIXIN_INFERENCE_NO_POSSIBLE_SUBSTITUTION");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsMixinInferenceNoMatchingClass(
String name, String name2, DartType _type) {
NameSystem nameSystem = new NameSystem();
- StringBuffer buffer = new StringBuffer();
+ StringBuffer buffer;
+ buffer = new StringBuffer();
new Printer(buffer, syntheticNames: nameSystem).writeNode(_type);
String type = '$buffer';
@@ -5237,8 +5172,6 @@
const MessageCode messageMoreThanOneSuperOrThisInitializer = const MessageCode(
"MoreThanOneSuperOrThisInitializer",
analyzerCode: "SUPER_IN_REDIRECTING_CONSTRUCTOR",
- dart2jsCode: "*fatal*",
- severity: Severity.error,
message: r"""Can't have more than one 'super' or 'this' initializer.""");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -5247,7 +5180,6 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const MessageCode messageMultipleExtends = const MessageCode("MultipleExtends",
analyzerCode: "MULTIPLE_EXTENDS_CLAUSES",
- dart2jsCode: "*ignored*",
message: r"""Each class definition can have at most one extends clause.""",
tip:
r"""Try choosing one superclass and define your class to implement (or mix in) the others.""");
@@ -5259,7 +5191,6 @@
const MessageCode messageMultipleImplements = const MessageCode(
"MultipleImplements",
analyzerCode: "MULTIPLE_IMPLEMENTS_CLAUSES",
- dart2jsCode: "GENERIC",
message:
r"""Each class definition can have at most one implements clause.""",
tip:
@@ -5273,17 +5204,25 @@
const MessageCode messageMultipleLibraryDirectives = const MessageCode(
"MultipleLibraryDirectives",
analyzerCode: "MULTIPLE_LIBRARY_DIRECTIVES",
- dart2jsCode: "*ignored*",
message: r"""Only one library directive may be declared in a file.""",
tip: r"""Try removing all but one of the library directives.""");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<Null> codeMultipleOnClauses = messageMultipleOnClauses;
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const MessageCode messageMultipleOnClauses = const MessageCode(
+ "MultipleOnClauses",
+ analyzerCode: "MULTIPLE_ON_CLAUSES",
+ message: r"""Each mixin definition can have at most one on clause.""",
+ tip: r"""Try combining all of the on clauses into a single clause.""");
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const Code<Null> codeMultipleWith = messageMultipleWith;
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const MessageCode messageMultipleWith = const MessageCode("MultipleWith",
analyzerCode: "MULTIPLE_WITH_CLAUSES",
- dart2jsCode: "*ignored*",
message: r"""Each class definition can have at most one with clause.""",
tip: r"""Try combining all of the with clauses into a single clause.""");
@@ -5294,7 +5233,6 @@
const MessageCode messageNamedFunctionExpression = const MessageCode(
"NamedFunctionExpression",
analyzerCode: "NAMED_FUNCTION_EXPRESSION",
- dart2jsCode: "*ignored*",
message: r"""A function expression can't have a name.""");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -5305,7 +5243,6 @@
const MessageCode messageNativeClauseShouldBeAnnotation = const MessageCode(
"NativeClauseShouldBeAnnotation",
analyzerCode: "NATIVE_CLAUSE_SHOULD_BE_ANNOTATION",
- dart2jsCode: "*fatal*",
message: r"""Native clause in this form is deprecated.""",
tip:
r"""Try removing this native clause and adding @native() or @native('native-name') before the declaration.""");
@@ -5322,7 +5259,7 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const Code<Message Function(Token token)> codeNoFormals =
const Code<Message Function(Token token)>("NoFormals", templateNoFormals,
- analyzerCode: "MISSING_FUNCTION_PARAMETERS", dart2jsCode: "*ignored*");
+ analyzerCode: "MISSING_FUNCTION_PARAMETERS");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsNoFormals(Token token) {
@@ -5345,7 +5282,6 @@
const Code<Message Function(String name)>(
"NoSuchNamedParameter", templateNoSuchNamedParameter,
analyzerCode: "UNDEFINED_NAMED_PARAMETER",
- dart2jsCode: "*fatal*",
severity: Severity.errorLegacyWarning);
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -5382,7 +5318,7 @@
codeNonAsciiIdentifier =
const Code<Message Function(String character, int codePoint)>(
"NonAsciiIdentifier", templateNonAsciiIdentifier,
- analyzerCode: "ILLEGAL_CHARACTER", dart2jsCode: "BAD_INPUT_CHARACTER");
+ analyzerCode: "ILLEGAL_CHARACTER");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsNonAsciiIdentifier(String character, int codePoint) {
@@ -5409,7 +5345,7 @@
const Code<Message Function(int codePoint)> codeNonAsciiWhitespace =
const Code<Message Function(int codePoint)>(
"NonAsciiWhitespace", templateNonAsciiWhitespace,
- analyzerCode: "ILLEGAL_CHARACTER", dart2jsCode: "BAD_INPUT_CHARACTER");
+ analyzerCode: "ILLEGAL_CHARACTER");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsNonAsciiWhitespace(int codePoint) {
@@ -5428,8 +5364,6 @@
const MessageCode messageNonConstConstructor = const MessageCode(
"NonConstConstructor",
analyzerCode: "NOT_CONSTANT_EXPRESSION",
- dart2jsCode: "*fatal*",
- severity: Severity.error,
message:
r"""Cannot invoke a non-'const' constructor where a const expression is expected.""",
tip: r"""Try using a constructor or factory that is 'const'.""");
@@ -5440,8 +5374,6 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const MessageCode messageNonConstFactory = const MessageCode("NonConstFactory",
analyzerCode: "NOT_CONSTANT_EXPRESSION",
- dart2jsCode: "*fatal*",
- severity: Severity.error,
message:
r"""Cannot invoke a non-'const' factory where a const expression is expected.""",
tip: r"""Try using a constructor or factory that is 'const'.""");
@@ -5454,7 +5386,6 @@
const MessageCode messageNonInstanceTypeVariableUse = const MessageCode(
"NonInstanceTypeVariableUse",
analyzerCode: "TYPE_PARAMETER_REFERENCED_BY_STATIC",
- dart2jsCode: "*fatal*",
severity: Severity.errorLegacyWarning,
message: r"""Can only use type variables in instance methods.""");
@@ -5465,7 +5396,6 @@
const MessageCode messageNonPartOfDirectiveInPart = const MessageCode(
"NonPartOfDirectiveInPart",
analyzerCode: "NON_PART_OF_DIRECTIVE_IN_PART",
- dart2jsCode: "*ignored*",
message: r"""The part-of directive must be the only directive in a part.""",
tip:
r"""Try removing the other directives, or moving them to the library for which this is a part.""");
@@ -5522,38 +5452,32 @@
const MessageCode messageNotAConstantExpression = const MessageCode(
"NotAConstantExpression",
analyzerCode: "NOT_CONSTANT_EXPRESSION",
- dart2jsCode: "*fatal*",
- severity: Severity.error,
message: r"""Not a constant expression.""");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const Template<
Message Function(
- Token token,
- Token
- token2)> templateNotAPrefixInTypeAnnotation = const Template<
- Message Function(Token token, Token token2)>(
+ String name,
+ String
+ name2)> templateNotAPrefixInTypeAnnotation = const Template<
+ Message Function(String name, String name2)>(
messageTemplate:
- r"""'#lexeme.#lexeme2' can't be used as a type because '#lexeme' doesn't refer to an import prefix.""",
+ r"""'#name.#name2' can't be used as a type because '#name' doesn't refer to an import prefix.""",
withArguments: _withArgumentsNotAPrefixInTypeAnnotation);
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
-const Code<Message Function(Token token, Token token2)>
+const Code<Message Function(String name, String name2)>
codeNotAPrefixInTypeAnnotation =
- const Code<Message Function(Token token, Token token2)>(
+ const Code<Message Function(String name, String name2)>(
"NotAPrefixInTypeAnnotation", templateNotAPrefixInTypeAnnotation,
- analyzerCode: "NOT_A_TYPE",
- dart2jsCode: "*ignored*",
- severity: Severity.errorLegacyWarning);
+ analyzerCode: "NOT_A_TYPE", severity: Severity.errorLegacyWarning);
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
-Message _withArgumentsNotAPrefixInTypeAnnotation(Token token, Token token2) {
- String lexeme = token.lexeme;
- String lexeme2 = token2.lexeme;
+Message _withArgumentsNotAPrefixInTypeAnnotation(String name, String name2) {
return new Message(codeNotAPrefixInTypeAnnotation,
message:
- """'${lexeme}.${lexeme2}' can't be used as a type because '${lexeme}' doesn't refer to an import prefix.""",
- arguments: {'token': token, 'token2': token2});
+ """'${name}.${name2}' can't be used as a type because '${name}' doesn't refer to an import prefix.""",
+ arguments: {'name': name, 'name2': name2});
}
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -5565,9 +5489,7 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const Code<Message Function(String name)> codeNotAType =
const Code<Message Function(String name)>("NotAType", templateNotAType,
- analyzerCode: "NOT_A_TYPE",
- dart2jsCode: "*ignored*",
- severity: Severity.errorLegacyWarning);
+ analyzerCode: "NOT_A_TYPE", severity: Severity.errorLegacyWarning);
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsNotAType(String name) {
@@ -5580,9 +5502,7 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const MessageCode messageNotAnLvalue = const MessageCode("NotAnLvalue",
- analyzerCode: "NOT_AN_LVALUE",
- dart2jsCode: "*fatal*",
- message: r"""Can't assign to this.""");
+ analyzerCode: "NOT_AN_LVALUE", message: r"""Can't assign to this.""");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const Template<Message Function(String string)> templateNotConstantExpression =
@@ -5594,7 +5514,7 @@
const Code<Message Function(String string)> codeNotConstantExpression =
const Code<Message Function(String string)>(
"NotConstantExpression", templateNotConstantExpression,
- analyzerCode: "NOT_CONSTANT_EXPRESSION", dart2jsCode: "*fatal*");
+ analyzerCode: "NOT_CONSTANT_EXPRESSION");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsNotConstantExpression(String string) {
@@ -5609,7 +5529,6 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const MessageCode messageOnlyTry = const MessageCode("OnlyTry",
analyzerCode: "MISSING_CATCH_OR_FINALLY",
- dart2jsCode: "*ignored*",
message:
r"""Try block should be followed by 'on', 'catch', or 'finally' block.""",
tip: r"""Did you forget to add a 'finally' block?""");
@@ -5629,8 +5548,7 @@
const Code<Message Function(String name)> codeOperatorMinusParameterMismatch =
const Code<Message Function(String name)>("OperatorMinusParameterMismatch",
templateOperatorMinusParameterMismatch,
- analyzerCode: "WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR_MINUS",
- dart2jsCode: "*fatal*");
+ analyzerCode: "WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR_MINUS");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsOperatorMinusParameterMismatch(String name) {
@@ -5674,8 +5592,7 @@
const Code<Message Function(String name)> codeOperatorParameterMismatch1 =
const Code<Message Function(String name)>(
"OperatorParameterMismatch1", templateOperatorParameterMismatch1,
- analyzerCode: "WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR",
- dart2jsCode: "*fatal*");
+ analyzerCode: "WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsOperatorParameterMismatch1(String name) {
@@ -5696,8 +5613,7 @@
const Code<Message Function(String name)> codeOperatorParameterMismatch2 =
const Code<Message Function(String name)>(
"OperatorParameterMismatch2", templateOperatorParameterMismatch2,
- analyzerCode: "WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR",
- dart2jsCode: "*fatal*");
+ analyzerCode: "WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsOperatorParameterMismatch2(String name) {
@@ -5751,7 +5667,6 @@
const Code<Message Function(String name, String name2)>(
"OverrideFewerNamedArguments", templateOverrideFewerNamedArguments,
analyzerCode: "INVALID_OVERRIDE_NAMED",
- dart2jsCode: "*fatal*",
severity: Severity.errorLegacyWarning);
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -5780,7 +5695,6 @@
"OverrideFewerPositionalArguments",
templateOverrideFewerPositionalArguments,
analyzerCode: "INVALID_OVERRIDE_POSITIONAL",
- dart2jsCode: "*fatal*",
severity: Severity.errorLegacyWarning);
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -5811,7 +5725,6 @@
"OverrideMismatchNamedParameter",
templateOverrideMismatchNamedParameter,
analyzerCode: "INVALID_OVERRIDE_NAMED",
- dart2jsCode: "*fatal*",
severity: Severity.errorLegacyWarning);
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -5840,7 +5753,6 @@
const Code<Message Function(String name, String name2)>(
"OverrideMoreRequiredArguments", templateOverrideMoreRequiredArguments,
analyzerCode: "INVALID_OVERRIDE_REQUIRED",
- dart2jsCode: "*fatal*",
severity: Severity.errorLegacyWarning);
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -5875,13 +5787,14 @@
Message Function(
String name, String name2, DartType _type, DartType _type2)>(
"OverrideTypeMismatchParameter", templateOverrideTypeMismatchParameter,
- analyzerCode: "INVALID_METHOD_OVERRIDE", dart2jsCode: "*ignored*");
+ analyzerCode: "INVALID_METHOD_OVERRIDE");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsOverrideTypeMismatchParameter(
String name, String name2, DartType _type, DartType _type2) {
NameSystem nameSystem = new NameSystem();
- StringBuffer buffer = new StringBuffer();
+ StringBuffer buffer;
+ buffer = new StringBuffer();
new Printer(buffer, syntheticNames: nameSystem).writeNode(_type);
String type = '$buffer';
@@ -5920,14 +5833,14 @@
const Code<Message Function(String name, DartType _type, DartType _type2)>(
"OverrideTypeMismatchReturnType",
templateOverrideTypeMismatchReturnType,
- analyzerCode: "INVALID_METHOD_OVERRIDE",
- dart2jsCode: "*ignored*");
+ analyzerCode: "INVALID_METHOD_OVERRIDE");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsOverrideTypeMismatchReturnType(
String name, DartType _type, DartType _type2) {
NameSystem nameSystem = new NameSystem();
- StringBuffer buffer = new StringBuffer();
+ StringBuffer buffer;
+ buffer = new StringBuffer();
new Printer(buffer, syntheticNames: nameSystem).writeNode(_type);
String type = '$buffer';
@@ -5959,7 +5872,6 @@
const Code<Message Function(String name, String name2)>(
"OverrideTypeVariablesMismatch", templateOverrideTypeVariablesMismatch,
analyzerCode: "INVALID_METHOD_OVERRIDE_TYPE_PARAMETERS",
- dart2jsCode: "*fatal*",
severity: Severity.errorLegacyWarning);
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -5995,6 +5907,33 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const Template<
+ Message Function(Uri uri_)> templatePartOfInLibrary = const Template<
+ Message Function(Uri uri_)>(
+ messageTemplate:
+ r"""Can't import '#uri', because it has a 'part of' declaration.""",
+ tipTemplate:
+ r"""Try removing the 'part of' declaration, or using '#uri' as a part.""",
+ withArguments: _withArgumentsPartOfInLibrary);
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<Message Function(Uri uri_)> codePartOfInLibrary =
+ const Code<Message Function(Uri uri_)>(
+ "PartOfInLibrary", templatePartOfInLibrary,
+ analyzerCode: "IMPORT_OF_NON_LIBRARY");
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+Message _withArgumentsPartOfInLibrary(Uri uri_) {
+ String uri = relativizeUri(uri_);
+ return new Message(codePartOfInLibrary,
+ message:
+ """Can't import '${uri}', because it has a 'part of' declaration.""",
+ tip:
+ """Try removing the 'part of' declaration, or using '${uri}' as a part.""",
+ arguments: {'uri': uri_});
+}
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Template<
Message Function(
Uri uri_,
String name,
@@ -6037,7 +5976,6 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const MessageCode messagePartOfTwice = const MessageCode("PartOfTwice",
analyzerCode: "MULTIPLE_PART_OF_DIRECTIVES",
- dart2jsCode: "*ignored*",
message: r"""Only one part-of directive may be declared in a file.""",
tip: r"""Try removing all but one of the part-of directives.""");
@@ -6048,8 +5986,6 @@
const MessageCode messagePartOfTwoLibraries = const MessageCode(
"PartOfTwoLibraries",
analyzerCode: "PART_OF_DIFFERENT_LIBRARY",
- dart2jsCode: "*fatal*",
- severity: Severity.error,
message: r"""A file can't be part of more than one library.""",
tip:
r"""Try moving the shared declarations into the libraries, or into a new library.""");
@@ -6225,7 +6161,6 @@
const MessageCode messagePlatformPrivateLibraryAccess = const MessageCode(
"PlatformPrivateLibraryAccess",
analyzerCode: "IMPORT_INTERNAL_LIBRARY",
- dart2jsCode: "*fatal*",
message: r"""Can't access platform private library.""");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -6236,7 +6171,6 @@
const MessageCode messagePositionalAfterNamedArgument = const MessageCode(
"PositionalAfterNamedArgument",
analyzerCode: "POSITIONAL_AFTER_NAMED_ARGUMENT",
- dart2jsCode: "*ignored*",
message: r"""Place positional arguments before named arguments.""",
tip:
r"""Try moving the positional argument before the named arguments, or add a name to the argument.""");
@@ -6249,7 +6183,6 @@
const MessageCode messagePositionalParameterWithEquals = const MessageCode(
"PositionalParameterWithEquals",
analyzerCode: "WRONG_SEPARATOR_FOR_POSITIONAL_PARAMETER",
- dart2jsCode: "POSITIONAL_PARAMETER_WITH_EQUALS",
message:
r"""Positional optional parameters can't use ':' to specify a default value.""",
tip: r"""Try replacing ':' with '='.""");
@@ -6261,7 +6194,6 @@
const MessageCode messagePrefixAfterCombinator = const MessageCode(
"PrefixAfterCombinator",
analyzerCode: "PREFIX_AFTER_COMBINATOR",
- dart2jsCode: "*fatal*",
message:
r"""The prefix ('as' clause) should come before any show/hide combinators.""",
tip: r"""Try moving the prefix before the combinators.""");
@@ -6273,7 +6205,6 @@
const MessageCode messagePrivateNamedParameter = const MessageCode(
"PrivateNamedParameter",
analyzerCode: "PRIVATE_OPTIONAL_PARAMETER",
- dart2jsCode: "*ignored*",
message: r"""An optional named parameter can't start with '_'.""");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -6284,7 +6215,6 @@
const MessageCode messageRedirectingConstructorWithBody = const MessageCode(
"RedirectingConstructorWithBody",
analyzerCode: "REDIRECTING_CONSTRUCTOR_WITH_BODY",
- dart2jsCode: "*fatal*",
message: r"""Redirecting constructors can't have a body.""",
tip:
r"""Try removing the body, or not making this a redirecting constructor.""");
@@ -6296,7 +6226,6 @@
const MessageCode messageRedirectionInNonFactory = const MessageCode(
"RedirectionInNonFactory",
analyzerCode: "REDIRECTION_IN_NON_FACTORY_CONSTRUCTOR",
- dart2jsCode: "*fatal*",
message: r"""Only factory constructor can specify '=' redirection.""",
tip:
r"""Try making this a factory constructor, or remove the redirection.""");
@@ -6314,7 +6243,6 @@
const Code<Message Function(String name)>(
"RedirectionTargetNotFound", templateRedirectionTargetNotFound,
analyzerCode: "REDIRECT_TO_MISSING_CONSTRUCTOR",
- dart2jsCode: "*fatal*",
severity: Severity.errorLegacyWarning);
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -6332,7 +6260,6 @@
const MessageCode messageRequiredParameterWithDefault = const MessageCode(
"RequiredParameterWithDefault",
analyzerCode: "NAMED_PARAMETER_OUTSIDE_GROUP",
- dart2jsCode: "REQUIRED_PARAMETER_WITH_DEFAULT",
message: r"""Non-optional parameters can't have a default value.""",
tip:
r"""Try removing the default value or making the parameter optional.""");
@@ -6343,7 +6270,6 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const MessageCode messageRethrowNotCatch = const MessageCode("RethrowNotCatch",
analyzerCode: "RETHROW_OUTSIDE_CATCH",
- dart2jsCode: "*fatal*",
message: r"""'rethrow' can only be used in catch clauses.""");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -6353,8 +6279,6 @@
const MessageCode messageReturnFromVoidFunction = const MessageCode(
"ReturnFromVoidFunction",
analyzerCode: "RETURN_OF_INVALID_TYPE",
- dart2jsCode: "*fatal*",
- severity: Severity.warning,
message: r"""Can't return a value from a void function.""");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -6364,11 +6288,20 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const MessageCode messageReturnTypeFunctionExpression = const MessageCode(
"ReturnTypeFunctionExpression",
- dart2jsCode: "*ignored*",
severity: Severity.errorLegacyWarning,
message: r"""A function expression can't have a return type.""");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<Null> codeReturnWithoutExpression = messageReturnWithoutExpression;
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const MessageCode messageReturnWithoutExpression = const MessageCode(
+ "ReturnWithoutExpression",
+ analyzerCode: "RETURN_WITHOUT_VALUE",
+ severity: Severity.warning,
+ message: r"""Must explicitly return a value from a non-void function.""");
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const Template<Message Function(Uri uri_)> templateSdkRootNotFound =
const Template<Message Function(Uri uri_)>(
messageTemplate: r"""SDK root directory not found: #uri.""",
@@ -6462,7 +6395,6 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const MessageCode messageSetterNotSync = const MessageCode("SetterNotSync",
analyzerCode: "INVALID_MODIFIER_ON_SETTER",
- dart2jsCode: "*ignored*",
message: r"""Setters can't use 'async', 'async*', or 'sync*'.""");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -6473,7 +6405,6 @@
const MessageCode messageSetterWithWrongNumberOfFormals = const MessageCode(
"SetterWithWrongNumberOfFormals",
analyzerCode: "WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER",
- dart2jsCode: "*ignored*",
message: r"""A setter should have exactly one formal parameter.""");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -6573,9 +6504,7 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const MessageCode messageStackOverflow = const MessageCode("StackOverflow",
- analyzerCode: "STACK_OVERFLOW",
- dart2jsCode: "GENERIC",
- message: r"""Stack overflow.""");
+ analyzerCode: "STACK_OVERFLOW", message: r"""Stack overflow.""");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const Code<Null> codeStaticAfterConst = messageStaticAfterConst;
@@ -6584,7 +6513,6 @@
const MessageCode messageStaticAfterConst = const MessageCode(
"StaticAfterConst",
analyzerCode: "STATIC_AFTER_CONST",
- dart2jsCode: "EXTRANEOUS_MODIFIER",
message:
r"""The modifier 'static' should be before the modifier 'const'.""",
tip: r"""Try re-ordering the modifiers.""");
@@ -6596,7 +6524,6 @@
const MessageCode messageStaticAfterFinal = const MessageCode(
"StaticAfterFinal",
analyzerCode: "STATIC_AFTER_FINAL",
- dart2jsCode: "EXTRANEOUS_MODIFIER",
message:
r"""The modifier 'static' should be before the modifier 'final'.""",
tip: r"""Try re-ordering the modifiers.""");
@@ -6607,7 +6534,6 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const MessageCode messageStaticAfterVar = const MessageCode("StaticAfterVar",
analyzerCode: "STATIC_AFTER_VAR",
- dart2jsCode: "*ignored*",
message: r"""The modifier 'static' should be before the modifier 'var'.""",
tip: r"""Try re-ordering the modifiers.""");
@@ -6618,7 +6544,6 @@
const MessageCode messageStaticConstructor = const MessageCode(
"StaticConstructor",
analyzerCode: "STATIC_CONSTRUCTOR",
- dart2jsCode: "*fatal*",
message: r"""Constructors can't be static.""",
tip: r"""Try removing the keyword 'static'.""");
@@ -6628,7 +6553,6 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const MessageCode messageStaticOperator = const MessageCode("StaticOperator",
analyzerCode: "STATIC_OPERATOR",
- dart2jsCode: "EXTRANEOUS_MODIFIER",
message: r"""Operators can't be static.""",
tip: r"""Try removing the keyword 'static'.""");
@@ -6639,7 +6563,6 @@
const MessageCode messageSuperAsExpression = const MessageCode(
"SuperAsExpression",
analyzerCode: "SUPER_AS_EXPRESSION",
- dart2jsCode: "*fatal*",
message: r"""Can't use 'super' as an expression.""",
tip:
r"""To delegate a constructor to a super constructor, put the super call as an initializer.""");
@@ -6651,7 +6574,6 @@
const MessageCode messageSuperAsIdentifier = const MessageCode(
"SuperAsIdentifier",
analyzerCode: "SUPER_AS_EXPRESSION",
- dart2jsCode: "*fatal*",
message: r"""Expected identifier, but got 'super'.""");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -6661,8 +6583,6 @@
const MessageCode messageSuperInitializerNotLast = const MessageCode(
"SuperInitializerNotLast",
analyzerCode: "INVALID_SUPER_INVOCATION",
- dart2jsCode: "*fatal*",
- severity: Severity.error,
message: r"""Can't have initializers after 'super'.""");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -6671,7 +6591,6 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const MessageCode messageSuperNullAware = const MessageCode("SuperNullAware",
analyzerCode: "INVALID_OPERATOR_FOR_SUPER",
- dart2jsCode: "*ignored*",
message: r"""'super' can't be null.""",
tip: r"""Try replacing '?.' with '.'""");
@@ -6691,8 +6610,7 @@
const Code<Message Function(String name)>(
"SuperclassHasNoDefaultConstructor",
templateSuperclassHasNoDefaultConstructor,
- analyzerCode: "NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT",
- dart2jsCode: "*ignored*");
+ analyzerCode: "NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsSuperclassHasNoDefaultConstructor(String name) {
@@ -6733,7 +6651,6 @@
const Code<Message Function(String name)>(
"SuperclassHasNoMethod", templateSuperclassHasNoMethod,
analyzerCode: "UNDEFINED_SUPER_METHOD",
- dart2jsCode: "*ignored*",
severity: Severity.errorLegacyWarning);
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -6806,9 +6723,7 @@
const Code<Message Function(String name)> codeSupertypeIsIllegal =
const Code<Message Function(String name)>(
"SupertypeIsIllegal", templateSupertypeIsIllegal,
- analyzerCode: "EXTENDS_NON_CLASS",
- dart2jsCode: "*fatal*",
- severity: Severity.error);
+ analyzerCode: "EXTENDS_NON_CLASS");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsSupertypeIsIllegal(String name) {
@@ -6828,9 +6743,7 @@
const Code<Message Function(String name)> codeSupertypeIsTypeVariable =
const Code<Message Function(String name)>(
"SupertypeIsTypeVariable", templateSupertypeIsTypeVariable,
- analyzerCode: "EXTENDS_NON_CLASS",
- dart2jsCode: "*fatal*",
- severity: Severity.error);
+ analyzerCode: "EXTENDS_NON_CLASS");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsSupertypeIsTypeVariable(String name) {
@@ -6846,11 +6759,57 @@
const MessageCode messageSwitchCaseFallThrough = const MessageCode(
"SwitchCaseFallThrough",
analyzerCode: "CASE_BLOCK_NOT_TERMINATED",
- dart2jsCode: "*fatal*",
severity: Severity.errorLegacyWarning,
message: r"""Switch case may fall through to the next case.""");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Template<
+ Message Function(
+ DartType _type,
+ DartType
+ _type2)> templateSwitchExpressionNotAssignable = const Template<
+ Message Function(DartType _type, DartType _type2)>(
+ messageTemplate:
+ r"""Type '#type' of the switch expression isn't assignable to the type '#type2' of this case expression.""",
+ withArguments: _withArgumentsSwitchExpressionNotAssignable);
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<Message Function(DartType _type, DartType _type2)>
+ codeSwitchExpressionNotAssignable =
+ const Code<Message Function(DartType _type, DartType _type2)>(
+ "SwitchExpressionNotAssignable", templateSwitchExpressionNotAssignable,
+ analyzerCode: "SWITCH_EXPRESSION_NOT_ASSIGNABLE");
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+Message _withArgumentsSwitchExpressionNotAssignable(
+ DartType _type, DartType _type2) {
+ NameSystem nameSystem = new NameSystem();
+ StringBuffer buffer;
+ buffer = new StringBuffer();
+ new Printer(buffer, syntheticNames: nameSystem).writeNode(_type);
+ String type = '$buffer';
+
+ buffer = new StringBuffer();
+ new Printer(buffer, syntheticNames: nameSystem).writeNode(_type2);
+ String type2 = '$buffer';
+
+ return new Message(codeSwitchExpressionNotAssignable,
+ message:
+ """Type '${type}' of the switch expression isn't assignable to the type '${type2}' of this case expression.""",
+ arguments: {'type': _type, 'type2': _type2});
+}
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<Null> codeSwitchExpressionNotAssignableCause =
+ messageSwitchExpressionNotAssignableCause;
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const MessageCode messageSwitchExpressionNotAssignableCause = const MessageCode(
+ "SwitchExpressionNotAssignableCause",
+ severity: Severity.context,
+ message: r"""The switch expression is here.""");
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const Code<Null> codeSwitchHasCaseAfterDefault =
messageSwitchHasCaseAfterDefault;
@@ -6858,7 +6817,6 @@
const MessageCode messageSwitchHasCaseAfterDefault = const MessageCode(
"SwitchHasCaseAfterDefault",
analyzerCode: "SWITCH_HAS_CASE_AFTER_DEFAULT_CASE",
- dart2jsCode: "*fatal*",
message:
r"""The default case should be the last case in a switch statement.""",
tip: r"""Try moving the default case after the other case clauses.""");
@@ -6871,7 +6829,6 @@
const MessageCode messageSwitchHasMultipleDefaults = const MessageCode(
"SwitchHasMultipleDefaults",
analyzerCode: "SWITCH_HAS_MULTIPLE_DEFAULT_CASES",
- dart2jsCode: "*fatal*",
message: r"""The 'default' case can only be declared once.""",
tip: r"""Try removing all but one default case.""");
@@ -6887,7 +6844,7 @@
const Code<Message Function(String name)> codeThisAccessInFieldInitializer =
const Code<Message Function(String name)>(
"ThisAccessInFieldInitializer", templateThisAccessInFieldInitializer,
- analyzerCode: "THIS_ACCESS_FROM_INITIALIZER", dart2jsCode: "*fatal*");
+ analyzerCode: "THIS_ACCESS_FROM_INITIALIZER");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsThisAccessInFieldInitializer(String name) {
@@ -6904,8 +6861,6 @@
const MessageCode messageThisAsIdentifier = const MessageCode(
"ThisAsIdentifier",
analyzerCode: "INVALID_REFERENCE_TO_THIS",
- dart2jsCode: "*fatal*",
- severity: Severity.error,
message: r"""Expected identifier, but got 'this'.""");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -6915,8 +6870,6 @@
const MessageCode messageThisInitializerNotAlone = const MessageCode(
"ThisInitializerNotAlone",
analyzerCode: "FIELD_INITIALIZER_REDIRECTING_CONSTRUCTOR",
- dart2jsCode: "*fatal*",
- severity: Severity.error,
message: r"""Can't have other initializers together with 'this'.""");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -6932,8 +6885,7 @@
const Code<Message Function(String string)>(
"ThisOrSuperAccessInFieldInitializer",
templateThisOrSuperAccessInFieldInitializer,
- analyzerCode: "THIS_ACCESS_FROM_INITIALIZER",
- dart2jsCode: "*fatal*");
+ analyzerCode: "THIS_ACCESS_FROM_INITIALIZER");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsThisOrSuperAccessInFieldInitializer(String string) {
@@ -6958,7 +6910,6 @@
const Code<Message Function(int count, int count2)>(
"TooFewArguments", templateTooFewArguments,
analyzerCode: "NOT_ENOUGH_REQUIRED_ARGUMENTS",
- dart2jsCode: "*fatal*",
severity: Severity.errorLegacyWarning);
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -6986,7 +6937,6 @@
const Code<Message Function(int count, int count2)>(
"TooManyArguments", templateTooManyArguments,
analyzerCode: "EXTRA_POSITIONAL_ARGUMENTS",
- dart2jsCode: "*fatal*",
severity: Severity.errorLegacyWarning);
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -6999,44 +6949,12 @@
}
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
-const Template<
- Message Function(
- int count,
- int
- count2)> templateTooManyArgumentsCouldBeNamed = const Template<
- Message Function(int count, int count2)>(
- messageTemplate:
- r"""Too many positional arguments: #count allowed, but #count2 found.""",
- tipTemplate:
- r"""Try removing the extra positional arguments or specifying the name for named arguments.""",
- withArguments: _withArgumentsTooManyArgumentsCouldBeNamed);
-
-// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
-const Code<Message Function(int count, int count2)>
- codeTooManyArgumentsCouldBeNamed =
- const Code<Message Function(int count, int count2)>(
- "TooManyArgumentsCouldBeNamed", templateTooManyArgumentsCouldBeNamed,
- analyzerCode: "EXTRA_POSITIONAL_ARGUMENTS_COULD_BE_NAMED",
- dart2jsCode: "*fatal*",
- severity: Severity.errorLegacyWarning);
-
-// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
-Message _withArgumentsTooManyArgumentsCouldBeNamed(int count, int count2) {
- return new Message(codeTooManyArgumentsCouldBeNamed,
- message:
- """Too many positional arguments: ${count} allowed, but ${count2} found.""",
- tip: """Try removing the extra positional arguments or specifying the name for named arguments.""",
- arguments: {'count': count, 'count2': count2});
-}
-
-// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const Code<Null> codeTopLevelOperator = messageTopLevelOperator;
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const MessageCode messageTopLevelOperator = const MessageCode(
"TopLevelOperator",
analyzerCode: "TOP_LEVEL_OPERATOR",
- dart2jsCode: "*fatal*",
message: r"""Operators must be declared within a class.""",
tip:
r"""Try removing the operator, moving it to a class, or converting it to be a function.""");
@@ -7047,30 +6965,27 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const MessageCode messageTypeAfterVar = const MessageCode("TypeAfterVar",
analyzerCode: "VAR_AND_TYPE",
- dart2jsCode: "EXTRANEOUS_MODIFIER",
message: r"""Can't have both a type and 'var'.""",
tip: r"""Try removing 'var.'""");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
-const Template<Message Function(String name, int count)>
- templateTypeArgumentMismatch =
- const Template<Message Function(String name, int count)>(
- messageTemplate: r"""'#name' expects #count type arguments.""",
+const Template<Message Function(int count)> templateTypeArgumentMismatch =
+ const Template<Message Function(int count)>(
+ messageTemplate: r"""Expected #count type arguments.""",
withArguments: _withArgumentsTypeArgumentMismatch);
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
-const Code<Message Function(String name, int count)> codeTypeArgumentMismatch =
- const Code<Message Function(String name, int count)>(
+const Code<Message Function(int count)> codeTypeArgumentMismatch =
+ const Code<Message Function(int count)>(
"TypeArgumentMismatch", templateTypeArgumentMismatch,
analyzerCode: "WRONG_NUMBER_OF_TYPE_ARGUMENTS",
- dart2jsCode: "*fatal*",
severity: Severity.errorLegacyWarning);
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
-Message _withArgumentsTypeArgumentMismatch(String name, int count) {
+Message _withArgumentsTypeArgumentMismatch(int count) {
return new Message(codeTypeArgumentMismatch,
- message: """'${name}' expects ${count} type arguments.""",
- arguments: {'name': name, 'count': count});
+ message: """Expected ${count} type arguments.""",
+ arguments: {'count': count});
}
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -7087,7 +7002,6 @@
const Code<Message Function(String name)>(
"TypeArgumentsOnTypeVariable", templateTypeArgumentsOnTypeVariable,
analyzerCode: "TYPE_ARGUMENTS_ON_TYPE_VARIABLE",
- dart2jsCode: "*fatal*",
severity: Severity.errorLegacyWarning);
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -7108,9 +7022,7 @@
const Code<Message Function(String name)> codeTypeNotFound =
const Code<Message Function(String name)>(
"TypeNotFound", templateTypeNotFound,
- analyzerCode: "UNDEFINED_CLASS",
- dart2jsCode: "*fatal*",
- severity: Severity.errorLegacyWarning);
+ analyzerCode: "UNDEFINED_CLASS", severity: Severity.errorLegacyWarning);
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsTypeNotFound(String name) {
@@ -7126,7 +7038,6 @@
const MessageCode messageTypeVariableDuplicatedName = const MessageCode(
"TypeVariableDuplicatedName",
analyzerCode: "DUPLICATE_DEFINITION",
- dart2jsCode: "*fatal*",
message: r"""A type variable can't have the same name as another.""");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -7150,38 +7061,14 @@
}
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
-const Template<
- Message Function(
- String name,
- DartType
- _type)> templateTypeVariableInConstExpression = const Template<
- Message Function(String name, DartType _type)>(
- messageTemplate:
- r"""Type variable '#name' can't be used as a constant expression '#type'.""",
- withArguments: _withArgumentsTypeVariableInConstExpression);
+const Code<Null> codeTypeVariableInConstantContext =
+ messageTypeVariableInConstantContext;
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
-const Code<Message Function(String name, DartType _type)>
- codeTypeVariableInConstExpression =
- const Code<Message Function(String name, DartType _type)>(
- "TypeVariableInConstExpression", templateTypeVariableInConstExpression,
- analyzerCode: "TYPE_PARAMETER_IN_CONST_EXPRESSION",
- dart2jsCode: "*fatal*",
- severity: Severity.error);
-
-// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
-Message _withArgumentsTypeVariableInConstExpression(
- String name, DartType _type) {
- NameSystem nameSystem = new NameSystem();
- StringBuffer buffer = new StringBuffer();
- new Printer(buffer, syntheticNames: nameSystem).writeNode(_type);
- String type = '$buffer';
-
- return new Message(codeTypeVariableInConstExpression,
- message:
- """Type variable '${name}' can't be used as a constant expression '${type}'.""",
- arguments: {'name': name, 'type': _type});
-}
+const MessageCode messageTypeVariableInConstantContext = const MessageCode(
+ "TypeVariableInConstantContext",
+ analyzerCode: "TYPE_PARAMETER_IN_CONST_EXPRESSION",
+ message: r"""Type variables can't be used as constants.""");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const Code<Null> codeTypeVariableInStaticContext =
@@ -7191,7 +7078,6 @@
const MessageCode messageTypeVariableInStaticContext = const MessageCode(
"TypeVariableInStaticContext",
analyzerCode: "TYPE_PARAMETER_REFERENCED_BY_STATIC",
- dart2jsCode: "*fatal*",
severity: Severity.errorLegacyWarning,
message: r"""Type variables can't be used in static members.""");
@@ -7203,7 +7089,6 @@
const MessageCode messageTypeVariableSameNameAsEnclosing = const MessageCode(
"TypeVariableSameNameAsEnclosing",
analyzerCode: "CONFLICTING_TYPE_VARIABLE_AND_CLASS",
- dart2jsCode: "*fatal*",
message:
r"""A type variable can't have the same name as its enclosing declaration.""");
@@ -7213,7 +7098,6 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const MessageCode messageTypedefInClass = const MessageCode("TypedefInClass",
analyzerCode: "TYPEDEF_IN_CLASS",
- dart2jsCode: "*fatal*",
message: r"""Typedefs can't be declared inside classes.""",
tip: r"""Try moving the typedef to the top-level.""");
@@ -7224,7 +7108,6 @@
const MessageCode messageTypedefNotFunction = const MessageCode(
"TypedefNotFunction",
analyzerCode: "INVALID_GENERIC_FUNCTION_TYPE",
- dart2jsCode: "*fatal*",
message: r"""Can't create typedef from non-function type.""");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -7244,12 +7127,13 @@
const Code<Message Function(String name, DartType _type)> codeUndefinedGetter =
const Code<Message Function(String name, DartType _type)>(
"UndefinedGetter", templateUndefinedGetter,
- analyzerCode: "UNDEFINED_GETTER", dart2jsCode: "*ignored*");
+ analyzerCode: "UNDEFINED_GETTER");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsUndefinedGetter(String name, DartType _type) {
NameSystem nameSystem = new NameSystem();
- StringBuffer buffer = new StringBuffer();
+ StringBuffer buffer;
+ buffer = new StringBuffer();
new Printer(buffer, syntheticNames: nameSystem).writeNode(_type);
String type = '$buffer';
@@ -7278,12 +7162,13 @@
const Code<Message Function(String name, DartType _type)> codeUndefinedMethod =
const Code<Message Function(String name, DartType _type)>(
"UndefinedMethod", templateUndefinedMethod,
- analyzerCode: "UNDEFINED_METHOD", dart2jsCode: "*ignored*");
+ analyzerCode: "UNDEFINED_METHOD");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsUndefinedMethod(String name, DartType _type) {
NameSystem nameSystem = new NameSystem();
- StringBuffer buffer = new StringBuffer();
+ StringBuffer buffer;
+ buffer = new StringBuffer();
new Printer(buffer, syntheticNames: nameSystem).writeNode(_type);
String type = '$buffer';
@@ -7312,12 +7197,13 @@
const Code<Message Function(String name, DartType _type)> codeUndefinedSetter =
const Code<Message Function(String name, DartType _type)>(
"UndefinedSetter", templateUndefinedSetter,
- analyzerCode: "UNDEFINED_SETTER", dart2jsCode: "*ignored*");
+ analyzerCode: "UNDEFINED_SETTER");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsUndefinedSetter(String name, DartType _type) {
NameSystem nameSystem = new NameSystem();
- StringBuffer buffer = new StringBuffer();
+ StringBuffer buffer;
+ buffer = new StringBuffer();
new Printer(buffer, syntheticNames: nameSystem).writeNode(_type);
String type = '$buffer';
@@ -7336,7 +7222,6 @@
const MessageCode messageUnexpectedDollarInString = const MessageCode(
"UnexpectedDollarInString",
analyzerCode: "UNEXPECTED_DOLLAR_IN_STRING",
- dart2jsCode: "MALFORMED_STRING_LITERAL",
message:
r"""A '$' has special meaning inside a string, and must be followed by an identifier or an expression in curly braces ({}).""",
tip: r"""Try adding a backslash (\) to escape the '$'.""");
@@ -7351,7 +7236,7 @@
const Code<Message Function(Token token)> codeUnexpectedToken =
const Code<Message Function(Token token)>(
"UnexpectedToken", templateUnexpectedToken,
- analyzerCode: "UNEXPECTED_TOKEN", dart2jsCode: "*fatal*");
+ analyzerCode: "UNEXPECTED_TOKEN");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsUnexpectedToken(Token token) {
@@ -7372,7 +7257,7 @@
const Code<Message Function(String string, Token token)> codeUnmatchedToken =
const Code<Message Function(String string, Token token)>(
"UnmatchedToken", templateUnmatchedToken,
- analyzerCode: "EXPECTED_TOKEN", dart2jsCode: "UNMATCHED_TOKEN");
+ analyzerCode: "EXPECTED_TOKEN");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsUnmatchedToken(String string, Token token) {
@@ -7385,33 +7270,30 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const Template<
Message Function(
- Token token,
- Token
- token2)> templateUnresolvedPrefixInTypeAnnotation = const Template<
- Message Function(Token token, Token token2)>(
+ String name,
+ String
+ name2)> templateUnresolvedPrefixInTypeAnnotation = const Template<
+ Message Function(String name, String name2)>(
messageTemplate:
- r"""'#lexeme.#lexeme2' can't be used as a type because '#lexeme' isn't defined.""",
+ r"""'#name.#name2' can't be used as a type because '#name' isn't defined.""",
withArguments: _withArgumentsUnresolvedPrefixInTypeAnnotation);
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
-const Code<Message Function(Token token, Token token2)>
+const Code<Message Function(String name, String name2)>
codeUnresolvedPrefixInTypeAnnotation =
- const Code<Message Function(Token token, Token token2)>(
+ const Code<Message Function(String name, String name2)>(
"UnresolvedPrefixInTypeAnnotation",
templateUnresolvedPrefixInTypeAnnotation,
analyzerCode: "NOT_A_TYPE",
- dart2jsCode: "*ignored*",
severity: Severity.errorLegacyWarning);
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsUnresolvedPrefixInTypeAnnotation(
- Token token, Token token2) {
- String lexeme = token.lexeme;
- String lexeme2 = token2.lexeme;
+ String name, String name2) {
return new Message(codeUnresolvedPrefixInTypeAnnotation,
message:
- """'${lexeme}.${lexeme2}' can't be used as a type because '${lexeme}' isn't defined.""",
- arguments: {'token': token, 'token2': token2});
+ """'${name}.${name2}' can't be used as a type because '${name}' isn't defined.""",
+ arguments: {'name': name, 'name2': name2});
}
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -7423,8 +7305,9 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const Code<Message Function(String string)> codeUnspecified =
const Code<Message Function(String string)>(
- "Unspecified", templateUnspecified,
- dart2jsCode: "GENERIC");
+ "Unspecified",
+ templateUnspecified,
+);
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsUnspecified(String string) {
@@ -7442,7 +7325,7 @@
const Code<Message Function(Token token)> codeUnsupportedOperator =
const Code<Message Function(Token token)>(
"UnsupportedOperator", templateUnsupportedOperator,
- analyzerCode: "UNSUPPORTED_OPERATOR", dart2jsCode: "*ignored*");
+ analyzerCode: "UNSUPPORTED_OPERATOR");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsUnsupportedOperator(Token token) {
@@ -7459,7 +7342,6 @@
const MessageCode messageUnsupportedPrefixPlus = const MessageCode(
"UnsupportedPrefixPlus",
analyzerCode: "MISSING_IDENTIFIER",
- dart2jsCode: "UNSUPPORTED_PREFIX_PLUS",
message: r"""'+' is not a prefix operator.""",
tip: r"""Try removing '+'.""");
@@ -7470,7 +7352,6 @@
const MessageCode messageUnterminatedComment = const MessageCode(
"UnterminatedComment",
analyzerCode: "UNTERMINATED_MULTI_LINE_COMMENT",
- dart2jsCode: "UNTERMINATED_COMMENT",
message: r"""Comment starting with '/*' must end with '*/'.""");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -7486,8 +7367,7 @@
codeUnterminatedString =
const Code<Message Function(String string, String string2)>(
"UnterminatedString", templateUnterminatedString,
- analyzerCode: "UNTERMINATED_STRING_LITERAL",
- dart2jsCode: "UNTERMINATED_STRING");
+ analyzerCode: "UNTERMINATED_STRING_LITERAL");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsUnterminatedString(String string, String string2) {
@@ -7500,10 +7380,8 @@
const Code<Null> codeUnterminatedToken = messageUnterminatedToken;
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
-const MessageCode messageUnterminatedToken = const MessageCode(
- "UnterminatedToken",
- dart2jsCode: "UNTERMINATED_TOKEN",
- message: r"""Incomplete token.""");
+const MessageCode messageUnterminatedToken =
+ const MessageCode("UnterminatedToken", message: r"""Incomplete token.""");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const Template<Message Function(String name)>
@@ -7530,7 +7408,6 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const MessageCode messageVarReturnType = const MessageCode("VarReturnType",
analyzerCode: "VAR_RETURN_TYPE",
- dart2jsCode: "EXTRANEOUS_MODIFIER",
message: r"""The return type can't be 'var'.""",
tip:
r"""Try removing the keyword 'var', or replacing it with the name of the return type.""");
@@ -7541,8 +7418,6 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const MessageCode messageVoidExpression = const MessageCode("VoidExpression",
analyzerCode: "USE_OF_VOID_RESULT",
- dart2jsCode: "*fatal*",
- severity: Severity.warning,
message: r"""This expression has type 'void' and can't be used.""");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -7562,10 +7437,9 @@
const Code<Message Function(String string, String string2)>
codeWebLiteralCannotBeRepresentedExactly =
const Code<Message Function(String string, String string2)>(
- "WebLiteralCannotBeRepresentedExactly",
- templateWebLiteralCannotBeRepresentedExactly,
- dart2jsCode: "*fatal*",
- severity: Severity.error);
+ "WebLiteralCannotBeRepresentedExactly",
+ templateWebLiteralCannotBeRepresentedExactly,
+);
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsWebLiteralCannotBeRepresentedExactly(
@@ -7584,7 +7458,6 @@
const MessageCode messageWithBeforeExtends = const MessageCode(
"WithBeforeExtends",
analyzerCode: "WITH_BEFORE_EXTENDS",
- dart2jsCode: "*ignored*",
message: r"""The extends clause must be before the with clause.""",
tip: r"""Try moving the extends clause before the with clause.""");
@@ -7595,7 +7468,6 @@
const MessageCode messageWithWithoutExtends = const MessageCode(
"WithWithoutExtends",
analyzerCode: "WITH_WITHOUT_EXTENDS",
- dart2jsCode: "GENERIC",
message: r"""The with clause can't be used without an extends clause.""",
tip: r"""Try adding an extends clause such as 'extends Object'.""");
@@ -7606,7 +7478,6 @@
const MessageCode messageYieldAsIdentifier = const MessageCode(
"YieldAsIdentifier",
analyzerCode: "ASYNC_KEYWORD_USED_AS_IDENTIFIER",
- dart2jsCode: "*fatal*",
message:
r"""'yield' can't be used as an identifier in 'async', 'async*', or 'sync*' methods.""");
@@ -7617,5 +7488,4 @@
const MessageCode messageYieldNotGenerator = const MessageCode(
"YieldNotGenerator",
analyzerCode: "YIELD_IN_NON_GENERATOR",
- dart2jsCode: "*ignored*",
message: r"""'yield' can only be used in 'sync*' or 'async*' methods.""");
diff --git a/pkg/front_end/lib/src/fasta/identifiers.dart b/pkg/front_end/lib/src/fasta/identifiers.dart
new file mode 100644
index 0000000..64af67b
--- /dev/null
+++ b/pkg/front_end/lib/src/fasta/identifiers.dart
@@ -0,0 +1,144 @@
+// 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.
+
+library fasta.qualified_name;
+
+import 'package:kernel/ast.dart' show Expression;
+
+import 'problems.dart' show unhandled, unsupported;
+
+import 'scanner.dart' show Token;
+
+class Identifier {
+ final String name;
+ final int charOffset;
+
+ Identifier(Token token)
+ : name = token.lexeme,
+ charOffset = token.charOffset;
+
+ Identifier._(this.name, this.charOffset);
+
+ factory Identifier.preserveToken(Token token) {
+ return new _TokenIdentifier(token);
+ }
+
+ Expression get initializer => null;
+
+ QualifiedName withQualifier(Object qualifier) {
+ return new QualifiedName._(qualifier, name, charOffset);
+ }
+
+ @override
+ String toString() => "identifier($name)";
+}
+
+class _TokenIdentifier implements Identifier {
+ final Token token;
+
+ _TokenIdentifier(this.token);
+
+ @override
+ String get name => token.lexeme;
+
+ @override
+ int get charOffset => token.charOffset;
+
+ @override
+ Expression get initializer => null;
+
+ @override
+ QualifiedName withQualifier(Object qualifier) {
+ return new _TokenQualifiedName(qualifier, token);
+ }
+
+ @override
+ String toString() => "token-identifier($name)";
+}
+
+class InitializedIdentifier extends _TokenIdentifier {
+ @override
+ final Expression initializer;
+
+ InitializedIdentifier(_TokenIdentifier identifier, this.initializer)
+ : super(identifier.token);
+
+ @override
+ QualifiedName withQualifier(Object qualifier) {
+ return unsupported("withQualifier", charOffset, null);
+ }
+
+ @override
+ String toString() => "initialized-identifier($name, $initializer)";
+}
+
+class QualifiedName extends Identifier {
+ final Object qualifier;
+
+ QualifiedName(this.qualifier, Token suffix) : super(suffix);
+
+ QualifiedName._(this.qualifier, String name, int charOffset)
+ : super._(name, charOffset);
+
+ @override
+ QualifiedName withQualifier(Object qualifier) {
+ return unsupported("withQualifier", charOffset, null);
+ }
+
+ @override
+ String toString() => "qualified-name($qualifier, $name)";
+}
+
+class _TokenQualifiedName extends _TokenIdentifier implements QualifiedName {
+ @override
+ final Object qualifier;
+
+ _TokenQualifiedName(this.qualifier, Token suffix)
+ : assert(qualifier is! Identifier || qualifier is _TokenIdentifier),
+ super(suffix);
+
+ @override
+ QualifiedName withQualifier(Object qualifier) {
+ return unsupported("withQualifier", charOffset, null);
+ }
+
+ @override
+ String toString() => "token-qualified-name($qualifier, $name)";
+}
+
+void flattenQualifiedNameOn(
+ QualifiedName name, StringBuffer buffer, int charOffset, Uri fileUri) {
+ final Object qualifier = name.qualifier;
+ if (qualifier is QualifiedName) {
+ flattenQualifiedNameOn(qualifier, buffer, charOffset, fileUri);
+ } else if (qualifier is Identifier) {
+ buffer.write(qualifier.name);
+ } else if (qualifier is String) {
+ buffer.write(qualifier);
+ } else {
+ unhandled("${qualifier.runtimeType}", "flattenQualifiedNameOn", charOffset,
+ fileUri);
+ }
+ buffer.write(".");
+ buffer.write(name.name);
+}
+
+String flattenName(Object name, int charOffset, Uri fileUri) {
+ if (name is String) {
+ return name;
+ } else if (name is QualifiedName) {
+ StringBuffer buffer = new StringBuffer();
+ flattenQualifiedNameOn(name, buffer, charOffset, fileUri);
+ return "$buffer";
+ } else if (name is Identifier) {
+ return name.name;
+ } else {
+ unhandled("${name.runtimeType}", "flattenName", charOffset, fileUri);
+ }
+}
+
+Token deprecated_extractToken(Identifier identifier) {
+ _TokenIdentifier tokenIdentifier = identifier;
+ return tokenIdentifier?.token;
+}
diff --git a/pkg/front_end/lib/src/fasta/incremental_compiler.dart b/pkg/front_end/lib/src/fasta/incremental_compiler.dart
index 399112b..f9a4ca8 100644
--- a/pkg/front_end/lib/src/fasta/incremental_compiler.dart
+++ b/pkg/front_end/lib/src/fasta/incremental_compiler.dart
@@ -86,13 +86,20 @@
List<LibraryBuilder> platformBuilders;
Map<Uri, LibraryBuilder> userBuilders;
final Uri initializeFromDillUri;
+ Component componentToInitializeFrom;
bool initializedFromDill = false;
bool hasToCheckPackageUris = false;
KernelIncrementalTarget userCode;
+ IncrementalCompiler.fromComponent(
+ this.context, Component this.componentToInitializeFrom)
+ : ticker = context.options.ticker,
+ initializeFromDillUri = null;
+
IncrementalCompiler(this.context, [this.initializeFromDillUri])
- : ticker = context.options.ticker;
+ : ticker = context.options.ticker,
+ componentToInitializeFrom = null;
@override
Future<Component> computeDelta(
@@ -142,6 +149,8 @@
null);
}
}
+ } else if (componentToInitializeFrom != null) {
+ initializeFromComponent(summaryBytes, uriTranslator, c, data);
}
appendLibraries(data, bytesLength);
@@ -171,9 +180,19 @@
}
Set<Uri> invalidatedUris = this.invalidatedUris.toSet();
- if (data.includeUserLoadedLibraries || fullComponent) {
+ if ((data.includeUserLoadedLibraries &&
+ componentToInitializeFrom ==
+ null) // when loading state from component no need to invalidate anything
+ ||
+ fullComponent) {
invalidatedUris.add(entryPoint);
}
+ if (componentToInitializeFrom != null) {
+ // Once compiler was initialized from component, no need to skip logic
+ // above that adds entryPoint to invalidatedUris for successive
+ // [computeDelta] calls.
+ componentToInitializeFrom = null;
+ }
ClassHierarchy hierarchy = userCode?.loader?.hierarchy;
Set<LibraryBuilder> notReusedLibraries;
@@ -222,6 +241,9 @@
for (LibraryBuilder library in reusedLibraries) {
userCode.loader.builders[library.uri] = library;
+ if (entryPoint == library.uri) {
+ userCode.loader.first = library;
+ }
if (library.uri.scheme == "dart" && library.uri.path == "core") {
userCode.loader.coreLibrary = library;
}
@@ -411,6 +433,43 @@
return bytesLength;
}
+ // This procedure will set up compiler from [componentToInitializeFrom].
+ void initializeFromComponent(
+ List<int> summaryBytes,
+ UriTranslator uriTranslator,
+ CompilerContext c,
+ IncrementalCompilerData data) {
+ ticker.logMs("Read initializeFromComponent");
+
+ // [libraries] and [uriToSource] from [componentToInitializeFrom] take
+ // precedence over what was already read into [data.component]. Assumption
+ // is that [data.component] is initialized with standard prebuilt various
+ // platform libraries.
+ List<Library> combinedLibs = <Library>[];
+ Set<Uri> readLibs =
+ componentToInitializeFrom.libraries.map((lib) => lib.fileUri).toSet();
+ combinedLibs.addAll(componentToInitializeFrom.libraries);
+ for (Library lib in data.component.libraries) {
+ if (!readLibs.contains(lib.fileUri)) {
+ combinedLibs.add(lib);
+ }
+ }
+ Map<Uri, Source> combinedMaps = new Map<Uri, Source>();
+ combinedMaps.addAll(componentToInitializeFrom.uriToSource);
+ Set<Uri> uris = combinedMaps.keys.toSet();
+ for (MapEntry<Uri, Source> entry in data.component.uriToSource.entries) {
+ if (!uris.contains(entry.key)) {
+ combinedMaps[entry.key] = entry.value;
+ }
+ }
+
+ data.component =
+ new Component(libraries: combinedLibs, uriToSource: combinedMaps)
+ ..mainMethod = componentToInitializeFrom.mainMethod;
+ data.userLoadedUriMain = data.component.mainMethod;
+ data.includeUserLoadedLibraries = true;
+ }
+
void appendLibraries(IncrementalCompilerData data, int bytesLength) {
if (data.component != null) {
dillLoadedData.loader
@@ -469,10 +528,10 @@
combinators ??= <Combinator>[];
combinators.add(combinator.isShow
- ? new Combinator.show(null, combinator.names,
- combinator.fileOffset, library.fileUri)
- : new Combinator.hide(null, combinator.names,
- combinator.fileOffset, library.fileUri));
+ ? new Combinator.show(
+ combinator.names, combinator.fileOffset, library.fileUri)
+ : new Combinator.hide(
+ combinator.names, combinator.fileOffset, library.fileUri));
}
debugLibrary.addImport(
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 4be50c6..20d6978 100644
--- a/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
@@ -114,8 +114,6 @@
import 'kernel_builder.dart';
-import 'kernel_expression_generator.dart' show KernelNonLValueGenerator;
-
import 'type_algorithms.dart' show calculateBounds;
// TODO(ahe): Remove this and ensure all nodes have a location.
@@ -203,9 +201,9 @@
int functionNestingLevel = 0;
- Statement compileTimeErrorInTry;
+ Statement problemInTry;
- Statement compileTimeErrorInLoopOrSwitch;
+ Statement problemInLoopOrSwitch;
Scope switchScope;
@@ -304,10 +302,10 @@
} else if (node is Expression) {
return node;
} else if (node is SuperInitializer) {
- return new SyntheticExpressionJudgment(buildCompileTimeError(
- fasta.messageSuperAsExpression, node.fileOffset, noLength));
+ return buildProblem(
+ fasta.messageSuperAsExpression, node.fileOffset, noLength);
} else if (node is ProblemBuilder) {
- return buildProblemExpression(node, -1, noLength);
+ return buildProblem(node.message, node.charOffset, noLength);
} else {
return unhandled("${node.runtimeType}", "toValue", -1, uri);
}
@@ -364,7 +362,7 @@
for (Statement statement in target.users) {
statement.parent.replaceChild(
statement,
- wrapInCompileTimeErrorStatement(statement,
+ wrapInProblemStatement(statement,
fasta.templateLabelNotFound.withArguments(name)));
}
} else {
@@ -383,19 +381,19 @@
int offset = variable.fileOffset;
Message message = template.withArguments(name);
if (variable.initializer == null) {
- variable.initializer = new SyntheticExpressionJudgment(
- buildCompileTimeError(message, offset, name.length, context: context))
- ..parent = variable;
+ variable.initializer =
+ buildProblem(message, offset, name.length, context: context)
+ ..parent = variable;
} else {
- variable.initializer = wrapInLocatedCompileTimeError(
+ variable.initializer = wrapInLocatedProblem(
variable.initializer, message.withLocation(uri, offset, name.length),
context: context)
..parent = variable;
}
}
- void declareVariable(Object variable, Scope scope) {
- String name = forest.getVariableDeclarationName(variable);
+ void declareVariable(VariableDeclaration variable, Scope scope) {
+ String name = variable.name;
Declaration existing = scope.local[name];
if (existing != null) {
// This reports an error for duplicated declarations in the same scope:
@@ -409,7 +407,7 @@
return;
}
LocatedMessage context = scope.declare(
- forest.getVariableDeclarationName(variable),
+ variable.name,
new KernelVariableBuilder(
variable, member ?? classBuilder ?? library, uri),
uri);
@@ -440,7 +438,7 @@
@override
void endMetadata(Token beginToken, Token periodBeforeName, Token endToken) {
debugEvent("Metadata");
- Object arguments = pop();
+ Arguments arguments = pop();
pushQualifiedReference(beginToken.next, periodBeforeName);
if (arguments != null) {
push(arguments);
@@ -455,7 +453,9 @@
if (expression is Identifier) {
Identifier identifier = expression;
expression = new UnresolvedNameGenerator(
- this, identifier.token, new Name(identifier.name, library.library));
+ this,
+ deprecated_extractToken(identifier),
+ new Name(identifier.name, library.library));
}
if (name?.isNotEmpty ?? false) {
Token period = periodBeforeName ?? beginToken.next.next;
@@ -469,8 +469,8 @@
ConstantContext savedConstantContext = pop();
if (expression is! StaticAccessGenerator) {
- push(wrapInCompileTimeError(
- toValue(expression), fasta.messageExpressionNotMetadata));
+ push(wrapInProblem(
+ toValue(expression), fasta.messageExpressionNotMetadata, noLength));
} else {
push(toValue(expression));
}
@@ -531,7 +531,7 @@
}
}
pop(); // Type.
- List<Object> annotations = pop();
+ List<Expression> annotations = pop();
if (annotations != null) {
_typeInferrer.inferMetadata(this, annotations);
Field field = fields.first.target;
@@ -574,10 +574,8 @@
if (member is KernelConstructorBuilder) {
if (member.isConst &&
(classBuilder.cls.superclass?.isMixinApplication ?? false)) {
- addCompileTimeError(
- fasta.messageConstConstructorInSubclassOfMixinApplication,
- member.charOffset,
- member.name.length);
+ addProblem(fasta.messageConstConstructorInSubclassOfMixinApplication,
+ member.charOffset, member.name.length);
}
if (member.formals != null) {
for (KernelFormalParameterBuilder formal in member.formals) {
@@ -585,10 +583,11 @@
Initializer initializer;
if (member.isExternal) {
initializer = buildInvalidInitializer(
- buildCompileTimeError(
- fasta.messageExternalConstructorWithFieldInitializers,
- formal.charOffset,
- formal.name.length),
+ buildProblem(
+ fasta.messageExternalConstructorWithFieldInitializers,
+ formal.charOffset,
+ formal.name.length)
+ .desugared,
formal.charOffset);
} else {
initializer = buildFieldInitializer(true, formal.name,
@@ -644,8 +643,8 @@
Initializer initializer;
if (node is Initializer) {
initializer = node;
- } else if (node is DelayedAssignment) {
- initializer = node.buildFieldInitializer();
+ } else if (node is Generator) {
+ initializer = node.buildFieldInitializer(initializedFields);
} else if (node is ConstructorInvocation) {
initializer = buildSuperInitializer(
false, node.target, node.arguments, token.charOffset);
@@ -653,7 +652,7 @@
Expression value = toValue(node);
if (node is! Throw) {
value =
- wrapInCompileTimeError(value, fasta.messageExpectedAnInitializer);
+ wrapInProblem(value, fasta.messageExpectedAnInitializer, noLength);
}
initializer = buildInvalidInitializer(node, token.charOffset);
}
@@ -661,7 +660,7 @@
if (member is KernelConstructorBuilder && !member.isExternal) {
member.addInitializer(initializer, this);
} else {
- addCompileTimeError(
+ addProblem(
fasta.templateInitializerOutsideConstructor
.withArguments(member.name),
token.charOffset,
@@ -680,7 +679,7 @@
@override
void finishFunction(
- List<Object> annotations,
+ List<Expression> annotations,
FormalParameters<Expression, Statement, Arguments> formals,
AsyncMarker asyncModifier,
Statement body) {
@@ -724,17 +723,14 @@
// Future<T> <: [returnType] for every T, we rely on Future<Bot> and
// transitivity of the subtyping relation because Future<Bot> <: Future<T>
// for every T.
- bool Function(DartType, DartType) isSubtypeOf = (DartType subtype,
- DartType supertype) =>
- _typeInferrer.typeSchemaEnvironment.isSubtypeOf(subtype, supertype);
- // Determine whether there is a problem. We use [problem == null] to
- // signal success.
+ // We use [problem == null] to signal success.
Message problem;
switch (asyncModifier) {
case AsyncMarker.Async:
DartType futureBottomType = library.loader.futureOfBottom;
- if (!isSubtypeOf(futureBottomType, returnType)) {
+ if (!_typeInferrer.typeSchemaEnvironment
+ .isSubtypeOf(futureBottomType, returnType)) {
problem = fasta.messageIllegalAsyncReturnType;
}
break;
@@ -743,7 +739,8 @@
DartType streamBottomType = library.loader.streamOfBottom;
if (returnType is VoidType) {
problem = fasta.messageIllegalAsyncGeneratorVoidReturnType;
- } else if (!isSubtypeOf(streamBottomType, returnType)) {
+ } else if (!_typeInferrer.typeSchemaEnvironment
+ .isSubtypeOf(streamBottomType, returnType)) {
problem = fasta.messageIllegalAsyncGeneratorReturnType;
}
break;
@@ -752,7 +749,8 @@
DartType iterableBottomType = library.loader.iterableOfBottom;
if (returnType is VoidType) {
problem = fasta.messageIllegalSyncGeneratorVoidReturnType;
- } else if (!isSubtypeOf(iterableBottomType, returnType)) {
+ } else if (!_typeInferrer.typeSchemaEnvironment
+ .isSubtypeOf(iterableBottomType, returnType)) {
problem = fasta.messageIllegalSyncGeneratorReturnType;
}
break;
@@ -800,7 +798,7 @@
statements.add(body);
body = forest.block(null, statements, null)..fileOffset = charOffset;
}
- body = wrapInCompileTimeErrorStatement(
+ body = wrapInProblemStatement(
body, fasta.messageSetterWithWrongNumberOfFormals);
}
}
@@ -812,8 +810,8 @@
builder.body = body;
} else {
if (body != null) {
- builder.body = wrapInCompileTimeErrorStatement(
- body, fasta.messageExternalMethodWithBody);
+ builder.body =
+ wrapInProblemStatement(body, fasta.messageExternalMethodWithBody);
}
}
Member target = builder.target;
@@ -854,16 +852,16 @@
name += ".${initialTarget.name.name}";
}
// TODO(dmitryas): Report this error earlier.
- replacementNode = buildCompileTimeError(
- fasta.templateCyclicRedirectingFactoryConstructors
- .withArguments(initialTarget.name.name),
- initialTarget.fileOffset,
- name.length);
+ replacementNode = buildProblem(
+ fasta.templateCyclicRedirectingFactoryConstructors
+ .withArguments(initialTarget.name.name),
+ initialTarget.fileOffset,
+ name.length)
+ .desugared;
} else if (resolvedTarget is Constructor &&
resolvedTarget.enclosingClass.isAbstract) {
replacementNode = evaluateArgumentsBefore(
- forest.arguments(
- invocation.arguments.positional, noLocation, noLocation,
+ forest.arguments(invocation.arguments.positional, null,
types: invocation.arguments.types,
named: invocation.arguments.named),
buildAbstractClassInstantiationError(
@@ -884,8 +882,7 @@
throwNoSuchMethodError(
forest.literalNull(null)..fileOffset = invocation.fileOffset,
errorName,
- forest.arguments(
- invocation.arguments.positional, noLocation, noLocation,
+ forest.arguments(invocation.arguments.positional, null,
types: invocation.arguments.types,
named: invocation.arguments.named),
initialTarget.fileOffset));
@@ -903,8 +900,7 @@
replacementNode = buildStaticInvocation(
resolvedTarget,
- forest.arguments(
- invocation.arguments.positional, noLocation, noLocation,
+ forest.arguments(invocation.arguments.positional, null,
types: invocation.arguments.types,
named: invocation.arguments.named),
constness: invocation.isConst
@@ -1000,7 +996,7 @@
Token eof = token.next;
if (!eof.isEof) {
- expression = wrapInLocatedCompileTimeError(
+ expression = wrapInLocatedProblem(
expression,
fasta.messageExpectedOneExpression
.withLocation(uri, eof.charOffset, eof.length));
@@ -1033,8 +1029,7 @@
// TODO(ahe): Change this to a null check.
int offset = builder.body?.fileOffset ?? builder.charOffset;
constructor.initializers.add(buildInvalidInitializer(
- buildCompileTimeErrorExpression(
- fasta.messageConstructorNotSync, offset),
+ buildProblem(fasta.messageConstructorNotSync, offset, noLength),
offset));
}
if (needsImplicitSuperInitializer) {
@@ -1043,7 +1038,7 @@
/// >unless the enclosing class is class Object.
Constructor superTarget = lookupConstructor(emptyName, isSuper: true);
Initializer initializer;
- Arguments arguments = forest.argumentsEmpty(noLocation, noLocation);
+ Arguments arguments = forest.argumentsEmpty(noLocation);
if (superTarget == null ||
checkArgumentsForFunction(superTarget.function, arguments,
builder.charOffset, const <TypeParameter>[]) !=
@@ -1054,11 +1049,12 @@
length = (constructor.parent as Class).name.length;
}
initializer = buildInvalidInitializer(
- buildCompileTimeError(
- fasta.templateSuperclassHasNoDefaultConstructor
- .withArguments(superclass),
- builder.charOffset,
- length),
+ buildProblem(
+ fasta.templateSuperclassHasNoDefaultConstructor
+ .withArguments(superclass),
+ builder.charOffset,
+ length)
+ .desugared,
builder.charOffset);
} else {
initializer = buildSuperInitializer(
@@ -1085,8 +1081,7 @@
@override
void endArguments(int count, Token beginToken, Token endToken) {
debugEvent("Arguments");
- List<Object> arguments =
- new List<Object>.filled(count, null, growable: true);
+ List<Object> arguments = new List<Object>(count);
popList(count, arguments);
int firstNamedArgumentIndex = arguments.length;
for (int i = 0; i < arguments.length; i++) {
@@ -1098,14 +1093,11 @@
Expression argument = toValue(node);
arguments[i] = argument;
if (i > firstNamedArgumentIndex) {
- arguments[i] = new NamedExpressionJudgment(
- tokensSaver?.namedExpressionTokens(null, null),
- '#$i',
- buildCompileTimeErrorExpression(
- fasta.messageExpectedNamedArgument,
- forest.readOffset(argument)),
- originalValue: argument)
- ..fileOffset = offsetForToken(beginToken);
+ arguments[i] = new NamedExpression(
+ "#$i",
+ buildProblem(fasta.messageExpectedNamedArgument,
+ forest.readOffset(argument), noLength))
+ ..fileOffset = beginToken.charOffset;
}
}
}
@@ -1114,12 +1106,11 @@
arguments.getRange(0, firstNamedArgumentIndex));
List<NamedExpression> named = new List<NamedExpression>.from(
arguments.getRange(firstNamedArgumentIndex, arguments.length));
- push(forest.arguments(positional, beginToken, endToken, named: named));
+ push(forest.arguments(positional, beginToken, named: named));
} else {
// TODO(kmillikin): Find a way to avoid allocating a second list in the
// case where there were no named arguments, which is a common one.
- push(forest.arguments(
- new List<Expression>.from(arguments), beginToken, endToken));
+ push(forest.arguments(new List<Expression>.from(arguments), beginToken));
}
}
@@ -1139,7 +1130,7 @@
@override
void handleSend(Token beginToken, Token endToken) {
debugEvent("Send");
- ArgumentsJudgment arguments = pop();
+ Arguments arguments = pop();
List<DartType> typeArguments = pop();
Object receiver = pop();
if (arguments != null && typeArguments != null) {
@@ -1164,7 +1155,7 @@
}
@override
- finishSend(Object receiver, ArgumentsJudgment arguments, int charOffset) {
+ finishSend(Object receiver, Arguments arguments, int charOffset) {
if (receiver is Generator) {
return receiver.doInvocation(charOffset, arguments);
} else {
@@ -1255,15 +1246,11 @@
negate = true;
}
if (!isBinaryOperator(operator) && !isMinusOperator(operator)) {
- return buildCompileTimeErrorExpression(
- fasta.templateInvalidOperator.withArguments(token), token.charOffset,
- length: token.length);
+ return buildProblem(fasta.templateInvalidOperator.withArguments(token),
+ token.charOffset, token.length);
} else {
- Expression result = buildMethodInvocation(
- a,
- new Name(operator),
- forest.arguments(<Expression>[b], noLocation, noLocation),
- token.charOffset,
+ Expression result = buildMethodInvocation(a, new Name(operator),
+ forest.arguments(<Expression>[b], noLocation), token.charOffset,
// This *could* be a constant expression, we can't know without
// evaluating [a] and [b].
isConstantExpression: !isSuper,
@@ -1306,9 +1293,8 @@
} else {
pop();
token = token.next;
- Message message = fasta.templateExpectedIdentifier.withArguments(token);
- push(new SyntheticExpressionJudgment(buildCompileTimeError(
- message, offsetForToken(token), lengthForToken(token))));
+ push(buildProblem(fasta.templateExpectedIdentifier.withArguments(token),
+ offsetForToken(token), lengthForToken(token)));
}
}
@@ -1320,9 +1306,8 @@
} else {
pop();
token = token.next;
- Message message = fasta.templateExpectedIdentifier.withArguments(token);
- push(new SyntheticExpressionJudgment(buildCompileTimeError(
- message, offsetForToken(token), lengthForToken(token))));
+ push(buildProblem(fasta.templateExpectedIdentifier.withArguments(token),
+ offsetForToken(token), lengthForToken(token)));
}
}
@@ -1386,8 +1371,8 @@
// TODO(ahe): Use [error] below instead of building a compile-time error,
// should be:
// return library.loader.throwCompileConstantError(error, charOffset);
- return buildCompileTimeError(message, charOffset, noLength,
- context: context);
+ return buildProblem(message, charOffset, noLength, context: context)
+ .desugared;
} else {
Expression error = library.loader.instantiateNoSuchMethodError(
receiver, name, forest.castArguments(arguments), charOffset,
@@ -1458,7 +1443,7 @@
@override
void warnTypeArgumentsMismatch(String name, int expected, int charOffset) {
addProblemErrorIfConst(
- fasta.templateTypeArgumentMismatch.withArguments(name, expected),
+ fasta.templateTypeArgumentMismatch.withArguments(expected),
charOffset,
name.length);
}
@@ -1577,10 +1562,10 @@
}
} else if (constantContext != ConstantContext.none &&
!context.allowedInConstantExpression) {
- addCompileTimeError(
+ addProblem(
fasta.messageNotAConstantExpression, token.charOffset, token.length);
}
- push(new Identifier(token));
+ push(new Identifier.preserveToken(token));
}
/// Look up [name] in [scope] using [token] as location information (both to
@@ -1631,7 +1616,7 @@
if (constantContext != ConstantContext.none &&
declaration.isTypeVariable &&
!member.isConstructor) {
- addCompileTimeError(
+ addProblem(
fasta.messageNotAConstantExpression, charOffset, token.length);
}
return new TypeUseGenerator(this, token, declaration, name);
@@ -1639,7 +1624,7 @@
if (constantContext != ConstantContext.none &&
!declaration.isConst &&
!member.isConstructor) {
- addCompileTimeError(
+ addProblem(
fasta.messageNotAConstantExpression, charOffset, token.length);
}
// An initializing formal parameter might be final without its
@@ -1667,7 +1652,7 @@
// semantics, such parameters introduces a new parameter with that
// name that should be resolved here.
!member.isConstructor) {
- addCompileTimeError(
+ addProblem(
fasta.messageNotAConstantExpression, charOffset, token.length);
}
Name n = new Name(name, library.library);
@@ -1708,7 +1693,7 @@
if (!(readTarget is Field && readTarget.isConst ||
// Static tear-offs are also compile time constants.
readTarget is Procedure)) {
- addCompileTimeError(
+ addProblem(
fasta.messageNotAConstantExpression, charOffset, token.length);
}
}
@@ -1719,9 +1704,9 @@
@override
void handleQualified(Token period) {
debugEvent("Qualified");
- Identifier name = pop();
- Object receiver = pop();
- push([receiver, name]);
+ Identifier identifier = pop();
+ Object qualifier = pop();
+ push(identifier.withQualifier(qualifier));
}
@override
@@ -1744,9 +1729,8 @@
String value = unescapeString(token.lexeme, token, this);
push(forest.literalString(value, token));
} else {
- Object count = 1 + interpolationCount * 2;
- List<Object> parts =
- popList(count, new List<Object>.filled(count, null, growable: true));
+ int count = 1 + interpolationCount * 2;
+ List<Object> parts = popList(count, new List<Object>(count));
Token first = parts.first;
Token last = parts.last;
Quote quote = analyzeQuote(first.lexeme);
@@ -1849,15 +1833,11 @@
bool hasExpression, Token beginToken, Token endToken) {
debugEvent("ReturnStatement");
Expression expression = hasExpression ? popForValue() : null;
- var statement = forest.returnStatement(beginToken, expression, endToken);
if (expression != null && inConstructor) {
- Expression error = buildCompileTimeError(
- fasta.messageConstructorWithReturnType,
- beginToken.charOffset,
- lengthForToken(beginToken));
- push(new InvalidStatementJudgment(error, statement));
+ push(buildProblemStatement(
+ fasta.messageConstructorWithReturnType, beginToken.charOffset));
} else {
- push(statement);
+ push(forest.returnStatement(beginToken, expression, endToken));
}
}
@@ -1902,17 +1882,17 @@
// silent if the next token is `in`. Since a for-in loop can only have
// one variable it must be followed by `in`.
if (isConst) {
- initializer = buildCompileTimeErrorExpression(
+ initializer = buildProblem(
fasta.templateConstFieldWithoutInitializer
.withArguments(token.lexeme),
token.charOffset,
- length: token.length);
+ token.length);
} else if (isFinal) {
- initializer = buildCompileTimeErrorExpression(
+ initializer = buildProblem(
fasta.templateFinalFieldWithoutInitializer
.withArguments(token.lexeme),
token.charOffset,
- length: token.length);
+ token.length);
}
}
pushNewLocalVariable(initializer);
@@ -1925,12 +1905,12 @@
bool isFinal = (currentLocalVariableModifiers & finalMask) != 0;
assert(isConst == (constantContext == ConstantContext.inferred));
push(new VariableDeclarationJudgment(identifier.name, functionNestingLevel,
- forSyntheticToken: identifier.token.isSynthetic,
+ forSyntheticToken: deprecated_extractToken(identifier).isSynthetic,
initializer: initializer,
type: currentLocalVariableType,
isFinal: isFinal,
isConst: isConst)
- ..fileOffset = offsetForToken(identifier.token)
+ ..fileOffset = identifier.charOffset
..fileEqualsOffset = offsetForToken(equalsToken));
}
@@ -2042,15 +2022,14 @@
void handleAssignmentExpression(Token token) {
debugEvent("AssignmentExpression");
Expression value = popForValue();
- Object lhs = pop();
- Generator generator;
- if (lhs is Generator) {
- generator = lhs;
+ Object generator = pop();
+ if (generator is! Generator) {
+ push(buildProblem(fasta.messageNotAnLvalue, offsetForToken(token),
+ lengthForToken(token)));
} else {
- generator = new KernelNonLValueGenerator(this, token, lhs);
+ push(new DelayedAssignment(
+ this, token, generator, value, token.stringValue));
}
- push(new DelayedAssignment(
- this, token, generator, value, token.stringValue));
}
@override
@@ -2066,9 +2045,9 @@
}
void exitLoopOrSwitch(Statement statement) {
- if (compileTimeErrorInLoopOrSwitch != null) {
- push(compileTimeErrorInLoopOrSwitch);
- compileTimeErrorInLoopOrSwitch = null;
+ if (problemInLoopOrSwitch != null) {
+ push(problemInLoopOrSwitch);
+ problemInLoopOrSwitch = null;
} else {
push(statement);
}
@@ -2169,16 +2148,16 @@
int count, Token leftBracket, Token constKeyword, Token rightBracket) {
debugEvent("LiteralList");
List<Expression> expressions = popListForValue(count);
- Object typeArguments = pop();
+ List<DartType> typeArguments = pop();
DartType typeArgument;
if (typeArguments != null) {
- if (forest.getTypeCount(typeArguments) > 1) {
+ if (typeArguments.length > 1) {
addProblem(
fasta.messageListLiteralTooManyTypeArguments,
offsetForToken(leftBracket),
lengthOfSpan(leftBracket, leftBracket.endGroup));
} else {
- typeArgument = forest.getTypeAt(typeArguments, 0);
+ typeArgument = typeArguments.single;
if (library.loader.target.strongMode) {
typeArgument =
instantiateToBounds(typeArgument, coreTypes.objectClass);
@@ -2219,20 +2198,21 @@
void handleLiteralMap(
int count, Token leftBrace, Token constKeyword, Token rightBrace) {
debugEvent("LiteralMap");
- List<Object> entries = forest.mapEntryList(count);
+ List<MapEntry> entries =
+ new List<MapEntry>.filled(count, null, growable: true);
popList(count, entries);
- Object typeArguments = pop();
+ List<DartType> typeArguments = pop();
DartType keyType;
DartType valueType;
if (typeArguments != null) {
- if (forest.getTypeCount(typeArguments) != 2) {
+ if (typeArguments.length != 2) {
addProblem(
fasta.messageMapLiteralTypeArgumentMismatch,
offsetForToken(leftBrace),
lengthOfSpan(leftBrace, leftBrace.endGroup));
} else {
- keyType = forest.getTypeAt(typeArguments, 0);
- valueType = forest.getTypeAt(typeArguments, 1);
+ keyType = typeArguments[0];
+ valueType = typeArguments[1];
if (library.loader.target.strongMode) {
keyType = instantiateToBounds(keyType, coreTypes.objectClass);
valueType = instantiateToBounds(valueType, coreTypes.objectClass);
@@ -2294,19 +2274,16 @@
debugEvent("Type");
List<DartType> arguments = pop();
Object name = pop();
- if (name is List<Object>) {
- List<Object> list = name;
- if (list.length != 2) {
- unexpected("${list.length}", "2", beginToken.charOffset, uri);
- }
- Object prefix = list[0];
- Identifier suffix = list[1];
+ if (name is QualifiedName) {
+ QualifiedName qualified = name;
+ Object prefix = qualified.qualifier;
+ Token suffix = deprecated_extractToken(qualified);
if (prefix is Generator) {
- name = prefix.prefixedLookup(suffix.token);
+ name = prefix.qualifiedLookup(suffix);
} else {
- String displayName = debugName(getNodeName(prefix), suffix.name);
+ String displayName = debugName(getNodeName(prefix), suffix.lexeme);
addProblem(fasta.templateNotAType.withArguments(displayName),
- offsetForToken(beginToken), lengthOfSpan(beginToken, suffix.token));
+ offsetForToken(beginToken), lengthOfSpan(beginToken, suffix));
push(const InvalidType());
return;
}
@@ -2327,7 +2304,7 @@
debugEvent("beginFunctionType");
}
- void enterFunctionTypeScope(List<Object> typeVariables) {
+ void enterFunctionTypeScope(List<KernelTypeVariableBuilder> typeVariables) {
debugEvent("enterFunctionTypeScope");
enterLocalScope(null,
scope.createNestedScope("function-type scope", isModifiable: true));
@@ -2341,12 +2318,10 @@
if (existing == null) {
scopeBuilder.addMember(name, builder);
} else {
- addCompileTimeError(fasta.templateDuplicatedName.withArguments(name),
+ addProblem(fasta.templateDuplicatedName.withArguments(name),
builder.charOffset, name.length);
- addCompileTimeError(
- fasta.templateDuplicatedNameCause.withArguments(name),
- existing.charOffset,
- name.length);
+ addProblem(fasta.templateDuplicatedNameCause.withArguments(name),
+ existing.charOffset, name.length);
}
}
}
@@ -2377,15 +2352,16 @@
debugEvent("AsOperator");
DartType type = pop();
Expression expression = popForValue();
- Expression error;
if (constantContext != ConstantContext.none) {
- error = buildCompileTimeError(
- fasta.templateNotConstantExpression.withArguments('As expression'),
- operator.charOffset,
- operator.length);
+ push(buildProblem(
+ fasta.templateNotConstantExpression
+ .withArguments('As expression'),
+ operator.charOffset,
+ operator.length)
+ .desugared);
+ } else {
+ push(forest.asExpression(expression, type, operator));
}
- push(
- forest.asExpression(expression, type, operator, desugaredError: error));
}
@override
@@ -2401,10 +2377,12 @@
type, functionNestingLevel);
}
if (constantContext != ConstantContext.none) {
- push(buildCompileTimeError(
- fasta.templateNotConstantExpression.withArguments('Is expression'),
- isOperator.charOffset,
- isOperator.length));
+ push(buildProblem(
+ fasta.templateNotConstantExpression
+ .withArguments('Is expression'),
+ isOperator.charOffset,
+ isOperator.length)
+ .desugared);
} else {
push(isExpression);
}
@@ -2444,10 +2422,11 @@
Expression error;
if (constantContext != ConstantContext.none) {
- error = buildCompileTimeError(
- fasta.templateNotConstantExpression.withArguments('Throw'),
- throwToken.offset,
- throwToken.length);
+ error = buildProblem(
+ fasta.templateNotConstantExpression.withArguments('Throw'),
+ throwToken.offset,
+ throwToken.length)
+ .desugared;
}
push(new ThrowJudgment(tokensSaver?.throwTokens(throwToken), expression,
@@ -2463,13 +2442,8 @@
}
@override
- void endFormalParameter(
- Token thisKeyword,
- Token periodAfterThis,
- Token nameToken,
- FormalParameterKind kind,
- MemberKind memberKind,
- Token endToken) {
+ void endFormalParameter(Token thisKeyword, Token periodAfterThis,
+ Token nameToken, FormalParameterKind kind, MemberKind memberKind) {
debugEvent("FormalParameter");
if (thisKeyword != null) {
if (!inConstructor) {
@@ -2501,19 +2475,30 @@
member.fileUri);
} else {
variable = formal.build(library);
- variable.initializer = name.initializer;
+ if (member is KernelRedirectingFactoryBuilder &&
+ name.initializer != null) {
+ KernelRedirectingFactoryBuilder factory = member;
+ addProblem(
+ fasta.templateDefaultValueInRedirectingFactoryConstructor
+ .withArguments(factory.redirectionTarget.fullNameForErrors),
+ name.initializer.fileOffset,
+ noLength);
+ } else {
+ variable.initializer = name.initializer;
+ }
}
} else {
variable = new VariableDeclarationJudgment(
name?.name, functionNestingLevel,
- forSyntheticToken: name?.token?.isSynthetic ?? false,
+ forSyntheticToken:
+ deprecated_extractToken(name)?.isSynthetic ?? false,
type: type,
initializer: name?.initializer,
isFinal: isFinal,
isConst: isConst);
if (name != null) {
// TODO(ahe): Need an offset when name is null.
- variable.fileOffset = offsetForToken(name.token);
+ variable.fileOffset = name.charOffset;
}
}
if (annotations != null) {
@@ -2534,7 +2519,7 @@
FormalParameterKind kind = optional("{", beginToken)
? FormalParameterKind.optionalNamed
: FormalParameterKind.optionalPositional;
- Object variables =
+ List<VariableDeclaration> variables =
new List<VariableDeclaration>.filled(count, null, growable: true);
popList(count, variables);
push(new OptionalFormals(kind, variables));
@@ -2581,7 +2566,7 @@
debugEvent("ValuedFormalParameter");
Expression initializer = popForValue();
Identifier name = pop();
- push(new InitializedIdentifier(name.token, initializer));
+ push(new InitializedIdentifier(name, initializer));
}
@override
@@ -2648,22 +2633,22 @@
}
FormalParameters<Expression, Statement, Arguments> catchParameters =
popIfNotNull(catchKeyword);
- Object type = popIfNotNull(onKeyword);
- Object exception;
- Object stackTrace;
+ DartType type = popIfNotNull(onKeyword) ?? const DynamicType();
+ VariableDeclaration exception;
+ VariableDeclaration stackTrace;
if (catchParameters != null) {
int requiredCount = catchParameters.required.length;
if ((requiredCount == 1 || requiredCount == 2) &&
catchParameters.optional == null) {
exception = catchParameters.required[0];
- forest.setParameterType(exception, type);
+ exception.type = type;
if (requiredCount == 2) {
stackTrace = catchParameters.required[1];
- forest.setParameterType(
- stackTrace, coreTypes.stackTraceClass.rawType);
+ stackTrace.type = coreTypes.stackTraceClass.rawType;
}
} else {
- buildCompileTimeError(fasta.messageInvalidCatchArguments,
+ // TODO(ahe): We're not storing this error in the AST.
+ buildProblem(fasta.messageInvalidCatchArguments,
catchParameters.charOffset, catchParameters.charLength);
var allFormals = <VariableDeclaration>[];
@@ -2675,12 +2660,11 @@
var allCount = allFormals.length;
if (allCount >= 1) {
exception = allFormals[0];
- forest.setParameterType(exception, type);
+ exception.type = type;
}
if (allCount >= 2) {
stackTrace = allFormals[1];
- forest.setParameterType(
- stackTrace, coreTypes.stackTraceClass.rawType);
+ stackTrace.type = coreTypes.stackTraceClass.rawType;
}
}
}
@@ -2691,15 +2675,15 @@
@override
void endTryStatement(int catchCount, Token tryKeyword, Token finallyKeyword) {
Statement finallyBlock = popStatementIfNotNull(finallyKeyword);
- Object catches = popList(
+ List<Catch> catches = popList(
catchCount, new List<Catch>.filled(catchCount, null, growable: true));
Statement tryBlock = popStatement();
- if (compileTimeErrorInTry == null) {
+ if (problemInTry == null) {
push(forest.tryStatement(
tryKeyword, tryBlock, catches, finallyKeyword, finallyBlock));
} else {
- push(compileTimeErrorInTry);
- compileTimeErrorInTry = null;
+ push(problemInTry);
+ problemInTry = null;
}
}
@@ -2719,13 +2703,12 @@
push(new SuperIndexedAccessGenerator(
this,
openSquareBracket,
- closeSquareBracket,
index,
lookupInstanceMember(indexGetName, isSuper: true),
lookupInstanceMember(indexSetName, isSuper: true)));
} else {
- push(IndexedAccessGenerator.make(this, openSquareBracket,
- closeSquareBracket, toValue(receiver), index, null, null));
+ push(IndexedAccessGenerator.make(
+ this, openSquareBracket, toValue(receiver), index, null, null));
}
}
@@ -2761,7 +2744,7 @@
}
}
push(buildMethodInvocation(receiverValue, new Name(operator),
- forest.argumentsEmpty(noLocation, noLocation), token.charOffset,
+ forest.argumentsEmpty(noLocation), token.charOffset,
// This *could* be a constant expression, we can't know without
// evaluating [receiver].
isConstantExpression: !isSuper,
@@ -2778,29 +2761,27 @@
@override
void handleUnaryPrefixAssignmentExpression(Token token) {
debugEvent("UnaryPrefixAssignmentExpression");
- Object target = pop();
- Generator generator;
- if (target is Generator) {
- generator = target;
+ Object generator = pop();
+ if (generator is Generator) {
+ push(generator.buildPrefixIncrement(incrementOperator(token),
+ offset: token.charOffset));
} else {
- generator = new KernelNonLValueGenerator(this, token, toValue(target));
+ push(wrapInProblem(
+ toValue(generator), fasta.messageNotAnLvalue, noLength));
}
- push(generator.buildPrefixIncrement(incrementOperator(token),
- offset: token.charOffset));
}
@override
void handleUnaryPostfixAssignmentExpression(Token token) {
debugEvent("UnaryPostfixAssignmentExpression");
- Object target = pop();
- Generator generator;
- if (target is Generator) {
- generator = target;
+ Object generator = pop();
+ if (generator is Generator) {
+ push(new DelayedPostfixIncrement(
+ this, token, generator, incrementOperator(token), null));
} else {
- generator = new KernelNonLValueGenerator(this, token, toValue(target));
+ push(wrapInProblem(
+ toValue(generator), fasta.messageNotAnLvalue, noLength));
}
- push(new DelayedPostfixIncrement(
- this, token, generator, incrementOperator(token), null));
}
@override
@@ -2848,17 +2829,21 @@
Identifier identifier;
List<DartType> typeArguments = pop();
Object type = pop();
- if (type is List<Object>) {
- List<Object> list = type;
- Object prefix = list[0];
- identifier = list[1];
- if (prefix is TypeUseGenerator) {
- type = prefix;
- } else if (prefix is Generator) {
- type = prefix.prefixedLookup(identifier.token);
+ if (type is QualifiedName) {
+ identifier = type;
+ QualifiedName qualified = type;
+ Object qualifier = qualified.qualifier;
+ if (qualifier is TypeUseGenerator) {
+ type = qualifier;
+ if (typeArguments != null) {
+ addProblem(fasta.messageConstructorWithTypeArguments,
+ identifier.charOffset, identifier.name.length);
+ }
+ } else if (qualifier is Generator) {
+ type = qualifier.qualifiedLookup(deprecated_extractToken(identifier));
identifier = null;
} else {
- unhandled("${prefix.runtimeType}", "pushQualifiedReference",
+ unhandled("${qualifier.runtimeType}", "pushQualifiedReference",
start.charOffset, uri);
}
}
@@ -2879,7 +2864,7 @@
}
@override
- Expression buildStaticInvocation(Member target, ArgumentsJudgment arguments,
+ Expression buildStaticInvocation(Member target, Arguments arguments,
{Constness constness: Constness.implicit,
int charOffset: -1,
int charLength: noLength,
@@ -2921,10 +2906,12 @@
isConst || constantContext != ConstantContext.none && target.isConst;
if ((isConst || constantContext == ConstantContext.inferred) &&
!target.isConst) {
- var error = buildCompileTimeError(
- fasta.messageNonConstConstructor, charOffset, charLength);
return new InvalidConstructorInvocationJudgment(
- error, target, arguments);
+ buildProblem(
+ fasta.messageNonConstConstructor, charOffset, charLength)
+ .desugared,
+ target,
+ arguments);
}
return new ConstructorInvocationJudgment(
target, forest.castArguments(arguments),
@@ -2937,10 +2924,11 @@
constantContext != ConstantContext.none && procedure.isConst;
if ((isConst || constantContext == ConstantContext.inferred) &&
!procedure.isConst) {
- var error = buildCompileTimeError(
- fasta.messageNonConstFactory, charOffset, charLength);
return new InvalidConstructorInvocationJudgment(
- error, target, arguments);
+ buildProblem(fasta.messageNonConstFactory, charOffset, charLength)
+ .desugared,
+ target,
+ arguments);
}
return new FactoryConstructorInvocationJudgment(
target, forest.castArguments(arguments),
@@ -2956,31 +2944,21 @@
}
@override
- LocatedMessage checkArgumentsForFunction(
- FunctionNode function,
- ArgumentsJudgment arguments,
- int offset,
- List<TypeParameter> typeParameters) {
+ LocatedMessage checkArgumentsForFunction(FunctionNode function,
+ Arguments arguments, int offset, List<TypeParameter> typeParameters) {
if (forest.argumentsPositional(arguments).length <
function.requiredParameterCount) {
- var argsOffset = arguments.fileOffset;
- var argsLength = arguments.fileEndOffset - argsOffset;
return fasta.templateTooFewArguments
.withArguments(function.requiredParameterCount,
forest.argumentsPositional(arguments).length)
- .withLocation(uri, argsOffset, argsLength);
+ .withLocation(uri, arguments.fileOffset, noLength);
}
if (forest.argumentsPositional(arguments).length >
function.positionalParameters.length) {
- var argsOffset = arguments.fileOffset;
- var argsLength = arguments.fileEndOffset - argsOffset;
- var template = function.namedParameters.isNotEmpty
- ? fasta.templateTooManyArgumentsCouldBeNamed
- : fasta.templateTooManyArguments;
- return template
+ return fasta.templateTooManyArguments
.withArguments(function.positionalParameters.length,
forest.argumentsPositional(arguments).length)
- .withLocation(uri, argsOffset, argsLength);
+ .withLocation(uri, arguments.fileOffset, noLength);
}
List<Object> named = forest.argumentsNamed(arguments);
if (named.isNotEmpty) {
@@ -2995,13 +2973,20 @@
}
}
- List<Object> types = forest.argumentsTypeArguments(arguments);
+ List<DartType> types = forest.argumentsTypeArguments(arguments);
if (typeParameters.length != types.length) {
- // TODO(paulberry): Report error in this case as well,
- // after https://github.com/dart-lang/sdk/issues/32130 is fixed.
- types.clear();
- for (int i = 0; i < typeParameters.length; i++) {
- types.add(const DynamicType());
+ if (types.length == 0) {
+ // Expected `typeParameters.length` type arguments, but none given,
+ // so we fill in dynamic.
+ for (int i = 0; i < typeParameters.length; i++) {
+ types.add(const DynamicType());
+ }
+ } else {
+ // A wrong (non-zero) amount of type arguments given. That's an error.
+ // TODO(jensj): Position should be on type arguments instead.
+ return fasta.templateTypeArgumentMismatch
+ .withArguments(typeParameters.length)
+ .withLocation(uri, offset, noLength);
}
}
@@ -3010,27 +2995,20 @@
@override
LocatedMessage checkArgumentsForType(
- FunctionType function, ArgumentsJudgment arguments, int offset) {
+ FunctionType function, Arguments arguments, int offset) {
if (forest.argumentsPositional(arguments).length <
function.requiredParameterCount) {
- var argsOffset = arguments.fileOffset;
- var argsLength = arguments.fileEndOffset - argsOffset;
return fasta.templateTooFewArguments
.withArguments(function.requiredParameterCount,
forest.argumentsPositional(arguments).length)
- .withLocation(uri, argsOffset, argsLength);
+ .withLocation(uri, arguments.fileOffset, noLength);
}
if (forest.argumentsPositional(arguments).length >
function.positionalParameters.length) {
- var argsOffset = arguments.fileOffset;
- var argsLength = arguments.fileEndOffset - argsOffset;
- var template = function.namedParameters.isNotEmpty
- ? fasta.templateTooManyArgumentsCouldBeNamed
- : fasta.templateTooManyArguments;
- return template
+ return fasta.templateTooManyArguments
.withArguments(function.positionalParameters.length,
forest.argumentsPositional(arguments).length)
- .withLocation(uri, argsOffset, argsLength);
+ .withLocation(uri, arguments.fileOffset, noLength);
}
List<Object> named = forest.argumentsNamed(arguments);
if (named.isNotEmpty) {
@@ -3044,6 +3022,15 @@
}
}
}
+ List<Object> types = forest.argumentsTypeArguments(arguments);
+ List<TypeParameter> typeParameters = function.typeParameters;
+ if (typeParameters.length != types.length && types.length != 0) {
+ // A wrong (non-zero) amount of type arguments given. That's an error.
+ // TODO(jensj): Position should be on type arguments instead.
+ return fasta.templateTypeArgumentMismatch
+ .withArguments(typeParameters.length)
+ .withLocation(uri, offset, noLength);
+ }
return null;
}
@@ -3053,7 +3040,7 @@
debugEvent("beginNewExpression");
super.push(constantContext);
if (constantContext != ConstantContext.none) {
- addCompileTimeError(
+ addProblem(
fasta.templateNotConstantExpression.withArguments('New expression'),
token.charOffset,
token.length);
@@ -3100,7 +3087,8 @@
Token nameToken, int offset, Constness constness) {
Arguments arguments = pop();
Identifier nameLastIdentifier = pop(NullValue.Identifier);
- Token nameLastToken = nameLastIdentifier?.token ?? nameToken;
+ Token nameLastToken =
+ deprecated_extractToken(nameLastIdentifier) ?? nameToken;
String name = pop();
List<DartType> typeArguments = pop();
@@ -3138,9 +3126,8 @@
int charOffset,
Constness constness) {
if (arguments == null) {
- return buildCompileTimeErrorExpression(
- fasta.messageMissingArgumentList, nameToken.charOffset,
- length: nameToken.length);
+ return buildProblem(fasta.messageMissingArgumentList,
+ nameToken.charOffset, nameToken.length);
}
if (typeArguments != null) {
@@ -3151,9 +3138,8 @@
String errorName;
if (type is ClassBuilder<TypeBuilder, Object>) {
if (type is EnumBuilder<TypeBuilder, Object>) {
- return buildCompileTimeErrorExpression(
- fasta.messageEnumInstantiation, nameToken.charOffset,
- length: nameToken.length);
+ return buildProblem(fasta.messageEnumInstantiation,
+ nameToken.charOffset, nameToken.length);
}
Declaration b =
type.findConstructorOrFactory(name, charOffset, uri, library);
@@ -3188,7 +3174,7 @@
target.function.typeParameters.length !=
forest.argumentsTypeArguments(arguments).length) {
arguments = forest.arguments(
- forest.argumentsPositional(arguments), noLocation, noLocation,
+ forest.argumentsPositional(arguments), null,
named: forest.argumentsNamed(arguments),
types: new List<DartType>.filled(
target.function.typeParameters.length, const DynamicType(),
@@ -3275,17 +3261,18 @@
Expression value = popForValue();
Identifier identifier = pop();
push(new NamedExpressionJudgment(
- tokensSaver?.namedExpressionTokens(identifier.token, colon),
- identifier.token.lexeme,
+ tokensSaver?.namedExpressionTokens(
+ deprecated_extractToken(identifier), colon),
+ identifier.name,
value)
- ..fileOffset = offsetForToken(identifier.token));
+ ..fileOffset = identifier.charOffset);
}
@override
void endFunctionName(Token beginToken, Token token) {
debugEvent("FunctionName");
Identifier name = pop();
- Token nameToken = name.token;
+ Token nameToken = deprecated_extractToken(name);
VariableDeclaration variable = new VariableDeclarationJudgment(
name.name, functionNestingLevel,
forSyntheticToken: nameToken.isSynthetic,
@@ -3293,10 +3280,8 @@
isLocalFunction: true)
..fileOffset = offsetForToken(nameToken);
if (scope.local[variable.name] != null) {
- addCompileTimeError(
- fasta.templateDuplicatedName.withArguments(variable.name),
- offsetForToken(nameToken),
- nameToken.length);
+ addProblem(fasta.templateDuplicatedName.withArguments(variable.name),
+ name.charOffset, nameToken.length);
}
push(new FunctionDeclarationJudgment(
variable,
@@ -3320,7 +3305,7 @@
functionNestingLevel--;
inCatchBlock = pop();
switchScope = pop();
- List<Object> typeVariables = pop();
+ List<KernelTypeVariableBuilder> typeVariables = pop();
exitLocalScope();
push(typeVariables ?? NullValue.TypeVariables);
}
@@ -3334,7 +3319,7 @@
@override
void beginNamedFunctionExpression(Token token) {
debugEvent("beginNamedFunctionExpression");
- List<Object> typeVariables = pop();
+ List<KernelTypeVariableBuilder> typeVariables = pop();
// Create an additional scope in which the named function expression is
// declared.
enterLocalScope("named function");
@@ -3354,8 +3339,8 @@
exitLocalScope();
FormalParameters<Expression, Statement, Arguments> formals = pop();
Object declaration = pop();
- Object returnType = pop();
- Object hasImplicitReturnType = returnType == null;
+ DartType returnType = pop();
+ bool hasImplicitReturnType = returnType == null;
returnType ??= const DynamicType();
exitFunction();
List<TypeParameter> typeParameters = typeVariableBuildersToKernel(pop());
@@ -3452,9 +3437,8 @@
..fileOffset = beginToken.charOffset
..fileEndOffset = token.charOffset);
if (constantContext != ConstantContext.none) {
- push(buildCompileTimeErrorExpression(
- fasta.messageNotAConstantExpression, formals.charOffset,
- length: formals.charLength));
+ push(buildProblem(fasta.messageNotAConstantExpression, formals.charOffset,
+ formals.charLength));
} else {
push(new FunctionExpressionJudgment(function)
..fileOffset = offsetForToken(beginToken));
@@ -3517,8 +3501,8 @@
declaresVariable = true;
variable = lvalue;
if (variable.isConst) {
- addCompileTimeError(fasta.messageForInLoopWithConstVariable,
- variable.fileOffset, variable.name.length);
+ addProblem(fasta.messageForInLoopWithConstVariable, variable.fileOffset,
+ variable.name.length);
}
} else if (lvalue is Generator) {
/// We are in this case, where `lvalue` isn't a [VariableDeclaration]:
@@ -3546,8 +3530,7 @@
: fasta.messageForInLoopNotAssignable;
Token token = forToken.next.next;
variable = new VariableDeclaration.forValue(
- new SyntheticExpressionJudgment(buildCompileTimeError(
- message, offsetForToken(token), lengthForToken(token))));
+ buildProblem(message, offsetForToken(token), lengthForToken(token)));
}
Statement result = new ForInJudgment(
tokensSaver?.forInStatementTokens(awaitToken, forToken, leftParenthesis,
@@ -3571,20 +3554,20 @@
void handleLabel(Token token) {
debugEvent("Label");
Identifier identifier = pop();
- push(forest.label(identifier.token, token));
+ push(new Label(identifier.name, identifier.charOffset));
}
@override
void beginLabeledStatement(Token token, int labelCount) {
debugEvent("beginLabeledStatement");
- List<Object> labels =
- new List<Object>.filled(labelCount, null, growable: true);
+ List<Label> labels =
+ new List<Label>.filled(labelCount, null, growable: true);
popList(labelCount, labels);
enterLocalScope(null, scope.createNestedLabelScope());
LabelTarget target =
new LabelTarget(labels, member, functionNestingLevel, token.charOffset);
- for (Object label in labels) {
- scope.declareLabel(forest.getLabelName(label), target);
+ for (Label label in labels) {
+ scope.declareLabel(label.name, target);
}
push(target);
}
@@ -3616,8 +3599,9 @@
debugEvent("RethrowStatement");
var error = inCatchBlock
? null
- : buildCompileTimeError(fasta.messageRethrowNotCatch,
- offsetForToken(rethrowToken), lengthForToken(rethrowToken));
+ : buildProblem(fasta.messageRethrowNotCatch,
+ offsetForToken(rethrowToken), lengthForToken(rethrowToken))
+ .desugared;
push(new ExpressionStatementJudgment(
new RethrowJudgment(tokensSaver?.rethrowTokens(rethrowToken), error)
..fileOffset = offsetForToken(rethrowToken),
@@ -3680,9 +3664,8 @@
case Assert.Expression:
// The parser has already reported an error indicating that assert
// cannot be used in an expression.
- push(buildCompileTimeErrorExpression(
- fasta.messageAssertAsExpression, assertKeyword.offset,
- length: assertKeyword.length));
+ push(buildProblem(fasta.messageAssertAsExpression, assertKeyword.offset,
+ assertKeyword.length));
break;
case Assert.Initializer:
@@ -3709,14 +3692,13 @@
@override
void beginSwitchCase(int labelCount, int expressionCount, Token firstToken) {
debugEvent("beginSwitchCase");
- Object count = labelCount + expressionCount;
- List<Object> labelsAndExpressions =
- popList(count, new List<Object>.filled(count, null, growable: true));
- List<Object> labels = <Object>[];
+ int count = labelCount + expressionCount;
+ List<Object> labelsAndExpressions = popList(count, new List<Object>(count));
+ List<Label> labels = <Label>[];
List<Expression> expressions = <Expression>[];
if (labelsAndExpressions != null) {
for (Object labelOrExpression in labelsAndExpressions) {
- if (forest.isLabel(labelOrExpression)) {
+ if (labelOrExpression is Label) {
labels.add(labelOrExpression);
} else {
expressions.add(labelOrExpression);
@@ -3724,15 +3706,15 @@
}
}
assert(scope == switchScope);
- for (Object label in labels) {
- String labelName = forest.getLabelName(label);
+ for (Label label in labels) {
+ String labelName = label.name;
if (scope.hasLocalLabel(labelName)) {
// TODO(ahe): Should validate this is a goto target.
if (!scope.claimLabel(labelName)) {
- addCompileTimeError(
+ addProblem(
fasta.templateDuplicateLabelInSwitchStatement
.withArguments(labelName),
- forest.getLabelOffset(label),
+ label.charOffset,
labelName.length);
}
} else {
@@ -3759,7 +3741,7 @@
// check this switch case to see if it falls through to the next case.
Statement block = popBlock(statementCount, firstToken, null);
exitLocalScope();
- List<Object> labels = pop();
+ List<Label> labels = pop();
List<Expression> expressions = pop();
List<int> expressionOffsets = <int>[];
for (Expression expression in expressions) {
@@ -3805,10 +3787,10 @@
List<SwitchCase> cases =
new List<SwitchCase>.filled(caseCount, null, growable: true);
for (int i = caseCount - 1; i >= 0; i--) {
- List<Object> labels = pop();
+ List<Label> labels = pop();
SwitchCase current = cases[i] = pop();
- for (Object label in labels) {
- JumpTarget target = switchScope.lookupLabel(forest.getLabelName(label));
+ for (Label label in labels) {
+ JumpTarget target = switchScope.lookupLabel(label.name);
if (target != null) {
target.resolveGotos(forest, current);
}
@@ -3862,19 +3844,19 @@
target = scope.lookupLabel(name);
}
if (target == null && name == null) {
- push(compileTimeErrorInLoopOrSwitch = buildCompileTimeErrorStatement(
+ push(problemInLoopOrSwitch = buildProblemStatement(
fasta.messageBreakOutsideOfLoop, breakKeyword.charOffset));
} else if (target == null ||
target is! JumpTarget ||
!target.isBreakTarget) {
Token labelToken = breakKeyword.next;
- push(compileTimeErrorInLoopOrSwitch = buildCompileTimeErrorStatement(
+ push(problemInLoopOrSwitch = buildProblemStatement(
fasta.templateInvalidBreakTarget.withArguments(name),
labelToken.charOffset,
length: labelToken.length));
} else if (target.functionNestingLevel != functionNestingLevel) {
Token labelToken = breakKeyword.next;
- push(compileTimeErrorInLoopOrSwitch = buildCompileTimeErrorStatement(
+ push(problemInLoopOrSwitch = buildProblemStatement(
fasta.templateBreakTargetOutsideFunction.withArguments(name),
labelToken.charOffset,
length: labelToken.length));
@@ -3899,7 +3881,7 @@
Declaration namedTarget = scope.lookupLabel(identifier.name);
if (namedTarget != null && namedTarget is! JumpTarget) {
Token labelToken = continueKeyword.next;
- push(compileTimeErrorInLoopOrSwitch = buildCompileTimeErrorStatement(
+ push(problemInLoopOrSwitch = buildProblemStatement(
fasta.messageContinueLabelNotTarget, labelToken.charOffset,
length: labelToken.length));
return;
@@ -3907,13 +3889,13 @@
target = namedTarget;
if (target == null) {
if (switchScope == null) {
- push(buildCompileTimeErrorStatement(
+ push(buildProblemStatement(
fasta.templateLabelNotFound.withArguments(name),
continueKeyword.next.charOffset));
return;
}
- switchScope.forwardDeclareLabel(identifier.name,
- target = createGotoTarget(offsetForToken(identifier.token)));
+ switchScope.forwardDeclareLabel(
+ identifier.name, target = createGotoTarget(identifier.charOffset));
}
if (target.isGotoTarget &&
target.functionNestingLevel == functionNestingLevel) {
@@ -3928,18 +3910,18 @@
}
}
if (target == null) {
- push(compileTimeErrorInLoopOrSwitch = buildCompileTimeErrorStatement(
+ push(problemInLoopOrSwitch = buildProblemStatement(
fasta.messageContinueWithoutLabelInCase, continueKeyword.charOffset,
length: continueKeyword.length));
} else if (!target.isContinueTarget) {
Token labelToken = continueKeyword.next;
- push(compileTimeErrorInLoopOrSwitch = buildCompileTimeErrorStatement(
+ push(problemInLoopOrSwitch = buildProblemStatement(
fasta.templateInvalidContinueTarget.withArguments(name),
labelToken.charOffset,
length: labelToken.length));
} else if (target.functionNestingLevel != functionNestingLevel) {
Token labelToken = continueKeyword.next;
- push(compileTimeErrorInLoopOrSwitch = buildCompileTimeErrorStatement(
+ push(problemInLoopOrSwitch = buildProblemStatement(
fasta.templateContinueTargetOutsideFunction.withArguments(name),
labelToken.charOffset,
length: labelToken.length));
@@ -3966,7 +3948,11 @@
// See the code that resolves them below.
new ClassMemberParser(listener)
.parseTypeVariablesOpt(new Token.eof(-1)..next = token);
- enterFunctionTypeScope(listener.pop());
+ List<Object> typeVariables = listener.pop();
+ if (typeVariables != null) {
+ typeVariables = new List<KernelTypeVariableBuilder>.from(typeVariables);
+ }
+ enterFunctionTypeScope(typeVariables);
// The invocation of [enterFunctionTypeScope] above has put the type
// variables into the scope, and now the possibly unresolved types from
@@ -3995,7 +3981,7 @@
// Something went wrong when pre-parsing the type variables.
// Assume an error is reported elsewhere.
variable = new KernelTypeVariableBuilder(
- name.name, library, offsetForToken(name.token), null);
+ name.name, library, name.charOffset, null);
variable.binder = _typeInferrer.binderForTypeVariable(
variable, variable.charOffset, variable.name);
}
@@ -4072,7 +4058,7 @@
}
List<TypeParameter> typeVariableBuildersToKernel(
- List<Object> typeVariableBuilders) {
+ List<KernelTypeVariableBuilder> typeVariableBuilders) {
if (typeVariableBuilders == null) return null;
List<TypeParameter> typeParameters = new List<TypeParameter>.filled(
typeVariableBuilders.length, null,
@@ -4090,77 +4076,55 @@
@override
void handleInvalidStatement(Token token, Message message) {
Statement statement = pop();
- var error = buildCompileTimeError(message, statement.fileOffset, noLength);
- push(new InvalidStatementJudgment(error, statement));
+ push(new InvalidStatementJudgment(
+ buildProblem(message, statement.fileOffset, noLength).desugared,
+ statement));
}
@override
- Expression buildCompileTimeError(Message message, int charOffset, int length,
+ SyntheticExpressionJudgment buildProblem(
+ Message message, int charOffset, int length,
{List<LocatedMessage> context}) {
- library.addCompileTimeError(message, charOffset, length, uri,
- wasHandled: true, context: context);
- return library.loader.throwCompileConstantError(
- library.loader.buildCompileTimeError(message, charOffset, length, uri));
- }
-
- @override
- Expression buildCompileTimeErrorExpression(Message message, int offset,
- {int length, Expression original}) {
- return new SyntheticExpressionJudgment(
- buildCompileTimeError(message, offset, length ?? noLength),
- original: original);
- }
-
- Expression wrapInCompileTimeError(Expression expression, Message message,
- {List<LocatedMessage> context}) {
- return wrapInLocatedCompileTimeError(expression,
- message.withLocation(uri, forest.readOffset(expression), noLength),
- context: context);
+ addProblem(message, charOffset, length, wasHandled: true, context: context);
+ return new SyntheticExpressionJudgment(library.loader
+ .throwCompileConstantError(
+ library.loader.buildProblem(message, charOffset, length, uri)));
}
@override
Expression wrapInProblem(Expression expression, Message message, int length,
{List<LocatedMessage> context}) {
- int charOffset = expression.fileOffset;
+ int charOffset = forest.readOffset(expression);
Severity severity = message.code.severity;
- if (severity == null) {
- addCompileTimeError(message, charOffset, length, context: context);
- internalProblem(
- fasta.templateInternalProblemMissingSeverity
- .withArguments(message.code.name),
- charOffset,
- uri);
- } else if (severity == Severity.error ||
+ if (severity == Severity.error ||
severity == Severity.errorLegacyWarning &&
library.loader.target.strongMode) {
- return wrapInCompileTimeError(expression, message, context: context);
+ return wrapInLocatedProblem(
+ expression, message.withLocation(uri, charOffset, length),
+ context: context);
} else {
addProblem(message, charOffset, length, context: context);
+ return expression;
}
- return expression;
}
@override
- Expression wrapInLocatedCompileTimeError(
- Expression expression, LocatedMessage message,
+ Expression wrapInLocatedProblem(Expression expression, LocatedMessage message,
{List<LocatedMessage> context}) {
// TODO(askesc): Produce explicit error expression wrapping the original.
// See [issue 29717](https://github.com/dart-lang/sdk/issues/29717)
- return new SyntheticExpressionJudgment(
- new Let(
- new VariableDeclaration.forValue(new SyntheticExpressionJudgment(
- buildCompileTimeError(
- message.messageObject, message.charOffset, message.length,
- context: context)))
- ..fileOffset = forest.readOffset(expression),
- new Let(
- new VariableDeclaration.forValue(expression)
- ..fileOffset = forest.readOffset(expression),
- forest.literalNull(null)
- ..fileOffset = forest.readOffset(expression))
- ..fileOffset = forest.readOffset(expression))
+ return new SyntheticExpressionJudgment(new Let(
+ new VariableDeclaration.forValue(buildProblem(
+ message.messageObject, message.charOffset, message.length,
+ context: context))
..fileOffset = forest.readOffset(expression),
- original: expression);
+ new Let(
+ new VariableDeclaration.forValue(expression)
+ ..fileOffset = forest.readOffset(expression),
+ forest.literalNull(null)
+ ..fileOffset = forest.readOffset(expression))
+ ..fileOffset = forest.readOffset(expression))
+ ..fileOffset = forest.readOffset(expression));
}
Expression buildFallThroughError(int charOffset) {
@@ -4178,7 +4142,7 @@
forest.literalString("${location?.file ?? uri}", null)
..fileOffset = charOffset,
forest.literalInt(location?.line ?? 0, null)..fileOffset = charOffset,
- ], noLocation, noLocation),
+ ], noLocation),
charOffset: charOffset));
}
@@ -4193,35 +4157,20 @@
constructor.target,
forest.arguments(<Expression>[
forest.literalString(className, null)..fileOffset = charOffset
- ], noLocation, noLocation)));
+ ], noLocation)));
}
- Statement buildCompileTimeErrorStatement(Message message, int charOffset,
+ Statement buildProblemStatement(Message message, int charOffset,
{List<LocatedMessage> context, int length}) {
return new ExpressionStatementJudgment(
- new SyntheticExpressionJudgment(buildCompileTimeError(
- message, charOffset, length ?? noLength,
- context: context)),
+ buildProblem(message, charOffset, length ?? noLength, context: context),
null);
}
- Statement wrapInCompileTimeErrorStatement(
- Statement statement, Message message) {
+ Statement wrapInProblemStatement(Statement statement, Message message) {
// TODO(askesc): Produce explicit error statement wrapping the original.
// See [issue 29717](https://github.com/dart-lang/sdk/issues/29717)
- var error = buildCompileTimeErrorStatement(message, statement.fileOffset);
- statement.parent = error; // to avoid dangling statement
- return error;
- }
-
- @override
- Initializer buildInvalidFieldInitializer(int offset, bool isSynthetic,
- Node target, Expression value, Expression error) {
- needsImplicitSuperInitializer = false;
- return new ShadowInvalidFieldInitializer(
- target, value, new VariableDeclaration.forValue(error))
- ..fileOffset = offset
- ..isSynthetic = isSynthetic;
+ return buildProblemStatement(message, statement.fileOffset);
}
@override
@@ -4244,13 +4193,15 @@
Initializer buildDuplicatedInitializer(Field field, Expression value,
String name, int offset, int previousInitializerOffset) {
- var error = buildCompileTimeError(
- fasta.templateFinalInstanceVariableAlreadyInitialized
- .withArguments(name),
- offset,
- noLength);
return new ShadowInvalidFieldInitializer(
- field, value, new VariableDeclaration.forValue(error))
+ field,
+ value,
+ new VariableDeclaration.forValue(buildProblem(
+ fasta.templateFinalInstanceVariableAlreadyInitialized
+ .withArguments(name),
+ offset,
+ noLength)
+ .desugared))
..fileOffset = offset;
}
@@ -4298,7 +4249,7 @@
constructor.target,
forest.arguments(<Expression>[
forest.literalString(name, null)..fileOffset = offset
- ], noLocation, noLocation),
+ ], noLocation),
charOffset: offset))))
..fileOffset = offset;
} else {
@@ -4322,17 +4273,13 @@
..isSynthetic = isSynthetic;
}
} else {
- builder ??= classBuilder.scope.setters[name];
- var error = buildCompileTimeError(
- fasta.templateInitializerForStaticField.withArguments(name),
- offset,
- name.length);
- return buildInvalidFieldInitializer(
- offset,
- isSynthetic,
- builder != null && builder.hasTarget ? builder.target : null,
- expression,
- error);
+ return buildInvalidInitializer(
+ buildProblem(
+ fasta.templateInitializerForStaticField.withArguments(name),
+ offset,
+ name.length)
+ .desugared,
+ offset);
}
}
@@ -4344,8 +4291,9 @@
return buildInvalidSuperInitializer(
constructor,
forest.castArguments(arguments),
- buildCompileTimeError(fasta.messageConstConstructorWithNonConstSuper,
- charOffset, constructor.name.name.length),
+ buildProblem(fasta.messageConstConstructorWithNonConstSuper,
+ charOffset, constructor.name.name.length)
+ .desugared,
charOffset);
}
needsImplicitSuperInitializer = false;
@@ -4375,13 +4323,6 @@
}
@override
- Expression buildProblemExpression(
- ProblemBuilder builder, int charOffset, int length) {
- return new SyntheticExpressionJudgment(
- buildCompileTimeError(builder.message, charOffset, length));
- }
-
- @override
void handleOperator(Token token) {
debugEvent("Operator");
push(new Operator(token, token.charOffset));
@@ -4390,7 +4331,7 @@
@override
void handleSymbolVoid(Token token) {
debugEvent("SymbolVoid");
- push(new Identifier(token));
+ push(new Identifier.preserveToken(token));
}
@override
@@ -4401,7 +4342,7 @@
push(forest.block(
token,
<Statement>[
- buildCompileTimeErrorStatement(
+ buildProblemStatement(
fasta.templateExpectedFunctionBody.withArguments(token),
token.charOffset,
length: token.length)
@@ -4417,18 +4358,14 @@
Message message = fasta.messageTypeVariableInStaticContext;
int length = type.parameter.name.length;
if (nonInstanceAccessIsError) {
- addCompileTimeError(message, offset, length);
+ addProblem(message, offset, length, severity: Severity.error);
} else {
addProblemErrorIfConst(message, offset, length);
}
return const InvalidType();
} else if (constantContext != ConstantContext.none) {
- int length = type.parameter.name.length;
- addCompileTimeError(
- fasta.templateTypeVariableInConstExpression
- .withArguments(type.parameter.name, type),
- offset,
- length);
+ addProblem(fasta.messageTypeVariableInConstantContext, offset,
+ type.parameter.name.length);
}
return type;
}
@@ -4463,11 +4400,12 @@
bool isSuper: false,
Member interfaceTarget}) {
if (constantContext != ConstantContext.none && !isConstantExpression) {
- error = buildCompileTimeError(
- fasta.templateNotConstantExpression
- .withArguments('Method invocation'),
- offset,
- name.name.length);
+ error = buildProblem(
+ fasta.templateNotConstantExpression
+ .withArguments('Method invocation'),
+ offset,
+ name.name.length)
+ .desugared;
}
if (isSuper) {
// We can ignore [isNullAware] on super sends.
@@ -4526,29 +4464,26 @@
}
@override
- void addCompileTimeError(Message message, int charOffset, int length,
- {List<LocatedMessage> context}) {
- library.addCompileTimeError(message, charOffset, length, uri,
- context: context);
- }
-
- @override
void addProblem(Message message, int charOffset, int length,
- {List<LocatedMessage> context}) {
- library.addProblem(message, charOffset, length, uri, context: context);
+ {bool wasHandled: false,
+ List<LocatedMessage> context,
+ Severity severity}) {
+ library.addProblem(message, charOffset, length, uri,
+ wasHandled: wasHandled, context: context, severity: severity);
}
@override
void addProblemErrorIfConst(Message message, int charOffset, int length,
- {List<LocatedMessage> context}) {
+ {bool wasHandled: false, List<LocatedMessage> context}) {
// TODO(askesc): Instead of deciding on the severity, this method should
// take two messages: one to use when a constant expression is
// required and one to use otherwise.
+ Severity severity = message.code.severity;
if (constantContext != ConstantContext.none) {
- addCompileTimeError(message, charOffset, length, context: context);
- } else {
- library.addProblem(message, charOffset, length, uri, context: context);
+ severity = Severity.error;
}
+ addProblem(message, charOffset, length,
+ wasHandled: wasHandled, context: context, severity: severity);
}
@override
@@ -4565,7 +4500,7 @@
@override
Expression wrapInDeferredCheck(
Expression expression, KernelPrefixBuilder prefix, int charOffset) {
- Object check = new VariableDeclaration.forValue(
+ VariableDeclaration check = new VariableDeclaration.forValue(
forest.checkLibraryIsLoaded(prefix.dependency))
..fileOffset = charOffset;
return new DeferredCheckJudgment(check, expression);
@@ -4590,7 +4525,7 @@
} else {
nearest = '$asDouble';
}
- library.addCompileTimeError(
+ library.addProblem(
fasta.templateWebLiteralCannotBeRepresentedExactly
.withArguments(token.lexeme, nearest),
token.charOffset,
@@ -4611,17 +4546,6 @@
}
}
-class Identifier {
- final Token token;
- String get name => token.lexeme;
-
- Identifier(this.token);
-
- Expression get initializer => null;
-
- String toString() => "identifier($name)";
-}
-
class Operator {
final Token token;
String get name => token.stringValue;
@@ -4633,14 +4557,6 @@
String toString() => "operator($name)";
}
-class InitializedIdentifier extends Identifier {
- final Expression initializer;
-
- InitializedIdentifier(Token token, this.initializer) : super(token);
-
- String toString() => "initialized-identifier($name, $initializer)";
-}
-
class JumpTarget extends Declaration {
final List<Statement> users = <Statement>[];
@@ -4685,24 +4601,24 @@
void resolveBreaks(Forest forest, Statement target) {
assert(isBreakTarget);
- for (Statement user in users) {
- forest.resolveBreak(target, user);
+ for (BreakStatement user in users) {
+ user.target = target;
}
users.clear();
}
void resolveContinues(Forest forest, Statement target) {
assert(isContinueTarget);
- for (Statement user in users) {
- forest.resolveContinue(target, user);
+ for (BreakStatement user in users) {
+ user.target = target;
}
users.clear();
}
- void resolveGotos(Forest forest, Object target) {
+ void resolveGotos(Forest forest, SwitchCase target) {
assert(isGotoTarget);
- for (Statement user in users) {
- forest.resolveContinueInSwitch(target, user);
+ for (ContinueSwitchStatement user in users) {
+ user.target = target;
}
users.clear();
}
@@ -4712,7 +4628,7 @@
}
class LabelTarget extends Declaration implements JumpTarget {
- final List<Object> labels;
+ final List<Label> labels;
@override
final MemberBuilder parent;
@@ -4768,7 +4684,7 @@
continueTarget.resolveContinues(forest, target);
}
- void resolveGotos(Forest forest, Object target) {
+ void resolveGotos(Forest forest, SwitchCase target) {
unsupported("resolveGotos", charOffset, fileUri);
}
@@ -4902,6 +4818,8 @@
return node.isSuper ? "super" : "this";
} else if (node is Generator) {
return node.plainNameForRead;
+ } else if (node is QualifiedName) {
+ return flattenName(node, node.charOffset, null);
} else {
return unhandled("${node.runtimeType}", "getNodeName", -1, null);
}
@@ -4927,3 +4845,14 @@
asyncToken.charOffset, null);
}
}
+
+/// A data holder used to hold the information about a label that is pushed on
+/// the stack.
+class Label {
+ String name;
+ int charOffset;
+
+ Label(this.name, this.charOffset);
+
+ String toString() => "label($name)";
+}
diff --git a/pkg/front_end/lib/src/fasta/kernel/expression_generator.dart b/pkg/front_end/lib/src/fasta/kernel/expression_generator.dart
index ec87044..d24d7af 100644
--- a/pkg/front_end/lib/src/fasta/kernel/expression_generator.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/expression_generator.dart
@@ -64,17 +64,14 @@
import 'kernel_ast_api.dart'
show
Arguments,
- ArgumentsJudgment,
DartType,
DynamicType,
Expression,
- IllegalAssignmentJudgment,
Initializer,
InvalidConstructorInvocationJudgment,
InvalidType,
Member,
Name,
- Node,
Procedure,
StaticInvocationJudgment,
SyntheticExpressionJudgment,
@@ -120,8 +117,7 @@
///
/// The returned expression evaluates to the assigned value, unless
/// [voidContext] is true, in which case it may evaluate to anything.
- Expression buildAssignment(Expression value,
- {bool voidContext, int offset: -1});
+ Expression buildAssignment(Expression value, {bool voidContext});
/// Returns a [Expression] representing a null-aware assignment (`??=`) with
/// the generator on the LHS and [value] on the RHS.
@@ -196,16 +192,16 @@
Expression buildForEffect() => buildSimpleRead();
- Node get fieldInitializerTarget => null;
-
- Expression buildFieldInitializerError() {
+ Initializer buildFieldInitializer(Map<String, int> initializedFields) {
int offset = offsetForToken(token);
- return helper.buildCompileTimeError(
- messageInvalidInitializer, offset, lengthForToken(token));
+ return helper.buildInvalidInitializer(
+ helper.buildProblem(messageInvalidInitializer, offset,
+ lengthForToken(token)) /* TODO(ahe): Add .desugared here? */,
+ offset);
}
/* Expression | Generator | Initializer */ doInvocation(
- int offset, ArgumentsJudgment arguments);
+ int offset, Arguments arguments);
/* Expression | Generator */ buildPropertyAccess(
IncompleteSendGenerator send, int operatorOffset, bool isNullAware) {
@@ -219,7 +215,7 @@
} else {
if (helper.constantContext != ConstantContext.none &&
send.name != lengthName) {
- helper.addCompileTimeError(
+ helper.addProblem(
messageNotAConstantExpression, offsetForToken(token), token.length);
}
return PropertyAccessGenerator.make(helper, send.token, buildSimpleRead(),
@@ -234,7 +230,7 @@
return const InvalidType();
}
- /* Expression | Generator */ Object prefixedLookup(Token name) {
+ /* Expression | Generator */ Object qualifiedLookup(Token name) {
return new UnexpectedQualifiedUseGenerator(helper, name, this, false);
}
@@ -376,30 +372,28 @@
abstract class IndexedAccessGenerator implements Generator {
factory IndexedAccessGenerator.internal(
ExpressionGeneratorHelper helper,
- Token openSquareBracket,
- Token closeSquareBracket,
+ Token token,
Expression receiver,
Expression index,
Procedure getter,
Procedure setter) {
- return helper.forest.indexedAccessGenerator(helper, openSquareBracket,
- closeSquareBracket, receiver, index, getter, setter);
+ return helper.forest
+ .indexedAccessGenerator(helper, token, receiver, index, getter, setter);
}
static Generator make(
ExpressionGeneratorHelper helper,
- Token openSquareBracket,
- Token closeSquareBracket,
+ Token token,
Expression receiver,
Expression index,
Procedure getter,
Procedure setter) {
if (helper.forest.isThisExpression(receiver)) {
return new ThisIndexedAccessGenerator(
- helper, openSquareBracket, closeSquareBracket, index, getter, setter);
+ helper, token, index, getter, setter);
} else {
- return new IndexedAccessGenerator.internal(helper, openSquareBracket,
- closeSquareBracket, receiver, index, getter, setter);
+ return new IndexedAccessGenerator.internal(
+ helper, token, receiver, index, getter, setter);
}
}
@@ -416,15 +410,10 @@
/// Special case of [IndexedAccessGenerator] to avoid creating an indirect
/// access to 'this'.
abstract class ThisIndexedAccessGenerator implements Generator {
- factory ThisIndexedAccessGenerator(
- ExpressionGeneratorHelper helper,
- Token openSquareBracket,
- Token closeSquareBracket,
- Expression index,
- Procedure getter,
- Procedure setter) {
- return helper.forest.thisIndexedAccessGenerator(
- helper, openSquareBracket, closeSquareBracket, index, getter, setter);
+ factory ThisIndexedAccessGenerator(ExpressionGeneratorHelper helper,
+ Token token, Expression index, Procedure getter, Procedure setter) {
+ return helper.forest
+ .thisIndexedAccessGenerator(helper, token, index, getter, setter);
}
@override
@@ -438,15 +427,10 @@
}
abstract class SuperIndexedAccessGenerator implements Generator {
- factory SuperIndexedAccessGenerator(
- ExpressionGeneratorHelper helper,
- Token openSquareBracket,
- Token closeSquareBracket,
- Expression index,
- Member getter,
- Member setter) {
- return helper.forest.superIndexedAccessGenerator(
- helper, openSquareBracket, closeSquareBracket, index, getter, setter);
+ factory SuperIndexedAccessGenerator(ExpressionGeneratorHelper helper,
+ Token token, Expression index, Member getter, Member setter) {
+ return helper.forest
+ .superIndexedAccessGenerator(helper, token, index, getter, setter);
}
String get plainNameForRead => "[]";
@@ -730,10 +714,10 @@
String get debugName => "LargeIntAccessGenerator";
Expression buildError() {
- return helper.buildCompileTimeError(
- templateIntegerLiteralIsOutOfRange.withArguments(token),
- offsetForToken(token),
- lengthForToken(token));
+ return helper
+ .buildProblem(templateIntegerLiteralIsOutOfRange.withArguments(token),
+ offsetForToken(token), lengthForToken(token))
+ .desugared /* TODO(ahe): Remove `.desugared`? */;
}
@override
@@ -763,8 +747,9 @@
withReceiver(Object receiver, int operatorOffset, {bool isNullAware}) => this;
@override
- Expression buildFieldInitializerError() {
- return buildError(forest.argumentsEmpty(token, token), isSetter: true);
+ Initializer buildFieldInitializer(Map<String, int> initializedFields) {
+ return helper.buildInvalidInitializer(new SyntheticExpressionJudgment(
+ buildError(forest.argumentsEmpty(token), isSetter: true)));
}
@override
@@ -781,10 +766,9 @@
}
@override
- Expression buildAssignment(Expression value,
- {bool voidContext: false, int offset: -1}) {
+ Expression buildAssignment(Expression value, {bool voidContext: false}) {
return new SyntheticExpressionJudgment(buildError(
- forest.arguments(<Expression>[value], token, token),
+ forest.arguments(<Expression>[value], token),
isSetter: true));
}
@@ -796,7 +780,7 @@
bool isPreIncDec: false,
bool isPostIncDec: false}) {
return new SyntheticExpressionJudgment(buildError(
- forest.arguments(<Expression>[value], token, token),
+ forest.arguments(<Expression>[value], token),
isGetter: true));
}
@@ -806,7 +790,6 @@
var error = buildError(
forest.arguments(
<Expression>[forest.literalInt(1, null)..fileOffset = offset],
- token,
token),
isGetter: true);
return new UnresolvedVariableUnaryJudgment(
@@ -820,7 +803,6 @@
var error = buildError(
forest.arguments(
<Expression>[forest.literalInt(1, null)..fileOffset = offset],
- token,
token),
isGetter: true);
return new UnresolvedVariableUnaryJudgment(
@@ -833,22 +815,22 @@
Expression value, DartType type, int offset,
{bool voidContext: false}) {
return new SyntheticExpressionJudgment(buildError(
- forest.arguments(<Expression>[value], token, token),
+ forest.arguments(<Expression>[value], token),
isSetter: true));
}
@override
Expression buildSimpleRead() => new SyntheticExpressionJudgment(
- buildError(forest.argumentsEmpty(token, token), isGetter: true));
+ buildError(forest.argumentsEmpty(token), isGetter: true));
@override
Expression makeInvalidRead() => new SyntheticExpressionJudgment(
- buildError(forest.argumentsEmpty(token, token), isGetter: true));
+ buildError(forest.argumentsEmpty(token), isGetter: true));
@override
Expression makeInvalidWrite(Expression value) {
return new SyntheticExpressionJudgment(buildError(
- forest.arguments(<Expression>[value], token, token),
+ forest.arguments(<Expression>[value], token),
isSetter: true));
}
@@ -900,7 +882,7 @@
}
@override
- /* Expression | Generator */ Object prefixedLookup(Token name) {
+ /* Expression | Generator */ Object qualifiedLookup(Token name) {
helper.storeUnresolved(token);
return new UnexpectedQualifiedUseGenerator(helper, name, this, true);
}
@@ -941,16 +923,15 @@
}
@override
- Expression buildAssignment(Expression value,
- {bool voidContext: false, int offset: -1}) {
- return buildInvalidAssignment(value, offset);
+ Expression buildAssignment(Expression value, {bool voidContext: false}) {
+ return makeInvalidWrite(value);
}
@override
Expression buildNullAwareAssignment(
Expression value, DartType type, int offset,
{bool voidContext: false}) {
- return buildInvalidAssignment(value, offset);
+ return makeInvalidWrite(value);
}
@override
@@ -960,34 +941,19 @@
Procedure interfaceTarget,
bool isPreIncDec: false,
bool isPostIncDec: false}) {
- return buildInvalidAssignment(value, offset);
+ return makeInvalidWrite(value);
}
@override
Expression buildPrefixIncrement(Name binaryOperator,
{int offset: -1, bool voidContext: false, Procedure interfaceTarget}) {
- return buildInvalidAssignment(
- forest.literalInt(1, null, isSynthetic: true), offset);
+ return makeInvalidWrite(null);
}
@override
Expression buildPostfixIncrement(Name binaryOperator,
{int offset: -1, bool voidContext: false, Procedure interfaceTarget}) {
- return buildInvalidAssignment(
- forest.literalInt(1, null, isSynthetic: true), offset);
- }
-
- Expression buildInvalidAssignment(Expression value, int offset) {
- var lhs = buildSimpleRead();
- // The lhs expression needs to have a parent so that type inference can be
- // applied to it, but it doesn't matter what the parent is because the
- // lhs expression won't appear in the tree. So just give it a quick and
- // dirty parent.
- new VariableDeclaration.forValue(lhs);
-
- return new IllegalAssignmentJudgment(value,
- assignmentOffset: offset, desugared: makeInvalidWrite(value))
- ..write = lhs;
+ return makeInvalidWrite(null);
}
@override
@@ -997,9 +963,8 @@
@override
Expression makeInvalidWrite(Expression value) {
- return helper.buildCompileTimeErrorExpression(
- messageIllegalAssignmentToNonAssignable, offsetForToken(token),
- length: token?.length);
+ return helper.buildProblem(messageIllegalAssignmentToNonAssignable,
+ offsetForToken(token), lengthForToken(token));
}
}
@@ -1028,26 +993,12 @@
}
Expression handleAssignment(bool voidContext) {
- var assignment = makeAssignmentExpression(voidContext);
if (helper.constantContext != ConstantContext.none) {
- // The assignment needs to have a parent so that type inference can be
- // applied to it, but it doesn't matter what the parent is because the
- // assignment won't appear in the tree. So just give it a quick and dirty
- // parent.
- new VariableDeclaration.forValue(assignment);
-
- return helper.buildCompileTimeErrorExpression(
- messageNotAConstantExpression, offsetForToken(token),
- length: token.length, original: assignment);
- } else {
- return assignment;
+ return helper.buildProblem(
+ messageNotAConstantExpression, offsetForToken(token), token.length);
}
- }
-
- Expression makeAssignmentExpression(bool voidContext) {
if (identical("=", assignmentOperator)) {
- return generator.buildAssignment(value,
- voidContext: voidContext, offset: token.offset);
+ return generator.buildAssignment(value, voidContext: voidContext);
} else if (identical("+=", assignmentOperator)) {
return generator.buildCompoundAssignment(plusName, value,
offset: offsetForToken(token), voidContext: voidContext);
@@ -1091,15 +1042,11 @@
}
}
- Initializer buildFieldInitializer() {
+ @override
+ Initializer buildFieldInitializer(Map<String, int> initializedFields) {
if (!identical("=", assignmentOperator) ||
!generator.isThisPropertyAccess) {
- return helper.buildInvalidFieldInitializer(
- offsetForToken(token),
- false,
- generator.fieldInitializerTarget,
- value,
- generator.buildFieldInitializerError());
+ return generator.buildFieldInitializer(initializedFields);
}
return helper.buildFieldInitializer(
false, generator.plainNameForRead, offsetForToken(token), value);
@@ -1163,7 +1110,7 @@
Expression buildSimpleRead() => makeInvalidRead();
@override
- /* Expression | Generator */ Object prefixedLookup(Token name) {
+ /* Expression | Generator */ Object qualifiedLookup(Token name) {
if (helper.constantContext != ConstantContext.none && prefix.deferred) {
helper.addProblem(
templateCantUseDeferredPrefixAsConstant.withArguments(token),
@@ -1187,7 +1134,7 @@
@override
/* Expression | Generator | Initializer */ doInvocation(
int offset, Arguments arguments) {
- var error = helper.wrapInLocatedCompileTimeError(
+ var error = helper.wrapInLocatedProblem(
helper.evaluateArgumentsBefore(arguments, forest.literalNull(token)),
messageCantUsePrefixAsExpression.withLocation(
helper.uri, offsetForToken(token), lengthForToken(token)));
@@ -1202,7 +1149,7 @@
if (send is IncompleteSendGenerator) {
assert(send.name.name == send.token.lexeme,
"'${send.name.name}' != ${send.token.lexeme}");
- Object result = prefixedLookup(send.token);
+ Object result = qualifiedLookup(send.token);
if (send is SendAccessGenerator) {
result = helper.finishSend(
result,
@@ -1210,7 +1157,7 @@
offsetForToken(token));
}
if (isNullAware) {
- result = helper.wrapInLocatedCompileTimeError(
+ result = helper.wrapInLocatedProblem(
helper.toValue(result),
messageCantUsePrefixWithNullAware.withLocation(
helper.uri, offsetForToken(token), lengthForToken(token)));
@@ -1223,10 +1170,8 @@
@override
Expression makeInvalidRead() {
- return new SyntheticExpressionJudgment(helper.buildCompileTimeError(
- messageCantUsePrefixAsExpression,
- offsetForToken(token),
- lengthForToken(token)));
+ return helper.buildProblem(messageCantUsePrefixAsExpression,
+ offsetForToken(token), lengthForToken(token));
}
@override
@@ -1275,11 +1220,11 @@
@override
DartType buildTypeWithBuiltArguments(List<DartType> arguments,
{bool nonInstanceAccessIsError: false, TypeInferrer typeInferrer}) {
- Template<Message Function(Token, Token)> template = isUnresolved
+ Template<Message Function(String, String)> template = isUnresolved
? templateUnresolvedPrefixInTypeAnnotation
: templateNotAPrefixInTypeAnnotation;
helper.addProblem(
- template.withArguments(prefixGenerator.token, token),
+ template.withArguments(prefixGenerator.token.lexeme, token.lexeme),
offsetForToken(prefixGenerator.token),
lengthOfSpan(prefixGenerator.token, token));
prefixGenerator.storeUnexpectedTypePrefix(typeInferrer);
diff --git a/pkg/front_end/lib/src/fasta/kernel/expression_generator_helper.dart b/pkg/front_end/lib/src/fasta/kernel/expression_generator_helper.dart
index a1ca4c0..339c43d 100644
--- a/pkg/front_end/lib/src/fasta/kernel/expression_generator_helper.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/expression_generator_helper.dart
@@ -12,7 +12,7 @@
import '../messages.dart' show Message;
-import '../scope.dart' show ProblemBuilder, Scope;
+import '../scope.dart' show Scope;
import '../type_inference/inference_helper.dart' show InferenceHelper;
@@ -27,12 +27,10 @@
import 'kernel_ast_api.dart'
show
Arguments,
- ArgumentsJudgment,
Constructor,
DartType,
Expression,
FunctionNode,
- FunctionType,
Initializer,
Member,
Name,
@@ -71,21 +69,7 @@
scopeLookup(Scope scope, String name, Token token,
{bool isQualified: false, PrefixBuilder prefix});
- finishSend(Object receiver, ArgumentsJudgment arguments, int offset);
-
- Expression buildCompileTimeError(Message message, int charOffset, int length,
- {List<LocatedMessage> context});
-
- Expression buildCompileTimeErrorExpression(Message message, int offset,
- {int length, Expression original});
-
- Expression wrapInCompileTimeError(Expression expression, Message message);
-
- Expression wrapInProblem(Expression expression, Message message, int length,
- {List<LocatedMessage> context});
-
- Initializer buildInvalidFieldInitializer(int offset, bool isSynthetic,
- Node target, Expression value, Expression error);
+ finishSend(Object receiver, Arguments arguments, int offset);
Initializer buildInvalidInitializer(Expression expression, [int offset]);
@@ -101,13 +85,9 @@
Constructor constructor, Arguments arguments,
[int charOffset = -1]);
- Expression buildStaticInvocation(
- Procedure target, ArgumentsJudgment arguments,
+ Expression buildStaticInvocation(Procedure target, Arguments arguments,
{Constness constness, int charOffset, Expression error});
- Expression buildProblemExpression(
- ProblemBuilder builder, int offset, int length);
-
Expression throwNoSuchMethodError(
Expression receiver, String name, Arguments arguments, int offset,
{Member candidate,
@@ -117,14 +97,8 @@
bool isStatic,
LocatedMessage argMessage});
- LocatedMessage checkArgumentsForFunction(
- FunctionNode function,
- ArgumentsJudgment arguments,
- int offset,
- List<TypeParameter> typeParameters);
-
- LocatedMessage checkArgumentsForType(
- FunctionType function, ArgumentsJudgment arguments, int offset);
+ LocatedMessage checkArgumentsForFunction(FunctionNode function,
+ Arguments arguments, int offset, List<TypeParameter> typeParameters);
StaticGet makeStaticGet(Member readTarget, Token token);
@@ -155,11 +129,6 @@
DartType validatedTypeVariableUse(
TypeParameterType type, int offset, bool nonInstanceAccessIsError);
- void addCompileTimeError(Message message, int charOffset, int length,
- {List<LocatedMessage> context});
-
- void addProblem(Message message, int charOffset, int length);
-
void addProblemErrorIfConst(Message message, int charOffset, int length);
Message warnUnresolvedGet(Name name, int charOffset, {bool isSuper});
@@ -170,8 +139,7 @@
void warnTypeArgumentsMismatch(String name, int expected, int charOffset);
- Expression wrapInLocatedCompileTimeError(
- Expression expression, LocatedMessage message,
+ Expression wrapInLocatedProblem(Expression expression, LocatedMessage message,
{List<LocatedMessage> context});
Expression evaluateArgumentsBefore(
diff --git a/pkg/front_end/lib/src/fasta/kernel/fangorn.dart b/pkg/front_end/lib/src/fasta/kernel/fangorn.dart
index 42e8892..8461648 100644
--- a/pkg/front_end/lib/src/fasta/kernel/fangorn.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/fangorn.dart
@@ -11,16 +11,12 @@
Arguments,
AssertInitializer,
Block,
- BreakStatement,
Catch,
- ContinueSwitchStatement,
DartType,
- DynamicType,
EmptyStatement,
Expression,
ExpressionStatement,
InvalidExpression,
- LabeledStatement,
Let,
LibraryDependency,
MapEntry,
@@ -29,13 +25,12 @@
NamedExpression,
Procedure,
Statement,
- SwitchCase,
ThisExpression,
TreeNode,
VariableDeclaration,
setParents;
-import '../parser.dart' show endOffsetForToken, offsetForToken, optional;
+import '../parser.dart' show offsetForToken, optional;
import '../problems.dart' show unsupported;
@@ -132,17 +127,15 @@
Fangorn(this.typeInferenceTokensSaver);
@override
- ArgumentsJudgment arguments(
- List<Expression> positional, Token beginToken, Token endToken,
+ ArgumentsJudgment arguments(List<Expression> positional, Token token,
{List<DartType> types, List<NamedExpression> named}) {
- return new ArgumentsJudgment(
- offsetForToken(beginToken), endOffsetForToken(endToken), positional,
- types: types, named: named);
+ return new ArgumentsJudgment(positional, types: types, named: named)
+ ..fileOffset = offsetForToken(token);
}
@override
- ArgumentsJudgment argumentsEmpty(Token beginToken, Token endToken) {
- return arguments(<Expression>[], beginToken, endToken);
+ ArgumentsJudgment argumentsEmpty(Token token) {
+ return arguments(<Expression>[], token);
}
@override
@@ -183,11 +176,9 @@
}
@override
- IntJudgment literalInt(int value, Token token,
- {Expression desugaredError, bool isSynthetic: false}) {
+ IntJudgment literalInt(int value, Token token) {
return new IntJudgment(
- typeInferenceTokensSaver?.intLiteralTokens(token), value,
- desugaredError: desugaredError, isSynthetic: isSynthetic)
+ typeInferenceTokensSaver?.intLiteralTokens(token), value)
..fileOffset = offsetForToken(token);
}
@@ -267,20 +258,9 @@
}
@override
- List<MapEntry> mapEntryList(int length) {
- return new List<MapEntryJudgment>.filled(length, null, growable: true);
- }
-
- @override
int readOffset(TreeNode node) => node.fileOffset;
@override
- int getTypeCount(List typeArguments) => typeArguments.length;
-
- @override
- DartType getTypeAt(List typeArguments, int index) => typeArguments[index];
-
- @override
Expression loadLibrary(LibraryDependency dependency, Arguments arguments) {
return new LoadLibraryJudgment(dependency, arguments);
}
@@ -291,11 +271,9 @@
}
@override
- Expression asExpression(Expression expression, covariant type, Token token,
- {Expression desugaredError}) {
+ Expression asExpression(Expression expression, DartType type, Token token) {
return new AsJudgment(
- expression, typeInferenceTokensSaver?.asExpressionTokens(token), type,
- desugaredError: desugaredError)
+ expression, typeInferenceTokensSaver?.asExpressionTokens(token), type)
..fileOffset = offsetForToken(token);
}
@@ -401,8 +379,6 @@
VariableDeclaration stackTraceParameter,
DartType stackTraceType,
Statement body) {
- exceptionType ??= const DynamicType();
- // TODO(brianwilkerson) Get the left and right parentheses and the comma.
return new CatchJudgment(
typeInferenceTokensSaver?.catchStatementTokens(
onKeyword, catchKeyword, null, null, null),
@@ -496,7 +472,7 @@
@override
Expression isExpression(
- Expression operand, isOperator, Token notOperator, covariant type) {
+ Expression operand, isOperator, Token notOperator, DartType type) {
int offset = offsetForToken(isOperator);
if (notOperator != null) {
return new IsNotJudgment(
@@ -513,11 +489,6 @@
}
@override
- Label label(Token identifier, Token colon) {
- return new Label(identifier.lexeme, identifier.charOffset);
- }
-
- @override
Statement labeledStatement(LabelTarget target, Statement statement) =>
statement;
@@ -659,17 +630,6 @@
}
@override
- String getLabelName(Label label) => label.name;
-
- @override
- int getLabelOffset(Label label) => label.charOffset;
-
- @override
- String getVariableDeclarationName(VariableDeclaration declaration) {
- return declaration.name;
- }
-
- @override
bool isBlock(Object node) => node is Block;
@override
@@ -701,36 +661,12 @@
statement is ExpressionStatement;
@override
- bool isLabel(covariant node) => node is Label;
-
- @override
bool isThisExpression(Object node) => node is ThisExpression;
@override
bool isVariablesDeclaration(Object node) => node is _VariablesDeclaration;
@override
- void resolveBreak(LabeledStatement target, BreakStatement user) {
- user.target = target;
- }
-
- @override
- void resolveContinue(LabeledStatement target, BreakStatement user) {
- user.target = target;
- }
-
- @override
- void resolveContinueInSwitch(
- SwitchCase target, ContinueSwitchStatement user) {
- user.target = target;
- }
-
- @override
- void setParameterType(VariableDeclaration parameter, DartType type) {
- parameter.type = type ?? const DynamicType();
- }
-
- @override
KernelVariableUseGenerator variableUseGenerator(
ExpressionGeneratorHelper helper,
Token token,
@@ -790,38 +726,35 @@
@override
KernelIndexedAccessGenerator indexedAccessGenerator(
ExpressionGeneratorHelper helper,
- Token openSquareBracket,
- Token closeSquareBracket,
+ Token token,
Expression receiver,
Expression index,
Procedure getter,
Procedure setter) {
- return new KernelIndexedAccessGenerator.internal(helper, openSquareBracket,
- closeSquareBracket, receiver, index, getter, setter);
+ return new KernelIndexedAccessGenerator.internal(
+ helper, token, receiver, index, getter, setter);
}
@override
KernelThisIndexedAccessGenerator thisIndexedAccessGenerator(
ExpressionGeneratorHelper helper,
- Token openSquareBracket,
- Token closeSquareBracket,
+ Token token,
Expression index,
Procedure getter,
Procedure setter) {
return new KernelThisIndexedAccessGenerator(
- helper, openSquareBracket, closeSquareBracket, index, getter, setter);
+ helper, token, index, getter, setter);
}
@override
KernelSuperIndexedAccessGenerator superIndexedAccessGenerator(
ExpressionGeneratorHelper helper,
- Token openSquareBracket,
- Token closeSquareBracket,
+ Token token,
Expression index,
Member getter,
Member setter) {
return new KernelSuperIndexedAccessGenerator(
- helper, openSquareBracket, closeSquareBracket, index, getter, setter);
+ helper, token, index, getter, setter);
}
@override
@@ -956,14 +889,3 @@
unsupported("transformChildren", fileOffset, uri);
}
}
-
-/// A data holder used to hold the information about a label that is pushed on
-/// the stack.
-class Label {
- String name;
- int charOffset;
-
- Label(this.name, this.charOffset);
-
- String toString() => "label($name)";
-}
diff --git a/pkg/front_end/lib/src/fasta/kernel/forest.dart b/pkg/front_end/lib/src/fasta/kernel/forest.dart
index 2e029e5..86f4e31 100644
--- a/pkg/front_end/lib/src/fasta/kernel/forest.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/forest.dart
@@ -4,17 +4,25 @@
library fasta.forest;
+import 'dart:core' hide MapEntry;
+
import 'package:kernel/ast.dart'
show
- Arguments, // TODO(ahe): Remove this import.
+ Arguments,
+ Catch,
DartType,
Expression,
+ LibraryDependency,
+ MapEntry,
Member,
Name,
+ NamedExpression,
Procedure,
- Statement;
+ Statement,
+ TreeNode,
+ VariableDeclaration;
-import 'body_builder.dart' show Identifier, LabelTarget;
+import 'body_builder.dart' show LabelTarget;
import 'expression_generator.dart' show Generator, PrefixUseGenerator;
@@ -22,6 +30,7 @@
import 'kernel_builder.dart'
show
+ Identifier,
LoadLibraryBuilder,
PrefixBuilder,
TypeDeclarationBuilder,
@@ -29,7 +38,7 @@
import '../scanner.dart' show Token;
-export 'body_builder.dart' show Identifier, Operator;
+export 'body_builder.dart' show Operator;
export 'constness.dart' show Constness;
@@ -39,6 +48,7 @@
export 'kernel_builder.dart'
show
+ Identifier,
LoadLibraryBuilder,
PrefixBuilder,
TypeDeclarationBuilder,
@@ -48,21 +58,18 @@
abstract class Forest {
const Forest();
- /// [beginToken] is the opening `(`.
- /// [endToken] is the closing `)`.
- Arguments arguments(
- List<Expression> positional, Token beginToken, Token endToken,
- {covariant List types, covariant List named});
+ Arguments arguments(List<Expression> positional, Token location,
+ {List<DartType> types, List<NamedExpression> named});
- Arguments argumentsEmpty(Token beginToken, Token endToken);
+ Arguments argumentsEmpty(Token location);
- List argumentsNamed(Arguments arguments);
+ List<Object> argumentsNamed(Arguments arguments);
List<Expression> argumentsPositional(Arguments arguments);
List argumentsTypeArguments(Arguments arguments);
- void argumentsSetTypeArguments(Arguments arguments, covariant List types);
+ void argumentsSetTypeArguments(Arguments arguments, List<DartType> types);
Expression asLiteralString(Expression value);
@@ -76,8 +83,7 @@
/// Return a representation of an integer literal at the given [location]. The
/// literal has the given [value].
- Expression literalInt(int value, Token location,
- {Expression desugaredError, bool isSynthetic: false});
+ Expression literalInt(int value, Token location);
/// Return a representation of a list literal. The [constKeyword] is the
/// location of the `const` keyword, or `null` if there is no keyword. The
@@ -115,11 +121,11 @@
Expression literalMap(
Token constKeyword,
bool isConst,
- covariant keyType,
- covariant valueType,
+ DartType keyType,
+ DartType valueType,
Object typeArguments,
Token leftBracket,
- covariant List entries,
+ List<MapEntry> entries,
Token rightBracket);
/// Return a representation of a null literal at the given [location].
@@ -140,7 +146,7 @@
/// [Operator]. The [value] is the string value of the symbol.
Expression literalSymbolSingluar(String value, Token hash, Object component);
- Expression literalType(covariant type, Token location);
+ Expression literalType(DartType type, Token location);
/// Return a representation of a key/value pair in a literal map. The [key] is
/// the representation of the expression used to compute the key. The [colon]
@@ -148,26 +154,13 @@
/// is the representation of the expression used to compute the value.
Object mapEntry(Expression key, Token colon, Expression value);
- /// Return a list that can hold [length] representations of map entries, as
- /// returned from [mapEntry].
- List mapEntryList(int length);
+ int readOffset(TreeNode node);
- int readOffset(covariant node);
+ Expression loadLibrary(LibraryDependency dependency, Arguments arguments);
- /// Given a representation of a list of [typeArguments], return the number of
- /// type arguments in the list.
- int getTypeCount(covariant typeArguments);
+ Expression checkLibraryIsLoaded(LibraryDependency dependency);
- /// Given a representation of a list of [typeArguments], return the type
- /// associated with the argument at the given [index].
- DartType getTypeAt(covariant typeArguments, int index);
-
- Expression loadLibrary(covariant dependency, Arguments arguments);
-
- Expression checkLibraryIsLoaded(covariant dependency);
-
- Expression asExpression(Expression expression, covariant type, Token location,
- {Expression desugaredError});
+ Expression asExpression(Expression expression, DartType type, Token location);
/// Return a representation of an assert that appears in a constructor's
/// initializer list.
@@ -192,11 +185,11 @@
/// Return a representation of a catch clause.
Object catchClause(
Token onKeyword,
- covariant exceptionType,
+ DartType exceptionType,
Token catchKeyword,
- covariant exceptionParameter,
- covariant stackTraceParameter,
- covariant stackTraceType,
+ VariableDeclaration exceptionParameter,
+ VariableDeclaration stackTraceParameter,
+ DartType stackTraceType,
Statement body);
/// Return a representation of a conditional expression. The [condition] is
@@ -213,7 +206,7 @@
/// Return a representation of a do statement.
Statement doStatement(Token doKeyword, Statement body, Token whileKeyword,
- covariant Expression condition, Token semicolon);
+ Expression condition, Token semicolon);
/// Return a representation of an expression statement composed from the
/// [expression] and [semicolon].
@@ -227,8 +220,8 @@
Statement forStatement(
Token forKeyword,
Token leftParenthesis,
- covariant variableList,
- covariant initializers,
+ List<VariableDeclaration> variableList,
+ List<Expression> initializers,
Token leftSeparator,
Expression condition,
Statement conditionStatement,
@@ -237,7 +230,7 @@
Statement body);
/// Return a representation of an `if` statement.
- Statement ifStatement(Token ifKeyword, covariant Expression condition,
+ Statement ifStatement(Token ifKeyword, Expression condition,
Statement thenStatement, Token elseKeyword, Statement elseStatement);
/// Return a representation of an `is` expression. The [operand] is the
@@ -245,11 +238,7 @@
/// The [notOperator] is either the `!` or `null` if the test is not negated.
/// The [type] is a representation of the type that is the right operand.
Expression isExpression(
- Expression operand, Token isOperator, Token notOperator, covariant type);
-
- /// Return a representation of the label consisting of the given [identifer]
- /// followed by the given [colon].
- Object label(Token identifier, Token colon);
+ Expression operand, Token isOperator, Token notOperator, DartType type);
/// Return a representation of a [statement] that has one or more labels (from
/// the [target]) associated with it.
@@ -299,11 +288,12 @@
/// might be provided, in which case it could be returned instead of the
/// representation of the try statement.
Statement tryStatement(Token tryKeyword, Statement body,
- covariant catchClauses, Token finallyKeyword, Statement finallyBlock);
+ List<Catch> catchClauses, Token finallyKeyword, Statement finallyBlock);
- Statement variablesDeclaration(covariant List declarations, Uri uri);
+ Statement variablesDeclaration(
+ List<VariableDeclaration> declarations, Uri uri);
- Object variablesDeclarationExtractDeclarations(
+ List<VariableDeclaration> variablesDeclarationExtractDeclarations(
covariant Statement variablesDeclaration);
Statement wrapVariables(Statement statement);
@@ -311,7 +301,7 @@
/// Return a representation of a while statement introduced by the
/// [whileKeyword] and consisting of the given [condition] and [body].
Statement whileStatement(
- Token whileKeyword, covariant Expression condition, Statement body);
+ Token whileKeyword, Expression condition, Statement body);
/// Return a representation of a yield statement consisting of the
/// [yieldKeyword], [star], [expression], and [semicolon]. The [star] is null
@@ -322,15 +312,6 @@
/// Return the expression from the given expression [statement].
Expression getExpressionFromExpressionStatement(Statement statement);
- /// Return the name of the given [label].
- String getLabelName(covariant label);
-
- /// Return the offset of the given [label].
- int getLabelOffset(covariant label);
-
- /// Return the name of the given variable [declaration].
- String getVariableDeclarationName(covariant declaration);
-
bool isBlock(Object node);
/// Return `true` if the given [statement] is the representation of an empty
@@ -343,31 +324,12 @@
/// expression statement.
bool isExpressionStatement(Statement statement);
- /// Return `true` if the given [node] is a label.
- bool isLabel(covariant node);
-
bool isThisExpression(Object node);
bool isVariablesDeclaration(Object node);
- /// Record that the [user] (a break statement) is associated with the [target]
- /// statement.
- void resolveBreak(covariant Statement target, covariant Statement user);
-
- /// Record that the [user] (a continue statement) is associated with the
- /// [target] statement.
- void resolveContinue(covariant Statement target, covariant Statement user);
-
- /// Record that the [user] (a continue statement inside a switch case) is
- /// associated with the [target] statement.
- void resolveContinueInSwitch(
- covariant Object target, covariant Statement user);
-
- /// Set the type of the [parameter] to the given [type].
- void setParameterType(covariant parameter, covariant type);
-
Generator variableUseGenerator(ExpressionGeneratorHelper helper,
- Token location, covariant variable, DartType promotedType);
+ Token location, VariableDeclaration variable, DartType promotedType);
Generator propertyAccessGenerator(
ExpressionGeneratorHelper helper,
@@ -394,28 +356,17 @@
Generator indexedAccessGenerator(
ExpressionGeneratorHelper helper,
- Token openSquareBracket,
- Token closeSquareBracket,
+ Token location,
Expression receiver,
Expression index,
Procedure getter,
Procedure setter);
- Generator thisIndexedAccessGenerator(
- ExpressionGeneratorHelper helper,
- Token openSquareBracket,
- Token closeSquareBracket,
- Expression index,
- Procedure getter,
- Procedure setter);
+ Generator thisIndexedAccessGenerator(ExpressionGeneratorHelper helper,
+ Token location, Expression index, Procedure getter, Procedure setter);
- Generator superIndexedAccessGenerator(
- ExpressionGeneratorHelper helper,
- Token openSquareBracket,
- Token closeSquareBracket,
- Expression index,
- Member getter,
- Member setter);
+ Generator superIndexedAccessGenerator(ExpressionGeneratorHelper helper,
+ Token location, Expression index, Member getter, Member setter);
Generator staticAccessGenerator(ExpressionGeneratorHelper helper,
Token location, Member getter, Member setter);
diff --git a/pkg/front_end/lib/src/fasta/kernel/kernel_ast_api.dart b/pkg/front_end/lib/src/fasta/kernel/kernel_ast_api.dart
index 1e07bc1..5629444 100644
--- a/pkg/front_end/lib/src/fasta/kernel/kernel_ast_api.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/kernel_ast_api.dart
@@ -39,6 +39,7 @@
LibraryPart,
ListLiteral,
Location,
+ MapEntry,
Member,
MethodInvocation,
Name,
diff --git a/pkg/front_end/lib/src/fasta/kernel/kernel_class_builder.dart b/pkg/front_end/lib/src/fasta/kernel/kernel_class_builder.dart
index d46c89c..e277db1 100644
--- a/pkg/front_end/lib/src/fasta/kernel/kernel_class_builder.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/kernel_class_builder.dart
@@ -116,9 +116,6 @@
Class get cls;
- @override
- bool get hasTarget => true;
-
Class get target => cls;
Class get actualCls;
@@ -155,7 +152,7 @@
// That should be caught and reported as a compile-time error earlier.
return unhandled(
templateTypeArgumentMismatch
- .withArguments(name, typeVariables.length)
+ .withArguments(typeVariables.length)
.message,
"buildTypeArguments",
-1,
@@ -220,13 +217,14 @@
Set<ClassBuilder> implemented = new Set<ClassBuilder>();
for (KernelTypeBuilder type in interfaces) {
if (type is KernelNamedTypeBuilder) {
+ int charOffset = -1; // TODO(ahe): Get offset from type.
Declaration decl = type.declaration;
if (decl is ClassBuilder) {
ClassBuilder interface = decl;
if (superClass == interface) {
- addCompileTimeError(
+ addProblem(
templateImplementsSuperClass.withArguments(interface.name),
- type.charOffset,
+ charOffset,
noLength);
} else if (implemented.contains(interface)) {
// Aggregate repetitions.
@@ -235,9 +233,9 @@
problems[interface] += 1;
problemsOffsets ??= new Map<ClassBuilder, int>();
- problemsOffsets[interface] ??= type.charOffset;
+ problemsOffsets[interface] ??= charOffset;
} else if (interface.target == coreTypes.futureOrClass) {
- addCompileTimeError(messageImplementsFutureOr, type.charOffset,
+ addProblem(messageImplementsFutureOr, charOffset,
interface.target.name.length);
} else {
implemented.add(interface);
@@ -247,7 +245,7 @@
}
if (problems != null) {
problems.forEach((ClassBuilder interface, int repetitions) {
- addCompileTimeError(
+ addProblem(
templateImplementsRepeated.withArguments(
interface.name, repetitions),
problemsOffsets[interface],
@@ -306,7 +304,7 @@
var message = templateRedirectionTargetNotFound
.withArguments(redirectionTarget.fullNameForErrors);
if (declaration.isConst) {
- addCompileTimeError(message, declaration.charOffset, noLength);
+ addProblem(message, declaration.charOffset, noLength);
} else {
addProblem(message, declaration.charOffset, noLength);
}
@@ -430,19 +428,14 @@
}
void checkAbstractMembers(CoreTypes coreTypes, ClassHierarchy hierarchy) {
- if (isAbstract ||
- hierarchy.getDispatchTarget(cls, noSuchMethodName).enclosingClass !=
- coreTypes.objectClass) {
+ if (isAbstract) {
// Unimplemented members allowed
- // TODO(dmitryas): Call hasUserDefinedNoSuchMethod instead when ready.
return;
}
List<LocatedMessage> context = null;
bool mustHaveImplementation(Member member) {
- // Forwarding stub
- if (member is Procedure && member.isSyntheticForwarder) return false;
// Public member
if (!member.name.isPrivate) return true;
// Private member in different library
@@ -453,6 +446,63 @@
return true;
}
+ bool isValidImplementation(Member interfaceMember, Member dispatchTarget,
+ {bool setters}) {
+ // If they're the exact same it's valid.
+ if (interfaceMember == dispatchTarget) return true;
+
+ if (interfaceMember is Procedure && dispatchTarget is Procedure) {
+ // E.g. getter vs method.
+ if (interfaceMember.kind != dispatchTarget.kind) return false;
+
+ if (dispatchTarget.function.positionalParameters.length <
+ interfaceMember.function.requiredParameterCount ||
+ dispatchTarget.function.positionalParameters.length <
+ interfaceMember.function.positionalParameters.length)
+ return false;
+
+ if (interfaceMember.function.requiredParameterCount <
+ dispatchTarget.function.requiredParameterCount) return false;
+
+ if (dispatchTarget.function.namedParameters.length <
+ interfaceMember.function.namedParameters.length) return false;
+
+ // Two Procedures of the same kind with the same number of parameters.
+ return true;
+ }
+
+ if ((interfaceMember is Field || interfaceMember is Procedure) &&
+ (dispatchTarget is Field || dispatchTarget is Procedure)) {
+ if (setters) {
+ bool interfaceMemberHasSetter =
+ (interfaceMember is Field && interfaceMember.hasSetter) ||
+ interfaceMember is Procedure && interfaceMember.isSetter;
+ bool dispatchTargetHasSetter =
+ (dispatchTarget is Field && dispatchTarget.hasSetter) ||
+ dispatchTarget is Procedure && dispatchTarget.isSetter;
+ // Combination of (settable) field and/or (procedure) setter is valid.
+ return interfaceMemberHasSetter && dispatchTargetHasSetter;
+ } else {
+ bool interfaceMemberHasGetter = interfaceMember is Field ||
+ interfaceMember is Procedure && interfaceMember.isGetter;
+ bool dispatchTargetHasGetter = dispatchTarget is Field ||
+ dispatchTarget is Procedure && dispatchTarget.isGetter;
+ // Combination of field and/or (procedure) getter is valid.
+ return interfaceMemberHasGetter && dispatchTargetHasGetter;
+ }
+ }
+
+ return unhandled(
+ "${interfaceMember.runtimeType} and ${dispatchTarget.runtimeType}",
+ "isValidImplementation",
+ interfaceMember.fileOffset,
+ interfaceMember.fileUri);
+ }
+
+ bool hasNoSuchMethod =
+ hierarchy.getDispatchTarget(cls, noSuchMethodName).enclosingClass !=
+ coreTypes.objectClass;
+
void findMissingImplementations({bool setters}) {
List<Member> dispatchTargets =
hierarchy.getDispatchTargets(cls, setters: setters);
@@ -466,12 +516,24 @@
0) {
targetIndex++;
}
- if (targetIndex >= dispatchTargets.length ||
+ bool foundTarget = targetIndex < dispatchTargets.length &&
ClassHierarchy.compareMembers(
- dispatchTargets[targetIndex], interfaceMember) >
- 0) {
+ dispatchTargets[targetIndex], interfaceMember) <=
+ 0;
+ bool hasProblem = true;
+ if (foundTarget &&
+ isValidImplementation(
+ interfaceMember, dispatchTargets[targetIndex],
+ setters: setters)) hasProblem = false;
+ if (hasNoSuchMethod && !foundTarget) hasProblem = false;
+ if (hasProblem) {
Name name = interfaceMember.name;
String displayName = name.name + (setters ? "=" : "");
+ if (interfaceMember is Procedure &&
+ interfaceMember.isSyntheticForwarder) {
+ Procedure forwarder = interfaceMember;
+ interfaceMember = forwarder.forwardingStubInterfaceTarget;
+ }
context ??= <LocatedMessage>[];
context.add(templateMissingImplementationCause
.withArguments(displayName)
@@ -815,13 +877,12 @@
interfaceType);
fileOffset = declaredParameter.fileOffset;
}
- library.addCompileTimeError(message, fileOffset, noLength, fileUri,
- context: [
- templateOverriddenMethodCause
- .withArguments(interfaceMember.name.name)
- .withLocation(_getMemberUri(interfaceMember),
- interfaceMember.fileOffset, noLength)
- ]);
+ library.addProblem(message, fileOffset, noLength, fileUri, context: [
+ templateOverriddenMethodCause
+ .withArguments(interfaceMember.name.name)
+ .withLocation(_getMemberUri(interfaceMember),
+ interfaceMember.fileOffset, noLength)
+ ]);
return true;
}
return false;
@@ -1067,7 +1128,7 @@
int originLength = typeVariables?.length ?? 0;
int patchLength = patch.typeVariables?.length ?? 0;
if (originLength != patchLength) {
- patch.addCompileTimeError(messagePatchClassTypeVariablesMismatch,
+ patch.addProblem(messagePatchClassTypeVariablesMismatch,
patch.charOffset, noLength, context: [
messagePatchClassOrigin.withLocation(fileUri, charOffset, noLength)
]);
@@ -1078,8 +1139,8 @@
}
}
} else {
- library.addCompileTimeError(messagePatchDeclarationMismatch,
- patch.charOffset, noLength, patch.fileUri, context: [
+ library.addProblem(messagePatchDeclarationMismatch, patch.charOffset,
+ noLength, patch.fileUri, context: [
messagePatchDeclarationOrigin.withLocation(
fileUri, charOffset, noLength)
]);
diff --git a/pkg/front_end/lib/src/fasta/kernel/kernel_enum_builder.dart b/pkg/front_end/lib/src/fasta/kernel/kernel_enum_builder.dart
index e098d26..9cdc301 100644
--- a/pkg/front_end/lib/src/fasta/kernel/kernel_enum_builder.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/kernel_enum_builder.dart
@@ -99,19 +99,16 @@
constantNamesAndOffsetsAndDocs ??= const <Object>[];
// TODO(ahe): These types shouldn't be looked up in scope, they come
// directly from dart:core.
- KernelTypeBuilder intType =
- new KernelNamedTypeBuilder(null, -1, "int", null);
- KernelTypeBuilder stringType =
- new KernelNamedTypeBuilder(null, -1, "String", null);
+ KernelTypeBuilder intType = new KernelNamedTypeBuilder("int", null);
+ KernelTypeBuilder stringType = new KernelNamedTypeBuilder("String", null);
KernelNamedTypeBuilder objectType =
- new KernelNamedTypeBuilder(null, -1, "Object", null);
+ new KernelNamedTypeBuilder("Object", null);
ShadowClass cls = new ShadowClass(name: name);
Map<String, MemberBuilder> members = <String, MemberBuilder>{};
Map<String, MemberBuilder> constructors = <String, MemberBuilder>{};
- KernelNamedTypeBuilder selfType =
- new KernelNamedTypeBuilder(null, -1, name, null);
- KernelTypeBuilder listType = new KernelNamedTypeBuilder(
- null, -1, "List", <KernelTypeBuilder>[selfType]);
+ KernelNamedTypeBuilder selfType = new KernelNamedTypeBuilder(name, null);
+ KernelTypeBuilder listType =
+ new KernelNamedTypeBuilder("List", <KernelTypeBuilder>[selfType]);
/// metadata class E {
/// final int index;
@@ -136,9 +133,9 @@
null,
<FormalParameterBuilder>[
new KernelFormalParameterBuilder(
- null, 0, intType, "index", true, parent, charOffset, 0, 0),
+ null, 0, intType, "index", true, parent, charOffset),
new KernelFormalParameterBuilder(
- null, 0, stringType, "_name", true, parent, charOffset, 0, 0)
+ null, 0, stringType, "_name", true, parent, charOffset)
],
parent,
charOffset,
@@ -164,24 +161,24 @@
charEndOffset);
members["toString"] = toStringBuilder;
String className = name;
- for (int i = 0; i < constantNamesAndOffsetsAndDocs.length; i += 5) {
- List<MetadataBuilder> metadata = constantNamesAndOffsetsAndDocs[i + 1];
- String name = constantNamesAndOffsetsAndDocs[i + 2];
- int charOffset = constantNamesAndOffsetsAndDocs[i + 3];
- String documentationComment = constantNamesAndOffsetsAndDocs[i + 4];
+ for (int i = 0; i < constantNamesAndOffsetsAndDocs.length; i += 4) {
+ List<MetadataBuilder> metadata = constantNamesAndOffsetsAndDocs[i];
+ String name = constantNamesAndOffsetsAndDocs[i + 1];
+ int charOffset = constantNamesAndOffsetsAndDocs[i + 2];
+ String documentationComment = constantNamesAndOffsetsAndDocs[i + 3];
if (members.containsKey(name)) {
- parent.addCompileTimeError(templateDuplicatedName.withArguments(name),
+ parent.addProblem(templateDuplicatedName.withArguments(name),
charOffset, noLength, parent.fileUri);
- constantNamesAndOffsetsAndDocs[i + 2] = null;
+ constantNamesAndOffsetsAndDocs[i + 1] = null;
continue;
}
if (name == className) {
- parent.addCompileTimeError(
+ parent.addProblem(
templateEnumConstantSameNameAsEnclosing.withArguments(name),
charOffset,
noLength,
parent.fileUri);
- constantNamesAndOffsetsAndDocs[i + 2] = null;
+ constantNamesAndOffsetsAndDocs[i + 1] = null;
continue;
}
KernelFieldBuilder fieldBuilder = new KernelFieldBuilder(
@@ -253,8 +250,8 @@
toStringBuilder.body = new ReturnStatement(
new DirectPropertyGet(new ThisExpression(), nameField));
List<Expression> values = <Expression>[];
- for (int i = 0; i < constantNamesAndOffsetsAndDocs.length; i += 5) {
- String name = constantNamesAndOffsetsAndDocs[i + 2];
+ for (int i = 0; i < constantNamesAndOffsetsAndDocs.length; i += 4) {
+ String name = constantNamesAndOffsetsAndDocs[i + 1];
if (name != null) {
KernelFieldBuilder builder = this[name];
values.add(new StaticGet(builder.build(libraryBuilder)));
@@ -284,15 +281,15 @@
// unnamed constructor requires no arguments. But that information isn't
// always available at this point, and it's not really a situation that
// can happen unless you start modifying the SDK sources.
- addCompileTimeError(messageNoUnnamedConstructorInObject, -1, noLength);
+ addProblem(messageNoUnnamedConstructorInObject, -1, noLength);
} else {
constructor.initializers.add(
new SuperInitializer(superConstructor.target, new Arguments.empty())
..parent = constructor);
}
int index = 0;
- for (int i = 0; i < constantNamesAndOffsetsAndDocs.length; i += 5) {
- String constant = constantNamesAndOffsetsAndDocs[i + 2];
+ for (int i = 0; i < constantNamesAndOffsetsAndDocs.length; i += 4) {
+ String constant = constantNamesAndOffsetsAndDocs[i + 1];
if (constant != null) {
KernelFieldBuilder field = this[constant];
field.build(libraryBuilder);
diff --git a/pkg/front_end/lib/src/fasta/kernel/kernel_expression_generator.dart b/pkg/front_end/lib/src/fasta/kernel/kernel_expression_generator.dart
index 004ea06..9ecc44b 100644
--- a/pkg/front_end/lib/src/fasta/kernel/kernel_expression_generator.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/kernel_expression_generator.dart
@@ -75,7 +75,6 @@
import 'kernel_ast_api.dart'
show
- ArgumentsJudgment,
ComplexAssignmentJudgment,
Constructor,
DartType,
@@ -142,8 +141,7 @@
}
@override
- Expression buildAssignment(Expression value,
- {bool voidContext: false, int offset: -1}) {
+ Expression buildAssignment(Expression value, {bool voidContext: false}) {
var complexAssignment = startComplexAssignment(value);
return _finish(_makeSimpleWrite(value, voidContext, complexAssignment),
complexAssignment);
@@ -200,8 +198,8 @@
{int offset: TreeNode.noOffset,
bool voidContext: false,
Procedure interfaceTarget}) {
- return buildCompoundAssignment(binaryOperator,
- forest.literalInt(1, null, isSynthetic: true)..fileOffset = offset,
+ return buildCompoundAssignment(
+ binaryOperator, forest.literalInt(1, null)..fileOffset = offset,
offset: offset,
voidContext: voidContext,
interfaceTarget: interfaceTarget,
@@ -214,8 +212,8 @@
bool voidContext: false,
Procedure interfaceTarget}) {
if (voidContext) {
- return buildCompoundAssignment(binaryOperator,
- forest.literalInt(1, null, isSynthetic: true)..fileOffset = offset,
+ return buildCompoundAssignment(
+ binaryOperator, forest.literalInt(1, null)..fileOffset = offset,
offset: offset,
voidContext: voidContext,
interfaceTarget: interfaceTarget,
@@ -242,7 +240,7 @@
return new SyntheticExpressionJudgment(helper.throwNoSuchMethodError(
forest.literalNull(token),
plainNameForRead,
- forest.argumentsEmpty(noLocation, noLocation),
+ forest.argumentsEmpty(noLocation),
offsetForToken(token),
isGetter: true));
}
@@ -252,7 +250,7 @@
return buildInvalidWriteJudgment(helper.throwNoSuchMethodError(
forest.literalNull(token),
plainNameForRead,
- forest.arguments(<Expression>[value], noLocation, noLocation),
+ forest.arguments(<Expression>[value], noLocation),
offsetForToken(token),
isSetter: true));
}
@@ -502,8 +500,7 @@
@override
ComplexAssignmentJudgment startComplexAssignment(Expression rhs) =>
- new PropertyAssignmentJudgment(null, rhs,
- isSyntheticLhs: token.isSynthetic);
+ new PropertyAssignmentJudgment(null, rhs);
@override
void printOn(StringSink sink) {
@@ -659,7 +656,7 @@
Expression doInvocation(int offset, Arguments arguments) {
if (helper.constantContext != ConstantContext.none) {
// TODO(brianwilkerson) Fix the length
- helper.addCompileTimeError(messageNotAConstantExpression, offset, 1);
+ helper.addProblem(messageNotAConstantExpression, offset, 1);
}
if (getter == null || isFieldOrGetter(getter)) {
return helper.buildMethodInvocation(
@@ -693,10 +690,6 @@
class KernelIndexedAccessGenerator extends KernelGenerator
with IndexedAccessGenerator {
- final Token openSquareBracket;
-
- final Token closeSquareBracket;
-
final Expression receiver;
final Expression index;
@@ -709,15 +702,9 @@
VariableDeclaration indexVariable;
- KernelIndexedAccessGenerator.internal(
- ExpressionGeneratorHelper helper,
- this.openSquareBracket,
- this.closeSquareBracket,
- this.receiver,
- this.index,
- this.getter,
- this.setter)
- : super(helper, openSquareBracket);
+ KernelIndexedAccessGenerator.internal(ExpressionGeneratorHelper helper,
+ Token token, this.receiver, this.index, this.getter, this.setter)
+ : super(helper, token);
Expression indexAccess() {
indexVariable ??= new VariableDeclaration.forValue(index);
@@ -734,11 +721,8 @@
@override
Expression _makeSimpleRead() {
- var read = new MethodInvocationJudgment(
- receiver,
- indexGetName,
- forest.castArguments(forest.arguments(
- <Expression>[index], openSquareBracket, closeSquareBracket)),
+ var read = new MethodInvocationJudgment(receiver, indexGetName,
+ forest.castArguments(forest.arguments(<Expression>[index], token)),
interfaceTarget: getter)
..fileOffset = offsetForToken(token);
return read;
@@ -751,8 +735,8 @@
var write = new MethodInvocationJudgment(
receiver,
indexSetName,
- forest.castArguments(forest.arguments(
- <Expression>[index, value], openSquareBracket, closeSquareBracket)),
+ forest
+ .castArguments(forest.arguments(<Expression>[index, value], token)),
interfaceTarget: setter)
..fileOffset = offsetForToken(token);
complexAssignment?.write = write;
@@ -764,8 +748,8 @@
var read = new MethodInvocationJudgment(
receiverAccess(),
indexGetName,
- forest.castArguments(forest.arguments(<Expression>[indexAccess()],
- openSquareBracket, closeSquareBracket)),
+ forest.castArguments(
+ forest.arguments(<Expression>[indexAccess()], token)),
interfaceTarget: getter)
..fileOffset = offsetForToken(token);
complexAssignment?.read = read;
@@ -779,10 +763,8 @@
var write = new MethodInvocationJudgment(
receiverAccess(),
indexSetName,
- forest.castArguments(forest.arguments(
- <Expression>[indexAccess(), value],
- openSquareBracket,
- closeSquareBracket)),
+ forest.castArguments(
+ forest.arguments(<Expression>[indexAccess(), value], token)),
interfaceTarget: setter)
..fileOffset = offsetForToken(token);
complexAssignment?.write = write;
@@ -801,8 +783,7 @@
indexSetName,
forest.castArguments(forest.arguments(
<Expression>[indexAccess(), new VariableGet(valueVariable)],
- openSquareBracket,
- closeSquareBracket)),
+ token)),
interfaceTarget: setter)
..fileOffset = offsetForToken(token);
complexAssignment?.write = write;
@@ -854,10 +835,6 @@
class KernelThisIndexedAccessGenerator extends KernelGenerator
with ThisIndexedAccessGenerator {
- final Token openSquareBracket;
-
- final Token closeSquareBracket;
-
final Expression index;
final Procedure getter;
@@ -866,14 +843,9 @@
VariableDeclaration indexVariable;
- KernelThisIndexedAccessGenerator(
- ExpressionGeneratorHelper helper,
- this.openSquareBracket,
- this.closeSquareBracket,
- this.index,
- this.getter,
- this.setter)
- : super(helper, openSquareBracket);
+ KernelThisIndexedAccessGenerator(ExpressionGeneratorHelper helper,
+ Token token, this.index, this.getter, this.setter)
+ : super(helper, token);
Expression indexAccess() {
indexVariable ??= new VariableDeclaration.forValue(index);
@@ -888,8 +860,7 @@
indexSetName,
forest.castArguments(forest.arguments(
<Expression>[indexAccess(), new VariableGet(valueVariable)],
- openSquareBracket,
- closeSquareBracket)),
+ token)),
interfaceTarget: setter)
..fileOffset = offsetForToken(token);
complexAssignment?.write = write;
@@ -903,8 +874,7 @@
return new MethodInvocationJudgment(
forest.thisExpression(token),
indexGetName,
- forest.castArguments(forest.arguments(
- <Expression>[index], openSquareBracket, closeSquareBracket)),
+ forest.castArguments(forest.arguments(<Expression>[index], token)),
interfaceTarget: getter)
..fileOffset = offsetForToken(token);
}
@@ -916,8 +886,8 @@
var write = new MethodInvocationJudgment(
forest.thisExpression(token),
indexSetName,
- forest.castArguments(forest.arguments(
- <Expression>[index, value], openSquareBracket, closeSquareBracket)),
+ forest
+ .castArguments(forest.arguments(<Expression>[index, value], token)),
interfaceTarget: setter)
..fileOffset = offsetForToken(token);
complexAssignment?.write = write;
@@ -929,8 +899,8 @@
var read = new MethodInvocationJudgment(
forest.thisExpression(token),
indexGetName,
- forest.castArguments(forest.arguments(<Expression>[indexAccess()],
- openSquareBracket, closeSquareBracket)),
+ forest.castArguments(
+ forest.arguments(<Expression>[indexAccess()], token)),
interfaceTarget: getter)
..fileOffset = offsetForToken(token);
complexAssignment?.read = read;
@@ -944,10 +914,8 @@
var write = new MethodInvocationJudgment(
forest.thisExpression(token),
indexSetName,
- forest.castArguments(forest.arguments(
- <Expression>[indexAccess(), value],
- openSquareBracket,
- closeSquareBracket)),
+ forest.castArguments(
+ forest.arguments(<Expression>[indexAccess(), value], token)),
interfaceTarget: setter)
..fileOffset = offsetForToken(token);
complexAssignment?.write = write;
@@ -987,10 +955,6 @@
class KernelSuperIndexedAccessGenerator extends KernelGenerator
with SuperIndexedAccessGenerator {
- final Token openSquareBracket;
-
- final Token closeSquareBracket;
-
final Expression index;
final Member getter;
@@ -999,14 +963,9 @@
VariableDeclaration indexVariable;
- KernelSuperIndexedAccessGenerator(
- ExpressionGeneratorHelper helper,
- this.openSquareBracket,
- this.closeSquareBracket,
- this.index,
- this.getter,
- this.setter)
- : super(helper, openSquareBracket);
+ KernelSuperIndexedAccessGenerator(ExpressionGeneratorHelper helper,
+ Token token, this.index, this.getter, this.setter)
+ : super(helper, token);
Expression indexAccess() {
indexVariable ??= new VariableDeclaration.forValue(index);
@@ -1024,8 +983,7 @@
indexSetName,
forest.castArguments(forest.arguments(
<Expression>[indexAccess(), new VariableGet(valueVariable)],
- openSquareBracket,
- closeSquareBracket)),
+ token)),
setter)
..fileOffset = offsetForToken(token);
complexAssignment?.write = write;
@@ -1041,10 +999,8 @@
isSuper: true);
}
// TODO(ahe): Use [DirectMethodInvocation] when possible.
- return new SuperMethodInvocationJudgment(
- indexGetName,
- forest.castArguments(forest.arguments(
- <Expression>[index], openSquareBracket, closeSquareBracket)),
+ return new SuperMethodInvocationJudgment(indexGetName,
+ forest.castArguments(forest.arguments(<Expression>[index], token)),
interfaceTarget: getter)
..fileOffset = offsetForToken(token);
}
@@ -1059,8 +1015,8 @@
}
var write = new SuperMethodInvocation(
indexSetName,
- forest.castArguments(forest.arguments(
- <Expression>[index, value], openSquareBracket, closeSquareBracket)),
+ forest
+ .castArguments(forest.arguments(<Expression>[index, value], token)),
setter)
..fileOffset = offsetForToken(token);
complexAssignment?.write = write;
@@ -1075,8 +1031,8 @@
}
var read = new SuperMethodInvocation(
indexGetName,
- forest.castArguments(forest.arguments(<Expression>[indexAccess()],
- openSquareBracket, closeSquareBracket)),
+ forest.castArguments(
+ forest.arguments(<Expression>[indexAccess()], token)),
getter)
..fileOffset = offsetForToken(token);
complexAssignment?.read = read;
@@ -1093,10 +1049,8 @@
}
var write = new SuperMethodInvocation(
indexSetName,
- forest.castArguments(forest.arguments(
- <Expression>[indexAccess(), value],
- openSquareBracket,
- closeSquareBracket)),
+ forest.castArguments(
+ forest.arguments(<Expression>[indexAccess(), value], token)),
setter)
..fileOffset = offsetForToken(token);
complexAssignment?.write = write;
@@ -1149,9 +1103,6 @@
super(helper, token);
@override
- Node get fieldInitializerTarget => readTarget;
-
- @override
String get plainNameForRead => (readTarget ?? writeTarget).name.name;
@override
@@ -1191,14 +1142,16 @@
}
@override
- Expression doInvocation(int offset, ArgumentsJudgment arguments) {
+ Expression doInvocation(int offset, Arguments arguments) {
Expression error;
if (helper.constantContext != ConstantContext.none &&
!helper.isIdentical(readTarget)) {
- error = helper.buildCompileTimeError(
- templateNotConstantExpression.withArguments('Method invocation'),
- offset,
- readTarget?.name?.name?.length ?? 0);
+ error = helper
+ .buildProblem(
+ templateNotConstantExpression.withArguments('Method invocation'),
+ offset,
+ readTarget?.name?.name?.length ?? 0)
+ .desugared /* TODO(ahe): Remove `.desugared`? */;
}
if (readTarget == null || isFieldOrGetter(readTarget)) {
return helper.buildMethodInvocation(buildSimpleRead(), callName,
@@ -1321,51 +1274,32 @@
@override
Expression get expression {
if (super.expression == null) {
- super.expression = computeExpression();
+ int offset = offsetForToken(token);
+ if (declaration is KernelInvalidTypeBuilder) {
+ KernelInvalidTypeBuilder declaration = this.declaration;
+ helper.addProblemErrorIfConst(
+ declaration.message.messageObject, offset, token.length);
+ super.expression = new SyntheticExpressionJudgment(
+ new Throw(forest.literalString(declaration.message.message, token))
+ ..fileOffset = offset);
+ } else {
+ super.expression = forest.literalType(
+ buildTypeWithBuiltArguments(null, nonInstanceAccessIsError: true),
+ token);
+ }
}
return super.expression;
}
- Expression computeExpression({bool silent: false}) {
- int offset = offsetForToken(token);
- if (declaration is KernelInvalidTypeBuilder) {
- KernelInvalidTypeBuilder declaration = this.declaration;
- if (!silent) {
- helper.addProblemErrorIfConst(
- declaration.message.messageObject, offset, token.length);
- }
- return new UnresolvedVariableGetJudgment(
- new Throw(forest.literalString(declaration.message.message, token))
- ..fileOffset = offset,
- token.isSynthetic)
- ..fileOffset = offset;
- } else {
- return forest.literalType(
- buildTypeWithBuiltArguments(null, nonInstanceAccessIsError: true),
- token);
- }
- }
-
- @override
- Node get fieldInitializerTarget =>
- declaration.hasTarget ? declaration.target : null;
-
@override
Expression makeInvalidWrite(Expression value) {
- var read = computeExpression(silent: true);
- // The read needs to have a parent so that type inference can be applied to
- // it, but it doesn't mater what the parent is because the final read won't
- // appear in the tree. So just give it a quick and dirty parent.
- new VariableDeclaration.forValue(read);
-
- var throwExpr = helper.throwNoSuchMethodError(
+ return new SyntheticExpressionJudgment(helper.throwNoSuchMethodError(
forest.literalNull(token),
plainNameForRead,
- forest.arguments(<Expression>[value], noLocation, noLocation)
+ forest.arguments(<Expression>[value], null)
..fileOffset = value.fileOffset,
offsetForToken(token),
- isSetter: true);
- return new SyntheticExpressionJudgment(throwExpr, original: read);
+ isSetter: true));
}
@override
@@ -1495,30 +1429,23 @@
: super(helper, token);
@override
- Expression _makeSimpleRead() {
- return _buildErrorIntLiteral();
- }
+ Expression _makeSimpleRead() => new SyntheticExpressionJudgment(buildError());
@override
Expression _makeSimpleWrite(Expression value, bool voidContext,
ComplexAssignmentJudgment complexAssignment) {
- return _buildErrorIntLiteral();
+ return new SyntheticExpressionJudgment(buildError());
}
@override
Expression _makeRead(ComplexAssignmentJudgment complexAssignment) {
- return _buildErrorIntLiteral();
+ return new SyntheticExpressionJudgment(buildError());
}
@override
Expression _makeWrite(Expression value, bool voidContext,
ComplexAssignmentJudgment complexAssignment) {
- return _buildErrorIntLiteral();
- }
-
- Expression _buildErrorIntLiteral() {
- var error = buildError();
- return forest.literalInt(0, token, desugaredError: error);
+ return new SyntheticExpressionJudgment(buildError());
}
}
@@ -1532,8 +1459,7 @@
: super(helper, token);
@override
- Expression buildAssignment(Expression value,
- {bool voidContext: false, int offset: -1}) {
+ Expression buildAssignment(Expression value, {bool voidContext: false}) {
return _buildUnresolvedVariableAssignment(false, value);
}
@@ -1549,8 +1475,7 @@
@override
Expression buildSimpleRead() {
- Expression error =
- buildError(forest.argumentsEmpty(token, token), isGetter: true);
+ Expression error = buildError(forest.argumentsEmpty(token), isGetter: true);
return new UnresolvedVariableGetJudgment(error, token.isSynthetic)
..fileOffset = token.charOffset;
}
@@ -1574,12 +1499,10 @@
UnresolvedVariableAssignmentJudgment _buildUnresolvedVariableAssignment(
bool isCompound, Expression value) {
return new UnresolvedVariableAssignmentJudgment(
- buildError(forest.arguments(<Expression>[value], token, token),
- isSetter: true),
- isCompound,
- value,
- token.isSynthetic)
- ..fileOffset = token.charOffset;
+ buildError(forest.arguments(<Expression>[value], token), isSetter: true),
+ isCompound,
+ value,
+ )..fileOffset = token.charOffset;
}
}
@@ -1599,8 +1522,7 @@
super(helper, token);
@override
- Expression buildAssignment(Expression value,
- {bool voidContext, int offset: -1}) {
+ Expression buildAssignment(Expression value, {bool voidContext}) {
return new PropertySet(receiver, name, value)
..fileOffset = offsetForToken(token);
}
@@ -1705,9 +1627,9 @@
return new MethodInvocationJudgment(
left,
operator,
- helper.forest.castArguments(
- helper.forest.arguments(<Expression>[right], noLocation, noLocation))
- ..fileOffset = offset,
+ helper.forest
+ .castArguments(helper.forest.arguments(<Expression>[right], null))
+ ..fileOffset = offset,
interfaceTarget: interfaceTarget)
..fileOffset = offset;
}
diff --git a/pkg/front_end/lib/src/fasta/kernel/kernel_expression_generator_impl.dart b/pkg/front_end/lib/src/fasta/kernel/kernel_expression_generator_impl.dart
index c9cfbf9..e39f5d42 100644
--- a/pkg/front_end/lib/src/fasta/kernel/kernel_expression_generator_impl.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/kernel_expression_generator_impl.dart
@@ -36,26 +36,29 @@
Expression buildSimpleRead() {
if (!isSuper) {
if (inFieldInitializer) {
- return buildFieldInitializerError();
+ return buildFieldInitializerError(null);
} else {
return forest.thisExpression(token);
}
} else {
- return new SyntheticExpressionJudgment(helper.buildCompileTimeError(
- messageSuperAsExpression,
- offsetForToken(token),
- lengthForToken(token)));
+ return helper.buildProblem(messageSuperAsExpression,
+ offsetForToken(token), lengthForToken(token));
}
}
- @override
- Expression buildFieldInitializerError() {
+ SyntheticExpressionJudgment buildFieldInitializerError(
+ Map<String, int> initializedFields) {
String keyword = isSuper ? "super" : "this";
- int offset = offsetForToken(token);
- return helper.buildCompileTimeErrorExpression(
+ return helper.buildProblem(
templateThisOrSuperAccessInFieldInitializer.withArguments(keyword),
- offset,
- length: keyword.length);
+ offsetForToken(token),
+ keyword.length);
+ }
+
+ @override
+ Initializer buildFieldInitializer(Map<String, int> initializedFields) {
+ Expression error = buildFieldInitializerError(initializedFields).desugared;
+ return helper.buildInvalidInitializer(error, error.fileOffset);
}
buildPropertyAccess(
@@ -65,13 +68,13 @@
int offset = offsetForToken(send.token);
if (isInitializer && send is SendAccessGenerator) {
if (isNullAware) {
- helper.addCompileTimeError(
+ helper.addProblem(
messageInvalidUseOfNullAwareAccess, operatorOffset, 2);
}
return buildConstructorInitializer(offset, name, arguments);
}
if (inFieldInitializer && !isInitializer) {
- return buildFieldInitializerError();
+ return buildFieldInitializerError(null);
}
Member getter = helper.lookupInstanceMember(name, isSuper: isSuper);
if (send is SendAccessGenerator) {
@@ -101,8 +104,7 @@
if (isInitializer) {
return buildConstructorInitializer(offset, new Name(""), arguments);
} else if (isSuper) {
- return new SyntheticExpressionJudgment(helper.buildCompileTimeError(
- messageSuperAsExpression, offset, noLength));
+ return helper.buildProblem(messageSuperAsExpression, offset, noLength);
} else {
return helper.buildMethodInvocation(
forest.thisExpression(null), callName, arguments, offset,
@@ -135,8 +137,7 @@
}
}
- Expression buildAssignment(Expression value,
- {bool voidContext: false, int offset: -1}) {
+ Expression buildAssignment(Expression value, {bool voidContext: false}) {
return buildAssignmentError();
}
@@ -170,10 +171,10 @@
}
Expression buildAssignmentError() {
- return helper.buildCompileTimeError(
- isSuper ? messageCannotAssignToSuper : messageNotAnLvalue,
- offsetForToken(token),
- token.length);
+ return helper
+ .buildProblem(isSuper ? messageCannotAssignToSuper : messageNotAnLvalue,
+ offsetForToken(token), token.length)
+ .desugared;
}
@override
@@ -222,7 +223,7 @@
offset = offsetForToken(token);
length = lengthForToken(token);
}
- return helper.buildCompileTimeError(message, offset, length);
+ return helper.buildProblem(message, offset, length).desugared;
}
@override
@@ -230,7 +231,7 @@
@override
Expression buildSimpleRead() {
- var error = buildError(forest.argumentsEmpty(token, token), isGetter: true);
+ var error = buildError(forest.argumentsEmpty(token), isGetter: true);
return new InvalidPropertyGetJudgment(error, member)
..fileOffset = offsetForToken(token);
}
@@ -261,8 +262,7 @@
return unsupported("buildSimpleRead", offsetForToken(token), uri);
}
- Expression buildAssignment(Expression value,
- {bool voidContext: false, int offset: -1}) {
+ Expression buildAssignment(Expression value, {bool voidContext: false}) {
return unsupported("buildAssignment", offsetForToken(token), uri);
}
@@ -333,8 +333,7 @@
return unsupported("buildSimpleRead", offsetForToken(token), uri);
}
- Expression buildAssignment(Expression value,
- {bool voidContext: false, int offset: -1}) {
+ Expression buildAssignment(Expression value, {bool voidContext: false}) {
return unsupported("buildAssignment", offsetForToken(token), uri);
}
@@ -379,26 +378,6 @@
}
}
-class KernelNonLValueGenerator extends KernelReadOnlyAccessGenerator {
- KernelNonLValueGenerator(
- ExpressionGeneratorHelper helper, Token token, Expression expression)
- : super(helper, token, expression, null);
-
- String get debugName => "KernelNonLValueGenerator";
-
- @override
- ComplexAssignmentJudgment startComplexAssignment(Expression rhs) {
- return new IllegalAssignmentJudgment(rhs,
- assignmentOffset: offsetForToken(token));
- }
-
- Expression makeInvalidWrite(Expression value) {
- var error = helper.buildCompileTimeError(
- messageNotAnLvalue, offsetForToken(token), lengthForToken(token));
- return new InvalidWriteJudgment(error, expression);
- }
-}
-
class ParenthesizedExpressionGenerator extends KernelReadOnlyAccessGenerator {
ParenthesizedExpressionGenerator(
ExpressionGeneratorHelper helper, Token token, Expression expression)
@@ -413,10 +392,11 @@
}
Expression makeInvalidWrite(Expression value) {
- var error = helper.buildCompileTimeError(
- messageCannotAssignToParenthesizedExpression,
- offsetForToken(token),
- lengthForToken(token));
- return new InvalidWriteJudgment(error, expression);
+ return new InvalidWriteJudgment(
+ helper
+ .buildProblem(messageCannotAssignToParenthesizedExpression,
+ offsetForToken(token), lengthForToken(token))
+ .desugared,
+ expression);
}
}
diff --git a/pkg/front_end/lib/src/fasta/kernel/kernel_field_builder.dart b/pkg/front_end/lib/src/fasta/kernel/kernel_field_builder.dart
index 516bb9b..e2b769e 100644
--- a/pkg/front_end/lib/src/fasta/kernel/kernel_field_builder.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/kernel_field_builder.dart
@@ -85,9 +85,6 @@
return field;
}
- @override
- bool get hasTarget => true;
-
Field get target => field;
@override
diff --git a/pkg/front_end/lib/src/fasta/kernel/kernel_formal_parameter_builder.dart b/pkg/front_end/lib/src/fasta/kernel/kernel_formal_parameter_builder.dart
index 28731e1..b41180a 100644
--- a/pkg/front_end/lib/src/fasta/kernel/kernel_formal_parameter_builder.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/kernel_formal_parameter_builder.dart
@@ -4,7 +4,7 @@
library fasta.kernel_formal_parameter_builder;
-import 'kernel_shadow_ast.dart' show VariableDeclarationJudgment;
+import 'package:kernel/ast.dart' show VariableDeclaration;
import '../modifier.dart' show finalMask;
@@ -15,14 +15,11 @@
KernelTypeBuilder,
MetadataBuilder;
-import '../source/source_library_builder.dart' show SourceLibraryBuilder;
+import 'kernel_shadow_ast.dart' show VariableDeclarationJudgment;
class KernelFormalParameterBuilder
extends FormalParameterBuilder<KernelTypeBuilder> {
- VariableDeclarationJudgment declaration;
- final int charOffset;
- final int codeStartOffset;
- final int codeEndOffset;
+ VariableDeclaration declaration;
KernelFormalParameterBuilder(
List<MetadataBuilder> metadata,
@@ -31,18 +28,13 @@
String name,
bool hasThis,
KernelLibraryBuilder compilationUnit,
- this.charOffset,
- this.codeStartOffset,
- this.codeEndOffset)
+ int charOffset)
: super(metadata, modifiers, type, name, hasThis, compilationUnit,
charOffset);
- @override
- bool get hasTarget => true;
+ VariableDeclaration get target => declaration;
- VariableDeclarationJudgment get target => declaration;
-
- VariableDeclarationJudgment build(SourceLibraryBuilder library) {
+ VariableDeclaration build(KernelLibraryBuilder library) {
if (declaration == null) {
declaration = new VariableDeclarationJudgment(name, 0,
type: type?.build(library),
@@ -51,8 +43,6 @@
isFieldFormal: hasThis,
isCovariant: isCovariant)
..fileOffset = charOffset;
- library.loader.target.metadataCollector
- ?.setCodeStartEnd(declaration, codeStartOffset, codeEndOffset);
}
return declaration;
}
@@ -62,16 +52,8 @@
assert(declaration != null);
return !hasThis
? this
- : (new KernelFormalParameterBuilder(
- metadata,
- modifiers | finalMask,
- type,
- name,
- hasThis,
- parent,
- charOffset,
- codeStartOffset,
- codeEndOffset)
+ : (new KernelFormalParameterBuilder(metadata, modifiers | finalMask,
+ type, name, hasThis, parent, charOffset)
..declaration = declaration);
}
}
diff --git a/pkg/front_end/lib/src/fasta/kernel/kernel_function_type_alias_builder.dart b/pkg/front_end/lib/src/fasta/kernel/kernel_function_type_alias_builder.dart
index 437b729..b36a54e 100644
--- a/pkg/front_end/lib/src/fasta/kernel/kernel_function_type_alias_builder.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/kernel_function_type_alias_builder.dart
@@ -35,7 +35,6 @@
class KernelFunctionTypeAliasBuilder
extends FunctionTypeAliasBuilder<KernelFunctionTypeBuilder, DartType> {
- final bool hasTarget = true;
final Typedef target;
DartType thisType;
@@ -71,7 +70,6 @@
if (type.formals != null) {
for (KernelFormalParameterBuilder formal in type.formals) {
VariableDeclaration parameter = formal.build(libraryBuilder);
- parameter.parent = target;
parameter.type = freshTypeParameters.substitute(parameter.type);
if (formal.isNamed) {
target.namedParameters.add(parameter);
@@ -88,7 +86,7 @@
DartType buildThisType(LibraryBuilder library) {
if (thisType != null) {
if (const InvalidType() == thisType) {
- library.addCompileTimeError(templateCyclicTypedef.withArguments(name),
+ library.addProblem(templateCyclicTypedef.withArguments(name),
charOffset, noLength, fileUri);
return const DynamicType();
}
@@ -144,7 +142,7 @@
// That should be caught and reported as a compile-time error earlier.
return unhandled(
templateTypeArgumentMismatch
- .withArguments(name, typeVariables.length)
+ .withArguments(typeVariables.length)
.message,
"buildTypeArguments",
-1,
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 9a86218..b6ad44c 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
@@ -13,12 +13,11 @@
Supertype,
TypeParameter;
-import '../fasta_codes.dart' show messageSupertypeIsFunction, noLength;
+import '../fasta_codes.dart'
+ show LocatedMessage, messageSupertypeIsFunction, noLength;
import '../problems.dart' show unsupported;
-import '../source/outline_listener.dart';
-
import 'kernel_builder.dart'
show
FormalParameterBuilder,
@@ -32,12 +31,7 @@
class KernelFunctionTypeBuilder extends FunctionTypeBuilder
implements KernelTypeBuilder {
- final OutlineListener outlineListener;
- final int charOffset;
-
KernelFunctionTypeBuilder(
- this.outlineListener,
- this.charOffset,
KernelTypeBuilder returnType,
List<TypeVariableBuilder> typeVariables,
List<FormalParameterBuilder> formals)
@@ -71,17 +65,15 @@
typeParameters.add(t.parameter);
}
}
- var type = new FunctionType(positionalParameters, builtReturnType,
+ return new FunctionType(positionalParameters, builtReturnType,
namedParameters: namedParameters ?? const <NamedType>[],
typeParameters: typeParameters ?? const <TypeParameter>[],
requiredParameterCount: requiredParameterCount);
- outlineListener?.store(charOffset, false, type: type);
- return type;
}
Supertype buildSupertype(
LibraryBuilder library, int charOffset, Uri fileUri) {
- library.addCompileTimeError(
+ library.addProblem(
messageSupertypeIsFunction, charOffset, noLength, fileUri);
return null;
}
@@ -92,8 +84,8 @@
}
@override
- buildInvalidType(int charOffset, Uri fileUri) {
- return unsupported("buildInvalidType", charOffset, fileUri);
+ buildInvalidType(LocatedMessage message) {
+ return unsupported("buildInvalidType", message.charOffset, message.uri);
}
KernelFunctionTypeBuilder clone(List<TypeBuilder> newTypes) {
@@ -108,11 +100,7 @@
clonedFormals[i] = formals[i].clone(newTypes);
}
KernelFunctionTypeBuilder newType = new KernelFunctionTypeBuilder(
- outlineListener,
- charOffset,
- returnType.clone(newTypes),
- clonedTypeVariables,
- clonedFormals);
+ returnType.clone(newTypes), clonedTypeVariables, clonedFormals);
newTypes.add(newType);
return newType;
}
diff --git a/pkg/front_end/lib/src/fasta/kernel/kernel_invalid_type_builder.dart b/pkg/front_end/lib/src/fasta/kernel/kernel_invalid_type_builder.dart
index f2297e5..a515299 100644
--- a/pkg/front_end/lib/src/fasta/kernel/kernel_invalid_type_builder.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/kernel_invalid_type_builder.dart
@@ -6,8 +6,7 @@
import 'package:kernel/ast.dart' show DartType, InvalidType;
-import '../fasta_codes.dart'
- show LocatedMessage, Message, noLength, templateTypeNotFound;
+import '../fasta_codes.dart' show LocatedMessage;
import 'kernel_builder.dart'
show InvalidTypeBuilder, KernelTypeBuilder, LibraryBuilder;
@@ -17,11 +16,11 @@
@override
final LocatedMessage message;
- KernelInvalidTypeBuilder(String name, int charOffset, Uri fileUri,
- [Message message])
- : message = (message ?? templateTypeNotFound.withArguments(name))
- .withLocation(fileUri, charOffset, noLength),
- super(name, charOffset, fileUri);
+ final bool suppressMessage;
+
+ KernelInvalidTypeBuilder(String name, this.message,
+ [this.suppressMessage = false])
+ : super(name, message.charOffset, message.uri);
@override
InvalidType get target => const InvalidType();
@@ -34,8 +33,10 @@
/// [Arguments] have already been built.
DartType buildTypesWithBuiltArguments(
LibraryBuilder library, List<DartType> arguments) {
- library.addProblem(
- message.messageObject, message.charOffset, message.length, message.uri);
+ if (!suppressMessage) {
+ library.addProblem(message.messageObject, message.charOffset,
+ message.length, message.uri);
+ }
return const InvalidType();
}
}
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 5d79c08..e666eb4 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
@@ -158,9 +158,6 @@
KernelLibraryBuilder get origin => actualOrigin ?? this;
@override
- bool get hasTarget => true;
-
- @override
Library get target => library;
Uri get uri => library.importUri;
@@ -177,10 +174,7 @@
KernelTypeBuilder addNamedType(
Object name, List<KernelTypeBuilder> arguments, int charOffset) {
- return addType(
- new KernelNamedTypeBuilder(
- outlineListener, charOffset, name, arguments),
- charOffset);
+ return addType(new KernelNamedTypeBuilder(name, arguments), charOffset);
}
KernelTypeBuilder addMixinApplication(KernelTypeBuilder supertype,
@@ -206,9 +200,7 @@
int startCharOffset,
int charOffset,
int charEndOffset,
- int supertypeOffset,
- int codeStartOffset,
- int codeEndOffset) {
+ int supertypeOffset) {
// Nested declaration began in `OutlineBuilder.beginClassDeclaration`.
var declaration = endNestedDeclaration(className)
..resolveTypes(typeVariables, this);
@@ -242,8 +234,6 @@
charEndOffset);
loader.target.metadataCollector
?.setDocumentationComment(cls.target, documentationComment);
- loader.target.metadataCollector
- ?.setCodeStartEnd(cls.target, codeStartOffset, codeEndOffset);
constructorReferences.clear();
Map<String, TypeVariableBuilder> typeVariablesByName =
@@ -259,10 +249,8 @@
if (typeVariablesByName != null) {
TypeVariableBuilder tv = typeVariablesByName[name];
if (tv != null) {
- cls.addCompileTimeError(
- templateConflictsWithTypeVariable.withArguments(name),
- member.charOffset,
- name.length,
+ cls.addProblem(templateConflictsWithTypeVariable.withArguments(name),
+ member.charOffset, name.length,
context: [
messageConflictsWithTypeVariableCause.withLocation(
tv.fileUri, tv.charOffset, name.length)
@@ -286,7 +274,7 @@
for (TypeVariableBuilder tv in typeVariables) {
TypeVariableBuilder existing = typeVariablesByName[tv.name];
if (existing != null) {
- addCompileTimeError(messageTypeVariableDuplicatedName, tv.charOffset,
+ addProblem(messageTypeVariableDuplicatedName, tv.charOffset,
tv.name.length, fileUri,
context: [
templateTypeVariableDuplicatedNameCause
@@ -300,8 +288,8 @@
// Only classes and type variables can't have the same name. See
// [#29555](https://github.com/dart-lang/sdk/issues/29555).
if (tv.name == owner.name) {
- addCompileTimeError(messageTypeVariableSameNameAsEnclosing,
- tv.charOffset, tv.name.length, fileUri);
+ addProblem(messageTypeVariableSameNameAsEnclosing, tv.charOffset,
+ tv.name.length, fileUri);
}
}
}
@@ -316,9 +304,7 @@
String name,
List<TypeVariableBuilder> typeVariables,
int modifiers,
- List<KernelTypeBuilder> interfaces,
- int codeStartOffset,
- int codeEndOffset}) {
+ List<KernelTypeBuilder> interfaces}) {
if (name == null) {
// The following parameters should only be used when building a named
// mixin application.
@@ -333,14 +319,6 @@
}
}
if (type is KernelMixinApplicationBuilder) {
- String extractName(name) {
- if (name is QualifiedName) {
- return name.suffix;
- } else {
- return name;
- }
- }
-
// Documentation below assumes the given mixin application is in one of
// these forms:
//
@@ -498,8 +476,6 @@
if (isNamedMixinApplication) {
loader.target.metadataCollector?.setDocumentationComment(
application.target, documentationComment);
- loader.target.metadataCollector?.setCodeStartEnd(
- application.target, codeStartOffset, codeEndOffset);
}
// TODO(ahe, kmillikin): Should always be true?
// pkg/analyzer/test/src/summary/resynthesize_kernel_test.dart can't
@@ -523,9 +499,7 @@
int modifiers,
KernelTypeBuilder mixinApplication,
List<KernelTypeBuilder> interfaces,
- int charOffset,
- int codeStartOffset,
- int codeEndOffset) {
+ int charOffset) {
// Nested declaration began in `OutlineBuilder.beginNamedMixinApplication`.
endNestedDeclaration(name).resolveTypes(typeVariables, this);
KernelNamedTypeBuilder supertype = applyMixins(
@@ -535,9 +509,7 @@
name: name,
typeVariables: typeVariables,
modifiers: modifiers,
- interfaces: interfaces,
- codeStartOffset: codeStartOffset,
- codeEndOffset: codeEndOffset);
+ interfaces: interfaces);
checkTypeVariables(typeVariables, supertype.declaration);
}
@@ -549,19 +521,13 @@
KernelTypeBuilder type,
String name,
int charOffset,
- int codeStartOffset,
- int codeEndOffset,
Token initializerTokenForInference,
bool hasInitializer) {
var builder = new KernelFieldBuilder(metadata, type, name, modifiers, this,
charOffset, initializerTokenForInference, hasInitializer);
addBuilder(name, builder, charOffset);
-
- var metadataCollector = loader.target.metadataCollector;
- metadataCollector?.setDocumentationComment(
- builder.target, documentationComment);
- metadataCollector?.setCodeStartEnd(
- builder.target, codeStartOffset, codeEndOffset);
+ loader.target.metadataCollector
+ ?.setDocumentationComment(builder.target, documentationComment);
}
void addConstructor(
@@ -577,8 +543,6 @@
int charOffset,
int charOpenParenOffset,
int charEndOffset,
- int codeStartOffset,
- int codeEndOffset,
String nativeMethodName) {
MetadataCollector metadataCollector = loader.target.metadataCollector;
ProcedureBuilder procedure = new KernelConstructorBuilder(
@@ -597,8 +561,6 @@
metadataCollector?.setDocumentationComment(
procedure.target, documentationComment);
metadataCollector?.setConstructorNameOffset(procedure.target, name);
- metadataCollector?.setCodeStartEnd(
- procedure.target, codeStartOffset, codeEndOffset);
checkTypeVariables(typeVariables, procedure);
addBuilder(constructorName, procedure, charOffset);
if (nativeMethodName != null) {
@@ -620,8 +582,6 @@
int charOpenParenOffset,
int charEndOffset,
String nativeMethodName,
- int codeStartOffset,
- int codeEndOffset,
{bool isTopLevel}) {
MetadataCollector metadataCollector = loader.target.metadataCollector;
ProcedureBuilder procedure = new KernelProcedureBuilder(
@@ -640,8 +600,6 @@
nativeMethodName);
metadataCollector?.setDocumentationComment(
procedure.target, documentationComment);
- metadataCollector?.setCodeStartEnd(
- procedure.target, codeStartOffset, codeEndOffset);
checkTypeVariables(typeVariables, procedure);
addBuilder(name, procedure, charOffset);
if (nativeMethodName != null) {
@@ -660,8 +618,6 @@
int charOffset,
int charOpenParenOffset,
int charEndOffset,
- int codeStartOffset,
- int codeEndOffset,
String nativeMethodName) {
KernelTypeBuilder returnType = addNamedType(
currentDeclaration.parent.name, <KernelTypeBuilder>[], charOffset);
@@ -720,8 +676,6 @@
metadataCollector?.setDocumentationComment(
procedure.target, documentationComment);
metadataCollector?.setConstructorNameOffset(procedure.target, name);
- metadataCollector?.setCodeStartEnd(
- procedure.target, codeStartOffset, codeEndOffset);
DeclarationBuilder<TypeBuilder> savedDeclaration = currentDeclaration;
currentDeclaration = factoryDeclaration;
@@ -781,8 +735,8 @@
List<TypeVariableBuilder> typeVariables,
List<FormalParameterBuilder> formals,
int charOffset) {
- var builder = new KernelFunctionTypeBuilder(
- outlineListener, charOffset, returnType, typeVariables, formals);
+ var builder =
+ new KernelFunctionTypeBuilder(returnType, typeVariables, formals);
checkTypeVariables(typeVariables, null);
// Nested declaration began in `OutlineBuilder.beginFunctionType` or
// `OutlineBuilder.beginFunctionTypedFormalParameter`.
@@ -796,11 +750,9 @@
KernelTypeBuilder type,
String name,
bool hasThis,
- int charOffset,
- int codeStartOffset,
- int codeEndOffset) {
- return new KernelFormalParameterBuilder(metadata, modifiers, type, name,
- hasThis, this, charOffset, codeStartOffset, codeEndOffset);
+ int charOffset) {
+ return new KernelFormalParameterBuilder(
+ metadata, modifiers, type, name, hasThis, this, charOffset);
}
KernelTypeVariableBuilder addTypeVariable(
@@ -877,7 +829,6 @@
// This is required for the DietListener to correctly match up metadata.
int importIndex = 0;
int exportIndex = 0;
- MetadataCollector metadataCollector = loader.target.metadataCollector;
while (importIndex < imports.length || exportIndex < exports.length) {
if (exportIndex >= exports.length ||
(importIndex < imports.length &&
@@ -892,18 +843,15 @@
continue;
}
- LibraryDependency dependency;
if (import.deferred && import.prefixBuilder?.dependency != null) {
- dependency = import.prefixBuilder.dependency;
+ library.addDependency(import.prefixBuilder.dependency);
} else {
- dependency = new LibraryDependency.import(import.imported.target,
+ library.addDependency(new LibraryDependency.import(
+ import.imported.target,
name: import.prefix,
combinators: toKernelCombinators(import.combinators))
- ..fileOffset = import.charOffset;
+ ..fileOffset = import.charOffset);
}
- library.addDependency(dependency);
- metadataCollector?.setImportPrefixOffset(
- dependency, import.prefixCharOffset);
} else {
// Add export
Export export = exports[exportIndex++];
@@ -1038,8 +986,16 @@
var builderTemplate = isExport
? templateDuplicatedExportInType
: templateDuplicatedImportInType;
- return new KernelInvalidTypeBuilder(name, charOffset, fileUri,
- builderTemplate.withArguments(name, uri, otherUri));
+ return new KernelInvalidTypeBuilder(
+ name,
+ builderTemplate
+ .withArguments(
+ name,
+ // TODO(ahe): We should probably use a context object here
+ // instead of including URIs in this message.
+ uri,
+ otherUri)
+ .withLocation(fileUri, charOffset, name.length));
}
int finishDeferredLoadTearoffs() {
@@ -1326,7 +1282,7 @@
void exportMemberFromPatch(String name, Declaration member) {
if (uri.scheme != "dart" || !uri.path.startsWith("_")) {
- addCompileTimeError(templatePatchInjectionFailed.withArguments(name, uri),
+ addProblem(templatePatchInjectionFailed.withArguments(name, uri),
member.charOffset, noLength, member.fileUri);
}
// Platform-private libraries, such as "dart:_internal" have special
@@ -1350,3 +1306,5 @@
return unhandled("no library parent", "${declaration.runtimeType}",
declaration.charOffset, declaration.fileUri);
}
+
+String extractName(name) => name is QualifiedName ? name.name : name;
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 3237dc1..95d3634 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
@@ -6,6 +6,8 @@
import 'package:kernel/ast.dart' show InterfaceType, Supertype;
+import '../fasta_codes.dart' show LocatedMessage;
+
import '../problems.dart' show unsupported;
import 'kernel_builder.dart'
@@ -47,8 +49,8 @@
}
@override
- buildInvalidType(int charOffset, Uri fileUri) {
- return unsupported("buildInvalidType", charOffset, fileUri);
+ buildInvalidType(LocatedMessage message) {
+ return unsupported("buildInvalidType", message.charOffset, message.uri);
}
KernelMixinApplicationBuilder clone(List<TypeBuilder> newTypes) {
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 82b8297..8c361e6 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
@@ -4,14 +4,14 @@
library fasta.kernel_interface_type_builder;
-import 'package:kernel/ast.dart' show DartType, InvalidType, Supertype;
+import 'package:kernel/ast.dart' show DartType, Supertype;
-import '../fasta_codes.dart' show Message;
+import '../fasta_codes.dart' show LocatedMessage;
import '../messages.dart'
show noLength, templateSupertypeIsIllegal, templateSupertypeIsTypeVariable;
-import '../source/outline_listener.dart';
+import '../severity.dart' show Severity;
import 'kernel_builder.dart'
show
@@ -20,25 +20,22 @@
KernelTypeBuilder,
LibraryBuilder,
NamedTypeBuilder,
- QualifiedName,
TypeBuilder,
TypeDeclarationBuilder,
- TypeVariableBuilder;
+ TypeVariableBuilder,
+ flattenName;
class KernelNamedTypeBuilder
extends NamedTypeBuilder<KernelTypeBuilder, DartType>
implements KernelTypeBuilder {
- final int charOffset;
+ KernelNamedTypeBuilder(Object name, List<KernelTypeBuilder> arguments)
+ : super(name, arguments);
- KernelNamedTypeBuilder(OutlineListener outlineListener, this.charOffset,
- Object name, List<KernelTypeBuilder> arguments)
- : super(outlineListener, name, arguments);
-
- KernelInvalidTypeBuilder buildInvalidType(int charOffset, Uri fileUri,
- [Message message]) {
+ KernelInvalidTypeBuilder buildInvalidType(LocatedMessage message) {
// TODO(ahe): Consider if it makes sense to pass a QualifiedName to
// KernelInvalidTypeBuilder?
- return new KernelInvalidTypeBuilder("$name", charOffset, fileUri, message);
+ return new KernelInvalidTypeBuilder(
+ flattenName(name, message.charOffset, message.uri), message);
}
Supertype handleInvalidSupertype(
@@ -46,34 +43,32 @@
var template = declaration.isTypeVariable
? templateSupertypeIsTypeVariable
: templateSupertypeIsIllegal;
- library.addCompileTimeError(
- template.withArguments("$name"), charOffset, noLength, fileUri);
+ library.addProblem(
+ template.withArguments(flattenName(name, charOffset, fileUri)),
+ charOffset,
+ noLength,
+ fileUri);
return null;
}
DartType build(LibraryBuilder library) {
- DartType type = declaration.buildType(library, arguments);
- _storeType(library, type);
- return type;
+ return declaration.buildType(library, arguments);
}
Supertype buildSupertype(
LibraryBuilder library, int charOffset, Uri fileUri) {
TypeDeclarationBuilder declaration = this.declaration;
if (declaration is KernelClassBuilder) {
- var supertype = declaration.buildSupertype(library, arguments);
- _storeType(library, supertype.asInterfaceType);
- return supertype;
+ return declaration.buildSupertype(library, arguments);
} else if (declaration is KernelInvalidTypeBuilder) {
- library.addCompileTimeError(
+ library.addProblem(
declaration.message.messageObject,
declaration.message.charOffset,
declaration.message.length,
- declaration.message.uri);
- _storeType(library, const InvalidType());
+ declaration.message.uri,
+ severity: Severity.error);
return null;
} else {
- _storeType(library, const InvalidType());
return handleInvalidSupertype(library, charOffset, fileUri);
}
}
@@ -82,19 +77,16 @@
LibraryBuilder library, int charOffset, Uri fileUri) {
TypeDeclarationBuilder declaration = this.declaration;
if (declaration is KernelClassBuilder) {
- var supertype = declaration.buildMixedInType(library, arguments);
- _storeType(library, supertype.asInterfaceType);
- return supertype;
+ return declaration.buildMixedInType(library, arguments);
} else if (declaration is KernelInvalidTypeBuilder) {
- library.addCompileTimeError(
+ library.addProblem(
declaration.message.messageObject,
declaration.message.charOffset,
declaration.message.length,
- declaration.message.uri);
- _storeType(library, const InvalidType());
+ declaration.message.uri,
+ severity: Severity.error);
return null;
} else {
- _storeType(library, const InvalidType());
return handleInvalidSupertype(library, charOffset, fileUri);
}
}
@@ -116,9 +108,7 @@
i++;
}
if (arguments != null) {
- return new KernelNamedTypeBuilder(
- outlineListener, charOffset, name, arguments)
- ..bind(declaration);
+ return new KernelNamedTypeBuilder(name, arguments)..bind(declaration);
}
}
return this;
@@ -132,34 +122,9 @@
clonedArguments[i] = arguments[i].clone(newTypes);
}
}
- KernelNamedTypeBuilder newType = new KernelNamedTypeBuilder(
- outlineListener, charOffset, name, clonedArguments);
+ KernelNamedTypeBuilder newType =
+ new KernelNamedTypeBuilder(name, clonedArguments);
newTypes.add(newType);
return newType;
}
-
- int get _storeOffset {
- // TODO(scheglov) Can we always make charOffset the "suffix" offset?
- var name = this.name;
- return name is QualifiedName ? name.charOffset : charOffset;
- }
-
- void _storeType(LibraryBuilder library, DartType type) {
- if (outlineListener != null) {
- if (arguments != null && !this.declaration.buildsArguments) {
- for (var argument in arguments) {
- argument.build(library);
- }
- }
- TypeDeclarationBuilder<KernelTypeBuilder, DartType> storeDeclaration;
- if (actualDeclaration != null) {
- storeDeclaration = actualDeclaration;
- type = storeDeclaration.buildType(library, null);
- } else {
- storeDeclaration = declaration;
- }
- var target = storeDeclaration.hasTarget ? storeDeclaration.target : null;
- outlineListener.store(_storeOffset, false, reference: target, type: type);
- }
- }
}
diff --git a/pkg/front_end/lib/src/fasta/kernel/kernel_procedure_builder.dart b/pkg/front_end/lib/src/fasta/kernel/kernel_procedure_builder.dart
index 7dbbdb3..c65c7b8 100644
--- a/pkg/front_end/lib/src/fasta/kernel/kernel_procedure_builder.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/kernel_procedure_builder.dart
@@ -41,6 +41,7 @@
import '../messages.dart'
show
Message,
+ messageConstFactoryRedirectionToNonConst,
messageMoreThanOneSuperOrThisInitializer,
messageNonInstanceTypeVariableUse,
messagePatchDeclarationMismatch,
@@ -232,7 +233,7 @@
bool checkPatch(KernelFunctionBuilder patch) {
if (!isExternal) {
- patch.library.addCompileTimeError(
+ patch.library.addProblem(
messagePatchNonExternal, patch.charOffset, noLength, patch.fileUri,
context: [
messagePatchDeclarationOrigin.withLocation(
@@ -244,8 +245,8 @@
}
void reportPatchMismatch(Declaration patch) {
- library.addCompileTimeError(messagePatchDeclarationMismatch,
- patch.charOffset, noLength, patch.fileUri, context: [
+ library.addProblem(messagePatchDeclarationMismatch, patch.charOffset,
+ noLength, patch.fileUri, context: [
messagePatchDeclarationOrigin.withLocation(fileUri, charOffset, noLength)
]);
}
@@ -484,9 +485,6 @@
return super.buildFunction(library)..returnType = const VoidType();
}
- @override
- bool get hasTarget => true;
-
Constructor get target => origin.constructor;
void injectInvalidInitializer(
@@ -496,7 +494,7 @@
assert(lastInitializer == superInitializer ||
lastInitializer == redirectingInitializer);
Initializer error = helper.buildInvalidInitializer(
- helper.buildCompileTimeError(message, charOffset, noLength),
+ helper.buildProblem(message, charOffset, noLength).desugared,
charOffset);
initializers.add(error..parent = constructor);
initializers.add(lastInitializer);
@@ -520,8 +518,10 @@
} else if (constructor.initializers.isNotEmpty) {
Initializer first = constructor.initializers.first;
Initializer error = helper.buildInvalidInitializer(
- helper.buildCompileTimeError(
- messageThisInitializerNotAlone, first.fileOffset, noLength),
+ helper
+ .buildProblem(
+ messageThisInitializerNotAlone, first.fileOffset, noLength)
+ .desugared,
first.fileOffset);
initializers.add(error..parent = constructor);
} else {
@@ -619,6 +619,13 @@
if (actualBody != null) {
unexpected("null", "${actualBody.runtimeType}", charOffset, fileUri);
}
+
+ // Ensure that constant factories only have constant targets/bodies.
+ if (isConst && !target.isConst) {
+ library.addProblem(messageConstFactoryRedirectionToNonConst, charOffset,
+ noLength, fileUri);
+ }
+
actualBody = new RedirectingFactoryBody(target, typeArguments);
function.body = actualBody;
actualBody?.parent = function;
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 bcd41f7..ce99bf3 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
@@ -37,12 +37,14 @@
import '../fasta_codes.dart'
show
+ messageSwitchExpressionNotAssignableCause,
messageVoidExpression,
noLength,
templateCantInferTypeDueToCircularity,
templateCantUseSuperBoundedTypeForInstanceCreation,
templateForInLoopElementTypeNotAssignable,
- templateForInLoopTypeNotIterable;
+ templateForInLoopTypeNotIterable,
+ templateSwitchExpressionNotAssignable;
import '../problems.dart' show unhandled, unsupported;
@@ -176,22 +178,16 @@
/// Concrete shadow object representing a set of invocation arguments.
class ArgumentsJudgment extends Arguments {
- /// The end offset of the closing `)`.
- final int fileEndOffset;
-
bool _hasExplicitTypeArguments;
List<ExpressionJudgment> get positionalJudgments => positional.cast();
List<NamedExpressionJudgment> get namedJudgments => named.cast();
- ArgumentsJudgment(
- int fileOffset, this.fileEndOffset, List<Expression> positional,
+ ArgumentsJudgment(List<Expression> positional,
{List<DartType> types, List<NamedExpression> named})
: _hasExplicitTypeArguments = types != null && types.isNotEmpty,
- super(positional, types: types, named: named) {
- this.fileOffset = fileOffset;
- }
+ super(positional, types: types, named: named);
static void setNonInferrableArgumentTypes(
ArgumentsJudgment arguments, List<DartType> types) {
@@ -209,12 +205,10 @@
/// Shadow object for [AsExpression].
class AsJudgment extends AsExpression implements ExpressionJudgment {
final AsExpressionTokens tokens;
- final Expression desugaredError;
DartType inferredType;
- AsJudgment(Expression operand, this.tokens, DartType type,
- {this.desugaredError})
+ AsJudgment(Expression operand, this.tokens, DartType type)
: super(operand, type);
ExpressionJudgment get judgment => operand;
@@ -227,10 +221,6 @@
inferredType = type;
inferrer.listener
.asExpression(this, fileOffset, null, tokens, null, inferredType);
- if (desugaredError != null) {
- parent.replaceChild(this, desugaredError);
- parent = null;
- }
return null;
}
}
@@ -559,8 +549,7 @@
/// pre-decrement.
bool isPreIncDec = false;
- ComplexAssignmentJudgment(this.rhs, {Expression desugared})
- : super(desugared);
+ ComplexAssignmentJudgment(this.rhs) : super(null);
String toString() {
var parts = _getToStringParts();
@@ -608,8 +597,8 @@
.isOverloadedArithmeticOperatorAndType(combinerMember, readType);
}
DartType rhsType;
- var combinerType =
- inferrer.getCalleeFunctionType(combinerMember, readType, false);
+ var combinerType = inferrer.getCalleeFunctionType(
+ inferrer.getCalleeType(combinerMember, readType), false);
if (isPreIncDec || isPostIncDec) {
rhsType = inferrer.coreTypes.intClass.rawType;
} else {
@@ -1002,7 +991,7 @@
@override
InferenceNode inferenceNode;
- ShadowTypeInferrer typeInferrer;
+ ShadowTypeInferrer _typeInferrer;
final bool _isImplicitlyTyped;
@@ -1489,9 +1478,8 @@
/// If `-1`, then there is no separate location for invalid assignment.
final int assignmentOffset;
- IllegalAssignmentJudgment(ExpressionJudgment rhs,
- {this.assignmentOffset: -1, Expression desugared})
- : super(rhs, desugared: desugared) {
+ IllegalAssignmentJudgment(ExpressionJudgment rhs, {this.assignmentOffset: -1})
+ : super(rhs) {
rhs.parent = this;
}
@@ -1554,8 +1542,8 @@
// To replicate analyzer behavior, we base type inference on the write
// member. TODO(paulberry): would it be better to use the read member
// when doing compound assignment?
- var calleeType =
- inferrer.getCalleeFunctionType(writeMember, receiverType, false);
+ var calleeType = inferrer.getCalleeFunctionType(
+ inferrer.getCalleeType(writeMember, receiverType), false);
DartType expectedIndexTypeForWrite;
DartType indexContext = const UnknownType();
DartType writeContext = const UnknownType();
@@ -1581,8 +1569,8 @@
if (read != null) {
var readMember =
inferrer.findMethodInvocationMember(receiverType, read, silent: true);
- var calleeFunctionType =
- inferrer.getCalleeFunctionType(readMember, receiverType, false);
+ var calleeFunctionType = inferrer.getCalleeFunctionType(
+ inferrer.getCalleeType(readMember, receiverType), false);
inferrer.ensureAssignable(
getPositionalParameterType(calleeFunctionType, 0),
indexType,
@@ -1603,8 +1591,8 @@
_storeLetType(inferrer, replacedRead, readType);
}
var inferredResult = _inferRhs(inferrer, readType, writeContext);
- inferrer.listener.indexAssign(this, write.fileOffset, receiverType,
- writeMember, inferredResult.combiner, inferredType);
+ inferrer.listener.indexAssign(this, write.fileOffset, writeMember,
+ inferredResult.combiner, inferredType);
_replaceWithDesugared();
return null;
}
@@ -1622,27 +1610,16 @@
/// Concrete shadow object representing an integer literal in kernel form.
class IntJudgment extends IntLiteral implements ExpressionJudgment {
IntLiteralTokens tokens;
- final kernel.Expression desugaredError;
- final bool isSynthetic;
DartType inferredType;
- IntJudgment(this.tokens, int value,
- {this.desugaredError, this.isSynthetic: false})
- : super(value);
+ IntJudgment(this.tokens, int value) : super(value);
@override
Expression infer<Expression, Statement, Initializer, Type>(
ShadowTypeInferrer inferrer, DartType typeContext) {
inferredType = inferrer.coreTypes.intClass.rawType;
- if (!isSynthetic) {
- inferrer.listener
- .intLiteral(this, fileOffset, tokens, value, inferredType);
- }
- if (desugaredError != null) {
- parent.replaceChild(this, desugaredError);
- parent = null;
- }
+ inferrer.listener.intLiteral(this, fileOffset, tokens, value, inferredType);
return null;
}
}
@@ -1663,7 +1640,7 @@
/// Concrete shadow object representing an invalid initializer in kernel form.
class ShadowInvalidFieldInitializer extends LocalInitializer
implements InitializerJudgment {
- final Node field;
+ final Field field;
final Expression value;
ShadowInvalidFieldInitializer(
@@ -1677,9 +1654,7 @@
@override
void infer<Expression, Statement, Initializer, Type>(
ShadowTypeInferrer inferrer) {
- var field = this.field;
- var typeContext = field is Field ? field.type : const UnknownType();
- inferrer.inferExpression(value, typeContext, false);
+ inferrer.inferExpression(value, field.type, false);
inferrer.listener.fieldInitializer(
this, fileOffset, null, null, null, null, null, field);
}
@@ -1906,12 +1881,12 @@
MapLiteralTokens tokens;
DartType inferredType;
- List<MapEntryJudgment> get judgments => entries;
+ List<MapEntry> get judgments => entries;
final DartType _declaredKeyType;
final DartType _declaredValueType;
- MapLiteralJudgment(this.tokens, List<MapEntryJudgment> judgments,
+ MapLiteralJudgment(this.tokens, List<MapEntry> judgments,
{DartType keyType, DartType valueType, bool isConst: false})
: _declaredKeyType = keyType,
_declaredValueType = valueType,
@@ -1949,9 +1924,9 @@
inferredValueType = _declaredValueType ?? const DynamicType();
}
List<ExpressionJudgment> cachedKeyJudgments =
- judgments.map((j) => j.keyJudgment).toList();
+ judgments.map((j) => (j as MapEntryJudgment).keyJudgment).toList();
List<ExpressionJudgment> cachedValueJudgments =
- judgments.map((j) => j.valueJudgment).toList();
+ judgments.map((j) => (j as MapEntryJudgment).valueJudgment).toList();
if (inferenceNeeded || typeChecksNeeded) {
for (MapEntryJudgment judgment in judgments) {
judgment.infer(inferrer, inferredKeyType, inferredValueType);
@@ -2238,11 +2213,10 @@
/// If this assignment uses null-aware access (`?.`), the conditional
/// expression that guards the access; otherwise `null`.
ConditionalExpression nullAwareGuard;
- final bool isSyntheticLhs;
PropertyAssignmentJudgment(
ExpressionJudgment receiver, ExpressionJudgment rhs,
- {bool isSuper: false, this.isSyntheticLhs: false})
+ {bool isSuper: false})
: super(receiver, rhs, isSuper);
@override
@@ -2292,8 +2266,6 @@
inferrer.listener.propertyAssign(
this,
write.fileOffset,
- isSyntheticLhs,
- receiverType,
inferrer.getRealTarget(writeMember),
writeContext,
inferredResult.combiner,
@@ -2405,15 +2377,10 @@
isVoidAllowed: true);
inferredType = judgment.inferredType;
} else {
- inferredType = const VoidType();
+ inferredType = inferrer.coreTypes.nullClass.rawType;
}
- // Analyzer treats bare `return` statements as having no effect on the
- // inferred type of the closure. TODO(paulberry): is this what we want
- // for Fasta?
- if (judgment != null) {
- closureContext.handleReturn(inferrer, inferredType, expression,
- fileOffset, !identical(returnKeywordLexeme, "return"));
- }
+ closureContext.handleReturn(inferrer, this, inferredType,
+ !identical(returnKeywordLexeme, "return"));
inferrer.listener.returnStatement(this, fileOffset, tokens, null);
}
}
@@ -2710,14 +2677,30 @@
var expressionJudgment = this.expressionJudgment;
inferrer.inferExpression(expressionJudgment, const UnknownType(), true);
var expressionType = expressionJudgment.inferredType;
+
for (var switchCase in caseJudgments) {
for (var caseExpression in switchCase.expressionJudgments) {
- inferrer.inferExpression(caseExpression, expressionType, false);
+ DartType caseExpressionType =
+ inferrer.inferExpression(caseExpression, expressionType, true);
+
+ // Check whether the expression type is assignable to the case expression type.
+ if (!inferrer.isAssignable(expressionType, caseExpressionType)) {
+ inferrer.helper.addProblem(
+ templateSwitchExpressionNotAssignable.withArguments(
+ expressionType, caseExpressionType),
+ caseExpression.fileOffset,
+ noLength,
+ context: [
+ messageSwitchExpressionNotAssignableCause.withLocation(
+ inferrer.uri, expressionJudgment.fileOffset, noLength)
+ ]);
+ }
}
inferrer.inferStatement(switchCase.bodyJudgment);
// TODO(paulberry): support labels.
inferrer.listener.switchCase(switchCase, null, null, null, null, null);
}
+
inferrer.listener
.switchStatement(this, fileOffset, tokens, expression, cases);
}
@@ -2786,7 +2769,7 @@
@override
Expression infer<Expression, Statement, Initializer, Type>(
ShadowTypeInferrer inferrer, DartType typeContext) {
- inferrer.listener.variableAssign(this, fileOffset, false, _variable.type,
+ inferrer.listener.variableAssign(this, fileOffset, _variable.type,
_variable.createBinder(inferrer), null, _variable.type);
return super.infer(inferrer, typeContext);
}
@@ -2826,7 +2809,7 @@
ShadowTypeInferrer inferrer, DartType typeContext) {
var inferredType = member?.getterType ?? const DynamicType();
inferrer.listener
- .propertyGet(this, fileOffset, false, null, member, inferredType);
+ .propertyGet(this, fileOffset, false, member, inferredType);
return super.infer(inferrer, typeContext);
}
}
@@ -2837,13 +2820,9 @@
/// These expressions are removed by type inference and replaced with their
/// desugared equivalents.
class SyntheticExpressionJudgment extends Let implements ExpressionJudgment {
- /// The original expression that is wrapped by this synthetic expression.
- /// Its type will be inferred.
- final Expression original;
-
DartType inferredType;
- SyntheticExpressionJudgment(Expression desugared, {this.original})
+ SyntheticExpressionJudgment(Expression desugared)
: super(new VariableDeclaration('_', initializer: new NullLiteral()),
desugared);
@@ -2858,9 +2837,6 @@
@override
Expression infer<Expression, Statement, Initializer, Type>(
ShadowTypeInferrer inferrer, DartType typeContext) {
- if (original != null) {
- inferrer.inferExpression(original, typeContext, true);
- }
_replaceWithDesugared();
inferredType = const DynamicType();
return null;
@@ -3072,13 +3048,13 @@
TypeInferenceListener<int, Node, int> listener,
InterfaceType thisType,
ShadowField field) {
- return field.typeInferrer = new ShadowTypeInferrer._(
+ return field._typeInferrer = new ShadowTypeInferrer._(
this, field.fileUri, listener, true, thisType, null);
}
@override
ShadowTypeInferrer getFieldTypeInferrer(ShadowField field) {
- return field.typeInferrer;
+ return field._typeInferrer;
}
}
@@ -3153,7 +3129,8 @@
DartType inferFieldTopLevel<Expression, Statement, Initializer, Type>(
ShadowField field, bool typeNeeded) {
if (field.initializer == null) return const DynamicType();
- return inferExpression(field.initializer, const UnknownType(), typeNeeded);
+ return inferExpression(field.initializer, const UnknownType(), typeNeeded,
+ isVoidAllowed: true);
}
@override
@@ -3306,7 +3283,6 @@
inferrer.listener.variableAssign(
this,
write.fileOffset,
- false,
writeContext,
write is VariableSet
? (write.variable as VariableDeclarationJudgment)
@@ -3490,10 +3466,9 @@
class UnresolvedVariableAssignmentJudgment extends SyntheticExpressionJudgment {
final bool isCompound;
final ExpressionJudgment rhs;
- final bool isSyntheticLhs;
- UnresolvedVariableAssignmentJudgment(kernel.Expression desugared,
- this.isCompound, this.rhs, this.isSyntheticLhs)
+ UnresolvedVariableAssignmentJudgment(
+ kernel.Expression desugared, this.isCompound, this.rhs)
: super(desugared);
@override
@@ -3501,8 +3476,8 @@
ShadowTypeInferrer inferrer, DartType typeContext) {
inferrer.inferExpression(rhs, const UnknownType(), true);
inferredType = isCompound ? const DynamicType() : rhs.inferredType;
- inferrer.listener.variableAssign(this, fileOffset, isSyntheticLhs,
- const DynamicType(), null, null, inferredType);
+ inferrer.listener.variableAssign(
+ this, fileOffset, const DynamicType(), null, null, inferredType);
return super.infer(inferrer, typeContext);
}
}
@@ -3523,7 +3498,7 @@
inferrer.listener.variableGet(
this, offset, isSynthetic, false, null, const DynamicType());
inferrer.listener.variableAssign(
- this, fileOffset, false, const DynamicType(), null, null, inferredType);
+ this, fileOffset, const DynamicType(), null, null, inferredType);
return super.infer(inferrer, typeContext);
}
}
@@ -3716,17 +3691,10 @@
/// Concrete shadow object representing a named expression.
class NamedExpressionJudgment extends NamedExpression {
- final NamedExpressionTokens tokens;
+ NamedExpressionTokens tokens;
- /// The original value that is wrapped by this synthetic named argument.
- /// Its type will be inferred.
- final Expression originalValue;
-
- NamedExpressionJudgment(this.tokens, String nameLexeme, Expression value,
- {this.originalValue})
- : super(nameLexeme, value) {
- originalValue?.parent = this;
- }
+ NamedExpressionJudgment(this.tokens, String nameLexeme, Expression value)
+ : super(nameLexeme, value);
ExpressionJudgment get judgment => value;
}
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 0715e41..86122bb 100644
--- a/pkg/front_end/lib/src/fasta/kernel/kernel_target.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/kernel_target.dart
@@ -119,14 +119,12 @@
final List<LocatedMessage> errors = <LocatedMessage>[];
- final TypeBuilder dynamicType =
- new KernelNamedTypeBuilder(null, -1, "dynamic", null);
+ final TypeBuilder dynamicType = new KernelNamedTypeBuilder("dynamic", null);
final NamedTypeBuilder objectType =
- new KernelNamedTypeBuilder(null, -1, "Object", null);
+ new KernelNamedTypeBuilder("Object", null);
- final TypeBuilder bottomType =
- new KernelNamedTypeBuilder(null, -1, "Null", null);
+ final TypeBuilder bottomType = new KernelNamedTypeBuilder("Null", null);
bool get strongMode => backendTarget.strongMode;
@@ -219,7 +217,7 @@
cls.implementedTypes.clear();
cls.supertype = null;
cls.mixedInType = null;
- builder.supertype = new KernelNamedTypeBuilder(null, -1, "Object", null)
+ builder.supertype = new KernelNamedTypeBuilder("Object", null)
..bind(objectClassBuilder);
builder.interfaces = null;
builder.mixedInType = null;
@@ -435,7 +433,7 @@
if (cls != objectClass) {
cls.supertype ??= objectClass.asRawSupertype;
declaration.supertype ??=
- new KernelNamedTypeBuilder(null, -1, "Object", null)
+ new KernelNamedTypeBuilder("Object", null)
..bind(objectClassBuilder);
}
if (declaration.isMixinApplication) {
@@ -659,10 +657,8 @@
for (Initializer initializer in constructor.initializers) {
if (initializer is RedirectingInitializer) {
if (constructor.isConst && !initializer.target.isConst) {
- builder.addCompileTimeError(
- messageConstConstructorRedirectionToNonConst,
- initializer.fileOffset,
- initializer.target.name.name.length);
+ builder.addProblem(messageConstConstructorRedirectionToNonConst,
+ initializer.fileOffset, initializer.target.name.name.length);
}
isRedirecting = true;
break;
@@ -676,7 +672,7 @@
superTarget ??= defaultSuperConstructor(cls);
Initializer initializer;
if (superTarget == null) {
- builder.addCompileTimeError(
+ builder.addProblem(
templateSuperclassHasNoDefaultConstructor
.withArguments(cls.superclass.name),
constructor.fileOffset,
@@ -716,7 +712,7 @@
}
constructorInitializedFields[constructor] = myInitializedFields;
if (constructor.isConst && nonFinalFields.isNotEmpty) {
- builder.addCompileTimeError(messageConstConstructorNonFinalField,
+ builder.addProblem(messageConstConstructorNonFinalField,
constructor.fileOffset, noLength,
context: nonFinalFields
.map((field) => messageConstConstructorNonFinalFieldCause
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 41a0d14..017c9fc 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
@@ -11,8 +11,6 @@
import '../fasta_codes.dart' show templateTypeArgumentsOnTypeVariable;
-import '../source/outline_listener.dart';
-
import 'kernel_builder.dart'
show
KernelClassBuilder,
@@ -25,7 +23,6 @@
class KernelTypeVariableBuilder
extends TypeVariableBuilder<KernelTypeBuilder, DartType> {
- final OutlineListener outlineListener;
final TypeParameter actualParameter;
KernelTypeVariableBuilder actualOrigin;
@@ -37,16 +34,14 @@
[KernelTypeBuilder bound, TypeParameter actual])
// TODO(32378): We would like to use '??' here instead, but in conjuction
// with '..', it crashes Dart2JS.
- : outlineListener = compilationUnit?.outlineListener,
- actualParameter = actual != null
+ : actualParameter = actual != null
? (actual..fileOffset = charOffset)
: (new TypeParameter(name, null)..fileOffset = charOffset),
super(name, bound, compilationUnit, charOffset);
KernelTypeVariableBuilder.fromKernel(
TypeParameter parameter, KernelLibraryBuilder compilationUnit)
- : outlineListener = null,
- actualParameter = parameter,
+ : actualParameter = parameter,
super(parameter.name, null, compilationUnit, parameter.fileOffset);
@override
@@ -54,9 +49,6 @@
TypeParameter get parameter => origin.actualParameter;
- @override
- bool get hasTarget => true;
-
TypeParameter get target => parameter;
DartType buildType(
@@ -84,8 +76,7 @@
}
KernelTypeBuilder asTypeBuilder() {
- return new KernelNamedTypeBuilder(outlineListener, charOffset, name, null)
- ..bind(this);
+ return new KernelNamedTypeBuilder(name, null)..bind(this);
}
void finish(LibraryBuilder library, KernelClassBuilder object,
diff --git a/pkg/front_end/lib/src/fasta/kernel/kernel_variable_builder.dart b/pkg/front_end/lib/src/fasta/kernel/kernel_variable_builder.dart
index 5936507..fb688d1 100644
--- a/pkg/front_end/lib/src/fasta/kernel/kernel_variable_builder.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/kernel_variable_builder.dart
@@ -28,9 +28,6 @@
bool get isFinal => variable.isFinal;
- @override
- bool get hasTarget => true;
-
VariableDeclaration get target => variable;
@override
diff --git a/pkg/front_end/lib/src/fasta/kernel/metadata_collector.dart b/pkg/front_end/lib/src/fasta/kernel/metadata_collector.dart
index e56e209..6a15522 100644
--- a/pkg/front_end/lib/src/fasta/kernel/metadata_collector.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/metadata_collector.dart
@@ -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 'package:kernel/kernel.dart'
- show LibraryDependency, Member, MetadataRepository, NamedNode, TreeNode;
+import 'package:kernel/kernel.dart' show Member, MetadataRepository, NamedNode;
/// The collector to add target specific metadata to.
abstract class MetadataCollector {
@@ -11,11 +10,7 @@
/// to a component, metadata is serialized with the component.
MetadataRepository get repository;
- void setCodeStartEnd(TreeNode node, int start, int end);
-
void setConstructorNameOffset(Member node, Object name);
void setDocumentationComment(NamedNode node, String comment);
-
- void setImportPrefixOffset(LibraryDependency node, int offset);
}
diff --git a/pkg/front_end/lib/src/fasta/kernel/type_algorithms.dart b/pkg/front_end/lib/src/fasta/kernel/type_algorithms.dart
index dff7075..a45b739 100644
--- a/pkg/front_end/lib/src/fasta/kernel/type_algorithms.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/type_algorithms.dart
@@ -64,8 +64,7 @@
}
}
if (arguments != null) {
- return new KernelNamedTypeBuilder(
- type.outlineListener, type.charOffset, type.name, arguments)
+ return new KernelNamedTypeBuilder(type.name, arguments)
..bind(type.declaration);
}
return type;
@@ -114,9 +113,7 @@
formal.name,
formal.hasThis,
formal.parent,
- formal.charOffset,
- formal.codeStartOffset,
- formal.codeEndOffset);
+ formal.charOffset);
changed = true;
} else {
formals[i] = formal;
@@ -132,8 +129,7 @@
}
if (changed) {
- return new KernelFunctionTypeBuilder(type.outlineListener,
- type.charOffset, returnType, variables, formals);
+ return new KernelFunctionTypeBuilder(returnType, variables, formals);
}
return type;
diff --git a/pkg/front_end/lib/src/fasta/loader.dart b/pkg/front_end/lib/src/fasta/loader.dart
index e37afdc..f1f9d5c 100644
--- a/pkg/front_end/lib/src/fasta/loader.dart
+++ b/pkg/front_end/lib/src/fasta/loader.dart
@@ -21,17 +21,14 @@
Template,
messagePlatformPrivateLibraryAccess,
templateInternalProblemContextSeverity,
- templateInternalProblemMissingSeverity,
templateSourceBodySummary;
import 'problems.dart' show internalProblem;
-import 'rewrite_severity.dart' as rewrite_severity;
+import 'rewrite_severity.dart' show rewriteSeverity;
import 'severity.dart' show Severity;
-import 'source/outline_listener.dart';
-
import 'target_implementation.dart' show TargetImplementation;
import 'ticker.dart' show Ticker;
@@ -145,8 +142,8 @@
!accessor.isPatch &&
!target.backendTarget
.allowPlatformPrivateLibraryAccess(accessor.uri, uri)) {
- accessor.addCompileTimeError(messagePlatformPrivateLibraryAccess,
- charOffset, noLength, accessor.fileUri);
+ accessor.addProblem(messagePlatformPrivateLibraryAccess, charOffset,
+ noLength, accessor.fileUri);
}
return builder;
}
@@ -181,8 +178,6 @@
logSummary(outlineSummaryTemplate);
}
- OutlineListener createOutlineListener(Uri fileUri) => null;
-
void logSummary(Template<SummaryTemplate> template) {
ticker.log((Duration elapsed, Duration sinceStart) {
int libraryCount = 0;
@@ -201,37 +196,19 @@
/// Builds all the method bodies found in the given [library].
Future<Null> buildBody(covariant LibraryBuilder library);
- /// Register [message] as a compile-time error.
- ///
- /// If [wasHandled] is true, this error is added to [handledErrors],
- /// otherwise it is added to [unhandledErrors].
- void addCompileTimeError(
- Message message, int charOffset, int length, Uri fileUri,
- {bool wasHandled: false, List<LocatedMessage> context}) {
- addMessage(message, charOffset, length, fileUri, Severity.error,
- wasHandled: wasHandled, context: context);
- }
-
/// Register [message] as a problem with a severity determined by the
/// intrinsic severity of the message.
void addProblem(Message message, int charOffset, int length, Uri fileUri,
- {List<LocatedMessage> context}) {
- Severity severity = message.code.severity;
- if (severity == null) {
- addMessage(message, charOffset, length, fileUri, Severity.error,
- context: context);
- internalProblem(
- templateInternalProblemMissingSeverity
- .withArguments(message.code.name),
- charOffset,
- fileUri);
- }
+ {bool wasHandled: false,
+ List<LocatedMessage> context,
+ Severity severity}) {
+ severity ??= message.code.severity;
if (severity == Severity.errorLegacyWarning) {
severity =
target.backendTarget.strongMode ? Severity.error : Severity.warning;
}
addMessage(message, charOffset, length, fileUri, severity,
- context: context);
+ wasHandled: wasHandled, context: context);
}
/// All messages reported by the compiler (errors, warnings, etc.) are routed
@@ -240,10 +217,14 @@
/// Returns true if the message is new, that is, not previously
/// reported. This is important as some parser errors may be reported up to
/// three times by `OutlineBuilder`, `DietListener`, and `BodyBuilder`.
+ ///
+ /// If [severity] is `Severity.error`, the message is added to
+ /// [handledErrors] if [wasHandled] is true or to [unhandledErrors] if
+ /// [wasHandled] is false.
bool addMessage(Message message, int charOffset, int length, Uri fileUri,
Severity severity,
{bool wasHandled: false, List<LocatedMessage> context}) {
- severity = rewriteSeverity(severity, message, fileUri);
+ severity = rewriteSeverity(severity, message.code, fileUri);
if (severity == Severity.ignored) return false;
String trace = """
message: ${message.message}
@@ -271,10 +252,6 @@
return true;
}
- Severity rewriteSeverity(Severity severity, Message message, Uri fileUri) {
- return rewrite_severity.rewriteSeverity(severity, message.code, fileUri);
- }
-
Declaration getAbstractClassInstantiationError() {
return target.getAbstractClassInstantiationError(this);
}
diff --git a/pkg/front_end/lib/src/fasta/parser.dart b/pkg/front_end/lib/src/fasta/parser.dart
index e5349ff..54082f1 100644
--- a/pkg/front_end/lib/src/fasta/parser.dart
+++ b/pkg/front_end/lib/src/fasta/parser.dart
@@ -33,12 +33,7 @@
export 'parser/top_level_parser.dart' show TopLevelParser;
export 'parser/util.dart'
- show
- endOffsetForToken,
- lengthForToken,
- lengthOfSpan,
- offsetForToken,
- optional;
+ show lengthForToken, lengthOfSpan, offsetForToken, optional;
class ErrorCollectingListener extends Listener {
final List<ParserError> recoverableErrors = <ParserError>[];
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 6ed6457..0a6ea11 100644
--- a/pkg/front_end/lib/src/fasta/parser/forwarding_listener.dart
+++ b/pkg/front_end/lib/src/fasta/parser/forwarding_listener.dart
@@ -172,10 +172,10 @@
}
@override
- void beginFormalParameter(Token beginToken, MemberKind kind,
- Token covariantToken, Token varFinalOrConst) {
+ void beginFormalParameter(Token token, MemberKind kind, Token covariantToken,
+ Token varFinalOrConst) {
listener?.beginFormalParameter(
- beginToken, kind, covariantToken, varFinalOrConst);
+ token, kind, covariantToken, varFinalOrConst);
}
@override
@@ -285,9 +285,9 @@
@override
void beginMethod(Token externalToken, Token staticToken, Token covariantToken,
- Token varFinalOrConst, Token name) {
- listener?.beginMethod(
- externalToken, staticToken, covariantToken, varFinalOrConst, name);
+ Token varFinalOrConst, Token getOrSet, Token name) {
+ listener?.beginMethod(externalToken, staticToken, covariantToken,
+ varFinalOrConst, getOrSet, name);
}
@override
@@ -607,15 +607,10 @@
}
@override
- void endFormalParameter(
- Token thisKeyword,
- Token periodAfterThis,
- Token nameToken,
- FormalParameterKind kind,
- MemberKind memberKind,
- Token endToken) {
+ void endFormalParameter(Token thisKeyword, Token periodAfterThis,
+ Token nameToken, FormalParameterKind kind, MemberKind memberKind) {
listener?.endFormalParameter(
- thisKeyword, periodAfterThis, nameToken, kind, memberKind, endToken);
+ thisKeyword, periodAfterThis, nameToken, kind, memberKind);
}
@override
@@ -1263,6 +1258,11 @@
}
@override
+ void handleRecoverMixinHeader() {
+ listener?.handleRecoverMixinHeader();
+ }
+
+ @override
void handleRecoverableError(
Message message, Token startToken, Token endToken) {
if (forwardErrors) {
diff --git a/pkg/front_end/lib/src/fasta/parser/identifier_context.dart b/pkg/front_end/lib/src/fasta/parser/identifier_context.dart
index 83d9acd..460fec9 100644
--- a/pkg/front_end/lib/src/fasta/parser/identifier_context.dart
+++ b/pkg/front_end/lib/src/fasta/parser/identifier_context.dart
@@ -240,9 +240,6 @@
/// expressions are required.
final bool allowedInConstantExpression;
- /// Indicated whether the `isSynthetic` flag is required for the identifier.
- final bool requiresSyntheticFlag;
-
final Template<_MessageWithArgument<Token>> recoveryTemplate;
const IdentifierContext(this._name,
@@ -252,7 +249,6 @@
this.isContinuation: false,
this.isScopeReference: false,
this.isBuiltInIdentifierAllowed: true,
- this.requiresSyntheticFlag: false,
bool allowedInConstantExpression,
this.recoveryTemplate: templateExpectedIdentifier})
: this.allowedInConstantExpression =
diff --git a/pkg/front_end/lib/src/fasta/parser/identifier_context_impl.dart b/pkg/front_end/lib/src/fasta/parser/identifier_context_impl.dart
index 078f2d6..9814c3b 100644
--- a/pkg/front_end/lib/src/fasta/parser/identifier_context_impl.dart
+++ b/pkg/front_end/lib/src/fasta/parser/identifier_context_impl.dart
@@ -81,8 +81,7 @@
/// See [IdentifierContext.combinator].
class CombinatorIdentifierContext extends IdentifierContext {
- const CombinatorIdentifierContext()
- : super('combinator', requiresSyntheticFlag: true);
+ const CombinatorIdentifierContext() : super('combinator');
@override
Token ensureIdentifier(Token token, Parser parser) {
@@ -155,12 +154,10 @@
/// See [IdentifierContext.dottedName].
class DottedNameIdentifierContext extends IdentifierContext {
- const DottedNameIdentifierContext()
- : super('dottedName', requiresSyntheticFlag: true);
+ const DottedNameIdentifierContext() : super('dottedName');
const DottedNameIdentifierContext.continuation()
- : super('dottedNameContinuation',
- isContinuation: true, requiresSyntheticFlag: true);
+ : super('dottedNameContinuation', isContinuation: true);
@override
Token ensureIdentifier(Token token, Parser parser) {
diff --git a/pkg/front_end/lib/src/fasta/parser/listener.dart b/pkg/front_end/lib/src/fasta/parser/listener.dart
index 803363f..0d9dfb9 100644
--- a/pkg/front_end/lib/src/fasta/parser/listener.dart
+++ b/pkg/front_end/lib/src/fasta/parser/listener.dart
@@ -155,6 +155,17 @@
logEvent("MixinHeader");
}
+ /// Handle recovery associated with a mixin header.
+ /// This may be called multiple times after [handleMixinHeader]
+ /// to recover information about the previous mixin header.
+ /// The substructures are a subset of
+ /// and in the same order as [handleMixinHeader]
+ /// - on types
+ /// - implemented types
+ void handleRecoverMixinHeader() {
+ logEvent("RecoverMixinHeader");
+ }
+
/// Handle the end of a mixin declaration. Substructures:
/// - mixin header
/// - class or mixin body
@@ -257,19 +268,11 @@
logEvent("FactoryMethod");
}
- /// [beginToken] is the first token of the parameter, e.g. `int` in
- /// `int a`, or `this` in `C(this.f)`.
- void beginFormalParameter(Token beginToken, MemberKind kind,
- Token covariantToken, Token varFinalOrConst) {}
+ void beginFormalParameter(Token token, MemberKind kind, Token covariantToken,
+ Token varFinalOrConst) {}
- /// [endToken] is the last token of the parameter, e.g. `1` in `{int a = 1}`.
- void endFormalParameter(
- Token thisKeyword,
- Token periodAfterThis,
- Token nameToken,
- FormalParameterKind kind,
- MemberKind memberKind,
- Token endToken) {
+ void endFormalParameter(Token thisKeyword, Token periodAfterThis,
+ Token nameToken, FormalParameterKind kind, MemberKind memberKind) {
logEvent("FormalParameter");
}
@@ -679,7 +682,7 @@
/// Handle the beginning of a method declaration. Substructures:
/// - metadata
void beginMethod(Token externalToken, Token staticToken, Token covariantToken,
- Token varFinalOrConst, Token name) {}
+ Token varFinalOrConst, Token getOrSet, Token name) {}
/// Handle the end of a method declaration. Substructures:
/// - metadata
diff --git a/pkg/front_end/lib/src/fasta/parser/parser.dart b/pkg/front_end/lib/src/fasta/parser/parser.dart
index 1885d3b..9bbe503 100644
--- a/pkg/front_end/lib/src/fasta/parser/parser.dart
+++ b/pkg/front_end/lib/src/fasta/parser/parser.dart
@@ -73,7 +73,10 @@
import 'modifier_context.dart' show ModifierRecoveryContext, isModifier;
import 'recovery_listeners.dart'
- show ClassHeaderRecoveryListener, ImportRecoveryListener;
+ show
+ ClassHeaderRecoveryListener,
+ ImportRecoveryListener,
+ MixinHeaderRecoveryListener;
import 'token_stream_rewriter.dart' show TokenStreamRewriter;
@@ -1432,8 +1435,8 @@
} else {
listener.handleFormalParameterWithoutValue(next);
}
- listener.endFormalParameter(thisKeyword, periodAfterThis, nameToken,
- parameterKind, memberKind, token);
+ listener.endFormalParameter(
+ thisKeyword, periodAfterThis, nameToken, parameterKind, memberKind);
return token;
}
@@ -1869,12 +1872,13 @@
assert(optional('mixin', mixinKeyword));
Token name = ensureIdentifier(
mixinKeyword, IdentifierContext.classOrMixinDeclaration);
- Token token = computeTypeParamOrArg(name, true).parseVariables(name, this);
+ Token headerStart =
+ computeTypeParamOrArg(name, true).parseVariables(name, this);
listener.beginMixinDeclaration(mixinKeyword, name);
- token = parseMixinHeaderOpt(token, mixinKeyword);
+ Token token = parseMixinHeaderOpt(headerStart, mixinKeyword);
if (!optional('{', token.next)) {
// Recovery
- token = parseMixinHeaderRecovery(mixinKeyword);
+ token = parseMixinHeaderRecovery(token, mixinKeyword, headerStart);
ensureBlock(token, fasta.templateExpectedClassOrMixinBody);
}
token = parseClassOrMixinBody(token);
@@ -1889,9 +1893,67 @@
return token;
}
- Token parseMixinHeaderRecovery(Token mixinKeyword) {
- // TODO(danrubel): Add mixin recovery similiar to class recovery.
- return mixinKeyword;
+ Token parseMixinHeaderRecovery(
+ Token token, Token mixinKeyword, Token headerStart) {
+ final primaryListener = listener;
+ final recoveryListener = new MixinHeaderRecoveryListener();
+
+ // Reparse to determine which clauses have already been parsed
+ // but intercept the events so they are not sent to the primary listener.
+ listener = recoveryListener;
+ token = parseMixinHeaderOpt(headerStart, mixinKeyword);
+ bool hasOn = recoveryListener.onKeyword != null;
+ bool hasImplements = recoveryListener.implementsKeyword != null;
+
+ // Update the recovery listener to forward subsequent events
+ // to the primary listener.
+ recoveryListener.listener = primaryListener;
+
+ // Parse additional out-of-order clauses
+ Token start;
+ do {
+ start = token;
+
+ // Check for extraneous token in the middle of a class header.
+ token = skipUnexpectedTokenOpt(
+ token, const <String>['on', 'implements', '{']);
+
+ // During recovery, clauses are parsed in the same order and
+ // generate the same events as in the parseMixinHeaderOpt method above.
+ recoveryListener.clear();
+ token = parseMixinOnOpt(token);
+
+ if (recoveryListener.onKeyword != null) {
+ if (hasOn) {
+ reportRecoverableError(
+ recoveryListener.onKeyword, fasta.messageMultipleOnClauses);
+ } else {
+ if (hasImplements) {
+ reportRecoverableError(
+ recoveryListener.onKeyword, fasta.messageImplementsBeforeOn);
+ }
+ hasOn = true;
+ }
+ }
+
+ token = parseClassOrMixinImplementsOpt(token);
+
+ if (recoveryListener.implementsKeyword != null) {
+ if (hasImplements) {
+ reportRecoverableError(recoveryListener.implementsKeyword,
+ fasta.messageMultipleImplements);
+ } else {
+ hasImplements = true;
+ }
+ }
+
+ listener.handleRecoverMixinHeader();
+
+ // Exit if a mixin body is detected, or if no progress has been made
+ } while (!optional('{', token.next) && start != token);
+
+ listener = primaryListener;
+ return token;
}
/// ```
@@ -2429,9 +2491,23 @@
next = token.next;
}
if (!optional('(', next)) {
- reportRecoverableError(
- token, fasta.templateExpectedAfterButGot.withArguments('('));
- rewriter.insertParens(token, false);
+ // Recovery
+ if (optional('?.', next)) {
+ // An error for `super?.` is reported in parseSuperExpression.
+ token = next;
+ next = token.next;
+ if (!next.isIdentifier) {
+ // Insert a synthetic identifier but don't report another error.
+ next = rewriter.insertSyntheticIdentifier(token);
+ }
+ token = next;
+ next = token.next;
+ }
+ if (!optional('(', next)) {
+ reportRecoverableError(
+ next, fasta.templateExpectedAfterButGot.withArguments('('));
+ rewriter.insertParens(token, false);
+ }
}
return parseInitializerExpressionRest(start);
}
@@ -2868,8 +2944,8 @@
// TODO(danrubel): Consider parsing the name before calling beginMethod
// rather than passing the name token into beginMethod.
- listener.beginMethod(
- externalToken, staticToken, covariantToken, varFinalOrConst, name);
+ listener.beginMethod(externalToken, staticToken, covariantToken,
+ varFinalOrConst, getOrSet, name);
Token token = typeInfo.parseType(beforeType, this);
assert(token.next == (getOrSet ?? name));
@@ -3596,20 +3672,15 @@
assert(precedence >= 1);
assert(precedence <= SELECTOR_PRECEDENCE);
token = parseUnaryExpression(token, allowCascades);
- Token next = token.next;
- TokenType type = next.type;
- int tokenLevel = type.precedence;
- Token typeArguments;
TypeParamOrArgInfo typeArg = computeMethodTypeArguments(token);
if (typeArg != noTypeParamOrArg) {
// For example a(b)<T>(c), where token is before '<'.
- typeArguments = next;
token = typeArg.parseArguments(token, this);
- next = token.next;
- assert(optional('(', next));
- type = next.type;
- tokenLevel = type.precedence;
+ assert(optional('(', token.next));
}
+ Token next = token.next;
+ TokenType type = next.type;
+ int tokenLevel = type.precedence;
for (int level = tokenLevel; level >= precedence; --level) {
int lastBinaryExpressionLevel = -1;
while (identical(tokenLevel, level)) {
@@ -3646,8 +3717,7 @@
listener.endBinaryExpression(operator);
} else if ((identical(type, TokenType.OPEN_PAREN)) ||
(identical(type, TokenType.OPEN_SQUARE_BRACKET))) {
- token = parseArgumentOrIndexStar(token, typeArguments);
- next = token.next;
+ token = parseArgumentOrIndexStar(token, typeArg);
} else if (identical(type, TokenType.INDEX)) {
BeginToken replacement = link(
new BeginToken(TokenType.OPEN_SQUARE_BRACKET, next.charOffset,
@@ -3655,7 +3725,7 @@
new Token(TokenType.CLOSE_SQUARE_BRACKET, next.charOffset + 1));
rewriter.replaceTokenFollowing(token, replacement);
replacement.endToken = replacement.next;
- token = parseArgumentOrIndexStar(token, null);
+ token = parseArgumentOrIndexStar(token, noTypeParamOrArg);
} else {
// Recovery
reportRecoverableErrorWithToken(
@@ -3699,7 +3769,7 @@
assert(optional('..', cascadeOperator));
listener.beginCascade(cascadeOperator);
if (optional('[', token.next)) {
- token = parseArgumentOrIndexStar(token, null);
+ token = parseArgumentOrIndexStar(token, noTypeParamOrArg);
} else {
token = parseSend(token, IdentifierContext.expressionContinuation);
listener.endBinaryExpression(cascadeOperator);
@@ -3714,16 +3784,14 @@
next = token.next;
listener.endBinaryExpression(period);
}
- Token typeArguments;
TypeParamOrArgInfo typeArg = computeMethodTypeArguments(token);
if (typeArg != noTypeParamOrArg) {
// For example a(b)..<T>(c), where token is '<'.
- typeArguments = next;
token = typeArg.parseArguments(token, this);
next = token.next;
assert(optional('(', next));
}
- token = parseArgumentOrIndexStar(token, typeArguments);
+ token = parseArgumentOrIndexStar(token, typeArg);
next = token.next;
} while (!identical(mark, token));
@@ -3794,15 +3862,12 @@
return parsePrimary(token, IdentifierContext.expression);
}
- Token parseArgumentOrIndexStar(Token token, Token typeArguments) {
- // TODO(danrubel): Accept the token before typeArguments
- // TODO(brianwilkerson): Consider replacing `typeArguments` with a boolean
- // flag, given that the only thing it's used for is to compare it with null.
+ Token parseArgumentOrIndexStar(Token token, TypeParamOrArgInfo typeArg) {
Token next = token.next;
Token beginToken = next;
while (true) {
if (optional('[', next)) {
- assert(typeArguments == null);
+ assert(typeArg == noTypeParamOrArg);
Token openSquareBracket = next;
bool old = mayParseFunctionExpressions;
mayParseFunctionExpressions = true;
@@ -3817,15 +3882,26 @@
}
listener.handleIndexedExpression(openSquareBracket, next);
token = next;
+ typeArg = computeMethodTypeArguments(token);
+ if (typeArg != noTypeParamOrArg) {
+ // For example a[b]<T>(c), where token is before '<'.
+ token = typeArg.parseArguments(token, this);
+ assert(optional('(', token.next));
+ }
next = token.next;
} else if (optional('(', next)) {
- if (typeArguments == null) {
+ if (typeArg == noTypeParamOrArg) {
listener.handleNoTypeArguments(next);
}
token = parseArguments(token);
+ typeArg = computeMethodTypeArguments(token);
+ if (typeArg != noTypeParamOrArg) {
+ // For example a(b)<T>(c), where token is before '<'.
+ token = typeArg.parseArguments(token, this);
+ assert(optional('(', token.next));
+ }
next = token.next;
listener.handleSend(beginToken, next);
- typeArguments = null;
} else {
break;
}
diff --git a/pkg/front_end/lib/src/fasta/parser/recovery_listeners.dart b/pkg/front_end/lib/src/fasta/parser/recovery_listeners.dart
index 9ffcb3e..0508ecd 100644
--- a/pkg/front_end/lib/src/fasta/parser/recovery_listeners.dart
+++ b/pkg/front_end/lib/src/fasta/parser/recovery_listeners.dart
@@ -71,3 +71,26 @@
super.handleImportPrefix(deferredKeyword, asKeyword);
}
}
+
+class MixinHeaderRecoveryListener extends ForwardingListener {
+ Token onKeyword;
+ Token implementsKeyword;
+
+ void clear() {
+ onKeyword = null;
+ implementsKeyword = null;
+ }
+
+ @override
+ void handleClassOrMixinImplements(
+ Token implementsKeyword, int interfacesCount) {
+ this.implementsKeyword = implementsKeyword;
+ super.handleClassOrMixinImplements(implementsKeyword, interfacesCount);
+ }
+
+ @override
+ void handleMixinOn(Token onKeyword, int typeCount) {
+ this.onKeyword = onKeyword;
+ super.handleMixinOn(onKeyword, typeCount);
+ }
+}
diff --git a/pkg/front_end/lib/src/fasta/parser/util.dart b/pkg/front_end/lib/src/fasta/parser/util.dart
index f617749..50937cb6 100644
--- a/pkg/front_end/lib/src/fasta/parser/util.dart
+++ b/pkg/front_end/lib/src/fasta/parser/util.dart
@@ -63,12 +63,6 @@
return token == null ? TreeNode.noOffset : token.offset;
}
-/// A null-aware alternative to `token.end`. If [token] is `null`, returns
-/// `TreeNode.noOffset`.
-int endOffsetForToken(Token token) {
- return token == null ? TreeNode.noOffset : token.end;
-}
-
bool isDigit(int c) => c >= 0x30 && c <= 0x39;
bool isLetter(int c) => c >= 0x41 && c <= 0x5A || c >= 0x61 && c <= 0x7A;
diff --git a/pkg/front_end/lib/src/fasta/scanner.dart b/pkg/front_end/lib/src/fasta/scanner.dart
index 21de9c1..3229f4a 100644
--- a/pkg/front_end/lib/src/fasta/scanner.dart
+++ b/pkg/front_end/lib/src/fasta/scanner.dart
@@ -58,15 +58,12 @@
/// Scan/tokenize the given UTF8 [bytes].
/// If [recover] is null, then the [defaultRecoveryStrategy] is used.
ScannerResult scan(List<int> bytes,
- {bool includeComments: false,
- bool scanGenericMethodComments: false,
- Recover recover}) {
+ {bool includeComments: false, Recover recover}) {
if (bytes.last != 0) {
throw new ArgumentError("[bytes]: the last byte must be null.");
}
- Scanner scanner = new Utf8BytesScanner(bytes,
- includeComments: includeComments,
- scanGenericMethodComments: scanGenericMethodComments);
+ Scanner scanner =
+ new Utf8BytesScanner(bytes, includeComments: includeComments);
return _tokenizeAndRecover(scanner, recover, bytes: bytes);
}
@@ -74,13 +71,11 @@
/// If [recover] is null, then the [defaultRecoveryStrategy] is used.
ScannerResult scanString(String source,
{bool includeComments: false,
- bool scanGenericMethodComments: false,
bool scanLazyAssignmentOperators: false,
Recover recover}) {
assert(source != null, 'source must not be null');
- StringScanner scanner = new StringScanner(source,
- includeComments: includeComments,
- scanGenericMethodComments: scanGenericMethodComments);
+ StringScanner scanner =
+ new StringScanner(source, includeComments: includeComments);
return _tokenizeAndRecover(scanner, recover, source: source);
}
diff --git a/pkg/front_end/lib/src/fasta/scanner/abstract_scanner.dart b/pkg/front_end/lib/src/fasta/scanner/abstract_scanner.dart
index 74d577b..b680943 100644
--- a/pkg/front_end/lib/src/fasta/scanner/abstract_scanner.dart
+++ b/pkg/front_end/lib/src/fasta/scanner/abstract_scanner.dart
@@ -44,12 +44,6 @@
final bool includeComments;
/**
- * A flag indicating whether to parse generic method comments, of the form
- * `/*=T*/` and `/*<T>*/`. The flag [includeComments] must be set to `true`.
- */
- bool scanGenericMethodComments = false;
-
- /**
* The string offset for the next token that will be created.
*
* Note that in the [Utf8BytesScanner], [stringOffset] and [scanOffset] values
@@ -86,8 +80,7 @@
final List<int> lineStarts;
- AbstractScanner(this.includeComments, this.scanGenericMethodComments,
- {int numberOfBytesHint})
+ AbstractScanner(this.includeComments, {int numberOfBytesHint})
: lineStarts = new LineStarts(numberOfBytesHint) {
this.tail = this.tokens;
}
@@ -892,26 +885,6 @@
void appendComment(int start, TokenType type, bool asciiOnly) {
if (!includeComments) return;
CommentToken newComment = createCommentToken(type, start, asciiOnly);
- if (scanGenericMethodComments) {
- String value = newComment.lexeme;
- int length = value.length;
- if (length > 5 &&
- value.codeUnitAt(0) == $SLASH &&
- value.codeUnitAt(1) == $STAR &&
- value.codeUnitAt(2) == $EQ) {
- newComment = new CommentToken.fromString(
- TokenType.GENERIC_METHOD_TYPE_ASSIGN, value, start);
- } else if (length > 6 &&
- value.codeUnitAt(0) == $SLASH &&
- value.codeUnitAt(1) == $STAR &&
- value.codeUnitAt(2) == $LT &&
- value.codeUnitAt(length - 1) == $SLASH &&
- value.codeUnitAt(length - 2) == $STAR &&
- value.codeUnitAt(length - 3) == $GT) {
- newComment = new CommentToken.fromString(
- TokenType.GENERIC_METHOD_TYPE_LIST, value, start);
- }
- }
_appendToCommentStream(newComment);
}
diff --git a/pkg/front_end/lib/src/fasta/scanner/array_based_scanner.dart b/pkg/front_end/lib/src/fasta/scanner/array_based_scanner.dart
index 5d8487a..b6e0f09 100644
--- a/pkg/front_end/lib/src/fasta/scanner/array_based_scanner.dart
+++ b/pkg/front_end/lib/src/fasta/scanner/array_based_scanner.dart
@@ -27,10 +27,8 @@
abstract class ArrayBasedScanner extends AbstractScanner {
bool hasErrors = false;
- ArrayBasedScanner(bool includeComments, bool scanGenericMethodComments,
- {int numberOfBytesHint})
- : super(includeComments, scanGenericMethodComments,
- numberOfBytesHint: numberOfBytesHint);
+ ArrayBasedScanner(bool includeComments, {int numberOfBytesHint})
+ : super(includeComments, numberOfBytesHint: numberOfBytesHint);
/**
* The stack of open groups, e.g [: { ... ( .. :]
diff --git a/pkg/front_end/lib/src/fasta/scanner/string_scanner.dart b/pkg/front_end/lib/src/fasta/scanner/string_scanner.dart
index 7de4ef6..b5cb240 100644
--- a/pkg/front_end/lib/src/fasta/scanner/string_scanner.dart
+++ b/pkg/front_end/lib/src/fasta/scanner/string_scanner.dart
@@ -26,11 +26,9 @@
int scanOffset = -1;
StringScanner(String string,
- {bool includeComments: false,
- bool scanGenericMethodComments: false,
- bool scanLazyAssignmentOperators: false})
+ {bool includeComments: false, bool scanLazyAssignmentOperators: false})
: string = ensureZeroTermination(string),
- super(includeComments, scanGenericMethodComments);
+ super(includeComments);
static String ensureZeroTermination(String string) {
return (string.isEmpty || string.codeUnitAt(string.length - 1) != 0)
diff --git a/pkg/front_end/lib/src/fasta/scanner/utf8_bytes_scanner.dart b/pkg/front_end/lib/src/fasta/scanner/utf8_bytes_scanner.dart
index 9442bf9..eec14d4 100644
--- a/pkg/front_end/lib/src/fasta/scanner/utf8_bytes_scanner.dart
+++ b/pkg/front_end/lib/src/fasta/scanner/utf8_bytes_scanner.dart
@@ -81,10 +81,8 @@
* array whose last element is '0' to signal the end of the file. If this
* is not the case, the entire array is copied before scanning.
*/
- Utf8BytesScanner(this.bytes,
- {bool includeComments: false, bool scanGenericMethodComments: false})
- : super(includeComments, scanGenericMethodComments,
- numberOfBytesHint: bytes.length) {
+ Utf8BytesScanner(this.bytes, {bool includeComments: false})
+ : super(includeComments, numberOfBytesHint: bytes.length) {
assert(bytes.last == 0);
// Skip a leading BOM.
if (containsBomAt(0)) byteOffset += 3;
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 f4159f2..ad4a1df 100644
--- a/pkg/front_end/lib/src/fasta/source/diet_listener.dart
+++ b/pkg/front_end/lib/src/fasta/source/diet_listener.dart
@@ -32,7 +32,11 @@
show deprecated_InputError, deprecated_inputError;
import '../fasta_codes.dart'
- show Message, messageExpectedBlockToSkip, templateInternalProblemNotFound;
+ show
+ LocatedMessage,
+ Message,
+ messageExpectedBlockToSkip,
+ templateInternalProblemNotFound;
import '../kernel/kernel_body_builder.dart' show KernelBodyBuilder;
@@ -42,9 +46,6 @@
import '../kernel/kernel_function_type_alias_builder.dart'
show KernelFunctionTypeAliasBuilder;
-import '../kernel/kernel_procedure_builder.dart'
- show KernelRedirectingFactoryBuilder;
-
import '../parser.dart' show Assert, MemberKind, Parser, optional;
import '../problems.dart' show DebugAbort, internalProblem, unexpected;
@@ -76,11 +77,6 @@
int importExportDirectiveIndex = 0;
int partDirectiveIndex = 0;
- /// The unit currently being parsed, might be the same as [library] when
- /// the defining unit of the library is being parsed, updated from outside
- /// before parsing each part.
- SourceLibraryBuilder currentUnit;
-
ClassBuilder currentClass;
/// For top-level declarations, this is the library scope. For class members,
@@ -126,8 +122,7 @@
Token partKeyword, Token ofKeyword, Token semicolon, bool hasName) {
debugEvent("PartOf");
if (hasName) discard(1);
- Token metadata = pop();
- parseMetadata(currentUnit, metadata, currentUnit.target);
+ discard(1); // Metadata.
}
@override
@@ -288,8 +283,9 @@
String name = pop();
Token metadata = pop();
checkEmpty(beginToken.charOffset);
- buildFunctionBody(bodyToken, lookupBuilder(beginToken, getOrSet, name),
- MemberKind.TopLevelMethod, metadata);
+ final StackListener listener =
+ createFunctionListener(lookupBuilder(beginToken, getOrSet, name));
+ buildFunctionBody(listener, bodyToken, metadata, MemberKind.TopLevelMethod);
}
@override
@@ -324,7 +320,8 @@
debugEvent("handleQualified");
String suffix = pop();
var prefix = pop();
- push(new QualifiedName(prefix, suffix, period.charOffset));
+ assert(identical(suffix, period.next.lexeme));
+ push(new QualifiedName(prefix, period.next));
}
@override
@@ -498,37 +495,16 @@
Object name = pop();
Token metadata = pop();
checkEmpty(beginToken.charOffset);
- if (bodyToken == null || optional("=", bodyToken.endGroup.next)) {
- // TODO(dmitryas): Consider building redirecting factory bodies here.
- KernelRedirectingFactoryBuilder factory =
- lookupConstructor(beginToken, name);
- parseMetadata(factory, metadata, factory.target);
- if (factory.formals != null) {
- List<int> metadataOffsets = new List<int>(factory.formals.length);
- for (int i = 0; i < factory.formals.length; ++i) {
- List<MetadataBuilder> metadata = factory.formals[i].metadata;
- if (metadata != null && metadata.length > 0) {
- // [parseMetadata] is using [Parser.parseMetadataStar] under the
- // hood, so we only need the offset of the first annotation.
- metadataOffsets[i] = metadata[0].charOffset;
- } else {
- metadataOffsets[i] = -1;
- }
- }
- List<Token> metadataTokens =
- tokensForOffsets(beginToken, endToken, metadataOffsets);
- for (int i = 0; i < factory.formals.length; ++i) {
- Token metadata = metadataTokens[i];
- if (metadata == null) continue;
- parseMetadata(
- factory.formals[i], metadata, factory.formals[i].target);
- }
- }
- return;
+ ProcedureBuilder builder = lookupConstructor(beginToken, name);
+ if (bodyToken == null || optional("=", bodyToken.endGroup.next)) {
+ parseMetadata(builder, metadata, builder.target);
+ buildRedirectingFactoryMethod(
+ bodyToken, builder, MemberKind.Factory, metadata);
+ } else {
+ buildFunctionBody(createFunctionListener(builder), bodyToken, metadata,
+ MemberKind.Factory);
}
- buildFunctionBody(bodyToken, lookupConstructor(beginToken, name),
- MemberKind.Factory, metadata);
}
@override
@@ -575,10 +551,12 @@
builder = lookupBuilder(beginToken, getOrSet, name);
}
buildFunctionBody(
+ createFunctionListener(builder),
beginParam,
- builder,
- builder.isStatic ? MemberKind.StaticMethod : MemberKind.NonStaticMethod,
- metadata);
+ metadata,
+ builder.isStatic
+ ? MemberKind.StaticMethod
+ : MemberKind.NonStaticMethod);
}
StackListener createListener(
@@ -610,19 +588,40 @@
..constantContext = constantContext;
}
- void buildFunctionBody(
- Token token, ProcedureBuilder builder, MemberKind kind, Token metadata) {
- Scope typeParameterScope = builder.computeTypeParameterScope(memberScope);
- Scope formalParameterScope =
+ StackListener createFunctionListener(ProcedureBuilder builder) {
+ final Scope typeParameterScope =
+ builder.computeTypeParameterScope(memberScope);
+ final Scope formalParameterScope =
builder.computeFormalParameterScope(typeParameterScope);
assert(typeParameterScope != null);
assert(formalParameterScope != null);
- parseFunctionBody(
- createListener(builder, typeParameterScope, builder.isInstanceMember,
- formalParameterScope),
- token,
- metadata,
- kind);
+ return createListener(builder, typeParameterScope, builder.isInstanceMember,
+ formalParameterScope);
+ }
+
+ void buildRedirectingFactoryMethod(
+ Token token, ProcedureBuilder builder, MemberKind kind, Token metadata) {
+ final StackListener listener = createFunctionListener(builder);
+ try {
+ Parser parser = new Parser(listener);
+
+ if (metadata != null) {
+ parser.parseMetadataStar(parser.syntheticPreviousToken(metadata));
+ listener.pop();
+ }
+
+ token = parser.parseFormalParametersOpt(
+ parser.syntheticPreviousToken(token), MemberKind.Factory);
+
+ listener.pop();
+ listener.checkEmpty(token.next.charOffset);
+ } on DebugAbort {
+ rethrow;
+ } on deprecated_InputError {
+ rethrow;
+ } catch (e, s) {
+ throw new Crash(uri, token.charOffset, e, s);
+ }
}
void buildFields(int count, Token token, bool isTopLevel) {
@@ -751,7 +750,7 @@
listener.finishFields();
}
- void parseFunctionBody(StackListener listener, Token startToken,
+ void buildFunctionBody(StackListener listener, Token startToken,
Token metadata, MemberKind kind) {
Token token = startToken;
try {
@@ -823,14 +822,11 @@
Declaration lookupConstructor(Token token, Object nameOrQualified) {
assert(currentClass != null);
Declaration declaration;
- String name;
String suffix;
if (nameOrQualified is QualifiedName) {
- name = nameOrQualified.prefix;
- suffix = nameOrQualified.suffix;
+ suffix = nameOrQualified.name;
} else {
- name = nameOrQualified;
- suffix = name == currentClass.name ? "" : name;
+ suffix = nameOrQualified == currentClass.name ? "" : nameOrQualified;
}
declaration = currentClass.constructors.local[suffix];
checkBuilder(token, declaration, nameOrQualified);
@@ -852,12 +848,10 @@
}
@override
- void addCompileTimeError(Message message, int charOffset, int length) {
- library.addCompileTimeError(message, charOffset, length, uri);
- }
-
- void addProblem(Message message, int charOffset, int length) {
- library.addProblem(message, charOffset, length, uri);
+ void addProblem(Message message, int charOffset, int length,
+ {bool wasHandled: false, List<LocatedMessage> context}) {
+ library.addProblem(message, charOffset, length, uri,
+ wasHandled: wasHandled, context: context);
}
@override
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 6fc54ed..8bbedb6 100644
--- a/pkg/front_end/lib/src/fasta/source/outline_builder.dart
+++ b/pkg/front_end/lib/src/fasta/source/outline_builder.dart
@@ -4,8 +4,6 @@
library fasta.outline_builder;
-import 'dart:math' show min;
-
import 'package:kernel/ast.dart' show ProcedureKind;
import '../../scanner/token.dart' show Token;
@@ -14,13 +12,14 @@
import '../builder/metadata_builder.dart' show ExpressionMetadataBuilder;
-import '../combinator.dart' show Combinator, CombinatorIdentifier;
+import '../combinator.dart' show Combinator;
import '../fasta_codes.dart'
show
LocatedMessage,
Message,
messageConstConstructorWithBody,
+ messageConstInstanceField,
messageConstMethod,
messageConstructorWithReturnType,
messageConstructorWithTypeParameters,
@@ -29,6 +28,7 @@
messageOperatorWithOptionalFormals,
messageStaticConstructor,
messageTypedefNotFunction,
+ templateCycleInTypeVariables,
templateDuplicatedParameterName,
templateDuplicatedParameterNameCause,
templateOperatorMinusParameterMismatch,
@@ -113,14 +113,12 @@
int popCharOffset() => pop();
- List<CombinatorIdentifier> popIdentifierList(int count) {
+ List<String> popIdentifierList(int count) {
if (count == 0) return null;
- var list = new List<CombinatorIdentifier>.filled(count, null);
+ List<String> list = new List<String>.filled(count, null, growable: true);
for (int i = count - 1; i >= 0; i--) {
- bool isSynthetic = pop();
- int offset = popCharOffset();
- String name = pop();
- list[i] = new CombinatorIdentifier(offset, name, isSynthetic);
+ popCharOffset();
+ list[i] = pop();
}
return list;
}
@@ -150,50 +148,33 @@
}
@override
- void beginMetadataStar(Token token) {
- push(token);
- }
-
- @override
void endMetadataStar(int count) {
debugEvent("MetadataStar");
- if (count == 0) {
- pop();
- push(NullValue.MetadataToken);
- push(NullValue.Metadata);
- } else {
- push(popList(
- count,
- new List<ExpressionMetadataBuilder<TypeBuilder>>.filled(count, null,
- growable: true)));
- }
+ push(popList(
+ count,
+ new List<ExpressionMetadataBuilder<TypeBuilder>>.filled(count, null,
+ growable: true)) ??
+ NullValue.Metadata);
}
@override
void handleInvalidTopLevelDeclaration(Token endToken) {
debugEvent("InvalidTopLevelDeclaration");
pop(); // metadata star
- pop(); // metadataToken
}
@override
void endHide(Token hideKeyword) {
debugEvent("Hide");
- List<CombinatorIdentifier> identifiers = pop();
- List<String> names =
- identifiers.map((identifier) => identifier.name).toList();
- push(new Combinator.hide(
- identifiers, names, hideKeyword.charOffset, library.fileUri));
+ List<String> names = pop();
+ push(new Combinator.hide(names, hideKeyword.charOffset, library.fileUri));
}
@override
void endShow(Token showKeyword) {
debugEvent("Show");
- List<CombinatorIdentifier> identifiers = pop();
- List<String> names =
- identifiers.map((identifier) => identifier.name).toList();
- push(new Combinator.show(
- identifiers, names, showKeyword.charOffset, library.fileUri));
+ List<String> names = pop();
+ push(new Combinator.show(names, showKeyword.charOffset, library.fileUri));
}
@override
@@ -212,7 +193,6 @@
int uriOffset = popCharOffset();
String uri = pop();
List<MetadataBuilder> metadata = pop();
- pop(); // metadataToken
library.addExport(metadata, uri, configurations, combinators,
exportKeyword.charOffset, uriOffset);
checkEmpty(exportKeyword.charOffset);
@@ -241,7 +221,6 @@
int uriOffset = popCharOffset();
String uri = pop(); // For a conditional import, this is the default URI.
List<MetadataBuilder> metadata = pop();
- pop(); // metadataToken
library.addImport(
metadata,
uri,
@@ -278,9 +257,7 @@
@override
void handleDottedName(int count, Token firstIdentifier) {
debugEvent("DottedName");
- push(popIdentifierList(count)
- .map((identifier) => identifier.name)
- .join('.'));
+ push(popIdentifierList(count).join('.'));
}
@override
@@ -299,7 +276,6 @@
int charOffset = popCharOffset();
String uri = pop();
List<MetadataBuilder> metadata = pop();
- pop(); // metadataToken
library.addPart(metadata, uri, charOffset);
checkEmpty(partKeyword.charOffset);
}
@@ -323,15 +299,12 @@
if (context == IdentifierContext.enumValueDeclaration) {
super.handleIdentifier(token, context);
push(token.charOffset);
- var docComment = documentationCommentBefore(token);
- push(docComment?.text ?? NullValue.DocumentationComment);
+ String documentationComment = getDocumentationComment(token);
+ push(documentationComment ?? NullValue.DocumentationComment);
} else {
super.handleIdentifier(token, context);
push(token.charOffset);
}
- if (context.requiresSyntheticFlag) {
- push(token.isSynthetic);
- }
if (inConstructor && context == IdentifierContext.methodDeclaration) {
inConstructorName = true;
}
@@ -363,7 +336,7 @@
push(charOffset);
// Point to dollar sign
int interpolationOffset = charOffset + beginToken.lexeme.length;
- addCompileTimeError(messageInterpolationInUri, interpolationOffset, 1);
+ addProblem(messageInterpolationInUri, interpolationOffset, 1);
}
}
@@ -404,9 +377,11 @@
debugEvent("handleQualified");
int suffixOffset = pop();
String suffix = pop();
+ assert(identical(suffix, period.next.lexeme));
+ assert(suffixOffset == period.next.charOffset);
int offset = pop();
var prefix = pop();
- push(new QualifiedName(prefix, suffix, suffixOffset));
+ push(new QualifiedName(prefix, period.next));
push(offset);
}
@@ -414,12 +389,11 @@
void endLibraryName(Token libraryKeyword, Token semicolon) {
debugEvent("endLibraryName");
popCharOffset();
+ String documentationComment = getDocumentationComment(libraryKeyword);
Object name = pop();
List<MetadataBuilder> metadata = pop();
- Token metadataToken = pop();
- var docComment = documentationComment(libraryKeyword, metadataToken);
- library.documentationComment = docComment?.text;
- library.name = "${name}";
+ library.documentationComment = documentationComment;
+ library.name = flattenName(name, offsetForToken(libraryKeyword), uri);
library.metadata = metadata;
}
@@ -482,6 +456,7 @@
@override
void endClassDeclaration(Token beginToken, Token endToken) {
debugEvent("endClassDeclaration");
+ String documentationComment = getDocumentationComment(beginToken);
List<TypeBuilder> interfaces = pop(NullValue.TypeBuilderList);
int supertypeOffset = pop();
TypeBuilder supertype = pop();
@@ -493,18 +468,12 @@
supertype.typeVariables = typeVariables;
}
List<MetadataBuilder> metadata = pop();
- Token metadataToken = pop();
- var docComment = documentationComment(beginToken, metadataToken);
final int startCharOffset =
metadata == null ? beginToken.charOffset : metadata.first.charOffset;
- int codeStartOffset =
- _chooseCodeStartOffset(docComment, metadataToken, beginToken);
- int codeEndOffset = endToken.end;
-
library.addClass(
- docComment?.text,
+ documentationComment,
metadata,
modifiers,
name,
@@ -514,9 +483,7 @@
startCharOffset,
charOffset,
endToken.charOffset,
- supertypeOffset,
- codeStartOffset,
- codeEndOffset);
+ supertypeOffset);
checkEmpty(beginToken.charOffset);
}
@@ -557,21 +524,15 @@
modifiers |= abstractMask;
}
List<MetadataBuilder> metadata = pop();
- Token metadataToken = pop();
- var docComment = documentationComment(beginToken, metadataToken);
+ String documentationComment = getDocumentationComment(beginToken);
checkEmpty(beginToken.charOffset);
library
.endNestedDeclaration("#method")
.resolveTypes(typeVariables, library);
final int startCharOffset =
metadata == null ? beginToken.charOffset : metadata.first.charOffset;
-
- int codeStartOffset =
- _chooseCodeStartOffset(docComment, metadataToken, beginToken);
- int codeEndOffset = endToken.end;
-
library.addProcedure(
- docComment?.text,
+ documentationComment,
metadata,
modifiers,
returnType,
@@ -584,8 +545,6 @@
formalsOffset,
endToken.charOffset,
nativeMethodName,
- codeStartOffset,
- codeEndOffset,
isTopLevel: true);
nativeMethodName = null;
}
@@ -632,8 +591,9 @@
@override
void beginMethod(Token externalToken, Token staticToken, Token covariantToken,
- Token varFinalOrConst, Token name) {
- inConstructor = name?.lexeme == library.currentDeclaration.name;
+ Token varFinalOrConst, Token getOrSet, Token name) {
+ inConstructor =
+ name?.lexeme == library.currentDeclaration.name && getOrSet == null;
List<Modifier> modifiers = <Modifier>[];
if (externalToken != null) {
modifiers.add(External);
@@ -711,14 +671,13 @@
charOffset, uri);
}
String string = name;
- addCompileTimeError(
- template.withArguments(name), charOffset, string.length);
+ addProblem(template.withArguments(name), charOffset, string.length);
} else {
if (formals != null) {
for (FormalParameterBuilder formal in formals) {
if (!formal.isRequired) {
- addCompileTimeError(messageOperatorWithOptionalFormals,
- formal.charOffset, formal.name.length);
+ addProblem(messageOperatorWithOptionalFormals, formal.charOffset,
+ formal.name.length);
}
}
}
@@ -743,8 +702,7 @@
bool isConst = (modifiers & constMask) != 0;
int varFinalOrConstOffset = pop();
List<MetadataBuilder> metadata = pop();
- Token metadataToken = pop();
- var docComment = documentationComment(beginToken, metadataToken);
+ String documentationComment = getDocumentationComment(beginToken);
library
.endNestedDeclaration("#method")
.resolveTypes(typeVariables, library);
@@ -754,8 +712,7 @@
: library.computeAndValidateConstructorName(name, charOffset);
if (constructorName != null) {
if (isConst && bodyKind != MethodBody.Abstract) {
- addCompileTimeError(
- messageConstConstructorWithBody, varFinalOrConstOffset, 5);
+ addProblem(messageConstConstructorWithBody, varFinalOrConstOffset, 5);
modifiers &= ~constMask;
}
if (returnType != null) {
@@ -766,13 +723,8 @@
}
final int startCharOffset =
metadata == null ? beginToken.charOffset : metadata.first.charOffset;
-
- int codeStartOffset =
- _chooseCodeStartOffset(docComment, metadataToken, beginToken);
- int codeEndOffset = endToken.end;
-
library.addConstructor(
- docComment?.text,
+ documentationComment,
metadata,
modifiers,
returnType,
@@ -784,23 +736,16 @@
charOffset,
formalsOffset,
endToken.charOffset,
- codeStartOffset,
- codeEndOffset,
nativeMethodName);
} else {
if (isConst) {
- addCompileTimeError(messageConstMethod, varFinalOrConstOffset, 5);
+ addProblem(messageConstMethod, varFinalOrConstOffset, 5);
modifiers &= ~constMask;
}
final int startCharOffset =
metadata == null ? beginToken.charOffset : metadata.first.charOffset;
-
- int codeStartOffset =
- _chooseCodeStartOffset(docComment, metadataToken, beginToken);
- int codeEndOffset = endToken.end;
-
library.addProcedure(
- docComment?.text,
+ documentationComment,
metadata,
modifiers,
returnType,
@@ -813,8 +758,6 @@
formalsOffset,
endToken.charOffset,
nativeMethodName,
- codeStartOffset,
- codeEndOffset,
isTopLevel: false);
}
nativeMethodName = null;
@@ -834,6 +777,7 @@
void endNamedMixinApplication(Token beginToken, Token classKeyword,
Token equals, Token implementsKeyword, Token endToken) {
debugEvent("endNamedMixinApplication");
+ String documentationComment = getDocumentationComment(beginToken);
List<TypeBuilder> interfaces = popIfNotNull(implementsKeyword);
TypeBuilder mixinApplication = pop();
int modifiers = pop();
@@ -841,24 +785,8 @@
int charOffset = pop();
String name = pop();
List<MetadataBuilder> metadata = pop();
- Token metadataToken = pop();
- var docComment = documentationComment(beginToken, metadataToken);
-
- int codeStartOffset =
- _chooseCodeStartOffset(docComment, metadataToken, beginToken);
- int codeEndOffset = endToken.end;
-
- library.addNamedMixinApplication(
- docComment?.text,
- metadata,
- name,
- typeVariables,
- modifiers,
- mixinApplication,
- interfaces,
- charOffset,
- codeStartOffset,
- codeEndOffset);
+ library.addNamedMixinApplication(documentationComment, metadata, name,
+ typeVariables, modifiers, mixinApplication, interfaces, charOffset);
checkEmpty(beginToken.charOffset);
}
@@ -907,36 +835,23 @@
}
@override
- void beginFormalParameter(Token beginToken, MemberKind kind,
- Token covariantToken, Token varFinalOrConst) {
- push(beginToken);
+ void beginFormalParameter(Token token, MemberKind kind, Token covariantToken,
+ Token varFinalOrConst) {
push((covariantToken != null ? covariantMask : 0) |
Modifier.validateVarFinalOrConst(varFinalOrConst?.lexeme));
}
@override
- void endFormalParameter(
- Token thisKeyword,
- Token periodAfterThis,
- Token nameToken,
- FormalParameterKind kind,
- MemberKind memberKind,
- Token endToken) {
+ void endFormalParameter(Token thisKeyword, Token periodAfterThis,
+ Token nameToken, FormalParameterKind kind, MemberKind memberKind) {
debugEvent("FormalParameter");
int charOffset = pop();
String name = pop();
TypeBuilder type = pop();
int modifiers = pop();
- Token beginToken = pop();
List<MetadataBuilder> metadata = pop();
- Token metadataToken = pop();
-
- int codeStartOffset =
- _chooseCodeStartOffset(null, metadataToken, beginToken);
- int codeEndOffset = endToken.end;
-
- push(library.addFormalParameter(metadata, modifiers, type, name,
- thisKeyword != null, charOffset, codeStartOffset, codeEndOffset));
+ push(library.addFormalParameter(
+ metadata, modifiers, type, name, thisKeyword != null, charOffset));
}
@override
@@ -1013,7 +928,7 @@
if (formals.length == 2) {
// The name may be null for generalized function types.
if (formals[0].name != null && formals[0].name == formals[1].name) {
- addCompileTimeError(
+ addProblem(
templateDuplicatedParameterName.withArguments(formals[1].name),
formals[1].charOffset,
formals[1].name.length,
@@ -1030,7 +945,7 @@
for (FormalParameterBuilder formal in formals) {
if (formal.name == null) continue;
if (seenNames.containsKey(formal.name)) {
- addCompileTimeError(
+ addProblem(
templateDuplicatedParameterName.withArguments(formal.name),
formal.charOffset,
formal.name.length,
@@ -1065,15 +980,14 @@
@override
void endEnum(Token enumKeyword, Token leftBrace, int count) {
+ String documentationComment = getDocumentationComment(enumKeyword);
List<Object> constantNamesAndOffsets = popList(
- count * 5, new List<Object>.filled(count * 5, null, growable: true));
+ count * 4, new List<Object>.filled(count * 4, null, growable: true));
int charOffset = pop();
String name = pop();
List<MetadataBuilder> metadata = pop();
- Token metadataToken = pop();
- var docComment = documentationComment(enumKeyword, metadataToken);
- library.addEnum(docComment?.text, metadata, name, constantNamesAndOffsets,
- charOffset, leftBrace?.endGroup?.charOffset);
+ library.addEnum(documentationComment, metadata, name,
+ constantNamesAndOffsets, charOffset, leftBrace?.endGroup?.charOffset);
checkEmpty(enumKeyword.charOffset);
}
@@ -1120,6 +1034,7 @@
void endFunctionTypeAlias(
Token typedefKeyword, Token equals, Token endToken) {
debugEvent("endFunctionTypeAlias");
+ String documentationComment = getDocumentationComment(typedefKeyword);
List<TypeVariableBuilder> typeVariables;
String name;
int charOffset;
@@ -1150,14 +1065,11 @@
functionType = type;
} else {
// TODO(ahe): Improve this error message.
- addCompileTimeError(
- messageTypedefNotFunction, equals.charOffset, equals.length);
+ addProblem(messageTypedefNotFunction, equals.charOffset, equals.length);
}
}
List<MetadataBuilder> metadata = pop();
- Token metadataToken = pop();
- var docComment = documentationComment(typedefKeyword, metadataToken);
- library.addFunctionTypeAlias(docComment?.text, metadata, name,
+ library.addFunctionTypeAlias(documentationComment, metadata, name,
typeVariables, functionType, charOffset);
checkEmpty(typedefKeyword.charOffset);
}
@@ -1173,12 +1085,9 @@
(covariantToken != null ? covariantMask : 0) |
Modifier.validateVarFinalOrConst(varFinalOrConst?.lexeme);
List<MetadataBuilder> metadata = pop();
- Token metadataToken = pop();
- var docComment = documentationComment(beginToken, metadataToken);
- int firstFieldCodeStartOffset =
- _chooseCodeStartOffset(docComment, metadataToken, beginToken);
- library.addFields(docComment?.text, metadata, modifiers, type, fieldsInfo,
- firstFieldCodeStartOffset);
+ String documentationComment = getDocumentationComment(beginToken);
+ library.addFields(
+ documentationComment, metadata, modifiers, type, fieldsInfo);
checkEmpty(beginToken.charOffset);
}
@@ -1192,13 +1101,17 @@
int modifiers = (staticToken != null ? staticMask : 0) |
(covariantToken != null ? covariantMask : 0) |
Modifier.validateVarFinalOrConst(varFinalOrConst?.lexeme);
+ if (staticToken == null && modifiers & constMask != 0) {
+ // It is a compile-time error if an instance variable is declared to be
+ // constant.
+ addProblem(messageConstInstanceField, varFinalOrConst.charOffset,
+ varFinalOrConst.length);
+ modifiers &= ~constMask;
+ }
List<MetadataBuilder> metadata = pop();
- Token metadataToken = pop();
- var docComment = documentationComment(beginToken, metadataToken);
- int firstFieldCodeStartOffset =
- _chooseCodeStartOffset(docComment, metadataToken, beginToken);
- library.addFields(docComment?.text, metadata, modifiers, type, fieldsInfo,
- firstFieldCodeStartOffset);
+ String documentationComment = getDocumentationComment(beginToken);
+ library.addFields(
+ documentationComment, metadata, modifiers, type, fieldsInfo);
}
@override
@@ -1209,7 +1122,6 @@
// TODO(paulberry): type variable metadata should not be ignored. See
// dartbug.com/28981.
/* List<MetadataBuilder> metadata = */ pop();
- pop(); // metadataToken
push(library.addTypeVariable(name, null, charOffset));
}
@@ -1235,6 +1147,53 @@
void endTypeVariables(Token beginToken, Token endToken) {
debugEvent("endTypeVariables");
+ // Peek to leave type parameters on top of stack.
+ List typeParameters = peek();
+
+ Map<String, TypeVariableBuilder> typeVariablesByName;
+ for (TypeVariableBuilder builder in typeParameters) {
+ if (builder.bound != null) {
+ if (typeVariablesByName == null) {
+ typeVariablesByName = new Map<String, TypeVariableBuilder>();
+ for (TypeVariableBuilder builder in typeParameters) {
+ typeVariablesByName[builder.name] = builder;
+ }
+ }
+
+ // Find cycle: If there's no cycle we can at most step through all
+ // `typeParameters` (at which point the last builders bound will be
+ // null).
+ // If there is a cycle with `builder` 'inside' the steps to get back to
+ // it will also be bound by `typeParameters.length`.
+ // If there is a cycle without `builder` 'inside' we will just ignore it
+ // for now. It will be reported when processing one of the `builder`s
+ // that is in fact `inside` the cycle. This matches the cyclic class
+ // hierarchy error.
+ TypeVariableBuilder bound = builder;
+ for (int steps = 0;
+ bound.bound != null && steps < typeParameters.length;
+ ++steps) {
+ bound = typeVariablesByName[bound.bound.name];
+ if (bound == null || bound == builder) break;
+ }
+ if (bound == builder && bound.bound != null) {
+ // Write out cycle.
+ List<String> via = new List<String>();
+ bound = typeVariablesByName[builder.bound.name];
+ while (bound != builder) {
+ via.add(bound.name);
+ bound = typeVariablesByName[bound.bound.name];
+ }
+ String involvedString = via.join("', '");
+ addProblem(
+ templateCycleInTypeVariables.withArguments(
+ builder.name, involvedString),
+ builder.charOffset,
+ builder.name.length);
+ }
+ }
+ }
+
if (inConstructorName) {
addProblem(messageConstructorWithTypeParameters,
offsetForToken(beginToken), lengthOfSpan(beginToken, endToken));
@@ -1249,9 +1208,9 @@
int charOffset = popCharOffset();
Object containingLibrary = pop();
List<MetadataBuilder> metadata = pop();
- pop(); // metadataToken
if (hasName) {
- library.addPartOf(metadata, "$containingLibrary", null, charOffset);
+ library.addPartOf(metadata,
+ flattenName(containingLibrary, charOffset, uri), null, charOffset);
} else {
library.addPartOf(metadata, null, containingLibrary, charOffset);
}
@@ -1295,15 +1254,9 @@
Object name = pop();
int modifiers = pop();
List<MetadataBuilder> metadata = pop();
- Token metadataToken = pop();
- var docComment = documentationComment(beginToken, metadataToken);
-
- int codeStartOffset =
- _chooseCodeStartOffset(docComment, metadataToken, beginToken);
- int codeEndOffset = endToken.end;
-
+ String documentationComment = getDocumentationComment(beginToken);
library.addFactoryMethod(
- docComment?.text,
+ documentationComment,
metadata,
modifiers,
name,
@@ -1313,8 +1266,6 @@
charOffset,
formalsOffset,
endToken.charOffset,
- codeStartOffset,
- codeEndOffset,
nativeMethodName);
nativeMethodName = null;
inConstructor = false;
@@ -1368,7 +1319,6 @@
void handleInvalidMember(Token endToken) {
debugEvent("InvalidMember");
pop(); // metadata star
- pop(); // metadataToken
}
@override
@@ -1393,72 +1343,38 @@
debugEvent("AsyncModifier");
}
- @override
- void addCompileTimeError(Message message, int charOffset, int length,
- {List<LocatedMessage> context}) {
- library.addCompileTimeError(message, charOffset, length, uri,
- context: context);
- }
-
void addProblem(Message message, int charOffset, int length,
- {List<LocatedMessage> context}) {
- library.addProblem(message, charOffset, length, uri, context: context);
- }
-
- static int _chooseCodeStartOffset(
- _DocumentationComment docComment, Token metadataToken, Token beginToken) {
- if (docComment != null && metadataToken != null) {
- return min(docComment.offset, metadataToken.charOffset);
- }
- if (docComment != null) {
- return docComment.offset;
- }
- if (metadataToken != null) {
- return metadataToken.charOffset;
- }
- return beginToken.offset;
- }
-
- /// Return the documentation comment for the [beginToken] or [metadataToken],
- /// or `null` if there is no preceding documentation comment in either of
- /// these nodes.
- static _DocumentationComment documentationComment(
- Token beginToken, Token metadataToken) {
- return documentationCommentBefore(beginToken) ??
- documentationCommentBefore(metadataToken);
+ {bool wasHandled: false, List<LocatedMessage> context}) {
+ library.addProblem(message, charOffset, length, uri,
+ wasHandled: wasHandled, context: context);
}
/// Return the documentation comment for the entity that starts at the
/// given [token], or `null` if there is no preceding documentation comment.
- static _DocumentationComment documentationCommentBefore(Token token) {
- Token commentToken = token?.precedingComments;
- if (commentToken == null) return null;
+ static String getDocumentationComment(Token token) {
+ Token docToken = token.precedingComments;
+ if (docToken == null) return null;
bool inSlash = false;
- Token firstDocToken;
- StringBuffer buffer;
- while (commentToken != null) {
- String lexeme = commentToken.lexeme;
+ var buffer = new StringBuffer();
+ while (docToken != null) {
+ String lexeme = docToken.lexeme;
if (lexeme.startsWith('/**')) {
inSlash = false;
- firstDocToken = commentToken;
- buffer = new StringBuffer();
+ buffer.clear();
buffer.write(lexeme);
} else if (lexeme.startsWith('///')) {
- if (!inSlash || buffer == null) {
+ if (!inSlash) {
inSlash = true;
- firstDocToken = commentToken;
- buffer = new StringBuffer();
+ buffer.clear();
}
if (buffer.isNotEmpty) {
buffer.writeln();
}
buffer.write(lexeme);
}
- commentToken = commentToken.next;
+ docToken = docToken.next;
}
- if (buffer == null) return null;
- return new _DocumentationComment(
- firstDocToken.charOffset, buffer.toString());
+ return buffer.toString();
}
@override
@@ -1466,10 +1382,3 @@
// printEvent('OutlineBuilder: $name');
}
}
-
-class _DocumentationComment {
- final int offset;
- final String text;
-
- _DocumentationComment(this.offset, this.text);
-}
diff --git a/pkg/front_end/lib/src/fasta/source/outline_listener.dart b/pkg/front_end/lib/src/fasta/source/outline_listener.dart
deleted file mode 100644
index 0f77d6c..0000000
--- a/pkg/front_end/lib/src/fasta/source/outline_listener.dart
+++ /dev/null
@@ -1,29 +0,0 @@
-// 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 '../kernel/kernel_ast_api.dart' show DartType, Node;
-
-/// Callback interface used by builders to report the results of resolution
-/// in library outlines to a client.
-class OutlineListener {
- /// Stores given resolution data at the given [offset].
- ///
- /// If the token for which the data is stored is synthetic, then [isSynthetic]
- /// is set to `true`.
- ///
- /// [importIndex] is the index of the import directive in the library, and
- /// is used to store import prefixes.
- ///
- /// [reference] is the referenced declaration - a class, a typedef, a type
- /// parameter, etc.
- ///
- /// [type] is the type that was build from the [reference], for example code
- /// `List<int>` will have a reference to `List` and type `List<int>`, i.e.
- /// with type arguments applied.
- void store(int offset, bool isSynthetic,
- {int importIndex,
- bool isNamespaceCombinatorReference,
- Node reference,
- DartType type}) {}
-}
diff --git a/pkg/front_end/lib/src/fasta/source/source_class_builder.dart b/pkg/front_end/lib/src/fasta/source/source_class_builder.dart
index 6135e72..8df5e4a 100644
--- a/pkg/front_end/lib/src/fasta/source/source_class_builder.dart
+++ b/pkg/front_end/lib/src/fasta/source/source_class_builder.dart
@@ -161,15 +161,15 @@
if (!member.isStatic) return;
// TODO(ahe): Revisit these messages. It seems like the last two should
// be `context` parameter to this message.
- addCompileTimeError(templateConflictsWithMember.withArguments(name),
+ addProblem(templateConflictsWithMember.withArguments(name),
constructor.charOffset, noLength);
if (constructor.isFactory) {
- addCompileTimeError(
+ addProblem(
templateConflictsWithFactory.withArguments("${this.name}.${name}"),
member.charOffset,
noLength);
} else {
- addCompileTimeError(
+ addProblem(
templateConflictsWithConstructor
.withArguments("${this.name}.${name}"),
member.charOffset,
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 75ee308..a96b82c 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
@@ -29,7 +29,8 @@
TypeBuilder,
TypeDeclarationBuilder,
TypeVariableBuilder,
- UnresolvedType;
+ UnresolvedType,
+ flattenName;
import '../combinator.dart' show Combinator;
@@ -48,12 +49,14 @@
noLength,
templateConflictsWithMember,
templateConflictsWithSetter,
+ templateConstructorWithWrongNameContext,
templateCouldNotParseUri,
templateDeferredPrefixDuplicated,
templateDeferredPrefixDuplicatedCause,
templateDuplicatedDefinition,
- templateConstructorWithWrongNameContext,
templateMissingPartOf,
+ templateNotAPrefixInTypeAnnotation,
+ templatePartOfInLibrary,
templatePartOfLibraryNameMismatch,
templatePartOfUriMismatch,
templatePartOfUseUri,
@@ -65,8 +68,6 @@
import '../problems.dart' show unhandled;
-import '../source/outline_listener.dart' show OutlineListener;
-
import 'source_loader.dart' show SourceLoader;
abstract class SourceLibraryBuilder<T extends TypeBuilder, R>
@@ -115,8 +116,6 @@
bool canAddImplementationBuilders = false;
- final OutlineListener outlineListener;
-
SourceLibraryBuilder(SourceLoader loader, Uri fileUri, Scope scope)
: this.fromScopes(loader, fileUri, new DeclarationBuilder<T>.library(),
scope ?? new Scope.top());
@@ -125,7 +124,6 @@
this.loader, this.fileUri, this.libraryDeclaration, this.importScope)
: disableTypeInference = loader.target.disableTypeInference,
currentDeclaration = libraryDeclaration,
- outlineListener = loader.createOutlineListener(fileUri),
super(
fileUri, libraryDeclaration.toScope(importScope), new Scope.top());
@@ -175,7 +173,7 @@
Uri resolve(Uri baseUri, String uri, int uriOffset, {isPart: false}) {
if (uri == null) {
- addCompileTimeError(messageExpectedUri, uriOffset, noLength, this.uri);
+ addProblem(messageExpectedUri, uriOffset, noLength, this.uri);
return new Uri(scheme: MALFORMED_URI_SCHEME);
}
Uri parsedUri;
@@ -185,11 +183,8 @@
// Point to position in string indicated by the exception,
// or to the initial quote if no position is given.
// (Assumes the directive is using a single-line string.)
- addCompileTimeError(
- templateCouldNotParseUri.withArguments(uri, e.message),
- uriOffset + 1 + (e.offset ?? -1),
- 1,
- this.uri);
+ addProblem(templateCouldNotParseUri.withArguments(uri, e.message),
+ uriOffset + 1 + (e.offset ?? -1), 1, this.uri);
return new Uri(
scheme: MALFORMED_URI_SCHEME, query: Uri.encodeQueryComponent(uri));
}
@@ -207,8 +202,8 @@
String prefix;
String suffix;
if (name is QualifiedName) {
- prefix = name.prefix;
- suffix = name.suffix;
+ prefix = name.qualifier;
+ suffix = name.name;
} else {
prefix = name;
suffix = null;
@@ -349,9 +344,7 @@
int startCharOffset,
int charOffset,
int charEndOffset,
- int supertypeOffset,
- int codeStartOffset,
- int codeEndOffset);
+ int supertypeOffset);
void addNamedMixinApplication(
String documentationComment,
@@ -361,9 +354,7 @@
int modifiers,
T mixinApplication,
List<T> interfaces,
- int charOffset,
- int codeStartOffset,
- int codeEndOffset);
+ int charOffset);
void addField(
String documentationComment,
@@ -372,47 +363,23 @@
T type,
String name,
int charOffset,
- int codeStartOffset,
- int codeEndOffset,
Token initializerTokenForInference,
bool hasInitializer);
- void addFields(
- String documentationComment,
- List<MetadataBuilder> metadata,
- int modifiers,
- T type,
- List<Object> fieldsInfo,
- int firstFieldCodeStartOffset) {
+ void addFields(String documentationComment, List<MetadataBuilder> metadata,
+ int modifiers, T type, List<Object> fieldsInfo) {
for (int i = 0; i < fieldsInfo.length; i += 4) {
String name = fieldsInfo[i];
int charOffset = fieldsInfo[i + 1];
bool hasInitializer = fieldsInfo[i + 2] != null;
Token initializerTokenForInference =
type == null ? fieldsInfo[i + 2] : null;
- Token beforeLast = fieldsInfo[i + 3];
if (initializerTokenForInference != null) {
+ Token beforeLast = fieldsInfo[i + 3];
beforeLast.setNext(new Token.eof(beforeLast.next.offset));
}
-
- int codeEndOffset;
- if (beforeLast != null) {
- codeEndOffset = beforeLast.next.offset;
- } else {
- codeEndOffset = charOffset + name.length;
- }
-
- addField(
- documentationComment,
- metadata,
- modifiers,
- type,
- name,
- charOffset,
- i == 0 ? firstFieldCodeStartOffset : charOffset,
- codeEndOffset,
- initializerTokenForInference,
- hasInitializer);
+ addField(documentationComment, metadata, modifiers, type, name,
+ charOffset, initializerTokenForInference, hasInitializer);
}
}
@@ -429,8 +396,6 @@
int charOffset,
int charOpenParenOffset,
int charEndOffset,
- int codeStartOffset,
- int codeEndOffset,
String nativeMethodName);
void addProcedure(
@@ -447,8 +412,6 @@
int charOpenParenOffset,
int charEndOffset,
String nativeMethodName,
- int codeStartOffset,
- int codeEndOffset,
{bool isTopLevel});
void addEnum(
@@ -484,19 +447,10 @@
int charOffset,
int charOpenParenOffset,
int charEndOffset,
- int codeStartOffset,
- int codeEndOffset,
String nativeMethodName);
- FormalParameterBuilder addFormalParameter(
- List<MetadataBuilder> metadata,
- int modifiers,
- T type,
- String name,
- bool hasThis,
- int charOffset,
- int codeStartOffset,
- int codeEndOffset);
+ FormalParameterBuilder addFormalParameter(List<MetadataBuilder> metadata,
+ int modifiers, T type, String name, bool hasThis, int charOffset);
TypeVariableBuilder addTypeVariable(String name, T bound, int charOffset);
@@ -520,10 +474,8 @@
}
bool isConstructor = declaration is ProcedureBuilder &&
(declaration.isConstructor || declaration.isFactory);
- if (!isConstructor &&
- !declaration.isSetter &&
- name == currentDeclaration.name) {
- addCompileTimeError(
+ if (!isConstructor && name == currentDeclaration.name) {
+ addProblem(
messageMemberWithSameNameAsClass, charOffset, noLength, fileUri);
}
Map<String, Declaration> members = isConstructor
@@ -545,11 +497,8 @@
other = declaration;
}
if (deferred != null) {
- addCompileTimeError(
- templateDeferredPrefixDuplicated.withArguments(name),
- deferred.charOffset,
- noLength,
- fileUri,
+ addProblem(templateDeferredPrefixDuplicated.withArguments(name),
+ deferred.charOffset, noLength, fileUri,
context: [
templateDeferredPrefixDuplicatedCause
.withArguments(name)
@@ -563,8 +512,8 @@
name, existing, member, charOffset);
});
} else if (isDuplicatedDefinition(existing, declaration)) {
- addCompileTimeError(templateDuplicatedDefinition.withArguments(name),
- charOffset, noLength, fileUri);
+ addProblem(templateDuplicatedDefinition.withArguments(name), charOffset,
+ noLength, fileUri);
}
return members[name] = declaration;
}
@@ -611,10 +560,10 @@
scope.setters.forEach((String name, Declaration setter) {
Declaration member = scopeBuilder[name];
if (member == null || !member.isField || member.isFinal) return;
- addCompileTimeError(templateConflictsWithMember.withArguments(name),
+ addProblem(templateConflictsWithMember.withArguments(name),
setter.charOffset, noLength, fileUri);
// TODO(ahe): Context to previous message?
- addCompileTimeError(templateConflictsWithSetter.withArguments(name),
+ addProblem(templateConflictsWithSetter.withArguments(name),
member.charOffset, noLength, fileUri);
});
@@ -647,7 +596,7 @@
Set<Uri> seenParts = new Set<Uri>();
for (SourceLibraryBuilder<T, R> part in parts) {
if (part == this) {
- addCompileTimeError(messagePartOfSelf, -1, noLength, fileUri);
+ addProblem(messagePartOfSelf, -1, noLength, fileUri);
} else if (seenParts.add(part.fileUri)) {
if (part.partOfLibrary != null) {
addProblem(messagePartOfTwoLibraries, -1, noLength, part.fileUri,
@@ -661,8 +610,8 @@
includePart(part);
}
} else {
- addCompileTimeError(templatePartTwice.withArguments(part.fileUri), -1,
- noLength, fileUri);
+ addProblem(templatePartTwice.withArguments(part.fileUri), -1, noLength,
+ fileUri);
}
}
}
@@ -703,8 +652,8 @@
// metadata annotations can be associated with it.
assert(!part.isPart);
if (uriIsValid(part.fileUri)) {
- addCompileTimeError(templateMissingPartOf.withArguments(part.fileUri),
- -1, noLength, fileUri);
+ addProblem(templateMissingPartOf.withArguments(part.fileUri), -1,
+ noLength, fileUri);
}
}
part.forEach((String name, Declaration declaration) {
@@ -733,6 +682,13 @@
if (import.imported == loader.coreLibrary) {
explicitCoreImport = true;
}
+ if (import.imported?.isPart ?? false) {
+ addProblem(
+ templatePartOfInLibrary.withArguments(import.imported.fileUri),
+ import.charOffset,
+ noLength,
+ fileUri);
+ }
import.finalizeImports(this);
}
if (!explicitCoreImport) {
@@ -868,7 +824,7 @@
for (UnresolvedType<T> type in types) {
Object nameOrQualified = type.builder.name;
String name = nameOrQualified is QualifiedName
- ? nameOrQualified.prefix
+ ? nameOrQualified.qualifier
: nameOrQualified;
TypeVariableBuilder builder;
if (name != null) {
@@ -880,8 +836,13 @@
parent.addType(type);
} else if (nameOrQualified is QualifiedName) {
// Attempt to use type variable as prefix.
- type.builder.bind(
- type.builder.buildInvalidType(type.charOffset, type.fileUri));
+ type.builder.bind(type.builder.buildInvalidType(
+ templateNotAPrefixInTypeAnnotation
+ .withArguments(
+ flattenName(nameOrQualified.qualifier, type.charOffset,
+ type.fileUri),
+ nameOrQualified.name)
+ .withLocation(type.fileUri, type.charOffset, noLength)));
} else {
type.builder.bind(builder);
}
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 cbe5078..9f48ebd 100644
--- a/pkg/front_end/lib/src/fasta/source/source_loader.dart
+++ b/pkg/front_end/lib/src/fasta/source/source_loader.dart
@@ -45,8 +45,6 @@
NamedTypeBuilder,
TypeBuilder;
-import '../combinator.dart';
-
import '../deprecated_problems.dart' show deprecated_inputError;
import '../export.dart' show Export;
@@ -104,8 +102,6 @@
import 'outline_builder.dart' show OutlineBuilder;
-import 'outline_listener.dart' show OutlineListener;
-
import 'source_class_builder.dart' show SourceClassBuilder;
import 'source_library_builder.dart' show SourceLibraryBuilder;
@@ -182,8 +178,8 @@
while (token is ErrorToken) {
if (!suppressLexicalErrors) {
ErrorToken error = token;
- library.addCompileTimeError(error.assertionMessage,
- offsetForToken(token), lengthForToken(token), uri);
+ library.addProblem(error.assertionMessage, offsetForToken(token),
+ lengthForToken(token), uri);
}
token = token.next;
}
@@ -213,13 +209,9 @@
// time we suppress lexical errors.
Token tokens = await tokenize(library, suppressLexicalErrors: true);
if (tokens == null) return;
-
DietListener listener = createDietListener(library);
DietParser parser = new DietParser(listener);
-
- listener.currentUnit = library;
parser.parseUnit(tokens);
-
for (SourceLibraryBuilder part in library.parts) {
if (part.partOfLibrary != library) {
// Part was included in multiple libraries. Skip it here.
@@ -227,7 +219,6 @@
}
Token tokens = await tokenize(part);
if (tokens != null) {
- listener.currentUnit = part;
listener.uri = part.fileUri;
listener.partDirectiveIndex = 0;
parser.parseUnit(tokens);
@@ -348,21 +339,6 @@
// and can lead to memory leaks.
exportee.exporters.clear();
}
- for (var library in builders.values) {
- if (library is SourceLibraryBuilder) {
- OutlineListener outlineListener = library.outlineListener;
- if (outlineListener != null) {
- for (var import in library.imports) {
- storeCombinatorIdentifiersResolution(
- outlineListener, import.imported, import.combinators);
- }
- for (var export in library.exports) {
- storeCombinatorIdentifiersResolution(
- outlineListener, export.exported, export.combinators);
- }
- }
- }
- }
ticker.logMs("Computed library scopes");
// debugPrintExports();
}
@@ -566,7 +542,7 @@
// [cyclicCandidates] is sensitive to if the platform (or other modules)
// are included in [classes].
for (LocatedMessage message in messages.keys.toList()..sort()) {
- messages[message].addCompileTimeError(
+ messages[message].addProblem(
message.messageObject, message.charOffset, message.length);
}
}
@@ -585,13 +561,11 @@
target.addDirectSupertype(cls, directSupertypes);
for (ClassBuilder supertype in directSupertypes) {
if (supertype is EnumBuilder) {
- cls.addCompileTimeError(
- templateExtendingEnum.withArguments(supertype.name),
- cls.charOffset,
- noLength);
+ cls.addProblem(templateExtendingEnum.withArguments(supertype.name),
+ cls.charOffset, noLength);
} else if (!cls.library.mayImplementRestrictedTypes &&
blackListedClasses.contains(supertype)) {
- cls.addCompileTimeError(
+ cls.addProblem(
templateExtendingRestricted.withArguments(supertype.name),
cls.charOffset,
noLength);
@@ -607,7 +581,7 @@
for (Declaration constructory
in builder.constructors.local.values) {
if (constructory.isConstructor && !constructory.isSynthetic) {
- cls.addCompileTimeError(
+ cls.addProblem(
templateIllegalMixinDueToConstructors
.withArguments(builder.fullNameForErrors),
cls.charOffset,
@@ -623,7 +597,7 @@
}
}
if (!isClassBuilder) {
- cls.addCompileTimeError(
+ cls.addProblem(
templateIllegalMixin.withArguments(mixedInType.fullNameForErrors),
cls.charOffset,
noLength);
@@ -715,13 +689,14 @@
void ignoreAmbiguousSupertypes(Class cls, Supertype a, Supertype b) {}
void computeCoreTypes(Component component) {
- DartType Function(Class) instantiateWithBottom =
- (Class cls) => new InterfaceType(cls, <DartType>[const BottomType()]);
-
coreTypes = new CoreTypes(component);
- futureOfBottom = instantiateWithBottom(coreTypes.futureClass);
- iterableOfBottom = instantiateWithBottom(coreTypes.iterableClass);
- streamOfBottom = instantiateWithBottom(coreTypes.streamClass);
+
+ futureOfBottom = new InterfaceType(
+ coreTypes.futureClass, <DartType>[const BottomType()]);
+ iterableOfBottom = new InterfaceType(
+ coreTypes.iterableClass, <DartType>[const BottomType()]);
+ streamOfBottom = new InterfaceType(
+ coreTypes.streamClass, <DartType>[const BottomType()]);
ticker.logMs("Computed core types");
}
@@ -900,8 +875,7 @@
return target.backendTarget.throwCompileConstantError(coreTypes, error);
}
- Expression buildCompileTimeError(
- Message message, int offset, int length, Uri uri) {
+ Expression buildProblem(Message message, int offset, int length, Uri uri) {
String text = target.context
.format(message.withLocation(uri, offset, length), Severity.error);
return target.backendTarget.buildCompileTimeError(coreTypes, text, offset);
@@ -972,19 +946,4 @@
hierarchy = null;
typeInferenceEngine = null;
}
-
- void storeCombinatorIdentifiersResolution(OutlineListener outlineListener,
- LibraryBuilder consumed, List<Combinator> combinators) {
- if (combinators != null) {
- for (var combinator in combinators) {
- for (var identifier in combinator.identifiers) {
- var declaration = consumed.exportScope.local[identifier.name];
- declaration ??= consumed.exportScope.setters[identifier.name];
- outlineListener.store(identifier.offset, identifier.isSynthetic,
- isNamespaceCombinatorReference: true,
- reference: declaration?.target);
- }
- }
- }
- }
}
diff --git a/pkg/front_end/lib/src/fasta/source/stack_listener.dart b/pkg/front_end/lib/src/fasta/source/stack_listener.dart
index 154b20a..cd41814 100644
--- a/pkg/front_end/lib/src/fasta/source/stack_listener.dart
+++ b/pkg/front_end/lib/src/fasta/source/stack_listener.dart
@@ -9,6 +9,7 @@
import '../fasta_codes.dart'
show
+ LocatedMessage,
Message,
messageNativeClauseShouldBeAnnotation,
templateInternalProblemStackNotEmpty;
@@ -52,7 +53,6 @@
IdentifierList,
Initializers,
Metadata,
- MetadataToken,
Modifiers,
ParameterDefaultValue,
Prefix,
@@ -76,7 +76,7 @@
// TODO(ahe): This doesn't belong here. Only implemented by body_builder.dart
// and ast_builder.dart.
- void finishFunction(List annotations, covariant formals,
+ void finishFunction(covariant List<Object> annotations, covariant formals,
AsyncMarker asyncModifier, covariant body) {
return unsupported("finishFunction", -1, uri);
}
@@ -344,17 +344,18 @@
return;
}
debugEvent("Error: ${message.message}");
- addCompileTimeError(message, offsetForToken(startToken),
+ addProblem(message, offsetForToken(startToken),
lengthOfSpan(startToken, endToken));
}
@override
void handleUnescapeError(
Message message, Token token, int stringOffset, int length) {
- addCompileTimeError(message, token.charOffset + stringOffset, length);
+ addProblem(message, token.charOffset + stringOffset, length);
}
- void addCompileTimeError(Message message, int charOffset, int length);
+ void addProblem(Message message, int charOffset, int length,
+ {bool wasHandled: false, List<LocatedMessage> context});
}
class Stack {
diff --git a/pkg/front_end/lib/src/fasta/type_inference/inference_helper.dart b/pkg/front_end/lib/src/fasta/type_inference/inference_helper.dart
index 38505c3..22aa02d 100644
--- a/pkg/front_end/lib/src/fasta/type_inference/inference_helper.dart
+++ b/pkg/front_end/lib/src/fasta/type_inference/inference_helper.dart
@@ -2,21 +2,22 @@
// 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:kernel/ast.dart' show Arguments, Expression, FunctionType;
+
import '../fasta_codes.dart' show LocatedMessage, Message;
-import '../kernel/kernel_ast_api.dart'
- show ArgumentsJudgment, Expression, FunctionType;
+import '../kernel/kernel_shadow_ast.dart' show SyntheticExpressionJudgment;
abstract class InferenceHelper {
- Expression wrapInCompileTimeError(Expression expression, Message message);
-
- Expression buildCompileTimeError(Message message, int charOffset, int length,
+ SyntheticExpressionJudgment buildProblem(
+ Message message, int charOffset, int length,
{List<LocatedMessage> context});
LocatedMessage checkArgumentsForType(
- FunctionType function, ArgumentsJudgment arguments, int offset);
+ FunctionType function, Arguments arguments, int offset);
- void addProblem(Message message, int charOffset, int length);
+ void addProblem(Message message, int charOffset, int length,
+ {List<LocatedMessage> context, bool wasHandled});
Expression wrapInProblem(Expression expression, Message message, int length,
{List<LocatedMessage> context});
diff --git a/pkg/front_end/lib/src/fasta/type_inference/interface_resolver.dart b/pkg/front_end/lib/src/fasta/type_inference/interface_resolver.dart
index 02395c0..362a67a 100644
--- a/pkg/front_end/lib/src/fasta/type_inference/interface_resolver.dart
+++ b/pkg/front_end/lib/src/fasta/type_inference/interface_resolver.dart
@@ -129,7 +129,7 @@
var kind = declaredMethod.kind;
var overriddenTypes = _computeAccessorOverriddenTypes();
if (isCircular) {
- _library.addCompileTimeError(
+ _library.addProblem(
templateCantInferTypeDueToCircularity.withArguments(_name),
_offset,
noLength,
@@ -704,7 +704,7 @@
first = type;
} else if (first != type) {
// Types don't match. Report an error.
- library.addCompileTimeError(
+ library.addProblem(
templateCantInferTypeDueToInconsistentOverrides.withArguments(name),
charOffset,
noLength,
diff --git a/pkg/front_end/lib/src/fasta/type_inference/type_inference_engine.dart b/pkg/front_end/lib/src/fasta/type_inference/type_inference_engine.dart
index 6e3610c..48d0b20 100644
--- a/pkg/front_end/lib/src/fasta/type_inference/type_inference_engine.dart
+++ b/pkg/front_end/lib/src/fasta/type_inference/type_inference_engine.dart
@@ -59,7 +59,7 @@
.inferDeclarationType(typeInferrer.inferFieldTopLevel(field, true));
if (isCircular) {
// Report the appropriate error.
- _library.addCompileTimeError(
+ _library.addProblem(
templateCantInferTypeDueToCircularity
.withArguments(field.name.name),
field.fileOffset,
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 b3c28bb..68a2f7a 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
@@ -545,13 +545,8 @@
void thenStatement,
void elseStatement);
- void indexAssign(
- ExpressionJudgment judgment,
- Location location,
- DartType receiverType,
- Reference writeMember,
- Reference combiner,
- DartType inferredType);
+ void indexAssign(ExpressionJudgment judgment, Location location,
+ Reference writeMember, Reference combiner, DartType inferredType);
void intLiteral(ExpressionJudgment judgment, Location location,
IntLiteralTokens tokens, num value, DartType inferredType);
@@ -614,7 +609,6 @@
void methodInvocation(
ExpressionJudgment judgment,
Location resultOffset,
- DartType receiverType,
List<DartType> argumentsTypes,
bool isImplicitCall,
Reference interfaceMember,
@@ -643,20 +637,13 @@
void propertyAssign(
ExpressionJudgment judgment,
Location location,
- bool isSyntheticLhs,
- DartType receiverType,
Reference writeMember,
DartType writeContext,
Reference combiner,
DartType inferredType);
- void propertyGet(
- ExpressionJudgment judgment,
- Location location,
- bool forSyntheticToken,
- DartType receiverType,
- Reference member,
- DartType inferredType);
+ void propertyGet(ExpressionJudgment judgment, Location location,
+ bool forSyntheticToken, Reference member, DartType inferredType);
void propertyGetCall(
ExpressionJudgment judgment, Location location, DartType inferredType);
@@ -760,7 +747,6 @@
void variableAssign(
ExpressionJudgment judgment,
Location location,
- bool isSyntheticLhs,
DartType writeContext,
covariant Object writeVariableBinder,
Reference combiner,
@@ -964,8 +950,8 @@
void elseStatement) {}
@override
- void indexAssign(ExpressionJudgment judgment, location, receiverType,
- writeMember, combiner, DartType inferredType) {}
+ void indexAssign(ExpressionJudgment judgment, location, writeMember, combiner,
+ DartType inferredType) {}
@override
void intLiteral(ExpressionJudgment judgment, location,
@@ -1030,7 +1016,6 @@
void methodInvocation(
ExpressionJudgment judgment,
resultOffset,
- DartType receiverType,
List<DartType> argumentsTypes,
bool isImplicitCall,
interfaceMember,
@@ -1061,19 +1046,12 @@
NullLiteralTokens tokens, bool isSynthetic, DartType inferredType) {}
@override
- void propertyAssign(
- ExpressionJudgment judgment,
- location,
- bool isSyntheticLhs,
- receiverType,
- writeMember,
- DartType writeContext,
- combiner,
- DartType inferredType) {}
+ void propertyAssign(ExpressionJudgment judgment, location, writeMember,
+ DartType writeContext, combiner, DartType inferredType) {}
@override
void propertyGet(ExpressionJudgment judgment, location,
- bool forSyntheticToken, receiverType, member, DartType inferredType) {}
+ bool forSyntheticToken, member, DartType inferredType) {}
@override
void propertyGetCall(
@@ -1192,7 +1170,6 @@
void variableAssign(
ExpressionJudgment judgment,
location,
- bool isSyntheticLhs,
DartType writeContext,
covariant void writeVariableBinder,
combiner,
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 b8113fe..1d24bbd 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
@@ -36,6 +36,7 @@
ProcedureKind,
PropertyGet,
PropertySet,
+ ReturnStatement,
StaticGet,
SuperMethodInvocation,
SuperPropertyGet,
@@ -74,6 +75,7 @@
Message,
Template,
messageReturnFromVoidFunction,
+ messageReturnWithoutExpression,
messageVoidExpression,
noLength,
templateArgumentTypeNotAssignable,
@@ -87,6 +89,7 @@
templateInvalidCastNewExpr,
templateInvalidCastStaticMethod,
templateInvalidCastTopLevelFunction,
+ templateInvokeNonFunction,
templateMixinInferenceNoMatchingClass,
templateUndefinedGetter,
templateUndefinedMethod,
@@ -102,7 +105,6 @@
ShadowClass,
ShadowField,
ShadowMember,
- SyntheticExpressionJudgment,
VariableDeclarationJudgment,
getExplicitTypeArguments;
@@ -202,10 +204,24 @@
/// wrapping this type in `Stream` or `Iterator`, as appropriate.
DartType _inferredUnwrappedReturnOrYieldType;
+ /// Whether the function is an arrow function.
+ bool isArrow;
+
+ /// A list of return statements in functions whose return type is being
+ /// inferred.
+ ///
+ /// The returns are checked for validity after the return type is inferred.
+ List<ReturnStatement> returnStatements;
+
+ /// A list of return expression types in functions whose return type is
+ /// being inferred.
+ List<DartType> returnExpressionTypes;
+
factory ClosureContext(TypeInferrerImpl inferrer, AsyncMarker asyncMarker,
DartType returnContext, bool needToInferReturnType) {
assert(returnContext != null);
- DartType declaredReturnType = returnContext;
+ DartType declaredReturnType =
+ greatestClosure(inferrer.coreTypes, returnContext);
bool isAsync = asyncMarker == AsyncMarker.Async ||
asyncMarker == AsyncMarker.AsyncStar;
bool isGenerator = asyncMarker == AsyncMarker.SyncStar ||
@@ -227,23 +243,86 @@
}
ClosureContext._(this.isAsync, this.isGenerator, this.returnOrYieldContext,
- this.declaredReturnType, this._needToInferReturnType) {}
+ this.declaredReturnType, this._needToInferReturnType) {
+ if (_needToInferReturnType) {
+ returnStatements = [];
+ returnExpressionTypes = [];
+ }
+ }
+
+ bool checkValidReturn(TypeInferrerImpl inferrer, DartType returnType,
+ ReturnStatement statement, DartType expressionType) {
+ if (statement.expression == null) {
+ if (isAsync) {
+ returnType = inferrer.typeSchemaEnvironment.unfutureType(returnType);
+ }
+ if (returnType is! VoidType &&
+ returnType is! DynamicType &&
+ returnType != inferrer.coreTypes.nullClass.rawType) {
+ statement.expression = inferrer.helper.wrapInProblem(
+ new NullLiteral()..fileOffset = statement.fileOffset,
+ messageReturnWithoutExpression,
+ noLength)
+ ..parent = statement;
+ return false;
+ }
+ } else {
+ if (isAsync) {
+ returnType = inferrer.typeSchemaEnvironment.unfutureType(returnType);
+ expressionType =
+ inferrer.typeSchemaEnvironment.unfutureType(expressionType);
+ }
+ if (!isArrow && returnType is VoidType) {
+ if (expressionType is! VoidType &&
+ expressionType is! DynamicType &&
+ expressionType != inferrer.coreTypes.nullClass.rawType) {
+ statement.expression = inferrer.helper.wrapInProblem(
+ statement.expression, messageReturnFromVoidFunction, noLength)
+ ..parent = statement;
+ return false;
+ }
+ } else if (expressionType is VoidType) {
+ if (returnType is! VoidType &&
+ returnType is! DynamicType &&
+ returnType != inferrer.coreTypes.nullClass.rawType) {
+ statement.expression = inferrer.helper.wrapInProblem(
+ statement.expression, messageVoidExpression, noLength)
+ ..parent = statement;
+ return false;
+ }
+ }
+ }
+ return true;
+ }
/// Updates the inferred return type based on the presence of a return
/// statement returning the given [type].
- void handleReturn(TypeInferrerImpl inferrer, DartType type,
- Expression expression, int fileOffset, bool isArrow) {
+ void handleReturn(TypeInferrerImpl inferrer, ReturnStatement statement,
+ DartType type, bool isArrow) {
if (isGenerator) return;
- if (inferrer.ensureAssignable(
- returnOrYieldContext, type, expression, fileOffset,
- isReturnFromAsync: isAsync,
- isReturn: true,
- declaredReturnType: declaredReturnType,
- isArrow: isArrow) !=
- null) {
- type = greatestClosure(inferrer.coreTypes, returnOrYieldContext);
+ // The first return we see tells us if we have an arrow function.
+ if (this.isArrow == null) {
+ this.isArrow = isArrow;
+ } else {
+ assert(this.isArrow == isArrow);
}
+
if (_needToInferReturnType) {
+ // Add the return to a list to be checked for validity after we've
+ // inferred the return type.
+ returnStatements.add(statement);
+ returnExpressionTypes.add(type);
+
+ // The return expression has to be assignable to the return type
+ // expectation from the downwards inference context.
+ if (statement.expression != null &&
+ inferrer.ensureAssignable(returnOrYieldContext, type,
+ statement.expression, statement.fileOffset,
+ isReturnFromAsync: isAsync, isVoidAllowed: true) !=
+ null) {
+ // Not assignable, use the expectation.
+ type = greatestClosure(inferrer.coreTypes, returnOrYieldContext);
+ }
var unwrappedType = type;
if (isAsync) {
unwrappedType = inferrer.typeSchemaEnvironment.unfutureType(type);
@@ -255,6 +334,16 @@
.getStandardUpperBound(
_inferredUnwrappedReturnOrYieldType, unwrappedType);
}
+ return;
+ }
+
+ // If we are not inferring a type we can immediately check that the return
+ // is valid.
+ if (checkValidReturn(inferrer, declaredReturnType, statement, type) &&
+ statement.expression != null) {
+ inferrer.ensureAssignable(returnOrYieldContext, type,
+ statement.expression, statement.fileOffset,
+ isReturnFromAsync: isAsync, isVoidAllowed: true);
}
}
@@ -293,13 +382,20 @@
assert(_needToInferReturnType);
DartType inferredType =
inferrer.inferReturnType(_inferredUnwrappedReturnOrYieldType);
- if (!_analyzerSubtypeOf(inferrer, inferredType, returnOrYieldContext)) {
+ if (!inferrer.typeSchemaEnvironment
+ .isSubtypeOf(inferredType, returnOrYieldContext)) {
// If the inferred return type isn't a subtype of the context, we use the
// context.
inferredType = greatestClosure(inferrer.coreTypes, returnOrYieldContext);
}
- return _wrapAsyncOrGenerator(inferrer, inferredType);
+ inferredType = _wrapAsyncOrGenerator(inferrer, inferredType);
+ for (int i = 0; i < returnStatements.length; ++i) {
+ checkValidReturn(inferrer, inferredType, returnStatements[i],
+ returnExpressionTypes[i]);
+ }
+
+ return inferredType;
}
DartType _wrapAsyncOrGenerator(TypeInferrerImpl inferrer, DartType type) {
@@ -315,19 +411,6 @@
return type;
}
}
-
- static bool _analyzerSubtypeOf(
- TypeInferrerImpl inferrer, DartType subtype, DartType supertype) {
- if (supertype is VoidType) {
- if (subtype is VoidType) return true;
- if (subtype is InterfaceType &&
- identical(subtype.classNode, inferrer.coreTypes.nullClass)) {
- return true;
- }
- return false;
- }
- return inferrer.typeSchemaEnvironment.isSubtypeOf(subtype, supertype);
- }
}
/// Enum denoting the kinds of contravariance check that might need to be
@@ -584,22 +667,9 @@
Expression ensureAssignable(DartType expectedType, DartType actualType,
Expression expression, int fileOffset,
{bool isReturnFromAsync: false,
- bool isReturn: false,
- bool isVoidAllowed,
- bool isArrow: false,
- DartType declaredReturnType,
+ bool isVoidAllowed: false,
Template<Message Function(DartType, DartType)> template}) {
- isVoidAllowed ??= isArrow;
assert(expectedType != null);
- if (isReturn &&
- !isArrow &&
- !isValidReturn(declaredReturnType, actualType, isReturnFromAsync)) {
- TreeNode parent = expression.parent;
- Expression errorNode = helper.wrapInProblem(
- expression, messageReturnFromVoidFunction, noLength);
- parent?.replaceChild(expression, errorNode);
- return errorNode;
- }
expectedType = greatestClosure(coreTypes, expectedType);
DartType initialExpectedType = expectedType;
@@ -616,28 +686,6 @@
expectedType = futuredExpectedType;
}
}
- if (isReturn && !isArrow) {
- if (expectedType is VoidType) {
- isVoidAllowed = true;
- if (actualType is! VoidType &&
- actualType is! DynamicType &&
- !isNull(actualType)) {
- // Error: not assignable. Perform error recovery.
- TreeNode parent = expression.parent;
- Expression errorNode = helper.wrapInProblem(
- expression, messageReturnFromVoidFunction, noLength);
- parent?.replaceChild(expression, errorNode);
- return errorNode;
- }
- } else {
- DartType flattened = typeSchemaEnvironment.unfutureType(expectedType);
- if (flattened is VoidType) {
- isVoidAllowed = true;
- } else {
- isVoidAllowed = expectedType is DynamicType;
- }
- }
- }
// We don't need to insert assignability checks when doing top level type
// inference since top level type inference only cares about the type that
@@ -692,10 +740,11 @@
if (!typeSchemaEnvironment.isSubtypeOf(expectedType, actualType)) {
// Error: not assignable. Perform error recovery.
var parent = expression.parent;
- var errorNode = helper.wrapInCompileTimeError(
+ var errorNode = helper.wrapInProblem(
expression,
(template ?? templateInvalidAssignment)
- .withArguments(actualType, expectedType));
+ .withArguments(actualType, expectedType),
+ noLength);
parent?.replaceChild(expression, errorNode);
return errorNode;
} else {
@@ -704,8 +753,8 @@
// The type of the expression is known precisely, so an implicit
// downcast is guaranteed to fail. Insert a compile-time error.
var parent = expression.parent;
- var errorNode = helper.wrapInCompileTimeError(
- expression, template.withArguments(actualType, expectedType));
+ var errorNode = helper.wrapInProblem(expression,
+ template.withArguments(actualType, expectedType), noLength);
parent?.replaceChild(expression, errorNode);
return errorNode;
} else {
@@ -720,63 +769,6 @@
}
}
- bool isValidReturn(
- DartType returnType, DartType expressionType, bool isAsync) {
- final DartType t = returnType;
- final DartType s = expressionType;
- if (!isAsync) {
- if (t is DynamicType) {
- // * `return exp;` where `exp` has static type `S` is a valid return if:
- // * `T` is `dynamic`
- return true;
- }
-
- if (t is VoidType) {
- // * `return exp;` where `exp` has static type `S` is a valid return if:
- // * `T` is `void`
- // * and `S` is `void` or `dynamic` or `Null`
- return s is VoidType || s is DynamicType || isNull(s);
- } else {
- // * `return exp;` where `exp` has static type `S` is a valid return if:
- // * `T` is not `void`
- // * and `S` is not `void`
- // * and `S` is assignable to `T`
- return s is! VoidType;
- }
- }
- final DartType flattenT = typeSchemaEnvironment.unfutureType(t);
-
- // * `return exp;` where `exp` has static type `S` is a valid return if:
- // * `flatten(T)` is `dynamic` or `Null`
- if (flattenT is DynamicType || isNull(flattenT)) return true;
-
- // * `return exp;` where `exp` has static type `S` is a valid return if:
- // * `T` is `void`
- // * and `S` is `void`, `dynamic` or `Null`
- if (t is VoidType) {
- if (s is VoidType || s is DynamicType || isNull(s)) return true;
- } else {
- final DartType flattenS = typeSchemaEnvironment.unfutureType(s);
- // * `return exp;` where `exp` has static type `S` is a valid return if:
- // * `T` is not `void`
- // * `flatten(T)` is `void`
- // * and `flatten(S)` is `void`, `dynamic` or `Null`
- if (flattenT is VoidType) {
- if (flattenS is VoidType ||
- flattenS is DynamicType ||
- isNull(flattenS)) {
- return true;
- }
- }
-
- // * `return exp;` where `exp` has static type `S` is a valid return if:
- // * `T` is not `void`
- // * and `flatten(S)` is not `void`
- if (flattenS is! VoidType) return true;
- }
- return false;
- }
-
bool isNull(DartType type) {
return type is InterfaceType && type.classNode == coreTypes.nullClass;
}
@@ -833,10 +825,10 @@
new Let(
new VariableDeclaration.forValue(receiver)
..fileOffset = receiver.fileOffset,
- new SyntheticExpressionJudgment(helper.buildCompileTimeError(
+ helper.buildProblem(
errorTemplate.withArguments(name.name, receiverType),
fileOffset,
- noLength)))
+ noLength))
..fileOffset = fileOffset);
}
return interfaceMember;
@@ -969,14 +961,12 @@
}
}
- FunctionType getCalleeFunctionType(
- Object interfaceMember, DartType receiverType, bool followCall) {
- var type = getCalleeType(interfaceMember, receiverType);
- if (type is FunctionType) {
- return type;
- } else if (followCall && type is InterfaceType) {
- var member = _getInterfaceMember(type.classNode, callName, false);
- var callType = getCalleeType(member, type);
+ FunctionType getCalleeFunctionType(DartType calleeType, bool followCall) {
+ if (calleeType is FunctionType) {
+ return calleeType;
+ } else if (followCall && calleeType is InterfaceType) {
+ var member = _getInterfaceMember(calleeType.classNode, callName, false);
+ var callType = getCalleeType(member, calleeType);
if (callType is FunctionType) {
return callType;
}
@@ -1216,10 +1206,12 @@
assert(closureContext == null);
this.helper = helper;
var actualType = inferExpression(
- initializer, declaredType ?? const UnknownType(), declaredType != null);
+ initializer, declaredType ?? const UnknownType(), declaredType != null,
+ isVoidAllowed: true);
if (declaredType != null) {
ensureAssignable(
- declaredType, actualType, initializer, initializer.fileOffset);
+ declaredType, actualType, initializer, initializer.fileOffset,
+ isVoidAllowed: declaredType is VoidType);
}
this.helper = null;
}
@@ -1342,10 +1334,10 @@
if (named.length == 2) {
if (named[0].name == named[1].name) {
var name = named[1].name;
- var error = helper.buildCompileTimeError(
- templateDuplicatedNamedArgument.withArguments(name),
- named[1].fileOffset,
- name.length);
+ var error = helper
+ .buildProblem(templateDuplicatedNamedArgument.withArguments(name),
+ named[1].fileOffset, name.length)
+ .desugared;
arguments.named = [new kernel.NamedExpression(named[1].name, error)];
formalTypes.removeLast();
actualTypes.removeLast();
@@ -1360,10 +1352,10 @@
if (seenNames.containsKey(name)) {
hasProblem = true;
var prevNamedExpression = seenNames[name];
- prevNamedExpression.value = helper.buildCompileTimeError(
- templateDuplicatedNamedArgument.withArguments(name),
- expression.fileOffset,
- name.length)
+ prevNamedExpression.value = helper
+ .buildProblem(templateDuplicatedNamedArgument.withArguments(name),
+ expression.fileOffset, name.length)
+ .desugared
..parent = prevNamedExpression;
formalTypes.removeAt(namedTypeIndex);
actualTypes.removeAt(namedTypeIndex);
@@ -1634,12 +1626,22 @@
isOverloadedArithmeticOperator = typeSchemaEnvironment
.isOverloadedArithmeticOperatorAndType(interfaceMember, receiverType);
}
- var calleeType =
- getCalleeFunctionType(interfaceMember, receiverType, !isImplicitCall);
+ var calleeType = getCalleeType(interfaceMember, receiverType);
+ var functionType = getCalleeFunctionType(calleeType, !isImplicitCall);
+ if (interfaceMember != null &&
+ calleeType is! DynamicType &&
+ calleeType != coreTypes.functionClass.rawType &&
+ identical(functionType, unknownFunction)) {
+ var parent = expression.parent;
+ kernel.Expression error = helper.wrapInProblem(expression,
+ templateInvokeNonFunction.withArguments(methodName.name), noLength);
+ parent?.replaceChild(expression, error);
+ return new ExpressionInferenceResult(null, const DynamicType());
+ }
var checkKind = preCheckInvocationContravariance(receiver, receiverType,
interfaceMember, desugaredInvocation, arguments, expression);
- var inferenceResult = inferInvocation(
- typeContext, fileOffset, calleeType, calleeType.returnType, arguments,
+ var inferenceResult = inferInvocation(typeContext, fileOffset, functionType,
+ functionType.returnType, arguments,
isOverloadedArithmeticOperator: isOverloadedArithmeticOperator,
receiverType: receiverType);
var inferredType = inferenceResult.type;
@@ -1647,7 +1649,7 @@
inferredType = coreTypes.boolClass.rawType;
}
handleInvocationContravariance(checkKind, desugaredInvocation, arguments,
- expression, inferredType, calleeType, fileOffset);
+ expression, inferredType, functionType, fileOffset);
int resultOffset = arguments.fileOffset != -1
? arguments.fileOffset
: expression.fileOffset;
@@ -1669,14 +1671,15 @@
receiverType is! DynamicType &&
receiverType != typeSchemaEnvironment.rawFunctionType) {
var parent = expression.parent;
- var errorNode = helper.wrapInCompileTimeError(expression,
- templateImplicitCallOfNonMethod.withArguments(receiverType));
+ var errorNode = helper.wrapInProblem(
+ expression,
+ templateImplicitCallOfNonMethod.withArguments(receiverType),
+ noLength);
parent?.replaceChild(expression, errorNode);
}
listener.methodInvocation(
expression,
resultOffset,
- receiverType,
arguments.types,
isImplicitCall,
getRealTarget(interfaceMember),
@@ -1751,7 +1754,7 @@
listener.propertyGetCall(expression, expression.fileOffset, inferredType);
} else {
listener.propertyGet(expression, expression.fileOffset, forSyntheticToken,
- receiverType, interfaceMember, inferredType);
+ interfaceMember, inferredType);
}
expression.inferredType = inferredType;
}
@@ -1956,14 +1959,13 @@
return new InterfaceType(class_, <DartType>[type ?? const DynamicType()]);
}
- void _forEachArgument(ArgumentsJudgment arguments,
- void callback(String name, Expression expression)) {
+ void _forEachArgument(
+ Arguments arguments, void callback(String name, Expression expression)) {
for (var expression in arguments.positional) {
callback(null, expression);
}
- for (var namedExpression in arguments.namedJudgments) {
- callback(namedExpression.name,
- namedExpression.originalValue ?? namedExpression.value);
+ for (var namedExpression in arguments.named) {
+ callback(namedExpression.name, namedExpression.value);
}
}
diff --git a/pkg/front_end/lib/src/scanner/token.dart b/pkg/front_end/lib/src/scanner/token.dart
index 7015f5c..4d07967 100644
--- a/pkg/front_end/lib/src/scanner/token.dart
+++ b/pkg/front_end/lib/src/scanner/token.dart
@@ -1418,20 +1418,6 @@
static const TokenType PERIOD_PERIOD_PERIOD = const TokenType(
'...', 'PERIOD_PERIOD_PERIOD', NO_PRECEDENCE, PERIOD_PERIOD_PERIOD_TOKEN);
- static const TokenType GENERIC_METHOD_TYPE_LIST = const TokenType(
- 'generic_comment_list',
- 'GENERIC_METHOD_TYPE_LIST',
- NO_PRECEDENCE,
- GENERIC_METHOD_TYPE_LIST_TOKEN,
- stringValue: null);
-
- static const TokenType GENERIC_METHOD_TYPE_ASSIGN = const TokenType(
- 'generic_comment_assign',
- 'GENERIC_METHOD_TYPE_ASSIGN',
- NO_PRECEDENCE,
- GENERIC_METHOD_TYPE_ASSIGN_TOKEN,
- stringValue: null);
-
static const TokenType AS = Keyword.AS;
static const TokenType IS = Keyword.IS;
@@ -1523,8 +1509,6 @@
TokenType.BACKPING,
TokenType.BACKSLASH,
TokenType.PERIOD_PERIOD_PERIOD,
- TokenType.GENERIC_METHOD_TYPE_LIST,
- TokenType.GENERIC_METHOD_TYPE_ASSIGN,
// TODO(danrubel): Should these be added to the "all" list?
//TokenType.IS,
diff --git a/pkg/front_end/messages.status b/pkg/front_end/messages.status
index 0c4ff07..602e60c 100644
--- a/pkg/front_end/messages.status
+++ b/pkg/front_end/messages.status
@@ -33,7 +33,6 @@
CantInferPackagesFromManyInputs/example: Fail
CantInferPackagesFromPackageUri/analyzerCode: Fail
CantInferPackagesFromPackageUri/example: Fail
-CantInferTypeDueToCircularity/dart2jsCode: Fail
CantInferTypeDueToCircularity/example: Fail
CantInferTypeDueToInconsistentOverrides/example: Fail
CantUseSuperBoundedTypeForInstanceCreation/analyzerCode: Fail
@@ -49,6 +48,8 @@
ConflictsWithTypeVariable/example: Fail
ConstAfterFactory/script1: Fail
ConstAndCovariant/script2: Fail
+ConstAndFinal/declaration3: Fail
+ConstAndFinal/declaration4: Fail
ConstAndVar/script1: Fail
ConstConstructorInSubclassOfMixinApplication/example: Fail
ConstConstructorNonFinalField/example: Fail
@@ -56,27 +57,19 @@
ConstConstructorWithNonConstSuper/example: Fail
ConstEvalContext/analyzerCode: Fail # This is just used for displaying the context.
ConstEvalContext/example: Fail # This is just used for displaying the context.
-ConstEvalDuplicateKey/dart2jsCode: Fail
ConstEvalDuplicateKey/example: Fail
-ConstEvalFailedAssertion/dart2jsCode: Fail
ConstEvalFailedAssertion/example: Fail
-ConstEvalFailedAssertionWithMessage/dart2jsCode: Fail
ConstEvalFailedAssertionWithMessage/example: Fail
ConstEvalInvalidBinaryOperandType/analyzerCode: Fail # CONST_EVAL_TYPE_NUM / CONST_EVAL_TYPE_BOOL
ConstEvalInvalidBinaryOperandType/example: Fail
-ConstEvalInvalidMethodInvocation/dart2jsCode: Fail
ConstEvalInvalidMethodInvocation/example: Fail
-ConstEvalInvalidStaticInvocation/dart2jsCode: Fail
ConstEvalInvalidStaticInvocation/example: Fail
-ConstEvalInvalidStringInterpolationOperand/dart2jsCode: Fail
ConstEvalInvalidStringInterpolationOperand/example: Fail
ConstEvalInvalidType/analyzerCode: Fail # CONST_CONSTRUCTOR_FIELD_TYPE_MISMATCH / CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH / CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH / ...
ConstEvalInvalidType/example: Fail
ConstEvalNegativeShift/analyzerCode: Fail # http://dartbug.com/33481
ConstEvalNegativeShift/example: Fail
-ConstEvalNonConstantLiteral/dart2jsCode: Fail
ConstEvalNonConstantLiteral/example: Fail
-ConstEvalNonConstantVariableGet/dart2jsCode: Fail
ConstEvalNonConstantVariableGet/example: Fail
ConstEvalZeroDivisor/example: Fail
ConstFieldWithoutInitializer/example: Fail
@@ -185,7 +178,6 @@
FunctionTypeDefaultValue/example: Fail
FunctionTypedParameterVar/script1: Fail
GeneratorReturnsValue/example: Fail
-GetterNotFound/dart2jsCode: Fail
GetterNotFound/example: Fail
GetterWithFormals/example: Fail
IllegalAssignmentToNonAssignable/script1: Fail
@@ -194,6 +186,7 @@
IllegalMixinDueToConstructors/example: Fail
IllegalSyncGeneratorVoidReturnType/analyzerCode: Fail # The analyzer doesn't report this error.
ImplementsBeforeExtends/script: Fail
+ImplementsBeforeOn/script: Fail
ImplementsBeforeWith/script: Fail
ImplementsFutureOr/analyzerCode: Fail # The analyzer doesn't report this error.
ImplicitCallOfNonMethod/example: Fail
@@ -231,7 +224,6 @@
MemberWithSameNameAsClass/analyzerCode: Fail
MemberWithSameNameAsClass/example: Fail
MetadataTypeArguments/example: Fail
-MethodNotFound/dart2jsCode: Fail
MethodNotFound/example: Fail
MissingArgumentList/analyzerCode: Fail
MissingArgumentList/example: Fail
@@ -241,12 +233,12 @@
MissingInput/example: Fail
MissingMain/analyzerCode: Fail
MissingMain/example: Fail
-MissingPartOf/dart2jsCode: Fail
MissingPrefixInDeferredImport/example: Fail
MixinInferenceNoMatchingClass/example: Fail
MultipleExtends/script: Fail
MultipleImplements/script: Fail
MultipleLibraryDirectives/example: Fail
+MultipleOnClauses/script: Fail
MultipleWith/script: Fail
NamedFunctionExpression/example: Fail
NativeClauseShouldBeAnnotation/example: Fail
@@ -260,7 +252,6 @@
NonInstanceTypeVariableUse/example: Fail
NonPartOfDirectiveInPart/script1: Fail
NotAConstantExpression/example: Fail
-NotAPrefixInTypeAnnotation/example: Fail
NotAType/example: Fail
NotAnLvalue/example: Fail
NotConstantExpression/example: Fail
@@ -280,14 +271,9 @@
OverrideTypeVariablesMismatch/example: Fail
PackageNotFound/analyzerCode: Fail
PackageNotFound/example: Fail
-PartOfLibraryNameMismatch/dart2jsCode: Fail
PartOfLibraryNameMismatch/example: Fail
-PartOfSelf/dart2jsCode: Fail
-PartOfUriMismatch/dart2jsCode: Fail
PartOfUriMismatch/example: Fail
-PartOfUseUri/dart2jsCode: Fail
PartOfUseUri/example: Fail
-PartTwice/dart2jsCode: Fail
PatchClassTypeVariablesMismatch/analyzerCode: Fail
PatchClassTypeVariablesMismatch/example: Fail
PatchDeclarationMismatch/analyzerCode: Fail
@@ -314,7 +300,6 @@
SdkSpecificationNotFound/example: Fail
SdkSummaryNotFound/analyzerCode: Fail
SdkSummaryNotFound/example: Fail
-SetterNotFound/dart2jsCode: Fail
SetterNotFound/example: Fail
SetterNotSync/example: Fail
SetterWithWrongNumberOfFormals/example: Fail
@@ -328,10 +313,8 @@
SuperAsIdentifier/example: Fail
SuperNullAware/example: Fail
SuperclassHasNoDefaultConstructor/example: Fail
-SuperclassHasNoGetter/dart2jsCode: Fail
SuperclassHasNoGetter/example: Fail
SuperclassHasNoMethod/example: Fail
-SuperclassHasNoSetter/dart2jsCode: Fail
SuperclassHasNoSetter/example: Fail
SuperclassMethodArgumentMismatch/analyzerCode: Fail
SuperclassMethodArgumentMismatch/example: Fail
@@ -345,7 +328,6 @@
ThisOrSuperAccessInFieldInitializer/example: Fail
TooFewArguments/example: Fail
TooManyArguments/example: Fail
-TooManyArgumentsCouldBeNamed/example: Fail
TopLevelOperator/script1: Fail
TopLevelOperator/script2: Fail
TopLevelOperator/script3: Fail
@@ -354,7 +336,9 @@
TypeArgumentsOnTypeVariable/script1: Fail
TypeNotFound/example: Fail
TypeVariableDuplicatedName/example: Fail
-TypeVariableInConstExpression/example: Fail
+TypeVariableInConstantContext/declaration1: Fail
+TypeVariableInConstantContext/declaration2: Fail
+TypeVariableInConstantContext/declaration3: Fail
TypeVariableInStaticContext/example: Fail
TypeVariableSameNameAsEnclosing/example: Fail
TypedefNotFunction/example: Fail
@@ -365,7 +349,6 @@
UnexpectedToken/script1: Fail
UnmatchedToken/script1: Fail
UnmatchedToken/script3: Fail
-UnresolvedPrefixInTypeAnnotation/example: Fail
Unspecified/analyzerCode: Fail
Unspecified/example: Fail
UnsupportedPrefixPlus/script: Fail
diff --git a/pkg/front_end/messages.yaml b/pkg/front_end/messages.yaml
index b428d444..76aea60 100644
--- a/pkg/front_end/messages.yaml
+++ b/pkg/front_end/messages.yaml
@@ -26,27 +26,15 @@
# "InternalProblem". This way, UX review can prioritize it accordingly.
#
# Eventually, we'd like to have all diagnostics in one shared
-# location. However, for now, dart2js and the analyzer needs to translate error
-# codes to their own format. To support this, an entry can contain an analyzer
-# error code (analyzerCode) and a dart2js error code (dart2jsCode).
-#
-# For dart2js, there's a few special error codes:
-#
-# - `*ignored*` this error is ignored by dart2js (normally a recoverable parser
-# error that dart2js reports in later phase for historical reasons).
-#
-# - `*fatal*` this is an error that is considered fatal by dart2js (normally a
-# recoverable parser error that dart2js can't reliably recover from).
-#
-# dart2js only needs to translate error generated by the parser or scanner, so
-# only lexical and syntactical errors have a code for dart2js. Long term, we
-# assume that dart2js will rely solely on the front-end to report errors.
+# location. However, for now, the analyzer needs to translate error codes to
+# its own format. To support this, an entry can contain an analyzer error code
+# (analyzerCode).
#
# Long term, the analyzer and front-end need to share the same error codes. So
# eventually all error codes should have an `analyzerCode` field.
#
-# In some cases a mesage is internal to the frontend, and no meaningful dart2js
-# nor analyzer code can be provided. In such cases set `frontendInternal: true`.
+# In some cases a mesage is internal to the frontend, and no meaningful
+# analyzer code can be provided. In such cases set `frontendInternal: true`.
#
# ## Parameter Substitution in Template and Tip
#
@@ -81,7 +69,6 @@
AsciiControlCharacter:
template: "The control character #unicode can only be used in strings and comments."
- dart2jsCode: BAD_INPUT_CHARACTER
analyzerCode: ILLEGAL_CHARACTER
expression: "\x1b 1"
@@ -104,12 +91,10 @@
ConstEvalZeroDivisor:
template: "Binary operator '#string' on '#string2' requires non-zero divisor, but divisor was '0'."
- dart2jsCode: INVALID_CONSTANT_DIV
analyzerCode: CONST_EVAL_THROWS_IDBZE
ConstEvalNegativeShift:
template: "Binary operator '#string' on '#string2' requires non-negative operand, but was '#string3'."
- dart2jsCode: INVALID_CONSTANT_SHIFT
ConstEvalInvalidMethodInvocation:
template: "The method '#string' can't be invoked on '#constant' within a const context."
@@ -138,37 +123,30 @@
NotConstantExpression:
template: "#string is not a constant expression."
analyzerCode: NOT_CONSTANT_EXPRESSION
- dart2jsCode: "*fatal*"
NotAConstantExpression:
template: "Not a constant expression."
- severity: ERROR
analyzerCode: NOT_CONSTANT_EXPRESSION
- dart2jsCode: "*fatal*"
NonAsciiIdentifier:
template: "The non-ASCII character '#character' (#unicode) can't be used in identifiers, only in strings and comments."
tip: "Try using an US-ASCII letter, a digit, '_' (an underscore), or '$' (a dollar sign)."
analyzerCode: ILLEGAL_CHARACTER
- dart2jsCode: BAD_INPUT_CHARACTER
expression: "å"
NonAsciiWhitespace:
template: "The non-ASCII space character #unicode can only be used in strings and comments."
analyzerCode: ILLEGAL_CHARACTER
- dart2jsCode: BAD_INPUT_CHARACTER
expression: "\u2028 1"
Encoding:
template: "Unable to decode bytes as UTF-8."
- dart2jsCode: "*fatal*"
bytes: [255]
EmptyNamedParameterList:
template: "Named parameter lists cannot be empty."
tip: "Try adding a named parameter to the list."
analyzerCode: "MISSING_IDENTIFIER"
- dart2jsCode: EMPTY_NAMED_PARAMETER_LIST
script: >
foo({}) {}
@@ -180,7 +158,6 @@
template: "Optional parameter lists cannot be empty."
tip: "Try adding an optional parameter to the list."
analyzerCode: "MISSING_IDENTIFIER"
- dart2jsCode: EMPTY_OPTIONAL_PARAMETER_LIST
script: >
foo([]) {}
@@ -192,7 +169,6 @@
template: "Expected a block."
tip: "Try adding {}."
analyzerCode: EXPECTED_TOKEN
- dart2jsCode: "*fatal*"
script: "try finally {}"
ExpectedBlockToSkip:
@@ -200,7 +176,6 @@
# TODO(ahe): In some scenarios, we can suggest removing the 'static' keyword.
tip: "Try adding {}."
analyzerCode: MISSING_FUNCTION_BODY
- dart2jsCode: NATIVE_OR_BODY_EXPECTED
script: "main();"
ExpectedBody:
@@ -208,13 +183,11 @@
# TODO(ahe): In some scenarios, we can suggest removing the 'static' keyword.
tip: "Try adding {}."
analyzerCode: MISSING_FUNCTION_BODY
- dart2jsCode: BODY_EXPECTED
script: "main();"
ExpectedStatement:
template: "Expected a statement."
analyzerCode: MISSING_STATEMENT
- dart2jsCode: "*fatal*"
statement: "void;"
ExpectedButGot:
@@ -224,7 +197,6 @@
# a ',' would also have worked. We don't have enough information to give a
# good suggestion.
analyzerCode: EXPECTED_TOKEN
- dart2jsCode: MISSING_TOKEN_BEFORE_THIS
script:
- "main() => true ? 1;"
- "main() => foo(x: 1 y: 2);"
@@ -251,7 +223,6 @@
# class Foo {
#
analyzerCode: EXPECTED_TOKEN
- dart2jsCode: MISSING_TOKEN_AFTER_THIS
script:
- "main() { return true }"
@@ -259,54 +230,52 @@
template: "Only one library directive may be declared in a file."
tip: "Try removing all but one of the library directives."
analyzerCode: MULTIPLE_LIBRARY_DIRECTIVES
- dart2jsCode: "*ignored*"
MultipleExtends:
template: "Each class definition can have at most one extends clause."
tip: "Try choosing one superclass and define your class to implement (or mix in) the others."
analyzerCode: MULTIPLE_EXTENDS_CLAUSES
- dart2jsCode: "*ignored*"
script: "class A extends B extends C {}"
MultipleWith:
template: "Each class definition can have at most one with clause."
tip: "Try combining all of the with clauses into a single clause."
analyzerCode: MULTIPLE_WITH_CLAUSES
- dart2jsCode: "*ignored*"
script: "class A extends B with C, D with E {}"
WithWithoutExtends:
template: "The with clause can't be used without an extends clause."
tip: "Try adding an extends clause such as 'extends Object'."
analyzerCode: WITH_WITHOUT_EXTENDS
- dart2jsCode: "GENERIC"
script: "class A with B, C {}"
WithBeforeExtends:
template: "The extends clause must be before the with clause."
tip: "Try moving the extends clause before the with clause."
analyzerCode: WITH_BEFORE_EXTENDS
- dart2jsCode: "*ignored*"
script: "class A with B extends C {}"
ImplementsBeforeExtends:
template: "The extends clause must be before the implements clause."
tip: "Try moving the extends clause before the implements clause."
analyzerCode: IMPLEMENTS_BEFORE_EXTENDS
- dart2jsCode: "*ignored*"
script: "class A implements B extends C {}"
+ImplementsBeforeOn:
+ template: "The on clause must be before the implements clause."
+ tip: "Try moving the on clause before the implements clause."
+ analyzerCode: IMPLEMENTS_BEFORE_ON
+ script: "mixin A implements B on C {}"
+
ImplementsBeforeWith:
template: "The with clause must be before the implements clause."
tip: "Try moving the with clause before the implements clause."
analyzerCode: IMPLEMENTS_BEFORE_WITH
- dart2jsCode: "*ignored*"
script: "class A extends B implements C with D {}"
ImplementsRepeated:
template: "'#name' can only be implemented once."
analyzerCode: IMPLEMENTS_REPEATED
- dart2jsCode: "*fatal*"
tip: "Try removing #count of the occurrences."
script:
- >-
@@ -317,7 +286,6 @@
ImplementsSuperClass:
template: "'#name' can't be used in both 'extends' and 'implements' clauses."
analyzerCode: IMPLEMENTS_SUPER_CLASS
- dart2jsCode: "*fatal*"
tip: "Try removing one of the occurrences."
script:
- >-
@@ -328,13 +296,16 @@
template: "Each class definition can have at most one implements clause."
tip: "Try combining all of the implements clauses into a single clause."
analyzerCode: MULTIPLE_IMPLEMENTS_CLAUSES
- dart2jsCode: "GENERIC"
script: "class A implements B implements C, D {}"
+MultipleOnClauses:
+ template: "Each mixin definition can have at most one on clause."
+ tip: "Try combining all of the on clauses into a single clause."
+ analyzerCode: MULTIPLE_ON_CLAUSES
+ script: "mixin A on B on C, D {}"
+
ImplementsFutureOr:
template: "'FutureOr' can't be used in an 'implements' clause."
- severity: ERROR
- dart2jsCode: "*fatal*"
script:
- >-
import 'dart:async';
@@ -343,30 +314,25 @@
ExpectedClassOrMixinBody:
template: "Expected a class or mixin body, but got '#lexeme'."
analyzerCode: MISSING_CLASS_BODY
- dart2jsCode: "*fatal*"
ExpectedClassBodyToSkip: ExpectedClassOrMixinBody
ExpectedDeclaration:
template: "Expected a declaration, but got '#lexeme'."
analyzerCode: EXPECTED_EXECUTABLE
- dart2jsCode: "*fatal*"
ExpectedClassMember:
template: "Expected a class member, but got '#lexeme'."
analyzerCode: EXPECTED_CLASS_MEMBER
- dart2jsCode: "*fatal*"
ExpectedFunctionBody:
template: "Expected a function body, but got '#lexeme'."
analyzerCode: MISSING_FUNCTION_BODY
- dart2jsCode: NATIVE_OR_FATAL
ExpectedHexDigit:
template: "A hex digit (0-9 or A-F) must follow '0x'."
# No tip, seems obvious from the error message.
analyzerCode: MISSING_HEX_DIGIT
- dart2jsCode: HEX_DIGIT_EXPECTED
script: >
main() {
var i = 0x;
@@ -374,45 +340,36 @@
ExpectedIdentifier:
template: "Expected an identifier, but got '#lexeme'."
- severity: ERROR
analyzerCode: MISSING_IDENTIFIER
- dart2jsCode: "*fatal*"
script: "do() {} main() {}"
EqualityCannotBeEqualityOperand:
template: "An equality expression can't be an operand of another equality expression."
tip: "Try re-writing the expression."
analyzerCode: EQUALITY_CANNOT_BE_EQUALITY_OPERAND
- dart2jsCode: "*fatal*"
script:
- "main() { var b = a < b < c; }"
- "main() { var b = a == b != c; }"
ExpectedOpenParens:
template: "Expected '('."
- dart2jsCode: GENERIC
ExpectedString:
template: "Expected a String, but got '#lexeme'."
analyzerCode: EXPECTED_STRING_LITERAL
- dart2jsCode: "*fatal*"
ExpectedToken:
template: "Expected to find '#string'."
analyzerCode: EXPECTED_TOKEN
- dart2jsCode: "*fatal*"
ExpectedType:
template: "Expected a type, but got '#lexeme'."
- severity: ERROR
analyzerCode: EXPECTED_TYPE_NAME
- dart2jsCode: "*fatal*"
MissingExpressionInThrow:
template: "Missing expression after 'throw'."
tip: "Add an expression after 'throw' or use 'rethrow' to throw a caught exception"
analyzerCode: MISSING_EXPRESSION_IN_THROW
- dart2jsCode: "*fatal*"
statement:
- "throw;"
@@ -420,7 +377,6 @@
template: "Variables must be declared using the keywords 'const', 'final', 'var' or a type name."
tip: "Try adding the name of the type of the variable or the keyword 'var'."
analyzerCode: MISSING_CONST_FINAL_VAR_OR_TYPE
- dart2jsCode: "*fatal*"
script:
- "class C { static f; }"
@@ -428,7 +384,6 @@
template: "Function-typed parameters can't specify 'const', 'final' or 'var' in place of a return type."
tip: "Try replacing the keyword with a return type."
analyzerCode: FUNCTION_TYPED_PARAMETER_VAR
- dart2jsCode: "*fatal*"
script:
- "void f(const x()) {}"
- "void f(final x()) {}"
@@ -438,7 +393,6 @@
template: "Members of classes can't be declared to be 'abstract'."
tip: "Try removing the 'abstract' keyword. You can add the 'abstract' keyword before the class declaration."
analyzerCode: ABSTRACT_CLASS_MEMBER
- dart2jsCode: EXTRANEOUS_MODIFIER
script:
- "abstract class C {abstract C.c();}"
- "abstract class C {abstract m();}"
@@ -451,7 +405,6 @@
template: "Classes can't be declared inside other classes."
tip: "Try moving the class to the top-level."
analyzerCode: CLASS_IN_CLASS
- dart2jsCode: "*fatal*"
script:
- "class C { class B {} }"
@@ -459,7 +412,6 @@
template: "Enums can't be declared inside classes."
tip: "Try moving the enum to the top-level."
analyzerCode: ENUM_IN_CLASS
- dart2jsCode: "*fatal*"
script:
- "class Foo { enum Bar { Bar1, Bar2, Bar3 } }"
@@ -467,7 +419,6 @@
template: "Typedefs can't be declared inside classes."
tip: "Try moving the typedef to the top-level."
analyzerCode: TYPEDEF_IN_CLASS
- dart2jsCode: "*fatal*"
script:
- "abstract class C { typedef int F(int x); }"
@@ -475,7 +426,6 @@
template: "Getters, setters and methods can't be declared to be 'covariant'."
tip: "Try removing the 'covariant' keyword."
analyzerCode: COVARIANT_MEMBER
- dart2jsCode: EXTRANEOUS_MODIFIER
script:
- "static covariant get x => 0;"
- "covariant int m() => 0;"
@@ -484,7 +434,6 @@
template: "The return type can't be 'var'."
tip: "Try removing the keyword 'var', or replacing it with the name of the return type."
analyzerCode: VAR_RETURN_TYPE
- dart2jsCode: EXTRANEOUS_MODIFIER
script:
- "class C { var m() {} }"
- "class C { var C() {} }"
@@ -493,14 +442,12 @@
template: "Classes can't be declared to be 'const'."
tip: "Try removing the 'const' keyword. If you're trying to indicate that instances of the class can be constants, place the 'const' keyword on the class' constructor(s)."
analyzerCode: CONST_CLASS
- dart2jsCode: EXTRANEOUS_MODIFIER
script: "const class C {}"
ConstAndCovariant:
template: "Members can't be declared to be both 'const' and 'covariant'."
tip: "Try removing either the 'const' or 'covariant' keyword."
analyzerCode: CONST_AND_COVARIANT
- dart2jsCode: "*ignored*"
script:
- "class C { covariant const C f; }"
- "class C { const covariant C f; }"
@@ -509,16 +456,16 @@
template: "Members can't be declared to be both 'const' and 'final'."
tip: "Try removing either the 'const' or 'final' keyword."
analyzerCode: CONST_AND_FINAL
- dart2jsCode: EXTRANEOUS_MODIFIER
- script:
- - "class C { const final int x = 5; }"
- - "class C { final const int x = 5; }"
+ declaration:
+ - "class C { static const final int x = 5; }"
+ - "class C { static final const int x = 5; }"
+ - "const final int x = 5;"
+ - "final const int x = 5;"
ConstAndVar:
template: "Members can't be declared to be both 'const' and 'var'."
tip: "Try removing either the 'const' or 'var' keyword."
analyzerCode: CONST_AND_VAR
- dart2jsCode: EXTRANEOUS_MODIFIER
script:
- "class C { const var x; }"
- "class C { var const x; }"
@@ -527,29 +474,34 @@
template: "Only redirecting factory constructors can be declared to be 'const'."
tip: "Try removing the 'const' keyword, or replacing the body with '=' followed by a valid target."
analyzerCode: CONST_FACTORY
- dart2jsCode: "*ignored*"
script:
- "class C { const factory C() {} }"
+ConstFactoryRedirectionToNonConst:
+ template: "Constant factory constructor can't delegate to a non-constant constructor."
+ tip: "Try redirecting to a different constructor or marking the target constructor 'const'."
+ analyzerCode: REDIRECT_TO_NON_CONST_CONSTRUCTOR
+ script:
+ - >-
+ class A {
+ const factory A.foo() = A.bar;
+ A.bar() {}
+ }
+
NonConstFactory:
template: "Cannot invoke a non-'const' factory where a const expression is expected."
tip: "Try using a constructor or factory that is 'const'."
- severity: ERROR
analyzerCode: NOT_CONSTANT_EXPRESSION
- dart2jsCode: "*fatal*"
NonConstConstructor:
template: "Cannot invoke a non-'const' constructor where a const expression is expected."
tip: "Try using a constructor or factory that is 'const'."
- severity: ERROR
analyzerCode: NOT_CONSTANT_EXPRESSION
- dart2jsCode: "*fatal*"
ConstAfterFactory:
template: "The modifier 'const' should be before the modifier 'factory'."
tip: "Try re-ordering the modifiers."
analyzerCode: CONST_AFTER_FACTORY
- dart2jsCode: "*ignored*"
script:
- "class C { factory const C() = prefix.B.foo; }"
@@ -557,7 +509,6 @@
template: "A const constructor can't have a body."
tip: "Try removing either the 'const' keyword or the body."
analyzerCode: CONST_CONSTRUCTOR_WITH_BODY
- dart2jsCode: "*fatal*"
script:
- "class C { const C() {} }"
@@ -565,7 +516,6 @@
template: "Getters, setters and methods can't be declared to be 'const'."
tip: "Try removing the 'const' keyword."
analyzerCode: CONST_METHOD
- dart2jsCode: "*fatal*"
script:
- "class C { const m() {} }"
@@ -573,7 +523,6 @@
template: "The modifier 'covariant' should be before the modifier 'final'."
tip: "Try re-ordering the modifiers."
analyzerCode: COVARIANT_AFTER_FINAL
- dart2jsCode: EXTRANEOUS_MODIFIER
script:
- "final covariant f;"
@@ -581,7 +530,6 @@
template: "The modifier 'covariant' should be before the modifier 'var'."
tip: "Try re-ordering the modifiers."
analyzerCode: COVARIANT_AFTER_VAR
- dart2jsCode: EXTRANEOUS_MODIFIER
script:
- "var covariant f;"
@@ -589,7 +537,6 @@
template: "Members can't be declared to be both 'covariant' and 'static'."
tip: "Try removing either the 'covariant' or 'static' keyword."
analyzerCode: COVARIANT_AND_STATIC
- dart2jsCode: EXTRANEOUS_MODIFIER
script:
- "class C { covariant static A f; }"
- "class C { static covariant A f; }"
@@ -598,7 +545,6 @@
template: "The modifier '#lexeme' was already specified."
tip: "Try removing all but one occurance of the modifier."
analyzerCode: DUPLICATED_MODIFIER
- dart2jsCode: EXTRANEOUS_MODIFIER
script:
- "class C { const const m; }"
- "class C { external external f(); }"
@@ -610,7 +556,6 @@
template: "The modifier 'external' should be before the modifier 'const'."
tip: "Try re-ordering the modifiers."
analyzerCode: EXTERNAL_AFTER_CONST
- dart2jsCode: EXTRANEOUS_MODIFIER
script:
- "class C { const external C(); }"
@@ -618,7 +563,6 @@
template: "The modifier 'external' should be before the modifier 'factory'."
tip: "Try re-ordering the modifiers."
analyzerCode: EXTERNAL_AFTER_FACTORY
- dart2jsCode: "*ignored*"
script:
- "class C { factory external C(); }"
@@ -626,7 +570,6 @@
template: "The modifier 'external' should be before the modifier 'static'."
tip: "Try re-ordering the modifiers."
analyzerCode: EXTERNAL_AFTER_STATIC
- dart2jsCode: EXTRANEOUS_MODIFIER
script:
- "class C { static external f(); }"
@@ -634,7 +577,6 @@
template: "External constructors can't have a body."
tip: "Try removing the body of the constructor, or removing the keyword 'external'."
analyzerCode: EXTERNAL_CONSTRUCTOR_WITH_BODY
- dart2jsCode: "*ignored*"
script:
- "class C { external C() {} }"
@@ -642,13 +584,11 @@
template: "An external constructor can't initialize fields."
tip: "Try removing the field initializers, or removing the keyword 'external'."
analyzerCode: EXTERNAL_CONSTRUCTOR_WITH_FIELD_INITIALIZERS
- dart2jsCode: "*fatal*"
ExternalFactoryWithBody:
template: "External factories can't have a body."
tip: "Try removing the body of the factory, or removing the keyword 'external'."
analyzerCode: EXTERNAL_CONSTRUCTOR_WITH_BODY
- dart2jsCode: "*ignored*"
script:
- "class C { external factory C() {} }"
@@ -656,25 +596,20 @@
template: "Fields can't be declared to be 'external'."
tip: "Try removing the keyword 'external'."
analyzerCode: EXTERNAL_FIELD
- dart2jsCode: EXTRANEOUS_MODIFIER
script:
- "class C { external var f; }"
InitializerForStaticField:
template: "'#name' isn't an instance field of this class."
analyzerCode: INITIALIZER_FOR_STATIC_FIELD
- dart2jsCode: "*fatal*"
InitializerOutsideConstructor:
template: "Only constructors can have initializers, and '#name' is not a constructor."
analyzerCode: INITIALIZER_OUTSIDE_CONSTRUCTOR
- dart2jsCode: "*fatal*"
MoreThanOneSuperOrThisInitializer:
template: "Can't have more than one 'super' or 'this' initializer."
- severity: ERROR
analyzerCode: SUPER_IN_REDIRECTING_CONSTRUCTOR
- dart2jsCode: "*fatal*"
script:
- "class C { C.bad() : super(), super(); }"
- "class C { C(); C.bad() : super(), this(); }"
@@ -683,31 +618,25 @@
ThisInitializerNotAlone:
template: "Can't have other initializers together with 'this'."
- severity: ERROR
analyzerCode: FIELD_INITIALIZER_REDIRECTING_CONSTRUCTOR
- dart2jsCode: "*fatal*"
script:
- "class C { int x; C(); C.bad() : x = 5, this(); }"
- "class C { int x; C(); C.bad() : this(), x = 5; }"
SuperInitializerNotLast:
template: "Can't have initializers after 'super'."
- severity: ERROR
analyzerCode: INVALID_SUPER_INVOCATION
- dart2jsCode: "*fatal*"
script:
- "class C { int x; C.bad() : super(), x = 5; }"
ConstConstructorWithNonConstSuper:
template: "Constant constructor can't call non-constant super constructors."
analyzerCode: CONST_CONSTRUCTOR_WITH_NON_CONST_SUPER
- dart2jsCode: "*fatal*"
ExtraneousModifier:
template: "Can't have modifier '#lexeme' here."
tip: "Try removing '#lexeme'."
analyzerCode: EXTRANEOUS_MODIFIER
- dart2jsCode: EXTRANEOUS_MODIFIER
script:
- "var String foo; main(){}"
- "var set foo; main(){}"
@@ -740,7 +669,6 @@
template: "Members can't be declared to be both 'final' and 'covariant'."
tip: "Try removing either the 'final' or 'covariant' keyword."
analyzerCode: FINAL_AND_COVARIANT
- dart2jsCode: "*ignored*"
script:
- "class C { covariant final f = 5; }"
- "class C { final covariant f = 5; }"
@@ -749,7 +677,6 @@
template: "Members can't be declared to be both 'final' and 'var'."
tip: "Try removing the keyword 'var'."
analyzerCode: FINAL_AND_VAR
- dart2jsCode: EXTRANEOUS_MODIFIER
script:
- "class C { final var x = 5; }"
- "class C { var final x = 5; }"
@@ -758,7 +685,6 @@
template: "The modifier 'static' should be before the modifier 'const'."
tip: "Try re-ordering the modifiers."
analyzerCode: STATIC_AFTER_CONST
- dart2jsCode: EXTRANEOUS_MODIFIER
script:
- "class C { const static int f; }"
@@ -766,7 +692,6 @@
template: "The modifier 'static' should be before the modifier 'final'."
tip: "Try re-ordering the modifiers."
analyzerCode: STATIC_AFTER_FINAL
- dart2jsCode: EXTRANEOUS_MODIFIER
script:
- "class C { final static int f = 5; }"
@@ -774,7 +699,6 @@
template: "The modifier 'static' should be before the modifier 'var'."
tip: "Try re-ordering the modifiers."
analyzerCode: STATIC_AFTER_VAR
- dart2jsCode: "*ignored*"
script:
- "class C { var static f; }"
@@ -782,7 +706,6 @@
template: "Constructors can't be static."
tip: "Try removing the keyword 'static'."
analyzerCode: STATIC_CONSTRUCTOR
- dart2jsCode: "*fatal*"
script:
- "class C { static C() {} }"
- "class C { static C.m() {} }"
@@ -791,7 +714,6 @@
template: "Operators can't be static."
tip: "Try removing the keyword 'static'."
analyzerCode: STATIC_OPERATOR
- dart2jsCode: EXTRANEOUS_MODIFIER
script:
- "class C { static operator +(int x) => x + 1; }"
@@ -799,46 +721,38 @@
template: "A break statement can't be used outside of a loop or switch statement."
tip: "Try removing the break statement."
analyzerCode: BREAK_OUTSIDE_OF_LOOP
- dart2jsCode: "*ignored*"
script:
- "main() { break; }"
InvalidBreakTarget:
template: "Can't break to '#name'."
- dart2jsCode: "*fatal*"
BreakTargetOutsideFunction:
template: "Can't break to '#name' in a different function."
analyzerCode: LABEL_IN_OUTER_SCOPE
- dart2jsCode: "*fatal*"
ContinueOutsideOfLoop:
template: "A continue statement can't be used outside of a loop or switch statement."
tip: "Try removing the continue statement."
analyzerCode: CONTINUE_OUTSIDE_OF_LOOP
- dart2jsCode: "*ignored*"
script:
- "main() { continue; }"
InvalidContinueTarget:
template: "Can't continue at '#name'."
- dart2jsCode: "*fatal*"
ContinueTargetOutsideFunction:
template: "Can't continue at '#name' in a different function."
analyzerCode: LABEL_IN_OUTER_SCOPE
- dart2jsCode: "*fatal*"
ContinueLabelNotTarget:
template: "Target of continue must be a label."
analyzerCode: LABEL_UNDEFINED
- dart2jsCode: "*fatal*"
ContinueWithoutLabelInCase:
template: "A continue statement in a switch statement must have a label as a target."
tip: "Try adding a label associated with one of the case clauses to the continue statement."
analyzerCode: CONTINUE_WITHOUT_LABEL_IN_CASE
- dart2jsCode: "*ignored*"
script:
- "main() { switch (x) {case 1: continue;} }"
@@ -846,7 +760,6 @@
template: "The label '#name' was already used in this switch statement."
tip: "Try choosing a different name for this label."
analyzerCode: DUPLICATE_LABEL_IN_SWITCH_STATEMENT
- dart2jsCode: "*fatal*"
statement:
- "switch (0) {l1: case 0: break; l1: case 1: break;}"
@@ -854,7 +767,6 @@
template: "Can't find label '#name'."
tip: "Try defining the label, or correcting the name to match an existing label."
analyzerCode: LABEL_UNDEFINED
- dart2jsCode: "*fatal*"
statement:
- "switch (0) {case 0: continue L;}"
@@ -862,7 +774,6 @@
template: "The loop variable in a for-each loop can't be initialized."
tip: "Try removing the initializer, or using a different kind of loop."
analyzerCode: INITIALIZED_VARIABLE_IN_FOR_EACH
- dart2jsCode: "*fatal*"
statement:
- "for (int a = 0 in <int>[10]) {}"
@@ -870,7 +781,6 @@
template: "The keyword 'await' isn't allowed for a normal 'for' statement."
tip: "Try removing the keyword, or use a for-each statement."
analyzerCode: INVALID_AWAIT_IN_FOR
- dart2jsCode: INVALID_AWAIT_FOR
script:
- "f() async {await for (int i = 0; i < 5; i++) {}}"
@@ -878,15 +788,12 @@
template: "Invalid modifier 'sync'."
tip: "Try replacing 'sync' with 'sync*'."
analyzerCode: MISSING_STAR_AFTER_SYNC
- dart2jsCode: INVALID_SYNC_MODIFIER
script: "main() sync {}"
InvalidVoid:
template: "Type 'void' can't be used here because it isn't a return type."
tip: "Try removing 'void' keyword or replace it with 'var', 'final', or a type."
- severity: ERROR
analyzerCode: INVALID_USE_OF_VOID
- dart2jsCode: VOID_NOT_ALLOWED
script:
- "void x; main() {}"
- "foo(void x) {} main() { foo(null); }"
@@ -894,16 +801,12 @@
InvalidInitializer:
template: "Not a valid initializer."
tip: "To initialize a field, use the syntax 'name = value'."
- severity: ERROR
analyzerCode: INVALID_INITIALIZER
- dart2jsCode: "*fatal*"
FinalFieldNotInitialized:
template: "Final field '#name' is not initialized."
tip: "Try to initialize the field in the declaration or in every constructor."
- severity: ERROR
analyzerCode: FINAL_NOT_INITIALIZED
- dart2jsCode: "*fatal*"
script: >
class C {
final int x;
@@ -912,9 +815,7 @@
FinalFieldNotInitializedByConstructor:
template: "Final field '#name' is not initialized by this constructor."
tip: "Try to initialize the field using an initializing formal or a field initializer."
- severity: ERROR
analyzerCode: FINAL_NOT_INITIALIZED_CONSTRUCTOR_1
- dart2jsCode: "*fatal*"
script: >
class C {
final int x;
@@ -926,7 +827,6 @@
template: "Numbers in exponential notation should always contain an exponent (an integer number with an optional sign)."
tip: "Make sure there is an exponent, and remove any whitespace before it."
analyzerCode: MISSING_DIGIT
- dart2jsCode: EXPONENT_MISSING
script: >
main() {
var i = 1e;
@@ -936,7 +836,6 @@
template: "Positional optional parameters can't use ':' to specify a default value."
tip: "Try replacing ':' with '='."
analyzerCode: WRONG_SEPARATOR_FOR_POSITIONAL_PARAMETER
- dart2jsCode: POSITIONAL_PARAMETER_WITH_EQUALS
script: >
main() {
foo([a: 1]) => print(a);
@@ -947,7 +846,6 @@
template: "Non-optional parameters can't have a default value."
tip: "Try removing the default value or making the parameter optional."
analyzerCode: NAMED_PARAMETER_OUTSIDE_GROUP
- dart2jsCode: REQUIRED_PARAMETER_WITH_DEFAULT
script:
- >
main() {
@@ -963,19 +861,16 @@
StackOverflow:
template: "Stack overflow."
analyzerCode: STACK_OVERFLOW
- dart2jsCode: GENERIC
InvalidCodePoint:
template: "The escape sequence starting with '\\u' isn't a valid code point."
analyzerCode: INVALID_CODE_POINT
- dart2jsCode: "*fatal*"
expression:
- "'\\u{110000}'"
InvalidHexEscape:
template: "An escape sequence starting with '\\x' must be followed by 2 hexidecimal digits."
analyzerCode: INVALID_HEX_ESCAPE
- dart2jsCode: "*fatal*"
expression:
- "'\\x0'"
- "'\\x0y'"
@@ -983,7 +878,6 @@
InvalidUnicodeEscape:
template: "An escape sequence starting with '\\u' must be followed by 4 hexidecimal digits or from 1 to 6 digits between '{' and '}'."
analyzerCode: INVALID_UNICODE_ESCAPE
- dart2jsCode: "*fatal*"
expression:
- "'\\u'"
- "'\\u0F'"
@@ -995,7 +889,6 @@
template: "A '$' has special meaning inside a string, and must be followed by an identifier or an expression in curly braces ({})."
tip: "Try adding a backslash (\\) to escape the '$'."
analyzerCode: UNEXPECTED_DOLLAR_IN_STRING
- dart2jsCode: MALFORMED_STRING_LITERAL
script:
- >
main() {
@@ -1017,14 +910,12 @@
UnexpectedToken:
template: "Unexpected token '#lexeme'."
analyzerCode: UNEXPECTED_TOKEN
- dart2jsCode: "*fatal*"
script:
- "import 'b.dart' d as b;"
UnmatchedToken:
template: "Can't find '#string' to match '#lexeme'."
analyzerCode: EXPECTED_TOKEN
- dart2jsCode: UNMATCHED_TOKEN
script:
- "main("
- "main(){"
@@ -1033,7 +924,6 @@
UnsupportedOperator:
template: "The '#lexeme' operator is not supported."
analyzerCode: UNSUPPORTED_OPERATOR
- dart2jsCode: "*ignored*"
script:
- "class C { void operator ===(x) {} }"
- "class C { void operator !==(x) {} }"
@@ -1042,13 +932,11 @@
template: "'+' is not a prefix operator."
tip: "Try removing '+'."
analyzerCode: MISSING_IDENTIFIER
- dart2jsCode: UNSUPPORTED_PREFIX_PLUS
script: "main() => +2; // No longer a valid way to write '2'"
UnterminatedComment:
template: "Comment starting with '/*' must end with '*/'."
analyzerCode: UNTERMINATED_MULTI_LINE_COMMENT
- dart2jsCode: UNTERMINATED_COMMENT
script:
main() {
}
@@ -1057,7 +945,6 @@
UnterminatedString:
template: "String starting with #string must end with #string2."
analyzerCode: UNTERMINATED_STRING_LITERAL
- dart2jsCode: UNTERMINATED_STRING
script:
- >
main() {
@@ -1091,51 +978,42 @@
UnterminatedToken:
# This is a fall-back message that shouldn't happen.
template: "Incomplete token."
- dart2jsCode: UNTERMINATED_TOKEN
# Note: avoid using this template, it should only be used for debugging and
# prototyping, see [diagnostics.md](
# lib/src/fasta/diagnostics.md#avoid-composing-messages-programmatically).
Unspecified:
template: "#string"
- dart2jsCode: GENERIC
AbstractNotSync:
template: "Abstract methods can't use 'async', 'async*', or 'sync*'."
analyzerCode: NON_SYNC_ABSTRACT_METHOD
- dart2jsCode: "*ignored*"
AsyncAsIdentifier:
analyzerCode: ASYNC_KEYWORD_USED_AS_IDENTIFIER
template: "'async' can't be used as an identifier in 'async', 'async*', or 'sync*' methods."
- dart2jsCode: GENERIC
AwaitAsIdentifier:
template: "'await' can't be used as an identifier in 'async', 'async*', or 'sync*' methods."
analyzerCode: ASYNC_KEYWORD_USED_AS_IDENTIFIER
- dart2jsCode: "*ignored*"
AwaitNotAsync:
template: "'await' can only be used in 'async' or 'async*' methods."
analyzerCode: AWAIT_IN_WRONG_CONTEXT
- dart2jsCode: "*ignored*"
BuiltInIdentifierAsType:
template: "The built-in identifier '#lexeme' can't be used as a type."
tip: "Try correcting the name to match an existing type."
analyzerCode: BUILT_IN_IDENTIFIER_AS_TYPE
- dart2jsCode: EXTRANEOUS_MODIFIER
BuiltInIdentifierInDeclaration:
template: "Can't use '#lexeme' as a name here."
analyzerCode: BUILT_IN_IDENTIFIER_IN_DECLARATION
- dart2jsCode: GENERIC
AwaitForNotAsync:
template: "The asynchronous for-in can only be used in functions marked with 'async' or 'async*'."
tip: "Try marking the function body with either 'async' or 'async*', or removing the 'await' before the for loop."
analyzerCode: ASYNC_FOR_IN_WRONG_CONTEXT
- dart2jsCode: "*ignored*"
script: >
main(o) sync* {
await for (var e in o) {}
@@ -1144,103 +1022,84 @@
ConstructorNotSync:
template: "Constructor bodies can't use 'async', 'async*', or 'sync*'."
analyzerCode: NON_SYNC_CONSTRUCTOR
- dart2jsCode: "*ignored*"
FactoryNotSync:
template: "Factory bodies can't use 'async', 'async*', or 'sync*'."
analyzerCode: NON_SYNC_FACTORY
- dart2jsCode: "*ignored*"
GeneratorReturnsValue:
template: "'sync*' and 'async*' can't return a value."
analyzerCode: RETURN_IN_GENERATOR
- dart2jsCode: "*ignored*"
InvalidInlineFunctionType:
template: "Invalid inline function type."
tip: "Try changing the inline function type (as in 'int f()') to a prefixed function type using the `Function` keyword (as in 'int Function() f')."
- dart2jsCode: INVALID_INLINE_FUNCTION_TYPE
declaration: "typedef F = Function(int f(String x));"
SetterNotSync:
template: "Setters can't use 'async', 'async*', or 'sync*'."
analyzerCode: INVALID_MODIFIER_ON_SETTER
- dart2jsCode: "*ignored*"
YieldAsIdentifier:
template: "'yield' can't be used as an identifier in 'async', 'async*', or 'sync*' methods."
analyzerCode: ASYNC_KEYWORD_USED_AS_IDENTIFIER
- dart2jsCode: "*fatal*"
YieldNotGenerator:
template: "'yield' can only be used in 'sync*' or 'async*' methods."
analyzerCode: YIELD_IN_NON_GENERATOR
- dart2jsCode: "*ignored*"
OnlyTry:
template: "Try block should be followed by 'on', 'catch', or 'finally' block."
tip: "Did you forget to add a 'finally' block?"
analyzerCode: MISSING_CATCH_OR_FINALLY
- dart2jsCode: "*ignored*"
statement: "try {}"
TypeAfterVar:
template: "Can't have both a type and 'var'."
tip: "Try removing 'var.'"
analyzerCode: VAR_AND_TYPE
- dart2jsCode: EXTRANEOUS_MODIFIER
AssertExtraneousArgument:
template: "`assert` can't have more than two arguments."
- dart2jsCode: "*fatal*"
PositionalAfterNamedArgument:
template: "Place positional arguments before named arguments."
tip: "Try moving the positional argument before the named arguments, or add a name to the argument."
analyzerCode: POSITIONAL_AFTER_NAMED_ARGUMENT
- dart2jsCode: "*ignored*"
ExpectedNamedArgument:
template: "Expected named argument."
analyzerCode: EXTRA_POSITIONAL_ARGUMENTS
- dart2jsCode: "*fatal*"
AssertAsExpression:
template: "`assert` can't be used as an expression."
- dart2jsCode: "*fatal*"
FunctionTypeDefaultValue:
template: "Can't have a default value in a function type."
analyzerCode: DEFAULT_VALUE_IN_FUNCTION_TYPE
- dart2jsCode: "*ignored*"
PrivateNamedParameter:
template: "An optional named parameter can't start with '_'."
analyzerCode: PRIVATE_OPTIONAL_PARAMETER
- dart2jsCode: "*ignored*"
NoFormals:
template: "A function should have formal parameters."
tip: "Try adding '()' after '#lexeme', or add 'get' before '#lexeme' to declare a getter."
analyzerCode: MISSING_FUNCTION_PARAMETERS
- dart2jsCode: "*ignored*"
GetterWithFormals:
template: "A getter can't have formal parameters."
tip: "Try removing '(...)'."
analyzerCode: GETTER_WITH_PARAMETERS
- dart2jsCode: "*ignored*"
SetterWithWrongNumberOfFormals:
template: "A setter should have exactly one formal parameter."
analyzerCode: WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER
- dart2jsCode: "*ignored*"
CatchSyntax:
template: "'catch' must be followed by '(identifier)' or '(identifier, identifier)'."
tip: "No types are needed, the first is given by 'on', the second is always 'StackTrace'."
analyzerCode: CATCH_SYNTAX
- dart2jsCode: "*ignored*"
statement:
- "try {} catch {}"
- "try {} catch () {}"
@@ -1250,55 +1109,52 @@
template: "'super' can't be null."
tip: "Try replacing '?.' with '.'"
analyzerCode: INVALID_OPERATOR_FOR_SUPER
- dart2jsCode: "*ignored*"
ConstFieldWithoutInitializer:
template: "The const variable '#name' must be initialized."
tip: "Try adding an initializer ('= <expression>') to the declaration."
analyzerCode: CONST_NOT_INITIALIZED
- dart2jsCode: "*ignored*"
FinalFieldWithoutInitializer:
template: "The final variable '#name' must be initialized."
tip: "Try adding an initializer ('= <expression>') to the declaration."
analyzerCode: FINAL_NOT_INITIALIZED
- dart2jsCode: "*ignored*"
MetadataTypeArguments:
template: "An annotation (metadata) can't use type arguments."
analyzerCode: ANNOTATION_WITH_TYPE_ARGUMENTS
- dart2jsCode: "*ignored*"
ConstructorNotFound:
template: "Couldn't find constructor '#name'."
severity: ERROR_LEGACY_WARNING
analyzerCode: CONSTRUCTOR_NOT_FOUND
- dart2jsCode: "*fatal*"
ConstructorWithReturnType:
template: "Constructors can't have a return type."
tip: "Try removing the return type."
analyzerCode: CONSTRUCTOR_WITH_RETURN_TYPE
- dart2jsCode: "*fatal*"
script:
- "class C { int C() {} }"
ConstructorWithTypeParameters:
template: "Constructors can't have type parameters."
- severity: ERROR
analyzerCode: TYPE_PARAMETER_ON_CONSTRUCTOR
- dart2jsCode: "*fatal*"
script:
- "class C { C<T>() {} }"
- "class C { C.foo<T>() {} }"
- "class C { factory C<T>() => null; }"
- "class C { factory C.foo<T>() => null; }"
+ConstructorWithTypeArguments:
+ template: "A constructor invocation can't have type arguments on the constructor name."
+ tip: "Try to place the type arguments on the class name."
+ analyzerCode: UNDEFINED_CLASS
+ script:
+ - "class C<X> { C.foo(); } bar() { new C.foo<int>(); }"
+
ConstructorWithWrongName:
template: "The name of a constructor must match the name of the enclosing class."
- severity: ERROR
analyzerCode: INVALID_CONSTRUCTOR_NAME
- dart2jsCode: "*fatal*"
script:
- "class A { B.foo() {} }"
- "class A { factory B() => null; }"
@@ -1311,9 +1167,7 @@
ConstructorCyclic:
template: "Redirecting constructers can't be cyclic."
tip: "Try to have all constructors eventually redirect to a non-redirecting constructor."
- severity: ERROR
analyzerCode: RECURSIVE_CONSTRUCTOR_REDIRECT
- dart2jsCode: "*fatal*"
script:
- "class C { C.foo() : this.bar(); C.bar() : this.foo(); }"
@@ -1321,7 +1175,6 @@
template: "Field formal parameters can only be used in a constructor."
tip: "Try removing 'this.'."
analyzerCode: FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR
- dart2jsCode: "*fatal*"
script:
- "class C { void m(this.x); }"
@@ -1329,24 +1182,20 @@
template: "Redirection constructor target not found: '#name'"
severity: ERROR_LEGACY_WARNING
analyzerCode: REDIRECT_TO_MISSING_CONSTRUCTOR
- dart2jsCode: "*fatal*"
CyclicTypedef:
template: "The typedef '#name' has a reference to itself."
analyzerCode: TYPE_ALIAS_CANNOT_REFERENCE_ITSELF
- dart2jsCode: "*fatal*"
TypeNotFound:
template: "Type '#name' not found."
severity: ERROR_LEGACY_WARNING
analyzerCode: UNDEFINED_CLASS
- dart2jsCode: "*fatal*"
NonInstanceTypeVariableUse:
template: "Can only use type variables in instance methods."
severity: ERROR_LEGACY_WARNING
analyzerCode: TYPE_PARAMETER_REFERENCED_BY_STATIC
- dart2jsCode: "*fatal*"
GetterNotFound:
template: "Getter not found: '#name'."
@@ -1373,51 +1222,36 @@
MissingArgumentList:
template: "Constructor invocations must have an argument list."
- severity: ERROR
TooFewArguments:
template: "Too few positional arguments: #count required, #count2 given."
severity: ERROR_LEGACY_WARNING
analyzerCode: NOT_ENOUGH_REQUIRED_ARGUMENTS
- dart2jsCode: "*fatal*"
TooManyArguments:
template: "Too many positional arguments: #count allowed, but #count2 found."
tip: "Try removing the extra positional arguments."
severity: ERROR_LEGACY_WARNING
analyzerCode: EXTRA_POSITIONAL_ARGUMENTS
- dart2jsCode: "*fatal*"
-
-TooManyArgumentsCouldBeNamed:
- template: "Too many positional arguments: #count allowed, but #count2 found."
- tip: "Try removing the extra positional arguments or specifying the name for named arguments."
- severity: ERROR_LEGACY_WARNING
- analyzerCode: EXTRA_POSITIONAL_ARGUMENTS_COULD_BE_NAMED
- dart2jsCode: "*fatal*"
NoSuchNamedParameter:
template: "No named parameter with the name '#name'."
severity: ERROR_LEGACY_WARNING
analyzerCode: UNDEFINED_NAMED_PARAMETER
- dart2jsCode: "*fatal*"
AbstractClassInstantiation:
template: "The class '#name' is abstract and can't be instantiated."
severity: ERROR_LEGACY_WARNING
analyzerCode: NEW_WITH_ABSTRACT_CLASS
- dart2jsCode: "*fatal*"
EnumInstantiation:
template: "Enums can't be instantiated."
- severity: ERROR
analyzerCode: INSTANTIATE_ENUM
- dart2jsCode: "*fatal*"
AbstractRedirectedClassInstantiation:
template: "Factory redirects to class '#name', which is abstract and can't be instantiated."
severity: ERROR_LEGACY_WARNING
analyzerCode: FACTORY_REDIRECTS_TO_ABSTRACT_CLASS
- dart2jsCode: "*fatal*"
MissingImplementationNotAbstract:
template: |
@@ -1431,7 +1265,6 @@
- provide a 'noSuchMethod' implementation.
severity: ERROR_LEGACY_WARNING
analyzerCode: CONCRETE_CLASS_WITH_ABSTRACT_MEMBER
- dart2jsCode: "*fatal*"
script:
- "class C {foo();}"
@@ -1443,19 +1276,16 @@
template: "List literal requires exactly one type argument."
severity: ERROR_LEGACY_WARNING
analyzerCode: EXPECTED_ONE_LIST_TYPE_ARGUMENTS
- dart2jsCode: "*fatal*"
MapLiteralTypeArgumentMismatch:
template: "Map literal requires exactly two type arguments."
severity: ERROR_LEGACY_WARNING
analyzerCode: EXPECTED_TWO_MAP_TYPE_ARGUMENTS
- dart2jsCode: "*fatal*"
LoadLibraryTakesNoArguments:
template: "'loadLibrary' takes no arguments."
severity: ERROR_LEGACY_WARNING
analyzerCode: LOAD_LIBRARY_TAKES_NO_ARGUMENTS
- dart2jsCode: "*fatal*"
LoadLibraryHidesMember:
template: "The library '#uri' defines a top-level member named 'loadLibrary'. This member is hidden by the special member 'loadLibrary' that the language adds to support deferred loading."
@@ -1463,28 +1293,34 @@
severity: IGNORED
TypeArgumentMismatch:
- template: "'#name' expects #count type arguments."
+ template: "Expected #count type arguments."
severity: ERROR_LEGACY_WARNING
analyzerCode: WRONG_NUMBER_OF_TYPE_ARGUMENTS
- dart2jsCode: "*fatal*"
NotAType:
template: "'#name' isn't a type."
severity: ERROR_LEGACY_WARNING
analyzerCode: NOT_A_TYPE
- dart2jsCode: "*ignored*"
NotAPrefixInTypeAnnotation:
- template: "'#lexeme.#lexeme2' can't be used as a type because '#lexeme' doesn't refer to an import prefix."
+ template: "'#name.#name2' can't be used as a type because '#name' doesn't refer to an import prefix."
severity: ERROR_LEGACY_WARNING
analyzerCode: NOT_A_TYPE
- dart2jsCode: "*ignored*"
+ declaration:
+ - |
+ class C<T> {
+ T.String method() {}
+ }
+ - |
+ class C<T> {
+ T.String field;
+ }
UnresolvedPrefixInTypeAnnotation:
- template: "'#lexeme.#lexeme2' can't be used as a type because '#lexeme' isn't defined."
+ template: "'#name.#name2' can't be used as a type because '#name' isn't defined."
severity: ERROR_LEGACY_WARNING
analyzerCode: NOT_A_TYPE
- dart2jsCode: "*ignored*"
+ statement: "T.String x;"
FastaUsageShort:
template: |
@@ -1556,18 +1392,15 @@
NamedFunctionExpression:
template: "A function expression can't have a name."
analyzerCode: NAMED_FUNCTION_EXPRESSION
- dart2jsCode: "*ignored*"
NativeClauseShouldBeAnnotation:
template: "Native clause in this form is deprecated."
tip: "Try removing this native clause and adding @native() or @native('native-name') before the declaration."
analyzerCode: NATIVE_CLAUSE_SHOULD_BE_ANNOTATION
- dart2jsCode: "*fatal*"
ReturnTypeFunctionExpression:
template: "A function expression can't have a return type."
severity: ERROR_LEGACY_WARNING
- dart2jsCode: "*ignored*"
InternalProblemUnhandled:
template: "Unhandled #string in #string2."
@@ -1638,10 +1471,6 @@
template: "The URI '#uri' has no scheme."
severity: INTERNAL_PROBLEM
-InternalProblemMissingSeverity:
- template: "Message code missing severity: #string"
- severity: INTERNAL_PROBLEM
-
InternalProblemContextSeverity:
template: "Non-context message has context severity: #string"
severity: INTERNAL_PROBLEM
@@ -1676,44 +1505,37 @@
template: "Deferred imports should have a prefix."
tip: "Try adding a prefix to the import."
analyzerCode: MISSING_PREFIX_IN_DEFERRED_IMPORT
- dart2jsCode: "*fatal*"
DeferredAfterPrefix:
template: "The deferred keyword should come immediately before the prefix ('as' clause)."
tip: "Try moving the deferred keyword before the prefix."
analyzerCode: DEFERRED_AFTER_PREFIX
- dart2jsCode: "*fatal*"
DuplicateDeferred:
template: "An import directive can only have one 'deferred' keyword."
tip: "Try removing all but one 'deferred' keyword."
analyzerCode: DUPLICATE_DEFERRED
- dart2jsCode: "*fatal*"
DeferredTypeAnnotation:
template: "The type '#type' is deferred loaded via prefix '#name' and can't be used as a type annotation."
tip: "Try removing 'deferred' from the import of '#name' or use a supertype of '#type' that isn't deferred."
severity: ERROR_LEGACY_WARNING
analyzerCode: TYPE_ANNOTATION_DEFERRED_CLASS
- dart2jsCode: "*fatal*"
DuplicatePrefix:
template: "An import directive can only have one prefix ('as' clause)."
tip: "Try removing all but one prefix."
analyzerCode: DUPLICATE_PREFIX
- dart2jsCode: "*fatal*"
PrefixAfterCombinator:
template: "The prefix ('as' clause) should come before any show/hide combinators."
tip: "Try moving the prefix before the combinators."
analyzerCode: PREFIX_AFTER_COMBINATOR
- dart2jsCode: "*fatal*"
DuplicatedExport:
template: "'#name' is exported from both '#uri' and '#uri2'."
severity: IGNORED
analyzerCode: AMBIGUOUS_EXPORT
- dart2jsCode: "*ignored*"
DuplicatedExportInType:
template: "'#name' is exported from both '#uri' and '#uri2'."
@@ -1727,7 +1549,6 @@
template: "'#name' is imported from both '#uri' and '#uri2'."
severity: ERROR_LEGACY_WARNING
analyzerCode: AMBIGUOUS_IMPORT
- dart2jsCode: "*fatal*"
script:
lib1.dart: "class A {}"
lib2.dart: "class A {}"
@@ -1735,29 +1556,22 @@
CyclicClassHierarchy:
template: "'#name' is a supertype of itself via '#string'."
- severity: ERROR
analyzerCode: RECURSIVE_INTERFACE_INHERITANCE
- dart2jsCode: "*fatal*"
ExtendingEnum:
template: "'#name' is an enum and can't be extended or implemented."
- severity: ERROR
analyzerCode: EXTENDS_ENUM
- dart2jsCode: "*fatal*"
ExtendingRestricted:
template: "'#name' is restricted and can't be extended or implemented."
analyzerCode: EXTENDS_DISALLOWED_CLASS
- dart2jsCode: "*ignored*"
NoUnnamedConstructorInObject:
template: "'Object' has no unnamed constructor."
IllegalAsyncGeneratorReturnType:
template: "Functions marked 'async*' must have a return type assignable to 'Stream'."
- severity: ERROR
analyzerCode: ILLEGAL_ASYNC_GENERATOR_RETURN_TYPE
- dart2jsCode: "*fatal*"
script:
- >-
int g() async* {
@@ -1766,8 +1580,6 @@
IllegalAsyncGeneratorVoidReturnType:
template: "Functions marked 'async*' can't have return type 'void'."
- severity: ERROR
- dart2jsCode: "*fatal*"
script:
- >-
void g() async* {
@@ -1775,9 +1587,7 @@
IllegalAsyncReturnType:
template: "Functions marked 'async' must have a return type assignable to 'Future'."
- severity: ERROR
analyzerCode: ILLEGAL_ASYNC_RETURN_TYPE
- dart2jsCode: "*fatal*"
script:
- >-
int f() async {
@@ -1786,9 +1596,7 @@
IllegalSyncGeneratorReturnType:
template: "Functions marked 'sync*' must have a return type assignable to 'Iterable'."
- severity: ERROR
analyzerCode: ILLEGAL_SYNC_GENERATOR_RETURN_TYPE
- dart2jsCode: "*fatal*"
script:
- >-
int g() sync* {
@@ -1797,8 +1605,6 @@
IllegalSyncGeneratorVoidReturnType:
template: "Functions marked 'sync*' can't have return type 'void'."
- severity: ERROR
- dart2jsCode: "*fatal*"
script:
- >-
void g() sync* {
@@ -1807,7 +1613,6 @@
IllegalMixinDueToConstructors:
template: "Can't use '#name' as a mixin because it has constructors."
analyzerCode: MIXIN_DECLARES_CONSTRUCTOR
- dart2jsCode: "*fatal*"
IllegalMixinDueToConstructorsCause:
template: "This constructor prevents using '#name' as a mixin."
@@ -1815,43 +1620,32 @@
ConflictsWithConstructor:
template: "Conflicts with constructor '#name'."
- severity: ERROR
analyzerCode: CONFLICTS_WITH_CONSTRUCTOR
- dart2jsCode: "*fatal*"
ConflictsWithFactory:
template: "Conflicts with factory '#name'."
- severity: ERROR
ConflictsWithMember:
template: "Conflicts with member '#name'."
- severity: ERROR
analyzerCode: CONFLICTS_WITH_MEMBER
- dart2jsCode: "*fatal*"
ConflictsWithMemberWarning:
template: "Conflicts with member '#name'."
severity: ERROR_LEGACY_WARNING
analyzerCode: CONFLICTS_WITH_MEMBER
- dart2jsCode: "*fatal*"
ConflictsWithSetter:
template: "Conflicts with setter '#name'."
- severity: ERROR
analyzerCode: CONFLICTS_WITH_MEMBER
- dart2jsCode: "*fatal*"
ConflictsWithSetterWarning:
template: "Conflicts with setter '#name'."
severity: ERROR_LEGACY_WARNING
analyzerCode: CONFLICTS_WITH_MEMBER
- dart2jsCode: "*fatal*"
ConflictsWithTypeVariable:
template: "Conflicts with type variable '#name'."
- severity: ERROR
analyzerCode: CONFLICTING_TYPE_VARIABLE_AND_MEMBER
- dart2jsCode: "*fatal*"
ConflictsWithTypeVariableCause:
template: "This is the type variable."
@@ -1861,7 +1655,6 @@
template: "Can't declare a member that conflicts with an inherited one."
severity: ERROR_LEGACY_WARNING
analyzerCode: DECLARED_MEMBER_CONFLICTS_WITH_INHERITED
- dart2jsCode: "*fatal*"
script:
- >-
class A {
@@ -1900,7 +1693,6 @@
template: "Can't inherit members that conflict with each other."
severity: ERROR_LEGACY_WARNING
analyzerCode: CONFLICTS_WITH_INHERITED_MEMBER
- dart2jsCode: "*fatal*"
script:
- >-
class A {
@@ -1909,7 +1701,7 @@
abstract class B {
get foo;
}
- class C extends A implements B {}
+ abstract class C extends A implements B {}
- >-
class A {
var foo;
@@ -1917,7 +1709,7 @@
abstract class B {
foo();
}
- class C extends A implements B {}
+ abstract class C extends A implements B {}
- >-
class A {
get foo => 0;
@@ -1925,7 +1717,7 @@
abstract class B {
foo();
}
- class C extends A implements B {}
+ abstract class C extends A implements B {}
InheritedMembersConflictCause1:
template: "This is one inherited member."
@@ -1938,13 +1730,11 @@
IllegalMixin:
template: "The type '#name' can't be mixed in."
analyzerCode: ILLEGAL_MIXIN
- dart2jsCode: "*fatal*"
OverrideTypeVariablesMismatch:
template: "Declared type variables of '#name' doesn't match those on overridden method '#name2'."
severity: ERROR_LEGACY_WARNING
analyzerCode: INVALID_METHOD_OVERRIDE_TYPE_PARAMETERS
- dart2jsCode: "*fatal*"
OverriddenMethodCause:
template: "This is the overriden method ('#name')."
@@ -1954,37 +1744,31 @@
template: "The method '#name' doesn't have the named parameter '#name2' of overriden method '#name3'."
severity: ERROR_LEGACY_WARNING
analyzerCode: INVALID_OVERRIDE_NAMED
- dart2jsCode: "*fatal*"
OverrideFewerNamedArguments:
template: "The method '#name' has fewer named arguments than those of overridden method '#name2'."
severity: ERROR_LEGACY_WARNING
analyzerCode: INVALID_OVERRIDE_NAMED
- dart2jsCode: "*fatal*"
OverrideFewerPositionalArguments:
template: "The method '#name' has fewer positional arguments than those of overridden method '#name2'."
severity: ERROR_LEGACY_WARNING
analyzerCode: INVALID_OVERRIDE_POSITIONAL
- dart2jsCode: "*fatal*"
OverrideMoreRequiredArguments:
template: "The method '#name' has more required arguments than those of overridden method '#name2'."
severity: ERROR_LEGACY_WARNING
analyzerCode: INVALID_OVERRIDE_REQUIRED
- dart2jsCode: "*fatal*"
OverrideTypeMismatchParameter:
template: "The parameter '#name' of the method '#name2' has type #type, which does not match the corresponding type in the overridden method (#type2)."
tip: "Change to a supertype of #type2 (or, for a covariant parameter, a subtype)."
analyzerCode: INVALID_METHOD_OVERRIDE
- dart2jsCode: "*ignored*"
OverrideTypeMismatchReturnType:
template: "The return type of the method '#name' is #type, which does not match the return type of the overridden method (#type2)."
tip: "Change to a subtype of #type2."
analyzerCode: INVALID_METHOD_OVERRIDE
- dart2jsCode: "*ignored*"
PartOfSelf:
template: "A file can't be a part of itself."
@@ -1995,7 +1779,6 @@
TypeVariableDuplicatedName:
template: "A type variable can't have the same name as another."
analyzerCode: DUPLICATE_DEFINITION
- dart2jsCode: "*fatal*"
TypeVariableDuplicatedNameCause:
template: "The other type variable named '#name'."
@@ -2004,20 +1787,17 @@
TypeVariableSameNameAsEnclosing:
template: "A type variable can't have the same name as its enclosing declaration."
analyzerCode: CONFLICTING_TYPE_VARIABLE_AND_CLASS
- dart2jsCode: "*fatal*"
ExpectedEnumBody:
template: "Expected a enum body, but got '#lexeme'."
tip: "An enum definition must have a body with at least one constant name."
analyzerCode: MISSING_ENUM_BODY
- dart2jsCode: "*fatal*"
script:
- "enum E"
EnumDeclarationEmpty:
template: "An enum declaration can't be empty."
analyzerCode: EMPTY_ENUM_BODY
- dart2jsCode: "*ignored*"
script:
- "enum E {}"
@@ -2025,7 +1805,6 @@
template: "Classes can't be declared to be 'external'."
tip: "Try removing the keyword 'external'."
analyzerCode: EXTERNAL_CLASS
- dart2jsCode: "*ignored*"
script:
- "external class C {}"
@@ -2033,7 +1812,6 @@
template: "Enums can't be declared to be 'external'."
tip: "Try removing the keyword 'external'."
analyzerCode: EXTERNAL_ENUM
- dart2jsCode: "*ignored*"
script:
- "external enum E {ONE}"
@@ -2041,7 +1819,6 @@
# TODO(danrubel): remove reference to `native` once support has been removed
template: "An external or native method can't have a body."
analyzerCode: EXTERNAL_METHOD_WITH_BODY
- dart2jsCode: "*ignored*"
script:
- "class C {external foo() {}}"
- "class C {foo() native {}}"
@@ -2051,7 +1828,6 @@
template: "Typedefs can't be declared to be 'external'."
tip: "Try removing the keyword 'external'."
analyzerCode: EXTERNAL_TYPEDEF
- dart2jsCode: "*ignored*"
script:
- "external typedef F();"
@@ -2061,18 +1837,15 @@
PlatformPrivateLibraryAccess:
template: "Can't access platform private library."
analyzerCode: IMPORT_INTERNAL_LIBRARY
- dart2jsCode: "*fatal*"
TypedefNotFunction:
template: "Can't create typedef from non-function type."
analyzerCode: INVALID_GENERIC_FUNCTION_TYPE
- dart2jsCode: "*fatal*"
LibraryDirectiveNotFirst:
template: "The library directive must appear before all other directives."
tip: "Try moving the library directive before any other directives."
analyzerCode: LIBRARY_DIRECTIVE_NOT_FIRST
- dart2jsCode: "*ignored*"
script:
- "class Foo{} library l;"
- "import 'x.dart'; library l;"
@@ -2082,7 +1855,6 @@
template: "Import directives must preceed part directives."
tip: "Try moving the import directives before the part directives."
analyzerCode: IMPORT_DIRECTIVE_AFTER_PART_DIRECTIVE
- dart2jsCode: "*ignored*"
script:
- "part 'foo.dart'; import 'bar.dart';"
@@ -2090,7 +1862,6 @@
template: "Export directives must preceed part directives."
tip: "Try moving the export directives before the part directives."
analyzerCode: EXPORT_DIRECTIVE_AFTER_PART_DIRECTIVE
- dart2jsCode: "*ignored*"
script:
- "part 'foo.dart'; export 'bar.dart';"
@@ -2098,7 +1869,6 @@
template: "Directives must appear before any declarations."
tip: "Try moving the directive before any declarations."
analyzerCode: DIRECTIVE_AFTER_DECLARATION
- dart2jsCode: "*ignored*"
script:
- "class foo { } import 'bar.dart';"
- "class foo { } export 'bar.dart';"
@@ -2107,7 +1877,6 @@
template: "The part-of directive must be the only directive in a part."
tip: "Try removing the other directives, or moving them to the library for which this is a part."
analyzerCode: NON_PART_OF_DIRECTIVE_IN_PART
- dart2jsCode: "*ignored*"
script:
- "part of l; part 'f.dart';"
@@ -2115,7 +1884,6 @@
template: "Only one part-of directive may be declared in a file."
tip: "Try removing all but one of the part-of directives."
analyzerCode: MULTIPLE_PART_OF_DIRECTIVES
- dart2jsCode: "*ignored*"
script:
- "part of l; part of m;"
@@ -2129,9 +1897,7 @@
PartOfTwoLibraries:
template: "A file can't be part of more than one library."
tip: "Try moving the shared declarations into the libraries, or into a new library."
- severity: ERROR
analyzerCode: PART_OF_DIFFERENT_LIBRARY
- dart2jsCode: "*fatal*"
script:
main.dart: "library lib; import 'lib.dart'; part 'part.dart';"
lib.dart: "library lib; part 'part.dart';"
@@ -2145,7 +1911,6 @@
template: "Top-level declarations can't be declared to be 'factory'."
tip: "Try removing the keyword 'factory'."
analyzerCode: FACTORY_TOP_LEVEL_DECLARATION
- dart2jsCode: "*fatal*"
script:
- "factory class C {}"
@@ -2153,7 +1918,6 @@
template: "Only factory constructor can specify '=' redirection."
tip: "Try making this a factory constructor, or remove the redirection."
analyzerCode: REDIRECTION_IN_NON_FACTORY_CONSTRUCTOR
- dart2jsCode: "*fatal*"
script:
- "class C { C() = D; }"
@@ -2161,7 +1925,6 @@
template: "Operators must be declared within a class."
tip: "Try removing the operator, moving it to a class, or converting it to be a function."
analyzerCode: TOP_LEVEL_OPERATOR
- dart2jsCode: "*fatal*"
script:
- "operator +(bool x, bool y) => x | y;"
- "bool operator +(bool x, bool y) => x | y;"
@@ -2171,7 +1934,6 @@
template: "A function declaration needs an explicit list of parameters."
tip: "Try adding a parameter list to the function declaration."
analyzerCode: MISSING_FUNCTION_PARAMETERS
- dart2jsCode: "*fatal*"
script:
- "void f {}"
@@ -2179,7 +1941,6 @@
template: "A method declaration needs an explicit list of parameters."
tip: "Try adding a parameter list to the method declaration."
analyzerCode: MISSING_METHOD_PARAMETERS
- dart2jsCode: "*fatal*"
script:
- "class C { void m {} }"
@@ -2187,7 +1948,6 @@
template: "A typedef needs an explicit list of parameters."
tip: "Try adding a parameter list to the typedef."
analyzerCode: MISSING_TYPEDEF_PARAMETERS
- dart2jsCode: "*fatal*"
script:
- "typedef void F;"
@@ -2198,13 +1958,20 @@
part.dart: ""
main.dart: "part 'part.dart';"
+PartOfInLibrary:
+ template: "Can't import '#uri', because it has a 'part of' declaration."
+ tip: "Try removing the 'part of' declaration, or using '#uri' as a part."
+ analyzerCode: IMPORT_OF_NON_LIBRARY
+ script:
+ part.dart: "part of mainlib;"
+ main.dart: "library mainlib; import 'part.dart';"
+
SupertypeIsFunction:
template: "Can't use a function type as supertype."
DeferredPrefixDuplicated:
template: "Can't use the name '#name' for a deferred library, as the name is used elsewhere."
analyzerCode: SHARED_DEFERRED_PREFIX
- dart2jsCode: "*fatal*"
DeferredPrefixDuplicatedCause:
template: "'#name' is used here."
@@ -2215,7 +1982,6 @@
tip: "Try removing the type arguments."
severity: ERROR_LEGACY_WARNING
analyzerCode: TYPE_ARGUMENTS_ON_TYPE_VARIABLE
- dart2jsCode: "*fatal*"
script:
- "dynamic<T>(x) => 0"
@@ -2224,9 +1990,7 @@
DuplicatedName:
template: "'#name' is already declared in this scope."
- severity: ERROR
analyzerCode: DUPLICATE_DEFINITION
- dart2jsCode: "*fatal*"
DuplicatedNameCause:
template: "Previous declaration of '#name'."
@@ -2234,9 +1998,7 @@
DuplicatedNamePreviouslyUsed:
template: "Can't declare '#name' because it was already used in this scope."
- severity: ERROR
analyzerCode: REFERENCED_BEFORE_DECLARATION
- dart2jsCode: "*ignored*"
script:
- "main(arguments) { arguments; var arguments; }"
@@ -2246,15 +2008,11 @@
DuplicatedNamedArgument:
template: "Duplicated named argument '#name'."
- severity: ERROR
analyzerCode: DUPLICATE_NAMED_ARGUMENT
- dart2jsCode: "*fatal*"
DuplicatedParameterName:
template: "Duplicated parameter name '#name'."
- severity: ERROR
analyzerCode: DUPLICATE_DEFINITION
- dart2jsCode: "*fatal*"
DuplicatedParameterNameCause:
template: "Other parameter named '#name'."
@@ -2266,20 +2024,17 @@
EnumConstantSameNameAsEnclosing:
template: "Name of enum constant '#name' can't be the same as the enum's own name."
analyzerCode: ENUM_CONSTANT_WITH_ENUM_NAME
- dart2jsCode: "*fatal*"
MissingOperatorKeyword:
template: "Operator declarations must be preceeded by the keyword 'operator'."
tip: "Try adding the keyword 'operator'."
analyzerCode: MISSING_KEYWORD_OPERATOR
- dart2jsCode: "*fatal*"
script:
- "class C { +(x) {} }"
InvalidOperator:
template: "The string '#lexeme' isn't a user-definable operator."
analyzerCode: INVALID_OPERATOR
- dart2jsCode: "*fatal*"
script:
- "class C { void operator %=(x) {} }"
@@ -2289,12 +2044,10 @@
OperatorParameterMismatch1:
template: "Operator '#name' should have exactly one parameter."
analyzerCode: WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR
- dart2jsCode: "*fatal*"
OperatorParameterMismatch2:
template: "Operator '#name' should have exactly two parameters."
analyzerCode: WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR
- dart2jsCode: "*fatal*"
OperatorMinusParameterMismatch:
template: "Operator '#name' should have zero or one parameter."
@@ -2302,19 +2055,14 @@
With zero parameters, it has the syntactic form '-a', formally known as 'unary-'.
With one parameter, it has the syntactic form 'a - b', formally known as '-'.
analyzerCode: WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR_MINUS
- dart2jsCode: "*fatal*"
SupertypeIsIllegal:
template: "The type '#name' can't be used as supertype."
- severity: ERROR
analyzerCode: EXTENDS_NON_CLASS
- dart2jsCode: "*fatal*"
SupertypeIsTypeVariable:
template: "The type variable '#name' can't be used as supertype."
- severity: ERROR
analyzerCode: EXTENDS_NON_CLASS
- dart2jsCode: "*fatal*"
PartOfLibraryNameMismatch:
template: "Using '#uri' as part of '#name' but its 'part of' declaration says '#name2'."
@@ -2335,7 +2083,6 @@
MissingMain:
template: "No 'main' method found."
tip: "Try adding a method named 'main' to your program."
- dart2jsCode: MISSING_MAIN
MissingInput:
template: "No input file provided to the compiler."
@@ -2356,35 +2103,43 @@
ThisAccessInFieldInitializer:
template: "Can't access 'this' in a field initializer to read '#name'."
analyzerCode: THIS_ACCESS_FROM_INITIALIZER
- dart2jsCode: "*fatal*"
ThisOrSuperAccessInFieldInitializer:
template: "Can't access '#string' in a field initializer."
analyzerCode: THIS_ACCESS_FROM_INITIALIZER
- dart2jsCode: "*fatal*"
ThisAsIdentifier:
template: "Expected identifier, but got 'this'."
- severity: ERROR
analyzerCode: INVALID_REFERENCE_TO_THIS
- dart2jsCode: "*fatal*"
SuperAsIdentifier:
template: "Expected identifier, but got 'super'."
analyzerCode: SUPER_AS_EXPRESSION
- dart2jsCode: "*fatal*"
SuperAsExpression:
template: "Can't use 'super' as an expression."
tip: "To delegate a constructor to a super constructor, put the super call as an initializer."
analyzerCode: SUPER_AS_EXPRESSION
- dart2jsCode: "*fatal*"
+
+SwitchExpressionNotAssignable:
+ template: "Type '#type' of the switch expression isn't assignable to the type '#type2' of this case expression."
+ analyzerCode: SWITCH_EXPRESSION_NOT_ASSIGNABLE
+ script:
+ - >-
+ void f() {
+ switch (42) {
+ case "foo": break;
+ }
+ }
+
+SwitchExpressionNotAssignableCause:
+ template: "The switch expression is here."
+ severity: CONTEXT
SwitchHasCaseAfterDefault:
template: "The default case should be the last case in a switch statement."
tip: "Try moving the default case after the other case clauses."
analyzerCode: SWITCH_HAS_CASE_AFTER_DEFAULT_CASE
- dart2jsCode: "*fatal*"
script:
- "class C { foo(int a) {switch (a) {default: return 0; case 1: return 1;}} }"
@@ -2392,7 +2147,6 @@
template: "The 'default' case can only be declared once."
tip: "Try removing all but one default case."
analyzerCode: SWITCH_HAS_MULTIPLE_DEFAULT_CASES
- dart2jsCode: "*fatal*"
script:
- "class C { foo(int a) {switch (a) {default: return 0; default: return 1;}} }"
@@ -2400,29 +2154,43 @@
template: "Switch case may fall through to the next case."
severity: ERROR_LEGACY_WARNING
analyzerCode: CASE_BLOCK_NOT_TERMINATED
- dart2jsCode: "*fatal*"
FinalInstanceVariableAlreadyInitialized:
template: "'#name' is a final instance variable that has already been initialized."
severity: ERROR_LEGACY_WARNING
analyzerCode: FINAL_INITIALIZED_MULTIPLE_TIMES
- dart2jsCode: "*fatal*"
FinalInstanceVariableAlreadyInitializedCause:
template: "'#name' was initialized here."
severity: CONTEXT
-TypeVariableInConstExpression:
- template: "Type variable '#name' can't be used as a constant expression '#type'."
- severity: ERROR
- analyzerCode: TYPE_PARAMETER_IN_CONST_EXPRESSION
- dart2jsCode: "*fatal*"
-
TypeVariableInStaticContext:
template: "Type variables can't be used in static members."
severity: ERROR_LEGACY_WARNING
analyzerCode: TYPE_PARAMETER_REFERENCED_BY_STATIC
- dart2jsCode: "*fatal*"
+
+TypeVariableInConstantContext:
+ template: "Type variables can't be used as constants."
+ analyzerCode: TYPE_PARAMETER_IN_CONST_EXPRESSION
+ declaration:
+ - |
+ class C<T> {
+ instanceMethod() {
+ return const <Object>[T];
+ }
+ }
+ - |
+ class C<T> {
+ instanceMethod() {
+ return const <T>[null];
+ }
+ }
+ - |
+ class C<T> {
+ instanceMethod() {
+ return const <List<T>>[null];
+ }
+ }
SuperclassMethodArgumentMismatch:
template: "Superclass doesn't have a method named '#name' with matching arguments."
@@ -2442,17 +2210,14 @@
template: "Superclass has no method named '#name'."
severity: ERROR_LEGACY_WARNING
analyzerCode: UNDEFINED_SUPER_METHOD
- dart2jsCode: "*ignored*"
SuperclassHasNoDefaultConstructor:
template: "The superclass, '#name', has no unnamed constructor that takes no arguments."
analyzerCode: NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT
- dart2jsCode: "*ignored*"
ConstConstructorNonFinalField:
template: "Constructor is marked 'const' so all fields must be final."
analyzerCode: CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD
- dart2jsCode: "*fatal*"
ConstConstructorNonFinalFieldCause:
template: "Field isn't final, but constructor is 'const'."
@@ -2460,14 +2225,10 @@
ConstConstructorInSubclassOfMixinApplication:
template: "Can't extend a mixin application and be 'const'."
- severity: ERROR
analyzerCode: CONST_CONSTRUCTOR_IN_SUBCLASS_OF_MIXIN_APPLICATION
- dart2jsCode: "*fatal*"
ConstConstructorRedirectionToNonConst:
template: "A constant constructor can't call a non-constant constructor."
- severity: ERROR
- dart2jsCode: "*fatal*"
script:
- >-
class A {
@@ -2484,7 +2245,6 @@
ExpectedAnInitializer:
template: "Expected an initializer."
analyzerCode: MISSING_INITIALIZER
- dart2jsCode: "*fatal*"
script:
- "class C { C() : {} }"
@@ -2492,7 +2252,6 @@
template: "Expected an assignment after the field name."
tip: "To initialize a field, use the syntax 'name = value'."
analyzerCode: MISSING_ASSIGNMENT_IN_INITIALIZER
- dart2jsCode: "*fatal*"
script:
- "class C { C() : x(3) {} }"
@@ -2500,29 +2259,24 @@
template: "Redirecting constructors can't have a body."
tip: "Try removing the body, or not making this a redirecting constructor."
analyzerCode: REDIRECTING_CONSTRUCTOR_WITH_BODY
- dart2jsCode: "*fatal*"
script:
- "class C { C() : this.x() {} }"
CannotAssignToParenthesizedExpression:
template: "Can't assign to a parenthesized expression."
analyzerCode: ASSIGNMENT_TO_PARENTHESIZED_EXPRESSION
- dart2jsCode: "*fatal*"
NotAnLvalue:
template: "Can't assign to this."
analyzerCode: NOT_AN_LVALUE
- dart2jsCode: "*fatal*"
CannotAssignToSuper:
template: "Can't assign to super."
analyzerCode: NOT_AN_LVALUE
- dart2jsCode: "*fatal*"
IllegalAssignmentToNonAssignable:
template: "Illegal assignment to non-assignable expression."
analyzerCode: ILLEGAL_ASSIGNMENT_TO_NON_ASSIGNABLE
- dart2jsCode: "*fatal*"
script:
- "main(){ f()++; }"
@@ -2530,7 +2284,6 @@
template: "Missing selector such as '.<identifier>' or '[0]'."
tip: "Try adding a selector."
analyzerCode: MISSING_ASSIGNABLE_SELECTOR
- dart2jsCode: "*fatal*"
script:
- "main(){ ++f(); }"
@@ -2563,37 +2316,31 @@
InterpolationInUri:
template: "Can't use string interpolation in a URI."
analyzerCode: INVALID_LITERAL_IN_CONFIGURATION
- dart2jsCode: "*fatal*"
IntegerLiteralIsOutOfRange:
template: "The integer literal #lexeme can't be represented in 64 bits."
tip: "Try using the BigInt class if you need an integer larger than 9,223,372,036,854,775,807 or less than -9,223,372,036,854,775,808."
analyzerCode: INTEGER_LITERAL_OUT_OF_RANGE
- dart2jsCode: "*fatal*"
ColonInPlaceOfIn:
template: "For-in loops use 'in' rather than a colon."
tip: "Try replacing the colon with the keyword 'in'."
analyzerCode: COLON_IN_PLACE_OF_IN
- dart2jsCode: "*fatal*"
ExternalFactoryRedirection:
template: "A redirecting factory can't be external."
tip: "Try removing the 'external' modifier."
analyzerCode: EXTERNAL_CONSTRUCTOR_WITH_BODY
- dart2jsCode: "*ignored*"
ArgumentTypeNotAssignable:
template: "The argument type '#type' can't be assigned to the parameter type '#type2'."
tip: "Try changing the type of the parameter, or casting the argument to '#type2'."
analyzerCode: ARGUMENT_TYPE_NOT_ASSIGNABLE
- dart2jsCode: "*ignored*"
InvalidAssignment:
template: "A value of type '#type' can't be assigned to a variable of type '#type2'."
tip: "Try changing the type of the left hand side, or casting the right hand side to '#type2'."
analyzerCode: INVALID_ASSIGNMENT
- dart2jsCode: "*ignored*"
script: >
main() {
int i;
@@ -2626,60 +2373,50 @@
template: "The function expression type '#type' isn't of expected type '#type2'."
tip: "Change the type of the function expression or the context in which it is used."
analyzerCode: INVALID_CAST_FUNCTION_EXPR
- dart2jsCode: "*ignored*"
InvalidCastLiteralList:
template: "The list literal type '#type' isn't of expected type '#type2'."
tip: "Change the type of the list literal or the context in which it is used."
analyzerCode: INVALID_CAST_LITERAL_LIST
- dart2jsCode: "*ignored*"
InvalidCastLiteralMap:
template: "The map literal type '#type' isn't of expected type '#type2'."
tip: "Change the type of the map literal or the context in which it is used."
analyzerCode: INVALID_CAST_LITERAL_MAP
- dart2jsCode: "*ignored*"
InvalidCastLocalFunction:
template: "The local function has type '#type' that isn't of expected type '#type2'."
tip: "Change the type of the function or the context in which it is used."
analyzerCode: INVALID_CAST_FUNCTION
- dart2jsCode: "*ignored*"
InvalidCastNewExpr:
template: "The constructor returns type '#type' that isn't of expected type '#type2'."
tip: "Change the type of the object being constructed or the context in which it is used."
analyzerCode: INVALID_CAST_NEW_EXPR
- dart2jsCode: "*ignored*"
InvalidCastStaticMethod:
template: "The static method has type '#type' that isn't of expected type '#type2'."
tip: "Change the type of the method or the context in which it is used."
analyzerCode: INVALID_CAST_METHOD
- dart2jsCode: "*ignored*"
InvalidCastTopLevelFunction:
template: "The top level function has type '#type' that isn't of expected type '#type2'."
tip: "Change the type of the function or the context in which it is used."
analyzerCode: INVALID_CAST_FUNCTION
- dart2jsCode: "*ignored*"
InvalidCatchArguments:
template: "Invalid catch arguments."
analyzerCode: INVALID_CATCH_ARGUMENTS
- dart2jsCode: "*fatal*"
InvalidUseOfNullAwareAccess:
template: "Cannot use '?.' here."
tip: "Try using '.'."
analyzerCode: INVALID_USE_OF_NULL_AWARE_ACCESS
- dart2jsCode: "*fatal*"
UndefinedGetter:
template: "The getter '#name' isn't defined for the class '#type'."
tip: "Try correcting the name to the name of an existing getter, or defining a getter or field named '#name'."
analyzerCode: UNDEFINED_GETTER
- dart2jsCode: "*ignored*"
script: >
class C {}
main() {
@@ -2691,7 +2428,6 @@
template: "The setter '#name' isn't defined for the class '#type'."
tip: "Try correcting the name to the name of an existing setter, or defining a setter or field named '#name'."
analyzerCode: UNDEFINED_SETTER
- dart2jsCode: "*ignored*"
script: >
class C {}
main() {
@@ -2703,7 +2439,6 @@
template: "The method '#name' isn't defined for the class '#type'."
tip: "Try correcting the name to the name of an existing method, or defining a method named '#name'."
analyzerCode: UNDEFINED_METHOD
- dart2jsCode: "*ignored*"
script: >
class C {}
main() {
@@ -2732,77 +2467,60 @@
CantInferTypeDueToInconsistentOverrides:
template: "Can't infer the type of '#string': overridden members must all have the same type."
tip: "Specify the type explicitly."
- severity: ERROR
analyzerCode: INVALID_METHOD_OVERRIDE
- dart2jsCode: "*fatal*"
CantInferTypeDueToCircularity:
template: "Can't infer the type of '#string': circularity found during type inference."
tip: "Specify the type explicitly."
analyzerCode: RECURSIVE_COMPILE_TIME_CONSTANT
- severity: ERROR
AmbiguousSupertypes:
template: "'#name' can't implement both '#type' and '#type2'"
- severity: ERROR
analyzerCode: AMBIGUOUS_SUPERTYPES
- dart2jsCode: "*fatal*"
CantUseSuperBoundedTypeForInstanceCreation:
template: "Can't use a super-bounded type for instance creation. Got '#type'."
tip: "Specify a regular-bounded type instead of the super-bounded type. Note that the latter may be due to type inference."
- severity: ERROR
MixinInferenceNoMatchingClass:
template: "Type parameters could not be inferred for the mixin '#name' because '#name2' does not implement the mixin's supertype constraint '#type'."
- severity: ERROR
analyzerCode: MIXIN_INFERENCE_NO_POSSIBLE_SUBSTITUTION
- dart2jsCode: "*fatal*"
ImplicitCallOfNonMethod:
template: "Cannot invoke an instance of '#type' because it declares 'call' to be something other than a method."
tip: "Try changing 'call' to a method or explicitly invoke 'call'."
- severity: ERROR
analyzerCode: IMPLICIT_CALL_OF_NON_METHOD
- dart2jsCode: "*fatal*"
ExpectedOneExpression:
template: "Expected one expression, but found additional input."
- severity: ERROR
ForInLoopNotAssignable:
template: "Can't assign to this, so it can't be used in a for-in loop."
- severity: ERROR
statement: "for (1 in []) {}"
ForInLoopExactlyOneVariable:
template: "A for-in loop can't have more than one loop variable."
- severity: ERROR
statement: "for (var x, y in []) {}"
ForInLoopWithConstVariable:
template: "A for-in loop-variable can't be 'const'."
tip: "Try removing the 'const' modifier."
analyzerCode: FOR_IN_WITH_CONST_VARIABLE
- dart2jsCode: "*fatal*"
ForInLoopElementTypeNotAssignable:
template: "A value of type '#type' can't be assigned to a variable of type '#type2'."
tip: "Try changing the type of the variable."
analyzerCode: FOR_IN_OF_INVALID_ELEMENT_TYPE
- dart2jsCode: "*fatal*"
ForInLoopTypeNotIterable:
template: "The type '#type' used in the 'for' loop must implement '#type2'."
analyzerCode: FOR_IN_OF_INVALID_TYPE
- dart2jsCode: "*fatal*"
InitializingFormalTypeMismatch:
template: "The type of parameter '#name' (#type) is not a subtype of the corresponding field's type (#type2)."
tip: "Try changing the type of parameter '#name' to a subtype of #type2."
severity: ERROR_LEGACY_WARNING
analyzerCode: INVALID_PARAMETER_DECLARATION
- dart2jsCode: "*fatal*"
script: >
class C {
int x;
@@ -2836,15 +2554,11 @@
WebLiteralCannotBeRepresentedExactly:
template: "The integer literal #string can't be represented exactly in JavaScript."
tip: "Try changing the literal to something that can be represented in Javascript. In Javascript #string2 is the nearest value that can be represented exactly."
- severity: ERROR
- dart2jsCode: "*fatal*"
BoundIssueViaRawTypeWithNonSimpleBounds:
template: "Generic type '#name' can't be used without type arguments in a type variable bound."
tip: "Try providing type arguments to '#name' here."
- severity: ERROR
analyzerCode: NOT_INSTANTIATED_BOUND
- dart2jsCode: "*fatal*"
script: >
class Hest<X extends Hest<X>> {}
class Fisk<Y extends Hest> {}
@@ -2856,18 +2570,14 @@
BoundIssueViaLoopNonSimplicity:
template: "Generic type '#name' can't be used without type arguments in the bounds of its own type variables."
tip: "Try providing type arguments to '#name' here."
- severity: ERROR
analyzerCode: NOT_INSTANTIATED_BOUND
- dart2jsCode: "*fatal*"
script: >
class Hest<X extends Hest> {}
BoundIssueViaCycleNonSimplicity:
template: "Generic type '#name' can't be used without type arguments in the bounds of its own type variables. It is referenced indirectly through '#name2'."
tip: "Try providing type arguments to '#name2' here or to some other raw types in the bounds along the reference chain."
- severity: ERROR
analyzerCode: NOT_INSTANTIATED_BOUND
- dart2jsCode: "*fatal*"
script: >
class Hest<X extends Fisk> {}
class Fisk<Y extends Hest> {}
@@ -2876,11 +2586,16 @@
template: "Bound of this variable references raw type '#name'."
severity: CONTEXT
+CycleInTypeVariables:
+ template: "Type '#name' is a bound of itself via '#string'."
+ tip: "Try breaking the cycle by removing at least on of the 'extends' clauses in the cycle."
+ analyzerCode: TYPE_PARAMETER_SUPERTYPE_OF_ITS_BOUND
+ script:
+ - "foo<A extends A>() {}"
+
CantUsePrefixAsExpression:
template: "A prefix can't be used as an expression."
- severity: ERROR
analyzerCode: PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT
- dart2jsCode: "*fatal*"
script: |
import "dart:core" as prefix;
@@ -2891,9 +2606,7 @@
CantUsePrefixWithNullAware:
template: "A prefix can't be used with null-aware operators."
tip: "It should be safe to remove the '?' as a prefix is never null."
- severity: ERROR
analyzerCode: PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT
- dart2jsCode: "*fatal*"
script: |
import "dart:core" as prefix;
@@ -2909,8 +2622,6 @@
Try moving the constant from the deferred library, or removing 'deferred'
from the import.
analyzerCode: CONST_DEFERRED_CLASS
- dart2jsCode: "*fatal*"
- severity: ERROR
script: |
import "dart:core" deferred as prefix;
@@ -2921,8 +2632,6 @@
CyclicRedirectingFactoryConstructors:
template: "Cyclic definition of factory '#name'."
analyzerCode: RECURSIVE_FACTORY_REDIRECT
- dart2jsCode: "*fatal*"
- severity: ERROR
script: |
class Foo {
factory Foo.foo() = Foo.bar;
@@ -2933,16 +2642,12 @@
GenericFunctionTypeInBound:
template: "Type variables can't have generic function types in their bounds."
analyzerCode: GENERIC_FUNCTION_TYPE_CANNOT_BE_BOUND
- dart2jsCode: "*fatal*"
- severity: ERROR
script: |
class Hest<X extends Y Function<Y>(Y)> {}
VoidExpression:
template: "This expression has type 'void' and can't be used."
- severity: WARNING
analyzerCode: USE_OF_VOID_RESULT
- dart2jsCode: "*fatal*"
statement: |
{
void x;
@@ -2951,12 +2656,45 @@
ReturnFromVoidFunction:
template: "Can't return a value from a void function."
- severity: WARNING
analyzerCode: RETURN_OF_INVALID_TYPE
- dart2jsCode: "*fatal*"
declaration: "void foo() { return 1; }"
+ReturnWithoutExpression:
+ template: "Must explicitly return a value from a non-void function."
+ severity: WARNING
+ analyzerCode: RETURN_WITHOUT_VALUE
+ declaration: "int foo() { return; }"
+
RethrowNotCatch:
template: "'rethrow' can only be used in catch clauses."
analyzerCode: RETHROW_OUTSIDE_CATCH
- dart2jsCode: "*fatal*"
+
+InvokeNonFunction:
+ template: "'#name' isn't a function or method and can't be invoked."
+ analyzerCode: INVOCATION_OF_NON_FUNCTION
+ script: |
+ class Foo {
+ int f;
+ }
+ main() {
+ Foo foo = new Foo();
+ foo.f();
+ }
+
+ConstInstanceField:
+ template: "Only static fields can be declared as const."
+ tip: "Try using 'final' instead of 'const', or adding the keyword 'static'."
+ analyzerCode: CONST_INSTANCE_FIELD
+ script:
+ - "class C { const field = 0; }"
+
+DefaultValueInRedirectingFactoryConstructor:
+ template: "Can't have a default value here because any default values of '#name' would be used instead."
+ tip: "Try removing the default value."
+ analyzerCode: DEFAULT_VALUE_IN_REDIRECTING_FACTORY_CONSTRUCTOR
+ script:
+ - >-
+ class A {
+ factory A.f({int x = 42}) = A.g;
+ A.g() {}
+ }
diff --git a/pkg/front_end/test/fasta/generator_to_string_test.dart b/pkg/front_end/test/fasta/generator_to_string_test.dart
index 9de0d3f..4beec7d 100644
--- a/pkg/front_end/test/fasta/generator_to_string_test.dart
+++ b/pkg/front_end/test/fasta/generator_to_string_test.dart
@@ -182,17 +182,17 @@
" getter: $uri::myGetter, setter: $uri::mySetter,"
" receiverVariable: null, indexVariable: null)",
new KernelIndexedAccessGenerator.internal(
- helper, token, token, expression, index, getter, setter));
+ helper, token, expression, index, getter, setter));
check(
"ThisIndexedAccessGenerator(offset: 4, index: index,"
" getter: $uri::myGetter, setter: $uri::mySetter, indexVariable: null)",
new KernelThisIndexedAccessGenerator(
- helper, token, token, index, getter, setter));
+ helper, token, index, getter, setter));
check(
"SuperIndexedAccessGenerator(offset: 4, index: index,"
" getter: $uri::myGetter, setter: $uri::mySetter, indexVariable: null)",
new KernelSuperIndexedAccessGenerator(
- helper, token, token, index, getter, setter));
+ helper, token, index, getter, setter));
check(
"StaticAccessGenerator(offset: 4, readTarget: $uri::myGetter,"
" writeTarget: $uri::mySetter)",
diff --git a/pkg/front_end/test/fasta/messages_test.dart b/pkg/front_end/test/fasta/messages_test.dart
index b06f4ec..54290a5 100644
--- a/pkg/front_end/test/fasta/messages_test.dart
+++ b/pkg/front_end/test/fasta/messages_test.dart
@@ -90,9 +90,9 @@
String externalTest;
bool frontendInternal = false;
String analyzerCode;
- String dart2jsCode;
Severity severity;
YamlNode badSeverity;
+ YamlNode unnecessarySeverity;
for (String key in message.keys) {
YamlNode node = message.nodes[key];
@@ -106,6 +106,8 @@
severity = severityEnumValues[value];
if (severity == null) {
badSeverity = node;
+ } else if (severity == Severity.error) {
+ unnecessarySeverity = node;
}
break;
@@ -117,10 +119,6 @@
analyzerCode = value;
break;
- case "dart2jsCode":
- dart2jsCode = value;
- break;
-
case "bytes":
YamlList list = node;
if (list.first is List) {
@@ -197,7 +195,7 @@
if (problem != null) {
String filename = relativize(uri);
location ??= message.span.start;
- int line = location.line;
+ int line = location.line + 1;
int column = location.column;
problem = "$filename:$line:$column: error:\n$problem";
}
@@ -224,6 +222,14 @@
: null,
location: badSeverity?.span?.start);
+ yield createDescription(
+ "unnecessarySeverity",
+ null,
+ unnecessarySeverity != null
+ ? "The 'ERROR' severity is the default and not necessary."
+ : null,
+ location: unnecessarySeverity?.span?.start);
+
bool exampleAndAnalyzerCodeRequired = severity != Severity.context &&
severity != Severity.internalProblem &&
severity != Severity.ignored;
@@ -260,17 +266,6 @@
" on an example to find the code."
" The code is printed just before the file name."
: null);
-
- yield createDescription(
- "dart2jsCode",
- null,
- exampleAndAnalyzerCodeRequired &&
- !frontendInternal &&
- analyzerCode != null &&
- dart2jsCode == null
- ? "No dart2js code for $name."
- " Try using *ignored* or *fatal*"
- : null);
}
}
@@ -280,7 +275,7 @@
buffer
..write(relativize(span.sourceUrl))
..write(":")
- ..write(span.start.line)
+ ..write(span.start.line + 1)
..write(":")
..write(span.start.column)
..write(": error: ")
diff --git a/pkg/front_end/test/fasta/parser/type_info_test.dart b/pkg/front_end/test/fasta/parser/type_info_test.dart
index 73e592c..ea5dfdc 100644
--- a/pkg/front_end/test/fasta/parser/type_info_test.dart
+++ b/pkg/front_end/test/fasta/parser/type_info_test.dart
@@ -580,7 +580,7 @@
'handleNoName )',
'handleFormalParameterWithoutValue )',
'endFormalParameter null null ) FormalParameterKind.mandatory '
- 'MemberKind.GeneralizedFunctionType int',
+ 'MemberKind.GeneralizedFunctionType',
'endFormalParameters 1 ( ) MemberKind.GeneralizedFunctionType',
'endFunctionType Function',
]);
@@ -606,7 +606,7 @@
'handleNoName )',
'handleFormalParameterWithoutValue )',
'endFormalParameter null null ) FormalParameterKind.mandatory'
- ' MemberKind.GeneralizedFunctionType int',
+ ' MemberKind.GeneralizedFunctionType',
'endFormalParameters 1 ( ) MemberKind.GeneralizedFunctionType',
'endFunctionType Function',
]);
@@ -912,7 +912,7 @@
'handleIdentifier x formalParameterDeclaration',
'handleFormalParameterWithoutValue )',
'endFormalParameter null null x FormalParameterKind.mandatory '
- 'MemberKind.GeneralizedFunctionType x',
+ 'MemberKind.GeneralizedFunctionType',
'endFormalParameters 1 ( ) MemberKind.GeneralizedFunctionType',
'endFunctionType Function',
'beginFormalParameters ( MemberKind.GeneralizedFunctionType',
@@ -925,7 +925,7 @@
'handleIdentifier x formalParameterDeclaration',
'handleFormalParameterWithoutValue )',
'endFormalParameter null null x FormalParameterKind.mandatory '
- 'MemberKind.GeneralizedFunctionType x',
+ 'MemberKind.GeneralizedFunctionType',
'endFormalParameters 1 ( ) MemberKind.GeneralizedFunctionType',
'endFunctionType Function',
]);
@@ -1654,7 +1654,7 @@
'handleType T',
'handleNoName )',
'handleFormalParameterWithoutValue )',
- 'endFormalParameter null null ) FormalParameterKind.mandatory MemberKind.GeneralizedFunctionType T',
+ 'endFormalParameter null null ) FormalParameterKind.mandatory MemberKind.GeneralizedFunctionType',
'endFormalParameters 1 ( ) MemberKind.GeneralizedFunctionType',
'endFunctionType Function',
'endTypeVariable > 0 extends',
@@ -1907,9 +1907,9 @@
}
@override
- void beginFormalParameter(Token beginToken, MemberKind kind,
- Token covariantToken, Token varFinalOrConst) {
- calls.add('beginFormalParameter $beginToken $kind');
+ void beginFormalParameter(Token token, MemberKind kind, Token covariantToken,
+ Token varFinalOrConst) {
+ calls.add('beginFormalParameter $token $kind');
}
@override
@@ -1967,15 +1967,10 @@
}
@override
- void endFormalParameter(
- Token thisKeyword,
- Token periodAfterThis,
- Token nameToken,
- FormalParameterKind kind,
- MemberKind memberKind,
- Token endToken) {
+ void endFormalParameter(Token thisKeyword, Token periodAfterThis,
+ Token nameToken, FormalParameterKind kind, MemberKind memberKind) {
calls.add('endFormalParameter $thisKeyword $periodAfterThis '
- '$nameToken $kind $memberKind $endToken');
+ '$nameToken $kind $memberKind');
}
@override
diff --git a/pkg/front_end/test/scanner_fasta_test.dart b/pkg/front_end/test/scanner_fasta_test.dart
index 2d01af9..fa5c628 100644
--- a/pkg/front_end/test/scanner_fasta_test.dart
+++ b/pkg/front_end/test/scanner_fasta_test.dart
@@ -52,12 +52,10 @@
@reflectiveTest
class ScannerTest_Fasta_UTF8 extends ScannerTest_Fasta {
@override
- createScanner(String source, {bool genericMethodComments: false}) {
+ createScanner(String source) {
List<int> encoded = utf8.encode(source).toList(growable: true);
encoded.add(0); // Ensure 0 terminted bytes for UTF8 scanner
- return new fasta.Utf8BytesScanner(encoded,
- includeComments: true,
- scanGenericMethodComments: genericMethodComments);
+ return new fasta.Utf8BytesScanner(encoded, includeComments: true);
}
test_invalid_utf8() {
@@ -97,17 +95,13 @@
usingFasta = true;
}
- createScanner(String source, {bool genericMethodComments: false}) =>
- new fasta.StringScanner(source,
- includeComments: true,
- scanGenericMethodComments: genericMethodComments);
+ createScanner(String source) =>
+ new fasta.StringScanner(source, includeComments: true);
@override
Token scanWithListener(String source, ErrorListener listener,
- {bool genericMethodComments: false,
- bool lazyAssignmentOperators: false}) {
- var scanner =
- createScanner(source, genericMethodComments: genericMethodComments);
+ {bool lazyAssignmentOperators: false}) {
+ var scanner = createScanner(source);
var token = scanner.tokenize();
return new ToAnalyzerTokenStreamConverter_WithListener(listener)
.convertTokens(token);
diff --git a/pkg/front_end/test/scanner_replacement_test.dart b/pkg/front_end/test/scanner_replacement_test.dart
index c13663a..a9f0b70 100644
--- a/pkg/front_end/test/scanner_replacement_test.dart
+++ b/pkg/front_end/test/scanner_replacement_test.dart
@@ -37,15 +37,13 @@
@override
analyzer.Token scanWithListener(String source, ErrorListener listener,
- {bool genericMethodComments: false,
- bool lazyAssignmentOperators: false}) {
+ {bool lazyAssignmentOperators: false}) {
// Process the source similar to
// pkg/analyzer/lib/src/dart/scanner/scanner.dart
// to simulate replacing the analyzer scanner
fasta.ScannerResult result = fasta.scanString(source,
includeComments: true,
- scanGenericMethodComments: genericMethodComments,
scanLazyAssignmentOperators: lazyAssignmentOperators,
recover: ((List<int> bytes, fasta.Token tokens, List<int> lineStarts) {
// perform recovery as a separate step
@@ -206,12 +204,9 @@
]);
}
- analyzer.Token _scan(String source,
- {bool genericMethodComments: false,
- bool lazyAssignmentOperators: false}) {
+ analyzer.Token _scan(String source, {bool lazyAssignmentOperators: false}) {
ErrorListener listener = new ErrorListener();
analyzer.Token token = scanWithListener(source, listener,
- genericMethodComments: genericMethodComments,
lazyAssignmentOperators: lazyAssignmentOperators);
listener.assertNoErrors();
return token;
diff --git a/pkg/front_end/test/scanner_test.dart b/pkg/front_end/test/scanner_test.dart
index e33b0bc..9ad98df 100644
--- a/pkg/front_end/test/scanner_test.dart
+++ b/pkg/front_end/test/scanner_test.dart
@@ -83,7 +83,7 @@
bool usingFasta = false;
Token scanWithListener(String source, ErrorListener listener,
- {bool genericMethodComments: false, bool lazyAssignmentOperators: false});
+ {bool lazyAssignmentOperators: false});
void test_ampersand() {
_assertToken(TokenType.AMPERSAND, "&");
@@ -191,18 +191,6 @@
_assertToken(TokenType.COMMA, ",");
}
- void test_comment_generic_method_type_assign() {
- _assertComment(TokenType.MULTI_LINE_COMMENT, "/*=comment*/");
- _assertComment(TokenType.GENERIC_METHOD_TYPE_ASSIGN, "/*=comment*/",
- genericMethodComments: true);
- }
-
- void test_comment_generic_method_type_list() {
- _assertComment(TokenType.MULTI_LINE_COMMENT, "/*<comment>*/");
- _assertComment(TokenType.GENERIC_METHOD_TYPE_LIST, "/*<comment>*/",
- genericMethodComments: true);
- }
-
void test_comment_multi() {
_assertComment(TokenType.MULTI_LINE_COMMENT, "/* comment */");
}
@@ -1341,12 +1329,11 @@
expect(openParen.endToken, isNull);
}
- void _assertComment(TokenType commentType, String source,
- {bool genericMethodComments: false}) {
+ void _assertComment(TokenType commentType, String source) {
//
// Test without a trailing end-of-line marker
//
- Token token = _scan(source, genericMethodComments: genericMethodComments);
+ Token token = _scan(source);
expect(token, isNotNull);
expect(token.type, TokenType.EOF);
Token comment = token.precedingComments;
@@ -1358,7 +1345,7 @@
//
// Test with a trailing end-of-line marker
//
- token = _scan("$source\n", genericMethodComments: genericMethodComments);
+ token = _scan("$source\n");
expect(token, isNotNull);
expect(token.type, TokenType.EOF);
comment = token.precedingComments;
@@ -1520,12 +1507,9 @@
}
Token _scan(String source,
- {bool genericMethodComments: false,
- bool lazyAssignmentOperators: false,
- bool ignoreErrors: false}) {
+ {bool lazyAssignmentOperators: false, bool ignoreErrors: false}) {
ErrorListener listener = new ErrorListener();
Token token = scanWithListener(source, listener,
- genericMethodComments: genericMethodComments,
lazyAssignmentOperators: lazyAssignmentOperators);
if (!ignoreErrors) {
listener.assertNoErrors();
diff --git a/pkg/front_end/test/src/base/processed_options_test.dart b/pkg/front_end/test/src/base/processed_options_test.dart
index bf575e6..2e74c1d 100644
--- a/pkg/front_end/test/src/base/processed_options_test.dart
+++ b/pkg/front_end/test/src/base/processed_options_test.dart
@@ -50,7 +50,7 @@
..sdkRoot = Uri.parse('org-dartlang-test:///sdk/dir/')
..compileSdk = false;
expect(new ProcessedOptions(raw).sdkSummary,
- Uri.parse('org-dartlang-test:///sdk/dir/vm_platform.dill'));
+ Uri.parse('org-dartlang-test:///sdk/dir/vm_platform_strong.dill'));
// But it is left null when compile-sdk is true
raw = new CompilerOptions()
@@ -357,7 +357,7 @@
.entityForUri(sdkRoot)
.writeAsStringSync('\n');
fileSystem
- .entityForUri(sdkRoot.resolve('vm_platform.dill'))
+ .entityForUri(sdkRoot.resolve('vm_platform_strong.dill'))
.writeAsStringSync('\n');
fileSystem
.entityForUri(Uri.parse('org-dartlang-test:///foo.dart'))
@@ -428,7 +428,7 @@
test_validateOptions_inferred_summary_exists() async {
var sdkRoot = Uri.parse('org-dartlang-test:///sdk/root/');
var sdkSummary =
- Uri.parse('org-dartlang-test:///sdk/root/vm_platform.dill');
+ Uri.parse('org-dartlang-test:///sdk/root/vm_platform_strong.dill');
fileSystem.entityForUri(sdkRoot).writeAsStringSync('\n');
fileSystem.entityForUri(sdkSummary).writeAsStringSync('\n');
fileSystem
diff --git a/pkg/front_end/testcases/compile.status b/pkg/front_end/testcases/compile.status
index cd8199e..ba0d63c 100644
--- a/pkg/front_end/testcases/compile.status
+++ b/pkg/front_end/testcases/compile.status
@@ -104,6 +104,8 @@
regress/issue_29982: Fail # Issue 29982.
regress/issue_30836: RuntimeError # Issue 30836.
regress/issue_33452: RuntimeError # Test has an intentional error
+regress/issue_32972: RuntimeError
+regress/issue_34225: RuntimeError
runtime_checks/implicit_downcast_constructor_initializer: RuntimeError # Test exercises strong mode semantics
runtime_checks/implicit_downcast_do: RuntimeError # Test exercises strong mode semantics
diff --git a/pkg/front_end/testcases/dartino/super_is_parameter.incremental.yaml b/pkg/front_end/testcases/dartino/super_is_parameter.incremental.yaml
index 65037fa..fef1a3e 100644
--- a/pkg/front_end/testcases/dartino/super_is_parameter.incremental.yaml
+++ b/pkg/front_end/testcases/dartino/super_is_parameter.incremental.yaml
@@ -6,7 +6,7 @@
<<<< []
class A<S> {
==== []
- class A<S extends S> {
+ class A<S extends num> {
>>>>
S field;
}
diff --git a/pkg/front_end/testcases/inference/block_bodied_lambdas_returns.dart b/pkg/front_end/testcases/inference/block_bodied_lambdas_returns.dart
index 852fb3f..e385138 100644
--- a/pkg/front_end/testcases/inference/block_bodied_lambdas_returns.dart
+++ b/pkg/front_end/testcases/inference/block_bodied_lambdas_returns.dart
@@ -2,7 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-/*@testedFeatures=inference*/
+/*@testedFeatures=warning,inference*/
library test;
main() {
@@ -32,7 +32,7 @@
};
var /*@type=(bool) -> int*/ g = /*@returnType=int*/ (bool b) {
if (b) {
- return;
+ /*@warning=ReturnWithoutExpression*/ return;
} else {
return 0;
}
@@ -62,7 +62,7 @@
if (b) {
return 0;
} else {
- return;
+ /*@warning=ReturnWithoutExpression*/ return;
}
};
var /*@type=(bool) -> int*/ l = /*@returnType=int*/ (bool b) {
diff --git a/pkg/front_end/testcases/inference/block_bodied_lambdas_returns.dart.strong.expect b/pkg/front_end/testcases/inference/block_bodied_lambdas_returns.dart.strong.expect
index b0ec67b..5e2379c 100644
--- a/pkg/front_end/testcases/inference/block_bodied_lambdas_returns.dart.strong.expect
+++ b/pkg/front_end/testcases/inference/block_bodied_lambdas_returns.dart.strong.expect
@@ -31,7 +31,7 @@
};
(core::bool) → core::int g = (core::bool b) → core::int {
if(b) {
- return;
+ return null;
}
else {
return 0;
@@ -66,7 +66,7 @@
return 0;
}
else {
- return;
+ return null;
}
};
(core::bool) → core::int l = (core::bool b) → core::int {
diff --git a/pkg/front_end/testcases/inference/block_bodied_lambdas_returns.dart.strong.transformed.expect b/pkg/front_end/testcases/inference/block_bodied_lambdas_returns.dart.strong.transformed.expect
index b0ec67b..5e2379c 100644
--- a/pkg/front_end/testcases/inference/block_bodied_lambdas_returns.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/inference/block_bodied_lambdas_returns.dart.strong.transformed.expect
@@ -31,7 +31,7 @@
};
(core::bool) → core::int g = (core::bool b) → core::int {
if(b) {
- return;
+ return null;
}
else {
return 0;
@@ -66,7 +66,7 @@
return 0;
}
else {
- return;
+ return null;
}
};
(core::bool) → core::int l = (core::bool b) → core::int {
diff --git a/pkg/front_end/testcases/inference/block_bodied_lambdas_void_context.dart b/pkg/front_end/testcases/inference/block_bodied_lambdas_void_context.dart
index d9f7677..23d2b4e 100644
--- a/pkg/front_end/testcases/inference/block_bodied_lambdas_void_context.dart
+++ b/pkg/front_end/testcases/inference/block_bodied_lambdas_void_context.dart
@@ -8,7 +8,7 @@
f() {
List<int> o;
o. /*@target=Iterable::forEach*/ forEach(
- /*@returnType=void*/ (/*@type=int*/ i) {
+ /*@returnType=int*/ (/*@type=int*/ i) {
return i /*@target=num::+*/ + 1;
});
}
diff --git a/pkg/front_end/testcases/inference/block_bodied_lambdas_void_context.dart.strong.expect b/pkg/front_end/testcases/inference/block_bodied_lambdas_void_context.dart.strong.expect
index bdd35f6..38ae920 100644
--- a/pkg/front_end/testcases/inference/block_bodied_lambdas_void_context.dart.strong.expect
+++ b/pkg/front_end/testcases/inference/block_bodied_lambdas_void_context.dart.strong.expect
@@ -4,7 +4,7 @@
static method f() → dynamic {
core::List<core::int> o;
- o.{core::Iterable::forEach}((core::int i) → void {
+ o.{core::Iterable::forEach}((core::int i) → core::int {
return i.{core::num::+}(1);
});
}
diff --git a/pkg/front_end/testcases/inference/block_bodied_lambdas_void_context.dart.strong.transformed.expect b/pkg/front_end/testcases/inference/block_bodied_lambdas_void_context.dart.strong.transformed.expect
index bdd35f6..38ae920 100644
--- a/pkg/front_end/testcases/inference/block_bodied_lambdas_void_context.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/inference/block_bodied_lambdas_void_context.dart.strong.transformed.expect
@@ -4,7 +4,7 @@
static method f() → dynamic {
core::List<core::int> o;
- o.{core::Iterable::forEach}((core::int i) → void {
+ o.{core::Iterable::forEach}((core::int i) → core::int {
return i.{core::num::+}(1);
});
}
diff --git a/pkg/front_end/testcases/inference/call_corner_cases.dart b/pkg/front_end/testcases/inference/call_corner_cases.dart
index 41a5eb4..5504669 100644
--- a/pkg/front_end/testcases/inference/call_corner_cases.dart
+++ b/pkg/front_end/testcases/inference/call_corner_cases.dart
@@ -20,10 +20,12 @@
B get getB => new B();
}
-main() {
+test() {
var /*@type=int*/ callA = new A() /*@target=A::call*/ ();
var /*@type=int*/ callFieldA = new D(). /*@target=D::fieldA*/ fieldA();
var /*@type=int*/ callGetA = new D(). /*@target=D::getA*/ getA();
var /*@type=dynamic*/ callFieldB = new D(). /*@target=D::fieldB*/ fieldB();
var /*@type=dynamic*/ callGetB = new D(). /*@target=D::getB*/ getB();
}
+
+main() {}
diff --git a/pkg/front_end/testcases/inference/call_corner_cases.dart.direct.expect b/pkg/front_end/testcases/inference/call_corner_cases.dart.direct.expect
index 8283021..bf4efd4 100644
--- a/pkg/front_end/testcases/inference/call_corner_cases.dart.direct.expect
+++ b/pkg/front_end/testcases/inference/call_corner_cases.dart.direct.expect
@@ -27,10 +27,11 @@
get getB() → self::B
return new self::B::•();
}
-static method main() → dynamic {
+static method test() → dynamic {
dynamic callA = new self::A::•().call();
dynamic callFieldA = new self::D::•().fieldA();
dynamic callGetA = new self::D::•().getA();
dynamic callFieldB = new self::D::•().fieldB();
dynamic callGetB = new self::D::•().getB();
}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference/call_corner_cases.dart.direct.transformed.expect b/pkg/front_end/testcases/inference/call_corner_cases.dart.direct.transformed.expect
index 8283021..bf4efd4 100644
--- a/pkg/front_end/testcases/inference/call_corner_cases.dart.direct.transformed.expect
+++ b/pkg/front_end/testcases/inference/call_corner_cases.dart.direct.transformed.expect
@@ -27,10 +27,11 @@
get getB() → self::B
return new self::B::•();
}
-static method main() → dynamic {
+static method test() → dynamic {
dynamic callA = new self::A::•().call();
dynamic callFieldA = new self::D::•().fieldA();
dynamic callGetA = new self::D::•().getA();
dynamic callFieldB = new self::D::•().fieldB();
dynamic callGetB = new self::D::•().getB();
}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference/call_corner_cases.dart.outline.expect b/pkg/front_end/testcases/inference/call_corner_cases.dart.outline.expect
index e0d0b05..523519b 100644
--- a/pkg/front_end/testcases/inference/call_corner_cases.dart.outline.expect
+++ b/pkg/front_end/testcases/inference/call_corner_cases.dart.outline.expect
@@ -24,5 +24,7 @@
get getB() → self::B
;
}
+static method test() → dynamic
+ ;
static method main() → dynamic
;
diff --git a/pkg/front_end/testcases/inference/call_corner_cases.dart.strong.expect b/pkg/front_end/testcases/inference/call_corner_cases.dart.strong.expect
index 6457f6f..5d462fc 100644
--- a/pkg/front_end/testcases/inference/call_corner_cases.dart.strong.expect
+++ b/pkg/front_end/testcases/inference/call_corner_cases.dart.strong.expect
@@ -27,10 +27,15 @@
get getB() → self::B
return new self::B::•();
}
-static method main() → dynamic {
+static method test() → dynamic {
core::int callA = new self::A::•().{self::A::call}();
core::int callFieldA = new self::D::•().{self::D::fieldA}();
core::int callGetA = new self::D::•().{self::D::getA}();
- dynamic callFieldB = new self::D::•().{self::D::fieldB}();
- dynamic callGetB = new self::D::•().{self::D::getB}();
+ dynamic callFieldB = let dynamic _ = null in let final dynamic #t1 = let dynamic _ = null in invalid-expression "pkg/front_end/testcases/inference/call_corner_cases.dart:27:69: Error: 'fieldB' isn't a function or method and can't be invoked.
+ var /*@type=dynamic*/ callFieldB = new D(). /*@target=D::fieldB*/ fieldB();
+ ^" in let final dynamic #t2 = new self::D::•().{self::D::fieldB}() in null;
+ dynamic callGetB = let dynamic _ = null in let final dynamic #t3 = let dynamic _ = null in invalid-expression "pkg/front_end/testcases/inference/call_corner_cases.dart:28:65: Error: 'getB' isn't a function or method and can't be invoked.
+ var /*@type=dynamic*/ callGetB = new D(). /*@target=D::getB*/ getB();
+ ^" in let final dynamic #t4 = new self::D::•().{self::D::getB}() in null;
}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference/call_corner_cases.dart.strong.transformed.expect b/pkg/front_end/testcases/inference/call_corner_cases.dart.strong.transformed.expect
index 6457f6f..1c713e2 100644
--- a/pkg/front_end/testcases/inference/call_corner_cases.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/inference/call_corner_cases.dart.strong.transformed.expect
@@ -27,10 +27,15 @@
get getB() → self::B
return new self::B::•();
}
-static method main() → dynamic {
+static method test() → dynamic {
core::int callA = new self::A::•().{self::A::call}();
core::int callFieldA = new self::D::•().{self::D::fieldA}();
core::int callGetA = new self::D::•().{self::D::getA}();
- dynamic callFieldB = new self::D::•().{self::D::fieldB}();
- dynamic callGetB = new self::D::•().{self::D::getB}();
+ dynamic callFieldB = let<BottomType> _ = null in let final dynamic #t1 = let<BottomType> _ = null in invalid-expression "pkg/front_end/testcases/inference/call_corner_cases.dart:27:69: Error: 'fieldB' isn't a function or method and can't be invoked.
+ var /*@type=dynamic*/ callFieldB = new D(). /*@target=D::fieldB*/ fieldB();
+ ^" in let final dynamic #t2 = new self::D::•().{self::D::fieldB}() in null;
+ dynamic callGetB = let<BottomType> _ = null in let final dynamic #t3 = let<BottomType> _ = null in invalid-expression "pkg/front_end/testcases/inference/call_corner_cases.dart:28:65: Error: 'getB' isn't a function or method and can't be invoked.
+ var /*@type=dynamic*/ callGetB = new D(). /*@target=D::getB*/ getB();
+ ^" in let final dynamic #t4 = new self::D::•().{self::D::getB}() in null;
}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference/dynamic_methods.dart.strong.expect b/pkg/front_end/testcases/inference/dynamic_methods.dart.strong.expect
index 452d130..1081803 100644
--- a/pkg/front_end/testcases/inference/dynamic_methods.dart.strong.expect
+++ b/pkg/front_end/testcases/inference/dynamic_methods.dart.strong.expect
@@ -12,7 +12,9 @@
static method test() → dynamic {
dynamic d = new self::Foo::•();
core::int get_hashCode = d.{core::Object::hashCode};
- dynamic call_hashCode = d.{core::Object::hashCode}();
+ dynamic call_hashCode = let dynamic _ = null in let final dynamic #t1 = let dynamic _ = null in invalid-expression "pkg/front_end/testcases/inference/dynamic_methods.dart:16:39: Error: 'hashCode' isn't a function or method and can't be invoked.
+ d. /*@target=Object::hashCode*/ hashCode();
+ ^" in let final dynamic #t2 = d.{core::Object::hashCode}() in null;
core::String call_toString = d.{core::Object::toString}();
dynamic call_toStringArg = d.toString(color: "pink");
dynamic call_foo0 = d.foo();
diff --git a/pkg/front_end/testcases/inference/dynamic_methods.dart.strong.transformed.expect b/pkg/front_end/testcases/inference/dynamic_methods.dart.strong.transformed.expect
index 452d130..3d83647 100644
--- a/pkg/front_end/testcases/inference/dynamic_methods.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/inference/dynamic_methods.dart.strong.transformed.expect
@@ -12,7 +12,9 @@
static method test() → dynamic {
dynamic d = new self::Foo::•();
core::int get_hashCode = d.{core::Object::hashCode};
- dynamic call_hashCode = d.{core::Object::hashCode}();
+ dynamic call_hashCode = let<BottomType> _ = null in let final dynamic #t1 = let<BottomType> _ = null in invalid-expression "pkg/front_end/testcases/inference/dynamic_methods.dart:16:39: Error: 'hashCode' isn't a function or method and can't be invoked.
+ d. /*@target=Object::hashCode*/ hashCode();
+ ^" in let final dynamic #t2 = d.{core::Object::hashCode}() in null;
core::String call_toString = d.{core::Object::toString}();
dynamic call_toStringArg = d.toString(color: "pink");
dynamic call_foo0 = d.foo();
diff --git a/pkg/front_end/testcases/inference/generic_methods_do_not_infer_invalid_override_of_generic_method.dart b/pkg/front_end/testcases/inference/generic_methods_do_not_infer_invalid_override_of_generic_method.dart
index c615c82..c72713a 100644
--- a/pkg/front_end/testcases/inference/generic_methods_do_not_infer_invalid_override_of_generic_method.dart
+++ b/pkg/front_end/testcases/inference/generic_methods_do_not_infer_invalid_override_of_generic_method.dart
@@ -18,7 +18,7 @@
main() {
int y = /*info:DYNAMIC_CAST*/ new D()
- . /*error:WRONG_NUMBER_OF_TYPE_ARGUMENTS_METHOD*/ /*@target=D::m*/ m<int>(
- 42);
+ . /*error:WRONG_NUMBER_OF_TYPE_ARGUMENTS_METHOD*/ /*@target=D::m*/ /*@error=TypeArgumentMismatch*/ m<
+ int>(42);
print(y);
}
diff --git a/pkg/front_end/testcases/inference/generic_methods_do_not_infer_invalid_override_of_generic_method.dart.strong.expect b/pkg/front_end/testcases/inference/generic_methods_do_not_infer_invalid_override_of_generic_method.dart.strong.expect
index a6dedb5..5d1b277 100644
--- a/pkg/front_end/testcases/inference/generic_methods_do_not_infer_invalid_override_of_generic_method.dart.strong.expect
+++ b/pkg/front_end/testcases/inference/generic_methods_do_not_infer_invalid_override_of_generic_method.dart.strong.expect
@@ -8,6 +8,10 @@
// Change to a subtype of test::C::m::T.
// /*@error=OverrideTypeMismatchReturnType*/ /*@topType=dynamic*/ m(
// ^
+//
+// pkg/front_end/testcases/inference/generic_methods_do_not_infer_invalid_override_of_generic_method.dart:21:106: Error: Expected 0 type arguments.
+// . /*error:WRONG_NUMBER_OF_TYPE_ARGUMENTS_METHOD*/ /*@target=D::m*/ /*@error=TypeArgumentMismatch*/ m<
+// ^
library test;
import self as self;
diff --git a/pkg/front_end/testcases/inference/lambda_void_context.dart b/pkg/front_end/testcases/inference/lambda_void_context.dart
index 27bcadf..cf6ddfc 100644
--- a/pkg/front_end/testcases/inference/lambda_void_context.dart
+++ b/pkg/front_end/testcases/inference/lambda_void_context.dart
@@ -8,7 +8,7 @@
f() {
List<int> o;
o. /*@target=Iterable::forEach*/ forEach(
- /*@returnType=void*/ (/*@type=int*/ i) => i /*@target=num::+*/ + 1);
+ /*@returnType=int*/ (/*@type=int*/ i) => i /*@target=num::+*/ + 1);
}
main() {}
diff --git a/pkg/front_end/testcases/inference/lambda_void_context.dart.strong.expect b/pkg/front_end/testcases/inference/lambda_void_context.dart.strong.expect
index f46ab7c..13abe3f 100644
--- a/pkg/front_end/testcases/inference/lambda_void_context.dart.strong.expect
+++ b/pkg/front_end/testcases/inference/lambda_void_context.dart.strong.expect
@@ -4,6 +4,6 @@
static method f() → dynamic {
core::List<core::int> o;
- o.{core::Iterable::forEach}((core::int i) → void => i.{core::num::+}(1));
+ o.{core::Iterable::forEach}((core::int i) → core::int => i.{core::num::+}(1));
}
static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference/lambda_void_context.dart.strong.transformed.expect b/pkg/front_end/testcases/inference/lambda_void_context.dart.strong.transformed.expect
index f46ab7c..13abe3f 100644
--- a/pkg/front_end/testcases/inference/lambda_void_context.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/inference/lambda_void_context.dart.strong.transformed.expect
@@ -4,6 +4,6 @@
static method f() → dynamic {
core::List<core::int> o;
- o.{core::Iterable::forEach}((core::int i) → void => i.{core::num::+}(1));
+ o.{core::Iterable::forEach}((core::int i) → core::int => i.{core::num::+}(1));
}
static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/instantiate_to_bound/multiple_strongly_connected.dart.direct.expect b/pkg/front_end/testcases/instantiate_to_bound/multiple_strongly_connected.dart.direct.expect
index e8031c5..964c88f 100644
--- a/pkg/front_end/testcases/instantiate_to_bound/multiple_strongly_connected.dart.direct.expect
+++ b/pkg/front_end/testcases/instantiate_to_bound/multiple_strongly_connected.dart.direct.expect
@@ -1,3 +1,25 @@
+// Errors:
+//
+// pkg/front_end/testcases/instantiate_to_bound/multiple_strongly_connected.dart:41:9: Error: Type 'T' is a bound of itself via 'U', 'Y', 'Z'.
+// Try breaking the cycle by removing at least on of the 'extends' clauses in the cycle.
+// class I<T extends U, U extends Y, V extends Function(W), W extends Function(X),
+// ^
+//
+// pkg/front_end/testcases/instantiate_to_bound/multiple_strongly_connected.dart:41:22: Error: Type 'U' is a bound of itself via 'Y', 'Z', 'T'.
+// Try breaking the cycle by removing at least on of the 'extends' clauses in the cycle.
+// class I<T extends U, U extends Y, V extends Function(W), W extends Function(X),
+// ^
+//
+// pkg/front_end/testcases/instantiate_to_bound/multiple_strongly_connected.dart:42:28: Error: Type 'Y' is a bound of itself via 'Z', 'T', 'U'.
+// Try breaking the cycle by removing at least on of the 'extends' clauses in the cycle.
+// X extends Function(V), Y extends Z, Z extends T> {}
+// ^
+//
+// pkg/front_end/testcases/instantiate_to_bound/multiple_strongly_connected.dart:42:41: Error: Type 'Z' is a bound of itself via 'T', 'U', 'Y'.
+// Try breaking the cycle by removing at least on of the 'extends' clauses in the cycle.
+// X extends Function(V), Y extends Z, Z extends T> {}
+// ^
+
library;
import self as self;
import "dart:core" as core;
diff --git a/pkg/front_end/testcases/instantiate_to_bound/multiple_strongly_connected.dart.direct.transformed.expect b/pkg/front_end/testcases/instantiate_to_bound/multiple_strongly_connected.dart.direct.transformed.expect
index e8031c5..964c88f 100644
--- a/pkg/front_end/testcases/instantiate_to_bound/multiple_strongly_connected.dart.direct.transformed.expect
+++ b/pkg/front_end/testcases/instantiate_to_bound/multiple_strongly_connected.dart.direct.transformed.expect
@@ -1,3 +1,25 @@
+// Errors:
+//
+// pkg/front_end/testcases/instantiate_to_bound/multiple_strongly_connected.dart:41:9: Error: Type 'T' is a bound of itself via 'U', 'Y', 'Z'.
+// Try breaking the cycle by removing at least on of the 'extends' clauses in the cycle.
+// class I<T extends U, U extends Y, V extends Function(W), W extends Function(X),
+// ^
+//
+// pkg/front_end/testcases/instantiate_to_bound/multiple_strongly_connected.dart:41:22: Error: Type 'U' is a bound of itself via 'Y', 'Z', 'T'.
+// Try breaking the cycle by removing at least on of the 'extends' clauses in the cycle.
+// class I<T extends U, U extends Y, V extends Function(W), W extends Function(X),
+// ^
+//
+// pkg/front_end/testcases/instantiate_to_bound/multiple_strongly_connected.dart:42:28: Error: Type 'Y' is a bound of itself via 'Z', 'T', 'U'.
+// Try breaking the cycle by removing at least on of the 'extends' clauses in the cycle.
+// X extends Function(V), Y extends Z, Z extends T> {}
+// ^
+//
+// pkg/front_end/testcases/instantiate_to_bound/multiple_strongly_connected.dart:42:41: Error: Type 'Z' is a bound of itself via 'T', 'U', 'Y'.
+// Try breaking the cycle by removing at least on of the 'extends' clauses in the cycle.
+// X extends Function(V), Y extends Z, Z extends T> {}
+// ^
+
library;
import self as self;
import "dart:core" as core;
diff --git a/pkg/front_end/testcases/instantiate_to_bound/multiple_strongly_connected.dart.strong.expect b/pkg/front_end/testcases/instantiate_to_bound/multiple_strongly_connected.dart.strong.expect
index 7b2576f..b442329 100644
--- a/pkg/front_end/testcases/instantiate_to_bound/multiple_strongly_connected.dart.strong.expect
+++ b/pkg/front_end/testcases/instantiate_to_bound/multiple_strongly_connected.dart.strong.expect
@@ -1,3 +1,25 @@
+// Errors:
+//
+// pkg/front_end/testcases/instantiate_to_bound/multiple_strongly_connected.dart:41:9: Error: Type 'T' is a bound of itself via 'U', 'Y', 'Z'.
+// Try breaking the cycle by removing at least on of the 'extends' clauses in the cycle.
+// class I<T extends U, U extends Y, V extends Function(W), W extends Function(X),
+// ^
+//
+// pkg/front_end/testcases/instantiate_to_bound/multiple_strongly_connected.dart:41:22: Error: Type 'U' is a bound of itself via 'Y', 'Z', 'T'.
+// Try breaking the cycle by removing at least on of the 'extends' clauses in the cycle.
+// class I<T extends U, U extends Y, V extends Function(W), W extends Function(X),
+// ^
+//
+// pkg/front_end/testcases/instantiate_to_bound/multiple_strongly_connected.dart:42:28: Error: Type 'Y' is a bound of itself via 'Z', 'T', 'U'.
+// Try breaking the cycle by removing at least on of the 'extends' clauses in the cycle.
+// X extends Function(V), Y extends Z, Z extends T> {}
+// ^
+//
+// pkg/front_end/testcases/instantiate_to_bound/multiple_strongly_connected.dart:42:41: Error: Type 'Z' is a bound of itself via 'T', 'U', 'Y'.
+// Try breaking the cycle by removing at least on of the 'extends' clauses in the cycle.
+// X extends Function(V), Y extends Z, Z extends T> {}
+// ^
+
library;
import self as self;
import "dart:core" as core;
diff --git a/pkg/front_end/testcases/instantiate_to_bound/multiple_strongly_connected.dart.strong.transformed.expect b/pkg/front_end/testcases/instantiate_to_bound/multiple_strongly_connected.dart.strong.transformed.expect
index 7b2576f..b442329 100644
--- a/pkg/front_end/testcases/instantiate_to_bound/multiple_strongly_connected.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/instantiate_to_bound/multiple_strongly_connected.dart.strong.transformed.expect
@@ -1,3 +1,25 @@
+// Errors:
+//
+// pkg/front_end/testcases/instantiate_to_bound/multiple_strongly_connected.dart:41:9: Error: Type 'T' is a bound of itself via 'U', 'Y', 'Z'.
+// Try breaking the cycle by removing at least on of the 'extends' clauses in the cycle.
+// class I<T extends U, U extends Y, V extends Function(W), W extends Function(X),
+// ^
+//
+// pkg/front_end/testcases/instantiate_to_bound/multiple_strongly_connected.dart:41:22: Error: Type 'U' is a bound of itself via 'Y', 'Z', 'T'.
+// Try breaking the cycle by removing at least on of the 'extends' clauses in the cycle.
+// class I<T extends U, U extends Y, V extends Function(W), W extends Function(X),
+// ^
+//
+// pkg/front_end/testcases/instantiate_to_bound/multiple_strongly_connected.dart:42:28: Error: Type 'Y' is a bound of itself via 'Z', 'T', 'U'.
+// Try breaking the cycle by removing at least on of the 'extends' clauses in the cycle.
+// X extends Function(V), Y extends Z, Z extends T> {}
+// ^
+//
+// pkg/front_end/testcases/instantiate_to_bound/multiple_strongly_connected.dart:42:41: Error: Type 'Z' is a bound of itself via 'T', 'U', 'Y'.
+// Try breaking the cycle by removing at least on of the 'extends' clauses in the cycle.
+// X extends Function(V), Y extends Z, Z extends T> {}
+// ^
+
library;
import self as self;
import "dart:core" as core;
diff --git a/pkg/front_end/testcases/qualified.dart b/pkg/front_end/testcases/qualified.dart
index 794f6bd..397020d 100644
--- a/pkg/front_end/testcases/qualified.dart
+++ b/pkg/front_end/testcases/qualified.dart
@@ -15,6 +15,8 @@
class WithMixin extends lib.Supertype with lib.Mixin {}
+class IllegalSupertype extends lib.VoidFunction {}
+
main() {
new C<String>();
new C<String>.a();
@@ -24,4 +26,5 @@
new lib.C<String>.b();
new WithMixin().supertypeMethod();
new WithMixin().foo();
+ new IllegalSupertype();
}
diff --git a/pkg/front_end/testcases/qualified.dart.direct.expect b/pkg/front_end/testcases/qualified.dart.direct.expect
index e062fce..b5e33b4 100644
--- a/pkg/front_end/testcases/qualified.dart.direct.expect
+++ b/pkg/front_end/testcases/qualified.dart.direct.expect
@@ -7,6 +7,10 @@
// pkg/front_end/testcases/qualified.dart:11:19: Error: Type 'lib.Missing' not found.
// class Bad extends lib.Missing {
// ^
+//
+// pkg/front_end/testcases/qualified.dart:18:7: Error: The type 'lib.VoidFunction' can't be used as supertype.
+// class IllegalSupertype extends lib.VoidFunction {}
+// ^
library test.qualified.main;
import self as self;
@@ -24,6 +28,11 @@
: super lib::Supertype::•()
;
}
+class IllegalSupertype extends core::Object {
+ synthetic constructor •() → void
+ : super core::Object::•()
+ ;
+}
class C<T extends core::Object = dynamic> extends core::Object { // from org-dartlang-testcase:///qualified_part.dart
static field dynamic _redirecting# = <dynamic>[self::C::b];
constructor •() → void
@@ -44,4 +53,5 @@
new lib::C::a<core::String>();
new self::WithMixin::•().supertypeMethod();
new self::WithMixin::•().foo();
+ new self::IllegalSupertype::•();
}
diff --git a/pkg/front_end/testcases/qualified.dart.direct.transformed.expect b/pkg/front_end/testcases/qualified.dart.direct.transformed.expect
index a9175a1..3ffad7c 100644
--- a/pkg/front_end/testcases/qualified.dart.direct.transformed.expect
+++ b/pkg/front_end/testcases/qualified.dart.direct.transformed.expect
@@ -7,6 +7,10 @@
// pkg/front_end/testcases/qualified.dart:11:19: Error: Type 'lib.Missing' not found.
// class Bad extends lib.Missing {
// ^
+//
+// pkg/front_end/testcases/qualified.dart:18:7: Error: The type 'lib.VoidFunction' can't be used as supertype.
+// class IllegalSupertype extends lib.VoidFunction {}
+// ^
library test.qualified.main;
import self as self;
@@ -30,6 +34,11 @@
: super lib::Supertype::•()
;
}
+class IllegalSupertype extends core::Object {
+ synthetic constructor •() → void
+ : super core::Object::•()
+ ;
+}
class C<T extends core::Object = dynamic> extends core::Object { // from org-dartlang-testcase:///qualified_part.dart
static field dynamic _redirecting# = <dynamic>[self::C::b];
constructor •() → void
@@ -50,4 +59,5 @@
new lib::C::a<core::String>();
new self::WithMixin::•().supertypeMethod();
new self::WithMixin::•().foo();
+ new self::IllegalSupertype::•();
}
diff --git a/pkg/front_end/testcases/qualified.dart.outline.expect b/pkg/front_end/testcases/qualified.dart.outline.expect
index b04c33a..f72c9c6 100644
--- a/pkg/front_end/testcases/qualified.dart.outline.expect
+++ b/pkg/front_end/testcases/qualified.dart.outline.expect
@@ -15,6 +15,10 @@
synthetic constructor •() → void
;
}
+class IllegalSupertype extends core::Object {
+ synthetic constructor •() → void
+ ;
+}
class C<T extends core::Object = dynamic> extends core::Object { // from org-dartlang-testcase:///qualified_part.dart
static field dynamic _redirecting# = <dynamic>[self::C::b];
constructor •() → void
diff --git a/pkg/front_end/testcases/qualified.dart.strong.expect b/pkg/front_end/testcases/qualified.dart.strong.expect
index fa6e54e..f1a7aea 100644
--- a/pkg/front_end/testcases/qualified.dart.strong.expect
+++ b/pkg/front_end/testcases/qualified.dart.strong.expect
@@ -11,6 +11,10 @@
// pkg/front_end/testcases/qualified.dart:11:19: Error: Type 'lib.Missing' not found.
// class Bad extends lib.Missing {
// ^
+//
+// pkg/front_end/testcases/qualified.dart:18:7: Error: The type 'lib.VoidFunction' can't be used as supertype.
+// class IllegalSupertype extends lib.VoidFunction {}
+// ^
library test.qualified.main;
import self as self;
@@ -28,6 +32,11 @@
: super lib::Supertype::•()
;
}
+class IllegalSupertype extends core::Object {
+ synthetic constructor •() → void
+ : super core::Object::•()
+ ;
+}
class C<T extends core::Object = dynamic> extends core::Object { // from org-dartlang-testcase:///qualified_part.dart
static field dynamic _redirecting# = <dynamic>[self::C::b];
constructor •() → void
@@ -48,4 +57,5 @@
new lib::C::a<core::String>();
new self::WithMixin::•().{lib::Supertype::supertypeMethod}();
new self::WithMixin::•().{lib::Mixin::foo}();
+ new self::IllegalSupertype::•();
}
diff --git a/pkg/front_end/testcases/qualified.dart.strong.transformed.expect b/pkg/front_end/testcases/qualified.dart.strong.transformed.expect
index 9894c5e..34c0697 100644
--- a/pkg/front_end/testcases/qualified.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/qualified.dart.strong.transformed.expect
@@ -11,6 +11,10 @@
// pkg/front_end/testcases/qualified.dart:11:19: Error: Type 'lib.Missing' not found.
// class Bad extends lib.Missing {
// ^
+//
+// pkg/front_end/testcases/qualified.dart:18:7: Error: The type 'lib.VoidFunction' can't be used as supertype.
+// class IllegalSupertype extends lib.VoidFunction {}
+// ^
library test.qualified.main;
import self as self;
@@ -34,6 +38,11 @@
: super lib::Supertype::•()
;
}
+class IllegalSupertype extends core::Object {
+ synthetic constructor •() → void
+ : super core::Object::•()
+ ;
+}
class C<T extends core::Object = dynamic> extends core::Object { // from org-dartlang-testcase:///qualified_part.dart
static field dynamic _redirecting# = <dynamic>[self::C::b];
constructor •() → void
@@ -54,4 +63,5 @@
new lib::C::a<core::String>();
new self::WithMixin::•().{lib::Supertype::supertypeMethod}();
new self::WithMixin::•().{lib::Mixin::foo}();
+ new self::IllegalSupertype::•();
}
diff --git a/pkg/front_end/testcases/qualified_lib.dart b/pkg/front_end/testcases/qualified_lib.dart
index dba8057..ae00a71 100644
--- a/pkg/front_end/testcases/qualified_lib.dart
+++ b/pkg/front_end/testcases/qualified_lib.dart
@@ -23,3 +23,5 @@
print("I'm Mixin.foo");
}
}
+
+typedef VoidFunction = void Function();
diff --git a/pkg/front_end/testcases/rasta/super.dart.strong.expect b/pkg/front_end/testcases/rasta/super.dart.strong.expect
index 6e155d9..9b12575 100644
--- a/pkg/front_end/testcases/rasta/super.dart.strong.expect
+++ b/pkg/front_end/testcases/rasta/super.dart.strong.expect
@@ -225,22 +225,22 @@
// pkg/front_end/testcases/rasta/super.dart:147:12: Error: Too many positional arguments: 0 allowed, but 1 found.
// Try removing the extra positional arguments.
// super.m(87);
-// ^^^^
+// ^
//
// pkg/front_end/testcases/rasta/super.dart:148:16: Error: Too many positional arguments: 0 allowed, but 1 found.
// Try removing the extra positional arguments.
// use(super.m(87));
-// ^^^^
+// ^
//
// pkg/front_end/testcases/rasta/super.dart:149:12: Error: Too many positional arguments: 0 allowed, but 1 found.
// Try removing the extra positional arguments.
// super.n(87);
-// ^^^^
+// ^
//
// pkg/front_end/testcases/rasta/super.dart:150:16: Error: Too many positional arguments: 0 allowed, but 1 found.
// Try removing the extra positional arguments.
// use(super.n(87));
-// ^^^^
+// ^
//
// pkg/front_end/testcases/rasta/super.dart:11:9: Error: Final field 'f' is not initialized.
// Try to initialize the field in the declaration or in every constructor.
diff --git a/pkg/front_end/testcases/regress/issue_29981.dart.strong.expect b/pkg/front_end/testcases/regress/issue_29981.dart.strong.expect
index 080a6f0..f2f6961 100644
--- a/pkg/front_end/testcases/regress/issue_29981.dart.strong.expect
+++ b/pkg/front_end/testcases/regress/issue_29981.dart.strong.expect
@@ -1,6 +1,6 @@
// Errors:
//
-// pkg/front_end/testcases/regress/issue_29981.dart:6:3: Error: 'C' expects 1 type arguments.
+// pkg/front_end/testcases/regress/issue_29981.dart:6:3: Error: Expected 1 type arguments.
// C<String, String> field;
// ^
diff --git a/pkg/front_end/testcases/regress/issue_29981.dart.strong.transformed.expect b/pkg/front_end/testcases/regress/issue_29981.dart.strong.transformed.expect
index 080a6f0..f2f6961 100644
--- a/pkg/front_end/testcases/regress/issue_29981.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/regress/issue_29981.dart.strong.transformed.expect
@@ -1,6 +1,6 @@
// Errors:
//
-// pkg/front_end/testcases/regress/issue_29981.dart:6:3: Error: 'C' expects 1 type arguments.
+// pkg/front_end/testcases/regress/issue_29981.dart:6:3: Error: Expected 1 type arguments.
// C<String, String> field;
// ^
diff --git a/pkg/front_end/testcases/regress/issue_29984.dart.direct.expect b/pkg/front_end/testcases/regress/issue_29984.dart.direct.expect
index 71e52ba..01ccbc1 100644
--- a/pkg/front_end/testcases/regress/issue_29984.dart.direct.expect
+++ b/pkg/front_end/testcases/regress/issue_29984.dart.direct.expect
@@ -5,7 +5,7 @@
static method bad() → dynamic {
for (core::int i = let final dynamic #t1 = let dynamic _ = null in invalid-expression "pkg/front_end/testcases/regress/issue_29984.dart:6:12: Error: Can't declare 'i' because it was already used in this scope.
for (int i = i;; false) {}
- ^" in let final dynamic #t2 = throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#i, 33, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) in null; ; false) {
+ ^" in let final dynamic #t2 = let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#i, 33, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) in null; ; false) {
}
}
static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/regress/issue_29984.dart.direct.transformed.expect b/pkg/front_end/testcases/regress/issue_29984.dart.direct.transformed.expect
index 71e52ba..01ccbc1 100644
--- a/pkg/front_end/testcases/regress/issue_29984.dart.direct.transformed.expect
+++ b/pkg/front_end/testcases/regress/issue_29984.dart.direct.transformed.expect
@@ -5,7 +5,7 @@
static method bad() → dynamic {
for (core::int i = let final dynamic #t1 = let dynamic _ = null in invalid-expression "pkg/front_end/testcases/regress/issue_29984.dart:6:12: Error: Can't declare 'i' because it was already used in this scope.
for (int i = i;; false) {}
- ^" in let final dynamic #t2 = throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#i, 33, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) in null; ; false) {
+ ^" in let final dynamic #t2 = let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#i, 33, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) in null; ; false) {
}
}
static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/regress/issue_29984.dart.strong.expect b/pkg/front_end/testcases/regress/issue_29984.dart.strong.expect
index 50d3af2..689db8c 100644
--- a/pkg/front_end/testcases/regress/issue_29984.dart.strong.expect
+++ b/pkg/front_end/testcases/regress/issue_29984.dart.strong.expect
@@ -11,7 +11,7 @@
static method bad() → dynamic {
for (core::int i = (let final dynamic #t1 = let dynamic _ = null in invalid-expression "pkg/front_end/testcases/regress/issue_29984.dart:6:12: Error: Can't declare 'i' because it was already used in this scope.
for (int i = i;; false) {}
- ^" in let final dynamic #t2 = throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#i, 33, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) in null) as{TypeError} core::int; ; false) {
+ ^" in let final dynamic #t2 = let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#i, 33, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) in null) as{TypeError} core::int; ; false) {
}
}
static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/regress/issue_29984.dart.strong.transformed.expect b/pkg/front_end/testcases/regress/issue_29984.dart.strong.transformed.expect
index 0cffebe..7db28e0 100644
--- a/pkg/front_end/testcases/regress/issue_29984.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/regress/issue_29984.dart.strong.transformed.expect
@@ -11,7 +11,7 @@
static method bad() → dynamic {
for (core::int i = (let final dynamic #t1 = let<BottomType> _ = null in invalid-expression "pkg/front_end/testcases/regress/issue_29984.dart:6:12: Error: Can't declare 'i' because it was already used in this scope.
for (int i = i;; false) {}
- ^" in let final<BottomType> #t2 = throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#i, 33, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) in null) as{TypeError} core::int; ; false) {
+ ^" in let final<BottomType> #t2 = let<BottomType> _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#i, 33, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) in null) as{TypeError} core::int; ; false) {
}
}
static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/regress/issue_30834.dart.direct.expect b/pkg/front_end/testcases/regress/issue_30834.dart.direct.expect
index de8a7cd..a07ea78 100644
--- a/pkg/front_end/testcases/regress/issue_30834.dart.direct.expect
+++ b/pkg/front_end/testcases/regress/issue_30834.dart.direct.expect
@@ -1,3 +1,9 @@
+// Errors:
+//
+// pkg/front_end/testcases/regress/issue_30834.dart:6:7: Error: A class member can't have the same name as the enclosing class.
+// set A(v) {}
+// ^
+
library;
import self as self;
import "dart:core" as core;
diff --git a/pkg/front_end/testcases/regress/issue_30834.dart.direct.transformed.expect b/pkg/front_end/testcases/regress/issue_30834.dart.direct.transformed.expect
index de8a7cd..a07ea78 100644
--- a/pkg/front_end/testcases/regress/issue_30834.dart.direct.transformed.expect
+++ b/pkg/front_end/testcases/regress/issue_30834.dart.direct.transformed.expect
@@ -1,3 +1,9 @@
+// Errors:
+//
+// pkg/front_end/testcases/regress/issue_30834.dart:6:7: Error: A class member can't have the same name as the enclosing class.
+// set A(v) {}
+// ^
+
library;
import self as self;
import "dart:core" as core;
diff --git a/pkg/front_end/testcases/regress/issue_30834.dart.strong.expect b/pkg/front_end/testcases/regress/issue_30834.dart.strong.expect
index 21d109e..729a604 100644
--- a/pkg/front_end/testcases/regress/issue_30834.dart.strong.expect
+++ b/pkg/front_end/testcases/regress/issue_30834.dart.strong.expect
@@ -1,3 +1,9 @@
+// Errors:
+//
+// pkg/front_end/testcases/regress/issue_30834.dart:6:7: Error: A class member can't have the same name as the enclosing class.
+// set A(v) {}
+// ^
+
library;
import self as self;
import "dart:core" as core;
diff --git a/pkg/front_end/testcases/regress/issue_30834.dart.strong.transformed.expect b/pkg/front_end/testcases/regress/issue_30834.dart.strong.transformed.expect
index 21d109e..729a604 100644
--- a/pkg/front_end/testcases/regress/issue_30834.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/regress/issue_30834.dart.strong.transformed.expect
@@ -1,3 +1,9 @@
+// Errors:
+//
+// pkg/front_end/testcases/regress/issue_30834.dart:6:7: Error: A class member can't have the same name as the enclosing class.
+// set A(v) {}
+// ^
+
library;
import self as self;
import "dart:core" as core;
diff --git a/pkg/front_end/testcases/regress/issue_31190.dart.strong.expect b/pkg/front_end/testcases/regress/issue_31190.dart.strong.expect
index 64fefaf..d69d0be 100644
--- a/pkg/front_end/testcases/regress/issue_31190.dart.strong.expect
+++ b/pkg/front_end/testcases/regress/issue_31190.dart.strong.expect
@@ -7,7 +7,7 @@
// T<U> v;
// ^
//
-// pkg/front_end/testcases/regress/issue_31190.dart:6:3: Error: 'T' expects 0 type arguments.
+// pkg/front_end/testcases/regress/issue_31190.dart:6:3: Error: Expected 0 type arguments.
// T<U> v;
// ^
diff --git a/pkg/front_end/testcases/regress/issue_31190.dart.strong.transformed.expect b/pkg/front_end/testcases/regress/issue_31190.dart.strong.transformed.expect
index 64fefaf..d69d0be 100644
--- a/pkg/front_end/testcases/regress/issue_31190.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/regress/issue_31190.dart.strong.transformed.expect
@@ -7,7 +7,7 @@
// T<U> v;
// ^
//
-// pkg/front_end/testcases/regress/issue_31190.dart:6:3: Error: 'T' expects 0 type arguments.
+// pkg/front_end/testcases/regress/issue_31190.dart:6:3: Error: Expected 0 type arguments.
// T<U> v;
// ^
diff --git a/pkg/front_end/testcases/regress/issue_31299.dart.strong.expect b/pkg/front_end/testcases/regress/issue_31299.dart.strong.expect
index c8a8ea6..11b7715 100644
--- a/pkg/front_end/testcases/regress/issue_31299.dart.strong.expect
+++ b/pkg/front_end/testcases/regress/issue_31299.dart.strong.expect
@@ -3,11 +3,11 @@
// pkg/front_end/testcases/regress/issue_31299.dart:18:12: Error: Too many positional arguments: 0 allowed, but 2 found.
// Try removing the extra positional arguments.
// new A.foo(1, 2);
-// ^^^^^^
+// ^
//
// pkg/front_end/testcases/regress/issue_31299.dart:15:14: Error: Too few positional arguments: 2 required, 0 given.
// new A().foo();
-// ^^
+// ^
library;
import self as self;
diff --git a/pkg/front_end/testcases/regress/issue_32660.dart b/pkg/front_end/testcases/regress/issue_32660.dart
new file mode 100644
index 0000000..ec799be
--- /dev/null
+++ b/pkg/front_end/testcases/regress/issue_32660.dart
@@ -0,0 +1,36 @@
+// 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.
+
+class A {
+ foo(int x) => x;
+}
+
+class B {
+ foo(int x, {int y}) => y;
+}
+
+class C extends A implements B {
+ noSuchMethod(i) {
+ print("No such method!");
+ return 42;
+ }
+}
+
+class D {
+ foo(int x) => x;
+}
+
+class E extends D {
+ foo(int x, {int y});
+
+ noSuchMethod(i) {
+ print(i.namedArguments);
+ return 42;
+ }
+}
+
+main() {
+ C c = new C();
+ E e = new E();
+}
diff --git a/pkg/front_end/testcases/regress/issue_32660.dart.direct.expect b/pkg/front_end/testcases/regress/issue_32660.dart.direct.expect
new file mode 100644
index 0000000..7f42fe5
--- /dev/null
+++ b/pkg/front_end/testcases/regress/issue_32660.dart.direct.expect
@@ -0,0 +1,48 @@
+library;
+import self as self;
+import "dart:core" as core;
+
+class A extends core::Object {
+ synthetic constructor •() → void
+ : super core::Object::•()
+ ;
+ method foo(core::int x) → dynamic
+ return x;
+}
+class B extends core::Object {
+ synthetic constructor •() → void
+ : super core::Object::•()
+ ;
+ method foo(core::int x, {core::int y = null}) → dynamic
+ return y;
+}
+class C extends self::A implements self::B {
+ synthetic constructor •() → void
+ : super self::A::•()
+ ;
+ method noSuchMethod(dynamic i) → dynamic {
+ core::print("No such method!");
+ return 42;
+ }
+}
+class D extends core::Object {
+ synthetic constructor •() → void
+ : super core::Object::•()
+ ;
+ method foo(core::int x) → dynamic
+ return x;
+}
+class E extends self::D {
+ synthetic constructor •() → void
+ : super self::D::•()
+ ;
+ abstract method foo(core::int x, {core::int y = null}) → dynamic;
+ method noSuchMethod(dynamic i) → dynamic {
+ core::print(i.namedArguments);
+ return 42;
+ }
+}
+static method main() → dynamic {
+ self::C c = new self::C::•();
+ self::E e = new self::E::•();
+}
diff --git a/pkg/front_end/testcases/regress/issue_32660.dart.direct.transformed.expect b/pkg/front_end/testcases/regress/issue_32660.dart.direct.transformed.expect
new file mode 100644
index 0000000..7f42fe5
--- /dev/null
+++ b/pkg/front_end/testcases/regress/issue_32660.dart.direct.transformed.expect
@@ -0,0 +1,48 @@
+library;
+import self as self;
+import "dart:core" as core;
+
+class A extends core::Object {
+ synthetic constructor •() → void
+ : super core::Object::•()
+ ;
+ method foo(core::int x) → dynamic
+ return x;
+}
+class B extends core::Object {
+ synthetic constructor •() → void
+ : super core::Object::•()
+ ;
+ method foo(core::int x, {core::int y = null}) → dynamic
+ return y;
+}
+class C extends self::A implements self::B {
+ synthetic constructor •() → void
+ : super self::A::•()
+ ;
+ method noSuchMethod(dynamic i) → dynamic {
+ core::print("No such method!");
+ return 42;
+ }
+}
+class D extends core::Object {
+ synthetic constructor •() → void
+ : super core::Object::•()
+ ;
+ method foo(core::int x) → dynamic
+ return x;
+}
+class E extends self::D {
+ synthetic constructor •() → void
+ : super self::D::•()
+ ;
+ abstract method foo(core::int x, {core::int y = null}) → dynamic;
+ method noSuchMethod(dynamic i) → dynamic {
+ core::print(i.namedArguments);
+ return 42;
+ }
+}
+static method main() → dynamic {
+ self::C c = new self::C::•();
+ self::E e = new self::E::•();
+}
diff --git a/pkg/front_end/testcases/regress/issue_32660.dart.outline.expect b/pkg/front_end/testcases/regress/issue_32660.dart.outline.expect
new file mode 100644
index 0000000..e77621d
--- /dev/null
+++ b/pkg/front_end/testcases/regress/issue_32660.dart.outline.expect
@@ -0,0 +1,37 @@
+library;
+import self as self;
+import "dart:core" as core;
+
+class A extends core::Object {
+ synthetic constructor •() → void
+ ;
+ method foo(core::int x) → dynamic
+ ;
+}
+class B extends core::Object {
+ synthetic constructor •() → void
+ ;
+ method foo(core::int x, {core::int y}) → dynamic
+ ;
+}
+class C extends self::A implements self::B {
+ synthetic constructor •() → void
+ ;
+ method noSuchMethod(dynamic i) → dynamic
+ ;
+}
+class D extends core::Object {
+ synthetic constructor •() → void
+ ;
+ method foo(core::int x) → dynamic
+ ;
+}
+class E extends self::D {
+ synthetic constructor •() → void
+ ;
+ abstract method foo(core::int x, {core::int y}) → dynamic;
+ method noSuchMethod(dynamic i) → dynamic
+ ;
+}
+static method main() → dynamic
+ ;
diff --git a/pkg/front_end/testcases/regress/issue_32660.dart.strong.expect b/pkg/front_end/testcases/regress/issue_32660.dart.strong.expect
new file mode 100644
index 0000000..057aa3f
--- /dev/null
+++ b/pkg/front_end/testcases/regress/issue_32660.dart.strong.expect
@@ -0,0 +1,73 @@
+// Errors:
+//
+// pkg/front_end/testcases/regress/issue_32660.dart:13:7: Error: The non-abstract class 'C' is missing implementations for these members:
+// 'foo'.
+// Try to either
+// - provide an implementation,
+// - inherit an implementation from a superclass or mixin,
+// - mark the class as abstract, or
+// - provide a 'noSuchMethod' implementation.
+//
+// class C extends A implements B {
+// ^
+//
+// pkg/front_end/testcases/regress/issue_32660.dart:24:7: Error: The non-abstract class 'E' is missing implementations for these members:
+// 'foo'.
+// Try to either
+// - provide an implementation,
+// - inherit an implementation from a superclass or mixin,
+// - mark the class as abstract, or
+// - provide a 'noSuchMethod' implementation.
+//
+// class E extends D {
+// ^
+
+library;
+import self as self;
+import "dart:core" as core;
+
+class A extends core::Object {
+ synthetic constructor •() → void
+ : super core::Object::•()
+ ;
+ method foo(core::int x) → dynamic
+ return x;
+}
+class B extends core::Object {
+ synthetic constructor •() → void
+ : super core::Object::•()
+ ;
+ method foo(core::int x, {core::int y = null}) → dynamic
+ return y;
+}
+class C extends self::A implements self::B {
+ synthetic constructor •() → void
+ : super self::A::•()
+ ;
+ method noSuchMethod(core::Invocation i) → dynamic {
+ core::print("No such method!");
+ return 42;
+ }
+ abstract forwarding-stub method foo(core::int x, {core::int y = null}) → dynamic;
+}
+class D extends core::Object {
+ synthetic constructor •() → void
+ : super core::Object::•()
+ ;
+ method foo(core::int x) → dynamic
+ return x;
+}
+class E extends self::D {
+ synthetic constructor •() → void
+ : super self::D::•()
+ ;
+ abstract method foo(core::int x, {core::int y = null}) → dynamic;
+ method noSuchMethod(core::Invocation i) → dynamic {
+ core::print(i.{core::Invocation::namedArguments});
+ return 42;
+ }
+}
+static method main() → dynamic {
+ self::C c = new self::C::•();
+ self::E e = new self::E::•();
+}
diff --git a/pkg/front_end/testcases/regress/issue_32972.dart b/pkg/front_end/testcases/regress/issue_32972.dart
new file mode 100644
index 0000000..23a1482
--- /dev/null
+++ b/pkg/front_end/testcases/regress/issue_32972.dart
@@ -0,0 +1,31 @@
+// 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.
+
+void foo<X>(X i) {
+ print(i);
+}
+
+class Foo {
+ static foo<X>(X i) {
+ print(i);
+ }
+
+ bar<X>(X i) {
+ print(i);
+ }
+}
+
+class Bar<X, Y> {}
+
+main() {
+ foo<String, String>("hello world");
+ foo<String>("hello world");
+ Foo.foo<int, int>(42);
+ Foo.foo<int>(42);
+ Foo f = new Foo();
+ f.bar<double, double>(42.42);
+ f.bar<double>(42.42);
+ new Bar<String>();
+ new Bar<String, String>();
+}
diff --git a/pkg/front_end/testcases/regress/issue_32972.dart.direct.expect b/pkg/front_end/testcases/regress/issue_32972.dart.direct.expect
new file mode 100644
index 0000000..720e78e
--- /dev/null
+++ b/pkg/front_end/testcases/regress/issue_32972.dart.direct.expect
@@ -0,0 +1,34 @@
+library;
+import self as self;
+import "dart:core" as core;
+
+class Foo extends core::Object {
+ synthetic constructor •() → void
+ : super core::Object::•()
+ ;
+ static method foo<X extends core::Object = dynamic>(self::Foo::foo::X i) → dynamic {
+ core::print(i);
+ }
+ method bar<X extends core::Object = dynamic>(self::Foo::bar::X i) → dynamic {
+ core::print(i);
+ }
+}
+class Bar<X extends core::Object = dynamic, Y extends core::Object = dynamic> extends core::Object {
+ synthetic constructor •() → void
+ : super core::Object::•()
+ ;
+}
+static method foo<X extends core::Object = dynamic>(self::foo::X i) → void {
+ core::print(i);
+}
+static method main() → dynamic {
+ throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#foo, 32, core::List::unmodifiable<dynamic>(<core::Type>[core::String, core::String]), core::List::unmodifiable<dynamic>(<dynamic>["hello world"]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
+ self::foo<core::String>("hello world");
+ throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#foo, 32, core::List::unmodifiable<dynamic>(<core::Type>[core::int, core::int]), core::List::unmodifiable<dynamic>(<dynamic>[42]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
+ self::Foo::foo<core::int>(42);
+ self::Foo f = new self::Foo::•();
+ f.bar<core::double, core::double>(42.42);
+ f.bar<core::double>(42.42);
+ throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#, 32, core::List::unmodifiable<dynamic>(<core::Type>[core::String]), const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
+ new self::Bar::•<core::String, core::String>();
+}
diff --git a/pkg/front_end/testcases/regress/issue_32972.dart.direct.transformed.expect b/pkg/front_end/testcases/regress/issue_32972.dart.direct.transformed.expect
new file mode 100644
index 0000000..720e78e
--- /dev/null
+++ b/pkg/front_end/testcases/regress/issue_32972.dart.direct.transformed.expect
@@ -0,0 +1,34 @@
+library;
+import self as self;
+import "dart:core" as core;
+
+class Foo extends core::Object {
+ synthetic constructor •() → void
+ : super core::Object::•()
+ ;
+ static method foo<X extends core::Object = dynamic>(self::Foo::foo::X i) → dynamic {
+ core::print(i);
+ }
+ method bar<X extends core::Object = dynamic>(self::Foo::bar::X i) → dynamic {
+ core::print(i);
+ }
+}
+class Bar<X extends core::Object = dynamic, Y extends core::Object = dynamic> extends core::Object {
+ synthetic constructor •() → void
+ : super core::Object::•()
+ ;
+}
+static method foo<X extends core::Object = dynamic>(self::foo::X i) → void {
+ core::print(i);
+}
+static method main() → dynamic {
+ throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#foo, 32, core::List::unmodifiable<dynamic>(<core::Type>[core::String, core::String]), core::List::unmodifiable<dynamic>(<dynamic>["hello world"]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
+ self::foo<core::String>("hello world");
+ throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#foo, 32, core::List::unmodifiable<dynamic>(<core::Type>[core::int, core::int]), core::List::unmodifiable<dynamic>(<dynamic>[42]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
+ self::Foo::foo<core::int>(42);
+ self::Foo f = new self::Foo::•();
+ f.bar<core::double, core::double>(42.42);
+ f.bar<core::double>(42.42);
+ throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#, 32, core::List::unmodifiable<dynamic>(<core::Type>[core::String]), const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
+ new self::Bar::•<core::String, core::String>();
+}
diff --git a/pkg/front_end/testcases/regress/issue_32972.dart.outline.expect b/pkg/front_end/testcases/regress/issue_32972.dart.outline.expect
new file mode 100644
index 0000000..e9de5cd
--- /dev/null
+++ b/pkg/front_end/testcases/regress/issue_32972.dart.outline.expect
@@ -0,0 +1,20 @@
+library;
+import self as self;
+import "dart:core" as core;
+
+class Foo extends core::Object {
+ synthetic constructor •() → void
+ ;
+ static method foo<X extends core::Object = dynamic>(self::Foo::foo::X i) → dynamic
+ ;
+ method bar<X extends core::Object = dynamic>(self::Foo::bar::X i) → dynamic
+ ;
+}
+class Bar<X extends core::Object = dynamic, Y extends core::Object = dynamic> extends core::Object {
+ synthetic constructor •() → void
+ ;
+}
+static method foo<X extends core::Object = dynamic>(self::foo::X i) → void
+ ;
+static method main() → dynamic
+ ;
diff --git a/pkg/front_end/testcases/regress/issue_32972.dart.strong.expect b/pkg/front_end/testcases/regress/issue_32972.dart.strong.expect
new file mode 100644
index 0000000..11825b0
--- /dev/null
+++ b/pkg/front_end/testcases/regress/issue_32972.dart.strong.expect
@@ -0,0 +1,52 @@
+// Errors:
+//
+// pkg/front_end/testcases/regress/issue_32972.dart:22:3: Error: Expected 1 type arguments.
+// foo<String, String>("hello world");
+// ^
+//
+// pkg/front_end/testcases/regress/issue_32972.dart:24:7: Error: Expected 1 type arguments.
+// Foo.foo<int, int>(42);
+// ^
+//
+// pkg/front_end/testcases/regress/issue_32972.dart:29:7: Error: Expected 2 type arguments.
+// new Bar<String>();
+// ^
+//
+// pkg/front_end/testcases/regress/issue_32972.dart:27:5: Error: Expected 1 type arguments.
+// f.bar<double, double>(42.42);
+// ^
+
+library;
+import self as self;
+import "dart:core" as core;
+
+class Foo extends core::Object {
+ synthetic constructor •() → void
+ : super core::Object::•()
+ ;
+ static method foo<X extends core::Object = dynamic>(self::Foo::foo::X i) → dynamic {
+ core::print(i);
+ }
+ method bar<X extends core::Object = dynamic>(self::Foo::bar::X i) → dynamic {
+ core::print(i);
+ }
+}
+class Bar<X extends core::Object = dynamic, Y extends core::Object = dynamic> extends core::Object {
+ synthetic constructor •() → void
+ : super core::Object::•()
+ ;
+}
+static method foo<X extends core::Object = dynamic>(self::foo::X i) → void {
+ core::print(i);
+}
+static method main() → dynamic {
+ throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#foo, 32, core::List::unmodifiable<dynamic>(<core::Type>[core::String, core::String]), core::List::unmodifiable<dynamic>(<dynamic>["hello world"]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
+ self::foo<core::String>("hello world");
+ throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#foo, 32, core::List::unmodifiable<dynamic>(<core::Type>[core::int, core::int]), core::List::unmodifiable<dynamic>(<dynamic>[42]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
+ self::Foo::foo<core::int>(42);
+ self::Foo f = new self::Foo::•();
+ f.{self::Foo::bar}<core::double, core::double>(42.42);
+ f.{self::Foo::bar}<core::double>(42.42);
+ throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#, 32, core::List::unmodifiable<dynamic>(<core::Type>[core::String]), const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
+ new self::Bar::•<core::String, core::String>();
+}
diff --git a/pkg/front_end/testcases/regress/issue_34225.dart b/pkg/front_end/testcases/regress/issue_34225.dart
new file mode 100644
index 0000000..e058ee7
--- /dev/null
+++ b/pkg/front_end/testcases/regress/issue_34225.dart
@@ -0,0 +1,18 @@
+// 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.
+
+class C {
+ static set C(v) {} //# 01: compile-time error
+}
+
+class D {
+ set D(v) {} //# 02: compile-time error
+}
+
+main() {
+ var c = new C();
+ c.C = 5;
+ var d = new D();
+ d.D = 5;
+}
diff --git a/pkg/front_end/testcases/regress/issue_34225.dart.direct.expect b/pkg/front_end/testcases/regress/issue_34225.dart.direct.expect
new file mode 100644
index 0000000..7c48338
--- /dev/null
+++ b/pkg/front_end/testcases/regress/issue_34225.dart.direct.expect
@@ -0,0 +1,32 @@
+// Errors:
+//
+// pkg/front_end/testcases/regress/issue_34225.dart:6:14: Error: A class member can't have the same name as the enclosing class.
+// static set C(v) {} //# 01: compile-time error
+// ^
+//
+// pkg/front_end/testcases/regress/issue_34225.dart:10:7: Error: A class member can't have the same name as the enclosing class.
+// set D(v) {} //# 02: compile-time error
+// ^
+
+library;
+import self as self;
+import "dart:core" as core;
+
+class C extends core::Object {
+ synthetic constructor •() → void
+ : super core::Object::•()
+ ;
+ static set C(dynamic v) → dynamic {}
+}
+class D extends core::Object {
+ synthetic constructor •() → void
+ : super core::Object::•()
+ ;
+ set D(dynamic v) → dynamic {}
+}
+static method main() → dynamic {
+ dynamic c = new self::C::•();
+ c.C = 5;
+ dynamic d = new self::D::•();
+ d.D = 5;
+}
diff --git a/pkg/front_end/testcases/regress/issue_34225.dart.direct.transformed.expect b/pkg/front_end/testcases/regress/issue_34225.dart.direct.transformed.expect
new file mode 100644
index 0000000..7c48338
--- /dev/null
+++ b/pkg/front_end/testcases/regress/issue_34225.dart.direct.transformed.expect
@@ -0,0 +1,32 @@
+// Errors:
+//
+// pkg/front_end/testcases/regress/issue_34225.dart:6:14: Error: A class member can't have the same name as the enclosing class.
+// static set C(v) {} //# 01: compile-time error
+// ^
+//
+// pkg/front_end/testcases/regress/issue_34225.dart:10:7: Error: A class member can't have the same name as the enclosing class.
+// set D(v) {} //# 02: compile-time error
+// ^
+
+library;
+import self as self;
+import "dart:core" as core;
+
+class C extends core::Object {
+ synthetic constructor •() → void
+ : super core::Object::•()
+ ;
+ static set C(dynamic v) → dynamic {}
+}
+class D extends core::Object {
+ synthetic constructor •() → void
+ : super core::Object::•()
+ ;
+ set D(dynamic v) → dynamic {}
+}
+static method main() → dynamic {
+ dynamic c = new self::C::•();
+ c.C = 5;
+ dynamic d = new self::D::•();
+ d.D = 5;
+}
diff --git a/pkg/front_end/testcases/regress/issue_34225.dart.outline.expect b/pkg/front_end/testcases/regress/issue_34225.dart.outline.expect
new file mode 100644
index 0000000..3625d24
--- /dev/null
+++ b/pkg/front_end/testcases/regress/issue_34225.dart.outline.expect
@@ -0,0 +1,18 @@
+library;
+import self as self;
+import "dart:core" as core;
+
+class C extends core::Object {
+ synthetic constructor •() → void
+ ;
+ static set C(dynamic v) → dynamic
+ ;
+}
+class D extends core::Object {
+ synthetic constructor •() → void
+ ;
+ set D(dynamic v) → dynamic
+ ;
+}
+static method main() → dynamic
+ ;
diff --git a/pkg/front_end/testcases/regress/issue_34225.dart.strong.expect b/pkg/front_end/testcases/regress/issue_34225.dart.strong.expect
new file mode 100644
index 0000000..90b0ea1
--- /dev/null
+++ b/pkg/front_end/testcases/regress/issue_34225.dart.strong.expect
@@ -0,0 +1,35 @@
+// Errors:
+//
+// pkg/front_end/testcases/regress/issue_34225.dart:6:14: Error: A class member can't have the same name as the enclosing class.
+// static set C(v) {} //# 01: compile-time error
+// ^
+//
+// pkg/front_end/testcases/regress/issue_34225.dart:10:7: Error: A class member can't have the same name as the enclosing class.
+// set D(v) {} //# 02: compile-time error
+// ^
+
+library;
+import self as self;
+import "dart:core" as core;
+
+class C extends core::Object {
+ synthetic constructor •() → void
+ : super core::Object::•()
+ ;
+ static set C(dynamic v) → void {}
+}
+class D extends core::Object {
+ synthetic constructor •() → void
+ : super core::Object::•()
+ ;
+ set D(dynamic v) → void {}
+}
+static method main() → dynamic {
+ self::C c = new self::C::•();
+ let final dynamic #t1 = c in let dynamic _ = null in invalid-expression "pkg/front_end/testcases/regress/issue_34225.dart:15:5: Error: The setter 'C' isn't defined for the class '#lib1::C'.
+Try correcting the name to the name of an existing setter, or defining a setter or field named 'C'.
+ c.C = 5;
+ ^";
+ self::D d = new self::D::•();
+ d.{self::D::D} = 5;
+}
diff --git a/pkg/front_end/testcases/regress/issue_34225.dart.strong.transformed.expect b/pkg/front_end/testcases/regress/issue_34225.dart.strong.transformed.expect
new file mode 100644
index 0000000..45d4bcd
--- /dev/null
+++ b/pkg/front_end/testcases/regress/issue_34225.dart.strong.transformed.expect
@@ -0,0 +1,35 @@
+// Errors:
+//
+// pkg/front_end/testcases/regress/issue_34225.dart:6:14: Error: A class member can't have the same name as the enclosing class.
+// static set C(v) {} //# 01: compile-time error
+// ^
+//
+// pkg/front_end/testcases/regress/issue_34225.dart:10:7: Error: A class member can't have the same name as the enclosing class.
+// set D(v) {} //# 02: compile-time error
+// ^
+
+library;
+import self as self;
+import "dart:core" as core;
+
+class C extends core::Object {
+ synthetic constructor •() → void
+ : super core::Object::•()
+ ;
+ static set C(dynamic v) → void {}
+}
+class D extends core::Object {
+ synthetic constructor •() → void
+ : super core::Object::•()
+ ;
+ set D(dynamic v) → void {}
+}
+static method main() → dynamic {
+ self::C c = new self::C::•();
+ let final self::C #t1 = c in let<BottomType> _ = null in invalid-expression "pkg/front_end/testcases/regress/issue_34225.dart:15:5: Error: The setter 'C' isn't defined for the class '#lib1::C'.
+Try correcting the name to the name of an existing setter, or defining a setter or field named 'C'.
+ c.C = 5;
+ ^";
+ self::D d = new self::D::•();
+ d.{self::D::D} = 5;
+}
diff --git a/pkg/front_end/testcases/regress/issue_34291.dart b/pkg/front_end/testcases/regress/issue_34291.dart
new file mode 100644
index 0000000..4011208
--- /dev/null
+++ b/pkg/front_end/testcases/regress/issue_34291.dart
@@ -0,0 +1,11 @@
+// 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 "issue_34291_lib.dart" as lib;
+
+class B {}
+
+lib.A<B> foo() {}
+
+main() {}
diff --git a/pkg/front_end/testcases/regress/issue_34291.dart.direct.expect b/pkg/front_end/testcases/regress/issue_34291.dart.direct.expect
new file mode 100644
index 0000000..ee89c3a
--- /dev/null
+++ b/pkg/front_end/testcases/regress/issue_34291.dart.direct.expect
@@ -0,0 +1,12 @@
+library;
+import self as self;
+import "dart:core" as core;
+import "./issue_34291_lib.dart" as iss;
+
+class B extends core::Object {
+ synthetic constructor •() → void
+ : super core::Object::•()
+ ;
+}
+static method foo() → iss::A {}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/regress/issue_34291.dart.direct.transformed.expect b/pkg/front_end/testcases/regress/issue_34291.dart.direct.transformed.expect
new file mode 100644
index 0000000..ee89c3a
--- /dev/null
+++ b/pkg/front_end/testcases/regress/issue_34291.dart.direct.transformed.expect
@@ -0,0 +1,12 @@
+library;
+import self as self;
+import "dart:core" as core;
+import "./issue_34291_lib.dart" as iss;
+
+class B extends core::Object {
+ synthetic constructor •() → void
+ : super core::Object::•()
+ ;
+}
+static method foo() → iss::A {}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/regress/issue_34291.dart.outline.expect b/pkg/front_end/testcases/regress/issue_34291.dart.outline.expect
new file mode 100644
index 0000000..103a1a4
--- /dev/null
+++ b/pkg/front_end/testcases/regress/issue_34291.dart.outline.expect
@@ -0,0 +1,13 @@
+library;
+import self as self;
+import "dart:core" as core;
+import "./issue_34291_lib.dart" as iss;
+
+class B extends core::Object {
+ synthetic constructor •() → void
+ ;
+}
+static method foo() → iss::A
+ ;
+static method main() → dynamic
+ ;
diff --git a/pkg/front_end/testcases/regress/issue_34291.dart.strong.expect b/pkg/front_end/testcases/regress/issue_34291.dart.strong.expect
new file mode 100644
index 0000000..8d80aa8
--- /dev/null
+++ b/pkg/front_end/testcases/regress/issue_34291.dart.strong.expect
@@ -0,0 +1,17 @@
+// Errors:
+//
+// pkg/front_end/testcases/regress/issue_34291.dart:9:1: Error: Expected 0 type arguments.
+// lib.A<B> foo() {}
+// ^
+
+library;
+import self as self;
+import "dart:core" as core;
+
+class B extends core::Object {
+ synthetic constructor •() → void
+ : super core::Object::•()
+ ;
+}
+static method foo() → invalid-type {}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/regress/issue_34291.dart.strong.transformed.expect b/pkg/front_end/testcases/regress/issue_34291.dart.strong.transformed.expect
new file mode 100644
index 0000000..8d80aa8
--- /dev/null
+++ b/pkg/front_end/testcases/regress/issue_34291.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+// Errors:
+//
+// pkg/front_end/testcases/regress/issue_34291.dart:9:1: Error: Expected 0 type arguments.
+// lib.A<B> foo() {}
+// ^
+
+library;
+import self as self;
+import "dart:core" as core;
+
+class B extends core::Object {
+ synthetic constructor •() → void
+ : super core::Object::•()
+ ;
+}
+static method foo() → invalid-type {}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/regress/issue_34291_lib.dart b/pkg/front_end/testcases/regress/issue_34291_lib.dart
new file mode 100644
index 0000000..a0e9344
--- /dev/null
+++ b/pkg/front_end/testcases/regress/issue_34291_lib.dart
@@ -0,0 +1,5 @@
+// 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.
+
+class A {}
diff --git a/pkg/front_end/testcases/strong.status b/pkg/front_end/testcases/strong.status
index b5d4f7b..587ecbc 100644
--- a/pkg/front_end/testcases/strong.status
+++ b/pkg/front_end/testcases/strong.status
@@ -59,7 +59,7 @@
redirecting_factory_typeparambounds_test: Fail # Missing support for RedirectingFactoryConstructor.
statements: Fail
stringliteral: Fail
-super_rasta_copy: TypeCheckError
+super_rasta_copy: Fail
top_level_accessors: Fail
type_variable_as_super: Fail
type_variable_prefix: RuntimeError
@@ -176,7 +176,7 @@
rasta/native_is_illegal: Fail
rasta/parser_error: Fail
rasta/static: Fail
-rasta/super: TypeCheckError
+rasta/super: Fail
rasta/super_initializer: Fail
rasta/super_mixin: TypeCheckError
rasta/super_operator: Fail
@@ -199,7 +199,10 @@
regress/issue_30836: RuntimeError # Issue 30836.
regress/issue_31184: TypeCheckError
regress/issue_31299: TypeCheckError
+regress/issue_32972: TypeCheckError
regress/issue_33452: RuntimeError # Test has an intentional error
+regress/issue_32660: TypeCheckError # Test has an intentional error
+regress/issue_34225: RuntimeError
runtime_checks_new/contravariant_generic_return_with_compound_assign_implicit_downcast: RuntimeError
runtime_checks_new/mixin_forwarding_stub_field: TypeCheckError
diff --git a/pkg/front_end/testcases/super_rasta_copy.dart.strong.expect b/pkg/front_end/testcases/super_rasta_copy.dart.strong.expect
index 66896c4..a923b10 100644
--- a/pkg/front_end/testcases/super_rasta_copy.dart.strong.expect
+++ b/pkg/front_end/testcases/super_rasta_copy.dart.strong.expect
@@ -203,12 +203,12 @@
// pkg/front_end/testcases/super_rasta_copy.dart:139:12: Error: Too many positional arguments: 0 allowed, but 1 found.
// Try removing the extra positional arguments.
// super.m(87);
-// ^^^^
+// ^
//
// pkg/front_end/testcases/super_rasta_copy.dart:140:16: Error: Too many positional arguments: 0 allowed, but 1 found.
// Try removing the extra positional arguments.
// use(super.m(87));
-// ^^^^
+// ^
//
// pkg/front_end/testcases/super_rasta_copy.dart:14:9: Error: Final field 'f' is not initialized.
// Try to initialize the field in the declaration or in every constructor.
diff --git a/pkg/front_end/testcases/type_variable_prefix.dart.strong.expect b/pkg/front_end/testcases/type_variable_prefix.dart.strong.expect
index 6615790..837254e 100644
--- a/pkg/front_end/testcases/type_variable_prefix.dart.strong.expect
+++ b/pkg/front_end/testcases/type_variable_prefix.dart.strong.expect
@@ -1,6 +1,6 @@
// Errors:
//
-// pkg/front_end/testcases/type_variable_prefix.dart:8:3: Error: Type 'T.String' not found.
+// pkg/front_end/testcases/type_variable_prefix.dart:8:3: Error: 'T.String' can't be used as a type because 'T' doesn't refer to an import prefix.
// T.String method() => "Hello, World!";
// ^
diff --git a/pkg/front_end/testcases/type_variable_prefix.dart.strong.transformed.expect b/pkg/front_end/testcases/type_variable_prefix.dart.strong.transformed.expect
index 6e7ca74..9c9e30c 100644
--- a/pkg/front_end/testcases/type_variable_prefix.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/type_variable_prefix.dart.strong.transformed.expect
@@ -1,6 +1,6 @@
// Errors:
//
-// pkg/front_end/testcases/type_variable_prefix.dart:8:3: Error: Type 'T.String' not found.
+// pkg/front_end/testcases/type_variable_prefix.dart:8:3: Error: 'T.String' can't be used as a type because 'T' doesn't refer to an import prefix.
// T.String method() => "Hello, World!";
// ^
diff --git a/pkg/front_end/testcases/type_variable_uses.dart b/pkg/front_end/testcases/type_variable_uses.dart
new file mode 100644
index 0000000..a366ce6
--- /dev/null
+++ b/pkg/front_end/testcases/type_variable_uses.dart
@@ -0,0 +1,32 @@
+// 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.
+
+class C<T> {
+ const C();
+ static C<T> staticMethod() {
+ print(T);
+ T t;
+ C<T> l;
+ C<C<T>> ll;
+ const C<T>();
+ const <T>[];
+ const <C<T>>[];
+ const <Object>[T];
+ const <Object>[const C<T>()];
+ }
+
+ C<T> instanceMethod() {
+ print(T);
+ T t;
+ C<T> l;
+ C<C<T>> ll;
+ const C<T>();
+ const <T>[];
+ const <C<T>>[];
+ const <Object>[T];
+ const <Object>[const C<T>()];
+ }
+}
+
+main() {}
diff --git a/pkg/front_end/testcases/type_variable_uses.dart.direct.expect b/pkg/front_end/testcases/type_variable_uses.dart.direct.expect
new file mode 100644
index 0000000..a22eb9c
--- /dev/null
+++ b/pkg/front_end/testcases/type_variable_uses.dart.direct.expect
@@ -0,0 +1,118 @@
+// Errors:
+//
+// pkg/front_end/testcases/type_variable_uses.dart:8:11: Error: Type variables can't be used in static members.
+// print(T);
+// ^
+//
+// pkg/front_end/testcases/type_variable_uses.dart:12:13: Error: Not a constant expression.
+// const C<T>();
+// ^
+//
+// pkg/front_end/testcases/type_variable_uses.dart:12:13: Error: Type variables can't be used in static members.
+// const C<T>();
+// ^
+//
+// pkg/front_end/testcases/type_variable_uses.dart:13:12: Error: Not a constant expression.
+// const <T>[];
+// ^
+//
+// pkg/front_end/testcases/type_variable_uses.dart:13:12: Error: Type variables can't be used in static members.
+// const <T>[];
+// ^
+//
+// pkg/front_end/testcases/type_variable_uses.dart:14:14: Error: Not a constant expression.
+// const <C<T>>[];
+// ^
+//
+// pkg/front_end/testcases/type_variable_uses.dart:14:14: Error: Type variables can't be used in static members.
+// const <C<T>>[];
+// ^
+//
+// pkg/front_end/testcases/type_variable_uses.dart:15:20: Error: Not a constant expression.
+// const <Object>[T];
+// ^
+//
+// pkg/front_end/testcases/type_variable_uses.dart:15:20: Error: Type variables can't be used in static members.
+// const <Object>[T];
+// ^
+//
+// pkg/front_end/testcases/type_variable_uses.dart:16:28: Error: Not a constant expression.
+// const <Object>[const C<T>()];
+// ^
+//
+// pkg/front_end/testcases/type_variable_uses.dart:16:28: Error: Type variables can't be used in static members.
+// const <Object>[const C<T>()];
+// ^
+//
+// pkg/front_end/testcases/type_variable_uses.dart:24:13: Error: Not a constant expression.
+// const C<T>();
+// ^
+//
+// pkg/front_end/testcases/type_variable_uses.dart:24:13: Error: Type variables can't be used as constants.
+// const C<T>();
+// ^
+//
+// pkg/front_end/testcases/type_variable_uses.dart:25:12: Error: Not a constant expression.
+// const <T>[];
+// ^
+//
+// pkg/front_end/testcases/type_variable_uses.dart:25:12: Error: Type variables can't be used as constants.
+// const <T>[];
+// ^
+//
+// pkg/front_end/testcases/type_variable_uses.dart:26:14: Error: Not a constant expression.
+// const <C<T>>[];
+// ^
+//
+// pkg/front_end/testcases/type_variable_uses.dart:26:14: Error: Type variables can't be used as constants.
+// const <C<T>>[];
+// ^
+//
+// pkg/front_end/testcases/type_variable_uses.dart:27:20: Error: Not a constant expression.
+// const <Object>[T];
+// ^
+//
+// pkg/front_end/testcases/type_variable_uses.dart:27:20: Error: Type variables can't be used as constants.
+// const <Object>[T];
+// ^
+//
+// pkg/front_end/testcases/type_variable_uses.dart:28:28: Error: Not a constant expression.
+// const <Object>[const C<T>()];
+// ^
+//
+// pkg/front_end/testcases/type_variable_uses.dart:28:28: Error: Type variables can't be used as constants.
+// const <Object>[const C<T>()];
+// ^
+
+library;
+import self as self;
+import "dart:core" as core;
+
+class C<T extends core::Object = dynamic> extends core::Object {
+ const constructor •() → void
+ : super core::Object::•()
+ ;
+ static method staticMethod() → self::C<dynamic> {
+ core::print(invalid-type);
+ invalid-type t;
+ self::C<invalid-type> l;
+ self::C<self::C<invalid-type>> ll;
+ const self::C::•<invalid-type>();
+ const <invalid-type>[];
+ const <self::C<invalid-type>>[];
+ const <core::Object>[invalid-type];
+ const <core::Object>[const self::C::•<invalid-type>()];
+ }
+ method instanceMethod() → self::C<self::C::T> {
+ core::print(self::C::T);
+ self::C::T t;
+ self::C<self::C::T> l;
+ self::C<self::C<self::C::T>> ll;
+ const self::C::•<self::C::T>();
+ const <self::C::T>[];
+ const <self::C<self::C::T>>[];
+ const <core::Object>[self::C::T];
+ const <core::Object>[const self::C::•<self::C::T>()];
+ }
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/type_variable_uses.dart.direct.transformed.expect b/pkg/front_end/testcases/type_variable_uses.dart.direct.transformed.expect
new file mode 100644
index 0000000..a22eb9c
--- /dev/null
+++ b/pkg/front_end/testcases/type_variable_uses.dart.direct.transformed.expect
@@ -0,0 +1,118 @@
+// Errors:
+//
+// pkg/front_end/testcases/type_variable_uses.dart:8:11: Error: Type variables can't be used in static members.
+// print(T);
+// ^
+//
+// pkg/front_end/testcases/type_variable_uses.dart:12:13: Error: Not a constant expression.
+// const C<T>();
+// ^
+//
+// pkg/front_end/testcases/type_variable_uses.dart:12:13: Error: Type variables can't be used in static members.
+// const C<T>();
+// ^
+//
+// pkg/front_end/testcases/type_variable_uses.dart:13:12: Error: Not a constant expression.
+// const <T>[];
+// ^
+//
+// pkg/front_end/testcases/type_variable_uses.dart:13:12: Error: Type variables can't be used in static members.
+// const <T>[];
+// ^
+//
+// pkg/front_end/testcases/type_variable_uses.dart:14:14: Error: Not a constant expression.
+// const <C<T>>[];
+// ^
+//
+// pkg/front_end/testcases/type_variable_uses.dart:14:14: Error: Type variables can't be used in static members.
+// const <C<T>>[];
+// ^
+//
+// pkg/front_end/testcases/type_variable_uses.dart:15:20: Error: Not a constant expression.
+// const <Object>[T];
+// ^
+//
+// pkg/front_end/testcases/type_variable_uses.dart:15:20: Error: Type variables can't be used in static members.
+// const <Object>[T];
+// ^
+//
+// pkg/front_end/testcases/type_variable_uses.dart:16:28: Error: Not a constant expression.
+// const <Object>[const C<T>()];
+// ^
+//
+// pkg/front_end/testcases/type_variable_uses.dart:16:28: Error: Type variables can't be used in static members.
+// const <Object>[const C<T>()];
+// ^
+//
+// pkg/front_end/testcases/type_variable_uses.dart:24:13: Error: Not a constant expression.
+// const C<T>();
+// ^
+//
+// pkg/front_end/testcases/type_variable_uses.dart:24:13: Error: Type variables can't be used as constants.
+// const C<T>();
+// ^
+//
+// pkg/front_end/testcases/type_variable_uses.dart:25:12: Error: Not a constant expression.
+// const <T>[];
+// ^
+//
+// pkg/front_end/testcases/type_variable_uses.dart:25:12: Error: Type variables can't be used as constants.
+// const <T>[];
+// ^
+//
+// pkg/front_end/testcases/type_variable_uses.dart:26:14: Error: Not a constant expression.
+// const <C<T>>[];
+// ^
+//
+// pkg/front_end/testcases/type_variable_uses.dart:26:14: Error: Type variables can't be used as constants.
+// const <C<T>>[];
+// ^
+//
+// pkg/front_end/testcases/type_variable_uses.dart:27:20: Error: Not a constant expression.
+// const <Object>[T];
+// ^
+//
+// pkg/front_end/testcases/type_variable_uses.dart:27:20: Error: Type variables can't be used as constants.
+// const <Object>[T];
+// ^
+//
+// pkg/front_end/testcases/type_variable_uses.dart:28:28: Error: Not a constant expression.
+// const <Object>[const C<T>()];
+// ^
+//
+// pkg/front_end/testcases/type_variable_uses.dart:28:28: Error: Type variables can't be used as constants.
+// const <Object>[const C<T>()];
+// ^
+
+library;
+import self as self;
+import "dart:core" as core;
+
+class C<T extends core::Object = dynamic> extends core::Object {
+ const constructor •() → void
+ : super core::Object::•()
+ ;
+ static method staticMethod() → self::C<dynamic> {
+ core::print(invalid-type);
+ invalid-type t;
+ self::C<invalid-type> l;
+ self::C<self::C<invalid-type>> ll;
+ const self::C::•<invalid-type>();
+ const <invalid-type>[];
+ const <self::C<invalid-type>>[];
+ const <core::Object>[invalid-type];
+ const <core::Object>[const self::C::•<invalid-type>()];
+ }
+ method instanceMethod() → self::C<self::C::T> {
+ core::print(self::C::T);
+ self::C::T t;
+ self::C<self::C::T> l;
+ self::C<self::C<self::C::T>> ll;
+ const self::C::•<self::C::T>();
+ const <self::C::T>[];
+ const <self::C<self::C::T>>[];
+ const <core::Object>[self::C::T];
+ const <core::Object>[const self::C::•<self::C::T>()];
+ }
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/type_variable_uses.dart.outline.expect b/pkg/front_end/testcases/type_variable_uses.dart.outline.expect
new file mode 100644
index 0000000..c58ea8f
--- /dev/null
+++ b/pkg/front_end/testcases/type_variable_uses.dart.outline.expect
@@ -0,0 +1,14 @@
+library;
+import self as self;
+import "dart:core" as core;
+
+class C<T extends core::Object = dynamic> extends core::Object {
+ const constructor •() → void
+ ;
+ static method staticMethod() → self::C<dynamic>
+ ;
+ method instanceMethod() → self::C<self::C::T>
+ ;
+}
+static method main() → dynamic
+ ;
diff --git a/pkg/front_end/testcases/type_variable_uses.dart.strong.expect b/pkg/front_end/testcases/type_variable_uses.dart.strong.expect
new file mode 100644
index 0000000..83deeb2
--- /dev/null
+++ b/pkg/front_end/testcases/type_variable_uses.dart.strong.expect
@@ -0,0 +1,134 @@
+// Errors:
+//
+// pkg/front_end/testcases/type_variable_uses.dart:7:15: Error: Can only use type variables in instance methods.
+// static C<T> staticMethod() {
+// ^
+//
+// pkg/front_end/testcases/type_variable_uses.dart:8:11: Error: Type variables can't be used in static members.
+// print(T);
+// ^
+//
+// pkg/front_end/testcases/type_variable_uses.dart:9:5: Error: Type variables can't be used in static members.
+// T t;
+// ^
+//
+// pkg/front_end/testcases/type_variable_uses.dart:10:7: Error: Type variables can't be used in static members.
+// C<T> l;
+// ^
+//
+// pkg/front_end/testcases/type_variable_uses.dart:11:9: Error: Type variables can't be used in static members.
+// C<C<T>> ll;
+// ^
+//
+// pkg/front_end/testcases/type_variable_uses.dart:12:13: Error: Not a constant expression.
+// const C<T>();
+// ^
+//
+// pkg/front_end/testcases/type_variable_uses.dart:12:13: Error: Type variables can't be used in static members.
+// const C<T>();
+// ^
+//
+// pkg/front_end/testcases/type_variable_uses.dart:13:12: Error: Not a constant expression.
+// const <T>[];
+// ^
+//
+// pkg/front_end/testcases/type_variable_uses.dart:13:12: Error: Type variables can't be used in static members.
+// const <T>[];
+// ^
+//
+// pkg/front_end/testcases/type_variable_uses.dart:14:14: Error: Not a constant expression.
+// const <C<T>>[];
+// ^
+//
+// pkg/front_end/testcases/type_variable_uses.dart:14:14: Error: Type variables can't be used in static members.
+// const <C<T>>[];
+// ^
+//
+// pkg/front_end/testcases/type_variable_uses.dart:15:20: Error: Not a constant expression.
+// const <Object>[T];
+// ^
+//
+// pkg/front_end/testcases/type_variable_uses.dart:15:20: Error: Type variables can't be used in static members.
+// const <Object>[T];
+// ^
+//
+// pkg/front_end/testcases/type_variable_uses.dart:16:28: Error: Not a constant expression.
+// const <Object>[const C<T>()];
+// ^
+//
+// pkg/front_end/testcases/type_variable_uses.dart:16:28: Error: Type variables can't be used in static members.
+// const <Object>[const C<T>()];
+// ^
+//
+// pkg/front_end/testcases/type_variable_uses.dart:24:13: Error: Not a constant expression.
+// const C<T>();
+// ^
+//
+// pkg/front_end/testcases/type_variable_uses.dart:24:13: Error: Type variables can't be used as constants.
+// const C<T>();
+// ^
+//
+// pkg/front_end/testcases/type_variable_uses.dart:25:12: Error: Not a constant expression.
+// const <T>[];
+// ^
+//
+// pkg/front_end/testcases/type_variable_uses.dart:25:12: Error: Type variables can't be used as constants.
+// const <T>[];
+// ^
+//
+// pkg/front_end/testcases/type_variable_uses.dart:26:14: Error: Not a constant expression.
+// const <C<T>>[];
+// ^
+//
+// pkg/front_end/testcases/type_variable_uses.dart:26:14: Error: Type variables can't be used as constants.
+// const <C<T>>[];
+// ^
+//
+// pkg/front_end/testcases/type_variable_uses.dart:27:20: Error: Not a constant expression.
+// const <Object>[T];
+// ^
+//
+// pkg/front_end/testcases/type_variable_uses.dart:27:20: Error: Type variables can't be used as constants.
+// const <Object>[T];
+// ^
+//
+// pkg/front_end/testcases/type_variable_uses.dart:28:28: Error: Not a constant expression.
+// const <Object>[const C<T>()];
+// ^
+//
+// pkg/front_end/testcases/type_variable_uses.dart:28:28: Error: Type variables can't be used as constants.
+// const <Object>[const C<T>()];
+// ^
+
+library;
+import self as self;
+import "dart:core" as core;
+
+class C<T extends core::Object = dynamic> extends core::Object {
+ const constructor •() → void
+ : super core::Object::•()
+ ;
+ static method staticMethod() → self::C<dynamic> {
+ core::print(invalid-type);
+ invalid-type t;
+ self::C<invalid-type> l;
+ self::C<self::C<invalid-type>> ll;
+ const self::C::•<invalid-type>();
+ const <invalid-type>[];
+ const <self::C<invalid-type>>[];
+ const <core::Object>[invalid-type];
+ const <core::Object>[const self::C::•<invalid-type>()];
+ }
+ method instanceMethod() → self::C<self::C::T> {
+ core::print(self::C::T);
+ self::C::T t;
+ self::C<self::C::T> l;
+ self::C<self::C<self::C::T>> ll;
+ const self::C::•<self::C::T>();
+ const <self::C::T>[];
+ const <self::C<self::C::T>>[];
+ const <core::Object>[self::C::T];
+ const <core::Object>[const self::C::•<self::C::T>()];
+ }
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/type_variable_uses.dart.strong.transformed.expect b/pkg/front_end/testcases/type_variable_uses.dart.strong.transformed.expect
new file mode 100644
index 0000000..83deeb2
--- /dev/null
+++ b/pkg/front_end/testcases/type_variable_uses.dart.strong.transformed.expect
@@ -0,0 +1,134 @@
+// Errors:
+//
+// pkg/front_end/testcases/type_variable_uses.dart:7:15: Error: Can only use type variables in instance methods.
+// static C<T> staticMethod() {
+// ^
+//
+// pkg/front_end/testcases/type_variable_uses.dart:8:11: Error: Type variables can't be used in static members.
+// print(T);
+// ^
+//
+// pkg/front_end/testcases/type_variable_uses.dart:9:5: Error: Type variables can't be used in static members.
+// T t;
+// ^
+//
+// pkg/front_end/testcases/type_variable_uses.dart:10:7: Error: Type variables can't be used in static members.
+// C<T> l;
+// ^
+//
+// pkg/front_end/testcases/type_variable_uses.dart:11:9: Error: Type variables can't be used in static members.
+// C<C<T>> ll;
+// ^
+//
+// pkg/front_end/testcases/type_variable_uses.dart:12:13: Error: Not a constant expression.
+// const C<T>();
+// ^
+//
+// pkg/front_end/testcases/type_variable_uses.dart:12:13: Error: Type variables can't be used in static members.
+// const C<T>();
+// ^
+//
+// pkg/front_end/testcases/type_variable_uses.dart:13:12: Error: Not a constant expression.
+// const <T>[];
+// ^
+//
+// pkg/front_end/testcases/type_variable_uses.dart:13:12: Error: Type variables can't be used in static members.
+// const <T>[];
+// ^
+//
+// pkg/front_end/testcases/type_variable_uses.dart:14:14: Error: Not a constant expression.
+// const <C<T>>[];
+// ^
+//
+// pkg/front_end/testcases/type_variable_uses.dart:14:14: Error: Type variables can't be used in static members.
+// const <C<T>>[];
+// ^
+//
+// pkg/front_end/testcases/type_variable_uses.dart:15:20: Error: Not a constant expression.
+// const <Object>[T];
+// ^
+//
+// pkg/front_end/testcases/type_variable_uses.dart:15:20: Error: Type variables can't be used in static members.
+// const <Object>[T];
+// ^
+//
+// pkg/front_end/testcases/type_variable_uses.dart:16:28: Error: Not a constant expression.
+// const <Object>[const C<T>()];
+// ^
+//
+// pkg/front_end/testcases/type_variable_uses.dart:16:28: Error: Type variables can't be used in static members.
+// const <Object>[const C<T>()];
+// ^
+//
+// pkg/front_end/testcases/type_variable_uses.dart:24:13: Error: Not a constant expression.
+// const C<T>();
+// ^
+//
+// pkg/front_end/testcases/type_variable_uses.dart:24:13: Error: Type variables can't be used as constants.
+// const C<T>();
+// ^
+//
+// pkg/front_end/testcases/type_variable_uses.dart:25:12: Error: Not a constant expression.
+// const <T>[];
+// ^
+//
+// pkg/front_end/testcases/type_variable_uses.dart:25:12: Error: Type variables can't be used as constants.
+// const <T>[];
+// ^
+//
+// pkg/front_end/testcases/type_variable_uses.dart:26:14: Error: Not a constant expression.
+// const <C<T>>[];
+// ^
+//
+// pkg/front_end/testcases/type_variable_uses.dart:26:14: Error: Type variables can't be used as constants.
+// const <C<T>>[];
+// ^
+//
+// pkg/front_end/testcases/type_variable_uses.dart:27:20: Error: Not a constant expression.
+// const <Object>[T];
+// ^
+//
+// pkg/front_end/testcases/type_variable_uses.dart:27:20: Error: Type variables can't be used as constants.
+// const <Object>[T];
+// ^
+//
+// pkg/front_end/testcases/type_variable_uses.dart:28:28: Error: Not a constant expression.
+// const <Object>[const C<T>()];
+// ^
+//
+// pkg/front_end/testcases/type_variable_uses.dart:28:28: Error: Type variables can't be used as constants.
+// const <Object>[const C<T>()];
+// ^
+
+library;
+import self as self;
+import "dart:core" as core;
+
+class C<T extends core::Object = dynamic> extends core::Object {
+ const constructor •() → void
+ : super core::Object::•()
+ ;
+ static method staticMethod() → self::C<dynamic> {
+ core::print(invalid-type);
+ invalid-type t;
+ self::C<invalid-type> l;
+ self::C<self::C<invalid-type>> ll;
+ const self::C::•<invalid-type>();
+ const <invalid-type>[];
+ const <self::C<invalid-type>>[];
+ const <core::Object>[invalid-type];
+ const <core::Object>[const self::C::•<invalid-type>()];
+ }
+ method instanceMethod() → self::C<self::C::T> {
+ core::print(self::C::T);
+ self::C::T t;
+ self::C<self::C::T> l;
+ self::C<self::C<self::C::T>> ll;
+ const self::C::•<self::C::T>();
+ const <self::C::T>[];
+ const <self::C<self::C::T>>[];
+ const <core::Object>[self::C::T];
+ const <core::Object>[const self::C::•<self::C::T>()];
+ }
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/tool/_fasta/generate_messages.dart b/pkg/front_end/tool/_fasta/generate_messages.dart
index 7e491f1..ea27462 100644
--- a/pkg/front_end/tool/_fasta/generate_messages.dart
+++ b/pkg/front_end/tool/_fasta/generate_messages.dart
@@ -56,7 +56,7 @@
throw "No 'template:' in key $name.";
}
sb.writeln(compileTemplate(name, map['template'], map['tip'],
- map['analyzerCode'], map['dart2jsCode'], map['severity']));
+ map['analyzerCode'], map['severity']));
}
return new DartFormatter().format("$sb");
@@ -66,7 +66,7 @@
new RegExp("#\([-a-zA-Z0-9_]+\)(?:%\([0-9]*\)\.\([0-9]+\))?");
String compileTemplate(String name, String template, String tip,
- String analyzerCode, String dart2jsCode, String severity) {
+ String analyzerCode, String severity) {
if (template == null) {
print('Error: missing template for message: $name');
exitCode = 1;
@@ -79,6 +79,15 @@
var parameters = new Set<String>();
var conversions = new Set<String>();
var arguments = new Set<String>();
+ bool hasNameSystem = false;
+ void ensureNameSystem() {
+ if (hasNameSystem) return;
+ conversions.add(r"""
+NameSystem nameSystem = new NameSystem();
+StringBuffer buffer;""");
+ hasNameSystem = true;
+ }
+
for (Match match in placeholderPattern.allMatches("$template${tip ?? ''}")) {
String name = match[1];
String padding = match[2];
@@ -161,9 +170,9 @@
case "type":
parameters.add("DartType _type");
+ ensureNameSystem();
conversions.add(r"""
-NameSystem nameSystem = new NameSystem();
-StringBuffer buffer = new StringBuffer();
+buffer = new StringBuffer();
new Printer(buffer, syntheticNames: nameSystem).writeNode(_type);
String type = '$buffer';
""");
@@ -172,6 +181,7 @@
case "type2":
parameters.add("DartType _type2");
+ ensureNameSystem();
conversions.add(r"""
buffer = new StringBuffer();
new Printer(buffer, syntheticNames: nameSystem).writeNode(_type2);
@@ -209,8 +219,16 @@
break;
case "constant":
- parameters.add("Constant constant");
- arguments.add("'constant': constant");
+ parameters.add("Constant _constant");
+ ensureNameSystem();
+ conversions.add(r"""
+buffer = new StringBuffer();
+new Printer(buffer, syntheticNames: nameSystem).writeNode(_constant);
+String constant = '$buffer';
+""");
+
+ arguments.add("'constant': _constant");
+
break;
case "num1":
@@ -247,9 +265,6 @@
if (analyzerCode != null) {
codeArguments.add('analyzerCode: "$analyzerCode"');
}
- if (dart2jsCode != null) {
- codeArguments.add('dart2jsCode: "$dart2jsCode"');
- }
if (severity != null) {
String severityEnumName = severityEnumNames[severity];
if (severityEnumName == null) {
diff --git a/pkg/front_end/tool/perf.dart b/pkg/front_end/tool/perf.dart
index b15dfa4..335dcd4 100644
--- a/pkg/front_end/tool/perf.dart
+++ b/pkg/front_end/tool/perf.dart
@@ -29,10 +29,6 @@
import 'package:analyzer/src/generated/parser.dart';
import 'package:analyzer/src/generated/source.dart';
import 'package:analyzer/src/generated/source_io.dart';
-import 'package:analyzer/src/summary/format.dart';
-import 'package:analyzer/src/summary/idl.dart';
-import 'package:analyzer/src/summary/link.dart';
-import 'package:analyzer/src/summary/summarize_ast.dart';
import 'package:front_end/src/fasta/scanner.dart';
import 'package:front_end/src/scanner/token.dart';
import 'package:package_config/discovery.dart';
@@ -54,10 +50,6 @@
var handlers = {
'scan': () async => scanFiles(files),
'parse': () async => parseFiles(files),
- 'unlinked_summarize': () async => summarize(files),
- 'unlinked_summarize_from_sources': () async => summarize(files),
- 'prelinked_summarize': () async => summarize(files, prelink: true),
- 'linked_summarize': () async => summarize(files, link: true),
};
var handler = handlers[bench];
@@ -81,9 +73,6 @@
/// Cumulative time spent parsing.
Stopwatch parseTimer = new Stopwatch();
-/// Cumulative time spent building unlinked summaries.
-Stopwatch unlinkedSummarizeTimer = new Stopwatch();
-
/// Cumulative time spent scanning.
Stopwatch scanTimer = new Stopwatch();
@@ -108,62 +97,12 @@
}
}
-/// Generates unlinkmed summaries for all files in [files], and returns them in
-/// an [_UnlinkedSummaries] container.
-_UnlinkedSummaries generateUnlinkedSummaries(Set<Source> files) {
- var unlinkedSummaries = new _UnlinkedSummaries();
- for (var source in files) {
- unlinkedSummaries.summariesByUri[source.uri.toString()] =
- unlinkedSummarize(source);
- }
- return unlinkedSummaries;
-}
-
-/// Generates unlinked summaries for every file in [files] and, if requested via
-/// [prelink] or [link], generates the pre-linked and linked summaries as well.
-///
-/// This function also prints a report of the time spent on each action.
-void summarize(Set<Source> files, {bool prelink: false, bool link: false}) {
- scanTimer = new Stopwatch();
- parseTimer = new Stopwatch();
- unlinkedSummarizeTimer = new Stopwatch();
- var unlinkedSummaries = generateUnlinkedSummaries(files);
- report('scan', scanTimer.elapsedMicroseconds);
- report('parse', parseTimer.elapsedMicroseconds);
- report('unlinked_summarize', unlinkedSummarizeTimer.elapsedMicroseconds);
- report(
- 'unlinked_summarize_from_sources',
- unlinkedSummarizeTimer.elapsedMicroseconds +
- parseTimer.elapsedMicroseconds +
- scanTimer.elapsedMicroseconds);
-
- if (prelink || link) {
- var prelinkTimer = new Stopwatch()..start();
- var prelinkedLibraries = prelinkSummaries(files, unlinkedSummaries);
- prelinkTimer.stop();
- report('prelinked_summarize', prelinkTimer.elapsedMicroseconds);
-
- if (link) {
- var linkTimer = new Stopwatch()..start();
- LinkedLibrary getDependency(String uri) {
- // getDependency should never be called because all dependencies are
- // present in [prelinkedLibraries].
- print('Warning: getDependency called for: $uri');
- return null;
- }
-
- relink(prelinkedLibraries, getDependency, unlinkedSummaries.getUnit,
- true /*strong*/);
- linkTimer.stop();
- report('linked_summarize', linkTimer.elapsedMicroseconds);
- }
- }
-}
-
/// Uses the diet-parser to parse only directives in [source].
CompilationUnit parseDirectives(Source source) {
var token = tokenize(source);
- var parser = new Parser(source, AnalysisErrorListener.NULL_LISTENER);
+ // TODO(jcollins-g): Make parser work with Fasta
+ var parser =
+ new Parser(source, AnalysisErrorListener.NULL_LISTENER, useFasta: false);
return parser.parseDirectives(token);
}
@@ -189,20 +128,6 @@
return unit;
}
-/// Prelinks all the summaries for [files], using [unlinkedSummaries] to obtain
-/// their unlinked summaries.
-///
-/// The return value is suitable for passing to the summary linker.
-Map<String, LinkedLibraryBuilder> prelinkSummaries(
- Set<Source> files, _UnlinkedSummaries unlinkedSummaries) {
- Set<String> libraryUris = files.map((source) => '${source.uri}').toSet();
-
- String getDeclaredVariable(String s) => null;
- var prelinkedLibraries =
- setupForLink(libraryUris, unlinkedSummaries.getUnit, getDeclaredVariable);
- return prelinkedLibraries;
-}
-
/// Report that metric [name] took [time] micro-seconds to process
/// [inputSize] characters.
void report(String name, int time) {
@@ -296,14 +221,6 @@
return token;
}
-UnlinkedUnitBuilder unlinkedSummarize(Source source) {
- var unit = parseFull(source);
- unlinkedSummarizeTimer.start();
- var unlinkedUnit = serializeAstUnlinked(unit);
- unlinkedSummarizeTimer.stop();
- return unlinkedUnit;
-}
-
String _findSdkPath() {
var executable = Platform.resolvedExecutable;
var executableDir = path.dirname(executable);
@@ -319,18 +236,3 @@
// Not found; guess "sdk" relative to the current directory.
return new Directory('sdk').absolute.path;
}
-
-/// Simple container for a mapping from URI string to an unlinked summary.
-class _UnlinkedSummaries {
- final summariesByUri = <String, UnlinkedUnit>{};
-
- /// Get the unlinked summary for the given URI, and report a warning if it
- /// can't be found.
- UnlinkedUnit getUnit(String uri) {
- var result = summariesByUri[uri];
- if (result == null) {
- print('Warning: no summary found for: $uri');
- }
- return result;
- }
-}
diff --git a/pkg/front_end/tool/perf_test.dart b/pkg/front_end/tool/perf_test.dart
index 678c69b..7b54fb8 100644
--- a/pkg/front_end/tool/perf_test.dart
+++ b/pkg/front_end/tool/perf_test.dart
@@ -8,7 +8,7 @@
import 'perf.dart' as m;
main() async {
- var benchIds = ['scan', 'parse', 'linked_summarize'];
+ var benchIds = ['scan', 'parse'];
var inputFile =
Platform.script.resolve('../lib/src/api_prototype/file_system.dart').path;
for (var id in benchIds) {
diff --git a/pkg/js_ast/lib/src/builder.dart b/pkg/js_ast/lib/src/builder.dart
index 1de3981..414f8b0 100644
--- a/pkg/js_ast/lib/src/builder.dart
+++ b/pkg/js_ast/lib/src/builder.dart
@@ -827,9 +827,9 @@
}
lastCategory = NUMERIC;
lastToken = src.substring(lastPosition, position);
- int.parse(lastToken, onError: (_) {
+ if (int.tryParse(lastToken) == null) {
error("Unparseable number");
- });
+ }
} else if (code == charCodes.$SLASH) {
// Tokens that start with / are special due to regexp literals.
lastCategory = SYMBOL;
@@ -861,9 +861,9 @@
lastCategory = cat;
lastToken = src.substring(lastPosition, position);
if (cat == NUMERIC) {
- double.parse(lastToken, (_) {
+ if (double.tryParse(lastToken) == null) {
error("Unparseable number");
- });
+ }
} else if (cat == SYMBOL) {
int binaryPrecendence = BINARY_PRECEDENCE[lastToken];
if (binaryPrecendence == null && !UNARY_OPERATORS.contains(lastToken)) {
diff --git a/pkg/kernel/lib/ast.dart b/pkg/kernel/lib/ast.dart
index bd7286f..59c4823 100644
--- a/pkg/kernel/lib/ast.dart
+++ b/pkg/kernel/lib/ast.dart
@@ -1050,6 +1050,9 @@
/// Returns true if this is an abstract procedure.
bool get isAbstract => false;
+ /// Returns true if the member has the 'const' modifier.
+ bool get isConst;
+
/// True if this is a field or non-setter procedure.
///
/// Note that operators and factories return `true`, even though there are
diff --git a/pkg/kernel/test/metadata_test.dart b/pkg/kernel/test/metadata_test.dart
index 4607413..02cf108 100644
--- a/pkg/kernel/test/metadata_test.dart
+++ b/pkg/kernel/test/metadata_test.dart
@@ -150,7 +150,7 @@
main() {
test('annotate-serialize-deserialize-validate', () async {
final Uri platform =
- computePlatformBinariesLocation().resolve("vm_platform.dill");
+ computePlatformBinariesLocation().resolve("vm_platform_strong.dill");
final List<int> platformBinary =
await new File(platform.toFilePath()).readAsBytes();
diff --git a/pkg/pkg.status b/pkg/pkg.status
index 3077d69..be355c6 100644
--- a/pkg/pkg.status
+++ b/pkg/pkg.status
@@ -96,10 +96,10 @@
[ $runtime == vm ]
analysis_server/test/benchmarks_test: Pass, Slow
-analysis_server/test/completion_test: Pass, Slow
analysis_server/test/domain_completion_test: Pass, Slow
analysis_server/test/edit/refactoring_test: Pass, Slow
analysis_server/test/integration/*: Pass, Slow
+analysis_server/test/integration/analysis/package_root_test: Pass, RuntimeError # Issue 33382
analysis_server/test/integration/search/find_top_level_declarations_test: Pass, RuntimeError # 31571
analysis_server/test/services/completion/dart/imported_reference_contributor_test: Pass, Slow
analysis_server/test/services/completion/dart/keyword_contributor_test: Pass, Slow
@@ -107,7 +107,6 @@
analysis_server/test/services/completion/dart/local_reference_contributor_test: Pass, Slow
analysis_server/test/services/completion/dart/type_member_contributor_test: Pass, Slow
analysis_server/test/services/correction/assist_test: Pass, Slow
-analysis_server/test/services/correction/fix_test: Pass, Slow
analysis_server/test/services/refactoring/extract_method_test: Pass, Slow
analysis_server/test/services/refactoring/inline_method_test: Pass, Slow
analysis_server/test/socket_server_test: Skip # Pass, Slow
@@ -117,12 +116,10 @@
analyzer/test/generated/non_error_resolver_kernel_test: Pass, Slow
analyzer/test/generated/strong_mode_driver_test: Pass, Slow
analyzer/test/src/dart/analysis/driver_resolution_kernel_test: Pass, Slow
-analyzer/test/src/dart/analysis/driver_resolution_test: Pass, Slow
analyzer/test/src/dart/analysis/driver_test: Pass, Slow
analyzer/test/src/summary/resynthesize_ast_test: Pass, Slow
analyzer/test/src/task/strong/front_end_inference_test: Pass, Slow
analyzer/test/src/task/strong/inferred_type_test: Pass, Slow
-analyzer_cli/test/driver_test: Pass, Slow, Timeout
analyzer_plugin/test/src/utilities/change_builder/change_builder_dart_test: Pass, Slow
analyzer_plugin/test/src/utilities/completion/optype_test: Pass, Slow
mutation_observer: Skip # Skip tests on the VM if the package depends on dart:html
@@ -171,26 +168,6 @@
[ $arch == x64 && $runtime == vm && $system == windows && $checked ]
analyzer/test/src/task/strong/inferred_type_test: Pass, Slow
-# analyzer using the fasta parser
-[ $builder_tag == analyzer_use_fasta && $runtime == vm ]
-analysis_server/test/completion_test: Fail
-analysis_server/test/domain_completion_test: Fail
-analysis_server/test/integration/analysis/package_root_test: Pass, RuntimeError # Issue 33382
-analysis_server/test/services/completion/dart/keyword_contributor_test: Pass, Slow
-analysis_server/test/services/correction/fix_test: Fail, Timeout
-analysis_server/test/services/refactoring/extract_local_test: Fail
-analysis_server/test/src/plugin/plugin_manager_test: Pass, Slow
-analyzer/test/generated/compile_time_error_code_driver_test: Fail
-analyzer/test/generated/compile_time_error_code_kernel_test: Fail
-analyzer/test/generated/compile_time_error_code_kernel_test.dart: Fail
-analyzer/test/generated/compile_time_error_code_test: Fail
-analyzer/test/generated/invalid_code_driver_test: Fail
-analyzer/test/generated/non_error_resolver_driver_test: Fail
-analyzer/test/generated/non_error_resolver_test: Fail
-analyzer/test/generated/resolver_test: Fail
-analyzer/test/generated/utilities_test: Fail
-analyzer/test/src/context/context_test: Fail
-
[ $builder_tag != dart2js_analyzer && $compiler == dart2js ]
analysis_server/test/*: Skip # Issue 26813
analyzer/test/*: Skip # Issue 26813
@@ -226,7 +203,6 @@
[ $runtime == vm && $system == windows ]
analysis_server/test/analysis/get_errors_test: Skip # runtime error, Issue 22180
analysis_server/test/benchmarks_test: RuntimeError # Issue 32355
-analysis_server/test/integration/*: Skip # Issue 32356
analysis_server/test/src/plugin/plugin_manager_test: Pass, Slow, RuntimeError # Issue 34231
analyzer/test/generated/non_error_resolver_kernel_test: RuntimeError # Issue 30785
analyzer/test/src/task/strong/checker_test: Pass, Slow
diff --git a/pkg/vm/bin/kernel_service.dart b/pkg/vm/bin/kernel_service.dart
index e3af637..704b7a8 100644
--- a/pkg/vm/bin/kernel_service.dart
+++ b/pkg/vm/bin/kernel_service.dart
@@ -109,7 +109,7 @@
case Severity.error:
case Severity.internalProblem:
// TODO(sigmund): support emitting code with errors as long as they
- // are handled in the generated code (issue #30194).
+ // are handled in the generated code.
printMessage = false; // errors are printed by VM
errors.add(message.formatted);
break;
diff --git a/pkg/vm/lib/bytecode/gen_bytecode.dart b/pkg/vm/lib/bytecode/gen_bytecode.dart
index 19a91fe..1b228dd 100644
--- a/pkg/vm/lib/bytecode/gen_bytecode.dart
+++ b/pkg/vm/lib/bytecode/gen_bytecode.dart
@@ -171,7 +171,10 @@
for (var param in function.positionalParameters) {
asm.emitPush(locals.getVarIndexInFrame(param));
}
- for (var param in function.namedParameters) {
+ // Native methods access their parameters by indices, so
+ // native wrappers should pass arguments in the original declaration
+ // order instead of sorted order.
+ for (var param in locals.originalNamedParameters) {
asm.emitPush(locals.getVarIndexInFrame(param));
}
@@ -236,6 +239,11 @@
Procedure get prependTypeArguments => _prependTypeArguments ??=
libraryIndex.getTopLevelMember('dart:_internal', '_prependTypeArguments');
+ Procedure _boundsCheckForPartialInstantiation;
+ Procedure get boundsCheckForPartialInstantiation =>
+ _boundsCheckForPartialInstantiation ??= libraryIndex.getTopLevelMember(
+ 'dart:_internal', '_boundsCheckForPartialInstantiation');
+
Procedure _futureValue;
Procedure get futureValue =>
_futureValue ??= libraryIndex.getMember('dart:async', 'Future', 'value');
@@ -738,7 +746,7 @@
} else {
assert(numOptionalNamed != 0);
for (int i = 0; i < numOptionalNamed; i++) {
- final param = function.namedParameters[i];
+ final param = locals.sortedNamedParameters[i];
asm.emitLoadConstant(
numFixed + i, cp.add(new ConstantString(param.name)));
asm.emitLoadConstant(numFixed + i, _getDefaultParamConstIndex(param));
@@ -762,24 +770,19 @@
if (locals.hasFunctionTypeArgsVar) {
if (function.typeParameters.isNotEmpty) {
assert(!(node is Procedure && node.isFactory));
+
+ Label done = new Label();
+
+ if (isClosure) {
+ _handleDelayedTypeArguments(done);
+ }
+
asm.emitCheckFunctionTypeArgs(function.typeParameters.length,
locals.functionTypeArgsVarIndexInFrame);
- bool hasNonDynamicDefaultTypes = function.typeParameters.any((p) =>
- p.defaultType != null && p.defaultType != const DynamicType());
- if (hasNonDynamicDefaultTypes) {
- List<DartType> defaultTypes = function.typeParameters
- .map((p) => p.defaultType ?? const DynamicType())
- .toList();
- assert(defaultTypes
- .every((t) => !containsTypeVariable(t, functionTypeParameters)));
+ _handleDefaultTypeArguments(function, isClosure, done);
- Label done = new Label();
- asm.emitJumpIfNotZeroTypeArgs(done);
- _genTypeArguments(defaultTypes);
- asm.emitPopLocal(locals.functionTypeArgsVarIndexInFrame);
- asm.bind(done);
- }
+ asm.bind(done);
}
if (isClosure) {
@@ -803,6 +806,55 @@
}
}
+ void _handleDelayedTypeArguments(Label doneCheckingTypeArguments) {
+ Label noDelayedTypeArgs = new Label();
+
+ asm.emitPush(locals.closureVarIndexInFrame);
+ asm.emitLoadFieldTOS(
+ cp.add(new ConstantInstanceField(closureDelayedTypeArguments)));
+ asm.emitStoreLocal(locals.functionTypeArgsVarIndexInFrame);
+ asm.emitPushConstant(cp.add(const ConstantEmptyTypeArguments()));
+ asm.emitIfEqStrictTOS();
+ asm.emitJump(noDelayedTypeArgs);
+
+ // There are non-empty delayed type arguments, and they are stored
+ // into function type args variable already.
+ // Just verify that there are no passed type arguments.
+ asm.emitCheckFunctionTypeArgs(0, locals.scratchVarIndexInFrame);
+ asm.emitJump(doneCheckingTypeArguments);
+
+ asm.bind(noDelayedTypeArgs);
+ }
+
+ void _handleDefaultTypeArguments(
+ FunctionNode function, bool isClosure, Label doneCheckingTypeArguments) {
+ bool hasNonDynamicDefaultTypes = function.typeParameters.any(
+ (p) => p.defaultType != null && p.defaultType != const DynamicType());
+ if (!hasNonDynamicDefaultTypes) {
+ return;
+ }
+
+ asm.emitJumpIfNotZeroTypeArgs(doneCheckingTypeArguments);
+
+ List<DartType> defaultTypes = function.typeParameters
+ .map((p) => p.defaultType ?? const DynamicType())
+ .toList();
+
+ // Load parent function type arguments if they are used to
+ // instantiate default types.
+ if (isClosure &&
+ defaultTypes
+ .any((t) => containsTypeVariable(t, functionTypeParameters))) {
+ asm.emitPush(locals.closureVarIndexInFrame);
+ asm.emitLoadFieldTOS(
+ cp.add(new ConstantInstanceField(closureFunctionTypeArguments)));
+ asm.emitPopLocal(locals.functionTypeArgsVarIndexInFrame);
+ }
+
+ _genTypeArguments(defaultTypes);
+ asm.emitPopLocal(locals.functionTypeArgsVarIndexInFrame);
+ }
+
void _setupInitialContext(FunctionNode function) {
_allocateContextIfNeeded();
@@ -813,12 +865,14 @@
if (locals.hasFactoryTypeArgsVar) {
_copyParamIfCaptured(locals.factoryTypeArgsVar);
}
- if (locals.hasReceiver) {
- _copyParamIfCaptured(locals.receiverVar);
+ if (locals.hasCapturedReceiverVar) {
+ _genPushContextForVariable(locals.capturedReceiverVar);
+ asm.emitPush(locals.getVarIndexInFrame(locals.receiverVar));
+ _genStoreVar(locals.capturedReceiverVar);
}
}
function.positionalParameters.forEach(_copyParamIfCaptured);
- function.namedParameters.forEach(_copyParamIfCaptured);
+ locals.sortedNamedParameters.forEach(_copyParamIfCaptured);
}
}
@@ -844,7 +898,7 @@
}
}
function.positionalParameters.forEach(_genArgumentTypeCheck);
- function.namedParameters.forEach(_genArgumentTypeCheck);
+ locals.sortedNamedParameters.forEach(_genArgumentTypeCheck);
}
void _genArgumentTypeCheck(VariableDeclaration variable) {
@@ -907,7 +961,7 @@
// as default value expressions could use local const variables which
// are not available in bytecode.
function.positionalParameters.forEach(_evaluateDefaultParameterValue);
- function.namedParameters.forEach(_evaluateDefaultParameterValue);
+ locals.sortedNamedParameters.forEach(_evaluateDefaultParameterValue);
final int closureFunctionIndex =
cp.add(new ConstantClosureFunction(name, function));
@@ -1360,15 +1414,23 @@
visitInstantiation(Instantiation node) {
final int oldClosure = locals.tempIndexInFrame(node, tempIndex: 0);
final int newClosure = locals.tempIndexInFrame(node, tempIndex: 1);
+ final int typeArguments = locals.tempIndexInFrame(node, tempIndex: 2);
node.expression.accept(this);
- asm.emitPopLocal(oldClosure);
+ asm.emitStoreLocal(oldClosure);
+
+ _genTypeArguments(node.typeArguments);
+ asm.emitStoreLocal(typeArguments);
+
+ _genStaticCall(
+ boundsCheckForPartialInstantiation, new ConstantArgDesc(2), 2);
+ asm.emitDrop1();
assert(closureClass.typeParameters.isEmpty);
asm.emitAllocate(cp.add(new ConstantClass(closureClass)));
asm.emitStoreLocal(newClosure);
- _genTypeArguments(node.typeArguments);
+ asm.emitPush(typeArguments);
asm.emitStoreFieldTOS(
cp.add(new ConstantInstanceField(closureDelayedTypeArguments)));
diff --git a/pkg/vm/lib/bytecode/local_vars.dart b/pkg/vm/lib/bytecode/local_vars.dart
index 4154fdc..a92c969 100644
--- a/pkg/vm/lib/bytecode/local_vars.dart
+++ b/pkg/vm/lib/bytecode/local_vars.dart
@@ -51,7 +51,7 @@
int getOriginalParamSlotIndex(VariableDeclaration variable) =>
_getVarDesc(variable).originalParamSlotIndex ??
- (throw 'Variablie $variable does not have originalParamSlotIndex');
+ (throw 'Variable $variable does not have originalParamSlotIndex');
int tempIndexInFrame(TreeNode node, {int tempIndex: 0}) {
final temps = _temps[node];
@@ -107,6 +107,12 @@
_currentFrame.receiverVar ??
(throw 'Receiver variable is not declared in ${_currentFrame.function}');
+ bool get hasCapturedReceiverVar => _currentFrame.capturedReceiverVar != null;
+
+ VariableDeclaration get capturedReceiverVar =>
+ _currentFrame.capturedReceiverVar ??
+ (throw 'Captured receiver variable is not declared in ${_currentFrame.function}');
+
bool get hasReceiver => _currentFrame.receiverVar != null;
bool get isSyncYieldingFrame => _currentFrame.isSyncYielding;
@@ -157,6 +163,11 @@
bool get hasOptionalParameters => _currentFrame.hasOptionalParameters;
bool get hasCapturedParameters => _currentFrame.hasCapturedParameters;
+ List<VariableDeclaration> get originalNamedParameters =>
+ _currentFrame.originalNamedParameters;
+ List<VariableDeclaration> get sortedNamedParameters =>
+ _currentFrame.sortedNamedParameters;
+
LocalVariables(Member node) {
final scopeBuilder = new _ScopeBuilder(this);
node.accept(scopeBuilder);
@@ -204,6 +215,8 @@
final Frame parent;
Scope topScope;
+ List<VariableDeclaration> originalNamedParameters;
+ List<VariableDeclaration> sortedNamedParameters;
int numParameters = 0;
int numTypeArguments = 0;
bool hasOptionalParameters = false;
@@ -212,6 +225,7 @@
bool isDartSync = true;
bool isSyncYielding = false;
VariableDeclaration receiverVar;
+ VariableDeclaration capturedReceiverVar;
VariableDeclaration functionTypeArgsVar;
VariableDeclaration factoryTypeArgsVar;
VariableDeclaration closureVar;
@@ -260,10 +274,11 @@
_ScopeBuilder(this.locals);
- void _sortNamedParameters(FunctionNode function) {
- function.namedParameters.sort(
- (VariableDeclaration a, VariableDeclaration b) =>
- a.name.compareTo(b.name));
+ List<VariableDeclaration> _sortNamedParameters(FunctionNode function) {
+ final params = function.namedParameters.toList();
+ params.sort((VariableDeclaration a, VariableDeclaration b) =>
+ a.name.compareTo(b.name));
+ return params;
}
void _visitFunction(TreeNode node) {
@@ -326,10 +341,11 @@
_declareVariable(_currentFrame.closureVar);
}
- _sortNamedParameters(function);
+ _currentFrame.originalNamedParameters = function.namedParameters;
+ _currentFrame.sortedNamedParameters = _sortNamedParameters(function);
visitList(function.positionalParameters, this);
- visitList(function.namedParameters, this);
+ visitList(_currentFrame.sortedNamedParameters, this);
if (_currentFrame.isSyncYielding) {
// The following variables from parent frame are used implicitly and need
@@ -361,6 +377,15 @@
_declareVariable(_currentFrame.scratchVar);
}
+ if (node is Constructor || (node is Procedure && !node.isStatic)) {
+ if (locals.isCaptured(_currentFrame.receiverVar)) {
+ // Duplicate receiver variable for local use.
+ _currentFrame.capturedReceiverVar = _currentFrame.receiverVar;
+ _currentFrame.receiverVar = new VariableDeclaration('this');
+ _declareVariable(_currentFrame.receiverVar);
+ }
+ }
+
_leaveFrame();
_enclosingTryBlocks = savedEnclosingTryBlocks;
@@ -859,7 +884,7 @@
_currentFrame.hasCapturedParameters =
(isFactory && locals.isCaptured(_currentFrame.factoryTypeArgsVar)) ||
- (hasReceiver && locals.isCaptured(_currentFrame.receiverVar)) ||
+ (hasReceiver && _currentFrame.capturedReceiverVar != null) ||
function.positionalParameters.any(locals.isCaptured) ||
function.namedParameters.any(locals.isCaptured);
@@ -868,7 +893,12 @@
_allocateParameter(_currentFrame.factoryTypeArgsVar, count++);
}
if (hasReceiver) {
+ assert(!locals.isCaptured(_currentFrame.receiverVar));
_allocateParameter(_currentFrame.receiverVar, count++);
+
+ if (_currentFrame.capturedReceiverVar != null) {
+ _allocateVariable(_currentFrame.capturedReceiverVar);
+ }
}
if (hasClosureArg) {
assert(!locals.isCaptured(_currentFrame.closureVar));
@@ -877,7 +907,7 @@
for (var param in function.positionalParameters) {
_allocateParameter(param, count++);
}
- for (var param in function.namedParameters) {
+ for (var param in _currentFrame.sortedNamedParameters) {
_allocateParameter(param, count++);
}
assert(count == _currentFrame.numParameters);
@@ -1106,6 +1136,6 @@
@override
visitInstantiation(Instantiation node) {
- _visit(node, temps: 2);
+ _visit(node, temps: 3);
}
}
diff --git a/pkg/vm/lib/frontend_server.dart b/pkg/vm/lib/frontend_server.dart
index 3a236e7..6397f17 100644
--- a/pkg/vm/lib/frontend_server.dart
+++ b/pkg/vm/lib/frontend_server.dart
@@ -159,6 +159,10 @@
/// won't recompile sources that were previously reported as changed.
void acceptLastDelta();
+ /// Rejects results of previous compilation and sets compiler back to last
+ /// accepted state.
+ Future<void> rejectLastDelta();
+
/// This let's compiler know that source file identifed by `uri` was changed.
void invalidate(Uri uri);
@@ -371,6 +375,17 @@
sink, (lib) => !lib.isExternal, true /* excludeUriToSource */)
: printerFactory.newBinaryPrinter(sink);
+ component.libraries.sort((Library l1, Library l2) {
+ return "${l1.fileUri}".compareTo("${l2.fileUri}");
+ });
+
+ component.computeCanonicalNames();
+ for (Library library in component.libraries) {
+ library.additionalExports.sort((Reference r1, Reference r2) {
+ return "${r1.canonicalName}".compareTo("${r2.canonicalName}");
+ });
+ }
+
printer.writeComponentFile(component);
await sink.close();
}
@@ -439,11 +454,7 @@
if (deltaProgram != null && transformer != null) {
transformer.transform(deltaProgram);
}
-
- final IOSink sink = new File(_kernelBinaryFilename).openWrite();
- final BinaryPrinter printer = printerFactory.newBinaryPrinter(sink);
- printer.writeComponentFile(deltaProgram);
- await sink.close();
+ await writeDillFile(deltaProgram, _kernelBinaryFilename);
_outputStream
.writeln('$boundaryKey $_kernelBinaryFilename ${errors.length}');
_kernelBinaryFilename = _kernelBinaryFilenameIncremental;
@@ -487,6 +498,14 @@
}
@override
+ Future<void> rejectLastDelta() async {
+ await _generator.reject();
+ final String boundaryKey = new Uuid().generateV4();
+ _outputStream.writeln('result $boundaryKey');
+ _outputStream.writeln(boundaryKey);
+ }
+
+ @override
void invalidate(Uri uri) {
_generator.invalidate(uri);
}
@@ -619,6 +638,8 @@
state = _State.COMPILE_EXPRESSION_EXPRESSION;
} else if (string == 'accept') {
compiler.acceptLastDelta();
+ } else if (string == 'reject') {
+ await compiler.rejectLastDelta();
} else if (string == 'reset') {
compiler.resetIncrementalCompiler();
} else if (string == 'quit') {
diff --git a/pkg/vm/lib/incremental_compiler.dart b/pkg/vm/lib/incremental_compiler.dart
index 8238343..4cfedcd 100644
--- a/pkg/vm/lib/incremental_compiler.dart
+++ b/pkg/vm/lib/incremental_compiler.dart
@@ -17,16 +17,26 @@
/// accepted.
class IncrementalCompiler {
IncrementalKernelGenerator _generator;
+
+ // Component that reflect current state of the compiler, which has not
+ // been yet accepted by the client. Is [null] if no compilation was done
+ // since last accept/reject acknowledgement by the client.
+ Component _candidate;
+ // Component that reflect the state that was most recently accepted by the
+ // client. Is [null], if no compilation results were accepted by the client.
+ Component _lastKnownGood;
+
List<Component> _pendingDeltas;
CompilerOptions _compilerOptions;
bool initialized = false;
bool fullComponent = false;
Uri initializeFromDillUri;
+ Uri _entryPoint;
- IncrementalCompiler(this._compilerOptions, Uri entryPoint,
+ IncrementalCompiler(this._compilerOptions, this._entryPoint,
{this.initializeFromDillUri}) {
_generator = new IncrementalKernelGenerator(
- _compilerOptions, entryPoint, initializeFromDillUri);
+ _compilerOptions, _entryPoint, initializeFromDillUri);
_pendingDeltas = <Component>[];
}
@@ -41,25 +51,24 @@
fullComponent = false;
final bool firstDelta = _pendingDeltas.isEmpty;
_pendingDeltas.add(component);
- if (firstDelta) {
- return component;
- }
-
- // If more than one delta is pending, we need to combine them.
- Procedure mainMethod;
- Map<Uri, Library> combined = <Uri, Library>{};
- for (Component delta in _pendingDeltas) {
- if (delta.mainMethod != null) {
- mainMethod = delta.mainMethod;
+ if (!firstDelta) {
+ // If more than one delta is pending, we need to combine them.
+ Procedure mainMethod;
+ Map<Uri, Library> combined = <Uri, Library>{};
+ for (Component delta in _pendingDeltas) {
+ if (delta.mainMethod != null) {
+ mainMethod = delta.mainMethod;
+ }
+ for (Library library in delta.libraries) {
+ combined[library.importUri] = library;
+ }
}
- for (Library library in delta.libraries) {
- combined[library.importUri] = library;
- }
+ // TODO(vegorov) this needs to merge metadata repositories from deltas.
+ component = new Component(libraries: combined.values.toList())
+ ..mainMethod = mainMethod;
}
-
- // TODO(vegorov) this needs to merge metadata repositories from deltas.
- return new Component(libraries: combined.values.toList())
- ..mainMethod = mainMethod;
+ _candidate = component;
+ return component;
}
/// This lets incremental compiler know that results of last [compile] call
@@ -67,6 +76,40 @@
/// results.
accept() {
_pendingDeltas.clear();
+
+ Map<Uri, Library> combined = <Uri, Library>{};
+ if (_lastKnownGood != null) {
+ // TODO(aam): Figure out how to skip no-longer-used libraries from
+ // [_lastKnownGood] libraries.
+ for (Library library in _lastKnownGood.libraries) {
+ combined[library.importUri] = library;
+ }
+ }
+ for (Library library in _candidate.libraries) {
+ combined[library.importUri] = library;
+ }
+ _lastKnownGood = new Component(
+ libraries: combined.values.toList(),
+ uriToSource: _candidate.uriToSource,
+ )..mainMethod = _candidate.mainMethod;
+ for (final repo in _candidate.metadata.values) {
+ _lastKnownGood.addMetadataRepository(repo);
+ }
+
+ _candidate = null;
+ }
+
+ /// This lets incremental compiler know that results of last [compile] call
+ /// were rejected. Subsequent [compile] or [compileExpression] calls need to
+ /// be processed without changes picked up by rejected [compile] call.
+ reject() async {
+ _pendingDeltas.clear();
+ _candidate = null;
+ // Need to reset and warm up compiler so that expression evaluation requests
+ // are processed in that known good state.
+ _generator = new IncrementalKernelGenerator.fromComponent(
+ _compilerOptions, _entryPoint, _lastKnownGood);
+ await _generator.computeDelta(entryPoint: _entryPoint);
}
/// This tells incremental compiler that it needs rescan [uri] file during
diff --git a/pkg/vm/lib/kernel_front_end.dart b/pkg/vm/lib/kernel_front_end.dart
index 6670254..ac3dd10 100644
--- a/pkg/vm/lib/kernel_front_end.dart
+++ b/pkg/vm/lib/kernel_front_end.dart
@@ -76,7 +76,9 @@
if (genBytecode && !errorDetector.hasCompilationErrors && component != null) {
await runWithFrontEndCompilerContext(source, options, component, () {
generateBytecode(component,
- strongMode: options.strongMode, dropAST: dropAST);
+ strongMode: options.strongMode,
+ dropAST: dropAST,
+ environmentDefines: environmentDefines);
});
}
diff --git a/pkg/vm/lib/transformations/call_site_annotator.dart b/pkg/vm/lib/transformations/call_site_annotator.dart
index 3d80936..c2ca324 100644
--- a/pkg/vm/lib/transformations/call_site_annotator.dart
+++ b/pkg/vm/lib/transformations/call_site_annotator.dart
@@ -55,22 +55,27 @@
}
@override
- visitMethodInvocation(MethodInvocation node) {
- super.visitMethodInvocation(node);
+ visitPropertySet(PropertySet node) {
+ super.visitPropertySet(node);
- if (shouldAnnotate(node)) {
+ if (hasGenericCovariantParameters(node.interfaceTarget)) {
_metadata.mapping[node] = new CallSiteAttributesMetadata(
receiverType: node.receiver.getStaticType(env));
}
}
- // TODO(vegorov) handle setters as well.
- // TODO(34162): We don't need to save the type here, just whether or not it's
- // a statically-checked call.
- static bool shouldAnnotate(MethodInvocation node) =>
- (node.interfaceTarget != null &&
- hasGenericCovariantParameters(node.interfaceTarget)) ||
- node.name.name == "call";
+ @override
+ visitMethodInvocation(MethodInvocation node) {
+ super.visitMethodInvocation(node);
+
+ // TODO(34162): We don't need to save the type here for calls, just whether
+ // or not it's a statically-checked call.
+ if (node.name.name == 'call' ||
+ hasGenericCovariantParameters(node.interfaceTarget)) {
+ _metadata.mapping[node] = new CallSiteAttributesMetadata(
+ receiverType: node.receiver.getStaticType(env));
+ }
+ }
/// Return [true] if the given list of [VariableDeclaration] contains
/// any annotated with generic-covariant-impl.
@@ -84,6 +89,8 @@
return containsGenericCovariantImpl(
member.function.positionalParameters) ||
containsGenericCovariantImpl(member.function.namedParameters);
+ } else if (member is Field) {
+ return member.isGenericCovariantImpl;
}
return false;
diff --git a/pkg/vm/test/frontend_server_test.dart b/pkg/vm/test/frontend_server_test.dart
index 75c22d1..efef8e8 100644
--- a/pkg/vm/test/frontend_server_test.dart
+++ b/pkg/vm/test/frontend_server_test.dart
@@ -413,6 +413,8 @@
when(generator.initialized).thenAnswer((_) => false);
when(generator.compile())
.thenAnswer((_) => new Future<Component>.value(new Component()));
+ when(generator.compile(entryPoint: anyNamed("entryPoint")))
+ .thenAnswer((_) => new Future<Component>.value(new Component()));
final _MockedBinaryPrinterFactory printerFactory =
new _MockedBinaryPrinterFactory();
when(printerFactory.newBinaryPrinter(any))
@@ -587,6 +589,137 @@
expect(await result, 0);
});
+ test('compile expression when delta is rejected', () async {
+ var fileLib = new File('${tempDir.path}/lib.dart')..createSync();
+ fileLib.writeAsStringSync("foo() => 42;\n");
+ var file = new File('${tempDir.path}/foo.dart')..createSync();
+ file.writeAsStringSync("import 'lib.dart'; main1() => print(foo);\n");
+ var dillFile = new File('${tempDir.path}/app.dill');
+ expect(dillFile.existsSync(), equals(false));
+ final List<String> args = <String>[
+ '--sdk-root=${sdkRoot.toFilePath()}',
+ '--strong',
+ '--incremental',
+ '--platform=${platformKernel.path}',
+ '--output-dill=${dillFile.path}'
+ ];
+
+ final StreamController<List<int>> inputStreamController =
+ new StreamController<List<int>>();
+ final StreamController<List<int>> stdoutStreamController =
+ new StreamController<List<int>>();
+ final IOSink ioSink = new IOSink(stdoutStreamController.sink);
+ StreamController<String> receivedResults = new StreamController<String>();
+
+ String boundaryKey;
+ stdoutStreamController.stream
+ .transform(utf8.decoder)
+ .transform(const LineSplitter())
+ .listen((String s) {
+ print(s);
+ const String RESULT_OUTPUT_SPACE = 'result ';
+ if (boundaryKey == null) {
+ if (s.startsWith(RESULT_OUTPUT_SPACE)) {
+ boundaryKey = s.substring(RESULT_OUTPUT_SPACE.length);
+ }
+ } else {
+ if (s.startsWith(boundaryKey)) {
+ receivedResults.add(s.length > boundaryKey.length
+ ? s.substring(boundaryKey.length + 1)
+ : null);
+ boundaryKey = null;
+ }
+ }
+ });
+
+ final Future<int> result =
+ starter(args, input: inputStreamController.stream, output: ioSink);
+ inputStreamController.add('compile ${file.path}\n'.codeUnits);
+ int count = 0;
+ receivedResults.stream.listen((String outputFilenameAndErrorCount) {
+ if (count == 0) {
+ // First request was to 'compile', which resulted in full kernel file.
+ CompilationResult result =
+ new CompilationResult.parse(outputFilenameAndErrorCount);
+
+ expect(dillFile.existsSync(), equals(true));
+ expect(result.filename, dillFile.path);
+ expect(result.errorsCount, equals(0));
+ inputStreamController.add('accept\n'.codeUnits);
+
+ // 'compile-expression <boundarykey>
+ // expression
+ // definitions (one per line)
+ // ...
+ // <boundarykey>
+ // type-defintions (one per line)
+ // ...
+ // <boundarykey>
+ // <libraryUri: String>
+ // <klass: String>
+ // <isStatic: true|false>
+ inputStreamController.add('''
+compile-expression abc
+main1
+abc
+abc
+${file.uri}
+
+true
+'''
+ .codeUnits);
+ count += 1;
+ } else if (count == 1) {
+ // Second request was to 'compile-expression', which resulted in
+ // kernel file with a function that wraps compiled expression.
+ expect(outputFilenameAndErrorCount, isNotNull);
+ CompilationResult result =
+ new CompilationResult.parse(outputFilenameAndErrorCount);
+ print(outputFilenameAndErrorCount);
+
+ expect(result.errorsCount, equals(0));
+ File outputFile = new File(result.filename);
+ expect(outputFile.existsSync(), equals(true));
+ expect(outputFile.lengthSync(), isPositive);
+
+ file.writeAsStringSync("import 'lib.dart'; main() => foo();\n");
+ inputStreamController.add('recompile ${file.path} abc\n'
+ '${file.path}\n'
+ 'abc\n'
+ .codeUnits);
+
+ count += 1;
+ } else if (count == 2) {
+ // Third request was to recompile the script after renaming a function.
+ expect(outputFilenameAndErrorCount, isNotNull);
+ CompilationResult result =
+ new CompilationResult.parse(outputFilenameAndErrorCount);
+ expect(result.errorsCount, equals(0));
+
+ inputStreamController.add('reject\n'.codeUnits);
+ count += 1;
+ } else if (count == 3) {
+ // Fourth request was to reject the compilation results.
+ inputStreamController.add(
+ 'compile-expression abc\nmain1\nabc\nabc\n${file.uri}\n\ntrue\n'
+ .codeUnits);
+ count += 1;
+ } else {
+ expect(count, 4);
+ // Fifth request was to 'compile-expression' that references original
+ // function, which should still be successful.
+ expect(outputFilenameAndErrorCount, isNotNull);
+ CompilationResult result =
+ new CompilationResult.parse(outputFilenameAndErrorCount);
+ expect(result.errorsCount, equals(0));
+ inputStreamController.add('quit\n'.codeUnits);
+ }
+ });
+
+ expect(await result, 0);
+ inputStreamController.close();
+ }, timeout: Timeout.factor(100));
+
test('recompile request keeps incremental output dill filename', () async {
var file = new File('${tempDir.path}/foo.dart')..createSync();
file.writeAsStringSync("main() {}\n");
@@ -628,7 +761,6 @@
starter(args, input: inputStreamController.stream, output: ioSink);
inputStreamController.add('compile ${file.path}\n'.codeUnits);
int count = 0;
- Completer<bool> allDone = new Completer<bool>();
receivedResults.stream.listen((String outputFilenameAndErrorCount) {
CompilationResult result =
new CompilationResult.parse(outputFilenameAndErrorCount);
@@ -653,11 +785,9 @@
expect(result.filename, dillIncFile.path);
expect(result.errorsCount, 0);
expect(dillIncFile.existsSync(), equals(true));
- allDone.complete(true);
+ inputStreamController.add('quit\n'.codeUnits);
}
});
- expect(await allDone.future, true);
- inputStreamController.add('quit\n'.codeUnits);
expect(await result, 0);
inputStreamController.close();
});
@@ -791,6 +921,19 @@
expect(depContentsParsed[1], isNotEmpty);
});
+ void checkIsEqual(List<int> a, List<int> b) {
+ int length = a.length;
+ if (b.length < length) {
+ length = b.length;
+ }
+ for (int i = 0; i < length; ++i) {
+ if (a[i] != b[i]) {
+ fail("Data differs at byte ${i + 1}.");
+ }
+ }
+ expect(a.length, equals(b.length));
+ }
+
test('mimic flutter benchmark', () async {
// This is based on what flutters "hot_mode_dev_cycle__benchmark" does.
var dillFile = new File('${tempDir.path}/full.dill');
@@ -800,7 +943,7 @@
'--sdk-root=${sdkRoot.toFilePath()}',
'--strong',
'--incremental',
- '--platform=$platformKernel',
+ '--platform=${platformKernel.path}',
'--output-dill=${dillFile.path}',
'--output-incremental-dill=${incrementalDillFile.path}'
];
@@ -814,6 +957,7 @@
int libraryCount = -1;
int sourceCount = -1;
+ List<List<int>> compiledKernels = <List<int>>[];
for (int serverCloses = 0; serverCloses < 2; ++serverCloses) {
print("Restart #$serverCloses");
final StreamController<List<int>> inputStreamController =
@@ -852,6 +996,16 @@
String outputFilename =
outputFilenameAndErrorCount.substring(0, delim);
print("$outputFilename -- count $count");
+
+ // Ensure that kernel file produced when compiler was initialized
+ // from compiled kernel files matches kernel file produced when
+ // compiler was initialized from sources on the first run.
+ if (serverCloses == 0) {
+ compiledKernels.add(new File(dillFile.path).readAsBytesSync());
+ } else {
+ checkIsEqual(compiledKernels[count],
+ new File(dillFile.path).readAsBytesSync());
+ }
if (count == 0) {
// First request is to 'compile', which results in full kernel file.
expect(dillFile.existsSync(), equals(true));
@@ -927,11 +1081,10 @@
// Reload with 1 change
inputStreamController.add('accept\n'.codeUnits);
- inputStreamController
- .add('recompile ${dart2jsOtherFile.path} x$count\n'
- '${dart2jsOtherFile.uri}\n'
- 'x$count\n'
- .codeUnits);
+ inputStreamController.add('recompile ${dart2js.path} x$count\n'
+ '${dart2jsOtherFile.uri}\n'
+ 'x$count\n'
+ .codeUnits);
} else if (count == 3) {
// Partial file. Expect to not be empty.
expect(incrementalDillFile.existsSync(), equals(true));
diff --git a/pkg/vm/testcases/bytecode/closures.dart.expect b/pkg/vm/testcases/bytecode/closures.dart.expect
index 3347fd6..eb11001 100644
--- a/pkg/vm/testcases/bytecode/closures.dart.expect
+++ b/pkg/vm/testcases/bytecode/closures.dart.expect
@@ -201,19 +201,18 @@
Push r1
Push FP[-5]
StoreContextVar 0
- Allocate CP#38
+ Allocate CP#41
StoreLocal r4
Push r4
- Push r1
- LoadContextVar 0
- LoadTypeArgumentsField CP#17
- StoreFieldTOS CP#39
+ Push FP[-5]
+ LoadTypeArgumentsField CP#20
+ StoreFieldTOS CP#42
Push r4
Push r0
- StoreFieldTOS CP#3
+ StoreFieldTOS CP#6
Push r4
- PushConstant CP#41
- StoreFieldTOS CP#42
+ PushConstant CP#5
+ StoreFieldTOS CP#3
Push r4
PushConstant CP#0
StoreFieldTOS CP#44
@@ -229,57 +228,57 @@
Push r3
InstanceCall 2, CP#57
Drop1
- PushConstant CP#18
+ PushConstant CP#21
ReturnTOS
}
ConstantPool {
[0] = ClosureFunction nested1 <T5 extends dart.core::Object = dynamic, T6 extends dart.core::Object = dynamic>() → void;
[1] = InstanceField dart.core::_Closure::_context
[2] = Reserved
- [3] = InstanceField dart.core::_Closure::_function_type_arguments
+ [3] = InstanceField dart.core::_Closure::_delayed_type_arguments
[4] = Reserved
- [5] = Int 2
- [6] = Int 4
- [7] = ArgDesc num-args 4, num-type-args 0, names []
- [8] = StaticICData target 'dart._internal::_prependTypeArguments', arg-desc CP#7
- [9] = ClosureFunction nested2 <T7 extends dart.core::Object = dynamic, T8 extends dart.core::Object = dynamic>() → void;
- [10] = Int 6
- [11] = StaticICData target 'dart._internal::_prependTypeArguments', arg-desc CP#7
- [12] = ClosureFunction <anonymous closure> () → dart.core::Null;
- [13] = TypeArgs [dart.core::Type]
- [14] = Int 8
- [15] = Int 0
- [16] = Type #lib::A::T1
- [17] = TypeArgumentsField #lib::A
- [18] = Null
- [19] = Int 1
- [20] = Type #lib::A::T2
- [21] = Type #lib::A::foo::T3
- [22] = Int 3
- [23] = Type #lib::A::foo::T4
- [24] = Type T5
- [25] = Int 5
- [26] = Type T6
- [27] = Type T7
- [28] = Int 7
- [29] = Type T8
- [30] = ArgDesc num-args 2, num-type-args 0, names []
- [31] = StaticICData target 'dart.core::List::_fromLiteral', arg-desc CP#30
- [32] = ArgDesc num-args 1, num-type-args 0, names []
- [33] = StaticICData target 'dart.core::print', arg-desc CP#32
- [34] = TypeArgs [#lib::A::T1, #lib::A::T2, #lib::A::foo::T3, #lib::A::foo::T4, T5, T6, T7, T8]
- [35] = ArgDesc num-args 0, num-type-args 8, names []
- [36] = StaticICData target '#lib::callWithArgs', arg-desc CP#35
- [37] = EndClosureFunctionScope
- [38] = Class dart.core::_Closure
- [39] = InstanceField dart.core::_Closure::_instantiator_type_arguments
- [40] = Reserved
- [41] = EmptyTypeArguments
- [42] = InstanceField dart.core::_Closure::_delayed_type_arguments
+ [5] = EmptyTypeArguments
+ [6] = InstanceField dart.core::_Closure::_function_type_arguments
+ [7] = Reserved
+ [8] = Int 2
+ [9] = Int 4
+ [10] = ArgDesc num-args 4, num-type-args 0, names []
+ [11] = StaticICData target 'dart._internal::_prependTypeArguments', arg-desc CP#10
+ [12] = ClosureFunction nested2 <T7 extends dart.core::Object = dynamic, T8 extends dart.core::Object = dynamic>() → void;
+ [13] = Int 6
+ [14] = StaticICData target 'dart._internal::_prependTypeArguments', arg-desc CP#10
+ [15] = ClosureFunction <anonymous closure> () → dart.core::Null;
+ [16] = TypeArgs [dart.core::Type]
+ [17] = Int 8
+ [18] = Int 0
+ [19] = Type #lib::A::T1
+ [20] = TypeArgumentsField #lib::A
+ [21] = Null
+ [22] = Int 1
+ [23] = Type #lib::A::T2
+ [24] = Type #lib::A::foo::T3
+ [25] = Int 3
+ [26] = Type #lib::A::foo::T4
+ [27] = Type T5
+ [28] = Int 5
+ [29] = Type T6
+ [30] = Type T7
+ [31] = Int 7
+ [32] = Type T8
+ [33] = ArgDesc num-args 2, num-type-args 0, names []
+ [34] = StaticICData target 'dart.core::List::_fromLiteral', arg-desc CP#33
+ [35] = ArgDesc num-args 1, num-type-args 0, names []
+ [36] = StaticICData target 'dart.core::print', arg-desc CP#35
+ [37] = TypeArgs [#lib::A::T1, #lib::A::T2, #lib::A::foo::T3, #lib::A::foo::T4, T5, T6, T7, T8]
+ [38] = ArgDesc num-args 0, num-type-args 8, names []
+ [39] = StaticICData target '#lib::callWithArgs', arg-desc CP#38
+ [40] = EndClosureFunctionScope
+ [41] = Class dart.core::_Closure
+ [42] = InstanceField dart.core::_Closure::_instantiator_type_arguments
[43] = Reserved
[44] = InstanceField dart.core::_Closure::_function
[45] = Reserved
- [46] = ICData target-name 'call', arg-desc CP#32
+ [46] = ICData target-name 'call', arg-desc CP#35
[47] = EndClosureFunctionScope
[48] = TypeArgs [#lib::C7, #lib::C8]
[49] = ArgDesc num-args 1, num-type-args 2, names []
@@ -292,121 +291,131 @@
[56] = TypeArgs [dart.core::List<#lib::C5>, dart.core::List<#lib::C6>]
[57] = ICData target-name 'call', arg-desc CP#49
}
-Closure CP#12 {
+Closure CP#15 {
EntryFixed 1, 4
CheckStack
Push FP[-5]
LoadFieldTOS CP#1
PopLocal r1
Push FP[-5]
- LoadFieldTOS CP#3
+ LoadFieldTOS CP#6
PopLocal r0
- PushConstant CP#13
+ PushConstant CP#16
StoreLocal r3
Push r3
- PushConstant CP#14
+ PushConstant CP#17
CreateArrayTOS
StoreLocal r3
Push r3
- PushConstant CP#15
+ PushConstant CP#18
Push r1
LoadContextVar 0
- LoadTypeArgumentsField CP#17
- PushConstant CP#18
- InstantiateType CP#16
- StoreIndexedTOS
- Push r3
- PushConstant CP#19
- Push r1
- LoadContextVar 0
- LoadTypeArgumentsField CP#17
- PushConstant CP#18
- InstantiateType CP#20
- StoreIndexedTOS
- Push r3
- PushConstant CP#5
- PushConstant CP#18
- Push r0
- InstantiateType CP#21
+ LoadTypeArgumentsField CP#20
+ PushConstant CP#21
+ InstantiateType CP#19
StoreIndexedTOS
Push r3
PushConstant CP#22
- PushConstant CP#18
- Push r0
+ Push r1
+ LoadContextVar 0
+ LoadTypeArgumentsField CP#20
+ PushConstant CP#21
InstantiateType CP#23
StoreIndexedTOS
Push r3
- PushConstant CP#6
- PushConstant CP#18
+ PushConstant CP#8
+ PushConstant CP#21
Push r0
InstantiateType CP#24
StoreIndexedTOS
Push r3
PushConstant CP#25
- PushConstant CP#18
+ PushConstant CP#21
Push r0
InstantiateType CP#26
StoreIndexedTOS
Push r3
- PushConstant CP#10
- PushConstant CP#18
+ PushConstant CP#9
+ PushConstant CP#21
Push r0
InstantiateType CP#27
StoreIndexedTOS
Push r3
PushConstant CP#28
- PushConstant CP#18
+ PushConstant CP#21
Push r0
InstantiateType CP#29
StoreIndexedTOS
- PushConstant CP#31
- IndirectStaticCall 2, CP#30
- PushConstant CP#33
- IndirectStaticCall 1, CP#32
- Drop1
- Push r1
- LoadContextVar 0
- LoadTypeArgumentsField CP#17
+ Push r3
+ PushConstant CP#13
+ PushConstant CP#21
Push r0
- InstantiateTypeArgumentsTOS 0, CP#34
+ InstantiateType CP#30
+ StoreIndexedTOS
+ Push r3
+ PushConstant CP#31
+ PushConstant CP#21
+ Push r0
+ InstantiateType CP#32
+ StoreIndexedTOS
+ PushConstant CP#34
+ IndirectStaticCall 2, CP#33
PushConstant CP#36
IndirectStaticCall 1, CP#35
Drop1
- PushConstant CP#18
+ Push r1
+ LoadContextVar 0
+ LoadTypeArgumentsField CP#20
+ Push r0
+ InstantiateTypeArgumentsTOS 0, CP#37
+ PushConstant CP#39
+ IndirectStaticCall 1, CP#38
+ Drop1
+ PushConstant CP#21
ReturnTOS
}
-Closure CP#9 {
+Closure CP#12 {
EntryFixed 1, 5
CheckStack
Push FP[-5]
LoadFieldTOS CP#1
PopLocal r1
- CheckFunctionTypeArgs 2, 0
- Push r0
Push FP[-5]
LoadFieldTOS CP#3
- PushConstant CP#6
- PushConstant CP#10
- PushConstant CP#11
- IndirectStaticCall 4, CP#7
+ StoreLocal r0
+ PushConstant CP#5
+ IfEqStrictTOS
+ Jump L1
+ CheckFunctionTypeArgs 0, 2
+ Jump L2
+L1:
+ CheckFunctionTypeArgs 2, 0
+L2:
+ Push r0
+ Push FP[-5]
+ LoadFieldTOS CP#6
+ PushConstant CP#9
+ PushConstant CP#13
+ PushConstant CP#14
+ IndirectStaticCall 4, CP#10
PopLocal r0
- Allocate CP#38
+ Allocate CP#41
StoreLocal r4
Push r4
Push r1
LoadContextVar 0
- LoadTypeArgumentsField CP#17
- StoreFieldTOS CP#39
- Push r4
- Push r0
- StoreFieldTOS CP#3
- Push r4
- PushConstant CP#41
+ LoadTypeArgumentsField CP#20
StoreFieldTOS CP#42
Push r4
- PushConstant CP#12
+ Push r0
+ StoreFieldTOS CP#6
+ Push r4
+ PushConstant CP#5
+ StoreFieldTOS CP#3
+ Push r4
+ PushConstant CP#15
StoreFieldTOS CP#44
Push r4
Push r1
@@ -415,7 +424,7 @@
Push r3
InstanceCall 1, CP#46
Drop1
- PushConstant CP#18
+ PushConstant CP#21
ReturnTOS
}
@@ -426,30 +435,40 @@
Push FP[-5]
LoadFieldTOS CP#1
PopLocal r1
- CheckFunctionTypeArgs 2, 0
- Push r0
Push FP[-5]
LoadFieldTOS CP#3
+ StoreLocal r0
PushConstant CP#5
- PushConstant CP#6
+ IfEqStrictTOS
+ Jump L1
+ CheckFunctionTypeArgs 0, 2
+ Jump L2
+L1:
+ CheckFunctionTypeArgs 2, 0
+L2:
+ Push r0
+ Push FP[-5]
+ LoadFieldTOS CP#6
PushConstant CP#8
- IndirectStaticCall 4, CP#7
+ PushConstant CP#9
+ PushConstant CP#11
+ IndirectStaticCall 4, CP#10
PopLocal r0
- Allocate CP#38
+ Allocate CP#41
StoreLocal r4
Push r4
Push r1
LoadContextVar 0
- LoadTypeArgumentsField CP#17
- StoreFieldTOS CP#39
- Push r4
- Push r0
- StoreFieldTOS CP#3
- Push r4
- PushConstant CP#41
+ LoadTypeArgumentsField CP#20
StoreFieldTOS CP#42
Push r4
- PushConstant CP#9
+ Push r0
+ StoreFieldTOS CP#6
+ Push r4
+ PushConstant CP#5
+ StoreFieldTOS CP#3
+ Push r4
+ PushConstant CP#12
StoreFieldTOS CP#44
Push r4
Push r1
@@ -463,7 +482,7 @@
Push r3
InstanceCall 2, CP#52
Drop1
- PushConstant CP#18
+ PushConstant CP#21
ReturnTOS
}
@@ -1474,20 +1493,20 @@
}
[@vm.bytecode=
Bytecode {
- Entry 6
+ Entry 7
CheckStack
- Allocate CP#14
+ Allocate CP#17
StoreLocal r3
Push r3
- PushConstant CP#9
- StoreFieldTOS CP#15
- Push r3
- PushConstant CP#9
- StoreFieldTOS CP#3
- Push r3
- PushConstant CP#17
+ PushConstant CP#12
StoreFieldTOS CP#18
Push r3
+ PushConstant CP#12
+ StoreFieldTOS CP#6
+ Push r3
+ PushConstant CP#5
+ StoreFieldTOS CP#3
+ Push r3
PushConstant CP#0
StoreFieldTOS CP#20
Push r3
@@ -1495,19 +1514,24 @@
StoreFieldTOS CP#1
PopLocal r2
Push r2
- PopLocal r3
- Allocate CP#14
- StoreLocal r5
+ StoreLocal r3
PushConstant CP#22
+ StoreLocal r6
+ PushConstant CP#24
+ IndirectStaticCall 2, CP#23
+ Drop1
+ Allocate CP#17
+ StoreLocal r5
+ Push r6
+ StoreFieldTOS CP#3
+ Push r5
+ Push r3
+ LoadFieldTOS CP#18
StoreFieldTOS CP#18
Push r5
Push r3
- LoadFieldTOS CP#15
- StoreFieldTOS CP#15
- Push r5
- Push r3
- LoadFieldTOS CP#3
- StoreFieldTOS CP#3
+ LoadFieldTOS CP#6
+ StoreFieldTOS CP#6
Push r5
Push r3
LoadFieldTOS CP#20
@@ -1520,33 +1544,35 @@
PopLocal r4
Push r4
ReturnTOS
- PushConstant CP#9
+ PushConstant CP#12
ReturnTOS
}
ConstantPool {
[0] = ClosureFunction foo <T extends dart.core::Object = dynamic>(T t) → void;
[1] = InstanceField dart.core::_Closure::_context
[2] = Reserved
- [3] = InstanceField dart.core::_Closure::_function_type_arguments
+ [3] = InstanceField dart.core::_Closure::_delayed_type_arguments
[4] = Reserved
- [5] = Int 0
- [6] = Int 1
- [7] = ArgDesc num-args 4, num-type-args 0, names []
- [8] = StaticICData target 'dart._internal::_prependTypeArguments', arg-desc CP#7
- [9] = Null
- [10] = Type T
- [11] = String 't'
- [12] = SubtypeTestCache
- [13] = EndClosureFunctionScope
- [14] = Class dart.core::_Closure
- [15] = InstanceField dart.core::_Closure::_instantiator_type_arguments
- [16] = Reserved
- [17] = EmptyTypeArguments
- [18] = InstanceField dart.core::_Closure::_delayed_type_arguments
+ [5] = EmptyTypeArguments
+ [6] = InstanceField dart.core::_Closure::_function_type_arguments
+ [7] = Reserved
+ [8] = Int 0
+ [9] = Int 1
+ [10] = ArgDesc num-args 4, num-type-args 0, names []
+ [11] = StaticICData target 'dart._internal::_prependTypeArguments', arg-desc CP#10
+ [12] = Null
+ [13] = Type T
+ [14] = String 't'
+ [15] = SubtypeTestCache
+ [16] = EndClosureFunctionScope
+ [17] = Class dart.core::_Closure
+ [18] = InstanceField dart.core::_Closure::_instantiator_type_arguments
[19] = Reserved
[20] = InstanceField dart.core::_Closure::_function
[21] = Reserved
[22] = TypeArgs [dart.core::int]
+ [23] = ArgDesc num-args 2, num-type-args 0, names []
+ [24] = StaticICData target 'dart._internal::_boundsCheckForPartialInstantiation', arg-desc CP#23
}
Closure CP#0 {
EntryFixed 2, 3
@@ -1554,23 +1580,33 @@
Push FP[-6]
LoadFieldTOS CP#1
PopLocal r1
- CheckFunctionTypeArgs 1, 0
- Push r0
Push FP[-6]
LoadFieldTOS CP#3
+ StoreLocal r0
PushConstant CP#5
- PushConstant CP#6
+ IfEqStrictTOS
+ Jump L1
+ CheckFunctionTypeArgs 0, 2
+ Jump L2
+L1:
+ CheckFunctionTypeArgs 1, 0
+L2:
+ Push r0
+ Push FP[-6]
+ LoadFieldTOS CP#6
PushConstant CP#8
- IndirectStaticCall 4, CP#7
+ PushConstant CP#9
+ PushConstant CP#11
+ IndirectStaticCall 4, CP#10
PopLocal r0
Push FP[-5]
- PushConstant CP#9
+ PushConstant CP#12
Push r0
- PushConstant CP#10
- PushConstant CP#11
- AssertAssignable 0, CP#12
+ PushConstant CP#13
+ PushConstant CP#14
+ AssertAssignable 0, CP#15
Drop1
- PushConstant CP#9
+ PushConstant CP#12
ReturnTOS
}
diff --git a/pkg/vm/testcases/bytecode/optional_params.dart.expect b/pkg/vm/testcases/bytecode/optional_params.dart.expect
index a8ae7f0..306a642 100644
--- a/pkg/vm/testcases/bytecode/optional_params.dart.expect
+++ b/pkg/vm/testcases/bytecode/optional_params.dart.expect
@@ -214,7 +214,7 @@
[25] = StaticICData target 'dart.core::_StringBase::_interpolate', arg-desc CP#12
[26] = StaticICData target 'dart.core::print', arg-desc CP#12
}
-]static method foo2(dynamic y, dynamic z, {dynamic a = 42, dynamic b = const <core::String>["default_b"], dynamic c = "default_c"}) → void {
+]static method foo2(dynamic y, dynamic z, {dynamic c = "default_c", dynamic a = 42, dynamic b = const <core::String>["default_b"]}) → void {
core::print("y = ${y}");
core::print("z = ${z}");
core::print("a = ${a}");
diff --git a/pkg/vm/testcases/bytecode/type_ops.dart.expect b/pkg/vm/testcases/bytecode/type_ops.dart.expect
index 924e681..457d5bc 100644
--- a/pkg/vm/testcases/bytecode/type_ops.dart.expect
+++ b/pkg/vm/testcases/bytecode/type_ops.dart.expect
@@ -175,7 +175,7 @@
if(y is self::C<dynamic, self::D::Q, core::List<self::D::P>>) {
core::print("22");
}
- this.{self::D::foo} = y as{TypeError} core::Map<self::D::P, self::D::Q>;
+ [@vm.call-site-attributes.metadata=receiverType:#lib::D<#lib::D::P, #lib::D::Q>] this.{self::D::foo} = y as{TypeError} core::Map<self::D::P, self::D::Q>;
}
[@vm.bytecode=
Bytecode {
diff --git a/runtime/bin/dart_io_entries.txt b/runtime/bin/dart_io_entries.txt
index c642194..b21ec2d 100644
--- a/runtime/bin/dart_io_entries.txt
+++ b/runtime/bin/dart_io_entries.txt
@@ -10,7 +10,9 @@
dart:io,::,_getWatchSignalInternal
dart:io,CertificateException,CertificateException.
dart:io,Directory,Directory.
+dart:io,Directory,Directory.fromRawPath
dart:io,File,File.
+dart:io,File,File.fromRawPath
dart:io,FileSystemException,FileSystemException.
dart:io,HandshakeException,HandshakeException.
dart:io,Link,Link.
diff --git a/runtime/bin/dartutils.cc b/runtime/bin/dartutils.cc
index 9270003..86685dc 100644
--- a/runtime/bin/dartutils.cc
+++ b/runtime/bin/dartutils.cc
@@ -52,6 +52,8 @@
const char* const DartUtils::kHttpScheme = "http:";
const char* const DartUtils::kVMServiceLibURL = "dart:vmservice";
+dart::SimpleHashMap* DartUtils::environment_ = NULL;
+
MagicNumberData appjit_magic_number = {8, {0xdc, 0xdc, 0xf6, 0xf6, 0, 0, 0, 0}};
MagicNumberData snapshot_magic_number = {4, {0xf5, 0xf5, 0xdc, 0xdc}};
MagicNumberData kernel_magic_number = {4, {0x90, 0xab, 0xcd, 0xef}};
@@ -803,6 +805,43 @@
return Dart_NewStringFromCString(new_str);
}
+void DartUtils::SetEnvironment(dart::SimpleHashMap* environment) {
+ environment_ = environment;
+}
+
+Dart_Handle DartUtils::EnvironmentCallback(Dart_Handle name) {
+ uint8_t* utf8_array;
+ intptr_t utf8_len;
+ Dart_Handle result = Dart_Null();
+ Dart_Handle handle = Dart_StringToUTF8(name, &utf8_array, &utf8_len);
+ if (Dart_IsError(handle)) {
+ handle = Dart_ThrowException(
+ DartUtils::NewDartArgumentError(Dart_GetError(handle)));
+ } else {
+ char* name_chars = reinterpret_cast<char*>(malloc(utf8_len + 1));
+ memmove(name_chars, utf8_array, utf8_len);
+ name_chars[utf8_len] = '\0';
+ const char* value = NULL;
+ if (environment_ != NULL) {
+ SimpleHashMap::Entry* entry =
+ environment_->Lookup(GetHashmapKeyFromString(name_chars),
+ SimpleHashMap::StringHash(name_chars), false);
+ if (entry != NULL) {
+ value = reinterpret_cast<char*>(entry->value);
+ }
+ }
+ if (value != NULL) {
+ result = Dart_NewStringFromUTF8(reinterpret_cast<const uint8_t*>(value),
+ strlen(value));
+ if (Dart_IsError(result)) {
+ result = Dart_Null();
+ }
+ }
+ free(name_chars);
+ }
+ return result;
+}
+
// Statically allocated Dart_CObject instances for immutable
// objects. As these will be used by different threads the use of
// these depends on the fact that the marking internally in the
diff --git a/runtime/bin/dartutils.h b/runtime/bin/dartutils.h
index c6a9b23..5bfaf6d 100644
--- a/runtime/bin/dartutils.h
+++ b/runtime/bin/dartutils.h
@@ -10,6 +10,7 @@
#include "include/dart_native_api.h"
#include "platform/assert.h"
#include "platform/globals.h"
+#include "platform/hashmap.h"
namespace dart {
namespace bin {
@@ -33,6 +34,10 @@
return handle;
}
+static inline void* GetHashmapKeyFromString(char* key) {
+ return reinterpret_cast<void*>(key);
+}
+
class CommandLineOptions {
public:
explicit CommandLineOptions(int max_count)
@@ -256,6 +261,9 @@
static Dart_Handle LibraryFilePath(Dart_Handle library_uri);
+ static void SetEnvironment(dart::SimpleHashMap* environment);
+ static Dart_Handle EnvironmentCallback(Dart_Handle name);
+
private:
static Dart_Handle SetWorkingDirectory();
static Dart_Handle PrepareBuiltinLibrary(Dart_Handle builtin_lib,
@@ -271,6 +279,8 @@
static Dart_Handle PrepareIsolateLibrary(Dart_Handle isolate_lib);
static Dart_Handle PrepareCLILibrary(Dart_Handle cli_lib);
+ static dart::SimpleHashMap* environment_;
+
DISALLOW_ALLOCATION();
DISALLOW_IMPLICIT_CONSTRUCTORS(DartUtils);
};
diff --git a/runtime/bin/directory.cc b/runtime/bin/directory.cc
index de20ad9..362a955 100644
--- a/runtime/bin/directory.cc
+++ b/runtime/bin/directory.cc
@@ -25,7 +25,8 @@
Namespace* namespc = Namespace::GetNamespace(args, 0);
const char* current = Directory::Current(namespc);
if (current != NULL) {
- Dart_SetReturnValue(args, DartUtils::NewString(current));
+ Dart_Handle str = ThrowIfError(DartUtils::NewString(current));
+ Dart_SetReturnValue(args, str);
} else {
Dart_SetReturnValue(args, DartUtils::NewDartOSError());
}
@@ -106,7 +107,8 @@
void FUNCTION_NAME(Directory_SystemTemp)(Dart_NativeArguments args) {
Namespace* namespc = Namespace::GetNamespace(args, 0);
const char* result = Directory::SystemTemp(namespc);
- Dart_SetReturnValue(args, DartUtils::NewString(result));
+ Dart_Handle str = ThrowIfError(DartUtils::NewString(result));
+ Dart_SetReturnValue(args, str);
}
void FUNCTION_NAME(Directory_CreateTemp)(Dart_NativeArguments args) {
@@ -125,7 +127,8 @@
}
}
if (result != NULL) {
- Dart_SetReturnValue(args, DartUtils::NewString(result));
+ Dart_Handle str = ThrowIfError(DartUtils::NewString(result));
+ Dart_SetReturnValue(args, str);
} else {
Dart_SetReturnValue(args, DartUtils::NewDartOSError(&os_error));
}
@@ -248,10 +251,7 @@
sizeof(*listing), ReleaseListing);
Dart_Handle result = Dart_SetNativeInstanceField(
dart_this, kAsyncDirectoryListerFieldIndex, listing_pointer);
- if (Dart_IsError(result)) {
- Log::PrintErr("SetAsyncDirectoryListerPointer failed\n");
- Dart_PropagateError(result);
- }
+ ThrowIfError(result);
}
void Directory::SetSystemTemp(const char* path) {
diff --git a/runtime/bin/eventhandler.h b/runtime/bin/eventhandler.h
index bfd5c0e..8132cde 100644
--- a/runtime/bin/eventhandler.h
+++ b/runtime/bin/eventhandler.h
@@ -413,7 +413,7 @@
virtual bool IsListeningSocket() const { return true; }
virtual void SetPortAndMask(Dart_Port port, intptr_t mask) {
- HashMap::Entry* entry = tokens_map_.Lookup(
+ SimpleHashMap::Entry* entry = tokens_map_.Lookup(
GetHashmapKeyFromPort(port), GetHashmapHashFromPort(port), true);
PortEntry* pentry;
if (entry->value == NULL) {
@@ -454,7 +454,7 @@
} while (current != root);
}
- for (HashMap::Entry* entry = tokens_map_.Start(); entry != NULL;
+ for (SimpleHashMap::Entry* entry = tokens_map_.Start(); entry != NULL;
entry = tokens_map_.Next(entry)) {
PortEntry* pentry = reinterpret_cast<PortEntry*>(entry->value);
if (pentry->IsReady()) {
@@ -467,7 +467,7 @@
}
virtual void RemovePort(Dart_Port port) {
- HashMap::Entry* entry = tokens_map_.Lookup(
+ SimpleHashMap::Entry* entry = tokens_map_.Lookup(
GetHashmapKeyFromPort(port), GetHashmapHashFromPort(port), false);
if (entry != NULL) {
PortEntry* pentry = reinterpret_cast<PortEntry*>(entry->value);
@@ -491,7 +491,7 @@
}
virtual void RemoveAllPorts() {
- for (HashMap::Entry* entry = tokens_map_.Start(); entry != NULL;
+ for (SimpleHashMap::Entry* entry = tokens_map_.Start(); entry != NULL;
entry = tokens_map_.Next(entry)) {
PortEntry* pentry = reinterpret_cast<PortEntry*>(entry->value);
entry->value = NULL;
@@ -532,7 +532,7 @@
ASSERT(IS_EVENT(events, kCloseEvent) || IS_EVENT(events, kErrorEvent) ||
IS_EVENT(events, kDestroyedEvent));
- for (HashMap::Entry* entry = tokens_map_.Start(); entry != NULL;
+ for (SimpleHashMap::Entry* entry = tokens_map_.Start(); entry != NULL;
entry = tokens_map_.Next(entry)) {
PortEntry* pentry = reinterpret_cast<PortEntry*>(entry->value);
DartUtils::PostInt32(pentry->dart_port, events);
@@ -550,7 +550,7 @@
}
virtual void ReturnTokens(Dart_Port port, int count) {
- HashMap::Entry* entry = tokens_map_.Lookup(
+ SimpleHashMap::Entry* entry = tokens_map_.Lookup(
GetHashmapKeyFromPort(port), GetHashmapHashFromPort(port), false);
ASSERT(entry != NULL);
@@ -588,7 +588,7 @@
// A convenience mapping:
// Dart_Port -> struct PortEntry { dart_port, mask, token_count }
- HashMap tokens_map_;
+ SimpleHashMap tokens_map_;
bool disable_tokens_;
diff --git a/runtime/bin/eventhandler_android.cc b/runtime/bin/eventhandler_android.cc
index 07e6c04..a6bd764 100644
--- a/runtime/bin/eventhandler_android.cc
+++ b/runtime/bin/eventhandler_android.cc
@@ -75,7 +75,7 @@
}
EventHandlerImplementation::EventHandlerImplementation()
- : socket_map_(&HashMap::SamePointerValue, 16) {
+ : socket_map_(&SimpleHashMap::SamePointerValue, 16) {
intptr_t result;
result = NO_RETRY_EXPECTED(pipe(interrupt_fds_));
if (result != 0) {
@@ -143,8 +143,8 @@
intptr_t fd,
bool is_listening) {
ASSERT(fd >= 0);
- HashMap::Entry* entry = socket_map_.Lookup(GetHashmapKeyFromFd(fd),
- GetHashmapHashFromFd(fd), true);
+ SimpleHashMap::Entry* entry = socket_map_.Lookup(
+ GetHashmapKeyFromFd(fd), GetHashmapHashFromFd(fd), true);
ASSERT(entry != NULL);
DescriptorInfo* di = reinterpret_cast<DescriptorInfo*>(entry->value);
if (di == NULL) {
diff --git a/runtime/bin/eventhandler_android.h b/runtime/bin/eventhandler_android.h
index c934549..0cfd543 100644
--- a/runtime/bin/eventhandler_android.h
+++ b/runtime/bin/eventhandler_android.h
@@ -85,7 +85,7 @@
static void* GetHashmapKeyFromFd(intptr_t fd);
static uint32_t GetHashmapHashFromFd(intptr_t fd);
- HashMap socket_map_;
+ SimpleHashMap socket_map_;
TimeoutQueue timeout_queue_;
bool shutdown_;
int interrupt_fds_[2];
diff --git a/runtime/bin/eventhandler_fuchsia.cc b/runtime/bin/eventhandler_fuchsia.cc
index 6a7ae35..0f16c8e 100644
--- a/runtime/bin/eventhandler_fuchsia.cc
+++ b/runtime/bin/eventhandler_fuchsia.cc
@@ -266,7 +266,7 @@
}
EventHandlerImplementation::EventHandlerImplementation()
- : socket_map_(&HashMap::SamePointerValue, 16) {
+ : socket_map_(&SimpleHashMap::SamePointerValue, 16) {
shutdown_ = false;
// Create the port.
port_handle_ = ZX_HANDLE_INVALID;
@@ -311,7 +311,7 @@
bool is_listening) {
IOHandle* handle = reinterpret_cast<IOHandle*>(fd);
ASSERT(handle->fd() >= 0);
- HashMap::Entry* entry =
+ SimpleHashMap::Entry* entry =
socket_map_.Lookup(GetHashmapKeyFromFd(handle->fd()),
GetHashmapHashFromFd(handle->fd()), true);
ASSERT(entry != NULL);
diff --git a/runtime/bin/eventhandler_fuchsia.h b/runtime/bin/eventhandler_fuchsia.h
index 170f7bd..5a9f1ab 100644
--- a/runtime/bin/eventhandler_fuchsia.h
+++ b/runtime/bin/eventhandler_fuchsia.h
@@ -158,7 +158,7 @@
intptr_t GetPollEvents(intptr_t events);
void HandleInterrupt(InterruptMessage* msg);
- HashMap socket_map_;
+ SimpleHashMap socket_map_;
TimeoutQueue timeout_queue_;
bool shutdown_;
zx_handle_t port_handle_;
diff --git a/runtime/bin/eventhandler_linux.cc b/runtime/bin/eventhandler_linux.cc
index 2b20572..d02a49e 100644
--- a/runtime/bin/eventhandler_linux.cc
+++ b/runtime/bin/eventhandler_linux.cc
@@ -69,7 +69,7 @@
}
EventHandlerImplementation::EventHandlerImplementation()
- : socket_map_(&HashMap::SamePointerValue, 16) {
+ : socket_map_(&SimpleHashMap::SamePointerValue, 16) {
intptr_t result;
result = NO_RETRY_EXPECTED(pipe(interrupt_fds_));
if (result != 0) {
@@ -151,8 +151,8 @@
intptr_t fd,
bool is_listening) {
ASSERT(fd >= 0);
- HashMap::Entry* entry = socket_map_.Lookup(GetHashmapKeyFromFd(fd),
- GetHashmapHashFromFd(fd), true);
+ SimpleHashMap::Entry* entry = socket_map_.Lookup(
+ GetHashmapKeyFromFd(fd), GetHashmapHashFromFd(fd), true);
ASSERT(entry != NULL);
DescriptorInfo* di = reinterpret_cast<DescriptorInfo*>(entry->value);
if (di == NULL) {
diff --git a/runtime/bin/eventhandler_linux.h b/runtime/bin/eventhandler_linux.h
index d817bd5..ac468dc 100644
--- a/runtime/bin/eventhandler_linux.h
+++ b/runtime/bin/eventhandler_linux.h
@@ -83,7 +83,7 @@
static void* GetHashmapKeyFromFd(intptr_t fd);
static uint32_t GetHashmapHashFromFd(intptr_t fd);
- HashMap socket_map_;
+ SimpleHashMap socket_map_;
TimeoutQueue timeout_queue_;
bool shutdown_;
int interrupt_fds_[2];
diff --git a/runtime/bin/eventhandler_macos.cc b/runtime/bin/eventhandler_macos.cc
index 974ab8a..04abaac 100644
--- a/runtime/bin/eventhandler_macos.cc
+++ b/runtime/bin/eventhandler_macos.cc
@@ -93,7 +93,7 @@
}
EventHandlerImplementation::EventHandlerImplementation()
- : socket_map_(&HashMap::SamePointerValue, 16) {
+ : socket_map_(&SimpleHashMap::SamePointerValue, 16) {
intptr_t result;
result = NO_RETRY_EXPECTED(pipe(interrupt_fds_));
if (result != 0) {
@@ -160,8 +160,8 @@
intptr_t fd,
bool is_listening) {
ASSERT(fd >= 0);
- HashMap::Entry* entry = socket_map_.Lookup(GetHashmapKeyFromFd(fd),
- GetHashmapHashFromFd(fd), true);
+ SimpleHashMap::Entry* entry = socket_map_.Lookup(
+ GetHashmapKeyFromFd(fd), GetHashmapHashFromFd(fd), true);
ASSERT(entry != NULL);
DescriptorInfo* di = reinterpret_cast<DescriptorInfo*>(entry->value);
if (di == NULL) {
diff --git a/runtime/bin/eventhandler_macos.h b/runtime/bin/eventhandler_macos.h
index c8ed3ba..7550fce 100644
--- a/runtime/bin/eventhandler_macos.h
+++ b/runtime/bin/eventhandler_macos.h
@@ -96,7 +96,7 @@
static void* GetHashmapKeyFromFd(intptr_t fd);
static uint32_t GetHashmapHashFromFd(intptr_t fd);
- HashMap socket_map_;
+ SimpleHashMap socket_map_;
TimeoutQueue timeout_queue_;
bool shutdown_;
int interrupt_fds_[2];
diff --git a/runtime/bin/file.cc b/runtime/bin/file.cc
index 56cf4c9..45e5b91 100644
--- a/runtime/bin/file.cc
+++ b/runtime/bin/file.cc
@@ -49,10 +49,7 @@
DEBUG_ASSERT(IsFile(dart_this));
Dart_Handle result = Dart_SetNativeInstanceField(
dart_this, kFileNativeFieldIndex, file_pointer);
- if (Dart_IsError(result)) {
- Log::PrintErr("SetNativeInstanceField in SetFile() failed\n");
- Dart_PropagateError(result);
- }
+ ThrowIfError(result);
}
void FUNCTION_NAME(File_GetPointer)(Dart_NativeArguments args) {
@@ -213,9 +210,7 @@
dart_args[2] = Dart_NewInteger(bytes_read);
// TODO(sgjesse): Cache the _makeUint8ListView function somewhere.
Dart_Handle io_lib = Dart_LookupLibrary(DartUtils::NewString("dart:io"));
- if (Dart_IsError(io_lib)) {
- Dart_PropagateError(io_lib);
- }
+ ThrowIfError(io_lib);
Dart_Handle array_view =
Dart_Invoke(io_lib, DartUtils::NewString("_makeUint8ListView"),
kNumArgs, dart_args);
@@ -239,9 +234,7 @@
intptr_t length = end - start;
intptr_t array_len = 0;
Dart_Handle result = Dart_ListLength(buffer_obj, &array_len);
- if (Dart_IsError(result)) {
- Dart_PropagateError(result);
- }
+ ThrowIfError(result);
ASSERT(end <= array_len);
uint8_t* buffer = Dart_ScopeAllocate(length);
int64_t bytes_read = file->Read(reinterpret_cast<void*>(buffer), length);
@@ -278,9 +271,7 @@
void* buffer = NULL;
Dart_Handle result =
Dart_TypedDataAcquireData(buffer_obj, &type, &buffer, &buffer_len);
- if (Dart_IsError(result)) {
- Dart_PropagateError(result);
- }
+ ThrowIfError(result);
ASSERT(type == Dart_TypedData_kUint8 || type == Dart_TypedData_kInt8);
ASSERT(end <= buffer_len);
@@ -291,11 +282,7 @@
bool success = file->WriteFully(byte_buffer + start, length);
// Release the direct pointer acquired above.
- result = Dart_TypedDataReleaseData(buffer_obj);
- if (Dart_IsError(result)) {
- Dart_PropagateError(result);
- }
-
+ ThrowIfError(Dart_TypedDataReleaseData(buffer_obj));
if (!success) {
Dart_SetReturnValue(args, DartUtils::NewDartOSError());
} else {
@@ -567,7 +554,8 @@
if (target == NULL) {
Dart_SetReturnValue(args, DartUtils::NewDartOSError(&os_error));
} else {
- Dart_SetReturnValue(args, DartUtils::NewString(target));
+ Dart_Handle str = ThrowIfError(DartUtils::NewString(target));
+ Dart_SetReturnValue(args, str);
}
}
@@ -700,7 +688,8 @@
}
}
if (path != NULL) {
- Dart_SetReturnValue(args, DartUtils::NewString(path));
+ Dart_Handle str = ThrowIfError(DartUtils::NewString(path));
+ Dart_SetReturnValue(args, str);
} else {
Dart_SetReturnValue(args, DartUtils::NewDartOSError(&os_error));
}
@@ -743,22 +732,16 @@
}
Dart_Handle returned_data =
Dart_NewTypedData(Dart_TypedData_kInt64, File::kStatSize);
- if (Dart_IsError(returned_data)) {
- Dart_PropagateError(returned_data);
- }
+ ThrowIfError(returned_data);
Dart_TypedData_Type data_type_unused;
void* data_location;
intptr_t data_length_unused;
Dart_Handle status = Dart_TypedDataAcquireData(
returned_data, &data_type_unused, &data_location, &data_length_unused);
- if (Dart_IsError(status)) {
- Dart_PropagateError(status);
- }
+ ThrowIfError(status);
memmove(data_location, stat_data, File::kStatSize * sizeof(int64_t));
status = Dart_TypedDataReleaseData(returned_data);
- if (Dart_IsError(status)) {
- Dart_PropagateError(status);
- }
+ ThrowIfError(status);
Dart_SetReturnValue(args, returned_data);
}
diff --git a/runtime/bin/file_system_watcher_android.cc b/runtime/bin/file_system_watcher_android.cc
index b138d435..0bef08c 100644
--- a/runtime/bin/file_system_watcher_android.cc
+++ b/runtime/bin/file_system_watcher_android.cc
@@ -123,10 +123,12 @@
Dart_ListSetAt(event, 0, Dart_NewInteger(mask));
Dart_ListSetAt(event, 1, Dart_NewInteger(e->cookie));
if (e->len > 0) {
- Dart_ListSetAt(
- event, 2,
- Dart_NewStringFromUTF8(reinterpret_cast<uint8_t*>(e->name),
- strlen(e->name)));
+ Dart_Handle name = Dart_NewStringFromUTF8(
+ reinterpret_cast<uint8_t*>(e->name), strlen(e->name));
+ if (Dart_IsError(name)) {
+ return name;
+ }
+ Dart_ListSetAt(event, 2, name);
} else {
Dart_ListSetAt(event, 2, Dart_Null());
}
diff --git a/runtime/bin/file_system_watcher_linux.cc b/runtime/bin/file_system_watcher_linux.cc
index a0387c0..c23c133 100644
--- a/runtime/bin/file_system_watcher_linux.cc
+++ b/runtime/bin/file_system_watcher_linux.cc
@@ -123,10 +123,12 @@
Dart_ListSetAt(event, 0, Dart_NewInteger(mask));
Dart_ListSetAt(event, 1, Dart_NewInteger(e->cookie));
if (e->len > 0) {
- Dart_ListSetAt(
- event, 2,
- Dart_NewStringFromUTF8(reinterpret_cast<uint8_t*>(e->name),
- strlen(e->name)));
+ Dart_Handle name = Dart_NewStringFromUTF8(
+ reinterpret_cast<uint8_t*>(e->name), strlen(e->name));
+ if (Dart_IsError(name)) {
+ return name;
+ }
+ Dart_ListSetAt(event, 2, name);
} else {
Dart_ListSetAt(event, 2, Dart_Null());
}
diff --git a/runtime/bin/file_system_watcher_macos.cc b/runtime/bin/file_system_watcher_macos.cc
index 9a4f87a..53ca879 100644
--- a/runtime/bin/file_system_watcher_macos.cc
+++ b/runtime/bin/file_system_watcher_macos.cc
@@ -376,9 +376,12 @@
}
Dart_ListSetAt(event, 0, Dart_NewInteger(mask));
Dart_ListSetAt(event, 1, Dart_NewInteger(1));
- Dart_ListSetAt(event, 2,
- Dart_NewStringFromUTF8(
- reinterpret_cast<uint8_t*>(e.data.path), path_len));
+ Dart_Handle name = Dart_NewStringFromUTF8(
+ reinterpret_cast<uint8_t*>(e.data.path), path_len);
+ if (Dart_IsError(name)) {
+ return name;
+ }
+ Dart_ListSetAt(event, 2, name);
Dart_ListSetAt(event, 3, Dart_NewBoolean(true));
Dart_ListSetAt(event, 4, Dart_NewInteger(path_id));
Dart_ListSetAt(events, i, event);
diff --git a/runtime/bin/gen_snapshot.cc b/runtime/bin/gen_snapshot.cc
index 32c310e..e75b1fa 100644
--- a/runtime/bin/gen_snapshot.cc
+++ b/runtime/bin/gen_snapshot.cc
@@ -86,11 +86,7 @@
static CommandLineOptions* entry_points_files = NULL;
// The environment provided through the command line using -D options.
-static dart::HashMap* environment = NULL;
-
-static void* GetHashmapKeyFromString(char* key) {
- return reinterpret_cast<void*>(key);
-}
+static dart::SimpleHashMap* environment = NULL;
static bool ProcessEnvironmentOption(const char* arg,
CommandLineOptions* vm_options) {
@@ -98,36 +94,6 @@
&environment);
}
-static Dart_Handle EnvironmentCallback(Dart_Handle name) {
- uint8_t* utf8_array;
- intptr_t utf8_len;
- Dart_Handle result = Dart_Null();
- Dart_Handle handle = Dart_StringToUTF8(name, &utf8_array, &utf8_len);
- if (Dart_IsError(handle)) {
- handle = Dart_ThrowException(
- DartUtils::NewDartArgumentError(Dart_GetError(handle)));
- } else {
- char* name_chars = reinterpret_cast<char*>(malloc(utf8_len + 1));
- memmove(name_chars, utf8_array, utf8_len);
- name_chars[utf8_len] = '\0';
- const char* value = NULL;
- if (environment != NULL) {
- HashMap::Entry* entry =
- environment->Lookup(GetHashmapKeyFromString(name_chars),
- HashMap::StringHash(name_chars), false);
- if (entry != NULL) {
- value = reinterpret_cast<char*>(entry->value);
- }
- }
- if (value != NULL) {
- result = Dart_NewStringFromUTF8(reinterpret_cast<const uint8_t*>(value),
- strlen(value));
- }
- free(name_chars);
- }
- return result;
-}
-
static const char* kSnapshotKindNames[] = {
"core",
"core-jit",
@@ -1423,7 +1389,8 @@
}
Dart_EnterScope();
- Dart_Handle result = Dart_SetEnvironmentCallback(EnvironmentCallback);
+ Dart_Handle result =
+ Dart_SetEnvironmentCallback(DartUtils::EnvironmentCallback);
CHECK_RESULT(result);
// The root library has to be set to generate AOT snapshots, and sometimes we
@@ -1510,6 +1477,7 @@
PrintUsage();
return kErrorExitCode;
}
+ DartUtils::SetEnvironment(environment);
// Sniff the script to check if it is actually a dill file.
uint8_t* kernel_buffer = NULL;
@@ -1656,7 +1624,7 @@
return 0;
}
- result = Dart_SetEnvironmentCallback(EnvironmentCallback);
+ result = Dart_SetEnvironmentCallback(DartUtils::EnvironmentCallback);
CHECK_RESULT(result);
// Load up the script before a snapshot is created.
@@ -1709,7 +1677,7 @@
exit(kErrorExitCode);
}
Dart_EnterScope();
- result = Dart_SetEnvironmentCallback(EnvironmentCallback);
+ result = Dart_SetEnvironmentCallback(DartUtils::EnvironmentCallback);
CHECK_RESULT(result);
// Set up the library tag handler in such a manner that it will use the
diff --git a/runtime/bin/hashmap_test.cc b/runtime/bin/hashmap_test.cc
index 7234f41..307d21f 100644
--- a/runtime/bin/hashmap_test.cc
+++ b/runtime/bin/hashmap_test.cc
@@ -17,11 +17,12 @@
class IntSet {
public:
explicit IntSet(IntKeyHash hash)
- : hash_(hash), map_(HashMap::SamePointerValue, kInitialSize) {}
+ : hash_(hash), map_(SimpleHashMap::SamePointerValue, kInitialSize) {}
void Insert(int x) {
EXPECT_NE(0, x); // 0 corresponds to (void*)NULL - illegal key value
- HashMap::Entry* p = map_.Lookup(reinterpret_cast<void*>(x), hash_(x), true);
+ SimpleHashMap::Entry* p =
+ map_.Lookup(reinterpret_cast<void*>(x), hash_(x), true);
EXPECT(p != NULL); // insert is set!
EXPECT_EQ(reinterpret_cast<void*>(x), p->key);
// We don't care about p->value.
@@ -33,7 +34,7 @@
}
bool Present(int x) {
- HashMap::Entry* p =
+ SimpleHashMap::Entry* p =
map_.Lookup(reinterpret_cast<void*>(x), hash_(x), false);
if (p != NULL) {
EXPECT_EQ(reinterpret_cast<void*>(x), p->key);
@@ -45,7 +46,7 @@
uint32_t occupancy() const {
uint32_t count = 0;
- for (HashMap::Entry* p = map_.Start(); p != NULL; p = map_.Next(p)) {
+ for (SimpleHashMap::Entry* p = map_.Start(); p != NULL; p = map_.Next(p)) {
count++;
}
EXPECT_EQ(map_.occupancy_, count);
@@ -54,7 +55,7 @@
private:
IntKeyHash hash_;
- HashMap map_;
+ SimpleHashMap map_;
};
static uint32_t WordHash(uint32_t key) {
@@ -166,7 +167,7 @@
EXPECT_EQ(0u, set.occupancy());
}
-VM_UNIT_TEST_CASE(HashMap_Basic) {
+VM_UNIT_TEST_CASE(SimpleHashMap_Basic) {
TestSet(WordHash, 100);
TestSet(Hash, 100);
TestSet(CollisionHash1, 50);
diff --git a/runtime/bin/main.cc b/runtime/bin/main.cc
index 5531dd5..2c18c3b 100644
--- a/runtime/bin/main.cc
+++ b/runtime/bin/main.cc
@@ -114,40 +114,6 @@
return dart_arguments;
}
-static void* GetHashmapKeyFromString(char* key) {
- return reinterpret_cast<void*>(key);
-}
-
-static Dart_Handle EnvironmentCallback(Dart_Handle name) {
- uint8_t* utf8_array;
- intptr_t utf8_len;
- Dart_Handle result = Dart_Null();
- Dart_Handle handle = Dart_StringToUTF8(name, &utf8_array, &utf8_len);
- if (Dart_IsError(handle)) {
- handle = Dart_ThrowException(
- DartUtils::NewDartArgumentError(Dart_GetError(handle)));
- } else {
- char* name_chars = reinterpret_cast<char*>(malloc(utf8_len + 1));
- memmove(name_chars, utf8_array, utf8_len);
- name_chars[utf8_len] = '\0';
- const char* value = NULL;
- if (Options::environment() != NULL) {
- HashMap::Entry* entry = Options::environment()->Lookup(
- GetHashmapKeyFromString(name_chars), HashMap::StringHash(name_chars),
- false);
- if (entry != NULL) {
- value = reinterpret_cast<char*>(entry->value);
- }
- }
- if (value != NULL) {
- result = Dart_NewStringFromUTF8(reinterpret_cast<const uint8_t*>(value),
- strlen(value));
- }
- free(name_chars);
- }
- return result;
-}
-
#define SAVE_ERROR_AND_EXIT(result) \
*error = strdup(Dart_GetError(result)); \
if (Dart_IsCompilationError(result)) { \
@@ -330,7 +296,7 @@
#endif
}
- result = Dart_SetEnvironmentCallback(EnvironmentCallback);
+ result = Dart_SetEnvironmentCallback(DartUtils::EnvironmentCallback);
CHECK_RESULT(result);
#if !defined(DART_PRECOMPILED_RUNTIME)
@@ -626,7 +592,7 @@
result = Dart_CompileAll();
CHECK_RESULT(result);
}
- result = Dart_SetEnvironmentCallback(EnvironmentCallback);
+ result = Dart_SetEnvironmentCallback(DartUtils::EnvironmentCallback);
CHECK_RESULT(result);
Dart_ExitScope();
Dart_ExitIsolate();
@@ -1182,6 +1148,7 @@
Platform::Exit(kErrorExitCode);
}
}
+ DartUtils::SetEnvironment(Options::environment());
Loader::InitOnce();
diff --git a/runtime/bin/main_options.cc b/runtime/bin/main_options.cc
index f2e1e1f..9e7a323 100644
--- a/runtime/bin/main_options.cc
+++ b/runtime/bin/main_options.cc
@@ -227,7 +227,7 @@
}
// clang-format on
-dart::HashMap* Options::environment_ = NULL;
+dart::SimpleHashMap* Options::environment_ = NULL;
bool Options::ProcessEnvironmentOption(const char* arg,
CommandLineOptions* vm_options) {
return OptionProcessor::ProcessEnvironmentOption(arg, vm_options,
@@ -236,7 +236,7 @@
void Options::DestroyEnvironment() {
if (environment_ != NULL) {
- for (HashMap::Entry* p = environment_->Start(); p != NULL;
+ for (SimpleHashMap::Entry* p = environment_->Start(); p != NULL;
p = environment_->Next(p)) {
free(p->key);
free(p->value);
diff --git a/runtime/bin/main_options.h b/runtime/bin/main_options.h
index a90fffd..53184a4 100644
--- a/runtime/bin/main_options.h
+++ b/runtime/bin/main_options.h
@@ -115,7 +115,7 @@
static void SetDart2Options(CommandLineOptions* vm_options);
static void SetDart1Options(CommandLineOptions* vm_options);
- static dart::HashMap* environment() { return environment_; }
+ static dart::SimpleHashMap* environment() { return environment_; }
static const char* vm_service_server_ip() { return vm_service_server_ip_; }
static int vm_service_server_port() { return vm_service_server_port_; }
@@ -148,7 +148,7 @@
ENUM_OPTIONS_LIST(ENUM_OPTION_DECL)
#undef ENUM_OPTION_DECL
- static dart::HashMap* environment_;
+ static dart::SimpleHashMap* environment_;
// Frontend argument processing.
#if !defined(DART_PRECOMPILED_RUNTIME)
diff --git a/runtime/bin/options.cc b/runtime/bin/options.cc
index 5fc416d..f9652c6 100644
--- a/runtime/bin/options.cc
+++ b/runtime/bin/options.cc
@@ -41,13 +41,10 @@
return false;
}
-static void* GetHashmapKeyFromString(char* key) {
- return reinterpret_cast<void*>(key);
-}
-
-bool OptionProcessor::ProcessEnvironmentOption(const char* arg,
- CommandLineOptions* vm_options,
- dart::HashMap** environment) {
+bool OptionProcessor::ProcessEnvironmentOption(
+ const char* arg,
+ CommandLineOptions* vm_options,
+ dart::SimpleHashMap** environment) {
ASSERT(arg != NULL);
ASSERT(environment != NULL);
if (*arg == '\0') {
@@ -64,7 +61,7 @@
return true;
}
if (*environment == NULL) {
- *environment = new HashMap(&HashMap::SameStringValue, 4);
+ *environment = new SimpleHashMap(&SimpleHashMap::SameStringValue, 4);
}
// Split the name=value part of the -Dname=value argument.
char* name;
@@ -85,9 +82,10 @@
strncpy(name, arg, name_len);
name[name_len] = '\0';
value = strdup(equals_pos + 1);
- HashMap::Entry* entry = (*environment)
- ->Lookup(GetHashmapKeyFromString(name),
- HashMap::StringHash(name), true);
+ SimpleHashMap::Entry* entry =
+ (*environment)
+ ->Lookup(GetHashmapKeyFromString(name),
+ SimpleHashMap::StringHash(name), true);
ASSERT(entry != NULL); // Lookup adds an entry if key not found.
if (entry->value != NULL) {
free(name);
diff --git a/runtime/bin/options.h b/runtime/bin/options.h
index d1d6088..e4edbcf 100644
--- a/runtime/bin/options.h
+++ b/runtime/bin/options.h
@@ -34,7 +34,7 @@
static bool ProcessEnvironmentOption(const char* arg,
CommandLineOptions* vm_options,
- dart::HashMap** environment);
+ dart::SimpleHashMap** environment);
private:
static OptionProcessor* first_;
diff --git a/runtime/bin/platform.cc b/runtime/bin/platform.cc
index eff6dfb..20003a0 100644
--- a/runtime/bin/platform.cc
+++ b/runtime/bin/platform.cc
@@ -4,6 +4,7 @@
#include "bin/platform.h"
+#include "bin/dartutils.h"
#include "bin/file.h"
#include "bin/utils.h"
#include "include/dart_api.h"
@@ -16,7 +17,9 @@
}
void FUNCTION_NAME(Platform_OperatingSystem)(Dart_NativeArguments args) {
- Dart_SetReturnValue(args, DartUtils::NewString(Platform::OperatingSystem()));
+ Dart_Handle str = DartUtils::NewString(Platform::OperatingSystem());
+ ThrowIfError(str);
+ Dart_SetReturnValue(args, str);
}
void FUNCTION_NAME(Platform_OperatingSystemVersion)(Dart_NativeArguments args) {
@@ -24,19 +27,25 @@
if (version == NULL) {
Dart_SetReturnValue(args, DartUtils::NewDartOSError());
} else {
- Dart_SetReturnValue(args, DartUtils::NewString(version));
+ Dart_Handle str = DartUtils::NewString(version);
+ ThrowIfError(str);
+ Dart_SetReturnValue(args, str);
}
}
void FUNCTION_NAME(Platform_PathSeparator)(Dart_NativeArguments args) {
- Dart_SetReturnValue(args, DartUtils::NewString(File::PathSeparator()));
+ Dart_Handle str = DartUtils::NewString(File::PathSeparator());
+ ThrowIfError(str);
+ Dart_SetReturnValue(args, str);
}
void FUNCTION_NAME(Platform_LocalHostname)(Dart_NativeArguments args) {
const intptr_t HOSTNAME_LENGTH = 256;
char hostname[HOSTNAME_LENGTH];
if (Platform::LocalHostname(hostname, HOSTNAME_LENGTH)) {
- Dart_SetReturnValue(args, DartUtils::NewString(hostname));
+ Dart_Handle str = DartUtils::NewString(hostname);
+ ThrowIfError(str);
+ Dart_SetReturnValue(args, str);
} else {
Dart_SetReturnValue(args, DartUtils::NewDartOSError());
}
@@ -66,10 +75,8 @@
Dart_Handle result = Dart_NewListOf(Dart_CoreType_String, end - 1);
for (intptr_t i = 1; i < end; i++) {
Dart_Handle str = DartUtils::NewString(argv[i]);
- Dart_Handle error = Dart_ListSetAt(result, i - 1, str);
- if (Dart_IsError(error)) {
- Dart_PropagateError(error);
- }
+ ThrowIfError(str);
+ ThrowIfError(Dart_ListSetAt(result, i - 1, str));
}
Dart_SetReturnValue(args, result);
}
@@ -83,9 +90,7 @@
Dart_SetReturnValue(args, DartUtils::NewDartOSError(&error));
} else {
Dart_Handle result = Dart_NewList(count);
- if (Dart_IsError(result)) {
- Dart_PropagateError(result);
- }
+ ThrowIfError(result);
intptr_t result_idx = 0;
for (intptr_t env_idx = 0; env_idx < count; env_idx++) {
Dart_Handle str = DartUtils::NewString(env[env_idx]);
@@ -95,9 +100,7 @@
continue;
}
Dart_Handle error = Dart_ListSetAt(result, result_idx, str);
- if (Dart_IsError(error)) {
- Dart_PropagateError(error);
- }
+ ThrowIfError(error);
result_idx++;
}
Dart_SetReturnValue(args, result);
diff --git a/runtime/bin/process.cc b/runtime/bin/process.cc
index 1c1191a..065b477 100644
--- a/runtime/bin/process.cc
+++ b/runtime/bin/process.cc
@@ -28,21 +28,15 @@
ASSERT(Dart_IsList(strings));
intptr_t len = 0;
Dart_Handle result = Dart_ListLength(strings, &len);
- if (Dart_IsError(result)) {
- Dart_PropagateError(result);
- }
+ ThrowIfError(result);
// Protect against user-defined list implementations that can have
// arbitrary length.
if ((len < 0) || (len > kMaxArgumentListLength)) {
result = DartUtils::SetIntegerField(status_handle, "_errorCode", 0);
- if (Dart_IsError(result)) {
- Dart_PropagateError(result);
- }
+ ThrowIfError(result);
result = DartUtils::SetStringField(status_handle, "_errorMessage",
"Max argument list length exceeded");
- if (Dart_IsError(result)) {
- Dart_PropagateError(result);
- }
+ ThrowIfError(result);
return NULL;
}
*length = len;
@@ -51,19 +45,13 @@
reinterpret_cast<char**>(Dart_ScopeAllocate(len * sizeof(*string_args)));
for (int i = 0; i < len; i++) {
Dart_Handle arg = Dart_ListGetAt(strings, i);
- if (Dart_IsError(arg)) {
- Dart_PropagateError(arg);
- }
+ ThrowIfError(arg);
if (!Dart_IsString(arg)) {
result = DartUtils::SetIntegerField(status_handle, "_errorCode", 0);
- if (Dart_IsError(result)) {
- Dart_PropagateError(result);
- }
+ ThrowIfError(result);
result =
DartUtils::SetStringField(status_handle, "_errorMessage", error_msg);
- if (Dart_IsError(result)) {
- Dart_PropagateError(result);
- }
+ ThrowIfError(result);
return NULL;
}
string_args[i] = const_cast<char*>(DartUtils::GetStringValue(arg));
@@ -100,14 +88,10 @@
Dart_Handle result;
if (!Dart_IsString(path_handle)) {
result = DartUtils::SetIntegerField(status_handle, "_errorCode", 0);
- if (Dart_IsError(result)) {
- Dart_PropagateError(result);
- }
+ ThrowIfError(result);
result = DartUtils::SetStringField(status_handle, "_errorMessage",
"Path must be a builtin string");
- if (Dart_IsError(result)) {
- Dart_PropagateError(result);
- }
+ ThrowIfError(result);
Dart_SetBooleanReturnValue(args, false);
return;
}
@@ -128,15 +112,11 @@
working_directory = DartUtils::GetStringValue(working_directory_handle);
} else if (!Dart_IsNull(working_directory_handle)) {
result = DartUtils::SetIntegerField(status_handle, "_errorCode", 0);
- if (Dart_IsError(result)) {
- Dart_PropagateError(result);
- }
+ ThrowIfError(result);
result =
DartUtils::SetStringField(status_handle, "_errorMessage",
"WorkingDirectory must be a builtin string");
- if (Dart_IsError(result)) {
- Dart_PropagateError(result);
- }
+ ThrowIfError(result);
Dart_SetBooleanReturnValue(args, false);
return;
}
@@ -183,16 +163,12 @@
} else {
result =
DartUtils::SetIntegerField(status_handle, "_errorCode", error_code);
- if (Dart_IsError(result)) {
- Dart_PropagateError(result);
- }
+ ThrowIfError(result);
result = DartUtils::SetStringField(status_handle, "_errorMessage",
os_error_message != NULL
? os_error_message
: "Cannot get error message");
- if (Dart_IsError(result)) {
- Dart_PropagateError(result);
- }
+ ThrowIfError(result);
}
Dart_SetBooleanReturnValue(args, error_code == 0);
}
@@ -220,13 +196,9 @@
exit_event->SetClosedFd();
if (success) {
Dart_Handle out = result.stdout_data();
- if (Dart_IsError(out)) {
- Dart_PropagateError(out);
- }
+ ThrowIfError(out);
Dart_Handle err = result.stderr_data();
- if (Dart_IsError(err)) {
- Dart_PropagateError(err);
- }
+ ThrowIfError(err);
Dart_Handle list = Dart_NewList(4);
Dart_ListSetAt(list, 0, Dart_NewInteger(pid));
Dart_ListSetAt(list, 1, Dart_NewInteger(result.exit_code()));
@@ -316,15 +288,11 @@
Dart_Handle bytes = Dart_GetNativeArgument(args, 0);
intptr_t bytes_length = 0;
Dart_Handle result = Dart_ListLength(bytes, &bytes_length);
- if (Dart_IsError(result)) {
- Dart_PropagateError(result);
- }
+ ThrowIfError(result);
uint8_t* buffer = Dart_ScopeAllocate(bytes_length + 1);
result = Dart_ListGetAsBytes(bytes, 0, buffer, bytes_length);
buffer[bytes_length] = '\0';
- if (Dart_IsError(result)) {
- Dart_PropagateError(result);
- }
+ ThrowIfError(result);
intptr_t len;
char* str = StringUtils::ConsoleStringToUtf8(reinterpret_cast<char*>(buffer),
bytes_length, &len);
@@ -333,6 +301,7 @@
DartUtils::NewInternalError("SystemEncodingToString failed"));
}
result = Dart_NewStringFromUTF8(reinterpret_cast<const uint8_t*>(str), len);
+ ThrowIfError(result);
Dart_SetReturnValue(args, result);
}
@@ -342,9 +311,7 @@
intptr_t utf8_len;
Dart_Handle result =
Dart_StringToUTF8(str, reinterpret_cast<uint8_t**>(&utf8), &utf8_len);
- if (Dart_IsError(result)) {
- Dart_PropagateError(result);
- }
+ ThrowIfError(result);
intptr_t system_len;
const char* system_string =
StringUtils::Utf8ToConsoleString(utf8, utf8_len, &system_len);
diff --git a/runtime/bin/socket.cc b/runtime/bin/socket.cc
index c22ee52..d8ee1bc 100644
--- a/runtime/bin/socket.cc
+++ b/runtime/bin/socket.cc
@@ -44,7 +44,7 @@
ListeningSocketRegistry::OSSocket* ListeningSocketRegistry::LookupByPort(
intptr_t port) {
- HashMap::Entry* entry = sockets_by_port_.Lookup(
+ SimpleHashMap::Entry* entry = sockets_by_port_.Lookup(
GetHashmapKeyFromIntptr(port), GetHashmapHashFromIntptr(port), false);
if (entry == NULL) {
return NULL;
@@ -53,7 +53,7 @@
}
void ListeningSocketRegistry::InsertByPort(intptr_t port, OSSocket* socket) {
- HashMap::Entry* entry = sockets_by_port_.Lookup(
+ SimpleHashMap::Entry* entry = sockets_by_port_.Lookup(
GetHashmapKeyFromIntptr(port), GetHashmapHashFromIntptr(port), true);
ASSERT(entry != NULL);
entry->value = reinterpret_cast<void*>(socket);
@@ -66,7 +66,7 @@
ListeningSocketRegistry::OSSocket* ListeningSocketRegistry::LookupByFd(
Socket* fd) {
- HashMap::Entry* entry = sockets_by_fd_.Lookup(
+ SimpleHashMap::Entry* entry = sockets_by_fd_.Lookup(
GetHashmapKeyFromIntptr(reinterpret_cast<intptr_t>(fd)),
GetHashmapHashFromIntptr(reinterpret_cast<intptr_t>(fd)), false);
if (entry == NULL) {
@@ -76,7 +76,7 @@
}
void ListeningSocketRegistry::InsertByFd(Socket* fd, OSSocket* socket) {
- HashMap::Entry* entry = sockets_by_fd_.Lookup(
+ SimpleHashMap::Entry* entry = sockets_by_fd_.Lookup(
GetHashmapKeyFromIntptr(reinterpret_cast<intptr_t>(fd)),
GetHashmapHashFromIntptr(reinterpret_cast<intptr_t>(fd)), true);
ASSERT(entry != NULL);
@@ -234,7 +234,7 @@
void ListeningSocketRegistry::CloseAllSafe() {
MutexLocker ml(mutex_);
- for (HashMap::Entry* cursor = sockets_by_fd_.Start(); cursor != NULL;
+ for (SimpleHashMap::Entry* cursor = sockets_by_fd_.Start(); cursor != NULL;
cursor = sockets_by_fd_.Next(cursor)) {
CloseOneSafe(reinterpret_cast<OSSocket*>(cursor->value), false);
}
diff --git a/runtime/bin/socket.h b/runtime/bin/socket.h
index a521e53..05a25121 100644
--- a/runtime/bin/socket.h
+++ b/runtime/bin/socket.h
@@ -248,8 +248,8 @@
bool CloseOneSafe(OSSocket* os_socket, bool update_hash_maps);
void CloseAllSafe();
- HashMap sockets_by_port_;
- HashMap sockets_by_fd_;
+ SimpleHashMap sockets_by_port_;
+ SimpleHashMap sockets_by_fd_;
Mutex* mutex_;
diff --git a/runtime/include/dart_api.h b/runtime/include/dart_api.h
index 1a9b3d9..eef2f9fb 100644
--- a/runtime/include/dart_api.h
+++ b/runtime/include/dart_api.h
@@ -553,7 +553,7 @@
* for each part.
*/
-#define DART_FLAGS_CURRENT_VERSION (0x00000005)
+#define DART_FLAGS_CURRENT_VERSION (0x00000006)
typedef struct {
int32_t version;
@@ -570,6 +570,7 @@
bool strong;
bool load_vmservice_library;
bool sync_async;
+ bool unsafe_trust_strong_mode_types;
} Dart_IsolateFlags;
/**
diff --git a/runtime/lib/array.dart b/runtime/lib/array.dart
index 304877f..93fcbe6 100644
--- a/runtime/lib/array.dart
+++ b/runtime/lib/array.dart
@@ -201,11 +201,11 @@
int _index;
E _current;
- _FixedSizeArrayIterator(List array)
+ _FixedSizeArrayIterator(List<E> array)
: _array = array,
_length = array.length,
_index = 0 {
- assert(array is _List || array is _ImmutableList);
+ assert(array is _List<E> || array is _ImmutableList<E>);
}
E get current => _current;
diff --git a/runtime/lib/errors_patch.dart b/runtime/lib/errors_patch.dart
index fb6aa86..3ed0f6d 100644
--- a/runtime/lib/errors_patch.dart
+++ b/runtime/lib/errors_patch.dart
@@ -45,7 +45,7 @@
return condition;
}
if (condition is _Closure) {
- return condition.call();
+ return (condition as dynamic)();
}
if (condition is Function) {
condition = condition();
diff --git a/runtime/lib/internal_patch.dart b/runtime/lib/internal_patch.dart
index 38e7250..8446926 100644
--- a/runtime/lib/internal_patch.dart
+++ b/runtime/lib/internal_patch.dart
@@ -102,6 +102,12 @@
_prependTypeArguments(functionTypeArguments, parentTypeArguments, parentLen,
totalLen) native "Internal_prependTypeArguments";
+// Check that a set of type arguments satisfy the type parameter bounds on a
+// closure.
+@pragma("vm:entry-point")
+_boundsCheckForPartialInstantiation(closure, typeArgs)
+ native "Internal_boundsCheckForPartialInstantiation";
+
// Called by IRRegExpMacroAssembler::GrowStack.
Int32List _growRegExpStack(Int32List stack) {
final newStack = new Int32List(stack.length * 2);
diff --git a/runtime/lib/object.cc b/runtime/lib/object.cc
index 3e01f83..7b0537f 100644
--- a/runtime/lib/object.cc
+++ b/runtime/lib/object.cc
@@ -473,6 +473,73 @@
zone, parent_type_arguments, smi_parent_len.Value(), smi_len.Value());
}
+// Check that a set of type arguments satisfy the type parameter bounds on a
+// closure.
+// Arg0: Closure object
+// Arg1: Type arguments to function
+DEFINE_NATIVE_ENTRY(Internal_boundsCheckForPartialInstantiation, 2) {
+ const Closure& closure =
+ Closure::CheckedHandle(zone, arguments->NativeArgAt(0));
+ const Function& target = Function::Handle(zone, closure.function());
+ const TypeArguments& bounds =
+ TypeArguments::Handle(zone, target.type_parameters());
+
+ // Either the bounds are all-dynamic or the function is not generic.
+ if (bounds.IsNull()) return Object::null();
+
+ const TypeArguments& type_args_to_check =
+ TypeArguments::CheckedHandle(zone, arguments->NativeArgAt(1));
+
+ // This should be guaranteed by the front-end.
+ ASSERT(type_args_to_check.IsNull() ||
+ bounds.Length() <= type_args_to_check.Length());
+
+ // The bounds on the closure may need instantiation.
+ const TypeArguments& instantiator_type_args =
+ TypeArguments::Handle(zone, closure.instantiator_type_arguments());
+ const TypeArguments& function_type_args =
+ TypeArguments::Handle(zone, closure.function_type_arguments());
+
+ AbstractType& supertype = AbstractType::Handle(zone);
+ AbstractType& subtype = AbstractType::Handle(zone);
+ TypeParameter& parameter = TypeParameter::Handle(zone);
+ Error& bound_error = Error::Handle(zone);
+ for (intptr_t i = 0; i < bounds.Length(); ++i) {
+ parameter ^= bounds.TypeAt(i);
+ supertype = parameter.bound();
+ subtype = type_args_to_check.IsNull() ? Object::dynamic_type().raw()
+ : type_args_to_check.TypeAt(i);
+
+ ASSERT(!subtype.IsNull() && !subtype.IsMalformedOrMalbounded());
+ ASSERT(!supertype.IsNull() && !supertype.IsMalformedOrMalbounded());
+
+ // The supertype may not be instantiated.
+ if (!AbstractType::InstantiateAndTestSubtype(
+ &subtype, &supertype, &bound_error, instantiator_type_args,
+ function_type_args)) {
+ // Throw a dynamic type error.
+ TokenPosition location;
+ {
+ DartFrameIterator iterator(Thread::Current(),
+ StackFrameIterator::kNoCrossThreadIteration);
+ StackFrame* caller_frame = iterator.NextFrame();
+ ASSERT(caller_frame != NULL);
+ location = caller_frame->GetTokenPos();
+ }
+ String& bound_error_message = String::Handle(zone);
+ if (!bound_error.IsNull()) {
+ bound_error_message = String::New(bound_error.ToErrorCString());
+ }
+ String& parameter_name = String::Handle(zone, parameter.Name());
+ Exceptions::CreateAndThrowTypeError(location, subtype, supertype,
+ parameter_name, bound_error_message);
+ UNREACHABLE();
+ }
+ }
+
+ return Object::null();
+}
+
DEFINE_NATIVE_ENTRY(InvocationMirror_unpackTypeArguments, 2) {
const TypeArguments& type_arguments =
TypeArguments::CheckedHandle(zone, arguments->NativeArgAt(0));
diff --git a/runtime/observatory/tests/service/service.status b/runtime/observatory/tests/service/service.status
index 07a03d9..7fbaf49 100644
--- a/runtime/observatory/tests/service/service.status
+++ b/runtime/observatory/tests/service/service.status
@@ -106,6 +106,9 @@
[ $compiler == dart2js || $browser ]
*: SkipByDesign
+[ $compiler == dartk || $compiler == dartkp ]
+rewind_test: Pass, RuntimeError # Issue 34287
+
# Skip all service tests because random reloads interfere.
[ $hot_reload || $hot_reload_rollback ]
*: SkipByDesign # The service tests should run without being reloaded.
diff --git a/runtime/platform/assert.cc b/runtime/platform/assert.cc
index 262548e..deac89e 100644
--- a/runtime/platform/assert.cc
+++ b/runtime/platform/assert.cc
@@ -39,7 +39,7 @@
va_end(arguments);
// Abort right away.
- NOT_IN_PRODUCT(Dart_DumpNativeStackTrace(NULL));
+ Dart_DumpNativeStackTrace(NULL);
OS::Abort();
}
diff --git a/runtime/platform/globals.h b/runtime/platform/globals.h
index 0959729..11c9d32 100644
--- a/runtime/platform/globals.h
+++ b/runtime/platform/globals.h
@@ -115,37 +115,12 @@
#error Automatic target os detection failed.
#endif
-// Setup product, release or debug build related macros.
-#if defined(PRODUCT) && defined(DEBUG)
-#error Both PRODUCT and DEBUG defined.
-#endif // defined(PRODUCT) && defined(DEBUG)
-
-#if defined(PRODUCT)
-#define NOT_IN_PRODUCT(code)
-#else // defined(PRODUCT)
-#define NOT_IN_PRODUCT(code) code
-#endif // defined(PRODUCT)
-
#if defined(DEBUG)
#define DEBUG_ONLY(code) code
#else // defined(DEBUG)
#define DEBUG_ONLY(code)
#endif // defined(DEBUG)
-#if defined(DART_PRECOMPILED_RUNTIME) && defined(DART_PRECOMPILER)
-#error DART_PRECOMPILED_RUNTIME and DART_PRECOMPILER are mutually exclusive
-#endif // defined(DART_PRECOMPILED_RUNTIME) && defined(DART_PRECOMPILER)
-
-#if defined(DART_PRECOMPILED_RUNTIME) && defined(DART_NOSNAPSHOT)
-#error DART_PRECOMPILED_RUNTIME and DART_NOSNAPSHOT are mutually exclusive
-#endif // defined(DART_PRECOMPILED_RUNTIME) && defined(DART_NOSNAPSHOT)
-
-#if defined(DART_PRECOMPILED_RUNTIME)
-#define NOT_IN_PRECOMPILED(code)
-#else
-#define NOT_IN_PRECOMPILED(code) code
-#endif // defined(DART_PRECOMPILED_RUNTIME)
-
namespace dart {
struct simd128_value_t {
@@ -709,14 +684,6 @@
#define STDERR_FILENO 2
#endif
-// For checking deterministic graph generation, we can store instruction
-// tag in the ICData and check it when recreating the flow graph in
-// optimizing compiler. Enable it for other modes (product, release) if needed
-// for debugging.
-#if defined(DEBUG)
-#define TAG_IC_DATA
-#endif
-
} // namespace dart
#endif // RUNTIME_PLATFORM_GLOBALS_H_
diff --git a/runtime/platform/hashmap.cc b/runtime/platform/hashmap.cc
index d5dfba9..88c521e 100644
--- a/runtime/platform/hashmap.cc
+++ b/runtime/platform/hashmap.cc
@@ -8,16 +8,18 @@
namespace dart {
-HashMap::HashMap(MatchFun match, uint32_t initial_capacity) {
+SimpleHashMap::SimpleHashMap(MatchFun match, uint32_t initial_capacity) {
match_ = match;
Initialize(initial_capacity);
}
-HashMap::~HashMap() {
+SimpleHashMap::~SimpleHashMap() {
delete[] map_;
}
-HashMap::Entry* HashMap::Lookup(void* key, uint32_t hash, bool insert) {
+SimpleHashMap::Entry* SimpleHashMap::Lookup(void* key,
+ uint32_t hash,
+ bool insert) {
// Find a matching entry.
Entry* p = Probe(key, hash);
if (p->key != NULL) {
@@ -44,7 +46,7 @@
return NULL;
}
-void HashMap::Remove(void* key, uint32_t hash) {
+void SimpleHashMap::Remove(void* key, uint32_t hash) {
// Lookup the entry for the key to remove.
Entry* candidate = Probe(key, hash);
if (candidate->key == NULL) {
@@ -106,7 +108,7 @@
occupancy_--;
}
-void HashMap::Clear(ClearFun clear) {
+void SimpleHashMap::Clear(ClearFun clear) {
// Mark all entries as empty.
const Entry* end = map_end();
for (Entry* p = map_; p < end; p++) {
@@ -118,11 +120,11 @@
occupancy_ = 0;
}
-HashMap::Entry* HashMap::Start() const {
+SimpleHashMap::Entry* SimpleHashMap::Start() const {
return Next(map_ - 1);
}
-HashMap::Entry* HashMap::Next(Entry* p) const {
+SimpleHashMap::Entry* SimpleHashMap::Next(Entry* p) const {
const Entry* end = map_end();
ASSERT(map_ - 1 <= p && p < end);
for (p++; p < end; p++) {
@@ -133,7 +135,7 @@
return NULL;
}
-HashMap::Entry* HashMap::Probe(void* key, uint32_t hash) {
+SimpleHashMap::Entry* SimpleHashMap::Probe(void* key, uint32_t hash) {
ASSERT(key != NULL);
ASSERT(dart::Utils::IsPowerOfTwo(capacity_));
@@ -152,7 +154,7 @@
return p;
}
-void HashMap::Initialize(uint32_t capacity) {
+void SimpleHashMap::Initialize(uint32_t capacity) {
ASSERT(dart::Utils::IsPowerOfTwo(capacity));
map_ = new Entry[capacity];
if (map_ == NULL) {
@@ -162,7 +164,7 @@
occupancy_ = 0;
}
-void HashMap::Resize() {
+void SimpleHashMap::Resize() {
Entry* map = map_;
uint32_t n = occupancy_;
diff --git a/runtime/platform/hashmap.h b/runtime/platform/hashmap.h
index be8278e..e3e9c5a 100644
--- a/runtime/platform/hashmap.h
+++ b/runtime/platform/hashmap.h
@@ -9,7 +9,7 @@
namespace dart {
-class HashMap {
+class SimpleHashMap {
public:
typedef bool (*MatchFun)(void* key1, void* key2);
@@ -17,9 +17,9 @@
// initial_capacity is the size of the initial hash map;
// it must be a power of 2 (and thus must not be 0).
- HashMap(MatchFun match, uint32_t initial_capacity);
+ SimpleHashMap(MatchFun match, uint32_t initial_capacity);
- ~HashMap();
+ ~SimpleHashMap();
static bool SamePointerValue(void* key1, void* key2) { return key1 == key2; }
@@ -43,7 +43,7 @@
reinterpret_cast<char*>(key2)) == 0;
}
- // HashMap entries are (key, value, hash) triplets.
+ // SimpleHashMap entries are (key, value, hash) triplets.
// Some clients may not need to use the value slot
// (e.g. implementers of sets, where the key is the value).
struct Entry {
@@ -62,7 +62,7 @@
// Removes the entry with matching key.
//
- // WARNING: This method cannot be called while iterating a `HashMap`
+ // WARNING: This method cannot be called while iterating a `SimpleHashMap`
// otherwise the iteration might step over elements!
void Remove(void* key, uint32_t hash);
@@ -101,7 +101,7 @@
void Resize();
friend class IntSet; // From hashmap_test.cc
- DISALLOW_COPY_AND_ASSIGN(HashMap);
+ DISALLOW_COPY_AND_ASSIGN(SimpleHashMap);
};
} // namespace dart
diff --git a/runtime/platform/text_buffer.cc b/runtime/platform/text_buffer.cc
index 5717604..b1ef63a 100644
--- a/runtime/platform/text_buffer.cc
+++ b/runtime/platform/text_buffer.cc
@@ -150,8 +150,6 @@
}
}
-#ifndef PRODUCT
-
void BufferFormatter::Print(const char* format, ...) {
va_list args;
va_start(args, format);
@@ -169,6 +167,4 @@
}
}
-#endif // !PRODUCT
-
} // namespace dart
diff --git a/runtime/tests/vm/vm.status b/runtime/tests/vm/vm.status
index f41388e..960e7903 100644
--- a/runtime/tests/vm/vm.status
+++ b/runtime/tests/vm/vm.status
@@ -38,6 +38,7 @@
[ $compiler == dart2analyzer ]
dart/byte_array_optimized_test: CompileTimeError # int64
dart/byte_array_test: CompileTimeError # int64
+dart/redirection_type_shuffling_test/00: CompileTimeError
[ $compiler == dart2js ]
dart/byte_array_optimized_test: Skip # compilers not aware of byte arrays
@@ -157,9 +158,6 @@
[ $builder_tag == asan && $mode == debug && ($runtime == dart_precompiled || $runtime == vm) ]
cc/Dart2JSCompileAll: SkipSlow # Timeout.
-[ $compiler == dart2analyzer && $strong ]
-dart/redirection_type_shuffling_test/00: CompileTimeError
-
[ ($compiler == dartk || $compiler == dartkb) && $mode == debug && $runtime == vm ]
cc/PrintJSON: Crash
cc/Service_TokenStream: Crash
diff --git a/runtime/vm/allocation_test.cc b/runtime/vm/allocation_test.cc
index e01a09f..13e5e80 100644
--- a/runtime/vm/allocation_test.cc
+++ b/runtime/vm/allocation_test.cc
@@ -73,7 +73,7 @@
*ptr = 3;
}
-VM_UNIT_TEST_CASE(StackAllocatedDestruction) {
+ISOLATE_UNIT_TEST_CASE(StackAllocatedDestruction) {
int data = 1;
StackAllocatedDestructionHelper(&data);
EXPECT_EQ(4, data);
@@ -89,7 +89,7 @@
UNREACHABLE();
}
-TEST_CASE(StackAllocatedLongJump) {
+ISOLATE_UNIT_TEST_CASE(StackAllocatedLongJump) {
LongJumpScope jump;
int data = 1;
if (setjmp(*jump.Set()) == 0) {
@@ -114,7 +114,7 @@
// Do not set data because the LongJump version does not return control here.
}
-TEST_CASE(StackResourceDestruction) {
+ISOLATE_UNIT_TEST_CASE(StackResourceDestruction) {
int data = 1;
StackResourceDestructionHelper(&data);
EXPECT_EQ(7, data);
@@ -138,7 +138,7 @@
UNREACHABLE();
}
-TEST_CASE(StackResourceLongJump) {
+ISOLATE_UNIT_TEST_CASE(StackResourceLongJump) {
LongJumpScope* base = Thread::Current()->long_jump_base();
{
LongJumpScope jump;
diff --git a/runtime/vm/ast_printer_test.cc b/runtime/vm/ast_printer_test.cc
index 4385f84..64341cf 100644
--- a/runtime/vm/ast_printer_test.cc
+++ b/runtime/vm/ast_printer_test.cc
@@ -12,7 +12,7 @@
#ifndef PRODUCT
-TEST_CASE(AstPrinter) {
+ISOLATE_UNIT_TEST_CASE(AstPrinter) {
const TokenPosition kPos = TokenPosition::kNoSource;
LocalVariable* v = new LocalVariable(
kPos, kPos, String::ZoneHandle(Symbols::New(thread, "wurscht")),
diff --git a/runtime/vm/benchmark_test.cc b/runtime/vm/benchmark_test.cc
index c7cb303..3d5bf6f 100644
--- a/runtime/vm/benchmark_test.cc
+++ b/runtime/vm/benchmark_test.cc
@@ -666,6 +666,7 @@
EXPECT_VALID(h_lib);
Dart_Handle h_result = Dart_Invoke(h_lib, NewString("makeMap"), 0, NULL);
EXPECT_VALID(h_result);
+ TransitionNativeToVM transition(thread);
Instance& map = Instance::Handle();
map ^= Api::UnwrapHandle(h_result);
const intptr_t kLoopCount = 100;
diff --git a/runtime/vm/bitmap_test.cc b/runtime/vm/bitmap_test.cc
index 2d28f8b..b48a204 100644
--- a/runtime/vm/bitmap_test.cc
+++ b/runtime/vm/bitmap_test.cc
@@ -9,7 +9,7 @@
namespace dart {
-TEST_CASE(BitmapBuilder) {
+ISOLATE_UNIT_TEST_CASE(BitmapBuilder) {
// Test basic bit map builder operations.
BitmapBuilder* builder1 = new BitmapBuilder();
EXPECT_EQ(0, builder1->Length());
diff --git a/runtime/vm/bootstrap_natives.h b/runtime/vm/bootstrap_natives.h
index 1fc543f..616abe6 100644
--- a/runtime/vm/bootstrap_natives.h
+++ b/runtime/vm/bootstrap_natives.h
@@ -313,6 +313,7 @@
V(Internal_inquireIs64Bit, 0) \
V(Internal_extractTypeArguments, 2) \
V(Internal_prependTypeArguments, 4) \
+ V(Internal_boundsCheckForPartialInstantiation, 2) \
V(InvocationMirror_unpackTypeArguments, 2) \
V(NoSuchMethodError_existingMethodSignature, 3) \
V(LinkedHashMap_getIndex, 1) \
diff --git a/runtime/vm/class_finalizer_test.cc b/runtime/vm/class_finalizer_test.cc
index 2ccd1d0..4ea8c25 100644
--- a/runtime/vm/class_finalizer_test.cc
+++ b/runtime/vm/class_finalizer_test.cc
@@ -21,7 +21,7 @@
return cls.raw();
}
-TEST_CASE(ClassFinalizer) {
+ISOLATE_UNIT_TEST_CASE(ClassFinalizer) {
Zone* zone = thread->zone();
Isolate* isolate = thread->isolate();
ObjectStore* object_store = isolate->object_store();
@@ -51,7 +51,7 @@
EXPECT(ClassFinalizer::ProcessPendingClasses());
}
-TEST_CASE(ClassFinalize_Cycles) {
+ISOLATE_UNIT_TEST_CASE(ClassFinalize_Cycles) {
Zone* zone = thread->zone();
Isolate* isolate = thread->isolate();
ObjectStore* object_store = isolate->object_store();
@@ -75,7 +75,7 @@
return Library::New(url);
}
-TEST_CASE(ClassFinalize_Resolve) {
+ISOLATE_UNIT_TEST_CASE(ClassFinalize_Resolve) {
Zone* zone = thread->zone();
Isolate* isolate = thread->isolate();
ObjectStore* object_store = isolate->object_store();
diff --git a/runtime/vm/clustered_snapshot.cc b/runtime/vm/clustered_snapshot.cc
index d9232fa..f799a8d 100644
--- a/runtime/vm/clustered_snapshot.cc
+++ b/runtime/vm/clustered_snapshot.cc
@@ -48,6 +48,10 @@
tags = RawObject::SizeTag::update(size, tags);
tags = RawObject::VMHeapObjectTag::update(is_vm_isolate, tags);
tags = RawObject::CanonicalObjectTag::update(is_canonical, tags);
+ tags = RawObject::OldBit::update(true, tags);
+ tags = RawObject::OldAndNotMarkedBit::update(true, tags);
+ tags = RawObject::OldAndNotRememberedBit::update(true, tags);
+ tags = RawObject::NewBit::update(false, tags);
raw->ptr()->tags_ = tags;
#if defined(HASH_IN_OBJECT_HEADER)
raw->ptr()->hash_ = 0;
@@ -5580,6 +5584,7 @@
}
thread()->isolate()->class_table()->CopySizesFromClassObjects();
+ heap_->old_space()->EvaluateSnapshotLoad();
#if defined(DEBUG)
Isolate* isolate = thread()->isolate();
diff --git a/runtime/vm/code_descriptors.cc b/runtime/vm/code_descriptors.cc
index 206c249..da77114 100644
--- a/runtime/vm/code_descriptors.cc
+++ b/runtime/vm/code_descriptors.cc
@@ -4,6 +4,7 @@
#include "vm/code_descriptors.h"
+#include "vm/compiler/compiler_state.h"
#include "vm/log.h"
namespace dart {
@@ -14,8 +15,7 @@
TokenPosition token_pos,
intptr_t try_index) {
ASSERT((kind == RawPcDescriptors::kRuntimeCall) ||
- (kind == RawPcDescriptors::kOther) ||
- (deopt_id != Thread::kNoDeoptId));
+ (kind == RawPcDescriptors::kOther) || (deopt_id != DeoptId::kNone));
// When precompiling, we only use pc descriptors for exceptions.
if (!FLAG_precompiled_mode || try_index != -1) {
diff --git a/runtime/vm/code_descriptors_test.cc b/runtime/vm/code_descriptors_test.cc
index 65f1890..457111b 100644
--- a/runtime/vm/code_descriptors_test.cc
+++ b/runtime/vm/code_descriptors_test.cc
@@ -266,7 +266,7 @@
EXPECT(!result.IsError());
}
-TEST_CASE(DescriptorList_TokenPositions) {
+ISOLATE_UNIT_TEST_CASE(DescriptorList_TokenPositions) {
DescriptorList* descriptors = new DescriptorList(64);
ASSERT(descriptors != NULL);
const intptr_t token_positions[] = {
diff --git a/runtime/vm/compiler/aot/aot_call_specializer.cc b/runtime/vm/compiler/aot/aot_call_specializer.cc
index e59a7b3..d62497b 100644
--- a/runtime/vm/compiler/aot/aot_call_specializer.cc
+++ b/runtime/vm/compiler/aot/aot_call_specializer.cc
@@ -13,6 +13,7 @@
#include "vm/compiler/backend/inliner.h"
#include "vm/compiler/backend/range_analysis.h"
#include "vm/compiler/cha.h"
+#include "vm/compiler/compiler_state.h"
#include "vm/compiler/frontend/flow_graph_builder.h"
#include "vm/compiler/jit/compiler.h"
#include "vm/compiler/jit/jit_call_specializer.h"
@@ -283,7 +284,7 @@
Value* AotCallSpecializer::PrepareStaticOpInput(Value* input,
intptr_t cid,
Instruction* call) {
- ASSERT(I->strong() && FLAG_use_strong_mode_types);
+ ASSERT(I->can_use_strong_mode_types());
ASSERT((cid == kDoubleCid) || (cid == kMintCid));
const String& function_name =
@@ -302,7 +303,7 @@
conversion = new (Z) SmiToDoubleInstr(input, call->token_pos());
} else if (FlowGraphCompiler::SupportsUnboxedInt64() &&
FlowGraphCompiler::CanConvertInt64ToDouble()) {
- conversion = new (Z) Int64ToDoubleInstr(input, Thread::kNoDeoptId,
+ conversion = new (Z) Int64ToDoubleInstr(input, DeoptId::kNone,
Instruction::kNotSpeculative);
} else {
UNREACHABLE();
@@ -320,7 +321,7 @@
Value* AotCallSpecializer::PrepareReceiverOfDevirtualizedCall(Value* input,
intptr_t cid) {
- ASSERT(I->strong() && FLAG_use_strong_mode_types);
+ ASSERT(I->can_use_strong_mode_types());
ASSERT((cid == kDoubleCid) || (cid == kMintCid));
// Can't assert !input->Type()->is_nullable() here as PushArgument receives
@@ -351,7 +352,7 @@
bool AotCallSpecializer::TryOptimizeInstanceCallUsingStaticTypes(
InstanceCallInstr* instr) {
- ASSERT(I->strong() && FLAG_use_strong_mode_types);
+ ASSERT(I->can_use_strong_mode_types());
const intptr_t receiver_index = instr->FirstArgIndex();
const Token::Kind op_kind = instr->token_kind();
@@ -375,14 +376,14 @@
right_value = PrepareStaticOpInput(right_value, kMintCid, instr);
replacement = new (Z) RelationalOpInstr(
instr->token_pos(), op_kind, left_value, right_value, kMintCid,
- Thread::kNoDeoptId, Instruction::kNotSpeculative);
+ DeoptId::kNone, Instruction::kNotSpeculative);
} else {
// TODO(dartbug.com/30480): Figure out how to handle null in
// equality comparisons.
// replacement = new (Z) EqualityCompareInstr(
// instr->token_pos(), op_kind, left_value->CopyWithType(Z),
- // right_value->CopyWithType(Z), kMintCid, Thread::kNoDeoptId);
+ // right_value->CopyWithType(Z), kMintCid, DeoptId::kNone);
replacement = new (Z) CheckedSmiComparisonInstr(
instr->token_kind(), left_value->CopyWithType(Z),
right_value->CopyWithType(Z), instr);
@@ -396,7 +397,7 @@
instr->token_pos(),
(op_kind == Token::kEQ) ? Token::kEQ_STRICT : Token::kNE_STRICT,
left_value->CopyWithType(Z), right_value->CopyWithType(Z),
- /* number_check = */ false, Thread::kNoDeoptId);
+ /* number_check = */ false, DeoptId::kNone);
} else {
replacement = new (Z) CheckedSmiComparisonInstr(
instr->token_kind(), left_value->CopyWithType(Z),
@@ -415,7 +416,7 @@
right_value = PrepareStaticOpInput(right_value, kDoubleCid, instr);
replacement = new (Z) RelationalOpInstr(
instr->token_pos(), op_kind, left_value, right_value, kDoubleCid,
- Thread::kNoDeoptId, Instruction::kNotSpeculative);
+ DeoptId::kNone, Instruction::kNotSpeculative);
}
}
break;
@@ -444,7 +445,7 @@
// TODO(dartbug.com/30480): Enable 64-bit integer shifts.
// replacement = new ShiftInt64OpInstr(
// op_kind, left_value->CopyWithType(Z),
- // right_value->CopyWithType(Z), Thread::kNoDeoptId);
+ // right_value->CopyWithType(Z), DeoptId::kNone);
replacement =
new (Z) CheckedSmiOpInstr(op_kind, left_value->CopyWithType(Z),
right_value->CopyWithType(Z), instr);
@@ -452,7 +453,7 @@
left_value = PrepareStaticOpInput(left_value, kMintCid, instr);
right_value = PrepareStaticOpInput(right_value, kMintCid, instr);
replacement = new (Z) BinaryInt64OpInstr(
- op_kind, left_value, right_value, Thread::kNoDeoptId,
+ op_kind, left_value, right_value, DeoptId::kNone,
Instruction::kNotSpeculative);
}
} else {
@@ -472,7 +473,7 @@
left_value = PrepareStaticOpInput(left_value, kDoubleCid, instr);
right_value = PrepareStaticOpInput(right_value, kDoubleCid, instr);
replacement = new (Z) BinaryDoubleOpInstr(
- op_kind, left_value, right_value, Thread::kNoDeoptId,
+ op_kind, left_value, right_value, DeoptId::kNone,
instr->token_pos(), Instruction::kNotSpeculative);
}
}
@@ -498,7 +499,7 @@
bool AotCallSpecializer::TryOptimizeStaticCallUsingStaticTypes(
StaticCallInstr* instr) {
- ASSERT(I->strong() && FLAG_use_strong_mode_types);
+ ASSERT(I->can_use_strong_mode_types());
Definition* replacement = NULL;
const String& name = String::Handle(Z, instr->function().name());
@@ -536,7 +537,7 @@
right_value = PrepareStaticOpInput(right_value, kMintCid, instr);
replacement = new (Z) EqualityCompareInstr(
instr->token_pos(), op_kind, left_value, right_value, kMintCid,
- Thread::kNoDeoptId, Instruction::kNotSpeculative);
+ DeoptId::kNone, Instruction::kNotSpeculative);
}
break;
}
@@ -553,7 +554,7 @@
right_value = PrepareStaticOpInput(right_value, kMintCid, instr);
replacement = new (Z) RelationalOpInstr(
instr->token_pos(), op_kind, left_value, right_value, kMintCid,
- Thread::kNoDeoptId, Instruction::kNotSpeculative);
+ DeoptId::kNone, Instruction::kNotSpeculative);
} else if (FlowGraphCompiler::SupportsUnboxedDoubles() &&
right_type->IsNullableDouble() &&
IsSupportedIntOperandForStaticDoubleOp(left_type)) {
@@ -561,7 +562,7 @@
right_value = PrepareStaticOpInput(right_value, kDoubleCid, instr);
replacement = new (Z) RelationalOpInstr(
instr->token_pos(), op_kind, left_value, right_value, kDoubleCid,
- Thread::kNoDeoptId, Instruction::kNotSpeculative);
+ DeoptId::kNone, Instruction::kNotSpeculative);
}
break;
}
@@ -588,9 +589,9 @@
if (right_type->IsNullableInt() && (op_kind != Token::kDIV)) {
left_value = PrepareReceiverOfDevirtualizedCall(left_value, kMintCid);
right_value = PrepareStaticOpInput(right_value, kMintCid, instr);
- replacement = new (Z) BinaryInt64OpInstr(
- op_kind, left_value, right_value, Thread::kNoDeoptId,
- Instruction::kNotSpeculative);
+ replacement = new (Z)
+ BinaryInt64OpInstr(op_kind, left_value, right_value,
+ DeoptId::kNone, Instruction::kNotSpeculative);
} else if (FlowGraphCompiler::SupportsUnboxedDoubles() &&
right_type->IsNullableDouble() &&
IsSupportedIntOperandForStaticDoubleOp(left_type)) {
@@ -601,7 +602,7 @@
left_value = PrepareStaticOpInput(left_value, kDoubleCid, instr);
right_value = PrepareStaticOpInput(right_value, kDoubleCid, instr);
replacement = new (Z) BinaryDoubleOpInstr(
- op_kind, left_value, right_value, Thread::kNoDeoptId,
+ op_kind, left_value, right_value, DeoptId::kNone,
instr->token_pos(), Instruction::kNotSpeculative);
}
}
@@ -612,7 +613,7 @@
Value* left_value = instr->PushArgumentAt(receiver_index)->value();
left_value = PrepareReceiverOfDevirtualizedCall(left_value, kMintCid);
replacement = new (Z)
- UnaryInt64OpInstr(Token::kNEGATE, left_value, Thread::kNoDeoptId,
+ UnaryInt64OpInstr(Token::kNEGATE, left_value, DeoptId::kNone,
Instruction::kNotSpeculative);
break;
}
@@ -625,8 +626,8 @@
if (right_type->IsNullableInt()) {
left_value = PrepareReceiverOfDevirtualizedCall(left_value, kMintCid);
right_value = PrepareStaticOpInput(right_value, kMintCid, instr);
- replacement = new (Z) ShiftInt64OpInstr(
- op_kind, left_value, right_value, Thread::kNoDeoptId);
+ replacement = new (Z) ShiftInt64OpInstr(op_kind, left_value,
+ right_value, DeoptId::kNone);
}
break;
}
@@ -650,7 +651,7 @@
right_value = PrepareStaticOpInput(right_value, kDoubleCid, instr);
replacement = new (Z) EqualityCompareInstr(
instr->token_pos(), op_kind, left_value, right_value, kDoubleCid,
- Thread::kNoDeoptId, Instruction::kNotSpeculative);
+ DeoptId::kNone, Instruction::kNotSpeculative);
}
break;
}
@@ -667,7 +668,7 @@
right_value = PrepareStaticOpInput(right_value, kDoubleCid, instr);
replacement = new (Z) RelationalOpInstr(
instr->token_pos(), op_kind, left_value, right_value, kDoubleCid,
- Thread::kNoDeoptId, Instruction::kNotSpeculative);
+ DeoptId::kNone, Instruction::kNotSpeculative);
}
break;
}
@@ -683,7 +684,7 @@
PrepareReceiverOfDevirtualizedCall(left_value, kDoubleCid);
right_value = PrepareStaticOpInput(right_value, kDoubleCid, instr);
replacement = new (Z) BinaryDoubleOpInstr(
- op_kind, left_value, right_value, Thread::kNoDeoptId,
+ op_kind, left_value, right_value, DeoptId::kNone,
instr->token_pos(), Instruction::kNotSpeculative);
}
break;
@@ -762,7 +763,7 @@
const ICData& unary_checks =
ICData::ZoneHandle(Z, instr->ic_data()->AsUnaryClassChecks());
const intptr_t number_of_checks = unary_checks.NumberOfChecks();
- if (FLAG_use_strong_mode_types && I->strong()) {
+ if (I->can_use_strong_mode_types()) {
// In AOT strong mode, we avoid deopting speculation.
// TODO(ajcbik): replace this with actual analysis phase
// that determines if checks are removed later.
@@ -799,7 +800,7 @@
}
}
- if (I->strong() && FLAG_use_strong_mode_types &&
+ if (I->can_use_strong_mode_types() &&
TryOptimizeInstanceCallUsingStaticTypes(instr)) {
return;
}
@@ -910,7 +911,8 @@
}
if (!receiver_class.IsNull()) {
GrowableArray<intptr_t> class_ids(6);
- if (thread()->cha()->ConcreteSubclasses(receiver_class, &class_ids)) {
+ if (thread()->compiler_state().cha().ConcreteSubclasses(receiver_class,
+ &class_ids)) {
// First check if all subclasses end up calling the same method.
// If this is the case we will replace instance call with a direct
// static call.
@@ -960,7 +962,7 @@
// Create an ICData and map all previously seen classes (< i) to
// the computed single_target.
ic_data = ICData::New(function, instr->function_name(),
- args_desc_array, Thread::kNoDeoptId,
+ args_desc_array, DeoptId::kNone,
/* args_tested = */ 1, ICData::kOptimized);
for (intptr_t j = 0; j < i; j++) {
ic_data.AddReceiverCheck(class_ids[j], single_target);
@@ -981,7 +983,7 @@
// Create fake IC data with the resolved target.
const ICData& ic_data = ICData::Handle(
ICData::New(flow_graph()->function(), instr->function_name(),
- args_desc_array, Thread::kNoDeoptId,
+ args_desc_array, DeoptId::kNone,
/* args_tested = */ 1, ICData::kOptimized));
cls = single_target.Owner();
ic_data.AddReceiverCheck(cls.id(), single_target);
@@ -1082,7 +1084,8 @@
call->token_pos(), getter_name, Token::kGET, get_arguments,
/*type_args_len=*/0,
/*argument_names=*/Object::empty_array(),
- /*checked_argument_count=*/1, thread()->GetNextDeoptId());
+ /*checked_argument_count=*/1,
+ thread()->compiler_state().GetNextDeoptId());
// Arguments to the .call() are the same as arguments to the
// original call (including type arguments), but receiver
@@ -1102,7 +1105,8 @@
InstanceCallInstr* invoke_call = new (Z) InstanceCallInstr(
call->token_pos(), Symbols::Call(), Token::kILLEGAL, call_arguments,
call->type_args_len(), call->argument_names(),
- /*checked_argument_count=*/1, thread()->GetNextDeoptId());
+ /*checked_argument_count=*/1,
+ thread()->compiler_state().GetNextDeoptId());
// Insert all new instructions, except .call() invocation into the
// graph.
@@ -1185,7 +1189,7 @@
StrictCompareInstr* check_cid = new (Z)
StrictCompareInstr(call->token_pos(), Token::kEQ_STRICT,
new (Z) Value(left_cid), new (Z) Value(lower_cid),
- /* number_check = */ false, Thread::kNoDeoptId);
+ /* number_check = */ false, DeoptId::kNone);
ReplaceCall(call, check_cid);
return true;
}
diff --git a/runtime/vm/compiler/aot/precompiler.cc b/runtime/vm/compiler/aot/precompiler.cc
index e3b3919..aa25729 100644
--- a/runtime/vm/compiler/aot/precompiler.cc
+++ b/runtime/vm/compiler/aot/precompiler.cc
@@ -22,6 +22,7 @@
#include "vm/compiler/backend/type_propagator.h"
#include "vm/compiler/cha.h"
#include "vm/compiler/compiler_pass.h"
+#include "vm/compiler/compiler_state.h"
#include "vm/compiler/frontend/flow_graph_builder.h"
#include "vm/compiler/jit/compiler.h"
#include "vm/dart_entry.h"
@@ -883,7 +884,7 @@
args_desc = ArgumentsDescriptor::New(0, // No type argument vector.
function.num_fixed_parameters());
cids.Clear();
- if (T->cha()->ConcreteSubclasses(cls, &cids)) {
+ if (CHA::ConcreteSubclasses(cls, &cids)) {
for (intptr_t j = 0; j < cids.length(); ++j) {
subcls ^= I->class_table()->At(cids[j]);
if (subcls.is_allocated()) {
@@ -2832,17 +2833,13 @@
true, FLAG_max_speculative_inlining_attempts);
while (!done) {
- const intptr_t prev_deopt_id = thread()->deopt_id();
- thread()->set_deopt_id(0);
LongJumpScope jump;
const intptr_t val = setjmp(*jump.Set());
if (val == 0) {
FlowGraph* flow_graph = nullptr;
ZoneGrowableArray<const ICData*>* ic_data_array = nullptr;
- // Class hierarchy analysis is registered with the thread in the
- // constructor and unregisters itself upon destruction.
- CHA cha(thread());
+ CompilerState compiler_state(thread());
// TimerScope needs an isolate to be properly terminated in case of a
// LongJump.
@@ -2979,8 +2976,6 @@
}
is_compiled = false;
}
- // Reset global isolate state.
- thread()->set_deopt_id(prev_deopt_id);
}
return is_compiled;
}
diff --git a/runtime/vm/compiler/assembler/assembler_arm.cc b/runtime/vm/compiler/assembler/assembler_arm.cc
index 6f6ffce..397c4e9 100644
--- a/runtime/vm/compiler/assembler/assembler_arm.cc
+++ b/runtime/vm/compiler/assembler/assembler_arm.cc
@@ -3007,8 +3007,8 @@
}
}
-void Assembler::LeaveFrame(RegList regs) {
- ASSERT((regs & (1 << PC)) == 0); // Must not pop PC.
+void Assembler::LeaveFrame(RegList regs, bool allow_pop_pc) {
+ ASSERT(allow_pop_pc || (regs & (1 << PC)) == 0); // Must not pop PC.
if ((regs & (1 << FP)) != 0) {
// Use FP to set SP.
sub(SP, FP, Operand(4 * NumRegsBelowFP(regs)));
@@ -3122,18 +3122,26 @@
AddImmediate(SP, -extra_size);
}
-void Assembler::LeaveDartFrame(RestorePP restore_pp) {
- if (restore_pp == kRestoreCallerPP) {
- ldr(PP,
- Address(FP, compiler_frame_layout.saved_caller_pp_from_fp * kWordSize));
- set_constant_pool_allowed(false);
- }
+void Assembler::LeaveDartFrame() {
+ ldr(PP,
+ Address(FP, compiler_frame_layout.saved_caller_pp_from_fp * kWordSize));
+ set_constant_pool_allowed(false);
// This will implicitly drop saved PP, PC marker due to restoring SP from FP
// first.
LeaveFrame((1 << FP) | (1 << LR));
}
+void Assembler::LeaveDartFrameAndReturn() {
+ ldr(PP,
+ Address(FP, compiler_frame_layout.saved_caller_pp_from_fp * kWordSize));
+ set_constant_pool_allowed(false);
+
+ // This will implicitly drop saved PP, PC marker due to restoring SP from FP
+ // first.
+ LeaveFrame((1 << FP) | (1 << PC), /*allow_pop_pc=*/true);
+}
+
void Assembler::EnterStubFrame() {
EnterDartFrame(0);
}
@@ -3272,6 +3280,7 @@
tags = RawObject::SizeTag::update(instance_size, tags);
ASSERT(cls.id() != kIllegalCid);
tags = RawObject::ClassIdTag::update(cls.id(), tags);
+ tags = RawObject::NewBit::update(true, tags);
LoadImmediate(IP, tags);
str(IP, FieldAddress(instance_reg, Object::tags_offset()));
@@ -3318,6 +3327,7 @@
uint32_t tags = 0;
tags = RawObject::ClassIdTag::update(cid, tags);
tags = RawObject::SizeTag::update(instance_size, tags);
+ tags = RawObject::NewBit::update(true, tags);
LoadImmediate(temp2, tags);
str(temp2, FieldAddress(instance, Array::tags_offset())); // Store tags.
diff --git a/runtime/vm/compiler/assembler/assembler_arm.h b/runtime/vm/compiler/assembler/assembler_arm.h
index 90d554c..6669caa 100644
--- a/runtime/vm/compiler/assembler/assembler_arm.h
+++ b/runtime/vm/compiler/assembler/assembler_arm.h
@@ -1010,7 +1010,7 @@
// Function frame setup and tear down.
void EnterFrame(RegList regs, intptr_t frame_space);
- void LeaveFrame(RegList regs);
+ void LeaveFrame(RegList regs, bool allow_pop_pc = false);
void Ret();
void ReserveAlignedFrameSpace(intptr_t frame_space);
@@ -1026,7 +1026,22 @@
// enable easy access to the RawInstruction object of code corresponding
// to this frame.
void EnterDartFrame(intptr_t frame_size);
- void LeaveDartFrame(RestorePP restore_pp = kRestoreCallerPP);
+
+ void LeaveDartFrame();
+
+ // Leaves the frame and returns.
+ //
+ // The difference to "LeaveDartFrame(); Ret();" is that we return using
+ //
+ // ldmia sp!, {fp, pc}
+ //
+ // instead of
+ //
+ // ldmia sp!, {fp, lr}
+ // blx lr
+ //
+ // This means that our return must go to ARM mode (and not thumb).
+ void LeaveDartFrameAndReturn();
// Set up a Dart frame for a function compiled for on-stack replacement.
// The frame layout is a normal Dart frame, but the frame is partially set
diff --git a/runtime/vm/compiler/assembler/assembler_arm64.cc b/runtime/vm/compiler/assembler/assembler_arm64.cc
index 0d6db19..118f0d7 100644
--- a/runtime/vm/compiler/assembler/assembler_arm64.cc
+++ b/runtime/vm/compiler/assembler/assembler_arm64.cc
@@ -1387,6 +1387,7 @@
tags = RawObject::SizeTag::update(instance_size, tags);
ASSERT(cls.id() != kIllegalCid);
tags = RawObject::ClassIdTag::update(cls.id(), tags);
+ tags = RawObject::NewBit::update(true, tags);
// Extends the 32 bit tags with zeros, which is the uninitialized
// hash code.
LoadImmediate(TMP, tags);
@@ -1433,6 +1434,7 @@
uint32_t tags = 0;
tags = RawObject::ClassIdTag::update(cid, tags);
tags = RawObject::SizeTag::update(instance_size, tags);
+ tags = RawObject::NewBit::update(true, tags);
// Extends the 32 bit tags with zeros, which is the uninitialized
// hash code.
LoadImmediate(temp2, tags);
diff --git a/runtime/vm/compiler/assembler/assembler_dbc_test.cc b/runtime/vm/compiler/assembler/assembler_dbc_test.cc
index fba04bd..26cc5a4 100644
--- a/runtime/vm/compiler/assembler/assembler_dbc_test.cc
+++ b/runtime/vm/compiler/assembler/assembler_dbc_test.cc
@@ -6,19 +6,21 @@
#if defined(TARGET_ARCH_DBC)
#include "vm/compiler/assembler/assembler.h"
+#include "vm/compiler/compiler_state.h"
#include "vm/stack_frame.h"
#include "vm/unit_test.h"
namespace dart {
static RawObject* ExecuteTest(const Code& code) {
- Thread* thread = Thread::Current();
- TransitionToGenerated transition(thread);
const intptr_t kTypeArgsLen = 0;
const intptr_t kNumArgs = 0;
- return Simulator::Current()->Call(
- code, Array::Handle(ArgumentsDescriptor::New(kTypeArgsLen, kNumArgs)),
- Array::Handle(Array::New(0)), thread);
+ const Array& args_desc =
+ Array::Handle(ArgumentsDescriptor::New(kTypeArgsLen, kNumArgs));
+ const Array& args = Array::Handle(Array::New(0));
+ Thread* thread = Thread::Current();
+ TransitionToGenerated transition(thread);
+ return Simulator::Current()->Call(code, args_desc, args, thread);
}
#define EXECUTE_TEST_CODE_INTPTR(code) \
@@ -82,7 +84,7 @@
Array::Handle(ArgumentsDescriptor::New(kTypeArgsLen, kNumArgs));
const ICData& ic_data = ICData::Handle(ICData::New(
dummy_instance_function, String::Handle(dummy_instance_function.name()),
- dummy_arguments_descriptor, Thread::kNoDeoptId, 2, ICData::kInstance));
+ dummy_arguments_descriptor, DeoptId::kNone, 2, ICData::kInstance));
// Wire up the Function in the ICData.
GrowableArray<intptr_t> cids(2);
diff --git a/runtime/vm/compiler/assembler/assembler_ia32.cc b/runtime/vm/compiler/assembler/assembler_ia32.cc
index 88d0063..5e77c27 100644
--- a/runtime/vm/compiler/assembler/assembler_ia32.cc
+++ b/runtime/vm/compiler/assembler/assembler_ia32.cc
@@ -2233,6 +2233,7 @@
tags = RawObject::SizeTag::update(instance_size, tags);
ASSERT(cls.id() != kIllegalCid);
tags = RawObject::ClassIdTag::update(cls.id(), tags);
+ tags = RawObject::NewBit::update(true, tags);
movl(FieldAddress(instance_reg, Object::tags_offset()), Immediate(tags));
} else {
jmp(failure);
@@ -2277,6 +2278,7 @@
uint32_t tags = 0;
tags = RawObject::ClassIdTag::update(cid, tags);
tags = RawObject::SizeTag::update(instance_size, tags);
+ tags = RawObject::NewBit::update(true, tags);
movl(FieldAddress(instance, Object::tags_offset()), Immediate(tags));
} else {
jmp(failure);
diff --git a/runtime/vm/compiler/assembler/assembler_x64.cc b/runtime/vm/compiler/assembler/assembler_x64.cc
index 5ce6565..07f946f 100644
--- a/runtime/vm/compiler/assembler/assembler_x64.cc
+++ b/runtime/vm/compiler/assembler/assembler_x64.cc
@@ -1705,6 +1705,7 @@
tags = RawObject::SizeTag::update(instance_size, tags);
ASSERT(cls.id() != kIllegalCid);
tags = RawObject::ClassIdTag::update(cls.id(), tags);
+ tags = RawObject::NewBit::update(true, tags);
// Extends the 32 bit tags with zeros, which is the uninitialized
// hash code.
MoveImmediate(FieldAddress(instance_reg, Object::tags_offset()),
@@ -1751,6 +1752,7 @@
uint32_t tags = 0;
tags = RawObject::ClassIdTag::update(cid, tags);
tags = RawObject::SizeTag::update(instance_size, tags);
+ tags = RawObject::NewBit::update(true, tags);
// Extends the 32 bit tags with zeros, which is the uninitialized
// hash code.
movq(FieldAddress(instance, Array::tags_offset()), Immediate(tags));
diff --git a/runtime/vm/compiler/assembler/disassembler_test.cc b/runtime/vm/compiler/assembler/disassembler_test.cc
index 86f6371..fa208ec 100644
--- a/runtime/vm/compiler/assembler/disassembler_test.cc
+++ b/runtime/vm/compiler/assembler/disassembler_test.cc
@@ -13,7 +13,7 @@
// method on DBC assembler.
#if !defined(PRODUCT) && !defined(TARGET_ARCH_DBC)
-TEST_CASE(Disassembler) {
+ISOLATE_UNIT_TEST_CASE(Disassembler) {
ObjectPoolWrapper object_pool_wrapper;
Assembler assembler(&object_pool_wrapper);
diff --git a/runtime/vm/compiler/backend/block_scheduler.cc b/runtime/vm/compiler/backend/block_scheduler.cc
index acc0378..7b26cd6 100644
--- a/runtime/vm/compiler/backend/block_scheduler.cc
+++ b/runtime/vm/compiler/backend/block_scheduler.cc
@@ -62,7 +62,7 @@
if (Compiler::IsBackgroundCompilation() && ic_data_array.IsNull()) {
// Deferred loading cleared ic_data_array.
Compiler::AbortBackgroundCompilation(
- Thread::kNoDeoptId, "BlockScheduler: ICData array cleared");
+ DeoptId::kNone, "BlockScheduler: ICData array cleared");
}
if (ic_data_array.IsNull()) {
DEBUG_ASSERT(Isolate::Current()->HasAttemptedReload());
diff --git a/runtime/vm/compiler/backend/branch_optimizer.cc b/runtime/vm/compiler/backend/branch_optimizer.cc
index 78615fc..7eeda64 100644
--- a/runtime/vm/compiler/backend/branch_optimizer.cc
+++ b/runtime/vm/compiler/backend/branch_optimizer.cc
@@ -65,8 +65,8 @@
// Convert a target block into a join block. Branches will be duplicated
// so the former true and false targets become joins of the control flows
// from all the duplicated branches.
- JoinEntryInstr* join = new (zone) JoinEntryInstr(
- target->block_id(), target->try_index(), Thread::kNoDeoptId);
+ JoinEntryInstr* join = new (zone)
+ JoinEntryInstr(target->block_id(), target->try_index(), DeoptId::kNone);
join->InheritDeoptTarget(zone, target);
join->LinkTo(target->next());
join->set_last_instruction(target->last_instruction());
@@ -82,7 +82,7 @@
ComparisonInstr* new_comparison =
comparison->CopyWithNewOperands(new_left, new_right);
BranchInstr* new_branch =
- new (zone) BranchInstr(new_comparison, Thread::kNoDeoptId);
+ new (zone) BranchInstr(new_comparison, DeoptId::kNone);
return new_branch;
}
@@ -182,24 +182,21 @@
// Connect the branch to the true and false joins, via empty target
// blocks.
- TargetEntryInstr* true_target =
- new (zone) TargetEntryInstr(flow_graph->max_block_id() + 1,
- block->try_index(), Thread::kNoDeoptId);
+ TargetEntryInstr* true_target = new (zone) TargetEntryInstr(
+ flow_graph->max_block_id() + 1, block->try_index(), DeoptId::kNone);
true_target->InheritDeoptTarget(zone, join_true);
- TargetEntryInstr* false_target =
- new (zone) TargetEntryInstr(flow_graph->max_block_id() + 2,
- block->try_index(), Thread::kNoDeoptId);
+ TargetEntryInstr* false_target = new (zone) TargetEntryInstr(
+ flow_graph->max_block_id() + 2, block->try_index(), DeoptId::kNone);
false_target->InheritDeoptTarget(zone, join_false);
flow_graph->set_max_block_id(flow_graph->max_block_id() + 2);
*new_branch->true_successor_address() = true_target;
*new_branch->false_successor_address() = false_target;
- GotoInstr* goto_true =
- new (zone) GotoInstr(join_true, Thread::kNoDeoptId);
+ GotoInstr* goto_true = new (zone) GotoInstr(join_true, DeoptId::kNone);
goto_true->InheritDeoptTarget(zone, join_true);
true_target->LinkTo(goto_true);
true_target->set_last_instruction(goto_true);
GotoInstr* goto_false =
- new (zone) GotoInstr(join_false, Thread::kNoDeoptId);
+ new (zone) GotoInstr(join_false, DeoptId::kNone);
goto_false->InheritDeoptTarget(zone, join_false);
false_target->LinkTo(goto_false);
false_target->set_last_instruction(goto_false);
@@ -302,9 +299,9 @@
ComparisonInstr* new_comparison = comparison->CopyWithNewOperands(
comparison->left()->Copy(zone), comparison->right()->Copy(zone));
- IfThenElseInstr* if_then_else = new (zone)
- IfThenElseInstr(new_comparison, if_true->Copy(zone),
- if_false->Copy(zone), Thread::kNoDeoptId);
+ IfThenElseInstr* if_then_else =
+ new (zone) IfThenElseInstr(new_comparison, if_true->Copy(zone),
+ if_false->Copy(zone), DeoptId::kNone);
flow_graph->InsertBefore(branch, if_then_else, NULL,
FlowGraph::kValue);
diff --git a/runtime/vm/compiler/backend/constant_propagator.cc b/runtime/vm/compiler/backend/constant_propagator.cc
index 7850d4e..4d88f97 100644
--- a/runtime/vm/compiler/backend/constant_propagator.cc
+++ b/runtime/vm/compiler/backend/constant_propagator.cc
@@ -237,6 +237,8 @@
void ConstantPropagator::VisitCheckClass(CheckClassInstr* instr) {}
+void ConstantPropagator::VisitCheckCondition(CheckConditionInstr* instr) {}
+
void ConstantPropagator::VisitCheckClassId(CheckClassIdInstr* instr) {}
void ConstantPropagator::VisitGuardFieldClass(GuardFieldClassInstr* instr) {}
@@ -1300,7 +1302,7 @@
JoinEntryInstr* join = if_true->AsJoinEntry();
if (join->phis() == NULL) {
GotoInstr* jump =
- new (Z) GotoInstr(if_true->AsJoinEntry(), Thread::kNoDeoptId);
+ new (Z) GotoInstr(if_true->AsJoinEntry(), DeoptId::kNone);
jump->InheritDeoptTarget(Z, branch);
Instruction* previous = branch->previous();
@@ -1442,8 +1444,8 @@
ASSERT(reachable_->Contains(if_false->preorder_number()));
ASSERT(if_false->parallel_move() == NULL);
ASSERT(if_false->loop_info() == NULL);
- join = new (Z) JoinEntryInstr(
- if_false->block_id(), if_false->try_index(), Thread::kNoDeoptId);
+ join = new (Z) JoinEntryInstr(if_false->block_id(),
+ if_false->try_index(), DeoptId::kNone);
join->InheritDeoptTarget(Z, if_false);
if_false->UnuseAllInputs();
next = if_false->next();
@@ -1451,7 +1453,7 @@
ASSERT(if_true->parallel_move() == NULL);
ASSERT(if_true->loop_info() == NULL);
join = new (Z) JoinEntryInstr(if_true->block_id(), if_true->try_index(),
- Thread::kNoDeoptId);
+ DeoptId::kNone);
join->InheritDeoptTarget(Z, if_true);
if_true->UnuseAllInputs();
next = if_true->next();
@@ -1462,7 +1464,7 @@
// Drop the comparison, which does not have side effects as long
// as it is a strict compare (the only one we can determine is
// constant with the current analysis).
- GotoInstr* jump = new (Z) GotoInstr(join, Thread::kNoDeoptId);
+ GotoInstr* jump = new (Z) GotoInstr(join, DeoptId::kNone);
jump->InheritDeoptTarget(Z, branch);
Instruction* previous = branch->previous();
diff --git a/runtime/vm/compiler/backend/flow_graph.cc b/runtime/vm/compiler/backend/flow_graph.cc
index a6f8c52..e92b110 100644
--- a/runtime/vm/compiler/backend/flow_graph.cc
+++ b/runtime/vm/compiler/backend/flow_graph.cc
@@ -12,6 +12,7 @@
#include "vm/compiler/backend/il_printer.h"
#include "vm/compiler/backend/range_analysis.h"
#include "vm/compiler/cha.h"
+#include "vm/compiler/compiler_state.h"
#include "vm/compiler/frontend/flow_graph_builder.h"
#include "vm/growable_array.h"
#include "vm/object_store.h"
@@ -435,7 +436,7 @@
if (function().IsDynamicFunction() && IsReceiver(receiver->definition())) {
// Call receiver is callee receiver: calling "this.g()" in f().
receiver_class = function().Owner();
- } else if (FLAG_use_strong_mode_types && isolate()->strong()) {
+ } else if (isolate()->can_use_strong_mode_types()) {
// In strong mode, get the receiver's compile type. Note that
// we allow nullable types, which may result in just generating
// a null check rather than the more elaborate class check
@@ -507,8 +508,8 @@
// has a null value are excluded above (to avoid throwing an exception
// on something valid, like null.hashCode).
intptr_t subclass_count = 0;
- if (!thread()->cha()->HasOverride(receiver_class, method_name,
- &subclass_count)) {
+ CHA& cha = thread()->compiler_state().cha();
+ if (!cha.HasOverride(receiver_class, method_name, &subclass_count)) {
if (FLAG_trace_cha) {
THR_Print(
" **(CHA) Instance call needs no class check since there "
@@ -516,7 +517,7 @@
method_name.ToCString(), receiver_class.ToCString());
}
if (FLAG_use_cha_deopt) {
- thread()->cha()->AddToGuardedClasses(receiver_class, subclass_count);
+ cha.AddToGuardedClasses(receiver_class, subclass_count);
}
return receiver_maybe_null ? ToCheck::kCheckNull : ToCheck::kNoCheck;
}
@@ -535,6 +536,30 @@
CheckClassInstr(new (zone()) Value(to_check), deopt_id, cids, token_pos);
}
+void FlowGraph::AddExactnessGuard(InstanceCallInstr* call,
+ intptr_t receiver_cid) {
+ const Class& cls = Class::Handle(
+ zone(), Isolate::Current()->class_table()->At(receiver_cid));
+
+ Definition* load_type_args = new (zone())
+ LoadFieldInstr(call->Receiver()->CopyWithType(),
+ NativeFieldDesc::GetTypeArgumentsFieldFor(zone(), cls),
+ call->token_pos());
+ InsertBefore(call, load_type_args, call->env(), FlowGraph::kValue);
+
+ const AbstractType& type =
+ AbstractType::Handle(zone(), call->ic_data()->StaticReceiverType());
+ ASSERT(!type.IsNull());
+ const TypeArguments& args = TypeArguments::Handle(zone(), type.arguments());
+ Instruction* guard = new (zone()) CheckConditionInstr(
+ new StrictCompareInstr(call->token_pos(), Token::kEQ_STRICT,
+ new (zone()) Value(load_type_args),
+ new (zone()) Value(GetConstant(args)),
+ /*needs_number_check=*/false, call->deopt_id()),
+ call->deopt_id());
+ InsertBefore(call, guard, call->env(), FlowGraph::kEffect);
+}
+
bool FlowGraph::VerifyUseLists() {
// Verify the initial definitions.
for (intptr_t i = 0; i < graph_entry_->initial_definitions()->length(); ++i) {
@@ -1091,7 +1116,7 @@
if (parsed_function().has_arg_desc_var()) {
Definition* defn =
new SpecialParameterInstr(SpecialParameterInstr::kArgDescriptor,
- Thread::kNoDeoptId, graph_entry_);
+ DeoptId::kNone, graph_entry_);
AllocateSSAIndexes(defn);
AddToInitialDefinitions(defn);
env[ArgumentDescriptorEnvIndex()] = defn;
@@ -1169,10 +1194,10 @@
Definition* param = nullptr;
if (raw_exception_var_envindex == i) {
param = new SpecialParameterInstr(SpecialParameterInstr::kException,
- Thread::kNoDeoptId, catch_entry);
+ DeoptId::kNone, catch_entry);
} else if (raw_stacktrace_var_envindex == i) {
param = new SpecialParameterInstr(SpecialParameterInstr::kStackTrace,
- Thread::kNoDeoptId, catch_entry);
+ DeoptId::kNone, catch_entry);
} else {
param = new (zone()) ParameterInstr(i, block_entry);
}
@@ -1290,8 +1315,7 @@
captured_parameters_->Add(index);
}
- if ((phi != NULL) && isolate()->strong() &&
- FLAG_use_strong_mode_types) {
+ if ((phi != NULL) && isolate()->can_use_strong_mode_types()) {
// Assign type to Phi if it doesn't have a type yet.
// For a Phi to appear in the local variable it either was placed
// there as incoming value by renaming or it was stored there by
@@ -1627,7 +1651,7 @@
if (IsUnboxedInteger(from) && IsUnboxedInteger(to)) {
const intptr_t deopt_id = (to == kUnboxedInt32) && (deopt_target != NULL)
? deopt_target->DeoptimizationTarget()
- : Thread::kNoDeoptId;
+ : DeoptId::kNone;
converted = new (Z)
UnboxedIntConverterInstr(from, to, use->CopyWithType(), deopt_id);
} else if ((from == kUnboxedInt32) && (to == kUnboxedDouble)) {
@@ -1636,13 +1660,13 @@
CanConvertInt64ToDouble()) {
const intptr_t deopt_id = (deopt_target != NULL)
? deopt_target->DeoptimizationTarget()
- : Thread::kNoDeoptId;
+ : DeoptId::kNone;
ASSERT(CanUnboxDouble());
converted = new Int64ToDoubleInstr(use->CopyWithType(), deopt_id);
} else if ((from == kTagged) && Boxing::Supports(to)) {
const intptr_t deopt_id = (deopt_target != NULL)
? deopt_target->DeoptimizationTarget()
- : Thread::kNoDeoptId;
+ : DeoptId::kNone;
converted = UnboxInstr::Create(to, use->CopyWithType(), deopt_id,
use->instruction()->speculative_mode());
} else if ((to == kTagged) && Boxing::Supports(from)) {
@@ -1654,7 +1678,7 @@
// trigger a deoptimization if executed. See #12417 for a discussion.
const intptr_t deopt_id = (deopt_target != NULL)
? deopt_target->DeoptimizationTarget()
- : Thread::kNoDeoptId;
+ : DeoptId::kNone;
ASSERT(Boxing::Supports(from));
ASSERT(Boxing::Supports(to));
Definition* boxed = BoxInstr::Create(from, use->CopyWithType());
@@ -2254,7 +2278,7 @@
// Replace Mint op with Smi op.
BinarySmiOpInstr* smi_op = new (Z) BinarySmiOpInstr(
Token::kBIT_AND, new (Z) Value(left_instr), new (Z) Value(right_instr),
- Thread::kNoDeoptId); // BIT_AND cannot deoptimize.
+ DeoptId::kNone); // BIT_AND cannot deoptimize.
bit_and_instr->ReplaceWith(smi_op, current_iterator);
}
}
@@ -2346,7 +2370,7 @@
static TargetEntryInstr* NewTarget(FlowGraph* graph, Instruction* inherit) {
TargetEntryInstr* target = new (graph->zone())
TargetEntryInstr(graph->allocate_block_id(),
- inherit->GetBlock()->try_index(), Thread::kNoDeoptId);
+ inherit->GetBlock()->try_index(), DeoptId::kNone);
target->InheritDeoptTarget(graph->zone(), inherit);
return target;
}
@@ -2354,7 +2378,7 @@
static JoinEntryInstr* NewJoin(FlowGraph* graph, Instruction* inherit) {
JoinEntryInstr* join = new (graph->zone())
JoinEntryInstr(graph->allocate_block_id(),
- inherit->GetBlock()->try_index(), Thread::kNoDeoptId);
+ inherit->GetBlock()->try_index(), DeoptId::kNone);
join->InheritDeoptTarget(graph->zone(), inherit);
return join;
}
@@ -2362,7 +2386,7 @@
static GotoInstr* NewGoto(FlowGraph* graph,
JoinEntryInstr* target,
Instruction* inherit) {
- GotoInstr* got = new (graph->zone()) GotoInstr(target, Thread::kNoDeoptId);
+ GotoInstr* got = new (graph->zone()) GotoInstr(target, DeoptId::kNone);
got->InheritDeoptTarget(graph->zone(), inherit);
return got;
}
@@ -2370,7 +2394,7 @@
static BranchInstr* NewBranch(FlowGraph* graph,
ComparisonInstr* cmp,
Instruction* inherit) {
- BranchInstr* bra = new (graph->zone()) BranchInstr(cmp, Thread::kNoDeoptId);
+ BranchInstr* bra = new (graph->zone()) BranchInstr(cmp, DeoptId::kNone);
bra->InheritDeoptTarget(graph->zone(), inherit);
return bra;
}
@@ -2452,7 +2476,7 @@
StrictCompareInstr* circuit = new (zone()) StrictCompareInstr(
inherit->token_pos(), Token::kEQ_STRICT, new (zone()) Value(phi),
new (zone()) Value(GetConstant(Bool::True())), false,
- Thread::kNoDeoptId); // don't inherit
+ DeoptId::kNone); // don't inherit
// Return new blocks through the second diamond.
return NewDiamond(mid_point, inherit, circuit, b_true, b_false);
diff --git a/runtime/vm/compiler/backend/flow_graph.h b/runtime/vm/compiler/backend/flow_graph.h
index a587613..37445e6 100644
--- a/runtime/vm/compiler/backend/flow_graph.h
+++ b/runtime/vm/compiler/backend/flow_graph.h
@@ -178,6 +178,8 @@
intptr_t deopt_id,
TokenPosition token_pos);
+ void AddExactnessGuard(InstanceCallInstr* call, intptr_t receiver_cid);
+
intptr_t current_ssa_temp_index() const { return current_ssa_temp_index_; }
void set_current_ssa_temp_index(intptr_t index) {
current_ssa_temp_index_ = index;
diff --git a/runtime/vm/compiler/backend/flow_graph_compiler.cc b/runtime/vm/compiler/backend/flow_graph_compiler.cc
index 6574c5e..ad396ce 100644
--- a/runtime/vm/compiler/backend/flow_graph_compiler.cc
+++ b/runtime/vm/compiler/backend/flow_graph_compiler.cc
@@ -149,7 +149,7 @@
// No need to collect extra ICData objects created during compilation.
deopt_id_to_ic_data_ = nullptr;
} else {
- const intptr_t len = thread()->deopt_id();
+ const intptr_t len = thread()->compiler_state().deopt_id();
deopt_id_to_ic_data_->EnsureLength(len, nullptr);
}
ASSERT(assembler != NULL);
@@ -425,10 +425,10 @@
AddCurrentDescriptor(kind, deopt_id, token_pos);
RecordSafepoint(locs);
EmitCatchEntryState();
- if (deopt_id != Thread::kNoDeoptId) {
+ if (deopt_id != DeoptId::kNone) {
// Marks either the continuation point in unoptimized code or the
// deoptimization point in optimized code, after call.
- const intptr_t deopt_id_after = Thread::ToDeoptAfter(deopt_id);
+ const intptr_t deopt_id_after = DeoptId::ToDeoptAfter(deopt_id);
if (is_optimizing()) {
AddDeoptIndexAtCall(deopt_id_after);
} else {
@@ -1147,7 +1147,7 @@
RawPcDescriptors::Kind kind,
LocationSummary* locs) {
GenerateCall(token_pos, stub_entry, kind, locs);
- const intptr_t deopt_id_after = Thread::ToDeoptAfter(deopt_id);
+ const intptr_t deopt_id_after = DeoptId::ToDeoptAfter(deopt_id);
if (is_optimizing()) {
AddDeoptIndexAtCall(deopt_id_after);
} else {
@@ -1157,6 +1157,34 @@
}
}
+static const StubEntry* StubEntryFor(const ICData& ic_data, bool optimized) {
+ switch (ic_data.NumArgsTested()) {
+ case 1:
+#if defined(TARGET_ARCH_X64)
+ if (ic_data.IsTrackingExactness()) {
+ if (optimized) {
+ return StubCode::
+ OneArgOptimizedCheckInlineCacheWithExactnessCheck_entry();
+ } else {
+ return StubCode::OneArgCheckInlineCacheWithExactnessCheck_entry();
+ }
+ }
+#else
+ // TODO(dartbug.com/34170) Port exactness tracking to other platforms.
+ ASSERT(!ic_data.IsTrackingExactness());
+#endif
+ return optimized ? StubCode::OneArgOptimizedCheckInlineCache_entry()
+ : StubCode::OneArgCheckInlineCache_entry();
+ case 2:
+ ASSERT(!ic_data.IsTrackingExactness());
+ return optimized ? StubCode::TwoArgsOptimizedCheckInlineCache_entry()
+ : StubCode::TwoArgsCheckInlineCache_entry();
+ default:
+ UNIMPLEMENTED();
+ return nullptr;
+ }
+}
+
void FlowGraphCompiler::GenerateInstanceCall(intptr_t deopt_id,
TokenPosition token_pos,
LocationSummary* locs,
@@ -1174,20 +1202,8 @@
// Emit IC call that will count and thus may need reoptimization at
// function entry.
ASSERT(may_reoptimize() || flow_graph().IsCompiledForOsr());
- switch (ic_data.NumArgsTested()) {
- case 1:
- EmitOptimizedInstanceCall(
- *StubCode::OneArgOptimizedCheckInlineCache_entry(), ic_data,
- deopt_id, token_pos, locs, entry_kind);
- return;
- case 2:
- EmitOptimizedInstanceCall(
- *StubCode::TwoArgsOptimizedCheckInlineCache_entry(), ic_data,
- deopt_id, token_pos, locs, entry_kind);
- return;
- default:
- UNIMPLEMENTED();
- }
+ EmitOptimizedInstanceCall(*StubEntryFor(ic_data, /*optimized=*/true),
+ ic_data, deopt_id, token_pos, locs, entry_kind);
return;
}
@@ -1200,18 +1216,8 @@
return;
}
- switch (ic_data.NumArgsTested()) {
- case 1:
- EmitInstanceCall(*StubCode::OneArgCheckInlineCache_entry(), ic_data,
- deopt_id, token_pos, locs);
- break;
- case 2:
- EmitInstanceCall(*StubCode::TwoArgsCheckInlineCache_entry(), ic_data,
- deopt_id, token_pos, locs);
- break;
- default:
- UNIMPLEMENTED();
- }
+ EmitInstanceCall(*StubEntryFor(ic_data, /*optimized=*/false), ic_data,
+ deopt_id, token_pos, locs);
}
void FlowGraphCompiler::GenerateStaticCall(intptr_t deopt_id,
@@ -1645,7 +1651,8 @@
intptr_t deopt_id,
const String& target_name,
const Array& arguments_descriptor,
- intptr_t num_args_tested) {
+ intptr_t num_args_tested,
+ const AbstractType& receiver_type) {
if ((deopt_id_to_ic_data_ != NULL) &&
((*deopt_id_to_ic_data_)[deopt_id] != NULL)) {
const ICData* res = (*deopt_id_to_ic_data_)[deopt_id];
@@ -1655,12 +1662,13 @@
ASSERT(res->TypeArgsLen() ==
ArgumentsDescriptor(arguments_descriptor).TypeArgsLen());
ASSERT(!res->is_static_call());
+ ASSERT(res->StaticReceiverType() == receiver_type.raw());
return res;
}
const ICData& ic_data = ICData::ZoneHandle(
zone(), ICData::New(parsed_function().function(), target_name,
arguments_descriptor, deopt_id, num_args_tested,
- ICData::kInstance));
+ ICData::kInstance, receiver_type));
#if defined(TAG_IC_DATA)
ic_data.set_tag(ICData::Tag::kInstanceCall);
#endif
@@ -1761,7 +1769,8 @@
if (!LookupMethodFor(cid, selector, args_desc, &fn)) return NULL;
CallTargets* targets = new (zone) CallTargets(zone);
- targets->Add(new (zone) TargetInfo(cid, cid, &fn, /* count = */ 1));
+ targets->Add(new (zone) TargetInfo(cid, cid, &fn, /* count = */ 1,
+ StaticTypeExactnessState::NotTracking()));
return targets;
}
@@ -2200,7 +2209,7 @@
__ CallRuntime(runtime_entry_, num_args_);
}
// Can't query deopt_id() without checking if instruction can deoptimize...
- intptr_t deopt_id = Thread::kNoDeoptId;
+ intptr_t deopt_id = DeoptId::kNone;
if (instruction()->CanDeoptimize() ||
instruction()->CanBecomeDeoptimizationTarget()) {
deopt_id = instruction()->deopt_id();
diff --git a/runtime/vm/compiler/backend/flow_graph_compiler.h b/runtime/vm/compiler/backend/flow_graph_compiler.h
index 71d04b0..7baed3c 100644
--- a/runtime/vm/compiler/backend/flow_graph_compiler.h
+++ b/runtime/vm/compiler/backend/flow_graph_compiler.h
@@ -699,7 +699,8 @@
const ICData* GetOrAddInstanceCallICData(intptr_t deopt_id,
const String& target_name,
const Array& arguments_descriptor,
- intptr_t num_args_tested);
+ intptr_t num_args_tested,
+ const AbstractType& receiver_type);
const ICData* GetOrAddStaticCallICData(intptr_t deopt_id,
const Function& target,
diff --git a/runtime/vm/compiler/backend/flow_graph_compiler_arm.cc b/runtime/vm/compiler/backend/flow_graph_compiler_arm.cc
index 8762e1b..cd5b029 100644
--- a/runtime/vm/compiler/backend/flow_graph_compiler_arm.cc
+++ b/runtime/vm/compiler/backend/flow_graph_compiler_arm.cc
@@ -118,7 +118,7 @@
// For any outer environment the deopt id is that of the call instruction
// which is recorded in the outer environment.
builder->AddReturnAddress(current->function(),
- Thread::ToDeoptAfter(current->deopt_id()),
+ DeoptId::ToDeoptAfter(current->deopt_id()),
slot_ix++);
// The values of outgoing arguments can be changed from the inlined call so
@@ -890,16 +890,25 @@
// R4: arguments descriptor array.
void FlowGraphCompiler::CompileGraph() {
InitCompiler();
-#ifdef DART_PRECOMPILER
- const Function& function = parsed_function().function();
- if (function.IsDynamicFunction()) {
- SpecialStatsBegin(CombinedCodeStatistics::kTagCheckedEntry);
- __ MonomorphicCheckedEntry();
- SpecialStatsEnd(CombinedCodeStatistics::kTagCheckedEntry);
- }
-#endif // DART_PRECOMPILER
+ if (FLAG_precompiled_mode) {
+ const Function& function = parsed_function().function();
+ if (function.IsDynamicFunction()) {
+ SpecialStatsBegin(CombinedCodeStatistics::kTagCheckedEntry);
+ __ MonomorphicCheckedEntry();
+ SpecialStatsEnd(CombinedCodeStatistics::kTagCheckedEntry);
+ }
- __ set_constant_pool_allowed(true);
+ // For JIT we have multiple entrypoints functionality which moved the
+ // intrinsification as well as the setup of the frame to the
+ // [TargetEntryInstr::EmitNativeCode].
+ if (TryIntrinsify()) {
+ // Skip regular code generation.
+ return;
+ }
+ EmitFrameEntry();
+ ASSERT(__ constant_pool_allowed());
+ }
+
VisitBlocks();
__ bkpt(0);
@@ -912,7 +921,7 @@
RawPcDescriptors::Kind kind,
LocationSummary* locs) {
__ BranchLink(stub_entry);
- EmitCallsiteMetadata(token_pos, Thread::kNoDeoptId, kind, locs);
+ EmitCallsiteMetadata(token_pos, DeoptId::kNone, kind, locs);
AddStubCallTarget(Code::ZoneHandle(stub_entry.code()));
}
@@ -921,7 +930,7 @@
RawPcDescriptors::Kind kind,
LocationSummary* locs) {
__ BranchLinkPatchable(stub_entry);
- EmitCallsiteMetadata(token_pos, Thread::kNoDeoptId, kind, locs);
+ EmitCallsiteMetadata(token_pos, DeoptId::kNone, kind, locs);
}
void FlowGraphCompiler::GenerateDartCall(intptr_t deopt_id,
@@ -1036,7 +1045,7 @@
__ blx(LR);
RecordSafepoint(locs, slow_path_argument_count);
- const intptr_t deopt_id_after = Thread::ToDeoptAfter(deopt_id);
+ const intptr_t deopt_id_after = DeoptId::ToDeoptAfter(deopt_id);
if (FLAG_precompiled_mode) {
// Megamorphic calls may occur in slow path stubs.
// If valid use try_index argument.
@@ -1044,14 +1053,12 @@
try_index = CurrentTryIndex();
}
AddDescriptor(RawPcDescriptors::kOther, assembler()->CodeSize(),
- Thread::kNoDeoptId, token_pos, try_index);
+ DeoptId::kNone, token_pos, try_index);
} else if (is_optimizing()) {
- AddCurrentDescriptor(RawPcDescriptors::kOther, Thread::kNoDeoptId,
- token_pos);
+ AddCurrentDescriptor(RawPcDescriptors::kOther, DeoptId::kNone, token_pos);
AddDeoptIndexAtCall(deopt_id_after);
} else {
- AddCurrentDescriptor(RawPcDescriptors::kOther, Thread::kNoDeoptId,
- token_pos);
+ AddCurrentDescriptor(RawPcDescriptors::kOther, DeoptId::kNone, token_pos);
// Add deoptimization continuation point after the call and before the
// arguments are removed.
AddCurrentDescriptor(RawPcDescriptors::kDeopt, deopt_id_after, token_pos);
@@ -1077,7 +1084,7 @@
__ LoadUniqueObject(R9, ic_data);
__ blx(LR);
- EmitCallsiteMetadata(token_pos, Thread::kNoDeoptId, RawPcDescriptors::kOther,
+ EmitCallsiteMetadata(token_pos, DeoptId::kNone, RawPcDescriptors::kOther,
locs);
__ Drop(ic_data.CountWithTypeArgs());
}
diff --git a/runtime/vm/compiler/backend/flow_graph_compiler_arm64.cc b/runtime/vm/compiler/backend/flow_graph_compiler_arm64.cc
index 358afcf..99af7c4 100644
--- a/runtime/vm/compiler/backend/flow_graph_compiler_arm64.cc
+++ b/runtime/vm/compiler/backend/flow_graph_compiler_arm64.cc
@@ -115,7 +115,7 @@
// For any outer environment the deopt id is that of the call instruction
// which is recorded in the outer environment.
builder->AddReturnAddress(current->function(),
- Thread::ToDeoptAfter(current->deopt_id()),
+ DeoptId::ToDeoptAfter(current->deopt_id()),
slot_ix++);
// The values of outgoing arguments can be changed from the inlined call so
@@ -842,18 +842,26 @@
// R4: arguments descriptor array.
void FlowGraphCompiler::CompileGraph() {
InitCompiler();
-#ifdef DART_PRECOMPILER
- const Function& function = parsed_function().function();
- if (function.IsDynamicFunction()) {
- __ MonomorphicCheckedEntry();
- }
-#endif // DART_PRECOMPILER
+ if (FLAG_precompiled_mode) {
+ const Function& function = parsed_function().function();
+ if (function.IsDynamicFunction()) {
+ SpecialStatsBegin(CombinedCodeStatistics::kTagCheckedEntry);
+ __ MonomorphicCheckedEntry();
+ SpecialStatsEnd(CombinedCodeStatistics::kTagCheckedEntry);
+ }
+ }
+
+ // For JIT we have multiple entrypoints functionality which moved the
+ // intrinsification as well as the setup of the frame to the
+ // [TargetEntryInstr::EmitNativeCode].
+ //
+ // Though this has not been implemented on ARM64, which is why this code here
+ // is outside the "ifdef DART_PRECOMPILER".
if (TryIntrinsify()) {
// Skip regular code generation.
return;
}
-
EmitFrameEntry();
ASSERT(assembler()->constant_pool_allowed());
@@ -892,7 +900,7 @@
RawPcDescriptors::Kind kind,
LocationSummary* locs) {
__ BranchLink(stub_entry);
- EmitCallsiteMetadata(token_pos, Thread::kNoDeoptId, kind, locs);
+ EmitCallsiteMetadata(token_pos, DeoptId::kNone, kind, locs);
AddStubCallTarget(Code::ZoneHandle(stub_entry.code()));
}
@@ -901,7 +909,7 @@
RawPcDescriptors::Kind kind,
LocationSummary* locs) {
__ BranchLinkPatchable(stub_entry);
- EmitCallsiteMetadata(token_pos, Thread::kNoDeoptId, kind, locs);
+ EmitCallsiteMetadata(token_pos, DeoptId::kNone, kind, locs);
}
void FlowGraphCompiler::GenerateDartCall(intptr_t deopt_id,
@@ -1013,7 +1021,7 @@
__ blr(LR);
RecordSafepoint(locs, slow_path_argument_count);
- const intptr_t deopt_id_after = Thread::ToDeoptAfter(deopt_id);
+ const intptr_t deopt_id_after = DeoptId::ToDeoptAfter(deopt_id);
if (FLAG_precompiled_mode) {
// Megamorphic calls may occur in slow path stubs.
// If valid use try_index argument.
@@ -1021,14 +1029,12 @@
try_index = CurrentTryIndex();
}
AddDescriptor(RawPcDescriptors::kOther, assembler()->CodeSize(),
- Thread::kNoDeoptId, token_pos, try_index);
+ DeoptId::kNone, token_pos, try_index);
} else if (is_optimizing()) {
- AddCurrentDescriptor(RawPcDescriptors::kOther, Thread::kNoDeoptId,
- token_pos);
+ AddCurrentDescriptor(RawPcDescriptors::kOther, DeoptId::kNone, token_pos);
AddDeoptIndexAtCall(deopt_id_after);
} else {
- AddCurrentDescriptor(RawPcDescriptors::kOther, Thread::kNoDeoptId,
- token_pos);
+ AddCurrentDescriptor(RawPcDescriptors::kOther, DeoptId::kNone, token_pos);
// Add deoptimization continuation point after the call and before the
// arguments are removed.
AddCurrentDescriptor(RawPcDescriptors::kDeopt, deopt_id_after, token_pos);
@@ -1053,7 +1059,7 @@
__ LoadUniqueObject(R5, ic_data);
__ blr(TMP);
- EmitCallsiteMetadata(token_pos, Thread::kNoDeoptId, RawPcDescriptors::kOther,
+ EmitCallsiteMetadata(token_pos, DeoptId::kNone, RawPcDescriptors::kOther,
locs);
__ Drop(ic_data.CountWithTypeArgs());
}
diff --git a/runtime/vm/compiler/backend/flow_graph_compiler_dbc.cc b/runtime/vm/compiler/backend/flow_graph_compiler_dbc.cc
index 9a9e90f..8dcebb4 100644
--- a/runtime/vm/compiler/backend/flow_graph_compiler_dbc.cc
+++ b/runtime/vm/compiler/backend/flow_graph_compiler_dbc.cc
@@ -129,7 +129,7 @@
// For any outer environment the deopt id is that of the call instruction
// which is recorded in the outer environment.
builder->AddReturnAddress(current->function(),
- Thread::ToDeoptAfter(current->deopt_id()),
+ DeoptId::ToDeoptAfter(current->deopt_id()),
slot_ix++);
builder->AddPcMarker(previous->function(), slot_ix++);
@@ -179,7 +179,7 @@
RecordSafepoint(locs);
// Marks either the continuation point in unoptimized code or the
// deoptimization point in optimized code, after call.
- const intptr_t deopt_id_after = Thread::ToDeoptAfter(deopt_id);
+ const intptr_t deopt_id_after = DeoptId::ToDeoptAfter(deopt_id);
if (is_optimizing()) {
// Return/ReturnTOS instruction drops incoming arguments so
// we have to drop outgoing arguments from the innermost environment.
diff --git a/runtime/vm/compiler/backend/flow_graph_compiler_ia32.cc b/runtime/vm/compiler/backend/flow_graph_compiler_ia32.cc
index 69dae4c..41c287c 100644
--- a/runtime/vm/compiler/backend/flow_graph_compiler_ia32.cc
+++ b/runtime/vm/compiler/backend/flow_graph_compiler_ia32.cc
@@ -116,7 +116,7 @@
// For any outer environment the deopt id is that of the call instruction
// which is recorded in the outer environment.
builder->AddReturnAddress(current->function(),
- Thread::ToDeoptAfter(current->deopt_id()),
+ DeoptId::ToDeoptAfter(current->deopt_id()),
slot_ix++);
// The values of outgoing arguments can be changed from the inlined call so
@@ -851,7 +851,7 @@
RawPcDescriptors::Kind kind,
LocationSummary* locs) {
__ Call(stub_entry);
- EmitCallsiteMetadata(token_pos, Thread::kNoDeoptId, kind, locs);
+ EmitCallsiteMetadata(token_pos, DeoptId::kNone, kind, locs);
AddStubCallTarget(Code::ZoneHandle(stub_entry.code()));
}
@@ -967,9 +967,9 @@
__ call(Address(THR, Thread::megamorphic_call_checked_entry_offset()));
__ call(EBX);
- AddCurrentDescriptor(RawPcDescriptors::kOther, Thread::kNoDeoptId, token_pos);
+ AddCurrentDescriptor(RawPcDescriptors::kOther, DeoptId::kNone, token_pos);
RecordSafepoint(locs, slow_path_argument_count);
- const intptr_t deopt_id_after = Thread::ToDeoptAfter(deopt_id);
+ const intptr_t deopt_id_after = DeoptId::ToDeoptAfter(deopt_id);
// Precompilation not implemented on ia32 platform.
ASSERT(!FLAG_precompiled_mode);
if (is_optimizing()) {
diff --git a/runtime/vm/compiler/backend/flow_graph_compiler_x64.cc b/runtime/vm/compiler/backend/flow_graph_compiler_x64.cc
index 3259e3e..4542805 100644
--- a/runtime/vm/compiler/backend/flow_graph_compiler_x64.cc
+++ b/runtime/vm/compiler/backend/flow_graph_compiler_x64.cc
@@ -115,7 +115,7 @@
// For any outer environment the deopt id is that of the call instruction
// which is recorded in the outer environment.
builder->AddReturnAddress(current->function(),
- Thread::ToDeoptAfter(current->deopt_id()),
+ DeoptId::ToDeoptAfter(current->deopt_id()),
slot_ix++);
// The values of outgoing arguments can be changed from the inlined call so
@@ -880,14 +880,25 @@
void FlowGraphCompiler::CompileGraph() {
InitCompiler();
-#ifdef DART_PRECOMPILER
- const Function& function = parsed_function().function();
- if (function.IsDynamicFunction()) {
- __ MonomorphicCheckedEntry();
- }
-#endif // DART_PRECOMPILER
- __ set_constant_pool_allowed(true);
+ if (FLAG_precompiled_mode) {
+ const Function& function = parsed_function().function();
+ if (function.IsDynamicFunction()) {
+ SpecialStatsBegin(CombinedCodeStatistics::kTagCheckedEntry);
+ __ MonomorphicCheckedEntry();
+ SpecialStatsEnd(CombinedCodeStatistics::kTagCheckedEntry);
+ }
+
+ // For JIT we have multiple entrypoints functionality which moved the
+ // intrinsification to the [TargetEntryInstr::EmitNativeCode].
+ if (TryIntrinsify()) {
+ // Skip regular code generation.
+ return;
+ }
+ EmitFrameEntry();
+ ASSERT(__ constant_pool_allowed());
+ }
+
ASSERT(!block_order().is_empty());
VisitBlocks();
@@ -901,7 +912,7 @@
RawPcDescriptors::Kind kind,
LocationSummary* locs) {
__ Call(stub_entry);
- EmitCallsiteMetadata(token_pos, Thread::kNoDeoptId, kind, locs);
+ EmitCallsiteMetadata(token_pos, DeoptId::kNone, kind, locs);
AddStubCallTarget(Code::ZoneHandle(stub_entry.code()));
}
@@ -910,7 +921,7 @@
RawPcDescriptors::Kind kind,
LocationSummary* locs) {
__ CallPatchable(stub_entry);
- EmitCallsiteMetadata(token_pos, Thread::kNoDeoptId, kind, locs);
+ EmitCallsiteMetadata(token_pos, DeoptId::kNone, kind, locs);
}
void FlowGraphCompiler::GenerateDartCall(intptr_t deopt_id,
@@ -1026,7 +1037,7 @@
__ call(Address(THR, Thread::megamorphic_call_checked_entry_offset()));
RecordSafepoint(locs, slow_path_argument_count);
- const intptr_t deopt_id_after = Thread::ToDeoptAfter(deopt_id);
+ const intptr_t deopt_id_after = DeoptId::ToDeoptAfter(deopt_id);
if (FLAG_precompiled_mode) {
// Megamorphic calls may occur in slow path stubs.
// If valid use try_index argument.
@@ -1034,14 +1045,12 @@
try_index = CurrentTryIndex();
}
AddDescriptor(RawPcDescriptors::kOther, assembler()->CodeSize(),
- Thread::kNoDeoptId, token_pos, try_index);
+ DeoptId::kNone, token_pos, try_index);
} else if (is_optimizing()) {
- AddCurrentDescriptor(RawPcDescriptors::kOther, Thread::kNoDeoptId,
- token_pos);
+ AddCurrentDescriptor(RawPcDescriptors::kOther, DeoptId::kNone, token_pos);
AddDeoptIndexAtCall(deopt_id_after);
} else {
- AddCurrentDescriptor(RawPcDescriptors::kOther, Thread::kNoDeoptId,
- token_pos);
+ AddCurrentDescriptor(RawPcDescriptors::kOther, DeoptId::kNone, token_pos);
// Add deoptimization continuation point after the call and before the
// arguments are removed.
AddCurrentDescriptor(RawPcDescriptors::kDeopt, deopt_id_after, token_pos);
diff --git a/runtime/vm/compiler/backend/il.cc b/runtime/vm/compiler/backend/il.cc
index 2efd036..145fc3d 100644
--- a/runtime/vm/compiler/backend/il.cc
+++ b/runtime/vm/compiler/backend/il.cc
@@ -477,7 +477,7 @@
const ZoneGrowableArray<const ICData*>& ic_data_array) const {
// The deopt_id can be outside the range of the IC data array for
// computations added in the optimizing compiler.
- ASSERT(deopt_id_ != Thread::kNoDeoptId);
+ ASSERT(deopt_id_ != DeoptId::kNone);
if (deopt_id_ < ic_data_array.length()) {
const ICData* result = ic_data_array[deopt_id_];
#if defined(TAG_IC_DATA)
@@ -636,8 +636,8 @@
}
if (include_targets) {
Function& function = Function::ZoneHandle(zone, ic_data.GetTargetAt(i));
- cid_ranges_.Add(new (zone)
- TargetInfo(id, id, &function, ic_data.GetCountAt(i)));
+ cid_ranges_.Add(new (zone) TargetInfo(
+ id, id, &function, ic_data.GetCountAt(i), ic_data.GetExactnessAt(i)));
} else {
cid_ranges_.Add(new (zone) CidRange(id, id));
}
@@ -1002,6 +1002,7 @@
// Check that the value is not an incorrect Integer representation.
ASSERT(!value.IsMint() || !Smi::IsValid(Mint::Cast(value).AsInt64Value()));
ASSERT(!value.IsField() || Field::Cast(value).IsOriginal());
+ ASSERT(value.IsSmi() || value.IsOld());
}
bool ConstantInstr::AttributesEqual(Instruction* other) const {
@@ -1045,7 +1046,7 @@
intptr_t osr_id)
: BlockEntryInstr(0,
CatchClauseNode::kInvalidTryIndex,
- Thread::Current()->GetNextDeoptId()),
+ CompilerState::Current().GetNextDeoptId()),
parsed_function_(parsed_function),
normal_entry_(normal_entry),
catch_entries_(),
@@ -1321,7 +1322,7 @@
Definition* call,
Definition* result) {
ASSERT(call->env() != NULL);
- deopt_id_ = Thread::ToDeoptAfter(call->deopt_id_);
+ deopt_id_ = DeoptId::ToDeoptAfter(call->deopt_id_);
call->env()->DeepCopyAfterTo(
flow_graph->zone(), this, call->ArgumentCount(),
flow_graph->constant_dead(),
@@ -1536,8 +1537,8 @@
// we can simply jump to the beginning of the block.
ASSERT(instr->previous() == this);
- GotoInstr* goto_join =
- new GotoInstr(AsJoinEntry(), Thread::Current()->GetNextDeoptId());
+ GotoInstr* goto_join = new GotoInstr(
+ AsJoinEntry(), CompilerState::Current().GetNextDeoptId());
goto_join->CopyDeoptIdFrom(*parent);
graph_entry->normal_entry()->LinkTo(goto_join);
return true;
@@ -1753,7 +1754,7 @@
}
void Instruction::Goto(JoinEntryInstr* entry) {
- LinkTo(new GotoInstr(entry, Thread::Current()->GetNextDeoptId()));
+ LinkTo(new GotoInstr(entry, CompilerState::Current().GetNextDeoptId()));
}
bool UnboxedIntConverterInstr::ComputeCanDeoptimize() const {
@@ -2267,7 +2268,7 @@
case Token::kBIT_XOR:
replacement = new BinarySmiOpInstr(
op_kind(), new Value(left()->definition()),
- new Value(right()->definition()), Thread::kNoDeoptId);
+ new Value(right()->definition()), DeoptId::kNone);
default:
break;
}
@@ -2293,7 +2294,7 @@
if ((left_type->ToCid() == kSmiCid) && (right_type->ToCid() == kSmiCid)) {
op_cid = kSmiCid;
- } else if (Isolate::Current()->strong() && FLAG_use_strong_mode_types &&
+ } else if (Isolate::Current()->can_use_strong_mode_types() &&
FlowGraphCompiler::SupportsUnboxedInt64() &&
// TODO(dartbug.com/30480): handle nullable types here
left_type->IsNullableInt() && !left_type->is_nullable() &&
@@ -2307,11 +2308,11 @@
if (Token::IsRelationalOperator(kind())) {
replacement = new RelationalOpInstr(
token_pos(), kind(), left()->CopyWithType(), right()->CopyWithType(),
- op_cid, Thread::kNoDeoptId, speculative_mode);
+ op_cid, DeoptId::kNone, speculative_mode);
} else if (Token::IsEqualityOperator(kind())) {
replacement = new EqualityCompareInstr(
token_pos(), kind(), left()->CopyWithType(), right()->CopyWithType(),
- op_cid, Thread::kNoDeoptId, speculative_mode);
+ op_cid, DeoptId::kNone, speculative_mode);
}
if (replacement != NULL) {
if (FLAG_trace_strong_mode_types && (op_cid == kMintCid)) {
@@ -2451,7 +2452,7 @@
// the code generator deal with throw on slowpath.
break;
}
- ASSERT(GetDeoptId() != Thread::kNoDeoptId);
+ ASSERT(GetDeoptId() != DeoptId::kNone);
DeoptimizeInstr* deopt =
new DeoptimizeInstr(ICData::kDeoptBinarySmiOp, GetDeoptId());
flow_graph->InsertBefore(this, deopt, env(), FlowGraph::kEffect);
@@ -2461,22 +2462,24 @@
break;
case Token::kSHL: {
- const intptr_t kMaxShift = RepresentationBits(representation()) - 1;
+ const intptr_t result_bits = RepresentationBits(representation());
if (rhs == 0) {
return left()->definition();
- } else if ((rhs < 0) || (rhs >= kMaxShift)) {
- if ((rhs < 0) || !is_truncating()) {
- // Instruction will always throw on negative rhs operand.
- if (!CanDeoptimize()) {
- // For non-speculative operations (no deopt), let
- // the code generator deal with throw on slowpath.
- break;
- }
- ASSERT(GetDeoptId() != Thread::kNoDeoptId);
- DeoptimizeInstr* deopt =
- new DeoptimizeInstr(ICData::kDeoptBinarySmiOp, GetDeoptId());
- flow_graph->InsertBefore(this, deopt, env(), FlowGraph::kEffect);
+ } else if ((rhs >= kBitsPerInt64) ||
+ ((rhs >= result_bits) && is_truncating())) {
+ return CreateConstantResult(flow_graph, Integer::Handle(Smi::New(0)));
+ } else if ((rhs < 0) || ((rhs >= result_bits) && !is_truncating())) {
+ // Instruction will always throw on negative rhs operand or
+ // deoptimize on large rhs operand.
+ if (!CanDeoptimize()) {
+ // For non-speculative operations (no deopt), let
+ // the code generator deal with throw on slowpath.
+ break;
}
+ ASSERT(GetDeoptId() != DeoptId::kNone);
+ DeoptimizeInstr* deopt =
+ new DeoptimizeInstr(ICData::kDeoptBinarySmiOp, GetDeoptId());
+ flow_graph->InsertBefore(this, deopt, env(), FlowGraph::kEffect);
// Replace with zero since it overshifted or always throws.
return CreateConstantResult(flow_graph, Integer::Handle(Smi::New(0)));
}
@@ -2636,10 +2639,11 @@
} else if (LoadFieldInstr* load_array = array->AsLoadField()) {
// For arrays with guarded lengths, replace the length load
// with a constant.
- const Field* field = load_array->field();
- if ((field != nullptr) && (field->guarded_list_length() >= 0)) {
- return flow_graph->GetConstant(
- Smi::Handle(Smi::New(field->guarded_list_length())));
+ if (const Field* field = load_array->field()) {
+ if (field->guarded_list_length() >= 0) {
+ return flow_graph->GetConstant(
+ Smi::Handle(Smi::New(field->guarded_list_length())));
+ }
}
}
} else if (native_field() != nullptr &&
@@ -2648,6 +2652,9 @@
if (StaticCallInstr* call = array->AsStaticCall()) {
if (call->is_known_list_constructor()) {
return call->ArgumentAt(0);
+ } else if (call->function().recognized_kind() ==
+ MethodRecognizer::kLinkedHashMap_getData) {
+ return flow_graph->constant_null();
}
} else if (CreateArrayInstr* create_array = array->AsCreateArray()) {
return create_array->element_type()->definition();
@@ -2659,6 +2666,11 @@
field->static_type_exactness_state().IsTriviallyExact()) {
return flow_graph->GetConstant(TypeArguments::Handle(
AbstractType::Handle(field->type()).arguments()));
+ } else if (const NativeFieldDesc* native_field =
+ load_array->native_field()) {
+ if (native_field == NativeFieldDesc::LinkedHashMap_data()) {
+ return flow_graph->constant_null();
+ }
}
}
}
@@ -2667,7 +2679,9 @@
if (instance()->BindsToConstant()) {
Object& result = Object::Handle();
if (Evaluate(instance()->BoundConstant(), &result)) {
- return flow_graph->GetConstant(result);
+ if (result.IsSmi() || result.IsOld()) {
+ return flow_graph->GetConstant(result);
+ }
}
}
@@ -2925,8 +2939,7 @@
UnboxedIntConverterInstr* converter = new UnboxedIntConverterInstr(
from_representation, representation(),
box_defn->value()->CopyWithType(),
- (representation() == kUnboxedInt32) ? GetDeoptId()
- : Thread::kNoDeoptId);
+ (representation() == kUnboxedInt32) ? GetDeoptId() : DeoptId::kNone);
// TODO(vegorov): marking resulting converter as truncating when
// unboxing can't deoptimize is a workaround for the missing
// deoptimization environment when we insert converter after
@@ -3016,7 +3029,7 @@
UnboxedIntConverterInstr* converter = new UnboxedIntConverterInstr(
box_defn->from(), representation(), box_defn->value()->CopyWithType(),
- (to() == kUnboxedInt32) ? GetDeoptId() : Thread::kNoDeoptId);
+ (to() == kUnboxedInt32) ? GetDeoptId() : DeoptId::kNone);
if ((representation() == kUnboxedInt32) && is_truncating()) {
converter->mark_truncating();
}
@@ -3280,7 +3293,7 @@
set_operation_cid(kObjectCid);
#ifdef DEBUG
ASSERT(cid_results[0] == kSmiCid);
- if (deopt_id == Thread::kNoDeoptId) {
+ if (deopt_id == DeoptId::kNone) {
// The entry for Smi can be special, but all other entries have
// to match in the no-deopt case.
for (intptr_t i = 4; i < cid_results.length(); i += 2) {
@@ -3306,7 +3319,7 @@
}
if (!CanDeoptimize()) {
- ASSERT(deopt_id() == Thread::kNoDeoptId);
+ ASSERT(deopt_id() == DeoptId::kNone);
return (data[data.length() - 1] == true_result)
? flow_graph->GetConstant(Bool::False())
: flow_graph->GetConstant(Bool::True());
@@ -3481,15 +3494,17 @@
// class-ids in that case.
for (int idx = 0; idx < length; idx++) {
int lower_limit_cid = (idx == 0) ? -1 : targets[idx - 1].cid_end;
- const Function& target = *targets.TargetAt(idx)->target;
+ auto target_info = targets.TargetAt(idx);
+ const Function& target = *target_info->target;
if (MethodRecognizer::PolymorphicTarget(target)) continue;
- for (int i = targets[idx].cid_start - 1; i > lower_limit_cid; i--) {
+ for (int i = target_info->cid_start - 1; i > lower_limit_cid; i--) {
bool class_is_abstract = false;
if (FlowGraphCompiler::LookupMethodFor(i, name, args_desc, &fn,
&class_is_abstract) &&
fn.raw() == target.raw()) {
if (!class_is_abstract) {
- targets[idx].cid_start = i;
+ target_info->cid_start = i;
+ target_info->exactness = StaticTypeExactnessState::NotTracking();
}
} else {
break;
@@ -3503,22 +3518,24 @@
for (int idx = 0; idx < length; idx++) {
int upper_limit_cid =
(idx == length - 1) ? max_cid : targets[idx + 1].cid_start;
- const Function& target = *targets.TargetAt(idx)->target;
+ auto target_info = targets.TargetAt(idx);
+ const Function& target = *target_info->target;
if (MethodRecognizer::PolymorphicTarget(target)) continue;
// The code below makes attempt to avoid spreading class-id range
// into a suffix that consists purely of abstract classes to
// shorten the range.
// However such spreading is beneficial when it allows to
// merge to consequtive ranges.
- intptr_t cid_end_including_abstract = targets[idx].cid_end;
- for (int i = targets[idx].cid_end + 1; i < upper_limit_cid; i++) {
+ intptr_t cid_end_including_abstract = target_info->cid_end;
+ for (int i = target_info->cid_end + 1; i < upper_limit_cid; i++) {
bool class_is_abstract = false;
if (FlowGraphCompiler::LookupMethodFor(i, name, args_desc, &fn,
&class_is_abstract) &&
fn.raw() == target.raw()) {
cid_end_including_abstract = i;
if (!class_is_abstract) {
- targets[idx].cid_end = i;
+ target_info->cid_end = i;
+ target_info->exactness = StaticTypeExactnessState::NotTracking();
}
} else {
break;
@@ -3528,11 +3545,12 @@
// Check if we have a suffix that consists of abstract classes
// and expand into it if that would allow us to merge this
// range with subsequent range.
- if ((cid_end_including_abstract > targets[idx].cid_end) &&
+ if ((cid_end_including_abstract > target_info->cid_end) &&
(idx < length - 1) &&
((cid_end_including_abstract + 1) == targets[idx + 1].cid_start) &&
(target.raw() == targets.TargetAt(idx + 1)->target->raw())) {
- targets[idx].cid_end = cid_end_including_abstract;
+ target_info->cid_end = cid_end_including_abstract;
+ target_info->exactness = StaticTypeExactnessState::NotTracking();
}
}
targets.MergeIntoRanges();
@@ -3552,6 +3570,7 @@
!MethodRecognizer::PolymorphicTarget(target)) {
TargetAt(dest)->cid_end = TargetAt(src)->cid_end;
TargetAt(dest)->count += TargetAt(src)->count;
+ TargetAt(dest)->exactness = StaticTypeExactnessState::NotTracking();
} else {
dest++;
if (src != dest) {
@@ -3603,16 +3622,26 @@
void TargetEntryInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
__ Bind(compiler->GetJumpLabel(this));
+ // In the AOT compiler we want to reduce code size, so generate no
+ // fall-through code in [FlowGraphCompiler::CompileGraph()].
+ // (As opposed to here where we don't check for the return value of
+ // [Intrinsify]).
+ if (!FLAG_precompiled_mode) {
#if defined(TARGET_ARCH_X64) || defined(TARGET_ARCH_ARM)
- if (compiler->flow_graph().IsEntryPoint(this)) {
- __ set_constant_pool_allowed(false);
- // TODO(#34162): Don't emit more code if 'TryIntrinsify' returns 'true'
- // (meaning the function was fully intrinsified).
- compiler->TryIntrinsify();
- compiler->EmitPrologue();
- ASSERT(__ constant_pool_allowed());
- }
+ if (compiler->flow_graph().IsEntryPoint(this)) {
+ // NOTE: Because in JIT X64/ARM mode the graph can have multiple
+ // entrypoints, so we generate several times the same intrinsification &
+ // frame setup. That's why we cannot rely on the constant pool being
+ // `false` when we come in here.
+ __ set_constant_pool_allowed(false);
+ // TODO(#34162): Don't emit more code if 'TryIntrinsify' returns 'true'
+ // (meaning the function was fully intrinsified).
+ compiler->TryIntrinsify();
+ compiler->EmitPrologue();
+ ASSERT(__ constant_pool_allowed());
+ }
#endif
+ }
if (!compiler->is_optimizing()) {
#if !defined(TARGET_ARCH_DBC)
@@ -3914,9 +3943,27 @@
(ic_data() == NULL)) {
const Array& arguments_descriptor =
Array::Handle(zone, GetArgumentsDescriptor());
+
+ AbstractType& static_receiver_type = AbstractType::Handle(zone);
+
+#if defined(TARGET_ARCH_X64)
+ // Enable static type exactness tracking for the callsite by setting
+ // static receiver type on the ICData.
+ if (checked_argument_count() == 1) {
+ if (static_receiver_type_ != nullptr &&
+ static_receiver_type_->HasResolvedTypeClass()) {
+ const Class& cls =
+ Class::Handle(zone, static_receiver_type_->type_class());
+ if (cls.IsGeneric() && !cls.IsFutureOrClass()) {
+ static_receiver_type = static_receiver_type_->raw();
+ }
+ }
+ }
+#endif
+
call_ic_data = compiler->GetOrAddInstanceCallICData(
deopt_id(), function_name(), arguments_descriptor,
- checked_argument_count());
+ checked_argument_count(), static_receiver_type);
} else {
call_ic_data = &ICData::ZoneHandle(zone, ic_data()->raw());
}
@@ -3940,7 +3987,7 @@
token_pos());
bool is_smi_two_args_op = false;
const StubEntry* stub_entry = TwoArgsSmiOpInlineCacheEntry(token_kind());
- if (stub_entry != NULL) {
+ if (stub_entry != nullptr) {
// We have a dedicated inline cache stub for this operation, add an
// an initial Smi/Smi check with count 0.
is_smi_two_args_op = call_ic_data->AddSmiSmiCheckForFastSmiStubs();
@@ -4513,7 +4560,7 @@
const ParsedFunction& parsed_function) {
Environment* env =
new (zone) Environment(definitions.length(), fixed_parameter_count,
- Thread::kNoDeoptId, parsed_function, NULL);
+ DeoptId::kNone, parsed_function, NULL);
for (intptr_t i = 0; i < definitions.length(); ++i) {
env->values_.Add(new (zone) Value(definitions[i]));
}
@@ -4617,7 +4664,7 @@
ComparisonInstr* StrictCompareInstr::CopyWithNewOperands(Value* new_left,
Value* new_right) {
return new StrictCompareInstr(token_pos(), kind(), new_left, new_right,
- needs_number_check(), Thread::kNoDeoptId);
+ needs_number_check(), DeoptId::kNone);
}
ComparisonInstr* TestSmiInstr::CopyWithNewOperands(Value* new_left,
@@ -4684,6 +4731,17 @@
return true;
}
+Instruction* CheckConditionInstr::Canonicalize(FlowGraph* graph) {
+ if (StrictCompareInstr* strict_compare = comparison()->AsStrictCompare()) {
+ if ((InputAt(0)->definition()->OriginalDefinition() ==
+ InputAt(1)->definition()->OriginalDefinition()) &&
+ strict_compare->kind() == Token::kEQ_STRICT) {
+ return nullptr;
+ }
+ }
+ return this;
+}
+
bool CheckArrayBoundInstr::IsFixedLengthArrayType(intptr_t cid) {
return LoadFieldInstr::IsFixedLengthArrayCid(cid);
}
diff --git a/runtime/vm/compiler/backend/il.h b/runtime/vm/compiler/backend/il.h
index d767ec2..46cfc60 100644
--- a/runtime/vm/compiler/backend/il.h
+++ b/runtime/vm/compiler/backend/il.h
@@ -8,6 +8,7 @@
#include "vm/allocation.h"
#include "vm/ast.h"
#include "vm/compiler/backend/locations.h"
+#include "vm/compiler/compiler_state.h"
#include "vm/compiler/method_recognizer.h"
#include "vm/flags.h"
#include "vm/growable_array.h"
@@ -553,6 +554,7 @@
M(CheckClassId, kNoGC) \
M(CheckSmi, kNoGC) \
M(CheckNull, kNoGC) \
+ M(CheckCondition, kNoGC) \
M(Constant, kNoGC) \
M(UnboxedConstant, kNoGC) \
M(CheckEitherNonSmi, kNoGC) \
@@ -674,14 +676,17 @@
TargetInfo(intptr_t cid_start_arg,
intptr_t cid_end_arg,
const Function* target_arg,
- intptr_t count_arg)
+ intptr_t count_arg,
+ StaticTypeExactnessState exactness)
: CidRange(cid_start_arg, cid_end_arg),
target(target_arg),
- count(count_arg) {
+ count(count_arg),
+ exactness(exactness) {
ASSERT(target->IsZoneHandle());
}
const Function* target;
intptr_t count;
+ StaticTypeExactnessState exactness;
};
// A set of class-ids, arranged in ranges. Used for the CheckClass
@@ -771,7 +776,7 @@
kNotSpeculative
};
- explicit Instruction(intptr_t deopt_id = Thread::kNoDeoptId)
+ explicit Instruction(intptr_t deopt_id = DeoptId::kNone)
: deopt_id_(deopt_id),
lifetime_position_(kNoPlaceId),
previous_(NULL),
@@ -955,7 +960,7 @@
// to.
virtual intptr_t DeoptimizationTarget() const {
UNREACHABLE();
- return Thread::kNoDeoptId;
+ return DeoptId::kNone;
}
// Returns a replacement for the instruction or NULL if the instruction can
@@ -1070,6 +1075,7 @@
private:
friend class BranchInstr; // For RawSetInputAt.
friend class IfThenElseInstr; // For RawSetInputAt.
+ friend class CheckConditionInstr; // For RawSetInputAt.
virtual void RawSetInputAt(intptr_t i, Value* value) = 0;
@@ -1131,7 +1137,7 @@
class TemplateInstruction
: public CSETrait<Instruction, PureInstruction>::Base {
public:
- explicit TemplateInstruction(intptr_t deopt_id = Thread::kNoDeoptId)
+ explicit TemplateInstruction(intptr_t deopt_id = DeoptId::kNone)
: CSETrait<Instruction, PureInstruction>::Base(deopt_id), inputs_() {}
virtual intptr_t InputCount() const { return N; }
@@ -1835,7 +1841,7 @@
// Abstract super-class of all instructions that define a value (Bind, Phi).
class Definition : public Instruction {
public:
- explicit Definition(intptr_t deopt_id = Thread::kNoDeoptId);
+ explicit Definition(intptr_t deopt_id = DeoptId::kNone);
// Overridden by definitions that have call counts.
virtual intptr_t CallCount() const {
@@ -2017,7 +2023,7 @@
template <typename Impure, typename Pure> class CSETrait = NoCSE>
class TemplateDefinition : public CSETrait<Definition, PureDefinition>::Base {
public:
- explicit TemplateDefinition(intptr_t deopt_id = Thread::kNoDeoptId)
+ explicit TemplateDefinition(intptr_t deopt_id = DeoptId::kNone)
: CSETrait<Definition, PureDefinition>::Base(deopt_id), inputs_() {}
virtual intptr_t InputCount() const { return N; }
@@ -2631,7 +2637,7 @@
protected:
ComparisonInstr(TokenPosition token_pos,
Token::Kind kind,
- intptr_t deopt_id = Thread::kNoDeoptId)
+ intptr_t deopt_id = DeoptId::kNone)
: Definition(deopt_id),
token_pos_(token_pos),
kind_(kind),
@@ -2663,7 +2669,7 @@
public:
TemplateComparison(TokenPosition token_pos,
Token::Kind kind,
- intptr_t deopt_id = Thread::kNoDeoptId)
+ intptr_t deopt_id = DeoptId::kNone)
: CSETrait<ComparisonInstr, PureComparison>::Base(token_pos,
kind,
deopt_id),
@@ -3329,6 +3335,11 @@
intptr_t checked_argument_count() const { return checked_argument_count_; }
const Function& interface_target() const { return interface_target_; }
+ void set_static_receiver_type(const AbstractType* receiver_type) {
+ ASSERT(receiver_type != nullptr && receiver_type->IsInstantiated());
+ static_receiver_type_ = receiver_type;
+ }
+
bool has_unique_selector() const { return has_unique_selector_; }
void set_has_unique_selector(bool b) { has_unique_selector_ = b; }
@@ -3387,6 +3398,8 @@
bool has_unique_selector_;
Code::EntryKind entry_kind_ = Code::EntryKind::kNormal;
+ const AbstractType* static_receiver_type_ = nullptr;
+
DISALLOW_COPY_AND_ASSIGN(InstanceCallInstr);
};
@@ -3458,6 +3471,8 @@
CompileType* result_type() const { return instance_call()->result_type(); }
intptr_t result_cid() const { return instance_call()->result_cid(); }
+ Code::EntryKind entry_kind() const { return instance_call()->entry_kind(); }
+
PRINT_OPERANDS_TO_SUPPORT
private:
@@ -3563,7 +3578,7 @@
virtual Definition* Canonicalize(FlowGraph* flow_graph);
virtual bool ComputeCanDeoptimize() const {
- return GetDeoptId() != Thread::kNoDeoptId;
+ return GetDeoptId() != DeoptId::kNone;
}
virtual Representation RequiredInputRepresentation(intptr_t idx) const {
@@ -3826,6 +3841,7 @@
if (call->result_type() != NULL) {
new_call->result_type_ = call->result_type();
}
+ new_call->set_entry_kind(call->entry_kind());
return new_call;
}
@@ -4075,7 +4091,7 @@
bool link_lazily,
TokenPosition position,
PushArgumentsArray* args)
- : TemplateDartCall(Thread::kNoDeoptId,
+ : TemplateDartCall(DeoptId::kNone,
0,
Array::null_array(),
args,
@@ -4465,7 +4481,7 @@
bool aligned() const { return alignment_ == kAlignedAccess; }
virtual bool ComputeCanDeoptimize() const {
- return GetDeoptId() != Thread::kNoDeoptId;
+ return GetDeoptId() != DeoptId::kNone;
}
virtual Representation representation() const;
@@ -4746,7 +4762,7 @@
// either reside in new space or be in the store buffer.
class AllocationInstr : public Definition {
public:
- explicit AllocationInstr(intptr_t deopt_id = Thread::kNoDeoptId)
+ explicit AllocationInstr(intptr_t deopt_id = DeoptId::kNone)
: Definition(deopt_id) {}
// TODO(sjindel): Update these conditions when the incremental write barrier
@@ -4762,7 +4778,7 @@
template <intptr_t N, typename ThrowsTrait>
class TemplateAllocation : public AllocationInstr {
public:
- explicit TemplateAllocation(intptr_t deopt_id = Thread::kNoDeoptId)
+ explicit TemplateAllocation(intptr_t deopt_id = DeoptId::kNone)
: AllocationInstr(deopt_id), inputs_() {}
virtual intptr_t InputCount() const { return N; }
@@ -5512,7 +5528,7 @@
virtual CompileType ComputeType() const;
virtual bool ComputeCanDeoptimize() const { return false; }
- virtual intptr_t DeoptimizationTarget() const { return Thread::kNoDeoptId; }
+ virtual intptr_t DeoptimizationTarget() const { return DeoptId::kNone; }
virtual Representation RequiredInputRepresentation(intptr_t idx) const {
ASSERT(idx == 0);
@@ -7387,6 +7403,52 @@
DISALLOW_COPY_AND_ASSIGN(GenericCheckBoundInstr);
};
+// Instruction evaluates the given comparison and deoptimizes if it evaluates
+// to false.
+class CheckConditionInstr : public Instruction {
+ public:
+ CheckConditionInstr(ComparisonInstr* comparison, intptr_t deopt_id)
+ : Instruction(deopt_id), comparison_(comparison) {
+ ASSERT(comparison->ArgumentCount() == 0);
+ ASSERT(comparison->env() == nullptr);
+ for (intptr_t i = comparison->InputCount() - 1; i >= 0; --i) {
+ comparison->InputAt(i)->set_instruction(this);
+ }
+ }
+
+ ComparisonInstr* comparison() const { return comparison_; }
+
+ DECLARE_INSTRUCTION(CheckCondition)
+
+ virtual bool ComputeCanDeoptimize() const { return true; }
+
+ virtual Instruction* Canonicalize(FlowGraph* flow_graph);
+
+ virtual bool AllowsCSE() const { return true; }
+ virtual bool HasUnknownSideEffects() const { return false; }
+
+ virtual bool AttributesEqual(Instruction* other) const {
+ return other->Cast<CheckConditionInstr>()->comparison()->AttributesEqual(
+ comparison());
+ }
+
+ virtual intptr_t InputCount() const { return comparison()->InputCount(); }
+ virtual Value* InputAt(intptr_t i) const { return comparison()->InputAt(i); }
+
+ virtual bool MayThrow() const { return false; }
+
+ PRINT_OPERANDS_TO_SUPPORT
+
+ private:
+ virtual void RawSetInputAt(intptr_t i, Value* value) {
+ comparison()->RawSetInputAt(i, value);
+ }
+
+ ComparisonInstr* comparison_;
+
+ DISALLOW_COPY_AND_ASSIGN(CheckConditionInstr);
+};
+
class UnboxedIntConverterInstr : public TemplateDefinition<1, NoThrow> {
public:
UnboxedIntConverterInstr(Representation from,
diff --git a/runtime/vm/compiler/backend/il_arm.cc b/runtime/vm/compiler/backend/il_arm.cc
index 44982d3..2d80341 100644
--- a/runtime/vm/compiler/backend/il_arm.cc
+++ b/runtime/vm/compiler/backend/il_arm.cc
@@ -138,8 +138,7 @@
__ Bind(&stack_ok);
#endif
ASSERT(__ constant_pool_allowed());
- __ LeaveDartFrame(); // Disallows constant pool use.
- __ Ret();
+ __ LeaveDartFrameAndReturn(); // Disallows constant pool use.
// This ReturnInstr may be emitted out of order by the optimizer. The next
// block may be a target expecting a properly set constant pool pointer.
__ set_constant_pool_allowed(true);
@@ -2009,15 +2008,8 @@
}
}
-LocationSummary* GuardFieldTypeInstr::MakeLocationSummary(Zone* zone,
- bool opt) const {
- UNREACHABLE();
- return nullptr;
-}
-
-void GuardFieldTypeInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
- UNREACHABLE();
-}
+DEFINE_UNIMPLEMENTED_INSTRUCTION(GuardFieldTypeInstr)
+DEFINE_UNIMPLEMENTED_INSTRUCTION(CheckConditionInstr)
class BoxAllocationSlowPath : public TemplateSlowPathCode<Instruction> {
public:
@@ -2965,7 +2957,7 @@
catch_handler_types_, needs_stacktrace());
// On lazy deoptimization we patch the optimized code here to enter the
// deoptimization stub.
- const intptr_t deopt_id = Thread::ToDeoptAfter(GetDeoptId());
+ const intptr_t deopt_id = DeoptId::ToDeoptAfter(GetDeoptId());
if (compiler->is_optimizing()) {
compiler->AddDeoptIndexAtCall(deopt_id);
} else {
diff --git a/runtime/vm/compiler/backend/il_arm64.cc b/runtime/vm/compiler/backend/il_arm64.cc
index 6fb2171..de564df 100644
--- a/runtime/vm/compiler/backend/il_arm64.cc
+++ b/runtime/vm/compiler/backend/il_arm64.cc
@@ -1567,15 +1567,8 @@
__ Bind(&done);
}
-LocationSummary* GuardFieldTypeInstr::MakeLocationSummary(Zone* zone,
- bool opt) const {
- UNREACHABLE();
- return nullptr;
-}
-
-void GuardFieldTypeInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
- UNREACHABLE();
-}
+DEFINE_UNIMPLEMENTED_INSTRUCTION(GuardFieldTypeInstr)
+DEFINE_UNIMPLEMENTED_INSTRUCTION(CheckConditionInstr)
LocationSummary* GuardFieldClassInstr::MakeLocationSummary(Zone* zone,
bool opt) const {
@@ -2659,7 +2652,7 @@
catch_handler_types_, needs_stacktrace());
// On lazy deoptimization we patch the optimized code here to enter the
// deoptimization stub.
- const intptr_t deopt_id = Thread::ToDeoptAfter(GetDeoptId());
+ const intptr_t deopt_id = DeoptId::ToDeoptAfter(GetDeoptId());
if (compiler->is_optimizing()) {
compiler->AddDeoptIndexAtCall(deopt_id);
} else {
diff --git a/runtime/vm/compiler/backend/il_dbc.cc b/runtime/vm/compiler/backend/il_dbc.cc
index ec66ff9..61f92fc 100644
--- a/runtime/vm/compiler/backend/il_dbc.cc
+++ b/runtime/vm/compiler/backend/il_dbc.cc
@@ -30,20 +30,21 @@
// List of instructions that are still unimplemented by DBC backend.
#define FOR_EACH_UNIMPLEMENTED_INSTRUCTION(M) \
- M(LoadCodeUnits) \
M(BinaryInt32Op) \
- M(Int32ToDouble) \
- M(DoubleToInteger) \
+ M(BinaryUint32Op) \
M(BoxInt64) \
- M(TruncDivMod) \
+ M(CheckCondition) \
+ M(DoubleToInteger) \
+ M(ExtractNthOutput) \
M(GuardFieldClass) \
M(GuardFieldLength) \
M(GuardFieldType) \
M(IfThenElse) \
- M(ExtractNthOutput) \
- M(BinaryUint32Op) \
+ M(Int32ToDouble) \
+ M(LoadCodeUnits) \
M(ShiftUint32Op) \
M(SpeculativeShiftUint32Op) \
+ M(TruncDivMod) \
M(UnaryUint32Op) \
M(UnboxedIntConverter)
@@ -990,7 +991,7 @@
__ object_pool_wrapper().FindImmediate(static_cast<uword>(argc_tag));
__ NativeCall(trampoline_kidx, target_kidx, argc_tag_kidx);
compiler->RecordSafepoint(locs());
- compiler->AddCurrentDescriptor(RawPcDescriptors::kOther, Thread::kNoDeoptId,
+ compiler->AddCurrentDescriptor(RawPcDescriptors::kOther, DeoptId::kNone,
token_pos());
}
@@ -1039,15 +1040,15 @@
}
__ PushConstant(cls());
__ AllocateT();
- compiler->AddCurrentDescriptor(RawPcDescriptors::kOther,
- Thread::kNoDeoptId, token_pos());
+ compiler->AddCurrentDescriptor(RawPcDescriptors::kOther, DeoptId::kNone,
+ token_pos());
compiler->RecordSafepoint(locs());
__ PopLocal(locs()->out(0).reg());
} else {
__ PushConstant(cls());
__ AllocateT();
- compiler->AddCurrentDescriptor(RawPcDescriptors::kOther,
- Thread::kNoDeoptId, token_pos());
+ compiler->AddCurrentDescriptor(RawPcDescriptors::kOther, DeoptId::kNone,
+ token_pos());
compiler->RecordSafepoint(locs());
}
} else if (compiler->is_optimizing()) {
@@ -1068,14 +1069,14 @@
}
const intptr_t kidx = __ AddConstant(cls());
__ Allocate(kidx);
- compiler->AddCurrentDescriptor(RawPcDescriptors::kOther, Thread::kNoDeoptId,
+ compiler->AddCurrentDescriptor(RawPcDescriptors::kOther, DeoptId::kNone,
token_pos());
compiler->RecordSafepoint(locs());
__ PopLocal(locs()->out(0).reg());
} else {
const intptr_t kidx = __ AddConstant(cls());
__ Allocate(kidx);
- compiler->AddCurrentDescriptor(RawPcDescriptors::kOther, Thread::kNoDeoptId,
+ compiler->AddCurrentDescriptor(RawPcDescriptors::kOther, DeoptId::kNone,
token_pos());
compiler->RecordSafepoint(locs());
}
@@ -1140,7 +1141,7 @@
ASSERT(!compiler->is_optimizing());
__ AllocateContext(num_context_variables());
compiler->RecordSafepoint(locs());
- compiler->AddCurrentDescriptor(RawPcDescriptors::kOther, Thread::kNoDeoptId,
+ compiler->AddCurrentDescriptor(RawPcDescriptors::kOther, DeoptId::kNone,
token_pos());
}
@@ -1153,7 +1154,7 @@
num_context_variables());
__ AllocateContext(num_context_variables());
compiler->RecordSafepoint(locs());
- compiler->AddCurrentDescriptor(RawPcDescriptors::kOther, Thread::kNoDeoptId,
+ compiler->AddCurrentDescriptor(RawPcDescriptors::kOther, DeoptId::kNone,
token_pos());
__ PopLocal(locs()->out(0).reg());
}
@@ -1167,7 +1168,7 @@
}
__ CloneContext();
compiler->RecordSafepoint(locs());
- compiler->AddCurrentDescriptor(RawPcDescriptors::kOther, Thread::kNoDeoptId,
+ compiler->AddCurrentDescriptor(RawPcDescriptors::kOther, DeoptId::kNone,
token_pos());
if (compiler->is_optimizing()) {
__ PopLocal(locs()->out(0).reg());
@@ -1182,7 +1183,7 @@
catch_handler_types_, needs_stacktrace());
// On lazy deoptimization we patch the optimized code here to enter the
// deoptimization stub.
- const intptr_t deopt_id = Thread::ToDeoptAfter(GetDeoptId());
+ const intptr_t deopt_id = DeoptId::ToDeoptAfter(GetDeoptId());
if (compiler->is_optimizing()) {
compiler->AddDeoptIndexAtCall(deopt_id);
} else {
@@ -1629,7 +1630,7 @@
}
const intptr_t kidx = __ AddConstant(compiler->double_class());
__ Allocate(kidx);
- compiler->AddCurrentDescriptor(RawPcDescriptors::kOther, Thread::kNoDeoptId,
+ compiler->AddCurrentDescriptor(RawPcDescriptors::kOther, DeoptId::kNone,
token_pos());
compiler->RecordSafepoint(locs());
__ PopLocal(out);
diff --git a/runtime/vm/compiler/backend/il_ia32.cc b/runtime/vm/compiler/backend/il_ia32.cc
index e6d79eb..18f3279 100644
--- a/runtime/vm/compiler/backend/il_ia32.cc
+++ b/runtime/vm/compiler/backend/il_ia32.cc
@@ -1442,15 +1442,8 @@
}
}
-LocationSummary* GuardFieldTypeInstr::MakeLocationSummary(Zone* zone,
- bool opt) const {
- UNREACHABLE();
- return nullptr;
-}
-
-void GuardFieldTypeInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
- UNREACHABLE();
-}
+DEFINE_UNIMPLEMENTED_INSTRUCTION(GuardFieldTypeInstr)
+DEFINE_UNIMPLEMENTED_INSTRUCTION(CheckConditionInstr)
LocationSummary* GuardFieldClassInstr::MakeLocationSummary(Zone* zone,
bool opt) const {
@@ -2541,7 +2534,7 @@
catch_handler_types_, needs_stacktrace());
// On lazy deoptimization we patch the optimized code here to enter the
// deoptimization stub.
- const intptr_t deopt_id = Thread::ToDeoptAfter(GetDeoptId());
+ const intptr_t deopt_id = DeoptId::ToDeoptAfter(GetDeoptId());
if (compiler->is_optimizing()) {
compiler->AddDeoptIndexAtCall(deopt_id);
} else {
diff --git a/runtime/vm/compiler/backend/il_printer.cc b/runtime/vm/compiler/backend/il_printer.cc
index 322e888..ed6af4d 100644
--- a/runtime/vm/compiler/backend/il_printer.cc
+++ b/runtime/vm/compiler/backend/il_printer.cc
@@ -149,6 +149,10 @@
String::Handle(dst_type.Name()).ToCString(), dst_name.ToCString());
}
+static const char* TypeToUserVisibleName(const AbstractType& type) {
+ return String::Handle(type.UserVisibleName()).ToCString();
+}
+
void CompileType::PrintTo(BufferFormatter* f) const {
const char* type_name = "?";
if ((cid_ != kIllegalCid) && (cid_ != kDynamicCid)) {
@@ -156,7 +160,7 @@
Class::Handle(Isolate::Current()->class_table()->At(cid_));
type_name = String::Handle(cls.ScrubbedName()).ToCString();
} else if (type_ != NULL && !type_->IsDynamicType()) {
- type_name = type_->ToCString();
+ type_name = TypeToUserVisibleName(*type_);
} else if (!is_nullable()) {
type_name = "!null";
}
@@ -174,7 +178,7 @@
static void PrintTargetsHelper(BufferFormatter* f,
const CallTargets& targets,
intptr_t num_checks_to_print) {
- f->Print(" IC[");
+ f->Print(" Targets[");
f->Print("%" Pd ": ", targets.length());
Function& target = Function::Handle();
if ((num_checks_to_print == FlowGraphPrinter::kPrintAll) ||
@@ -183,8 +187,9 @@
}
for (intptr_t i = 0; i < num_checks_to_print; i++) {
const CidRange& range = targets[i];
- const intptr_t count = targets.TargetAt(i)->count;
- target ^= targets.TargetAt(i)->target->raw();
+ const auto target_info = targets.TargetAt(i);
+ const intptr_t count = target_info->count;
+ target ^= target_info->target->raw();
if (i > 0) {
f->Print(" | ");
}
@@ -200,6 +205,10 @@
String::Handle(cls.Name()).ToCString());
f->Print(" cnt:%" Pd " trgt:'%s'", count, target.ToQualifiedCString());
}
+
+ if (target_info->exactness.IsTracking()) {
+ f->Print(" %s", target_info->exactness.ToCString());
+ }
}
if (num_checks_to_print < targets.length()) {
f->Print("...");
@@ -240,6 +249,10 @@
const ICData& ic_data,
intptr_t num_checks_to_print) {
f->Print(" IC[");
+ if (ic_data.IsTrackingExactness()) {
+ f->Print("(%s) ",
+ AbstractType::Handle(ic_data.StaticReceiverType()).ToCString());
+ }
f->Print("%" Pd ": ", ic_data.NumberOfChecks());
Function& target = Function::Handle();
if ((num_checks_to_print == FlowGraphPrinter::kPrintAll) ||
@@ -262,6 +275,9 @@
f->Print("%s", String::Handle(cls.Name()).ToCString());
}
f->Print(" cnt:%" Pd " trgt:'%s'", count, target.ToQualifiedCString());
+ if (ic_data.IsTrackingExactness()) {
+ f->Print(" %s", ic_data.GetExactnessAt(i).ToCString());
+ }
}
if (num_checks_to_print < ic_data.NumberOfChecks()) {
f->Print("...");
@@ -324,7 +340,7 @@
}
void Instruction::PrintTo(BufferFormatter* f) const {
- if (GetDeoptId() != Thread::kNoDeoptId) {
+ if (GetDeoptId() != DeoptId::kNone) {
f->Print("%s:%" Pd "(", DebugName(), GetDeoptId());
} else {
f->Print("%s(", DebugName());
@@ -343,7 +359,7 @@
void Definition::PrintTo(BufferFormatter* f) const {
PrintUse(f, *this);
if (HasSSATemp() || HasTemp()) f->Print(" <- ");
- if (GetDeoptId() != Thread::kNoDeoptId) {
+ if (GetDeoptId() != DeoptId::kNone) {
f->Print("%s:%" Pd "(", DebugName(), GetDeoptId());
} else {
f->Print("%s(", DebugName());
@@ -459,7 +475,8 @@
void AssertAssignableInstr::PrintOperandsTo(BufferFormatter* f) const {
value()->PrintTo(f);
- f->Print(", %s, '%s',", dst_type().ToCString(), dst_name().ToCString());
+ f->Print(", %s, '%s',", TypeToUserVisibleName(dst_type()),
+ dst_name().ToCString());
f->Print(" instantiator_type_args(");
instantiator_type_arguments()->PrintTo(f);
f->Print("), function_type_args(");
@@ -468,8 +485,8 @@
}
void AssertSubtypeInstr::PrintOperandsTo(BufferFormatter* f) const {
- f->Print("%s, %s, '%s',", sub_type().ToCString(), super_type().ToCString(),
- dst_name().ToCString());
+ f->Print("%s, %s, '%s',", TypeToUserVisibleName(sub_type()),
+ TypeToUserVisibleName(super_type()), dst_name().ToCString());
f->Print(" instantiator_type_args(");
instantiator_type_arguments()->PrintTo(f);
f->Print("), function_type_args(");
@@ -545,10 +562,10 @@
}
f->Print("] ");
if (CanDeoptimize()) {
- ASSERT(deopt_id() != Thread::kNoDeoptId);
+ ASSERT(deopt_id() != DeoptId::kNone);
f->Print("else deoptimize ");
} else {
- ASSERT(deopt_id() == Thread::kNoDeoptId);
+ ASSERT(deopt_id() == DeoptId::kNone);
f->Print("else %s ", cid_results()[length - 1] != 0 ? "false" : "true");
}
}
@@ -822,6 +839,10 @@
}
}
+void CheckConditionInstr::PrintOperandsTo(BufferFormatter* f) const {
+ comparison()->PrintOperandsTo(f);
+}
+
void InvokeMathCFunctionInstr::PrintOperandsTo(BufferFormatter* f) const {
f->Print("%s, ", MethodRecognizer::KindToCString(recognized_kind_));
Definition::PrintOperandsTo(f);
@@ -1054,7 +1075,7 @@
parallel_move()->PrintTo(f);
f->Print(" ");
}
- if (GetDeoptId() != Thread::kNoDeoptId) {
+ if (GetDeoptId() != DeoptId::kNone) {
f->Print("goto:%" Pd " B%" Pd "", GetDeoptId(), successor()->block_id());
} else {
f->Print("goto: B%" Pd "", successor()->block_id());
@@ -1062,7 +1083,7 @@
}
void IndirectGotoInstr::PrintTo(BufferFormatter* f) const {
- if (GetDeoptId() != Thread::kNoDeoptId) {
+ if (GetDeoptId() != DeoptId::kNone) {
f->Print("igoto:%" Pd "(", GetDeoptId());
} else {
f->Print("igoto:(");
diff --git a/runtime/vm/compiler/backend/il_test.cc b/runtime/vm/compiler/backend/il_test.cc
index 8fb8da0..bf20fb6 100644
--- a/runtime/vm/compiler/backend/il_test.cc
+++ b/runtime/vm/compiler/backend/il_test.cc
@@ -9,19 +9,19 @@
TEST_CASE(InstructionTests) {
TargetEntryInstr* target_instr = new TargetEntryInstr(
- 1, CatchClauseNode::kInvalidTryIndex, Thread::kNoDeoptId);
+ 1, CatchClauseNode::kInvalidTryIndex, DeoptId::kNone);
EXPECT(target_instr->IsBlockEntry());
EXPECT(!target_instr->IsDefinition());
SpecialParameterInstr* context = new SpecialParameterInstr(
- SpecialParameterInstr::kContext, Thread::kNoDeoptId, target_instr);
+ SpecialParameterInstr::kContext, DeoptId::kNone, target_instr);
EXPECT(context->IsDefinition());
EXPECT(!context->IsBlockEntry());
EXPECT(context->GetBlock() == target_instr);
}
TEST_CASE(OptimizationTests) {
- JoinEntryInstr* join = new JoinEntryInstr(
- 1, CatchClauseNode::kInvalidTryIndex, Thread::kNoDeoptId);
+ JoinEntryInstr* join =
+ new JoinEntryInstr(1, CatchClauseNode::kInvalidTryIndex, DeoptId::kNone);
Definition* def1 = new PhiInstr(join, 0);
Definition* def2 = new PhiInstr(join, 0);
diff --git a/runtime/vm/compiler/backend/il_x64.cc b/runtime/vm/compiler/backend/il_x64.cc
index b6fbb07..313be83 100644
--- a/runtime/vm/compiler/backend/il_x64.cc
+++ b/runtime/vm/compiler/backend/il_x64.cc
@@ -2657,7 +2657,7 @@
catch_handler_types_, needs_stacktrace());
// On lazy deoptimization we patch the optimized code here to enter the
// deoptimization stub.
- const intptr_t deopt_id = Thread::ToDeoptAfter(GetDeoptId());
+ const intptr_t deopt_id = DeoptId::ToDeoptAfter(GetDeoptId());
if (compiler->is_optimizing()) {
compiler->AddDeoptIndexAtCall(deopt_id);
} else {
@@ -5220,6 +5220,24 @@
}
}
+LocationSummary* CheckConditionInstr::MakeLocationSummary(Zone* zone,
+ bool opt) const {
+ comparison()->InitializeLocationSummary(zone, opt);
+ comparison()->locs()->set_out(0, Location::NoLocation());
+ return comparison()->locs();
+}
+
+void CheckConditionInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
+ Label if_true;
+ Label* if_false = compiler->AddDeoptStub(deopt_id(), ICData::kDeoptUnknown);
+ BranchLabels labels = {&if_true, if_false, &if_true};
+ Condition true_condition = comparison()->EmitComparisonCode(compiler, labels);
+ if (true_condition != INVALID_CONDITION) {
+ __ j(NegateCondition(true_condition), if_false);
+ }
+ __ Bind(&if_true);
+}
+
LocationSummary* CheckArrayBoundInstr::MakeLocationSummary(Zone* zone,
bool opt) const {
const intptr_t kNumInputs = 2;
diff --git a/runtime/vm/compiler/backend/inliner.cc b/runtime/vm/compiler/backend/inliner.cc
index 6988601..ccacbd2 100644
--- a/runtime/vm/compiler/backend/inliner.cc
+++ b/runtime/vm/compiler/backend/inliner.cc
@@ -117,11 +117,6 @@
} \
} while (false)
-// Is compilation and isolate in strong mode?
-static bool CanUseStrongModeTypes(FlowGraph* flow_graph) {
- return FLAG_use_strong_mode_types && flow_graph->isolate()->strong();
-}
-
// Test and obtain Smi value.
static bool IsSmiValue(Value* val, intptr_t* int_val) {
if (val->BindsToConstant() && val->BoundConstant().IsSmi()) {
@@ -762,13 +757,15 @@
while (collected_call_sites_->HasCalls()) {
TRACE_INLINING(
THR_Print(" Depth %" Pd " ----------\n", inlining_depth_));
+ if (FLAG_print_inlining_tree) {
+ THR_Print("**Depth % " Pd " calls to inline %" Pd " (threshold % " Pd
+ ")\n",
+ inlining_depth_, collected_call_sites_->NumCalls(),
+ static_cast<intptr_t>(FLAG_max_inlined_per_depth));
+ }
if (collected_call_sites_->NumCalls() > FLAG_max_inlined_per_depth) {
break;
}
- if (FLAG_print_inlining_tree) {
- THR_Print("**Depth % " Pd " calls to inline %" Pd "\n", inlining_depth_,
- collected_call_sites_->NumCalls());
- }
// Swap collected and inlining arrays and clear the new collecting array.
call_sites_temp = collected_call_sites_;
collected_call_sites_ = inlining_call_sites_;
@@ -908,11 +905,11 @@
return false;
}
- // Save and clear deopt id.
- const intptr_t prev_deopt_id = thread()->deopt_id();
- thread()->set_deopt_id(0);
Error& error = Error::Handle();
{
+ // Save and clear deopt id.
+ DeoptIdScope deopt_id_scope(thread(), 0);
+
// Install bailout jump.
LongJumpScope jump;
if (setjmp(*jump.Set()) == 0) {
@@ -928,7 +925,7 @@
// Loading occured while parsing. We need to abort here because
// state changed while compiling.
Compiler::AbortBackgroundCompilation(
- Thread::kNoDeoptId, "Loading occured while parsing in inliner");
+ DeoptId::kNone, "Loading occured while parsing in inliner");
}
}
@@ -939,7 +936,7 @@
function.RestoreICDataMap(ic_data_array, clone_ic_data);
if (Compiler::IsBackgroundCompilation() &&
(function.ic_data_array() == Array::null())) {
- Compiler::AbortBackgroundCompilation(Thread::kNoDeoptId,
+ Compiler::AbortBackgroundCompilation(DeoptId::kNone,
"ICData cleared while inlining");
}
@@ -1080,6 +1077,14 @@
DEBUG_ASSERT(callee_graph->VerifyUseLists());
}
+ if (FLAG_support_il_printer && trace_inlining() &&
+ (FLAG_print_flow_graph || FLAG_print_flow_graph_optimized)) {
+ THR_Print("Callee graph for inlining %s (unoptimized)\n",
+ function.ToFullyQualifiedCString());
+ FlowGraphPrinter printer(*callee_graph);
+ printer.PrintBlocks();
+ }
+
{
CSTAT_TIMER_SCOPE(thread(), graphinliner_opt_timer);
// TODO(fschneider): Improve suppression of speculative inlining.
@@ -1128,11 +1133,6 @@
callee_graph->TryOptimizePatterns();
DEBUG_ASSERT(callee_graph->VerifyUseLists());
- // This optimization must be performed before inlining to ensure
- // that the receiver of the function is detected (since it will just
- // be some regular variable after inlining).
- MarkCallsOnReceiverUnchecked(callee_graph);
-
callee_graph->Canonicalize();
}
}
@@ -1167,7 +1167,6 @@
(size > FLAG_inlining_constant_arguments_max_size_threshold)) {
function.set_is_inlinable(false);
}
- thread()->set_deopt_id(prev_deopt_id);
TRACE_INLINING(
THR_Print(" Bailout: heuristics (%s) with "
"code size: %" Pd ", "
@@ -1198,7 +1197,6 @@
if (is_recursive_call) {
inlined_recursive_call_ = true;
}
- thread()->set_deopt_id(prev_deopt_id);
call_data->callee_graph = callee_graph;
call_data->parameter_stubs = param_stubs;
@@ -1238,7 +1236,6 @@
if (error.raw() == Object::background_compilation_error().raw()) {
// Fall through to exit the compilation, and retry it later.
} else {
- thread()->set_deopt_id(prev_deopt_id);
TRACE_INLINING(
THR_Print(" Bailout: %s\n", error.ToErrorCString()));
PRINT_INLINING_TREE("Bailout", &call_data->caller, &function, call);
@@ -1670,9 +1667,9 @@
}
// Create a new target with the join as unconditional successor.
TargetEntryInstr* new_target = new TargetEntryInstr(
- AllocateBlockId(), old_target->try_index(), Thread::kNoDeoptId);
+ AllocateBlockId(), old_target->try_index(), DeoptId::kNone);
new_target->InheritDeoptTarget(zone(), new_join);
- GotoInstr* new_goto = new (Z) GotoInstr(new_join, Thread::kNoDeoptId);
+ GotoInstr* new_goto = new (Z) GotoInstr(new_join, DeoptId::kNone);
new_goto->InheritDeoptTarget(zone(), new_join);
new_target->LinkTo(new_goto);
new_target->set_last_instruction(new_goto);
@@ -1771,7 +1768,7 @@
new (Z) InlineExitCollector(owner_->caller_graph(), call_);
ReturnInstr* result = new (Z)
ReturnInstr(call_->instance_call()->token_pos(),
- new (Z) Value(last->AsDefinition()), Thread::kNoDeoptId);
+ new (Z) Value(last->AsDefinition()), DeoptId::kNone);
owner_->caller_graph()->AppendTo(
last, result,
call_->env(), // Return can become deoptimization target.
@@ -1801,7 +1798,7 @@
// Start with a fresh target entry.
TargetEntryInstr* entry = new (Z) TargetEntryInstr(
- AllocateBlockId(), try_idx, Thread::Current()->GetNextDeoptId());
+ AllocateBlockId(), try_idx, CompilerState::Current().GetNextDeoptId());
entry->InheritDeoptTarget(zone(), call_);
// This function uses a cursor (a pointer to the 'current' instruction) to
@@ -1866,7 +1863,7 @@
// the join.
JoinEntryInstr* join = callee_entry->AsJoinEntry();
ASSERT(join->dominator() != NULL);
- GotoInstr* goto_join = new GotoInstr(join, Thread::kNoDeoptId);
+ GotoInstr* goto_join = new GotoInstr(join, DeoptId::kNone);
goto_join->InheritDeoptTarget(zone(), join);
cursor->LinkTo(goto_join);
current_block->set_last_instruction(goto_join);
@@ -1899,13 +1896,13 @@
new Value(load_cid), new Value(cid_constant_end), kSmiCid,
call_->deopt_id());
BranchInstr* branch_top = upper_limit_branch =
- new BranchInstr(compare_top, Thread::kNoDeoptId);
+ new BranchInstr(compare_top, DeoptId::kNone);
branch_top->InheritDeoptTarget(zone(), call_);
cursor = AppendInstruction(cursor, branch_top);
current_block->set_last_instruction(branch_top);
- TargetEntryInstr* below_target = new TargetEntryInstr(
- AllocateBlockId(), try_idx, Thread::kNoDeoptId);
+ TargetEntryInstr* below_target =
+ new TargetEntryInstr(AllocateBlockId(), try_idx, DeoptId::kNone);
below_target->InheritDeoptTarget(zone(), call_);
current_block->AddDominatedBlock(below_target);
cursor = current_block = below_target;
@@ -1915,13 +1912,13 @@
call_->instance_call()->token_pos(), Token::kGTE,
new Value(load_cid), new Value(cid_constant), kSmiCid,
call_->deopt_id());
- branch = new BranchInstr(compare_bottom, Thread::kNoDeoptId);
+ branch = new BranchInstr(compare_bottom, DeoptId::kNone);
} else {
StrictCompareInstr* compare = new StrictCompareInstr(
call_->instance_call()->token_pos(), Token::kEQ_STRICT,
new Value(load_cid), new Value(cid_constant),
- /* number_check = */ false, Thread::kNoDeoptId);
- branch = new BranchInstr(compare, Thread::kNoDeoptId);
+ /* number_check = */ false, DeoptId::kNone);
+ branch = new BranchInstr(compare, DeoptId::kNone);
}
branch->InheritDeoptTarget(zone(), call_);
@@ -1952,10 +1949,10 @@
JoinEntryInstr* join = callee_entry->AsJoinEntry();
ASSERT(join != NULL);
ASSERT(join->dominator() != NULL);
- true_target = new TargetEntryInstr(AllocateBlockId(), try_idx,
- Thread::kNoDeoptId);
+ true_target =
+ new TargetEntryInstr(AllocateBlockId(), try_idx, DeoptId::kNone);
true_target->InheritDeoptTarget(zone(), join);
- GotoInstr* goto_join = new GotoInstr(join, Thread::kNoDeoptId);
+ GotoInstr* goto_join = new GotoInstr(join, DeoptId::kNone);
goto_join->InheritDeoptTarget(zone(), join);
true_target->LinkTo(goto_join);
true_target->set_last_instruction(goto_join);
@@ -1967,7 +1964,7 @@
// fall-through code below for non-inlined variants.
TargetEntryInstr* false_target =
- new TargetEntryInstr(AllocateBlockId(), try_idx, Thread::kNoDeoptId);
+ new TargetEntryInstr(AllocateBlockId(), try_idx, DeoptId::kNone);
false_target->InheritDeoptTarget(zone(), call_);
*branch->false_successor_address() = false_target;
cid_test_entry_block->AddDominatedBlock(false_target);
@@ -1978,14 +1975,14 @@
// If we tested against a range of Cids there are two different tests
// that can go to the no-cid-match target.
JoinEntryInstr* join =
- new JoinEntryInstr(AllocateBlockId(), try_idx, Thread::kNoDeoptId);
- TargetEntryInstr* false_target2 = new TargetEntryInstr(
- AllocateBlockId(), try_idx, Thread::kNoDeoptId);
+ new JoinEntryInstr(AllocateBlockId(), try_idx, DeoptId::kNone);
+ TargetEntryInstr* false_target2 =
+ new TargetEntryInstr(AllocateBlockId(), try_idx, DeoptId::kNone);
*upper_limit_branch->false_successor_address() = false_target2;
cid_test_entry_block->AddDominatedBlock(false_target2);
cid_test_entry_block->AddDominatedBlock(join);
- GotoInstr* goto_1 = new GotoInstr(join, Thread::kNoDeoptId);
- GotoInstr* goto_2 = new GotoInstr(join, Thread::kNoDeoptId);
+ GotoInstr* goto_1 = new GotoInstr(join, DeoptId::kNone);
+ GotoInstr* goto_2 = new GotoInstr(join, DeoptId::kNone);
false_target->LinkTo(goto_1);
false_target2->LinkTo(goto_2);
false_target->set_last_instruction(goto_1);
@@ -2020,7 +2017,7 @@
fallback_call->set_total_call_count(call_->CallCount());
ReturnInstr* fallback_return =
new ReturnInstr(call_->instance_call()->token_pos(),
- new Value(fallback_call), Thread::kNoDeoptId);
+ new Value(fallback_call), DeoptId::kNone);
fallback_return->InheritDeoptTargetAfter(owner_->caller_graph(), call_,
fallback_call);
AppendInstruction(AppendInstruction(cursor, fallback_call),
@@ -2361,20 +2358,20 @@
Definition* array = receiver;
Definition* index = call->ArgumentAt(1);
- *entry = new (Z)
- TargetEntryInstr(flow_graph->allocate_block_id(),
- call->GetBlock()->try_index(), Thread::kNoDeoptId);
+ *entry =
+ new (Z) TargetEntryInstr(flow_graph->allocate_block_id(),
+ call->GetBlock()->try_index(), DeoptId::kNone);
(*entry)->InheritDeoptTarget(Z, call);
Instruction* cursor = *entry;
array_cid = PrepareInlineIndexedOp(flow_graph, call, array_cid, &array, index,
&cursor, can_speculate);
- intptr_t deopt_id = Thread::kNoDeoptId;
+ intptr_t deopt_id = DeoptId::kNone;
if ((array_cid == kTypedDataInt32ArrayCid) ||
(array_cid == kTypedDataUint32ArrayCid)) {
// Deoptimization may be needed if result does not always fit in a Smi.
- deopt_id = (kSmiBits >= 32) ? Thread::kNoDeoptId : call->deopt_id();
+ deopt_id = (kSmiBits >= 32) ? DeoptId::kNone : call->deopt_id();
}
// Array load and return.
@@ -2383,14 +2380,14 @@
LoadIndexedInstr(new (Z) Value(array), new (Z) Value(index), index_scale,
array_cid, kAlignedAccess, deopt_id, call->token_pos());
*last = load;
- cursor = flow_graph->AppendTo(
- cursor, load, deopt_id != Thread::kNoDeoptId ? call->env() : NULL,
- FlowGraph::kValue);
+ cursor = flow_graph->AppendTo(cursor, load,
+ deopt_id != DeoptId::kNone ? call->env() : NULL,
+ FlowGraph::kValue);
if (array_cid == kTypedDataFloat32ArrayCid) {
*last = new (Z) FloatToDoubleInstr(new (Z) Value(load), deopt_id);
flow_graph->AppendTo(cursor, *last,
- deopt_id != Thread::kNoDeoptId ? call->env() : NULL,
+ deopt_id != DeoptId::kNone ? call->env() : NULL,
FlowGraph::kValue);
}
return true;
@@ -2403,6 +2400,7 @@
Definition* receiver,
TokenPosition token_pos,
const Cids* value_check,
+ FlowGraphInliner::ExactnessInfo* exactness,
TargetEntryInstr** entry,
Instruction** last) {
intptr_t array_cid = MethodRecognizer::MethodKindToReceiverCid(kind);
@@ -2411,9 +2409,9 @@
Definition* index = call->ArgumentAt(1);
Definition* stored_value = call->ArgumentAt(2);
- *entry = new (Z)
- TargetEntryInstr(flow_graph->allocate_block_id(),
- call->GetBlock()->try_index(), Thread::kNoDeoptId);
+ *entry =
+ new (Z) TargetEntryInstr(flow_graph->allocate_block_id(),
+ call->GetBlock()->try_index(), DeoptId::kNone);
(*entry)->InheritDeoptTarget(Z, call);
Instruction* cursor = *entry;
if (flow_graph->isolate()->argument_type_checks() &&
@@ -2476,12 +2474,18 @@
// TODO(fschneider): Add support for other array types.
UNREACHABLE();
}
- AssertAssignableInstr* assert_value = new (Z) AssertAssignableInstr(
- token_pos, new (Z) Value(stored_value), new (Z) Value(type_args),
- new (Z) Value(flow_graph->constant_null()), // Function type arguments.
- value_type, Symbols::Value(), call->deopt_id());
- cursor = flow_graph->AppendTo(cursor, assert_value, call->env(),
- FlowGraph::kValue);
+
+ if (exactness != nullptr && exactness->is_exact) {
+ exactness->emit_exactness_guard = true;
+ } else {
+ AssertAssignableInstr* assert_value = new (Z) AssertAssignableInstr(
+ token_pos, new (Z) Value(stored_value), new (Z) Value(type_args),
+ new (Z)
+ Value(flow_graph->constant_null()), // Function type arguments.
+ value_type, Symbols::Value(), call->deopt_id());
+ cursor = flow_graph->AppendTo(cursor, assert_value, call->env(),
+ FlowGraph::kValue);
+ }
}
array_cid = PrepareInlineIndexedOp(flow_graph, call, array_cid, &array, index,
@@ -2548,9 +2552,9 @@
Definition* left = receiver;
Definition* right = call->ArgumentAt(1);
- *entry = new (Z)
- TargetEntryInstr(flow_graph->allocate_block_id(),
- call->GetBlock()->try_index(), Thread::kNoDeoptId);
+ *entry =
+ new (Z) TargetEntryInstr(flow_graph->allocate_block_id(),
+ call->GetBlock()->try_index(), DeoptId::kNone);
(*entry)->InheritDeoptTarget(Z, call);
// Arguments are checked. No need for class check.
BinaryDoubleOpInstr* double_bin_op = new (Z)
@@ -2572,9 +2576,9 @@
return false;
}
- *entry = new (Z)
- TargetEntryInstr(flow_graph->allocate_block_id(),
- call->GetBlock()->try_index(), Thread::kNoDeoptId);
+ *entry =
+ new (Z) TargetEntryInstr(flow_graph->allocate_block_id(),
+ call->GetBlock()->try_index(), DeoptId::kNone);
(*entry)->InheritDeoptTarget(Z, call);
// Arguments are checked. No need for class check.
@@ -2594,9 +2598,9 @@
Definition* left = receiver;
Definition* right = call->ArgumentAt(1);
- *entry = new (Z)
- TargetEntryInstr(flow_graph->allocate_block_id(),
- call->GetBlock()->try_index(), Thread::kNoDeoptId);
+ *entry =
+ new (Z) TargetEntryInstr(flow_graph->allocate_block_id(),
+ call->GetBlock()->try_index(), DeoptId::kNone);
(*entry)->InheritDeoptTarget(Z, call);
// Right arguments is known to be smi: other._bitAndFromSmi(this);
BinarySmiOpInstr* smi_op =
@@ -2618,9 +2622,9 @@
Definition* array = receiver;
Definition* value = call->ArgumentAt(1);
- *entry = new (Z)
- TargetEntryInstr(flow_graph->allocate_block_id(),
- call->GetBlock()->try_index(), Thread::kNoDeoptId);
+ *entry =
+ new (Z) TargetEntryInstr(flow_graph->allocate_block_id(),
+ call->GetBlock()->try_index(), DeoptId::kNone);
(*entry)->InheritDeoptTarget(Z, call);
// This is an internal method, no need to check argument types.
@@ -2751,8 +2755,8 @@
intptr_t view_cid) {
return new (Z) LoadIndexedInstr(new (Z) Value(array), new (Z) Value(index),
1, // Index scale
- view_cid, kUnalignedAccess,
- Thread::kNoDeoptId, call->token_pos());
+ view_cid, kUnalignedAccess, DeoptId::kNone,
+ call->token_pos());
}
static bool InlineByteArrayBaseLoad(FlowGraph* flow_graph,
@@ -2770,23 +2774,24 @@
// For Dart2, both issues are resolved in the inlined code.
if (array_cid == kDynamicCid) {
ASSERT(call->IsStaticCall());
- if (!CanUseStrongModeTypes(flow_graph)) {
+ if (!flow_graph->isolate()->can_use_strong_mode_types()) {
return false;
}
}
Definition* array = receiver;
Definition* index = call->ArgumentAt(1);
- *entry = new (Z)
- TargetEntryInstr(flow_graph->allocate_block_id(),
- call->GetBlock()->try_index(), Thread::kNoDeoptId);
+ *entry =
+ new (Z) TargetEntryInstr(flow_graph->allocate_block_id(),
+ call->GetBlock()->try_index(), DeoptId::kNone);
(*entry)->InheritDeoptTarget(Z, call);
Instruction* cursor = *entry;
// All getters that go through InlineByteArrayBaseLoad() have explicit
// bounds checks in all their clients in the library, so we can omit yet
// another inlined bounds check when compiling for Dart2 (resolves (A)).
- const bool needs_bounds_check = !CanUseStrongModeTypes(flow_graph);
+ const bool needs_bounds_check =
+ !flow_graph->isolate()->can_use_strong_mode_types();
if (needs_bounds_check) {
PrepareInlineTypedArrayBoundsCheck(flow_graph, call, array_cid, view_cid,
array, index, &cursor);
@@ -2810,13 +2815,13 @@
ASSERT(block_external->next() == array);
flow_graph->InsertAfter(
block_external->next(), load1,
- call->deopt_id() != Thread::kNoDeoptId ? call->env() : nullptr,
+ call->deopt_id() != DeoptId::kNone ? call->env() : nullptr,
FlowGraph::kValue);
LoadIndexedInstr* load2 =
NewLoad(flow_graph, call, receiver, index, view_cid);
flow_graph->InsertAfter(
block_internal, load2,
- call->deopt_id() != Thread::kNoDeoptId ? call->env() : nullptr,
+ call->deopt_id() != DeoptId::kNone ? call->env() : nullptr,
FlowGraph::kValue);
// Construct phi of external and internal load.
*last = flow_graph->AddPhi(cursor->AsJoinEntry(), load1, load2);
@@ -2826,14 +2831,14 @@
LoadIndexedInstr* load = NewLoad(flow_graph, call, array, index, view_cid);
flow_graph->AppendTo(
cursor, load,
- call->deopt_id() != Thread::kNoDeoptId ? call->env() : nullptr,
+ call->deopt_id() != DeoptId::kNone ? call->env() : nullptr,
FlowGraph::kValue);
cursor = *last = load;
}
if (view_cid == kTypedDataFloat32ArrayCid) {
*last = new (Z) FloatToDoubleInstr(new (Z) Value((*last)->AsDefinition()),
- Thread::kNoDeoptId);
+ DeoptId::kNone);
flow_graph->AppendTo(cursor, *last, nullptr, FlowGraph::kValue);
}
return true;
@@ -2867,23 +2872,24 @@
// For Dart2, both issues are resolved in the inlined code.
if (array_cid == kDynamicCid) {
ASSERT(call->IsStaticCall());
- if (!CanUseStrongModeTypes(flow_graph)) {
+ if (!flow_graph->isolate()->can_use_strong_mode_types()) {
return false;
}
}
Definition* array = receiver;
Definition* index = call->ArgumentAt(1);
- *entry = new (Z)
- TargetEntryInstr(flow_graph->allocate_block_id(),
- call->GetBlock()->try_index(), Thread::kNoDeoptId);
+ *entry =
+ new (Z) TargetEntryInstr(flow_graph->allocate_block_id(),
+ call->GetBlock()->try_index(), DeoptId::kNone);
(*entry)->InheritDeoptTarget(Z, call);
Instruction* cursor = *entry;
// All setters that go through InlineByteArrayBaseLoad() have explicit
// bounds checks in all their clients in the library, so we can omit yet
// another inlined bounds check when compiling for Dart2 (resolves (A)).
- const bool needs_bounds_check = !CanUseStrongModeTypes(flow_graph);
+ const bool needs_bounds_check =
+ !flow_graph->isolate()->can_use_strong_mode_types();
if (needs_bounds_check) {
PrepareInlineTypedArrayBoundsCheck(flow_graph, call, array_cid, view_cid,
array, index, &cursor);
@@ -2915,7 +2921,8 @@
case kTypedDataFloat64ArrayCid: {
// Check that value is always double. In AOT Dart2, we use
// an explicit null check and non-speculative unboxing.
- if (FLAG_precompiled_mode && CanUseStrongModeTypes(flow_graph)) {
+ if (FLAG_precompiled_mode &&
+ flow_graph->isolate()->can_use_strong_mode_types()) {
needs_null_check = true;
} else {
value_check = Cids::CreateMonomorphic(Z, kDoubleCid);
@@ -2937,8 +2944,8 @@
// StoreIndexedInstr takes unboxed int64, so value is
// checked when unboxing. In AOT Dart2, we use an
// explicit null check and non-speculative unboxing.
- needs_null_check =
- FLAG_precompiled_mode && CanUseStrongModeTypes(flow_graph);
+ needs_null_check = FLAG_precompiled_mode &&
+ flow_graph->isolate()->can_use_strong_mode_types();
break;
default:
// Array cids are already checked in the caller.
@@ -3022,12 +3029,12 @@
flow_graph->InsertAfter(
block_external->next(),
NewStore(flow_graph, call, array, index, stored_value, view_cid),
- call->deopt_id() != Thread::kNoDeoptId ? call->env() : nullptr,
+ call->deopt_id() != DeoptId::kNone ? call->env() : nullptr,
FlowGraph::kEffect);
flow_graph->InsertAfter(
block_internal,
NewStore(flow_graph, call, receiver, index, stored_value, view_cid),
- call->deopt_id() != Thread::kNoDeoptId ? call->env() : nullptr,
+ call->deopt_id() != DeoptId::kNone ? call->env() : nullptr,
FlowGraph::kEffect);
*last = cursor;
} else {
@@ -3037,7 +3044,7 @@
NewStore(flow_graph, call, array, index, stored_value, view_cid);
flow_graph->AppendTo(
cursor, store,
- call->deopt_id() != Thread::kNoDeoptId ? call->env() : nullptr,
+ call->deopt_id() != DeoptId::kNone ? call->env() : nullptr,
FlowGraph::kEffect);
*last = store;
}
@@ -3076,7 +3083,7 @@
LoadIndexedInstr* load_indexed = new (Z) LoadIndexedInstr(
new (Z) Value(str), new (Z) Value(index), Instance::ElementSizeFor(cid),
- cid, kAlignedAccess, Thread::kNoDeoptId, call->token_pos());
+ cid, kAlignedAccess, DeoptId::kNone, call->token_pos());
cursor = flow_graph->AppendTo(cursor, load_indexed, NULL, FlowGraph::kValue);
ASSERT(cursor == load_indexed);
@@ -3095,9 +3102,9 @@
Definition* str = receiver;
Definition* index = call->ArgumentAt(1);
- *entry = new (Z)
- TargetEntryInstr(flow_graph->allocate_block_id(),
- call->GetBlock()->try_index(), Thread::kNoDeoptId);
+ *entry =
+ new (Z) TargetEntryInstr(flow_graph->allocate_block_id(),
+ call->GetBlock()->try_index(), DeoptId::kNone);
(*entry)->InheritDeoptTarget(Z, call);
*last = PrepareInlineStringIndexOp(flow_graph, call, cid, str, index, *entry);
@@ -3127,9 +3134,9 @@
Definition* str = receiver;
Definition* index = call->ArgumentAt(1);
- *entry = new (Z)
- TargetEntryInstr(flow_graph->allocate_block_id(),
- call->GetBlock()->try_index(), Thread::kNoDeoptId);
+ *entry =
+ new (Z) TargetEntryInstr(flow_graph->allocate_block_id(),
+ call->GetBlock()->try_index(), DeoptId::kNone);
(*entry)->InheritDeoptTarget(Z, call);
*last = PrepareInlineStringIndexOp(flow_graph, call, cid, str, index, *entry);
@@ -3149,10 +3156,12 @@
const intptr_t receiver_cid = class_ids[0];
TargetEntryInstr* entry = nullptr;
Instruction* last = nullptr;
+ auto exactness = call->ic_data()->GetExactnessAt(0);
+ ExactnessInfo exactness_info{exactness.IsExact(), false};
if (FlowGraphInliner::TryInlineRecognizedMethod(
flow_graph, receiver_cid, target, call,
call->Receiver()->definition(), call->token_pos(), call->ic_data(),
- &entry, &last, policy)) {
+ &entry, &last, policy, &exactness_info)) {
// Determine if inlining instance methods needs a check.
FlowGraph::ToCheck check = FlowGraph::ToCheck::kNoCheck;
if (MethodRecognizer::PolymorphicTarget(target)) {
@@ -3184,6 +3193,10 @@
break;
}
+ if (exactness_info.emit_exactness_guard && exactness.IsTriviallyExact()) {
+ flow_graph->AddExactnessGuard(call, receiver_cid);
+ }
+
// Remove the original push arguments.
for (intptr_t i = 0; i < call->ArgumentCount(); ++i) {
PushArgumentInstr* push = call->PushArgumentAt(i);
@@ -3305,9 +3318,9 @@
if (!ShouldInlineSimd()) {
return false;
}
- *entry = new (Z)
- TargetEntryInstr(flow_graph->allocate_block_id(),
- call->GetBlock()->try_index(), Thread::kNoDeoptId);
+ *entry =
+ new (Z) TargetEntryInstr(flow_graph->allocate_block_id(),
+ call->GetBlock()->try_index(), DeoptId::kNone);
(*entry)->InheritDeoptTarget(Z, call);
Instruction* cursor = *entry;
switch (kind) {
@@ -3360,10 +3373,9 @@
*last = SimdOpInstr::CreateFromCall(Z, kind, receiver, call);
break;
}
- flow_graph->AppendTo(
- cursor, *last,
- call->deopt_id() != Thread::kNoDeoptId ? call->env() : NULL,
- FlowGraph::kValue);
+ flow_graph->AppendTo(cursor, *last,
+ call->deopt_id() != DeoptId::kNone ? call->env() : NULL,
+ FlowGraph::kValue);
return true;
}
@@ -3375,9 +3387,9 @@
if (!CanUnboxDouble()) {
return false;
}
- *entry = new (Z)
- TargetEntryInstr(flow_graph->allocate_block_id(),
- call->GetBlock()->try_index(), Thread::kNoDeoptId);
+ *entry =
+ new (Z) TargetEntryInstr(flow_graph->allocate_block_id(),
+ call->GetBlock()->try_index(), DeoptId::kNone);
(*entry)->InheritDeoptTarget(Z, call);
Instruction* cursor = *entry;
@@ -3399,10 +3411,9 @@
break;
}
}
- flow_graph->AppendTo(
- cursor, *last,
- call->deopt_id() != Thread::kNoDeoptId ? call->env() : NULL,
- FlowGraph::kValue);
+ flow_graph->AppendTo(cursor, *last,
+ call->deopt_id() != DeoptId::kNone ? call->env() : NULL,
+ FlowGraph::kValue);
return true;
}
@@ -3412,7 +3423,7 @@
Definition* y) {
BinaryInt64OpInstr* mul = new (Z)
BinaryInt64OpInstr(Token::kMUL, new (Z) Value(x), new (Z) Value(y),
- Thread::kNoDeoptId, Instruction::kNotSpeculative);
+ DeoptId::kNone, Instruction::kNotSpeculative);
return flow_graph->AppendTo(cursor, mul, nullptr, FlowGraph::kValue);
}
@@ -3441,7 +3452,7 @@
// Lazily construct entry only in this case.
*entry = new (Z)
TargetEntryInstr(flow_graph->allocate_block_id(),
- call->GetBlock()->try_index(), Thread::kNoDeoptId);
+ call->GetBlock()->try_index(), DeoptId::kNone);
(*entry)->InheritDeoptTarget(Z, call);
Definition* x_def = x->definition();
Definition* square =
@@ -3483,7 +3494,8 @@
const ICData* ic_data,
TargetEntryInstr** entry,
Instruction** last,
- SpeculativeInliningPolicy* policy) {
+ SpeculativeInliningPolicy* policy,
+ FlowGraphInliner::ExactnessInfo* exactness) {
const bool can_speculate = policy->IsAllowedForInlining(call->deopt_id());
const MethodRecognizer::Kind kind = MethodRecognizer::RecognizeKind(target);
@@ -3546,7 +3558,8 @@
case MethodRecognizer::kObjectArraySetIndexedUnchecked:
case MethodRecognizer::kGrowableArraySetIndexedUnchecked:
return InlineSetIndexed(flow_graph, kind, target, call, receiver,
- token_pos, /* value_check = */ NULL, entry, last);
+ token_pos, /* value_check = */ NULL, exactness,
+ entry, last);
case MethodRecognizer::kInt8ArraySetIndexed:
case MethodRecognizer::kUint8ArraySetIndexed:
case MethodRecognizer::kUint8ClampedArraySetIndexed:
@@ -3561,14 +3574,15 @@
}
Cids* value_check = Cids::CreateMonomorphic(Z, kSmiCid);
return InlineSetIndexed(flow_graph, kind, target, call, receiver,
- token_pos, value_check, entry, last);
+ token_pos, value_check, exactness, entry, last);
}
case MethodRecognizer::kInt32ArraySetIndexed:
case MethodRecognizer::kUint32ArraySetIndexed: {
// Value check not needed for Int32 and Uint32 arrays because they
// implicitly contain unboxing instructions which check for right type.
return InlineSetIndexed(flow_graph, kind, target, call, receiver,
- token_pos, /* value_check = */ NULL, entry, last);
+ token_pos, /* value_check = */ NULL, exactness,
+ entry, last);
}
case MethodRecognizer::kInt64ArraySetIndexed:
case MethodRecognizer::kUint64ArraySetIndexed:
@@ -3576,7 +3590,8 @@
return false;
}
return InlineSetIndexed(flow_graph, kind, target, call, receiver,
- token_pos, /* value_check = */ NULL, entry, last);
+ token_pos, /* value_check = */ NULL, exactness,
+ entry, last);
case MethodRecognizer::kFloat32ArraySetIndexed:
case MethodRecognizer::kFloat64ArraySetIndexed: {
if (!CanUnboxDouble()) {
@@ -3584,7 +3599,7 @@
}
Cids* value_check = Cids::CreateMonomorphic(Z, kDoubleCid);
return InlineSetIndexed(flow_graph, kind, target, call, receiver,
- token_pos, value_check, entry, last);
+ token_pos, value_check, exactness, entry, last);
}
case MethodRecognizer::kFloat32x4ArraySetIndexed: {
if (!ShouldInlineSimd()) {
@@ -3592,7 +3607,7 @@
}
Cids* value_check = Cids::CreateMonomorphic(Z, kFloat32x4Cid);
return InlineSetIndexed(flow_graph, kind, target, call, receiver,
- token_pos, value_check, entry, last);
+ token_pos, value_check, exactness, entry, last);
}
case MethodRecognizer::kFloat64x2ArraySetIndexed: {
if (!ShouldInlineSimd()) {
@@ -3600,7 +3615,7 @@
}
Cids* value_check = Cids::CreateMonomorphic(Z, kFloat64x2Cid);
return InlineSetIndexed(flow_graph, kind, target, call, receiver,
- token_pos, value_check, entry, last);
+ token_pos, value_check, exactness, entry, last);
}
case MethodRecognizer::kByteArrayBaseGetInt8:
return InlineByteArrayBaseLoad(flow_graph, call, receiver, receiver_cid,
@@ -3851,7 +3866,7 @@
case MethodRecognizer::kObjectConstructor: {
*entry = new (Z)
TargetEntryInstr(flow_graph->allocate_block_id(),
- call->GetBlock()->try_index(), Thread::kNoDeoptId);
+ call->GetBlock()->try_index(), DeoptId::kNone);
(*entry)->InheritDeoptTarget(Z, call);
ASSERT(!call->HasUses());
*last = NULL; // Empty body.
@@ -3869,13 +3884,13 @@
const auto num_elements = new (Z) Value(call->ArgumentAt(1));
*entry = new (Z)
TargetEntryInstr(flow_graph->allocate_block_id(),
- call->GetBlock()->try_index(), Thread::kNoDeoptId);
+ call->GetBlock()->try_index(), DeoptId::kNone);
(*entry)->InheritDeoptTarget(Z, call);
*last = new (Z) CreateArrayInstr(call->token_pos(), type, num_elements,
call->deopt_id());
flow_graph->AppendTo(
*entry, *last,
- call->deopt_id() != Thread::kNoDeoptId ? call->env() : NULL,
+ call->deopt_id() != DeoptId::kNone ? call->env() : NULL,
FlowGraph::kValue);
return true;
}
@@ -3886,15 +3901,15 @@
if (IsSmiValue(num_elements, &length)) {
if (length >= 0 && length <= Array::kMaxElements) {
Value* type = new (Z) Value(call->ArgumentAt(0));
- *entry = new (Z) TargetEntryInstr(flow_graph->allocate_block_id(),
- call->GetBlock()->try_index(),
- Thread::kNoDeoptId);
+ *entry = new (Z)
+ TargetEntryInstr(flow_graph->allocate_block_id(),
+ call->GetBlock()->try_index(), DeoptId::kNone);
(*entry)->InheritDeoptTarget(Z, call);
*last = new (Z) CreateArrayInstr(call->token_pos(), type,
num_elements, call->deopt_id());
flow_graph->AppendTo(
*entry, *last,
- call->deopt_id() != Thread::kNoDeoptId ? call->env() : NULL,
+ call->deopt_id() != DeoptId::kNone ? call->env() : NULL,
FlowGraph::kValue);
return true;
}
@@ -3923,12 +3938,12 @@
if (!type.IsNull()) {
*entry = new (Z)
TargetEntryInstr(flow_graph->allocate_block_id(),
- call->GetBlock()->try_index(), Thread::kNoDeoptId);
+ call->GetBlock()->try_index(), DeoptId::kNone);
(*entry)->InheritDeoptTarget(Z, call);
*last = new (Z) ConstantInstr(type);
flow_graph->AppendTo(
*entry, *last,
- call->deopt_id() != Thread::kNoDeoptId ? call->env() : NULL,
+ call->deopt_id() != DeoptId::kNone ? call->env() : NULL,
FlowGraph::kValue);
return true;
}
@@ -3940,7 +3955,7 @@
// range.
*entry = new (Z)
TargetEntryInstr(flow_graph->allocate_block_id(),
- call->GetBlock()->try_index(), Thread::kNoDeoptId);
+ call->GetBlock()->try_index(), DeoptId::kNone);
(*entry)->InheritDeoptTarget(Z, call);
Definition* str = call->ArgumentAt(0);
Definition* index = call->ArgumentAt(1);
@@ -3953,7 +3968,7 @@
call->deopt_id(), call->token_pos());
flow_graph->AppendTo(
*entry, *last,
- call->deopt_id() != Thread::kNoDeoptId ? call->env() : NULL,
+ call->deopt_id() != DeoptId::kNone ? call->env() : NULL,
FlowGraph::kEffect);
return true;
}
diff --git a/runtime/vm/compiler/backend/inliner.h b/runtime/vm/compiler/backend/inliner.h
index 542f8c4..da043a7 100644
--- a/runtime/vm/compiler/backend/inliner.h
+++ b/runtime/vm/compiler/backend/inliner.h
@@ -110,6 +110,11 @@
return speculative_policy_;
}
+ struct ExactnessInfo {
+ const bool is_exact;
+ bool emit_exactness_guard;
+ };
+
static bool TryReplaceInstanceCallWithInline(
FlowGraph* flow_graph,
ForwardInstructionIterator* iterator,
@@ -131,7 +136,8 @@
const ICData* ic_data,
TargetEntryInstr** entry,
Instruction** last,
- SpeculativeInliningPolicy* policy);
+ SpeculativeInliningPolicy* policy,
+ ExactnessInfo* exactness = nullptr);
private:
friend class CallSiteInliner;
diff --git a/runtime/vm/compiler/backend/range_analysis.cc b/runtime/vm/compiler/backend/range_analysis.cc
index 95e5a72..2319532 100644
--- a/runtime/vm/compiler/backend/range_analysis.cc
+++ b/runtime/vm/compiler/backend/range_analysis.cc
@@ -983,7 +983,7 @@
for (intptr_t i = 0; i < non_positive_symbols.length(); i++) {
CheckArrayBoundInstr* precondition = new CheckArrayBoundInstr(
new Value(max_smi), new Value(non_positive_symbols[i]),
- Thread::kNoDeoptId);
+ DeoptId::kNone);
precondition->mark_generalized();
precondition = scheduler_.Emit(precondition, check);
if (precondition == NULL) {
@@ -997,7 +997,7 @@
CheckArrayBoundInstr* new_check = new CheckArrayBoundInstr(
new Value(UnwrapConstraint(check->length()->definition())),
- new Value(upper_bound), Thread::kNoDeoptId);
+ new Value(upper_bound), DeoptId::kNone);
new_check->mark_generalized();
if (new_check->IsRedundant(array_length)) {
if (FLAG_trace_range_analysis) {
@@ -1035,7 +1035,7 @@
Definition* left,
Definition* right) {
return new BinarySmiOpInstr(op_kind, new Value(left), new Value(right),
- Thread::kNoDeoptId);
+ DeoptId::kNone);
}
BinarySmiOpInstr* MakeBinaryOp(Token::Kind op_kind,
diff --git a/runtime/vm/compiler/backend/type_propagator.cc b/runtime/vm/compiler/backend/type_propagator.cc
index 4b58b36..b5aaa95 100644
--- a/runtime/vm/compiler/backend/type_propagator.cc
+++ b/runtime/vm/compiler/backend/type_propagator.cc
@@ -8,7 +8,7 @@
#include "vm/bit_vector.h"
#include "vm/compiler/backend/il_printer.h"
-#include "vm/compiler/cha.h"
+#include "vm/compiler/compiler_state.h"
#include "vm/object_store.h"
#include "vm/regexp_assembler.h"
#include "vm/resolver.h"
@@ -695,7 +695,7 @@
} else if (type_->HasResolvedTypeClass()) {
const Class& type_class = Class::Handle(type_->type_class());
Thread* thread = Thread::Current();
- CHA* cha = thread->cha();
+ CHA& cha = thread->compiler_state().cha();
// Don't infer a cid from an abstract type since there can be multiple
// compatible classes with different cids.
if (!type_class.is_abstract() && !CHA::IsImplemented(type_class) &&
@@ -710,7 +710,7 @@
type_class.ToCString());
}
if (FLAG_use_cha_deopt) {
- cha->AddToGuardedClasses(type_class, /*subclass_count=*/0);
+ cha.AddToGuardedClasses(type_class, /*subclass_count=*/0);
}
cid_ = type_class.id();
} else {
@@ -968,8 +968,9 @@
type_class.ToCString());
}
if (FLAG_use_cha_deopt) {
- thread->cha()->AddToGuardedClasses(type_class,
- /*subclass_count=*/0);
+ thread->compiler_state().cha().AddToGuardedClasses(
+ type_class,
+ /*subclass_count=*/0);
}
cid = type_class.id();
}
@@ -980,7 +981,7 @@
return CompileType(CompileType::kNonNullable, cid, &type);
}
- if (Isolate::Current()->strong() && FLAG_use_strong_mode_types) {
+ if (Isolate::Current()->can_use_strong_mode_types()) {
LocalScope* scope = graph_entry->parsed_function().node_sequence()->scope();
// Note: in catch-blocks we have ParameterInstr for each local variable
// not only for normal parameters.
@@ -1132,7 +1133,7 @@
return *inferred_type;
}
- if (Isolate::Current()->strong() && FLAG_use_strong_mode_types) {
+ if (Isolate::Current()->can_use_strong_mode_types()) {
const Function& target = interface_target();
if (!target.IsNull()) {
const AbstractType& result_type =
@@ -1165,7 +1166,7 @@
}
}
- if (Isolate::Current()->strong() && FLAG_use_strong_mode_types) {
+ if (Isolate::Current()->can_use_strong_mode_types()) {
CompileType* type = instance_call()->Type();
TraceStrongModeType(this, type);
return *type;
@@ -1188,8 +1189,7 @@
}
const Isolate* isolate = Isolate::Current();
- if ((isolate->strong() && FLAG_use_strong_mode_types) ||
- isolate->type_checks()) {
+ if ((isolate->can_use_strong_mode_types()) || isolate->type_checks()) {
const AbstractType& result_type =
AbstractType::ZoneHandle(function().result_type());
// TODO(dartbug.com/30480): instantiate generic result_type if possible.
@@ -1208,8 +1208,7 @@
CompileType LoadLocalInstr::ComputeType() const {
const Isolate* isolate = Isolate::Current();
- if ((isolate->strong() && FLAG_use_strong_mode_types) ||
- isolate->type_checks()) {
+ if (isolate->can_use_strong_mode_types() || isolate->type_checks()) {
const AbstractType& local_type = local().type();
TraceStrongModeType(this, local_type);
return CompileType::FromAbstractType(local_type);
@@ -1245,8 +1244,7 @@
AbstractType* abstract_type = NULL;
const Field& field = this->StaticField();
const Isolate* isolate = Isolate::Current();
- if ((isolate->strong() && FLAG_use_strong_mode_types) ||
- isolate->type_checks()) {
+ if (isolate->can_use_strong_mode_types() || isolate->type_checks()) {
cid = kIllegalCid;
abstract_type = &AbstractType::ZoneHandle(field.type());
TraceStrongModeType(this, *abstract_type);
@@ -1301,7 +1299,7 @@
const Isolate* isolate = Isolate::Current();
CompileType compile_type_annotation = CompileType::None();
- if ((isolate->strong() && FLAG_use_strong_mode_types) ||
+ if (isolate->can_use_strong_mode_types() ||
(isolate->type_checks() &&
(type().IsFunctionType() || type().HasResolvedTypeClass()))) {
const AbstractType* abstract_type = &type();
@@ -1381,7 +1379,7 @@
}
CompileType CheckedSmiOpInstr::ComputeType() const {
- if (Isolate::Current()->strong() && FLAG_use_strong_mode_types) {
+ if (Isolate::Current()->can_use_strong_mode_types()) {
if (left()->Type()->IsNullableInt() && right()->Type()->IsNullableInt()) {
const AbstractType& abstract_type =
AbstractType::ZoneHandle(Type::IntType());
@@ -1398,7 +1396,7 @@
}
CompileType CheckedSmiComparisonInstr::ComputeType() const {
- if (Isolate::Current()->strong() && FLAG_use_strong_mode_types) {
+ if (Isolate::Current()->can_use_strong_mode_types()) {
CompileType* type = call()->Type();
TraceStrongModeType(this, type);
return *type;
diff --git a/runtime/vm/compiler/call_specializer.cc b/runtime/vm/compiler/call_specializer.cc
index aff0b3a..b119b07 100644
--- a/runtime/vm/compiler/call_specializer.cc
+++ b/runtime/vm/compiler/call_specializer.cc
@@ -8,6 +8,7 @@
#include "vm/compiler/backend/flow_graph_compiler.h"
#include "vm/compiler/backend/inliner.h"
#include "vm/compiler/cha.h"
+#include "vm/compiler/compiler_state.h"
#include "vm/cpu.h"
namespace dart {
@@ -352,7 +353,7 @@
intptr_t deopt_id,
Environment* deopt_environment,
Instruction* insert_before) {
- ASSERT(I->strong() && FLAG_use_strong_mode_types);
+ ASSERT(I->can_use_strong_mode_types());
if (to_check->Type()->is_nullable()) {
CheckNullInstr* check_null =
new (Z) CheckNullInstr(to_check->CopyWithType(Z), function_name,
@@ -557,7 +558,7 @@
StrictCompareInstr* comp = new (Z)
StrictCompareInstr(call->token_pos(), Token::kEQ_STRICT,
new (Z) Value(left), new (Z) Value(right),
- /* number_check = */ false, Thread::kNoDeoptId);
+ /* number_check = */ false, DeoptId::kNone);
ReplaceCall(call, comp);
return true;
}
@@ -958,6 +959,18 @@
break;
}
+ // True if we can use unchecked entry into the setter.
+ bool is_unchecked_call = false;
+ if (!FLAG_precompiled_mode) {
+ if (unary_ic_data.NumberOfChecks() == 1 &&
+ unary_ic_data.GetExactnessAt(0).IsExact()) {
+ if (unary_ic_data.GetExactnessAt(0).IsTriviallyExact()) {
+ flow_graph()->AddExactnessGuard(instr, unary_ic_data.GetCidAt(0));
+ }
+ is_unchecked_call = true;
+ }
+ }
+
if (I->use_field_guards()) {
if (field.guarded_cid() != kDynamicCid) {
InsertBefore(instr,
@@ -1003,10 +1016,13 @@
needs_check = true;
} else if (is_generic_covariant) {
// If field is generic covariant then we don't need to check it
- // if we know that actual type arguments match static type arguments
- // e.g. if this is an invocation on this (an instance we are storing
- // into is also a receiver of a surrounding method).
- needs_check = !flow_graph_->IsReceiver(instr->ArgumentAt(0));
+ // if the invocation was marked as unchecked (e.g. receiver of
+ // the invocation is also the receiver of the surrounding method).
+ // Note: we can't use flow_graph()->IsReceiver() for this optimization
+ // because strong mode only gives static guarantees at the AST level
+ // not at the SSA level.
+ needs_check = !(is_unchecked_call ||
+ (instr->entry_kind() == Code::EntryKind::kUnchecked));
} else {
// The rest of the stores are checked statically (we are not at
// a dynamic invocation).
@@ -1295,7 +1311,8 @@
type_class.ToCString());
}
if (FLAG_use_cha_deopt) {
- thread()->cha()->AddToGuardedClasses(type_class, /*subclass_count=*/0);
+ thread()->compiler_state().cha().AddToGuardedClasses(
+ type_class, /*subclass_count=*/0);
}
} else {
return false;
@@ -1326,7 +1343,7 @@
bool CallSpecializer::TryOptimizeInstanceOfUsingStaticTypes(
InstanceCallInstr* call,
const AbstractType& type) {
- ASSERT(I->strong() && FLAG_use_strong_mode_types);
+ ASSERT(I->can_use_strong_mode_types());
ASSERT(Token::IsTypeTestOperator(call->token_kind()));
if (type.IsDynamicType() || type.IsObjectType() || !type.IsInstantiated()) {
@@ -1342,7 +1359,7 @@
type.IsNullType() ? Token::kEQ_STRICT : Token::kNE_STRICT,
left_value->CopyWithType(Z),
new (Z) Value(flow_graph()->constant_null()),
- /* number_check = */ false, Thread::kNoDeoptId);
+ /* number_check = */ false, DeoptId::kNone);
if (FLAG_trace_strong_mode_types) {
THR_Print("[Strong mode] replacing %s with %s (%s < %s)\n",
call->ToCString(), replacement->ToCString(),
@@ -1374,7 +1391,7 @@
type = AbstractType::Cast(call->ArgumentAt(3)->AsConstant()->value()).raw();
}
- if (I->strong() && FLAG_use_strong_mode_types &&
+ if (I->can_use_strong_mode_types() &&
TryOptimizeInstanceOfUsingStaticTypes(call, type)) {
return;
}
@@ -1388,7 +1405,7 @@
StrictCompareInstr* check_cid = new (Z) StrictCompareInstr(
call->token_pos(), Token::kEQ_STRICT, new (Z) Value(left_cid),
- new (Z) Value(cid), /* number_check = */ false, Thread::kNoDeoptId);
+ new (Z) Value(cid), /* number_check = */ false, DeoptId::kNone);
ReplaceCall(call, check_cid);
return;
}
@@ -1415,7 +1432,7 @@
}
TestCidsInstr* test_cids = new (Z) TestCidsInstr(
call->token_pos(), Token::kIS, new (Z) Value(left), *results,
- can_deopt ? call->deopt_id() : Thread::kNoDeoptId);
+ can_deopt ? call->deopt_id() : DeoptId::kNone);
// Remove type.
ReplaceCall(call, test_cids);
return;
@@ -1626,7 +1643,7 @@
}
}
- if (I->strong() && FLAG_use_strong_mode_types &&
+ if (I->can_use_strong_mode_types() &&
TryOptimizeStaticCallUsingStaticTypes(call)) {
return;
}
diff --git a/runtime/vm/compiler/cha.h b/runtime/vm/compiler/cha.h
index ea49315..3dce752 100644
--- a/runtime/vm/compiler/cha.h
+++ b/runtime/vm/compiler/cha.h
@@ -17,20 +17,10 @@
class ZoneGrowableArray;
class String;
-class CHA : public StackResource {
+class CHA : public ValueObject {
public:
explicit CHA(Thread* thread)
- : StackResource(thread),
- thread_(thread),
- guarded_classes_(thread->zone(), 1),
- previous_(thread->cha()) {
- thread->set_cha(this);
- }
-
- ~CHA() {
- ASSERT(thread_->cha() == this);
- thread_->set_cha(previous_);
- }
+ : thread_(thread), guarded_classes_(thread->zone(), 1) {}
// Returns true if the class has subclasses.
static bool HasSubclasses(const Class& cls);
@@ -39,7 +29,8 @@
// Collect the concrete subclasses of 'cls' into 'class_ids'. Return true if
// the result is valid (may be invalid because we don't track the subclasses
// of classes allocated in the VM isolate or class Object).
- bool ConcreteSubclasses(const Class& cls, GrowableArray<intptr_t>* class_ids);
+ static bool ConcreteSubclasses(const Class& cls,
+ GrowableArray<intptr_t>* class_ids);
// Return true if the class is implemented by some other class.
static bool IsImplemented(const Class& cls);
@@ -81,7 +72,6 @@
};
GrowableArray<GuardedClassInfo> guarded_classes_;
- CHA* previous_;
};
} // namespace dart
diff --git a/runtime/vm/compiler/cha_test.cc b/runtime/vm/compiler/cha_test.cc
index 81025d9..1cd26e9 100644
--- a/runtime/vm/compiler/cha_test.cc
+++ b/runtime/vm/compiler/cha_test.cc
@@ -28,6 +28,8 @@
"}\n";
TestCase::LoadTestScript(kScriptChars, NULL);
+
+ TransitionNativeToVM transition(thread);
EXPECT(ClassFinalizer::ProcessPendingClasses());
const String& name = String::Handle(String::New(TestCase::url()));
const Library& lib = Library::Handle(Library::LookupLibrary(thread, name));
diff --git a/runtime/vm/compiler/compiler_pass.cc b/runtime/vm/compiler/compiler_pass.cc
index b33a4cb..e9587e6 100644
--- a/runtime/vm/compiler/compiler_pass.cc
+++ b/runtime/vm/compiler/compiler_pass.cc
@@ -219,9 +219,6 @@
INVOKE_PASS(SetOuterInliningId);
INVOKE_PASS(TypePropagation);
INVOKE_PASS(ApplyClassIds);
- if (mode == kJIT) {
- INVOKE_PASS(MarkCallsOnReceiverUnchecked);
- }
INVOKE_PASS(Inlining);
INVOKE_PASS(TypePropagation);
INVOKE_PASS(ApplyClassIds);
@@ -434,48 +431,6 @@
COMPILER_PASS(WriteBarrierElimination,
{ WriteBarrierElimination(flow_graph); });
-void MarkCallsOnReceiverUnchecked(FlowGraph* flow_graph) {
- if (flow_graph->function().is_static() ||
- !flow_graph->function().IsDynamicFunction() ||
- flow_graph->function().kind() ==
- RawFunction::kDynamicInvocationForwarder) {
- return;
- }
- for (BlockIterator block_it = flow_graph->reverse_postorder_iterator();
- !block_it.Done(); block_it.Advance()) {
- BlockEntryInstr* block = block_it.Current();
- for (ForwardInstructionIterator it(block); !it.Done(); it.Advance()) {
- Instruction* current = it.Current();
- if (StaticCallInstr* instr = current->AsStaticCall()) {
- if (instr->FirstArgIndex() < instr->ArgumentCount()) {
- Value* receiver = instr->Receiver();
- if (flow_graph->IsReceiver(receiver->definition())) {
- auto& target = instr->function();
- ASSERT(target.kind() != RawFunction::kDynamicInvocationForwarder);
- if (!target.is_static() && target.IsDynamicFunction()) {
- instr->set_entry_kind(Code::EntryKind::kUnchecked);
- }
- }
- }
- } else if (InstanceCallInstr* instr = current->AsInstanceCall()) {
- Value* receiver = instr->Receiver();
- if (flow_graph->IsReceiver(receiver->definition())) {
- instr->set_entry_kind(Code::EntryKind::kUnchecked);
- }
- } else if (PolymorphicInstanceCallInstr* instr =
- current->AsPolymorphicInstanceCall()) {
- Value* receiver = instr->Receiver();
- if (flow_graph->IsReceiver(receiver->definition())) {
- instr->instance_call()->set_entry_kind(Code::EntryKind::kUnchecked);
- }
- }
- }
- }
-}
-
-COMPILER_PASS(MarkCallsOnReceiverUnchecked,
- { MarkCallsOnReceiverUnchecked(flow_graph); });
-
COMPILER_PASS(FinalizeGraph, {
// Compute and store graph informations (call & instruction counts)
// to be later used by the inliner.
diff --git a/runtime/vm/compiler/compiler_pass.h b/runtime/vm/compiler/compiler_pass.h
index e9301be..92c2bfc 100644
--- a/runtime/vm/compiler/compiler_pass.h
+++ b/runtime/vm/compiler/compiler_pass.h
@@ -43,8 +43,7 @@
V(TryOptimizePatterns) \
V(TypePropagation) \
V(WidenSmiToInt32) \
- V(WriteBarrierElimination) \
- V(MarkCallsOnReceiverUnchecked)
+ V(WriteBarrierElimination)
class AllocationSinking;
class BlockScheduler;
@@ -170,8 +169,6 @@
intptr_t flags_;
};
-void MarkCallsOnReceiverUnchecked(FlowGraph* flow_graph);
-
} // namespace dart
#endif
diff --git a/runtime/vm/compiler/compiler_sources.gni b/runtime/vm/compiler/compiler_sources.gni
index 62b132c..a3f399d 100644
--- a/runtime/vm/compiler/compiler_sources.gni
+++ b/runtime/vm/compiler/compiler_sources.gni
@@ -75,6 +75,7 @@
"cha.h",
"compiler_pass.cc",
"compiler_pass.h",
+ "compiler_state.h",
"frontend/base_flow_graph_builder.cc",
"frontend/base_flow_graph_builder.h",
"frontend/bytecode_reader.cc",
diff --git a/runtime/vm/compiler/compiler_state.h b/runtime/vm/compiler/compiler_state.h
new file mode 100644
index 0000000..320a174
--- /dev/null
+++ b/runtime/vm/compiler/compiler_state.h
@@ -0,0 +1,107 @@
+// 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.
+
+#ifndef RUNTIME_VM_COMPILER_COMPILER_STATE_H_
+#define RUNTIME_VM_COMPILER_COMPILER_STATE_H_
+
+#include "vm/compiler/cha.h"
+#include "vm/thread.h"
+
+namespace dart {
+
+// Deoptimization Id logic.
+//
+// Deoptimization ids are used to refer to deoptimization points, at which
+// control can enter unoptimized code from the optimized version of the code.
+//
+// Note: any instruction that does a call has two deoptimization points,
+// one before the call and one after the call - so that we could deoptimize
+// to either before or after the call depending on whether the same call
+// already occured in the optimized code (and potentially produced
+// observable side-effects) or not.
+//
+// To simplify implementation we always allocate two deopt ids (one for before
+// point and one for the after point).
+class DeoptId : public AllStatic {
+ public:
+ static constexpr intptr_t kNone = -1;
+
+ static inline intptr_t Next(intptr_t deopt_id) { return deopt_id + kStep; }
+
+ static inline intptr_t ToDeoptAfter(intptr_t deopt_id) {
+ ASSERT(IsDeoptBefore(deopt_id));
+ return deopt_id + kAfterOffset;
+ }
+
+ static inline bool IsDeoptBefore(intptr_t deopt_id) {
+ return (deopt_id % kStep) == kBeforeOffset;
+ }
+
+ static inline bool IsDeoptAfter(intptr_t deopt_id) {
+ return (deopt_id % kStep) == kAfterOffset;
+ }
+
+ private:
+ static constexpr intptr_t kStep = 2;
+ static constexpr intptr_t kBeforeOffset = 0;
+ static constexpr intptr_t kAfterOffset = 1;
+};
+
+// Global compiler state attached to the thread.
+class CompilerState : public StackResource {
+ public:
+ explicit CompilerState(Thread* thread) : StackResource(thread), cha_(thread) {
+ previous_ = thread->SetCompilerState(this);
+ }
+
+ ~CompilerState() {
+ ASSERT(&thread()->compiler_state() == this);
+ thread()->SetCompilerState(previous_);
+ }
+
+ CHA& cha() { return cha_; }
+
+ intptr_t deopt_id() const { return deopt_id_; }
+ void set_deopt_id(int value) {
+ ASSERT(value >= 0);
+ deopt_id_ = value;
+ }
+
+ intptr_t GetNextDeoptId() {
+ ASSERT(deopt_id_ != DeoptId::kNone);
+ const intptr_t id = deopt_id_;
+ deopt_id_ = DeoptId::Next(deopt_id_);
+ return id;
+ }
+
+ static CompilerState& Current() {
+ return Thread::Current()->compiler_state();
+ }
+
+ private:
+ CHA cha_;
+ intptr_t deopt_id_ = 0;
+
+ CompilerState* previous_;
+};
+
+class DeoptIdScope : public StackResource {
+ public:
+ DeoptIdScope(Thread* thread, intptr_t deopt_id)
+ : StackResource(thread),
+ prev_deopt_id_(thread->compiler_state().deopt_id()) {
+ thread->compiler_state().set_deopt_id(deopt_id);
+ }
+
+ ~DeoptIdScope() { thread()->compiler_state().set_deopt_id(prev_deopt_id_); }
+
+ private:
+ const intptr_t prev_deopt_id_;
+
+ DISALLOW_COPY_AND_ASSIGN(DeoptIdScope);
+};
+
+} // namespace dart
+
+#endif // RUNTIME_VM_COMPILER_COMPILER_STATE_H_
diff --git a/runtime/vm/compiler/frontend/base_flow_graph_builder.cc b/runtime/vm/compiler/frontend/base_flow_graph_builder.cc
index 30432db..55e3531 100644
--- a/runtime/vm/compiler/frontend/base_flow_graph_builder.cc
+++ b/runtime/vm/compiler/frontend/base_flow_graph_builder.cc
@@ -315,7 +315,7 @@
Value* array = Pop();
LoadIndexedInstr* instr = new (Z)
LoadIndexedInstr(array, index, index_scale, kArrayCid, kAlignedAccess,
- Thread::kNoDeoptId, TokenPosition::kNoSource);
+ DeoptId::kNone, TokenPosition::kNoSource);
Push(instr);
return Fragment(instr);
}
@@ -445,7 +445,7 @@
StoreIndexedInstr* store = new (Z) StoreIndexedInstr(
Pop(), // Array.
index, value, emit_store_barrier, Instance::ElementSizeFor(class_id),
- class_id, kAlignedAccess, Thread::kNoDeoptId, TokenPosition::kNoSource);
+ class_id, kAlignedAccess, DeoptId::kNone, TokenPosition::kNoSource);
Push(store);
return Fragment(store);
}
@@ -645,7 +645,7 @@
}
Fragment BaseFlowGraphBuilder::AssertBool(TokenPosition position) {
- if (FLAG_omit_strong_type_checks) {
+ if (!I->should_emit_strong_mode_checks()) {
return Fragment();
}
Value* value = Pop();
diff --git a/runtime/vm/compiler/frontend/base_flow_graph_builder.h b/runtime/vm/compiler/frontend/base_flow_graph_builder.h
index c1418a7..190635c 100644
--- a/runtime/vm/compiler/frontend/base_flow_graph_builder.h
+++ b/runtime/vm/compiler/frontend/base_flow_graph_builder.h
@@ -220,7 +220,7 @@
Fragment TailCall(const Code& code);
intptr_t GetNextDeoptId() {
- intptr_t deopt_id = thread_->GetNextDeoptId();
+ intptr_t deopt_id = thread_->compiler_state().GetNextDeoptId();
if (context_level_array_ != NULL) {
intptr_t level = context_depth_;
context_level_array_->Add(deopt_id);
diff --git a/runtime/vm/compiler/frontend/bytecode_reader.cc b/runtime/vm/compiler/frontend/bytecode_reader.cc
index aab0242..3f244f7 100644
--- a/runtime/vm/compiler/frontend/bytecode_reader.cc
+++ b/runtime/vm/compiler/frontend/bytecode_reader.cc
@@ -210,7 +210,7 @@
}
obj = ICData::New(function, name,
array, // Arguments descriptor.
- Thread::kNoDeoptId, checked_argument_count,
+ DeoptId::kNone, checked_argument_count,
ICData::RebindRule::kInstance);
#if defined(TAG_IC_DATA)
ICData::Cast(obj).set_tag(ICData::Tag::kInstanceCall);
@@ -254,7 +254,7 @@
array ^= pool.ObjectAt(arg_desc_index);
obj = ICData::New(function, name,
array, // Arguments descriptor.
- Thread::kNoDeoptId, num_args_checked,
+ DeoptId::kNone, num_args_checked,
ICData::RebindRule::kStatic);
ICData::Cast(obj).AddTarget(Function::Cast(elem));
#if defined(TAG_IC_DATA)
@@ -567,10 +567,10 @@
handler_types.SetAt(i, handler_type);
}
pc_descriptors_list->AddDescriptor(RawPcDescriptors::kOther, start_pc,
- Thread::kNoDeoptId,
+ DeoptId::kNone,
TokenPosition::kNoSource, try_index);
pc_descriptors_list->AddDescriptor(RawPcDescriptors::kOther, end_pc,
- Thread::kNoDeoptId,
+ DeoptId::kNone,
TokenPosition::kNoSource, -1);
exception_handlers_list->AddHandler(
@@ -591,8 +591,9 @@
}
}
-RawTypedData* BytecodeMetadataHelper::NativeEntry(const Function& function,
- const String& external_name) {
+RawNativeEntryData* BytecodeMetadataHelper::NativeEntry(
+ const Function& function,
+ const String& external_name) {
Zone* zone = helper_->zone_;
MethodRecognizer::Kind kind = MethodRecognizer::RecognizeKind(function);
// This list of recognized methods must be kept in sync with the list of
@@ -652,23 +653,12 @@
}
argc_tag = NativeArguments::ComputeArgcTag(function);
}
- // TODO(regis): Introduce a new VM class subclassing Object and containing
- // these four untagged values.
-#ifdef ARCH_IS_32_BIT
- const TypedData& native_entry = TypedData::Handle(
- zone, TypedData::New(kTypedDataUint32ArrayCid, 4, Heap::kOld));
- native_entry.SetUint32(0 << 2, static_cast<uint32_t>(kind));
- native_entry.SetUint32(1 << 2, reinterpret_cast<uint32_t>(trampoline));
- native_entry.SetUint32(2 << 2, reinterpret_cast<uint32_t>(native_function));
- native_entry.SetUint32(3 << 2, static_cast<uint32_t>(argc_tag));
-#else
- const TypedData& native_entry = TypedData::Handle(
- zone, TypedData::New(kTypedDataUint64ArrayCid, 4, Heap::kOld));
- native_entry.SetUint64(0 << 3, static_cast<uint64_t>(kind));
- native_entry.SetUint64(1 << 3, reinterpret_cast<uint64_t>(trampoline));
- native_entry.SetUint64(2 << 3, reinterpret_cast<uint64_t>(native_function));
- native_entry.SetUint64(3 << 3, static_cast<uint64_t>(argc_tag));
-#endif
+ const NativeEntryData& native_entry =
+ NativeEntryData::Handle(zone, NativeEntryData::New());
+ native_entry.set_kind(kind);
+ native_entry.set_trampoline(trampoline);
+ native_entry.set_native_function(native_function);
+ native_entry.set_argc_tag(argc_tag);
return native_entry.raw();
}
diff --git a/runtime/vm/compiler/frontend/bytecode_reader.h b/runtime/vm/compiler/frontend/bytecode_reader.h
index a257f25..6d3ed1f 100644
--- a/runtime/vm/compiler/frontend/bytecode_reader.h
+++ b/runtime/vm/compiler/frontend/bytecode_reader.h
@@ -33,8 +33,8 @@
intptr_t from_index);
RawCode* ReadBytecode(const ObjectPool& pool);
void ReadExceptionsTable(const Code& bytecode);
- RawTypedData* NativeEntry(const Function& function,
- const String& external_name);
+ RawNativeEntryData* NativeEntry(const Function& function,
+ const String& external_name);
TypeTranslator& type_translator_;
ActiveClass* const active_class_;
diff --git a/runtime/vm/compiler/frontend/flow_graph_builder.cc b/runtime/vm/compiler/frontend/flow_graph_builder.cc
index 4d93fdf..bba0ace 100644
--- a/runtime/vm/compiler/frontend/flow_graph_builder.cc
+++ b/runtime/vm/compiler/frontend/flow_graph_builder.cc
@@ -164,7 +164,7 @@
}
intptr_t FlowGraphBuilder::GetNextDeoptId() const {
- intptr_t deopt_id = thread()->GetNextDeoptId();
+ intptr_t deopt_id = thread()->compiler_state().GetNextDeoptId();
if (context_level_array_ != NULL) {
intptr_t level = context_level();
context_level_array_->Add(deopt_id);
@@ -427,8 +427,8 @@
// Create a join of the returns.
intptr_t join_id = caller_graph_->max_block_id() + 1;
caller_graph_->set_max_block_id(join_id);
- JoinEntryInstr* join = new (Z)
- JoinEntryInstr(join_id, try_index, Thread::Current()->GetNextDeoptId());
+ JoinEntryInstr* join = new (Z) JoinEntryInstr(
+ join_id, try_index, CompilerState::Current().GetNextDeoptId());
// The dominator set of the join is the intersection of the dominator
// sets of all the predecessors. If we keep the dominator sets ordered
@@ -447,7 +447,7 @@
for (intptr_t i = 0; i < num_exits; ++i) {
// Add the control-flow edge.
GotoInstr* goto_instr =
- new (Z) GotoInstr(join, Thread::Current()->GetNextDeoptId());
+ new (Z) GotoInstr(join, CompilerState::Current().GetNextDeoptId());
goto_instr->InheritDeoptTarget(zone(), ReturnAt(i));
LastInstructionAt(i)->LinkTo(goto_instr);
ExitBlockAt(i)->set_last_instruction(LastInstructionAt(i)->next());
@@ -533,18 +533,18 @@
// by the constant propagation.
TargetEntryInstr* false_block = new (Z) TargetEntryInstr(
caller_graph_->allocate_block_id(), call_block->try_index(),
- Thread::Current()->GetNextDeoptId());
+ CompilerState::Current().GetNextDeoptId());
false_block->InheritDeoptTargetAfter(caller_graph_, call_, NULL);
false_block->LinkTo(call_->next());
call_block->ReplaceAsPredecessorWith(false_block);
ConstantInstr* true_const = caller_graph_->GetConstant(Bool::True());
- BranchInstr* branch = new (Z)
- BranchInstr(new (Z) StrictCompareInstr(
- TokenPosition::kNoSource, Token::kEQ_STRICT,
- new (Z) Value(true_const), new (Z) Value(true_const),
- false, Thread::Current()->GetNextDeoptId()),
- Thread::Current()->GetNextDeoptId()); // No number check.
+ BranchInstr* branch = new (Z) BranchInstr(
+ new (Z) StrictCompareInstr(TokenPosition::kNoSource, Token::kEQ_STRICT,
+ new (Z) Value(true_const),
+ new (Z) Value(true_const), false,
+ CompilerState::Current().GetNextDeoptId()),
+ CompilerState::Current().GetNextDeoptId()); // No number check.
branch->InheritDeoptTarget(zone(), call_);
*branch->true_successor_address() = callee_entry;
*branch->false_successor_address() = false_block;
@@ -2192,7 +2192,7 @@
{
LocalVariable* tmp_var = EnterTempLocalScope(array_val);
const intptr_t class_id = kArrayCid;
- const intptr_t deopt_id = Thread::kNoDeoptId;
+ const intptr_t deopt_id = DeoptId::kNone;
for (int i = 0; i < node->length(); ++i) {
Value* array = Bind(new (Z) LoadLocalInstr(*tmp_var, node->token_pos()));
Value* index = Bind(new (Z) ConstantInstr(Smi::ZoneHandle(Z, Smi::New(i)),
@@ -3490,12 +3490,14 @@
if (isolate()->use_field_guards()) {
store_value = Bind(BuildStoreExprTemp(store_value, token_pos));
- GuardFieldClassInstr* guard_field_class = new (Z) GuardFieldClassInstr(
- store_value, node->field(), thread()->GetNextDeoptId());
+ GuardFieldClassInstr* guard_field_class = new (Z)
+ GuardFieldClassInstr(store_value, node->field(),
+ thread()->compiler_state().GetNextDeoptId());
AddInstruction(guard_field_class);
store_value = Bind(BuildLoadExprTemp(token_pos));
- GuardFieldLengthInstr* guard_field_length = new (Z) GuardFieldLengthInstr(
- store_value, node->field(), thread()->GetNextDeoptId());
+ GuardFieldLengthInstr* guard_field_length = new (Z)
+ GuardFieldLengthInstr(store_value, node->field(),
+ thread()->compiler_state().GetNextDeoptId());
AddInstruction(guard_field_length);
store_value = Bind(BuildLoadExprTemp(token_pos));
}
diff --git a/runtime/vm/compiler/frontend/flow_graph_builder_test.cc b/runtime/vm/compiler/frontend/flow_graph_builder_test.cc
index 84eb098..4b591c9 100644
--- a/runtime/vm/compiler/frontend/flow_graph_builder_test.cc
+++ b/runtime/vm/compiler/frontend/flow_graph_builder_test.cc
@@ -35,9 +35,12 @@
EXPECT(thread_ != NULL);
EXPECT(isolate_ != NULL);
EXPECT(script_ != NULL);
- Dart_Handle lib = TestCase::LoadTestScript(script, NULL);
- EXPECT_VALID(lib);
- root_lib_ ^= Api::UnwrapHandle(lib);
+ {
+ TransitionVMToNative transition(thread);
+ Dart_Handle lib = TestCase::LoadTestScript(script, NULL);
+ EXPECT_VALID(lib);
+ root_lib_ ^= Api::UnwrapHandle(lib);
+ }
EXPECT(!root_lib_.IsNull());
root_script_ ^=
root_lib_.LookupScript(String::Handle(String::New(USER_TEST_URI)));
@@ -60,6 +63,7 @@
new ParsedFunction(thread_, Function::ZoneHandle(function.raw()));
Parser::ParseFunction(parsed_function);
parsed_function->AllocateVariables();
+ CompilerState state(thread_);
FlowGraphBuilder builder(*parsed_function, *ic_data_array,
/* not building var desc */ NULL,
/* not inlining */ NULL, Compiler::kNoOSRDeoptId);
@@ -280,7 +284,7 @@
GrowableArray<BlockEntryInstr*>* blocks_;
};
-TEST_CASE(SourcePosition_InstanceCalls) {
+ISOLATE_UNIT_TEST_CASE(SourcePosition_InstanceCalls) {
const char* kScript =
"var x = 5;\n"
"var y = 5;\n"
@@ -300,7 +304,7 @@
spt.EnsureSourcePositions();
}
-TEST_CASE(SourcePosition_If) {
+ISOLATE_UNIT_TEST_CASE(SourcePosition_If) {
const char* kScript =
"var x = 5;\n"
"var y = 5;\n"
@@ -328,7 +332,7 @@
spt.EnsureSourcePositions();
}
-TEST_CASE(SourcePosition_ForLoop) {
+ISOLATE_UNIT_TEST_CASE(SourcePosition_ForLoop) {
const char* kScript =
"var x = 0;\n"
"var y = 5;\n"
@@ -358,7 +362,7 @@
spt.EnsureSourcePositions();
}
-TEST_CASE(SourcePosition_While) {
+ISOLATE_UNIT_TEST_CASE(SourcePosition_While) {
const char* kScript =
"var x = 0;\n"
"var y = 5;\n"
@@ -406,7 +410,7 @@
spt.EnsureSourcePositions();
}
-TEST_CASE(SourcePosition_WhileContinueBreak) {
+ISOLATE_UNIT_TEST_CASE(SourcePosition_WhileContinueBreak) {
const char* kScript =
"var x = 0;\n"
"var y = 5;\n"
@@ -445,7 +449,7 @@
spt.EnsureSourcePositions();
}
-TEST_CASE(SourcePosition_LoadIndexed) {
+ISOLATE_UNIT_TEST_CASE(SourcePosition_LoadIndexed) {
const char* kScript =
"var x = 0;\n"
"var z = new List(3);\n"
@@ -483,7 +487,7 @@
spt.EnsureSourcePositions();
}
-TEST_CASE(SourcePosition_StoreIndexed) {
+ISOLATE_UNIT_TEST_CASE(SourcePosition_StoreIndexed) {
const char* kScript =
"var x = 0;\n"
"var z = new List(4);\n"
@@ -526,7 +530,7 @@
spt.EnsureSourcePositions();
}
-TEST_CASE(SourcePosition_BitwiseOperations) {
+ISOLATE_UNIT_TEST_CASE(SourcePosition_BitwiseOperations) {
const char* kScript =
"var x = 0;\n"
"var y = 1;\n"
@@ -575,7 +579,7 @@
spt.EnsureSourcePositions();
}
-TEST_CASE(SourcePosition_IfElse) {
+ISOLATE_UNIT_TEST_CASE(SourcePosition_IfElse) {
const char* kScript =
"var x = 5;\n"
"var y = 5;\n"
@@ -604,7 +608,7 @@
spt.EnsureSourcePositions();
}
-TEST_CASE(SourcePosition_Switch) {
+ISOLATE_UNIT_TEST_CASE(SourcePosition_Switch) {
const char* kScript =
"var x = 5;\n"
"var y = 5;\n"
@@ -648,7 +652,7 @@
spt.EnsureSourcePositions();
}
-TEST_CASE(SourcePosition_TryCatchFinally) {
+ISOLATE_UNIT_TEST_CASE(SourcePosition_TryCatchFinally) {
const char* kScript =
"var x = 5;\n"
"var y = 5;\n"
@@ -699,7 +703,7 @@
spt.EnsureSourcePositions();
}
-TEST_CASE(SourcePosition_InstanceFields) {
+ISOLATE_UNIT_TEST_CASE(SourcePosition_InstanceFields) {
const char* kScript =
"class A {\n"
" var x;\n"
@@ -728,7 +732,7 @@
spt.EnsureSourcePositions();
}
-TEST_CASE(SourcePosition_Async) {
+ISOLATE_UNIT_TEST_CASE(SourcePosition_Async) {
const char* kScript =
"import 'dart:async';\n"
"var x = 5;\n"
diff --git a/runtime/vm/compiler/frontend/kernel_binary_flowgraph.cc b/runtime/vm/compiler/frontend/kernel_binary_flowgraph.cc
index 0cac1db..ca6e29d 100644
--- a/runtime/vm/compiler/frontend/kernel_binary_flowgraph.cc
+++ b/runtime/vm/compiler/frontend/kernel_binary_flowgraph.cc
@@ -800,7 +800,7 @@
loop += condition;
Instruction* entry =
- new (Z) GotoInstr(join, Thread::Current()->GetNextDeoptId());
+ new (Z) GotoInstr(join, CompilerState::Current().GetNextDeoptId());
body += Fragment(entry, loop_exit);
}
@@ -937,7 +937,7 @@
TypeChecksToBuild mode,
Fragment* explicit_checks,
Fragment* implicit_checks) {
- if (FLAG_omit_strong_type_checks) return;
+ if (!I->should_emit_strong_mode_checks()) return;
FunctionNodeHelper function_node_helper(this);
function_node_helper.SetNext(FunctionNodeHelper::kTypeParameters);
@@ -1567,10 +1567,6 @@
F += CheckStackOverflowInPrologue(dart_function);
F += DebugStepCheckInPrologue(dart_function, token_position);
F += SetAsyncStackTrace(dart_function);
- // TODO(#34162): We can remove the default type handling (and
- // shorten the prologue type handling sequence) for non-dynamic invocations of
- // regular methods.
- F += TypeArgumentsHandling(dart_function, type_parameters_offset);
return F;
}
@@ -1709,7 +1705,8 @@
const Function& dart_function,
const Fragment& implicit_type_checks,
const Fragment& first_time_prologue,
- const Fragment& every_time_prologue) {
+ const Fragment& every_time_prologue,
+ const Fragment& type_args_handling) {
ASSERT(!dart_function.IsImplicitClosureFunction());
if (!dart_function.MayHaveUncheckedEntryPoint(I) ||
implicit_type_checks.is_empty()) {
@@ -1729,7 +1726,7 @@
// TODO(#34162): For regular closures we can often avoid the
// PrologueBuilder-prologue on non-dynamic invocations.
if (!PrologueBuilder::HasEmptyPrologue(dart_function) ||
- !first_time_prologue.is_empty() ||
+ !type_args_handling.is_empty() || !first_time_prologue.is_empty() ||
!(every_time_prologue.entry == every_time_prologue.current ||
every_time_prologue.current->previous() == every_time_prologue.entry)) {
return UncheckedEntryPointStyle::kSharedWithVariable;
@@ -1782,6 +1779,12 @@
const Fragment first_time_prologue = BuildFirstTimePrologue(
dart_function, first_parameter, type_parameters_offset);
+ // TODO(#34162): We can remove the default type handling (and
+ // shorten the prologue type handling sequence) for non-dynamic invocations of
+ // regular methods.
+ const Fragment type_args_handling =
+ TypeArgumentsHandling(dart_function, type_parameters_offset);
+
Fragment explicit_type_checks;
Fragment implicit_type_checks;
CheckArgumentTypesAsNecessary(dart_function, type_parameters_offset,
@@ -1790,9 +1793,9 @@
const Fragment body =
BuildFunctionBody(dart_function, first_parameter, is_constructor);
- auto extra_entry_point_style =
- ChooseEntryPointStyle(dart_function, implicit_type_checks,
- first_time_prologue, every_time_prologue);
+ auto extra_entry_point_style = ChooseEntryPointStyle(
+ dart_function, implicit_type_checks, first_time_prologue,
+ every_time_prologue, type_args_handling);
Fragment function(instruction_cursor);
if (yield_continuations().is_empty()) {
@@ -1800,12 +1803,14 @@
switch (extra_entry_point_style) {
case UncheckedEntryPointStyle::kNone: {
function += every_time_prologue + first_time_prologue +
- implicit_type_checks + explicit_type_checks + body;
+ type_args_handling + implicit_type_checks +
+ explicit_type_checks + body;
break;
}
case UncheckedEntryPointStyle::kSeparate: {
ASSERT(instruction_cursor == normal_entry);
ASSERT(first_time_prologue.is_empty());
+ ASSERT(type_args_handling.is_empty());
const Fragment prologue_copy = BuildEveryTimePrologue(
dart_function, token_position, type_parameters_offset);
@@ -1822,6 +1827,7 @@
Fragment prologue(normal_entry, instruction_cursor);
prologue += every_time_prologue;
prologue += first_time_prologue;
+ prologue += type_args_handling;
prologue += explicit_type_checks;
extra_entry = BuildSharedUncheckedEntryPoint(
/*shared_prologue_linked_in=*/prologue,
@@ -1837,9 +1843,15 @@
// If the function's body contains any yield points, build switch statement
// that selects a continuation point based on the value of :await_jump_var.
ASSERT(explicit_type_checks.is_empty());
+
+ // If the function is generic, type_args_handling might require access to
+ // (possibly captured) 'this' for preparing default type arguments, in which
+ // case we can't run it before the 'first_time_prologue'.
+ ASSERT(!dart_function.IsGeneric());
+
// TODO(#34162): We can probably ignore the implicit checks
// here as well since the arguments are passed from generated code.
- function += every_time_prologue +
+ function += every_time_prologue + type_args_handling +
CompleteBodyWithYieldContinuations(first_time_prologue +
implicit_type_checks + body);
}
@@ -2440,10 +2452,13 @@
const Array& argument_names,
intptr_t checked_argument_count,
const Function& interface_target,
- const InferredTypeMetadata* result_type) {
+ const InferredTypeMetadata* result_type,
+ bool use_unchecked_entry,
+ const CallSiteAttributesMetadata* call_site_attrs) {
return flow_graph_builder_->InstanceCall(
position, name, kind, type_args_len, argument_count, argument_names,
- checked_argument_count, interface_target, result_type);
+ checked_argument_count, interface_target, result_type,
+ use_unchecked_entry, call_site_attrs);
}
Fragment StreamingFlowGraphBuilder::ThrowException(TokenPosition position) {
@@ -2772,8 +2787,13 @@
BranchInstr* branch;
if (stack()->definition()->IsStrictCompare() &&
stack()->definition() == instructions.current) {
- branch = new (Z) BranchInstr(Pop()->definition()->AsStrictCompare(),
- flow_graph_builder_->GetNextDeoptId());
+ StrictCompareInstr* compare = Pop()->definition()->AsStrictCompare();
+ if (negate) {
+ compare->NegateComparison();
+ negate = false;
+ }
+ branch =
+ new (Z) BranchInstr(compare, flow_graph_builder_->GetNextDeoptId());
branch->comparison()->ClearTempIndex();
ASSERT(instructions.current->previous() != nullptr);
instructions.current = instructions.current->previous();
@@ -2783,10 +2803,12 @@
Value* right_value = Pop();
Value* left_value = Pop();
StrictCompareInstr* compare = new (Z) StrictCompareInstr(
- TokenPosition::kNoSource, Token::kEQ_STRICT, left_value, right_value,
- false, flow_graph_builder_->GetNextDeoptId());
+ TokenPosition::kNoSource,
+ negate ? Token::kNE_STRICT : Token::kEQ_STRICT, left_value,
+ right_value, false, flow_graph_builder_->GetNextDeoptId());
branch =
new (Z) BranchInstr(compare, flow_graph_builder_->GetNextDeoptId());
+ negate = false;
}
instructions <<= branch;
@@ -2981,16 +3003,32 @@
const DirectCallMetadata direct_call =
direct_call_metadata_helper_.GetDirectTargetForPropertySet(offset);
+ const CallSiteAttributesMetadata call_site_attributes =
+ call_site_attributes_metadata_helper_.GetCallSiteAttributes(offset);
+
+ // True if callee can skip argument type checks.
+ bool is_unchecked_call = false;
+#ifndef TARGET_ARCH_DBC
+ if (call_site_attributes.receiver_type != nullptr &&
+ call_site_attributes.receiver_type->HasResolvedTypeClass() &&
+ !Class::Handle(call_site_attributes.receiver_type->type_class())
+ .IsGeneric()) {
+ is_unchecked_call = true;
+ }
+#endif
Fragment instructions(MakeTemp());
LocalVariable* variable = MakeTemporary();
const TokenPosition position = ReadPosition(); // read position.
- if (p != NULL) *p = position;
+ if (p != nullptr) *p = position;
+ if (PeekTag() == kThisExpression) {
+ is_unchecked_call = true;
+ }
instructions += BuildExpression(); // read receiver.
- LocalVariable* receiver = NULL;
+ LocalVariable* receiver = nullptr;
if (direct_call.check_receiver_for_null_) {
// Duplicate receiver for CheckNull before it is consumed by PushArgument.
receiver = MakeTemporary();
@@ -3020,25 +3058,29 @@
}
if (!direct_call.target_.IsNull()) {
+ // TODO(#34162): Pass 'is_unchecked_call' down if/when we feature multiple
+ // entry-points in AOT.
ASSERT(FLAG_precompiled_mode);
instructions +=
StaticCall(position, direct_call.target_, 2, Array::null_array(),
- ICData::kNoRebind, /* result_type = */ NULL);
+ ICData::kNoRebind, /*result_type=*/nullptr);
} else {
const intptr_t kTypeArgsLen = 0;
const intptr_t kNumArgsChecked = 1;
const String* mangled_name = &setter_name;
- if (!FLAG_precompiled_mode && I->strong() &&
- !FLAG_omit_strong_type_checks && H.IsRoot(itarget_name)) {
+ if (!FLAG_precompiled_mode && I->should_emit_strong_mode_checks() &&
+ H.IsRoot(itarget_name)) {
mangled_name = &String::ZoneHandle(
Z, Function::CreateDynamicInvocationForwarderName(setter_name));
}
- instructions +=
- InstanceCall(position, *mangled_name, Token::kSET, kTypeArgsLen, 2,
- Array::null_array(), kNumArgsChecked, *interface_target,
- /* result_type = */ NULL);
+ instructions += InstanceCall(
+ position, *mangled_name, Token::kSET, kTypeArgsLen, 2,
+ Array::null_array(), kNumArgsChecked, *interface_target,
+ /*result_type=*/nullptr,
+ /*use_unchecked_entry=*/!FLAG_precompiled_mode && is_unchecked_call,
+ &call_site_attributes);
}
instructions += Drop(); // Drop result of the setter invocation.
@@ -3455,11 +3497,8 @@
direct_call_metadata_helper_.GetDirectTargetForMethodInvocation(offset);
const InferredTypeMetadata result_type =
inferred_type_metadata_helper_.GetInferredType(offset);
-
-#ifndef TARGET_ARCH_DBC
const CallSiteAttributesMetadata call_site_attributes =
call_site_attributes_metadata_helper_.GetCallSiteAttributes(offset);
-#endif
const Tag receiver_tag = PeekTag(); // peek tag for receiver.
if (IsNumberLiteral(receiver_tag) &&
@@ -3497,12 +3536,19 @@
}
bool is_unchecked_closure_call = false;
+ bool is_unchecked_call = false;
#ifndef TARGET_ARCH_DBC
- if (call_site_attributes.receiver_type != nullptr &&
- call_site_attributes.receiver_type->IsFunctionType()) {
- AlternativeReadingScope alt(&reader_);
- SkipExpression(); // skip receiver
- is_unchecked_closure_call = ReadNameAsMethodName().Equals(Symbols::Call());
+ if (call_site_attributes.receiver_type != nullptr) {
+ if (call_site_attributes.receiver_type->IsFunctionType()) {
+ AlternativeReadingScope alt(&reader_);
+ SkipExpression(); // skip receiver
+ is_unchecked_closure_call =
+ ReadNameAsMethodName().Equals(Symbols::Call());
+ } else if (call_site_attributes.receiver_type->HasResolvedTypeClass() &&
+ !Class::Handle(call_site_attributes.receiver_type->type_class())
+ .IsGeneric()) {
+ is_unchecked_call = true;
+ }
}
#endif
@@ -3533,6 +3579,11 @@
type_args_len = list_length;
}
+ // Take note of whether the invocation is against the receiver of the current
+ // function: in this case, we may skip some type checks in the callee.
+ if (PeekTag() == kThisExpression) {
+ is_unchecked_call = true;
+ }
instructions += BuildExpression(); // read receiver.
const String& name = ReadNameAsMethodName(); // read name.
@@ -3622,6 +3673,8 @@
B->ClosureCall(position, type_args_len, argument_count, argument_names,
/*use_unchecked_entry=*/true);
} else if (!direct_call.target_.IsNull()) {
+ // TODO(#34162): Pass 'is_unchecked_call' down if/when we feature multiple
+ // entry-points in AOT.
ASSERT(FLAG_precompiled_mode);
instructions += StaticCall(position, direct_call.target_, argument_count,
argument_names, ICData::kNoRebind, &result_type,
@@ -3633,17 +3686,20 @@
// at the entry because the parameter is marked covariant, neither of
// those cases require a dynamic invocation forwarder;
// * we assume that all closures are entered in a checked way.
- if (!FLAG_precompiled_mode && I->strong() &&
- !FLAG_omit_strong_type_checks &&
+ if (!FLAG_precompiled_mode && I->should_emit_strong_mode_checks() &&
(name.raw() != Symbols::EqualOperator().raw()) &&
(name.raw() != Symbols::Call().raw()) && H.IsRoot(itarget_name)) {
mangled_name = &String::ZoneHandle(
Z, Function::CreateDynamicInvocationForwarderName(name));
}
- instructions +=
- InstanceCall(position, *mangled_name, token_kind, type_args_len,
- argument_count, argument_names, checked_argument_count,
- *interface_target, &result_type);
+
+ // TODO(#34162): Pass 'is_unchecked_call' down if/when we feature multiple
+ // entry-points in AOT.
+ instructions += InstanceCall(
+ position, *mangled_name, token_kind, type_args_len, argument_count,
+ argument_names, checked_argument_count, *interface_target, &result_type,
+ /*use_unchecked_entry=*/!FLAG_precompiled_mode && is_unchecked_call,
+ &call_site_attributes);
}
// Drop temporaries preserving result on the top of the stack.
@@ -4709,14 +4765,35 @@
Class::ZoneHandle(Z, I->object_store()->closure_class()), 0);
LocalVariable* new_closure = MakeTemporary();
- instructions += LoadLocal(new_closure);
-
intptr_t num_type_args = ReadListLength();
const TypeArguments& type_args = T.BuildTypeArguments(num_type_args);
instructions += TranslateInstantiatedTypeArguments(type_args);
+ LocalVariable* type_args_vec = MakeTemporary();
+
+ // Check the bounds.
+ //
+ // TODO(sjindel): Only perform this check for instance tearoffs, not for
+ // tearoffs against local or top-level functions.
+ instructions += LoadLocal(original_closure);
+ instructions += PushArgument();
+ instructions += LoadLocal(type_args_vec);
+ instructions += PushArgument();
+ const Library& dart_internal = Library::Handle(Z, Library::InternalLibrary());
+ const Function& bounds_check_function = Function::ZoneHandle(
+ Z, dart_internal.LookupFunctionAllowPrivate(
+ Symbols::BoundsCheckForPartialInstantiation()));
+ ASSERT(!bounds_check_function.IsNull());
+ instructions += StaticCall(TokenPosition::kNoSource, bounds_check_function, 2,
+ ICData::kStatic);
+ instructions += Drop();
+
+ instructions += LoadLocal(new_closure);
+ instructions += LoadLocal(type_args_vec);
instructions += StoreInstanceField(TokenPosition::kNoSource,
Closure::delayed_type_arguments_offset());
+ instructions += Drop(); // Drop type args.
+
// Copy over the target function.
instructions += LoadLocal(new_closure);
instructions += LoadLocal(original_closure);
@@ -4745,7 +4822,7 @@
instructions +=
StoreInstanceField(TokenPosition::kNoSource, Closure::context_offset());
- instructions += DropTempsPreserveTop(1); // drop old closure
+ instructions += DropTempsPreserveTop(1); // Drop old closure.
return instructions;
}
@@ -4964,8 +5041,9 @@
condition.IfTrueGoto(flow_graph_builder_, join);
loop_depth_dec();
- return Fragment(new (Z) GotoInstr(join, Thread::Current()->GetNextDeoptId()),
- condition.CreateFalseSuccessor(flow_graph_builder_));
+ return Fragment(
+ new (Z) GotoInstr(join, CompilerState::Current().GetNextDeoptId()),
+ condition.CreateFalseSuccessor(flow_graph_builder_));
}
Fragment StreamingFlowGraphBuilder::BuildForStatement() {
diff --git a/runtime/vm/compiler/frontend/kernel_binary_flowgraph.h b/runtime/vm/compiler/frontend/kernel_binary_flowgraph.h
index c4aecce..3992163 100644
--- a/runtime/vm/compiler/frontend/kernel_binary_flowgraph.h
+++ b/runtime/vm/compiler/frontend/kernel_binary_flowgraph.h
@@ -148,7 +148,8 @@
const Function& dart_function,
const Fragment& implicit_type_checks,
const Fragment& first_time_prologue,
- const Fragment& every_time_prologue);
+ const Fragment& every_time_prologue,
+ const Fragment& type_args_handling);
void RecordUncheckedEntryPoint(TargetEntryInstr* extra_entry);
@@ -227,15 +228,18 @@
Token::Kind kind,
intptr_t argument_count,
intptr_t checked_argument_count = 1);
- Fragment InstanceCall(TokenPosition position,
- const String& name,
- Token::Kind kind,
- intptr_t type_args_len,
- intptr_t argument_count,
- const Array& argument_names,
- intptr_t checked_argument_count,
- const Function& interface_target,
- const InferredTypeMetadata* result_type = NULL);
+ Fragment InstanceCall(
+ TokenPosition position,
+ const String& name,
+ Token::Kind kind,
+ intptr_t type_args_len,
+ intptr_t argument_count,
+ const Array& argument_names,
+ intptr_t checked_argument_count,
+ const Function& interface_target,
+ const InferredTypeMetadata* result_type = nullptr,
+ bool use_unchecked_entry = false,
+ const CallSiteAttributesMetadata* call_site_attrs = nullptr);
enum TypeChecksToBuild {
kCheckAllTypeParameterBounds,
diff --git a/runtime/vm/compiler/frontend/kernel_to_il.cc b/runtime/vm/compiler/frontend/kernel_to_il.cc
index 53d17b4..a68d9b9 100644
--- a/runtime/vm/compiler/frontend/kernel_to_il.cc
+++ b/runtime/vm/compiler/frontend/kernel_to_il.cc
@@ -353,7 +353,9 @@
const Array& argument_names,
intptr_t checked_argument_count,
const Function& interface_target,
- const InferredTypeMetadata* result_type) {
+ const InferredTypeMetadata* result_type,
+ bool use_unchecked_entry,
+ const CallSiteAttributesMetadata* call_site_attrs) {
const intptr_t total_count = argument_count + (type_args_len > 0 ? 1 : 0);
ArgumentArray arguments = GetArguments(total_count);
InstanceCallInstr* call = new (Z)
@@ -363,6 +365,13 @@
if ((result_type != NULL) && !result_type->IsTrivial()) {
call->SetResultType(Z, result_type->ToCompileType(Z));
}
+ if (use_unchecked_entry) {
+ call->set_entry_kind(Code::EntryKind::kUnchecked);
+ }
+ if (call_site_attrs != nullptr && call_site_attrs->receiver_type != nullptr &&
+ call_site_attrs->receiver_type->IsInstantiated()) {
+ call->set_static_receiver_type(call_site_attrs->receiver_type);
+ }
Push(call);
return Fragment(call);
}
@@ -1053,7 +1062,7 @@
if (dst_type.IsMalformed()) {
return ThrowTypeError();
}
- if (FLAG_omit_strong_type_checks) {
+ if (!I->should_emit_strong_mode_checks()) {
return Fragment();
}
if (!dst_type.IsDynamicType() && !dst_type.IsObjectType() &&
@@ -1071,7 +1080,7 @@
const AbstractType& dst_type,
const String& dst_name,
AssertAssignableInstr::Kind kind) {
- if (FLAG_omit_strong_type_checks) {
+ if (!I->should_emit_strong_mode_checks()) {
return Fragment();
}
diff --git a/runtime/vm/compiler/frontend/kernel_to_il.h b/runtime/vm/compiler/frontend/kernel_to_il.h
index 49332d5..9f6b524 100644
--- a/runtime/vm/compiler/frontend/kernel_to_il.h
+++ b/runtime/vm/compiler/frontend/kernel_to_il.h
@@ -92,20 +92,26 @@
Fragment TryCatch(int try_handler_index);
Fragment CheckStackOverflowInPrologue(TokenPosition position);
Fragment CloneContext(intptr_t num_context_variables);
- Fragment InstanceCall(TokenPosition position,
- const String& name,
- Token::Kind kind,
- intptr_t type_args_len,
- intptr_t argument_count,
- const Array& argument_names,
- intptr_t checked_argument_count,
- const Function& interface_target,
- const InferredTypeMetadata* result_type = NULL);
+
+ Fragment InstanceCall(
+ TokenPosition position,
+ const String& name,
+ Token::Kind kind,
+ intptr_t type_args_len,
+ intptr_t argument_count,
+ const Array& argument_names,
+ intptr_t checked_argument_count,
+ const Function& interface_target,
+ const InferredTypeMetadata* result_type = nullptr,
+ bool use_unchecked_entry = false,
+ const CallSiteAttributesMetadata* call_site_attrs = nullptr);
+
Fragment ClosureCall(TokenPosition position,
intptr_t type_args_len,
intptr_t argument_count,
const Array& argument_names,
bool use_unchecked_entry = false);
+
Fragment RethrowException(TokenPosition position, int catch_try_index);
Fragment LoadClassId();
Fragment LoadField(intptr_t offset, intptr_t class_id = kDynamicCid);
@@ -166,7 +172,7 @@
LocalVariable* LookupVariable(intptr_t kernel_offset);
- bool IsCompiledForOsr() { return osr_id_ != Thread::kNoDeoptId; }
+ bool IsCompiledForOsr() { return osr_id_ != DeoptId::kNone; }
TranslationHelper translation_helper_;
Thread* thread_;
diff --git a/runtime/vm/compiler/frontend/kernel_translation_helper.h b/runtime/vm/compiler/frontend/kernel_translation_helper.h
index cac95bc..3dd63b8 100644
--- a/runtime/vm/compiler/frontend/kernel_translation_helper.h
+++ b/runtime/vm/compiler/frontend/kernel_translation_helper.h
@@ -956,6 +956,8 @@
void ReadUntilFunctionNode();
+ Tag PeekTag(uint8_t* payload = NULL);
+
protected:
const Script& script() const { return script_; }
@@ -1020,7 +1022,6 @@
void SkipLibraryTypedef();
TokenPosition ReadPosition(bool record = true);
Tag ReadTag(uint8_t* payload = NULL);
- Tag PeekTag(uint8_t* payload = NULL);
uint8_t ReadFlags() { return reader_.ReadFlags(); }
intptr_t SourceTableSize();
diff --git a/runtime/vm/compiler/intrinsifier.cc b/runtime/vm/compiler/intrinsifier.cc
index 9afbe0b..0d8fb526 100644
--- a/runtime/vm/compiler/intrinsifier.cc
+++ b/runtime/vm/compiler/intrinsifier.cc
@@ -227,7 +227,7 @@
intptr_t block_id = builder.AllocateBlockId();
TargetEntryInstr* normal_entry =
new TargetEntryInstr(block_id, CatchClauseNode::kInvalidTryIndex,
- Thread::Current()->GetNextDeoptId());
+ CompilerState::Current().GetNextDeoptId());
GraphEntryInstr* graph_entry = new GraphEntryInstr(
parsed_function, normal_entry, Compiler::kNoOSRDeoptId);
FlowGraph* graph =
@@ -372,7 +372,7 @@
current_(entry),
fall_through_env_(new Environment(0,
0,
- Thread::kNoDeoptId,
+ DeoptId::kNone,
flow_graph->parsed_function(),
NULL)) {}
@@ -400,8 +400,8 @@
}
void AddIntrinsicReturn(Value* value) {
- ReturnInstr* instr =
- new ReturnInstr(TokenPos(), value, Thread::Current()->GetNextDeoptId());
+ ReturnInstr* instr = new ReturnInstr(
+ TokenPos(), value, CompilerState::Current().GetNextDeoptId());
AddInstruction(instr);
entry_->set_last_instruction(instr);
}
@@ -420,7 +420,7 @@
Definition* AddUnboxInstr(Representation rep, Value* value, bool is_checked) {
Definition* unboxed_value =
- AddDefinition(UnboxInstr::Create(rep, value, Thread::kNoDeoptId));
+ AddDefinition(UnboxInstr::Create(rep, value, DeoptId::kNone));
if (is_checked) {
// The type of |value| has already been checked and it is safe to
// adjust reaching type. This is done manually because there is no type
@@ -446,7 +446,7 @@
Definition* InvokeMathCFunctionHelper(MethodRecognizer::Kind recognized_kind,
ZoneGrowableArray<Value*>* args) {
InvokeMathCFunctionInstr* invoke_math_c_function =
- new InvokeMathCFunctionInstr(args, Thread::kNoDeoptId, recognized_kind,
+ new InvokeMathCFunctionInstr(args, DeoptId::kNone, recognized_kind,
TokenPos());
AddDefinition(invoke_math_c_function);
return invoke_math_c_function;
@@ -466,7 +466,7 @@
new Value(array), length_offset, Type::ZoneHandle(Type::SmiType()),
TokenPosition::kNoSource));
builder->AddInstruction(new CheckArrayBoundInstr(
- new Value(length), new Value(index), Thread::kNoDeoptId));
+ new Value(length), new Value(index), DeoptId::kNone));
}
static bool IntrinsifyArrayGetIndexed(FlowGraph* flow_graph,
@@ -495,7 +495,7 @@
Definition* result = builder.AddDefinition(new LoadIndexedInstr(
new Value(array), new Value(index),
Instance::ElementSizeFor(array_cid), // index scale
- array_cid, kAlignedAccess, Thread::kNoDeoptId, builder.TokenPos()));
+ array_cid, kAlignedAccess, DeoptId::kNone, builder.TokenPos()));
// Box and/or convert result if necessary.
switch (array_cid) {
case kTypedDataInt32ArrayCid:
@@ -510,7 +510,7 @@
break;
case kTypedDataFloat32ArrayCid:
result = builder.AddDefinition(
- new FloatToDoubleInstr(new Value(result), Thread::kNoDeoptId));
+ new FloatToDoubleInstr(new Value(result), DeoptId::kNone));
// Fall through.
case kTypedDataFloat64ArrayCid:
result = builder.AddDefinition(
@@ -580,8 +580,8 @@
case kExternalTypedDataUint8ClampedArrayCid:
case kTypedDataInt16ArrayCid:
case kTypedDataUint16ArrayCid:
- builder.AddInstruction(new CheckSmiInstr(
- new Value(value), Thread::kNoDeoptId, builder.TokenPos()));
+ builder.AddInstruction(new CheckSmiInstr(new Value(value), DeoptId::kNone,
+ builder.TokenPos()));
break;
case kTypedDataInt32ArrayCid:
case kExternalTypedDataInt32ArrayCid:
@@ -625,14 +625,13 @@
}
Zone* zone = flow_graph->zone();
Cids* value_check = Cids::CreateMonomorphic(zone, value_check_cid);
- builder.AddInstruction(
- new CheckClassInstr(new Value(value), Thread::kNoDeoptId,
- *value_check, builder.TokenPos()));
+ builder.AddInstruction(new CheckClassInstr(
+ new Value(value), DeoptId::kNone, *value_check, builder.TokenPos()));
value = builder.AddUnboxInstr(rep, new Value(value),
/* is_checked = */ true);
if (array_cid == kTypedDataFloat32ArrayCid) {
value = builder.AddDefinition(
- new DoubleToFloatInstr(new Value(value), Thread::kNoDeoptId));
+ new DoubleToFloatInstr(new Value(value), DeoptId::kNone));
}
break;
}
@@ -650,7 +649,7 @@
builder.AddInstruction(new StoreIndexedInstr(
new Value(array), new Value(index), new Value(value), kNoStoreBarrier,
Instance::ElementSizeFor(array_cid), // index scale
- array_cid, kAlignedAccess, Thread::kNoDeoptId, builder.TokenPos()));
+ array_cid, kAlignedAccess, DeoptId::kNone, builder.TokenPos()));
// Return null.
Definition* null_def = builder.AddNullDefinition();
builder.AddIntrinsicReturn(new Value(null_def));
@@ -777,7 +776,7 @@
Definition* result = builder.AddDefinition(new LoadIndexedInstr(
new Value(str), new Value(index), Instance::ElementSizeFor(cid), cid,
- kAlignedAccess, Thread::kNoDeoptId, builder.TokenPos()));
+ kAlignedAccess, DeoptId::kNone, builder.TokenPos()));
builder.AddIntrinsicReturn(new Value(result));
return true;
}
@@ -815,8 +814,8 @@
Cids* value_check = Cids::CreateMonomorphic(zone, cid);
// Check argument. Receiver (left) is known to be a Float32x4.
- builder.AddInstruction(new CheckClassInstr(
- new Value(right), Thread::kNoDeoptId, *value_check, builder.TokenPos()));
+ builder.AddInstruction(new CheckClassInstr(new Value(right), DeoptId::kNone,
+ *value_check, builder.TokenPos()));
Definition* left_simd = builder.AddUnboxInstr(rep, new Value(left),
/* is_checked = */ true);
@@ -825,7 +824,7 @@
Definition* unboxed_result = builder.AddDefinition(SimdOpInstr::Create(
SimdOpInstr::KindForOperator(cid, kind), new Value(left_simd),
- new Value(right_simd), Thread::kNoDeoptId));
+ new Value(right_simd), DeoptId::kNone));
Definition* result =
builder.AddDefinition(BoxInstr::Create(rep, new Value(unboxed_result)));
builder.AddIntrinsicReturn(new Value(result));
@@ -860,8 +859,8 @@
builder.AddUnboxInstr(kUnboxedFloat32x4, new Value(receiver),
/* is_checked = */ true);
- Definition* unboxed_result = builder.AddDefinition(SimdOpInstr::Create(
- kind, new Value(unboxed_receiver), Thread::kNoDeoptId));
+ Definition* unboxed_result = builder.AddDefinition(
+ SimdOpInstr::Create(kind, new Value(unboxed_receiver), DeoptId::kNone));
Definition* result = builder.AddDefinition(
BoxInstr::Create(kUnboxedDouble, new Value(unboxed_result)));
@@ -956,7 +955,7 @@
Definition* result = builder.AddDefinition(new LoadIndexedInstr(
new Value(backing_store), new Value(index),
Instance::ElementSizeFor(kArrayCid), // index scale
- kArrayCid, kAlignedAccess, Thread::kNoDeoptId, builder.TokenPos()));
+ kArrayCid, kAlignedAccess, DeoptId::kNone, builder.TokenPos()));
builder.AddIntrinsicReturn(new Value(result));
return true;
}
@@ -998,7 +997,7 @@
new Value(backing_store), new Value(index), new Value(value),
kEmitStoreBarrier,
Instance::ElementSizeFor(kArrayCid), // index scale
- kArrayCid, kAlignedAccess, Thread::kNoDeoptId, builder.TokenPos()));
+ kArrayCid, kAlignedAccess, DeoptId::kNone, builder.TokenPos()));
// Return null.
Definition* null_def = builder.AddNullDefinition();
builder.AddIntrinsicReturn(new Value(null_def));
@@ -1015,8 +1014,8 @@
Zone* zone = flow_graph->zone();
Cids* value_check = Cids::CreateMonomorphic(zone, kArrayCid);
- builder.AddInstruction(new CheckClassInstr(
- new Value(data), Thread::kNoDeoptId, *value_check, builder.TokenPos()));
+ builder.AddInstruction(new CheckClassInstr(new Value(data), DeoptId::kNone,
+ *value_check, builder.TokenPos()));
builder.AddInstruction(new StoreInstanceFieldInstr(
GrowableObjectArray::data_offset(), new Value(growable_array),
@@ -1035,8 +1034,8 @@
Definition* length = builder.AddParameter(1);
Definition* growable_array = builder.AddParameter(2);
- builder.AddInstruction(new CheckSmiInstr(
- new Value(length), Thread::kNoDeoptId, builder.TokenPos()));
+ builder.AddInstruction(
+ new CheckSmiInstr(new Value(length), DeoptId::kNone, builder.TokenPos()));
builder.AddInstruction(new StoreInstanceFieldInstr(
GrowableObjectArray::length_offset(), new Value(growable_array),
new Value(length), kNoStoreBarrier, builder.TokenPos()));
@@ -1058,7 +1057,7 @@
builder.AddUnboxInstr(kUnboxedDouble, new Value(receiver),
/* is_checked = */ true);
Definition* unboxed_result = builder.AddDefinition(new UnaryDoubleOpInstr(
- Token::kNEGATE, new Value(unboxed_value), Thread::kNoDeoptId));
+ Token::kNEGATE, new Value(unboxed_value), DeoptId::kNone));
Definition* result = builder.AddDefinition(
BoxInstr::Create(kUnboxedDouble, new Value(unboxed_result)));
builder.AddIntrinsicReturn(new Value(result));
diff --git a/runtime/vm/compiler/intrinsifier_arm.cc b/runtime/vm/compiler/intrinsifier_arm.cc
index 9256dc6..7c0ff38 100644
--- a/runtime/vm/compiler/intrinsifier_arm.cc
+++ b/runtime/vm/compiler/intrinsifier_arm.cc
@@ -201,7 +201,10 @@
__ mov(R3, Operand(0), HI); \
\
/* Get the class index and insert it into the tags. */ \
- __ LoadImmediate(TMP, RawObject::ClassIdTag::encode(cid)); \
+ uint32_t tags = 0; \
+ tags = RawObject::ClassIdTag::update(cid, tags); \
+ tags = RawObject::NewBit::update(true, tags); \
+ __ LoadImmediate(TMP, tags); \
__ orr(R3, R3, Operand(TMP)); \
__ str(R3, FieldAddress(R0, type_name::tags_offset())); /* Tags. */ \
} \
@@ -2003,7 +2006,10 @@
// Get the class index and insert it into the tags.
// R3: size and bit tags.
- __ LoadImmediate(TMP, RawObject::ClassIdTag::encode(cid));
+ uint32_t tags = 0;
+ tags = RawObject::ClassIdTag::update(cid, tags);
+ tags = RawObject::NewBit::update(true, tags);
+ __ LoadImmediate(TMP, tags);
__ orr(R3, R3, Operand(TMP));
__ str(R3, FieldAddress(R0, String::tags_offset())); // Store tags.
}
diff --git a/runtime/vm/compiler/intrinsifier_arm64.cc b/runtime/vm/compiler/intrinsifier_arm64.cc
index ff9ef0e..79b3412 100644
--- a/runtime/vm/compiler/intrinsifier_arm64.cc
+++ b/runtime/vm/compiler/intrinsifier_arm64.cc
@@ -213,7 +213,10 @@
__ csel(R2, ZR, R2, HI); \
\
/* Get the class index and insert it into the tags. */ \
- __ LoadImmediate(TMP, RawObject::ClassIdTag::encode(cid)); \
+ uint32_t tags = 0; \
+ tags = RawObject::ClassIdTag::update(cid, tags); \
+ tags = RawObject::NewBit::update(true, tags); \
+ __ LoadImmediate(TMP, tags); \
__ orr(R2, R2, Operand(TMP)); \
__ str(R2, FieldAddress(R0, type_name::tags_offset())); /* Tags. */ \
} \
@@ -2075,7 +2078,10 @@
// Get the class index and insert it into the tags.
// R2: size and bit tags.
// This also clears the hash, which is in the high word of the tags.
- __ LoadImmediate(TMP, RawObject::ClassIdTag::encode(cid));
+ uint32_t tags = 0;
+ tags = RawObject::ClassIdTag::update(cid, tags);
+ tags = RawObject::NewBit::update(true, tags);
+ __ LoadImmediate(TMP, tags);
__ orr(R2, R2, Operand(TMP));
__ str(R2, FieldAddress(R0, String::tags_offset())); // Store tags.
}
diff --git a/runtime/vm/compiler/intrinsifier_ia32.cc b/runtime/vm/compiler/intrinsifier_ia32.cc
index 931cdbf..0e6e8cc 100644
--- a/runtime/vm/compiler/intrinsifier_ia32.cc
+++ b/runtime/vm/compiler/intrinsifier_ia32.cc
@@ -203,7 +203,10 @@
__ Bind(&done); \
\
/* Get the class index and insert it into the tags. */ \
- __ orl(EDI, Immediate(RawObject::ClassIdTag::encode(cid))); \
+ uint32_t tags = 0; \
+ tags = RawObject::ClassIdTag::update(cid, tags); \
+ tags = RawObject::NewBit::update(true, tags); \
+ __ orl(EDI, Immediate(tags)); \
__ movl(FieldAddress(EAX, type_name::tags_offset()), EDI); /* Tags. */ \
} \
/* Set the length field. */ \
@@ -1995,7 +1998,10 @@
__ Bind(&done);
// Get the class index and insert it into the tags.
- __ orl(EDI, Immediate(RawObject::ClassIdTag::encode(cid)));
+ uint32_t tags = 0;
+ tags = RawObject::ClassIdTag::update(cid, tags);
+ tags = RawObject::NewBit::update(true, tags);
+ __ orl(EDI, Immediate(tags));
__ movl(FieldAddress(EAX, String::tags_offset()), EDI); // Tags.
}
diff --git a/runtime/vm/compiler/intrinsifier_x64.cc b/runtime/vm/compiler/intrinsifier_x64.cc
index 0d41621..b3bd008 100644
--- a/runtime/vm/compiler/intrinsifier_x64.cc
+++ b/runtime/vm/compiler/intrinsifier_x64.cc
@@ -199,7 +199,10 @@
__ Bind(&done); \
\
/* Get the class index and insert it into the tags. */ \
- __ orq(RDI, Immediate(RawObject::ClassIdTag::encode(cid))); \
+ uint32_t tags = 0; \
+ tags = RawObject::ClassIdTag::update(cid, tags); \
+ tags = RawObject::NewBit::update(true, tags); \
+ __ orq(RDI, Immediate(tags)); \
__ movq(FieldAddress(RAX, type_name::tags_offset()), RDI); /* Tags. */ \
} \
/* Set the length field. */ \
@@ -2017,7 +2020,10 @@
// Get the class index and insert it into the tags.
// This also clears the hash, which is in the high bits of the tags.
- __ orq(RDI, Immediate(RawObject::ClassIdTag::encode(cid)));
+ uint32_t tags = 0;
+ tags = RawObject::ClassIdTag::update(cid, tags);
+ tags = RawObject::NewBit::update(true, tags);
+ __ orq(RDI, Immediate(tags));
__ movq(FieldAddress(RAX, String::tags_offset()), RDI); // Tags.
}
diff --git a/runtime/vm/compiler/jit/compiler.cc b/runtime/vm/compiler/jit/compiler.cc
index aad6e73..371fafa 100644
--- a/runtime/vm/compiler/jit/compiler.cc
+++ b/runtime/vm/compiler/jit/compiler.cc
@@ -23,6 +23,7 @@
#include "vm/compiler/backend/type_propagator.h"
#include "vm/compiler/cha.h"
#include "vm/compiler/compiler_pass.h"
+#include "vm/compiler/compiler_state.h"
#include "vm/compiler/frontend/flow_graph_builder.h"
#include "vm/compiler/frontend/kernel_to_il.h"
#include "vm/compiler/jit/jit_call_specializer.h"
@@ -133,18 +134,6 @@
precompilation,
"Precompilation mode");
-static void UnsafeModeHandler(bool value) {
- if (value) {
- FLAG_omit_strong_type_checks = true;
- FLAG_use_strong_mode_types = false;
- }
-}
-
-DEFINE_FLAG_HANDLER(UnsafeModeHandler,
- experimental_unsafe_mode_use_at_your_own_risk,
- "Omit runtime strong mode type checks and disable "
- "optimizations based on types.");
-
#ifndef DART_PRECOMPILED_RUNTIME
bool UseKernelFrontEndFor(ParsedFunction* parsed_function) {
@@ -688,7 +677,10 @@
THR_Print("--> FAIL: Loading invalidation.");
}
}
- if (!thread()->cha()->IsConsistentWithCurrentHierarchy()) {
+ if (!thread()
+ ->compiler_state()
+ .cha()
+ .IsConsistentWithCurrentHierarchy()) {
code_is_valid = false;
if (trace_compiler) {
THR_Print("--> FAIL: Class hierarchy has new subclasses.");
@@ -718,7 +710,7 @@
// The generated code was compiled under certain assumptions about
// class hierarchy and field types. Register these dependencies
// to ensure that the code will be deoptimized if they are violated.
- thread()->cha()->RegisterDependencies(code);
+ thread()->compiler_state().cha().RegisterDependencies(code);
const ZoneGrowableArray<const Field*>& guarded_fields =
*flow_graph->parsed_function().guarded_fields();
@@ -753,7 +745,7 @@
if (!isolate()->background_compiler()->is_running()) {
// The background compiler is being stopped.
Compiler::AbortBackgroundCompilation(
- Thread::kNoDeoptId, "Background compilation is being stopped");
+ DeoptId::kNone, "Background compilation is being stopped");
}
}
@@ -788,16 +780,12 @@
Code* volatile result = &Code::ZoneHandle(zone);
while (!done) {
*result = Code::null();
- const intptr_t prev_deopt_id = thread()->deopt_id();
- thread()->set_deopt_id(0);
LongJumpScope jump;
if (setjmp(*jump.Set()) == 0) {
FlowGraph* flow_graph = nullptr;
ZoneGrowableArray<const ICData*>* ic_data_array = nullptr;
- // Class hierarchy analysis is registered with the thread in the
- // constructor and unregisters itself upon destruction.
- CHA cha(thread());
+ CompilerState compiler_state(thread());
// TimerScope needs an isolate to be properly terminated in case of a
// LongJump.
@@ -825,7 +813,7 @@
if (Compiler::IsBackgroundCompilation() &&
(function.ic_data_array() == Array::null())) {
Compiler::AbortBackgroundCompilation(
- Thread::kNoDeoptId, "RestoreICDataMap: ICData array cleared.");
+ DeoptId::kNone, "RestoreICDataMap: ICData array cleared.");
}
}
@@ -968,8 +956,6 @@
thread()->clear_sticky_error();
}
}
- // Reset global isolate state.
- thread()->set_deopt_id(prev_deopt_id);
}
return result->raw();
}
@@ -1029,7 +1015,7 @@
// Loading occured while parsing. We need to abort here because state
// changed while compiling.
Compiler::AbortBackgroundCompilation(
- Thread::kNoDeoptId,
+ DeoptId::kNone,
"Invalidated state during parsing because of script loading");
}
}
@@ -1366,8 +1352,7 @@
ASSERT(!function.IsIrregexpFunction());
// In background compilation, parser can produce 'errors": bailouts
// if state changed while compiling in background.
- const intptr_t prev_deopt_id = Thread::Current()->deopt_id();
- Thread::Current()->set_deopt_id(0);
+ CompilerState state(Thread::Current());
LongJumpScope jump;
if (setjmp(*jump.Set()) == 0) {
ZoneGrowableArray<const ICData*>* ic_data_array =
@@ -1399,7 +1384,6 @@
// Only possible with background compilation.
ASSERT(Compiler::IsBackgroundCompilation());
}
- Thread::Current()->set_deopt_id(prev_deopt_id);
}
RawError* Compiler::CompileAllFunctions(const Class& cls) {
@@ -1844,7 +1828,7 @@
// TODO(srdjan): Checking different strategy for collecting garbage
// accumulated by background compiler.
if (isolate_->heap()->NeedsGarbageCollection()) {
- isolate_->heap()->CollectAllGarbage();
+ isolate_->heap()->CollectMostGarbage();
}
{
MonitorLocker ml(queue_monitor_);
diff --git a/runtime/vm/compiler/jit/compiler.h b/runtime/vm/compiler/jit/compiler.h
index 38946f1..68ef8d1 100644
--- a/runtime/vm/compiler/jit/compiler.h
+++ b/runtime/vm/compiler/jit/compiler.h
@@ -6,6 +6,7 @@
#define RUNTIME_VM_COMPILER_JIT_COMPILER_H_
#include "vm/allocation.h"
+#include "vm/compiler/compiler_state.h"
#include "vm/growable_array.h"
#include "vm/runtime_entry.h"
#include "vm/thread_pool.h"
@@ -79,7 +80,7 @@
class Compiler : public AllStatic {
public:
- static const intptr_t kNoOSRDeoptId = Thread::kNoDeoptId;
+ static const intptr_t kNoOSRDeoptId = DeoptId::kNone;
static bool IsBackgroundCompilation();
// The result for a function may change if debugging gets turned on/off.
diff --git a/runtime/vm/compiler/jit/jit_call_specializer.cc b/runtime/vm/compiler/jit/jit_call_specializer.cc
index aabe9ac..aa95f7c 100644
--- a/runtime/vm/compiler/jit/jit_call_specializer.cc
+++ b/runtime/vm/compiler/jit/jit_call_specializer.cc
@@ -50,6 +50,20 @@
return false;
}
+void JitCallSpecializer::ReplaceWithStaticCall(InstanceCallInstr* instr,
+ const ICData& unary_checks,
+ const Function& target) {
+ StaticCallInstr* call = StaticCallInstr::FromCall(Z, instr, target);
+ if (unary_checks.NumberOfChecks() == 1 &&
+ unary_checks.GetExactnessAt(0).IsExact()) {
+ if (unary_checks.GetExactnessAt(0).IsTriviallyExact()) {
+ flow_graph()->AddExactnessGuard(instr, unary_checks.GetCidAt(0));
+ }
+ call->set_entry_kind(Code::EntryKind::kUnchecked);
+ }
+ instr->ReplaceWith(call, current_iterator());
+}
+
// Tries to optimize instance call by replacing it with a faster instruction
// (e.g, binary op, field load, ..).
// TODO(dartbug.com/30635) Evaluate how much this can be shared with
@@ -134,8 +148,7 @@
Function::ZoneHandle(Z, unary_checks.GetTargetAt(0));
if (flow_graph()->CheckForInstanceCall(instr, target.kind()) ==
FlowGraph::ToCheck::kNoCheck) {
- StaticCallInstr* call = StaticCallInstr::FromCall(Z, instr, target);
- instr->ReplaceWith(call, current_iterator());
+ ReplaceWithStaticCall(instr, unary_checks, target);
return;
}
}
@@ -160,8 +173,7 @@
// Call can still deoptimize, do not detach environment from instr.
const Function& target =
Function::ZoneHandle(Z, unary_checks.GetTargetAt(0));
- StaticCallInstr* call = StaticCallInstr::FromCall(Z, instr, target);
- instr->ReplaceWith(call, current_iterator());
+ ReplaceWithStaticCall(instr, unary_checks, target);
} else {
PolymorphicInstanceCallInstr* call =
new (Z) PolymorphicInstanceCallInstr(instr, targets,
@@ -199,7 +211,7 @@
if (Compiler::IsBackgroundCompilation()) {
isolate()->AddDeoptimizingBoxedField(field);
Compiler::AbortBackgroundCompilation(
- Thread::kNoDeoptId, "Unboxing instance field while compiling");
+ DeoptId::kNone, "Unboxing instance field while compiling");
UNREACHABLE();
}
if (FLAG_trace_optimization || FLAG_trace_field_guards) {
diff --git a/runtime/vm/compiler/jit/jit_call_specializer.h b/runtime/vm/compiler/jit/jit_call_specializer.h
index 67713cb..bbb00e3 100644
--- a/runtime/vm/compiler/jit/jit_call_specializer.h
+++ b/runtime/vm/compiler/jit/jit_call_specializer.h
@@ -34,6 +34,10 @@
intptr_t num_context_variables,
Value* context_value);
+ void ReplaceWithStaticCall(InstanceCallInstr* instr,
+ const ICData& unary_checks,
+ const Function& target);
+
DISALLOW_COPY_AND_ASSIGN(JitCallSpecializer);
};
diff --git a/runtime/vm/dart_api_impl_test.cc b/runtime/vm/dart_api_impl_test.cc
index 6bf1cd1..9b50641 100644
--- a/runtime/vm/dart_api_impl_test.cc
+++ b/runtime/vm/dart_api_impl_test.cc
@@ -426,17 +426,17 @@
#endif // !PRODUCT
TEST_CASE(DartAPI_ErrorHandleTypes) {
- const String& compile_message = String::Handle(String::New("CompileError"));
- const String& fatal_message = String::Handle(String::New("FatalError"));
-
Dart_Handle not_error = NewString("NotError");
- Dart_Handle api_error = Api::NewError("Api%s", "Error");
+ Dart_Handle api_error = Dart_NewApiError("ApiError");
Dart_Handle exception_error =
Dart_NewUnhandledExceptionError(NewString("ExceptionError"));
- Dart_Handle compile_error =
- Api::NewHandle(thread, LanguageError::New(compile_message));
- Dart_Handle fatal_error =
- Api::NewHandle(thread, UnwindError::New(fatal_message));
+ Dart_Handle compile_error = Dart_NewCompilationError("CompileError");
+ Dart_Handle fatal_error;
+ {
+ TransitionNativeToVM transition(thread);
+ const String& fatal_message = String::Handle(String::New("FatalError"));
+ fatal_error = Api::NewHandle(thread, UnwindError::New(fatal_message));
+ }
EXPECT_VALID(not_error);
EXPECT(Dart_IsError(api_error));
@@ -481,8 +481,7 @@
// Test with an API Error.
const char* kApiError = "Api Error Exception Test.";
- Dart_Handle api_error = Api::NewHandle(
- thread, ApiError::New(String::Handle(String::New(kApiError))));
+ Dart_Handle api_error = Dart_NewApiError(kApiError);
Dart_Handle exception_error = Dart_NewUnhandledExceptionError(api_error);
EXPECT(!Dart_IsApiError(exception_error));
EXPECT(Dart_IsUnhandledExceptionError(exception_error));
@@ -493,9 +492,7 @@
// Test with a Compilation Error.
const char* kCompileError = "CompileError Exception Test.";
- const String& compile_message = String::Handle(String::New(kCompileError));
- Dart_Handle compile_error =
- Api::NewHandle(thread, LanguageError::New(compile_message));
+ Dart_Handle compile_error = Dart_NewCompilationError(kCompileError);
exception_error = Dart_NewUnhandledExceptionError(compile_error);
EXPECT(!Dart_IsApiError(exception_error));
EXPECT(Dart_IsUnhandledExceptionError(exception_error));
@@ -505,18 +502,20 @@
EXPECT_STREQ(kCompileError, exception_cstr);
// Test with a Fatal Error.
- const String& fatal_message =
- String::Handle(String::New("FatalError Exception Test."));
- Dart_Handle fatal_error =
- Api::NewHandle(thread, UnwindError::New(fatal_message));
+ Dart_Handle fatal_error;
+ {
+ TransitionNativeToVM transition(thread);
+ const String& fatal_message =
+ String::Handle(String::New("FatalError Exception Test."));
+ fatal_error = Api::NewHandle(thread, UnwindError::New(fatal_message));
+ }
exception_error = Dart_NewUnhandledExceptionError(fatal_error);
EXPECT(Dart_IsError(exception_error));
EXPECT(!Dart_IsUnhandledExceptionError(exception_error));
// Test with a Regular object.
const char* kRegularString = "Regular String Exception Test.";
- Dart_Handle obj = Api::NewHandle(thread, String::New(kRegularString));
- exception_error = Dart_NewUnhandledExceptionError(obj);
+ exception_error = Dart_NewUnhandledExceptionError(NewString(kRegularString));
EXPECT(!Dart_IsApiError(exception_error));
EXPECT(Dart_IsUnhandledExceptionError(exception_error));
EXPECT(Dart_IsString(Dart_ErrorGetException(exception_error)));
@@ -2688,7 +2687,11 @@
{
EXPECT(thread->api_top_scope() != NULL);
HANDLESCOPE(thread);
- const String& str1 = String::Handle(String::New("Test String"));
+ String& str1 = String::Handle();
+ {
+ TransitionNativeToVM transition(thread);
+ str1 = String::New("Test String");
+ }
Dart_Handle ref = Api::NewHandle(thread, str1.raw());
String& str2 = String::Handle();
str2 ^= Api::UnwrapHandle(ref);
@@ -2714,12 +2717,12 @@
{
CHECK_API_SCOPE(thread);
HANDLESCOPE(thread);
- Dart_Handle ref1 = Api::NewHandle(thread, String::New(kTestString1));
+ Dart_Handle ref1 = Dart_NewStringFromCString(kTestString1);
for (int i = 0; i < 1000; i++) {
handles[i] = Dart_NewPersistentHandle(ref1);
}
Dart_EnterScope();
- Dart_Handle ref2 = Api::NewHandle(thread, String::New(kTestString2));
+ Dart_Handle ref2 = Dart_NewStringFromCString(kTestString2);
for (int i = 1000; i < 2000; i++) {
handles[i] = Dart_NewPersistentHandle(ref2);
}
@@ -2812,14 +2815,14 @@
String& str = String::Handle();
// Start with a known persistent handle.
- Dart_Handle ref1 = Api::NewHandle(T, String::New(kTestString1));
+ Dart_Handle ref1 = Dart_NewStringFromCString(kTestString1);
Dart_PersistentHandle obj = Dart_NewPersistentHandle(ref1);
EXPECT(state->IsValidPersistentHandle(obj));
str ^= PersistentHandle::Cast(obj)->raw();
EXPECT(str.Equals(kTestString1));
// Now create another local handle and assign it to the persistent handle.
- Dart_Handle ref2 = Api::NewHandle(T, String::New(kTestString2));
+ Dart_Handle ref2 = Dart_NewStringFromCString(kTestString2);
Dart_SetPersistentHandle(obj, ref2);
str ^= PersistentHandle::Cast(obj)->raw();
EXPECT(str.Equals(kTestString2));
@@ -2829,6 +2832,18 @@
EXPECT(Dart_IsNull(obj));
}
+static Dart_Handle AllocateNewString(const char* c_str) {
+ Thread* thread = Thread::Current();
+ TransitionNativeToVM transition(thread);
+ return Api::NewHandle(thread, String::New(c_str, Heap::kNew));
+}
+
+static Dart_Handle AllocateOldString(const char* c_str) {
+ Thread* thread = Thread::Current();
+ TransitionNativeToVM transition(thread);
+ return Api::NewHandle(thread, String::New(c_str, Heap::kOld));
+}
+
static Dart_Handle AsHandle(Dart_PersistentHandle weak) {
return Dart_HandleFromPersistent(weak);
}
@@ -2851,6 +2866,10 @@
}
TEST_CASE(DartAPI_WeakPersistentHandle) {
+ // GCs due to allocations or weak handle creation can cause early promotion
+ // and interfer with the scenario this test is verifying.
+ NoHeapGrowthControlScope force_growth;
+
Dart_Handle local_new_ref = Dart_Null();
weak_new_ref = Dart_NewWeakPersistentHandle(local_new_ref, NULL, 0,
WeakPersistentHandleCallback);
@@ -2863,17 +2882,12 @@
Dart_EnterScope();
// Create an object in new space.
- Dart_Handle new_ref = NewString("new string");
+ Dart_Handle new_ref = AllocateNewString("new string");
EXPECT_VALID(new_ref);
// Create an object in old space.
- Dart_Handle old_ref;
- {
- CHECK_API_SCOPE(thread);
- HANDLESCOPE(thread);
- old_ref = Api::NewHandle(thread, String::New("old string", Heap::kOld));
- EXPECT_VALID(old_ref);
- }
+ Dart_Handle old_ref = AllocateOldString("old string");
+ EXPECT_VALID(old_ref);
// Create a weak ref to the new space object.
weak_new_ref = Dart_NewWeakPersistentHandle(new_ref, NULL, 0,
@@ -2891,6 +2905,7 @@
TransitionNativeToVM transition(thread);
// Garbage collect new space.
GCTestHelper::CollectNewSpace();
+ GCTestHelper::WaitForGCTasks();
}
// Nothing should be invalidated or cleared.
@@ -2911,6 +2926,7 @@
TransitionNativeToVM transition(thread);
// Garbage collect old space.
Isolate::Current()->heap()->CollectGarbage(Heap::kOld);
+ GCTestHelper::WaitForGCTasks();
}
// Nothing should be invalidated or cleared.
@@ -2967,6 +2983,7 @@
// Garbage collect one last time to revisit deleted handles.
Isolate::Current()->heap()->CollectGarbage(Heap::kNew);
Isolate::Current()->heap()->CollectGarbage(Heap::kOld);
+ GCTestHelper::WaitForGCTasks();
}
}
@@ -3156,14 +3173,14 @@
// Check that external allocation in old space can trigger GC.
Isolate* isolate = Isolate::Current();
Dart_EnterScope();
- Dart_Handle live = Api::NewHandle(thread, String::New("live", Heap::kOld));
+ Dart_Handle live = AllocateOldString("live");
EXPECT_VALID(live);
Dart_WeakPersistentHandle weak = NULL;
EXPECT_EQ(0, isolate->heap()->ExternalInWords(Heap::kOld));
const intptr_t kSmallExternalSize = 1 * KB;
{
Dart_EnterScope();
- Dart_Handle dead = Api::NewHandle(thread, String::New("dead", Heap::kOld));
+ Dart_Handle dead = AllocateOldString("dead");
EXPECT_VALID(dead);
weak = Dart_NewWeakPersistentHandle(dead, NULL, kSmallExternalSize,
NopCallback);
@@ -3241,8 +3258,7 @@
CHECK_API_SCOPE(thread);
HANDLESCOPE(thread);
- Dart_Handle local =
- Api::NewHandle(thread, String::New("strongly reachable", Heap::kOld));
+ Dart_Handle local = AllocateOldString("strongly reachable");
strong = Dart_NewPersistentHandle(local);
strong_weak = Dart_NewWeakPersistentHandle(local, NULL, 0, NopCallback);
@@ -3252,21 +3268,21 @@
EXPECT_VALID(AsHandle(strong_weak));
EXPECT(Dart_IdentityEquals(AsHandle(strong), AsHandle(strong_weak)))
- weak1 = Dart_NewWeakPersistentHandle(
- Api::NewHandle(thread, String::New("weakly reachable 1", Heap::kOld)),
- NULL, 0, ImplicitReferencesCallback);
+ weak1 =
+ Dart_NewWeakPersistentHandle(AllocateOldString("weakly reachable 1"),
+ NULL, 0, ImplicitReferencesCallback);
EXPECT(!Dart_IsNull(AsHandle(weak1)));
EXPECT_VALID(AsHandle(weak1));
- weak2 = Dart_NewWeakPersistentHandle(
- Api::NewHandle(thread, String::New("weakly reachable 2", Heap::kOld)),
- NULL, 0, ImplicitReferencesCallback);
+ weak2 =
+ Dart_NewWeakPersistentHandle(AllocateOldString("weakly reachable 2"),
+ NULL, 0, ImplicitReferencesCallback);
EXPECT(!Dart_IsNull(AsHandle(weak2)));
EXPECT_VALID(AsHandle(weak2));
- weak3 = Dart_NewWeakPersistentHandle(
- Api::NewHandle(thread, String::New("weakly reachable 3", Heap::kOld)),
- NULL, 0, ImplicitReferencesCallback);
+ weak3 =
+ Dart_NewWeakPersistentHandle(AllocateOldString("weakly reachable 3"),
+ NULL, 0, ImplicitReferencesCallback);
EXPECT(!Dart_IsNull(AsHandle(weak3)));
EXPECT_VALID(AsHandle(weak3));
}
@@ -3306,8 +3322,7 @@
CHECK_API_SCOPE(thread);
HANDLESCOPE(thread);
- Dart_Handle local =
- Api::NewHandle(thread, String::New("strongly reachable", Heap::kOld));
+ Dart_Handle local = AllocateOldString("strongly reachable");
strong = Dart_NewPersistentHandle(local);
strong_weak = Dart_NewWeakPersistentHandle(local, NULL, 0, NopCallback);
@@ -3317,21 +3332,21 @@
EXPECT_VALID(AsHandle(strong_weak));
EXPECT(Dart_IdentityEquals(AsHandle(strong), AsHandle(strong_weak)))
- weak1 = Dart_NewWeakPersistentHandle(
- Api::NewHandle(thread, String::New("weakly reachable 1", Heap::kNew)),
- NULL, 0, ImplicitReferencesCallback);
+ weak1 =
+ Dart_NewWeakPersistentHandle(AllocateNewString("weakly reachable 1"),
+ NULL, 0, ImplicitReferencesCallback);
EXPECT(!Dart_IsNull(AsHandle(weak1)));
EXPECT_VALID(AsHandle(weak1));
- weak2 = Dart_NewWeakPersistentHandle(
- Api::NewHandle(thread, String::New("weakly reachable 2", Heap::kNew)),
- NULL, 0, ImplicitReferencesCallback);
+ weak2 =
+ Dart_NewWeakPersistentHandle(AllocateNewString("weakly reachable 2"),
+ NULL, 0, ImplicitReferencesCallback);
EXPECT(!Dart_IsNull(AsHandle(weak2)));
EXPECT_VALID(AsHandle(weak2));
- weak3 = Dart_NewWeakPersistentHandle(
- Api::NewHandle(thread, String::New("weakly reachable 3", Heap::kNew)),
- NULL, 0, ImplicitReferencesCallback);
+ weak3 =
+ Dart_NewWeakPersistentHandle(AllocateNewString("weakly reachable 3"),
+ NULL, 0, ImplicitReferencesCallback);
EXPECT(!Dart_IsNull(AsHandle(weak3)));
EXPECT_VALID(AsHandle(weak3));
}
@@ -4924,6 +4939,7 @@
static Dart_Handle PrivateLibName(Dart_Handle lib, const char* str) {
EXPECT(Dart_IsLibrary(lib));
Thread* thread = Thread::Current();
+ TransitionNativeToVM transition(thread);
const Library& library_obj = Api::UnwrapLibraryHandle(thread->zone(), lib);
const String& name = String::Handle(String::New(str));
return Api::NewHandle(thread, library_obj.PrivateName(name));
@@ -6407,24 +6423,28 @@
result = Dart_LoadLibrary(url, Dart_Null(), source, 0, 0);
EXPECT_VALID(result);
- const char* patchNames[] = {"main library patch", "patch class only",
- "patch no class"};
- const char* patches[] = {kPatchChars, kPatchClassOnlyChars,
- kPatchNoClassChars};
- const String& lib_url = String::Handle(String::New("theLibrary"));
+ {
+ TransitionNativeToVM transition(thread);
+ const char* patchNames[] = {"main library patch", "patch class only",
+ "patch no class"};
+ const char* patches[] = {kPatchChars, kPatchClassOnlyChars,
+ kPatchNoClassChars};
+ const String& lib_url = String::Handle(String::New("theLibrary"));
- const Library& lib = Library::Handle(Library::LookupLibrary(thread, lib_url));
+ const Library& lib =
+ Library::Handle(Library::LookupLibrary(thread, lib_url));
- for (int i = 0; i < 3; i++) {
- const String& patch_url = String::Handle(String::New(patchNames[i]));
- const String& patch_source = String::Handle(String::New(patches[i]));
- const Script& patch_script = Script::Handle(
- Script::New(patch_url, patch_source, RawScript::kPatchTag));
+ for (int i = 0; i < 3; i++) {
+ const String& patch_url = String::Handle(String::New(patchNames[i]));
+ const String& patch_source = String::Handle(String::New(patches[i]));
+ const Script& patch_script = Script::Handle(
+ Script::New(patch_url, patch_source, RawScript::kPatchTag));
- const Error& err = Error::Handle(lib.Patch(patch_script));
- if (!err.IsNull()) {
- OS::PrintErr("Patching error: %s\n", err.ToErrorCString());
- EXPECT(false);
+ const Error& err = Error::Handle(lib.Patch(patch_script));
+ if (!err.IsNull()) {
+ OS::PrintErr("Patching error: %s\n", err.ToErrorCString());
+ EXPECT(false);
+ }
}
}
result = Dart_SetNativeResolver(result, &PatchNativeResolver, NULL);
@@ -6484,9 +6504,17 @@
EXPECT_VALID(Dart_IntegerToInt64(result, &value));
EXPECT_EQ(8, value);
- // Make sure all source files show up in the patched library.
- const Array& lib_scripts = Array::Handle(lib.LoadedScripts());
- EXPECT_EQ(4, lib_scripts.Length());
+ {
+ TransitionNativeToVM transition(thread);
+ // Make sure all source files show up in the patched library.
+ const String& lib_url = String::Handle(String::New("theLibrary"));
+
+ const Library& lib =
+ Library::Handle(Library::LookupLibrary(thread, lib_url));
+
+ const Array& lib_scripts = Array::Handle(lib.LoadedScripts());
+ EXPECT_EQ(4, lib_scripts.Length());
+ }
}
static void MyNativeFunction1(Dart_NativeArguments args) {
@@ -6827,15 +6855,18 @@
EXPECT_VALID(lib);
Library& lib_obj = Library::Handle();
lib_obj ^= Api::UnwrapHandle(lib);
- EXPECT_STREQ("foo:///main.dart", String::Handle(lib_obj.url()).ToCString());
- const Array& lib_scripts = Array::Handle(lib_obj.LoadedScripts());
- Script& script = Script::Handle();
- String& uri = String::Handle();
- for (intptr_t i = 0; i < lib_scripts.Length(); i++) {
- script ^= lib_scripts.At(i);
- uri = script.url();
- const char* uri_str = uri.ToCString();
- EXPECT(strstr(uri_str, "foo:///") == uri_str);
+ {
+ TransitionNativeToVM transition(thread);
+ EXPECT_STREQ("foo:///main.dart", String::Handle(lib_obj.url()).ToCString());
+ const Array& lib_scripts = Array::Handle(lib_obj.LoadedScripts());
+ Script& script = Script::Handle();
+ String& uri = String::Handle();
+ for (intptr_t i = 0; i < lib_scripts.Length(); i++) {
+ script ^= lib_scripts.At(i);
+ uri = script.url();
+ const char* uri_str = uri.ToCString();
+ EXPECT(strstr(uri_str, "foo:///") == uri_str);
+ }
}
result = Dart_FinalizeLoading(false);
EXPECT_VALID(result);
@@ -8006,7 +8037,7 @@
// by one.
TEST_CASE(DartAPI_OneOldSpacePeer) {
Isolate* isolate = Isolate::Current();
- Dart_Handle str = Api::NewHandle(thread, String::New("str", Heap::kOld));
+ Dart_Handle str = AllocateOldString("str");
EXPECT_VALID(str);
EXPECT(Dart_IsString(str));
EXPECT_EQ(0, isolate->heap()->PeerCount());
@@ -8043,7 +8074,7 @@
Thread* T = Thread::Current();
CHECK_API_SCOPE(T);
HANDLESCOPE(T);
- Dart_Handle str = Api::NewHandle(T, String::New("str", Heap::kOld));
+ Dart_Handle str = AllocateOldString("str");
EXPECT_VALID(str);
EXPECT(Dart_IsString(str));
EXPECT_EQ(0, isolate->heap()->PeerCount());
@@ -8077,7 +8108,7 @@
// by two.
TEST_CASE(DartAPI_TwoOldSpacePeers) {
Isolate* isolate = Isolate::Current();
- Dart_Handle s1 = Api::NewHandle(thread, String::New("s1", Heap::kOld));
+ Dart_Handle s1 = AllocateOldString("s1");
EXPECT_VALID(s1);
EXPECT(Dart_IsString(s1));
EXPECT_EQ(0, isolate->heap()->PeerCount());
@@ -8090,7 +8121,7 @@
o1 = &o1;
EXPECT_VALID(Dart_GetPeer(s1, &o1));
EXPECT(o1 == reinterpret_cast<void*>(&p1));
- Dart_Handle s2 = Api::NewHandle(thread, String::New("s2", Heap::kOld));
+ Dart_Handle s2 = AllocateOldString("s2");
EXPECT_VALID(s2);
EXPECT(Dart_IsString(s2));
EXPECT_EQ(1, isolate->heap()->PeerCount());
@@ -8125,7 +8156,7 @@
Thread* T = Thread::Current();
CHECK_API_SCOPE(T);
HANDLESCOPE(T);
- Dart_Handle s1 = Api::NewHandle(T, String::New("s1", Heap::kOld));
+ Dart_Handle s1 = AllocateOldString("s1");
EXPECT_VALID(s1);
EXPECT(Dart_IsString(s1));
EXPECT_EQ(0, isolate->heap()->PeerCount());
@@ -8138,7 +8169,7 @@
o1 = &o1;
EXPECT_VALID(Dart_GetPeer(s1, &o1));
EXPECT(o1 == reinterpret_cast<void*>(&p1));
- Dart_Handle s2 = Api::NewHandle(T, String::New("s2", Heap::kOld));
+ Dart_Handle s2 = AllocateOldString("s2");
EXPECT_VALID(s2);
EXPECT(Dart_IsString(s2));
EXPECT_EQ(1, isolate->heap()->PeerCount());
diff --git a/runtime/vm/dart_entry_test.cc b/runtime/vm/dart_entry_test.cc
index 2e8f5c5..496c1a0 100644
--- a/runtime/vm/dart_entry_test.cc
+++ b/runtime/vm/dart_entry_test.cc
@@ -16,7 +16,7 @@
namespace dart {
-TEST_CASE(DartEntry) {
+ISOLATE_UNIT_TEST_CASE(DartEntry) {
const char* kScriptChars =
"class A {\n"
" static foo() { return 42; }\n"
@@ -42,7 +42,7 @@
EXPECT_EQ(Smi::New(42), retval.raw());
}
-TEST_CASE(InvokeStatic_CompileError) {
+ISOLATE_UNIT_TEST_CASE(InvokeStatic_CompileError) {
const char* kScriptChars =
"class A {\n"
" static foo() { return ++++; }\n"
@@ -66,7 +66,7 @@
EXPECT_SUBSTRING("++++", Error::Cast(retval).ToErrorCString());
}
-TEST_CASE(InvokeDynamic_CompileError) {
+ISOLATE_UNIT_TEST_CASE(InvokeDynamic_CompileError) {
const char* kScriptChars =
"class A {\n"
" foo() { return ++++; }\n"
diff --git a/runtime/vm/debugger.cc b/runtime/vm/debugger.cc
index f1cdf09..306cf6f 100644
--- a/runtime/vm/debugger.cc
+++ b/runtime/vm/debugger.cc
@@ -250,7 +250,7 @@
token_pos_initialized_(false),
token_pos_(TokenPosition::kNoSource),
try_index_(-1),
- deopt_id_(Thread::kNoDeoptId),
+ deopt_id_(DeoptId::kNone),
line_number_(-1),
column_number_(-1),
context_level_(-1),
@@ -700,7 +700,7 @@
GetVarDescriptors();
intptr_t deopt_id = DeoptId();
- if (deopt_id == Thread::kNoDeoptId) {
+ if (deopt_id == DeoptId::kNone) {
PrintDescriptorsError("Missing deopt id");
}
intptr_t var_desc_len = var_descriptors_.Length();
diff --git a/runtime/vm/deferred_objects.cc b/runtime/vm/deferred_objects.cc
index 153f2ae..9529569 100644
--- a/runtime/vm/deferred_objects.cc
+++ b/runtime/vm/deferred_objects.cc
@@ -108,7 +108,7 @@
// Check that deopt_id exists.
// TODO(vegorov): verify after deoptimization targets as well.
#ifdef DEBUG
- ASSERT(Thread::IsDeoptAfter(deopt_id_) ||
+ ASSERT(DeoptId::IsDeoptAfter(deopt_id_) ||
(code.GetPcForDeoptId(deopt_id_, RawPcDescriptors::kDeopt) != 0));
#endif
diff --git a/runtime/vm/deopt_instructions.cc b/runtime/vm/deopt_instructions.cc
index 06641ab..ec6fa74 100644
--- a/runtime/vm/deopt_instructions.cc
+++ b/runtime/vm/deopt_instructions.cc
@@ -862,7 +862,7 @@
static_cast<DeoptRetAddressInstr*>(instr);
// The following assert may trigger when displaying a backtrace
// from the simulator.
- ASSERT(Thread::IsDeoptAfter(ret_address_instr->deopt_id()));
+ ASSERT(DeoptId::IsDeoptAfter(ret_address_instr->deopt_id()));
ASSERT(!object_table.IsNull());
Thread* thread = Thread::Current();
Zone* zone = thread->zone();
diff --git a/runtime/vm/flag_list.h b/runtime/vm/flag_list.h
index 440bbe8..83c1162 100644
--- a/runtime/vm/flag_list.h
+++ b/runtime/vm/flag_list.h
@@ -55,6 +55,9 @@
// D(name, type, default_value, comment)
// C(name, precompiled_value, product_value, type, default_value, comment)
#define FLAG_LIST(P, R, D, C) \
+ P(experimental_unsafe_mode_use_at_your_own_risk, bool, false, \
+ "Omit runtime strong mode type checks and disable optimizations based on " \
+ "types.") \
P(abort_on_oom, bool, false, \
"Abort if memory allocation fails - use only with --old-gen-heap-size") \
C(async_debugger, false, false, bool, true, \
@@ -129,7 +132,6 @@
"Max size of new gen semi space in MB") \
P(new_gen_semi_initial_size, int, (kWordSize <= 4) ? 1 : 2, \
"Initial size of new gen semi space in MB") \
- P(omit_strong_type_checks, bool, false, "Omit strong mode type checks.") \
P(optimization_counter_threshold, int, USING_KBC ? -1 : 30000, \
"Function's usage-counter value before it is optimized, -1 means never") \
P(old_gen_heap_size, int, kDefaultMaxOldGenHeapSize, \
diff --git a/runtime/vm/globals.h b/runtime/vm/globals.h
index 4fa43f2..a261211 100644
--- a/runtime/vm/globals.h
+++ b/runtime/vm/globals.h
@@ -49,10 +49,42 @@
((sizeof(array) / sizeof(*(array))) / \
static_cast<intptr_t>(!(sizeof(array) % sizeof(*(array))))) // NOLINT
+#if defined(PRODUCT) && defined(DEBUG)
+#error Both PRODUCT and DEBUG defined.
+#endif // defined(PRODUCT) && defined(DEBUG)
+
+#if defined(PRODUCT)
+#define NOT_IN_PRODUCT(code)
+#else // defined(PRODUCT)
+#define NOT_IN_PRODUCT(code) code
+#endif // defined(PRODUCT)
+
+#if defined(DART_PRECOMPILED_RUNTIME) && defined(DART_PRECOMPILER)
+#error DART_PRECOMPILED_RUNTIME and DART_PRECOMPILER are mutually exclusive
+#endif // defined(DART_PRECOMPILED_RUNTIME) && defined(DART_PRECOMPILER)
+
+#if defined(DART_PRECOMPILED_RUNTIME) && defined(DART_NOSNAPSHOT)
+#error DART_PRECOMPILED_RUNTIME and DART_NOSNAPSHOT are mutually exclusive
+#endif // defined(DART_PRECOMPILED_RUNTIME) && defined(DART_NOSNAPSHOT)
+
+#if defined(DART_PRECOMPILED_RUNTIME)
+#define NOT_IN_PRECOMPILED(code)
+#else
+#define NOT_IN_PRECOMPILED(code) code
+#endif // defined(DART_PRECOMPILED_RUNTIME)
+
#if defined(ARCH_IS_64_BIT)
#define HASH_IN_OBJECT_HEADER 1
#endif
+// For checking deterministic graph generation, we can store instruction
+// tag in the ICData and check it when recreating the flow graph in
+// optimizing compiler. Enable it for other modes (product, release) if needed
+// for debugging.
+#if defined(DEBUG)
+#define TAG_IC_DATA
+#endif
+
// The expression OFFSET_OF(type, field) computes the byte-offset of
// the specified field relative to the containing type.
//
diff --git a/runtime/vm/guard_field_test.cc b/runtime/vm/guard_field_test.cc
index 0feabcc..4170370 100644
--- a/runtime/vm/guard_field_test.cc
+++ b/runtime/vm/guard_field_test.cc
@@ -63,6 +63,7 @@
Dart_Handle lib = TestCase::LoadTestScript(script_chars, NULL);
Dart_Handle result = Dart_Invoke(lib, NewString("main"), 0, NULL);
EXPECT_VALID(result);
+ TransitionNativeToVM transition(thread);
Field& f1 = Field::ZoneHandle(LookupField(lib, "A", "f1"));
Field& f2 = Field::ZoneHandle(LookupField(lib, "A", "f2"));
Field& f3 = Field::ZoneHandle(LookupField(lib, "A", "f3"));
@@ -113,6 +114,7 @@
Dart_Handle lib = TestCase::LoadTestScript(script_chars, NULL);
Dart_Handle result = Dart_Invoke(lib, NewString("main"), 0, NULL);
EXPECT_VALID(result);
+ TransitionNativeToVM transition(thread);
Field& f1 = Field::ZoneHandle(LookupField(lib, "A", "f1"));
Field& f2 = Field::ZoneHandle(LookupField(lib, "A", "f2"));
Field& f3 = Field::ZoneHandle(LookupField(lib, "A", "f3"));
@@ -165,6 +167,7 @@
Dart_Handle lib = TestCase::LoadTestScript(script_chars, NULL);
Dart_Handle result = Dart_Invoke(lib, NewString("main"), 0, NULL);
EXPECT_VALID(result);
+ TransitionNativeToVM transition(thread);
Field& f1 = Field::ZoneHandle(LookupField(lib, "A", "f1"));
Field& f2 = Field::ZoneHandle(LookupField(lib, "A", "f2"));
Field& f3 = Field::ZoneHandle(LookupField(lib, "A", "f3"));
@@ -220,6 +223,7 @@
"}\n";
Dart_Handle lib = TestCase::LoadTestScript(script_chars, NULL);
Dart_Handle result = Dart_Invoke(lib, NewString("main"), 0, NULL);
+ TransitionNativeToVM transition(thread);
EXPECT_VALID(result);
Field& f1 = Field::ZoneHandle(LookupField(lib, "A", "f1"));
Field& f2 = Field::ZoneHandle(LookupField(lib, "A", "f2"));
@@ -269,6 +273,7 @@
Dart_Handle lib = TestCase::LoadTestScript(script_chars, NULL);
Dart_Handle result = Dart_Invoke(lib, NewString("main"), 0, NULL);
EXPECT_VALID(result);
+ TransitionNativeToVM transition(thread);
Field& f3 = Field::ZoneHandle(LookupField(lib, "A", "f3"));
const intptr_t no_length = Field::kNoFixedLength;
EXPECT_EQ(no_length, f3.guarded_list_length());
diff --git a/runtime/vm/hash_table_test.cc b/runtime/vm/hash_table_test.cc
index 88858d3..aeb8d55 100644
--- a/runtime/vm/hash_table_test.cc
+++ b/runtime/vm/hash_table_test.cc
@@ -53,7 +53,7 @@
EXPECT_EQ(0, num_deleted);
}
-TEST_CASE(HashTable) {
+ISOLATE_UNIT_TEST_CASE(HashTable) {
typedef HashTable<TestTraits, 2, 1> Table;
Table table(Thread::Current()->zone(), HashTables::New<Table>(5));
// Ensure that we did get at least 5 entries.
@@ -243,14 +243,14 @@
actual.Release();
}
-TEST_CASE(Sets) {
+ISOLATE_UNIT_TEST_CASE(Sets) {
for (intptr_t initial_capacity = 0; initial_capacity < 32;
++initial_capacity) {
TestSet<UnorderedHashSet<TestTraits> >(initial_capacity, false);
}
}
-TEST_CASE(Maps) {
+ISOLATE_UNIT_TEST_CASE(Maps) {
for (intptr_t initial_capacity = 0; initial_capacity < 32;
++initial_capacity) {
TestMap<UnorderedHashMap<TestTraits> >(initial_capacity, false);
diff --git a/runtime/vm/heap/become.cc b/runtime/vm/heap/become.cc
index 7c611aa..59bf1ff 100644
--- a/runtime/vm/heap/become.cc
+++ b/runtime/vm/heap/become.cc
@@ -26,6 +26,11 @@
uint32_t tags = 0;
tags = RawObject::SizeTag::update(size, tags);
tags = RawObject::ClassIdTag::update(kForwardingCorpse, tags);
+ bool is_old = (addr & kNewObjectAlignmentOffset) == kOldObjectAlignmentOffset;
+ tags = RawObject::OldBit::update(is_old, tags);
+ tags = RawObject::OldAndNotMarkedBit::update(is_old, tags);
+ tags = RawObject::OldAndNotRememberedBit::update(is_old, tags);
+ tags = RawObject::NewBit::update(!is_old, tags);
result->tags_ = tags;
if (size > RawObject::SizeTag::kMaxSizeTag) {
@@ -94,7 +99,7 @@
void VisitingObject(RawObject* obj) {
visiting_object_ = obj;
- if ((obj != NULL) && obj->IsRemembered()) {
+ if ((obj != NULL) && obj->IsOldObject() && obj->IsRemembered()) {
ASSERT(!obj->IsForwardingCorpse());
ASSERT(!obj->IsFreeListElement());
thread_->StoreBufferAddObjectGC(obj);
diff --git a/runtime/vm/heap/freelist.cc b/runtime/vm/heap/freelist.cc
index e4f690f..39caeb0 100644
--- a/runtime/vm/heap/freelist.cc
+++ b/runtime/vm/heap/freelist.cc
@@ -24,9 +24,11 @@
uint32_t tags = 0;
tags = RawObject::SizeTag::update(size, tags);
tags = RawObject::ClassIdTag::update(kFreeListElement, tags);
- // All words in a freelist element header should look like Smis.
- ASSERT(!reinterpret_cast<RawObject*>(tags)->IsHeapObject());
-
+ ASSERT((addr & kNewObjectAlignmentOffset) == kOldObjectAlignmentOffset);
+ tags = RawObject::OldBit::update(true, tags);
+ tags = RawObject::OldAndNotMarkedBit::update(true, tags);
+ tags = RawObject::OldAndNotRememberedBit::update(true, tags);
+ tags = RawObject::NewBit::update(false, tags);
result->tags_ = tags;
#if defined(HASH_IN_OBJECT_HEADER)
// Clearing this is mostly for neatness. The identityHashCode
diff --git a/runtime/vm/heap/heap.cc b/runtime/vm/heap/heap.cc
index 9a281b0..de9911f 100644
--- a/runtime/vm/heap/heap.cc
+++ b/runtime/vm/heap/heap.cc
@@ -95,8 +95,9 @@
if (addr != 0) {
return addr;
}
- // All GC tasks finished without allocating successfully. Run a full GC.
- CollectAllGarbage();
+ // All GC tasks finished without allocating successfully. Collect both
+ // generations.
+ CollectMostGarbage();
addr = old_space_.TryAllocate(size, type);
if (addr != 0) {
return addr;
@@ -144,7 +145,7 @@
ASSERT(space == kOld);
old_space_.AllocateExternal(cid, size);
if (old_space_.NeedsGarbageCollection()) {
- CollectAllGarbage(kExternal);
+ CollectMostGarbage(kExternal);
}
}
}
@@ -460,6 +461,12 @@
}
}
+void Heap::CollectMostGarbage(GCReason reason) {
+ Thread* thread = Thread::Current();
+ CollectNewSpaceGarbage(thread, reason);
+ CollectOldSpaceGarbage(thread, kMarkSweep, reason);
+}
+
void Heap::CollectAllGarbage(GCReason reason) {
Thread* thread = Thread::Current();
diff --git a/runtime/vm/heap/heap.h b/runtime/vm/heap/heap.h
index d4c2cf1..7f2689d 100644
--- a/runtime/vm/heap/heap.h
+++ b/runtime/vm/heap/heap.h
@@ -114,13 +114,24 @@
void NotifyIdle(int64_t deadline);
void NotifyLowMemory();
+ // Collect a single generation.
void CollectGarbage(Space space);
void CollectGarbage(GCType type, GCReason reason);
+
+ // Collect both generations by performing a scavenge followed by a
+ // mark-sweep. This function may not collect all unreachable objects. Because
+ // mark-sweep treats new space as roots, a cycle between unreachable old and
+ // new objects will not be collected until the new objects are promoted.
+ // Verification based on heap iteration should instead use CollectAllGarbage.
+ void CollectMostGarbage(GCReason reason = kFull);
+
+ // Collect both generations by performing an evacuation followed by a
+ // mark-sweep. This function will collect all unreachable objects.
void CollectAllGarbage(GCReason reason = kFull);
+
bool NeedsGarbageCollection() const {
return old_space_.NeedsGarbageCollection();
}
-
void WaitForSweeperTasks(Thread* thread);
// Enables growth control on the page space heaps. This should be
diff --git a/runtime/vm/heap/heap_test.cc b/runtime/vm/heap/heap_test.cc
index e2f2379..c332320 100644
--- a/runtime/vm/heap/heap_test.cc
+++ b/runtime/vm/heap/heap_test.cc
@@ -253,7 +253,7 @@
virtual bool FindObject(RawObject* obj) const { return false; }
};
-TEST_CASE(FindObject) {
+ISOLATE_UNIT_TEST_CASE(FindObject) {
Isolate* isolate = Isolate::Current();
Heap* heap = isolate->heap();
Heap::Space spaces[2] = {Heap::kOld, Heap::kNew};
@@ -272,7 +272,7 @@
}
}
-TEST_CASE(IterateReadOnly) {
+ISOLATE_UNIT_TEST_CASE(IterateReadOnly) {
const String& obj = String::Handle(String::New("x", Heap::kOld));
Heap* heap = Thread::Current()->isolate()->heap();
EXPECT(heap->Contains(RawObject::ToAddr(obj.raw())));
diff --git a/runtime/vm/heap/pages.cc b/runtime/vm/heap/pages.cc
index 0d13154..17dba99 100644
--- a/runtime/vm/heap/pages.cc
+++ b/runtime/vm/heap/pages.cc
@@ -1372,7 +1372,36 @@
after.CombinedCapacityInWords() + 2 * kPageSizeInWords;
if (FLAG_log_growth) {
- THR_Print("%s: threshold=%" Pd "kB, idle_threshold=%" Pd "kB\n",
+ THR_Print("%s: threshold=%" Pd "kB, idle_threshold=%" Pd "kB, reason=gc\n",
+ heap_->isolate()->name(), gc_threshold_in_words_ / KBInWords,
+ idle_gc_threshold_in_words_ / KBInWords);
+ }
+}
+
+void PageSpaceController::EvaluateSnapshotLoad(SpaceUsage after) {
+ // Number of pages we can allocate and still be within the desired growth
+ // ratio.
+ intptr_t growth_in_pages =
+ (static_cast<intptr_t>(after.CombinedCapacityInWords() /
+ desired_utilization_) -
+ (after.CombinedCapacityInWords())) /
+ kPageSizeInWords;
+
+ // Apply growth cap.
+ growth_in_pages =
+ Utils::Minimum(static_cast<intptr_t>(heap_growth_max_), growth_in_pages);
+
+ // Save final threshold compared before growing.
+ gc_threshold_in_words_ =
+ after.CombinedCapacityInWords() + (kPageSizeInWords * growth_in_pages);
+
+ // Set a tight idle threshold.
+ idle_gc_threshold_in_words_ =
+ after.CombinedCapacityInWords() + 2 * kPageSizeInWords;
+
+ if (FLAG_log_growth) {
+ THR_Print("%s: threshold=%" Pd "kB, idle_threshold=%" Pd
+ "kB, reason=snapshot\n",
heap_->isolate()->name(), gc_threshold_in_words_ / KBInWords,
idle_gc_threshold_in_words_ / KBInWords);
}
diff --git a/runtime/vm/heap/pages.h b/runtime/vm/heap/pages.h
index 5db4eb9..f6b6d96 100644
--- a/runtime/vm/heap/pages.h
+++ b/runtime/vm/heap/pages.h
@@ -159,6 +159,7 @@
SpaceUsage after,
int64_t start,
int64_t end);
+ void EvaluateSnapshotLoad(SpaceUsage after);
int64_t last_code_collection_in_us() { return last_code_collection_in_us_; }
void set_last_code_collection_in_us(int64_t t) {
@@ -232,6 +233,9 @@
bool NeedsGarbageCollection() const {
return page_space_controller_.NeedsGarbageCollection(usage_);
}
+ void EvaluateSnapshotLoad() {
+ page_space_controller_.EvaluateSnapshotLoad(usage_);
+ }
int64_t UsedInWords() const { return usage_.used_in_words; }
int64_t CapacityInWords() const {
diff --git a/runtime/vm/heap/scavenger.cc b/runtime/vm/heap/scavenger.cc
index b9ca038..de48b25 100644
--- a/runtime/vm/heap/scavenger.cc
+++ b/runtime/vm/heap/scavenger.cc
@@ -38,7 +38,7 @@
// objects. The kMarkBit does not intersect with the target address because of
// object alignment.
enum {
- kForwardingMask = 1 << RawObject::kMarkBit,
+ kForwardingMask = 1 << RawObject::kOldAndNotMarkedBit,
kNotForwarded = 0,
kForwarded = kForwardingMask,
};
@@ -110,6 +110,7 @@
thread_->StoreBufferAddObjectGC(visiting_old_object_);
}
+ DART_FORCE_INLINE
void ScavengePointer(RawObject** p) {
// ScavengePointer cannot be called recursively.
RawObject* raw_obj = *p;
@@ -166,6 +167,18 @@
// Copy the object to the new location.
memmove(reinterpret_cast<void*>(new_addr),
reinterpret_cast<void*>(raw_addr), size);
+
+ RawObject* new_obj = RawObject::FromAddr(new_addr);
+ if (new_obj->IsOldObject()) {
+ // Promoted: update age/barrier tags.
+ uint32_t tags = new_obj->ptr()->tags_;
+ tags = RawObject::OldBit::update(true, tags);
+ tags = RawObject::OldAndNotMarkedBit::update(true, tags);
+ tags = RawObject::OldAndNotRememberedBit::update(true, tags);
+ tags = RawObject::NewBit::update(false, tags);
+ new_obj->ptr()->tags_ = tags;
+ }
+
// Remember forwarding address.
ForwardTo(raw_addr, new_addr);
}
@@ -885,6 +898,7 @@
}
// Prepare for a scavenge.
+ FlushTLS();
SpaceUsage usage_before = GetCurrentUsage();
intptr_t promo_candidate_words =
(survivor_end_ - FirstObjectStart()) / kWordSize;
diff --git a/runtime/vm/heap/verifier.cc b/runtime/vm/heap/verifier.cc
index 808036c..29bbe385 100644
--- a/runtime/vm/heap/verifier.cc
+++ b/runtime/vm/heap/verifier.cc
@@ -26,14 +26,14 @@
} else {
switch (mark_expectation_) {
case kForbidMarked:
- if (raw_obj->IsMarked()) {
+ if (raw_obj->IsOldObject() && raw_obj->IsMarked()) {
FATAL1("Marked object encountered %#" Px "\n", raw_addr);
}
break;
case kAllowMarked:
break;
case kRequireMarked:
- if (!raw_obj->IsMarked()) {
+ if (raw_obj->IsOldObject() && !raw_obj->IsMarked()) {
FATAL1("Unmarked object encountered %#" Px "\n", raw_addr);
}
break;
diff --git a/runtime/vm/image_snapshot.cc b/runtime/vm/image_snapshot.cc
index e3cacc7..28dda6a 100644
--- a/runtime/vm/image_snapshot.cc
+++ b/runtime/vm/image_snapshot.cc
@@ -260,7 +260,10 @@
// Write object header with the mark and VM heap bits set.
uword marked_tags = obj.raw()->ptr()->tags_;
marked_tags = RawObject::VMHeapObjectTag::update(true, marked_tags);
- marked_tags = RawObject::MarkBit::update(true, marked_tags);
+ marked_tags = RawObject::OldBit::update(true, marked_tags);
+ marked_tags = RawObject::OldAndNotMarkedBit::update(false, marked_tags);
+ marked_tags = RawObject::OldAndNotRememberedBit::update(true, marked_tags);
+ marked_tags = RawObject::NewBit::update(false, marked_tags);
#if defined(HASH_IN_OBJECT_HEADER)
marked_tags |= static_cast<uword>(obj.raw()->ptr()->hash_) << 32;
#endif
@@ -346,7 +349,11 @@
// Write Instructions with the mark and VM heap bits set.
uword marked_tags = insns.raw_ptr()->tags_;
marked_tags = RawObject::VMHeapObjectTag::update(true, marked_tags);
- marked_tags = RawObject::MarkBit::update(true, marked_tags);
+ marked_tags = RawObject::OldBit::update(true, marked_tags);
+ marked_tags = RawObject::OldAndNotMarkedBit::update(false, marked_tags);
+ marked_tags =
+ RawObject::OldAndNotRememberedBit::update(true, marked_tags);
+ marked_tags = RawObject::NewBit::update(false, marked_tags);
#if defined(HASH_IN_OBJECT_HEADER)
// Can't use GetObjectTagsAndHash because the update methods discard the
// high bits.
@@ -555,7 +562,10 @@
// Write Instructions with the mark and VM heap bits set.
uword marked_tags = insns.raw_ptr()->tags_;
marked_tags = RawObject::VMHeapObjectTag::update(true, marked_tags);
- marked_tags = RawObject::MarkBit::update(true, marked_tags);
+ marked_tags = RawObject::OldBit::update(true, marked_tags);
+ marked_tags = RawObject::OldAndNotMarkedBit::update(false, marked_tags);
+ marked_tags = RawObject::OldAndNotRememberedBit::update(true, marked_tags);
+ marked_tags = RawObject::NewBit::update(false, marked_tags);
#if defined(HASH_IN_OBJECT_HEADER)
// Can't use GetObjectTagsAndHash because the update methods discard the
// high bits.
diff --git a/runtime/vm/interpreter.cc b/runtime/vm/interpreter.cc
index 7563e2a..a12afa7 100644
--- a/runtime/vm/interpreter.cc
+++ b/runtime/vm/interpreter.cc
@@ -330,6 +330,7 @@
uword tags = 0;
tags = RawObject::ClassIdTag::update(kDoubleCid, tags);
tags = RawObject::SizeTag::update(instance_size, tags);
+ tags = RawObject::NewBit::update(true, tags);
// Also writes zero in the hash_ field.
*reinterpret_cast<uword*>(start + Double::tags_offset()) = tags;
*reinterpret_cast<double*>(start + Double::value_offset()) = value;
@@ -1694,15 +1695,16 @@
AssertAssignableCallRuntime:
// TODO(regis): Modify AssertAssignable bytecode to expect arguments in same
// order as the TypeCheck runtime call, so this copying can be avoided.
- call_top[1] = args[0]; // instance
- call_top[2] = args[3]; // type
- call_top[3] = args[1]; // instantiator type args
- call_top[4] = args[2]; // function type args
- call_top[5] = args[4]; // name
- call_top[6] = cache;
- call_top[7] = Smi::New(kTypeCheckFromInline);
- Exit(thread, FP, call_top + 8, pc);
- NativeArguments native_args(thread, 7, call_top + 1, call_top + 1);
+ call_top[1] = 0; // Unused result.
+ call_top[2] = args[0]; // Instance.
+ call_top[3] = args[3]; // Type.
+ call_top[4] = args[1]; // Instantiator type args.
+ call_top[5] = args[2]; // Function type args.
+ call_top[6] = args[4]; // Name.
+ call_top[7] = cache;
+ call_top[8] = Smi::New(kTypeCheckFromInline);
+ Exit(thread, FP, call_top + 9, pc);
+ NativeArguments native_args(thread, 7, call_top + 2, call_top + 1);
return InvokeRuntime(thread, this, DRT_TypeCheck, native_args);
}
@@ -2085,8 +2087,10 @@
{
BYTECODE(CheckStack, A);
{
- // Using the interpreter stack limit and not the thread stack limit.
- if (reinterpret_cast<uword>(SP) >= stack_limit()) {
+ // Check the interpreter's own stack limit for actual interpreter's stack
+ // overflows, and also the thread's stack limit for scheduled interrupts.
+ if (reinterpret_cast<uword>(SP) >= stack_limit() ||
+ thread->HasScheduledInterrupts()) {
Exit(thread, FP, SP + 1, pc);
NativeArguments args(thread, 0, NULL, NULL);
INVOKE_RUNTIME(DRT_StackOverflow, args);
@@ -2480,12 +2484,9 @@
{
BYTECODE(NativeCall, __D);
- RawTypedData* native_entry = static_cast<RawTypedData*>(LOAD_CONSTANT(rD));
- // TODO(regis): Introduce a new VM class subclassing Object and containing
- // the four untagged values currently stored as TypeData array elements.
- MethodRecognizer::Kind kind =
- static_cast<MethodRecognizer::Kind>(*(reinterpret_cast<uintptr_t*>(
- native_entry->ptr()->data() + (0 << kWordSizeLog2))));
+ RawNativeEntryData* native_entry =
+ static_cast<RawNativeEntryData*>(LOAD_CONSTANT(rD));
+ MethodRecognizer::Kind kind = native_entry->ptr()->kind_;
switch (kind) {
case MethodRecognizer::kObjectEquals: {
SP[-1] = SP[-1] == SP[0] ? Bool::True().raw() : Bool::False().raw();
@@ -2570,8 +2571,9 @@
} break;
case MethodRecognizer::kLinkedHashMap_setIndex: {
RawInstance* instance = reinterpret_cast<RawInstance*>(SP[-1]);
- reinterpret_cast<RawObject**>(
- instance->ptr())[LinkedHashMap::index_offset() / kWordSize] = SP[0];
+ instance->StorePointer(reinterpret_cast<RawObject**>(instance->ptr()) +
+ LinkedHashMap::index_offset() / kWordSize,
+ SP[0]);
*--SP = null_value;
} break;
case MethodRecognizer::kLinkedHashMap_getData: {
@@ -2581,8 +2583,9 @@
} break;
case MethodRecognizer::kLinkedHashMap_setData: {
RawInstance* instance = reinterpret_cast<RawInstance*>(SP[-1]);
- reinterpret_cast<RawObject**>(
- instance->ptr())[LinkedHashMap::data_offset() / kWordSize] = SP[0];
+ instance->StorePointer(reinterpret_cast<RawObject**>(instance->ptr()) +
+ LinkedHashMap::data_offset() / kWordSize,
+ SP[0]);
*--SP = null_value;
} break;
case MethodRecognizer::kLinkedHashMap_getHashMask: {
@@ -2622,16 +2625,9 @@
*--SP = null_value;
} break;
default: {
- NativeFunctionWrapper trampoline =
- reinterpret_cast<NativeFunctionWrapper>(
- *(reinterpret_cast<uintptr_t*>(native_entry->ptr()->data() +
- (1 << kWordSizeLog2))));
- Dart_NativeFunction function = reinterpret_cast<Dart_NativeFunction>(
- *(reinterpret_cast<uintptr_t*>(native_entry->ptr()->data() +
- (2 << kWordSizeLog2))));
- intptr_t argc_tag =
- static_cast<intptr_t>(*(reinterpret_cast<uintptr_t*>(
- native_entry->ptr()->data() + (3 << kWordSizeLog2))));
+ NativeFunctionWrapper trampoline = native_entry->ptr()->trampoline_;
+ NativeFunction function = native_entry->ptr()->native_function_;
+ intptr_t argc_tag = native_entry->ptr()->argc_tag_;
const intptr_t num_arguments =
NativeArguments::ArgcBits::decode(argc_tag);
@@ -2641,7 +2637,8 @@
RawObject** return_slot = SP;
Exit(thread, FP, SP, pc);
NativeArguments args(thread, argc_tag, incoming_args, return_slot);
- INVOKE_NATIVE(trampoline, function,
+ INVOKE_NATIVE(trampoline,
+ reinterpret_cast<Dart_NativeFunction>(function),
reinterpret_cast<Dart_NativeArguments>(&args));
*(SP - num_arguments) = *return_slot;
@@ -3657,6 +3654,7 @@
uint32_t tags = 0;
tags = RawObject::ClassIdTag::update(kContextCid, tags);
tags = RawObject::SizeTag::update(instance_size, tags);
+ tags = RawObject::NewBit::update(true, tags);
// Also writes 0 in the hash_ field of the header.
*reinterpret_cast<uword*>(start + Array::tags_offset()) = tags;
*reinterpret_cast<uword*>(start + Context::num_variables_offset()) =
@@ -3693,13 +3691,13 @@
{
BYTECODE(AllocateOpt, A_D);
- const uword tags =
- static_cast<uword>(Smi::Value(RAW_CAST(Smi, LOAD_CONSTANT(rD))));
+ uint32_t tags = Smi::Value(RAW_CAST(Smi, LOAD_CONSTANT(rD)));
const intptr_t instance_size = RawObject::SizeTag::decode(tags);
const uword start =
thread->heap()->new_space()->TryAllocateInTLAB(thread, instance_size);
if (LIKELY(start != 0)) {
// Writes both the tags and the initial identity hash on 64 bit platforms.
+ tags = RawObject::NewBit::update(true, tags);
*reinterpret_cast<uword*>(start + Instance::tags_offset()) = tags;
for (intptr_t current_offset = sizeof(RawInstance);
current_offset < instance_size; current_offset += kWordSize) {
@@ -3725,7 +3723,7 @@
{
BYTECODE(AllocateTOpt, A_D);
- const uword tags = Smi::Value(RAW_CAST(Smi, LOAD_CONSTANT(rD)));
+ uint32_t tags = Smi::Value(RAW_CAST(Smi, LOAD_CONSTANT(rD)));
const intptr_t instance_size = RawObject::SizeTag::decode(tags);
const uword start =
thread->heap()->new_space()->TryAllocateInTLAB(thread, instance_size);
@@ -3733,6 +3731,7 @@
RawObject* type_args = SP[0];
const intptr_t type_args_offset = KernelBytecode::DecodeD(*pc);
// Writes both the tags and the initial identity hash on 64 bit platforms.
+ tags = RawObject::NewBit::update(true, tags);
*reinterpret_cast<uword*>(start + Instance::tags_offset()) = tags;
for (intptr_t current_offset = sizeof(RawInstance);
current_offset < instance_size; current_offset += kWordSize) {
@@ -3776,6 +3775,7 @@
tags = RawObject::SizeTag::update(instance_size, tags);
}
tags = RawObject::ClassIdTag::update(cid, tags);
+ tags = RawObject::NewBit::update(true, tags);
// Writes both the tags and the initial identity hash on 64 bit
// platforms.
*reinterpret_cast<uword*>(start + Instance::tags_offset()) = tags;
diff --git a/runtime/vm/isolate.h b/runtime/vm/isolate.h
index 5614bdd9..f8f7835 100644
--- a/runtime/vm/isolate.h
+++ b/runtime/vm/isolate.h
@@ -150,7 +150,10 @@
V(NONPRODUCT, use_field_guards, UseFieldGuards, use_field_guards, \
FLAG_use_field_guards) \
V(NONPRODUCT, use_osr, UseOsr, use_osr, FLAG_use_osr) \
- V(PRECOMPILER, obfuscate, Obfuscate, obfuscate, false_by_default)
+ V(PRECOMPILER, obfuscate, Obfuscate, obfuscate, false_by_default) \
+ V(PRODUCT, unsafe_trust_strong_mode_types, UnsafeTrustStrongModeTypes, \
+ unsafe_trust_strong_mode_types, \
+ FLAG_experimental_unsafe_mode_use_at_your_own_risk)
class Isolate : public BaseIsolate {
public:
@@ -697,6 +700,11 @@
isolate_flags_ = IsKernelIsolateBit::update(value, isolate_flags_);
}
+ bool can_use_strong_mode_types() const {
+ return strong() && FLAG_use_strong_mode_types &&
+ !unsafe_trust_strong_mode_types();
+ }
+
bool should_load_vmservice() const {
return ShouldLoadVmServiceBit::decode(isolate_flags_);
}
@@ -752,8 +760,12 @@
// Convenience flag tester indicating whether incoming function arguments
// should be type checked.
- bool argument_type_checks() {
- return (strong() && !FLAG_omit_strong_type_checks) || type_checks();
+ bool argument_type_checks() const {
+ return should_emit_strong_mode_checks() || type_checks();
+ }
+
+ bool should_emit_strong_mode_checks() const {
+ return strong() && !unsafe_trust_strong_mode_types();
}
static void KillAllIsolates(LibMsgId msg_id);
@@ -875,7 +887,8 @@
V(UseOsr) \
V(Obfuscate) \
V(CompactionInProgress) \
- V(ShouldLoadVmService)
+ V(ShouldLoadVmService) \
+ V(UnsafeTrustStrongModeTypes)
// Isolate specific flags.
enum FlagBits {
diff --git a/runtime/vm/isolate_reload_test.cc b/runtime/vm/isolate_reload_test.cc
index 9f56a44..171292f 100644
--- a/runtime/vm/isolate_reload_test.cc
+++ b/runtime/vm/isolate_reload_test.cc
@@ -2301,7 +2301,7 @@
SimpleInvokeStr(lib, "main"));
}
-TEST_CASE(IsolateReload_DirectSubclasses_Success) {
+ISOLATE_UNIT_TEST_CASE(IsolateReload_DirectSubclasses_Success) {
Object& new_subclass = Object::Handle();
String& name = String::Handle();
@@ -2323,9 +2323,12 @@
" return 1;\n"
"}\n";
- Dart_Handle lib = TestCase::LoadTestScript(kScript, NULL);
- EXPECT_VALID(lib);
- EXPECT_EQ(1, SimpleInvoke(lib, "main"));
+ {
+ TransitionVMToNative transition(thread);
+ Dart_Handle lib = TestCase::LoadTestScript(kScript, NULL);
+ EXPECT_VALID(lib);
+ EXPECT_EQ(1, SimpleInvoke(lib, "main"));
+ }
// Iterator has one non-core subclass.
subclasses = iterator_cls.direct_subclasses();
@@ -2345,9 +2348,12 @@
" return 2;\n"
"}\n";
- lib = TestCase::ReloadTestScript(kReloadScript);
- EXPECT_VALID(lib);
- EXPECT_EQ(2, SimpleInvoke(lib, "main"));
+ {
+ TransitionVMToNative transition(thread);
+ Dart_Handle lib = TestCase::ReloadTestScript(kReloadScript);
+ EXPECT_VALID(lib);
+ EXPECT_EQ(2, SimpleInvoke(lib, "main"));
+ }
// Iterator still has only one non-core subclass (AIterator is gone).
subclasses = iterator_cls.direct_subclasses();
@@ -2359,7 +2365,7 @@
EXPECT_STREQ("BIterator", name.ToCString());
}
-TEST_CASE(IsolateReload_DirectSubclasses_GhostSubclass) {
+ISOLATE_UNIT_TEST_CASE(IsolateReload_DirectSubclasses_GhostSubclass) {
Object& new_subclass = Object::Handle();
String& name = String::Handle();
@@ -2381,9 +2387,12 @@
" return 1;\n"
"}\n";
- Dart_Handle lib = TestCase::LoadTestScript(kScript, NULL);
- EXPECT_VALID(lib);
- EXPECT_EQ(1, SimpleInvoke(lib, "main"));
+ {
+ TransitionVMToNative transition(thread);
+ Dart_Handle lib = TestCase::LoadTestScript(kScript, NULL);
+ EXPECT_VALID(lib);
+ EXPECT_EQ(1, SimpleInvoke(lib, "main"));
+ }
// Iterator has one new subclass.
subclasses = iterator_cls.direct_subclasses();
@@ -2401,9 +2410,12 @@
" return 2;\n"
"}\n";
- lib = TestCase::ReloadTestScript(kReloadScript);
- EXPECT_VALID(lib);
- EXPECT_EQ(2, SimpleInvoke(lib, "main"));
+ {
+ TransitionVMToNative transition(thread);
+ Dart_Handle lib = TestCase::ReloadTestScript(kReloadScript);
+ EXPECT_VALID(lib);
+ EXPECT_EQ(2, SimpleInvoke(lib, "main"));
+ }
// Iterator has two non-core subclasses.
subclasses = iterator_cls.direct_subclasses();
@@ -2420,7 +2432,7 @@
}
// Make sure that we restore the direct subclass info when we revert.
-TEST_CASE(IsolateReload_DirectSubclasses_Failure) {
+ISOLATE_UNIT_TEST_CASE(IsolateReload_DirectSubclasses_Failure) {
Object& new_subclass = Object::Handle();
String& name = String::Handle();
@@ -2447,9 +2459,12 @@
" return 1;\n"
"}\n";
- Dart_Handle lib = TestCase::LoadTestScript(kScript, NULL);
- EXPECT_VALID(lib);
- EXPECT_EQ(1, SimpleInvoke(lib, "main"));
+ {
+ TransitionVMToNative transition(thread);
+ Dart_Handle lib = TestCase::LoadTestScript(kScript, NULL);
+ EXPECT_VALID(lib);
+ EXPECT_EQ(1, SimpleInvoke(lib, "main"));
+ }
// Iterator has one non-core subclass...
EXPECT_EQ(saved_subclass_count + 1, subclasses.Length());
@@ -2473,11 +2488,14 @@
" return 2;\n"
"}\n";
- lib = TestCase::ReloadTestScript(kReloadScript);
- if (TestCase::UsingDartFrontend()) {
- EXPECT_ERROR(lib, "Expected ';' after this");
- } else {
- EXPECT_ERROR(lib, "unexpected token");
+ {
+ TransitionVMToNative transition(thread);
+ Dart_Handle lib = TestCase::ReloadTestScript(kReloadScript);
+ if (TestCase::UsingDartFrontend()) {
+ EXPECT_ERROR(lib, "Expected ';' after this");
+ } else {
+ EXPECT_ERROR(lib, "unexpected token");
+ }
}
// If we don't clean up the subclasses, we would find BIterator in
diff --git a/runtime/vm/kernel_isolate.cc b/runtime/vm/kernel_isolate.cc
index ea23d2c..5a85178 100644
--- a/runtime/vm/kernel_isolate.cc
+++ b/runtime/vm/kernel_isolate.cc
@@ -95,6 +95,7 @@
api_flags.use_dart_frontend = true;
api_flags.reify_generic_functions = true;
api_flags.strong = true;
+ api_flags.unsafe_trust_strong_mode_types = false;
api_flags.sync_async = true;
#if !defined(DART_PRECOMPILER) && !defined(TARGET_ARCH_DBC) && \
!defined(DART_USE_INTERPRETER)
diff --git a/runtime/vm/kernel_loader.cc b/runtime/vm/kernel_loader.cc
index 17f062d..a7dd4cd 100644
--- a/runtime/vm/kernel_loader.cc
+++ b/runtime/vm/kernel_loader.cc
@@ -1385,6 +1385,12 @@
true, // is_method
false, // is_closure
&function_node_helper);
+
+ if (library.is_dart_scheme() &&
+ H.IsPrivate(constructor_helper.canonical_name_)) {
+ function.set_is_reflectable(false);
+ }
+
if (constructor_helper.IsSynthetic()) {
function.set_is_debuggable(false);
}
@@ -1603,8 +1609,11 @@
expression_evaluation_function_ = function.raw();
}
function.set_kernel_offset(procedure_offset);
- function.set_is_reflectable(function.is_reflectable() &&
- library.raw() != Library::InternalLibrary());
+ if ((library.is_dart_scheme() &&
+ H.IsPrivate(procedure_helper.canonical_name_)) ||
+ (function.is_static() && (library.raw() == Library::InternalLibrary()))) {
+ function.set_is_reflectable(false);
+ }
ActiveMemberScope active_member(&active_class_, &function);
diff --git a/runtime/vm/longjump_test.cc b/runtime/vm/longjump_test.cc
index 2d62383..bc58a24 100644
--- a/runtime/vm/longjump_test.cc
+++ b/runtime/vm/longjump_test.cc
@@ -15,7 +15,7 @@
UNREACHABLE();
}
-TEST_CASE(LongJump) {
+ISOLATE_UNIT_TEST_CASE(LongJump) {
LongJumpScope* base = Thread::Current()->long_jump_base();
{
LongJumpScope jump;
diff --git a/runtime/vm/native_arguments.h b/runtime/vm/native_arguments.h
index ea9d33c..782fc6e 100644
--- a/runtime/vm/native_arguments.h
+++ b/runtime/vm/native_arguments.h
@@ -213,6 +213,7 @@
friend class Api;
friend class BootstrapNatives;
friend class Interpreter;
+ friend class NativeEntryData;
friend class Simulator;
#if defined(TARGET_ARCH_DBC) || defined(DART_USE_INTERPRETER)
diff --git a/runtime/vm/native_entry.cc b/runtime/vm/native_entry.cc
index 8b033c5..648d734 100644
--- a/runtime/vm/native_entry.cc
+++ b/runtime/vm/native_entry.cc
@@ -94,6 +94,7 @@
void NativeEntry::PropagateErrors(NativeArguments* arguments) {
Thread* thread = arguments->thread();
thread->UnwindScopes(thread->top_exit_frame_info());
+ TransitionNativeToVM transition(thread);
// The thread->zone() is different here than before we unwound.
const Object& error =
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
index d6fd7cb..c7cdf97 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -101,36 +101,11 @@
#error RAW_NULL should not be defined.
#endif
#define RAW_NULL kHeapObjectTag
-Object* Object::null_object_ = NULL;
-Array* Object::null_array_ = NULL;
-String* Object::null_string_ = NULL;
-Instance* Object::null_instance_ = NULL;
-Function* Object::null_function_ = NULL;
-TypeArguments* Object::null_type_arguments_ = NULL;
-TypeArguments* Object::empty_type_arguments_ = NULL;
-Array* Object::empty_array_ = NULL;
-Array* Object::zero_array_ = NULL;
-ContextScope* Object::empty_context_scope_ = NULL;
-ObjectPool* Object::empty_object_pool_ = NULL;
-PcDescriptors* Object::empty_descriptors_ = NULL;
-LocalVarDescriptors* Object::empty_var_descriptors_ = NULL;
-ExceptionHandlers* Object::empty_exception_handlers_ = NULL;
-Array* Object::extractor_parameter_types_ = NULL;
-Array* Object::extractor_parameter_names_ = NULL;
-Instance* Object::sentinel_ = NULL;
-Instance* Object::transition_sentinel_ = NULL;
-Instance* Object::unknown_constant_ = NULL;
-Instance* Object::non_constant_ = NULL;
-Bool* Object::bool_true_ = NULL;
-Bool* Object::bool_false_ = NULL;
-Smi* Object::smi_illegal_cid_ = NULL;
-LanguageError* Object::snapshot_writer_error_ = NULL;
-LanguageError* Object::branch_offset_error_ = NULL;
-LanguageError* Object::speculative_inlining_error_ = NULL;
-LanguageError* Object::background_compilation_error_ = NULL;
-Array* Object::vm_isolate_snapshot_object_table_ = NULL;
-Type* Object::dynamic_type_ = NULL;
-Type* Object::void_type_ = NULL;
+
+#define DEFINE_SHARED_READONLY_HANDLE(Type, name) \
+ Type* Object::name##_ = nullptr;
+SHARED_READONLY_HANDLES_LIST(DEFINE_SHARED_READONLY_HANDLE)
+#undef DEFINE_SHARED_READONLY_HANDLE
RawObject* Object::null_ = reinterpret_cast<RawObject*>(RAW_NULL);
RawClass* Object::class_class_ = reinterpret_cast<RawClass*>(RAW_NULL);
@@ -145,6 +120,8 @@
RawClass* Object::signature_data_class_ = reinterpret_cast<RawClass*>(RAW_NULL);
RawClass* Object::redirection_data_class_ =
reinterpret_cast<RawClass*>(RAW_NULL);
+RawClass* Object::native_entry_data_class_ =
+ reinterpret_cast<RawClass*>(RAW_NULL);
RawClass* Object::field_class_ = reinterpret_cast<RawClass*>(RAW_NULL);
RawClass* Object::literal_token_class_ = reinterpret_cast<RawClass*>(RAW_NULL);
RawClass* Object::token_stream_class_ = reinterpret_cast<RawClass*>(RAW_NULL);
@@ -495,36 +472,10 @@
Heap* heap = isolate->heap();
// Allocate the read only object handles here.
- null_object_ = Object::ReadOnlyHandle();
- null_array_ = Array::ReadOnlyHandle();
- null_string_ = String::ReadOnlyHandle();
- null_instance_ = Instance::ReadOnlyHandle();
- null_function_ = Function::ReadOnlyHandle();
- null_type_arguments_ = TypeArguments::ReadOnlyHandle();
- empty_type_arguments_ = TypeArguments::ReadOnlyHandle();
- empty_array_ = Array::ReadOnlyHandle();
- zero_array_ = Array::ReadOnlyHandle();
- empty_context_scope_ = ContextScope::ReadOnlyHandle();
- empty_object_pool_ = ObjectPool::ReadOnlyHandle();
- empty_descriptors_ = PcDescriptors::ReadOnlyHandle();
- empty_var_descriptors_ = LocalVarDescriptors::ReadOnlyHandle();
- empty_exception_handlers_ = ExceptionHandlers::ReadOnlyHandle();
- extractor_parameter_types_ = Array::ReadOnlyHandle();
- extractor_parameter_names_ = Array::ReadOnlyHandle();
- sentinel_ = Instance::ReadOnlyHandle();
- transition_sentinel_ = Instance::ReadOnlyHandle();
- unknown_constant_ = Instance::ReadOnlyHandle();
- non_constant_ = Instance::ReadOnlyHandle();
- bool_true_ = Bool::ReadOnlyHandle();
- bool_false_ = Bool::ReadOnlyHandle();
- smi_illegal_cid_ = Smi::ReadOnlyHandle();
- snapshot_writer_error_ = LanguageError::ReadOnlyHandle();
- branch_offset_error_ = LanguageError::ReadOnlyHandle();
- speculative_inlining_error_ = LanguageError::ReadOnlyHandle();
- background_compilation_error_ = LanguageError::ReadOnlyHandle();
- vm_isolate_snapshot_object_table_ = Array::ReadOnlyHandle();
- dynamic_type_ = Type::ReadOnlyHandle();
- void_type_ = Type::ReadOnlyHandle();
+#define INITIALIZE_SHARED_READONLY_HANDLE(Type, name) \
+ name##_ = Type::ReadOnlyHandle();
+ SHARED_READONLY_HANDLES_LIST(INITIALIZE_SHARED_READONLY_HANDLE)
+#undef INITIALIZE_SHARED_READONLY_HANDLE
*null_object_ = Object::null();
*null_array_ = Array::null();
@@ -533,6 +484,7 @@
*null_function_ = Function::null();
*null_type_arguments_ = TypeArguments::null();
*empty_type_arguments_ = TypeArguments::null();
+ *null_abstract_type_ = AbstractType::null();
// Initialize the empty and zero array handles to null_ in order to be able to
// check if the empty and zero arrays were allocated (RAW_NULL is not
@@ -632,6 +584,9 @@
cls = Class::New<RedirectionData>();
redirection_data_class_ = cls.raw();
+ cls = Class::New<NativeEntryData>();
+ native_entry_data_class_ = cls.raw();
+
cls = Class::New<Field>();
field_class_ = cls.raw();
@@ -1072,6 +1027,7 @@
SET_CLASS_NAME(closure_data, ClosureData);
SET_CLASS_NAME(signature_data, SignatureData);
SET_CLASS_NAME(redirection_data, RedirectionData);
+ SET_CLASS_NAME(native_entry_data, NativeEntryData);
SET_CLASS_NAME(field, Field);
SET_CLASS_NAME(literal_token, LiteralToken);
SET_CLASS_NAME(token_stream, TokenStream);
@@ -1212,6 +1168,16 @@
new_tags = RawObject::SizeTag::update(leftover_size, new_tags);
new_tags = RawObject::VMHeapObjectTag::update(obj.raw()->IsVMHeapObject(),
new_tags);
+ const bool is_old = obj.raw()->IsOldObject();
+ new_tags = RawObject::OldBit::update(is_old, new_tags);
+ new_tags = RawObject::OldAndNotMarkedBit::update(is_old, new_tags);
+ new_tags = RawObject::OldAndNotRememberedBit::update(is_old, new_tags);
+ new_tags = RawObject::NewBit::update(!is_old, new_tags);
+ // On architectures with a relaxed memory model, the concurrent marker may
+ // observe the write of the filler object's header before observing the
+ // new array length, and so treat it as a pointer. Ensure it is a Smi so
+ // the marker won't dereference it.
+ ASSERT((new_tags & kSmiTagMask) == kSmiTag);
uint32_t tags = raw->ptr()->tags_;
uint32_t old_tags;
// TODO(iposva): Investigate whether CompareAndSwapWord is necessary.
@@ -1234,6 +1200,16 @@
new_tags = RawObject::SizeTag::update(leftover_size, new_tags);
new_tags = RawObject::VMHeapObjectTag::update(
obj.raw()->ptr()->IsVMHeapObject(), new_tags);
+ const bool is_old = obj.raw()->IsOldObject();
+ new_tags = RawObject::OldBit::update(is_old, new_tags);
+ new_tags = RawObject::OldAndNotMarkedBit::update(is_old, new_tags);
+ new_tags = RawObject::OldAndNotRememberedBit::update(is_old, new_tags);
+ new_tags = RawObject::NewBit::update(!is_old, new_tags);
+ // On architectures with a relaxed memory model, the concurrent marker may
+ // observe the write of the filler object's header before observing the
+ // new array length, and so treat it as a pointer. Ensure it is a Smi so
+ // the marker won't dereference it.
+ ASSERT((new_tags & kSmiTagMask) == kSmiTag);
uint32_t tags = raw->ptr()->tags_;
uint32_t old_tags;
// TODO(iposva): Investigate whether CompareAndSwapWord is necessary.
@@ -2001,6 +1977,12 @@
tags = RawObject::ClassIdTag::update(class_id, tags);
tags = RawObject::SizeTag::update(size, tags);
tags = RawObject::VMHeapObjectTag::update(is_vm_object, tags);
+ const bool is_old =
+ (address & kNewObjectAlignmentOffset) == kOldObjectAlignmentOffset;
+ tags = RawObject::OldBit::update(is_old, tags);
+ tags = RawObject::OldAndNotMarkedBit::update(is_old, tags);
+ tags = RawObject::OldAndNotRememberedBit::update(is_old, tags);
+ tags = RawObject::NewBit::update(!is_old, tags);
reinterpret_cast<RawObject*>(address)->tags_ = tags;
#if defined(HASH_IN_OBJECT_HEADER)
reinterpret_cast<RawObject*>(address)->hash_ = 0;
@@ -2034,10 +2016,11 @@
RawObject* Object::Allocate(intptr_t cls_id, intptr_t size, Heap::Space space) {
ASSERT(Utils::IsAligned(size, kObjectAlignment));
Thread* thread = Thread::Current();
- Isolate* isolate = thread->isolate();
// New space allocation allowed only in mutator thread (Dart thread);
ASSERT(thread->IsMutatorThread() || (space != Heap::kNew));
+ ASSERT(thread->execution_state() == Thread::kThreadInVM);
ASSERT(thread->no_callback_scope_depth() == 0);
+ Isolate* isolate = thread->isolate();
Heap* heap = isolate->heap();
uword address = heap->Allocate(size, space);
@@ -2111,7 +2094,7 @@
NoSafepointScope no_safepoint;
// TODO(koda): This will trip when we start allocating black.
// Revisit code below at that point, to account for the new write barrier.
- ASSERT(!raw_clone->IsMarked());
+ ASSERT(!(raw_clone->IsOldObject() && raw_clone->IsMarked()));
// Copy the body of the original into the clone.
uword orig_addr = RawObject::ToAddr(orig.raw());
uword clone_addr = RawObject::ToAddr(raw_clone);
@@ -3631,7 +3614,7 @@
return Error::null();
}
if (Compiler::IsBackgroundCompilation()) {
- Compiler::AbortBackgroundCompilation(Thread::kNoDeoptId,
+ Compiler::AbortBackgroundCompilation(DeoptId::kNone,
"Class finalization while compiling");
}
ASSERT(thread->IsMutatorThread());
@@ -3936,6 +3919,8 @@
return Symbols::SignatureData().raw();
case kRedirectionDataCid:
return Symbols::RedirectionData().raw();
+ case kNativeEntryDataCid:
+ return Symbols::NativeEntryData().raw();
case kFieldCid:
return Symbols::Field().raw();
case kLiteralTokenCid:
@@ -7147,11 +7132,50 @@
Function& sig = Function::Handle(Function::NewSignatureFunction(
owner, parent, TokenPosition::kNoSource, space));
+ AbstractType& type = AbstractType::Handle(zone);
+
+ // Copy the type parameters and instantiate their bounds (if necessary).
if (!delete_type_parameters) {
- sig.set_type_parameters(TypeArguments::Handle(zone, type_parameters()));
+ const TypeArguments& type_params =
+ TypeArguments::Handle(zone, type_parameters());
+ if (!type_params.IsNull()) {
+ TypeArguments& instantiated_type_params = TypeArguments::Handle(zone);
+ TypeParameter& type_param = TypeParameter::Handle(zone);
+ Class& cls = Class::Handle(zone);
+ String& param_name = String::Handle(zone);
+ for (intptr_t i = 0; i < type_params.Length(); ++i) {
+ type_param ^= type_params.TypeAt(i);
+ type = type_param.bound();
+ if (!type.IsInstantiated(kAny, num_free_fun_type_params)) {
+ type = type.InstantiateFrom(
+ instantiator_type_arguments, function_type_arguments,
+ num_free_fun_type_params, NULL, NULL, NULL, space);
+ cls = type_param.parameterized_class();
+ param_name = type_param.name();
+ ASSERT(type_param.IsFinalized());
+ type_param ^=
+ TypeParameter::New(cls, sig, type_param.index(), param_name, type,
+ type_param.token_pos());
+ type_param.SetIsFinalized();
+ if (instantiated_type_params.IsNull()) {
+ instantiated_type_params = TypeArguments::New(type_params.Length());
+ for (intptr_t j = 0; j < i; ++j) {
+ type = type_params.TypeAt(j);
+ instantiated_type_params.SetTypeAt(j, type);
+ }
+ }
+ instantiated_type_params.SetTypeAt(i, type_param);
+ } else if (!instantiated_type_params.IsNull()) {
+ instantiated_type_params.SetTypeAt(i, type_param);
+ }
+ }
+ sig.set_type_parameters(instantiated_type_params.IsNull()
+ ? type_params
+ : instantiated_type_params);
+ }
}
- AbstractType& type = AbstractType::Handle(zone, result_type());
+ type = result_type();
if (!type.IsInstantiated(kAny, num_free_fun_type_params)) {
type = type.InstantiateFrom(
instantiator_type_arguments, function_type_arguments,
@@ -7904,6 +7928,15 @@
return false;
}
}
+ TypeArguments& type_params = TypeArguments::Handle(type_parameters());
+ TypeParameter& type_param = TypeParameter::Handle();
+ for (intptr_t i = 0; i < type_params.Length(); ++i) {
+ type_param ^= type_params.TypeAt(i);
+ type = type_param.bound();
+ if (!type.IsInstantiated(genericity, num_free_fun_type_params, trail)) {
+ return false;
+ }
+ }
return true;
}
@@ -8463,6 +8496,37 @@
target_fun.IsNull() ? "null" : target_fun.ToCString());
}
+RawNativeEntryData* NativeEntryData::New() {
+ ASSERT(Object::native_entry_data_class() != Class::null());
+ RawObject* raw = Object::Allocate(
+ NativeEntryData::kClassId, NativeEntryData::InstanceSize(), Heap::kOld);
+ return reinterpret_cast<RawNativeEntryData*>(raw);
+}
+
+const char* NativeEntryData::ToCString() const {
+#if defined(DART_USE_INTERPRETER)
+ if (IsNull()) {
+ return "NativeEntryData: null";
+ }
+ if (kind() != MethodRecognizer::kUnknown) {
+ return OS::SCreate(Thread::Current()->zone(), "NativeEntryData %s",
+ MethodRecognizer::KindToCString(kind()));
+ }
+ return OS::SCreate(
+ Thread::Current()->zone(),
+ "NativeEntryData argc: %d, trampoline: %s, function: 0x%" Px,
+ NativeArguments::ArgcBits::decode(argc_tag()),
+ trampoline() == &NativeEntry::BootstrapNativeCallWrapper
+ ? "BootstrapNativeCallWrapper"
+ : trampoline() == &NativeEntry::AutoScopeNativeCallWrapper
+ ? "AutoScopeNativeCallWrapper"
+ : "NoScopeNativeCallWrapper",
+ reinterpret_cast<uword>(native_function()));
+#else
+ UNREACHABLE();
+#endif // defined(DART_USE_INTERPRETER)
+}
+
RawField* Field::CloneFromOriginal() const {
return this->Clone(*this);
}
@@ -9066,20 +9130,12 @@
return "<*>";
}
+ Zone* zone = Thread::Current()->zone();
+
const char* exactness = "";
if (static_type_exactness_state().IsTracking()) {
- if (!static_type_exactness_state().IsExactOrUninitialized()) {
- exactness = " {!exact}";
- } else if (static_type_exactness_state().IsTriviallyExact()) {
- exactness = " {trivially-exact}";
- } else if (static_type_exactness_state().IsHasExactSuperType()) {
- exactness = " {has-exact-super-type}";
- } else if (static_type_exactness_state().IsHasExactSuperClass()) {
- exactness = " {has-exact-super-class}";
- } else {
- ASSERT(static_type_exactness_state().IsUninitialized());
- exactness = " {unknown exactness}";
- }
+ exactness =
+ zone->PrintToString(" {%s}", static_type_exactness_state().ToCString());
}
const Class& cls =
@@ -9090,18 +9146,17 @@
is_final()) {
ASSERT(guarded_list_length() != kUnknownFixedLength);
if (guarded_list_length() == kNoFixedLength) {
- return Thread::Current()->zone()->PrintToString("<%s [*]%s>", class_name,
- exactness);
+ return zone->PrintToString("<%s [*]%s>", class_name, exactness);
} else {
- return Thread::Current()->zone()->PrintToString(
+ return zone->PrintToString(
"<%s [%" Pd " @%" Pd "]%s>", class_name, guarded_list_length(),
guarded_list_length_in_object_offset(), exactness);
}
}
- return Thread::Current()->zone()->PrintToString(
- "<%s %s%s>", is_nullable() ? "nullable" : "not-nullable", class_name,
- exactness);
+ return zone->PrintToString("<%s %s%s>",
+ is_nullable() ? "nullable" : "not-nullable",
+ class_name, exactness);
}
void Field::InitializeGuardedListLengthInObjectOffset() const {
@@ -9225,15 +9280,156 @@
return false; // Not found.
}
-static void SetTrivialTypeExactness(const Field& field, const Class& cls) {
+static StaticTypeExactnessState TrivialTypeExactnessFor(const Class& cls) {
const intptr_t type_arguments_offset = cls.type_arguments_field_offset();
ASSERT(type_arguments_offset != Class::kNoTypeArguments);
if (StaticTypeExactnessState::CanRepresentAsTriviallyExact(
type_arguments_offset)) {
- field.set_static_type_exactness_state(
- StaticTypeExactnessState::TriviallyExact(type_arguments_offset));
+ return StaticTypeExactnessState::TriviallyExact(type_arguments_offset);
} else {
- field.set_static_type_exactness_state(StaticTypeExactnessState::NotExact());
+ return StaticTypeExactnessState::NotExact();
+ }
+}
+
+static const char* SafeTypeArgumentsToCString(const TypeArguments& args) {
+ return (args.raw() == TypeArguments::null()) ? "<null>" : args.ToCString();
+}
+
+StaticTypeExactnessState StaticTypeExactnessState::Compute(
+ const Type& static_type,
+ const Instance& value,
+ bool print_trace /* = false */) {
+ const TypeArguments& static_type_args =
+ TypeArguments::Handle(static_type.arguments());
+
+ TypeArguments& args = TypeArguments::Handle();
+
+ ASSERT(static_type.IsFinalized());
+ const Class& cls = Class::Handle(value.clazz());
+ GrowableArray<const AbstractType*> path(10);
+
+ bool is_super_class = true;
+ if (!FindInstantiationOf(static_type, cls, &path,
+ /*consider_only_super_classes=*/true)) {
+ is_super_class = false;
+ bool found_super_interface = FindInstantiationOf(
+ static_type, cls, &path, /*consider_only_super_classes=*/false);
+ ASSERT(found_super_interface);
+ }
+
+ // Trivial case: field has type G<T0, ..., Tn> and value has type
+ // G<U0, ..., Un>. Check if type arguments match.
+ if (path.is_empty()) {
+ ASSERT(cls.raw() == static_type.type_class());
+ args = value.GetTypeArguments();
+ // TODO(dartbug.com/34170) Evaluate if comparing relevant subvectors (that
+ // disregards superclass own arguments) improves precision of the
+ // tracking.
+ if (args.raw() == static_type_args.raw()) {
+ return TrivialTypeExactnessFor(cls);
+ }
+
+ if (print_trace) {
+ THR_Print(" expected %s got %s type arguments\n",
+ SafeTypeArgumentsToCString(static_type_args),
+ SafeTypeArgumentsToCString(args));
+ }
+ return StaticTypeExactnessState::NotExact();
+ }
+
+ // Value has type C<U0, ..., Un> and field has type G<T0, ..., Tn> and G != C.
+ // Compute C<X0, ..., Xn> at G (Xi are free type arguments).
+ // Path array contains a chain of immediate supertypes S0 <: S1 <: ... Sn,
+ // such that S0 is an immediate supertype of C and Sn is G<...>.
+ // Each Si might depend on type parameters of the previous supertype S{i-1}.
+ // To compute C<X0, ..., Xn> at G we walk the chain backwards and
+ // instantiate Si using type parameters of S{i-1} which gives us a type
+ // depending on type parameters of S{i-2}.
+ Error& error = Error::Handle();
+ AbstractType& type = AbstractType::Handle(path.Last()->raw());
+ for (intptr_t i = path.length() - 2; (i >= 0) && !type.IsInstantiated();
+ i--) {
+ args = path[i]->arguments();
+ type = type.InstantiateFrom(
+ args, TypeArguments::null_type_arguments(), kAllFree, &error,
+ /*instantiation_trail=*/nullptr, /*bound_trail=*/nullptr, Heap::kNew);
+ }
+
+ if (type.IsInstantiated()) {
+ // C<X0, ..., Xn> at G is fully instantiated and does not depend on
+ // Xi. In this case just check if type arguments match.
+ args = type.arguments();
+ if (args.Equals(static_type_args)) {
+ return is_super_class ? StaticTypeExactnessState::HasExactSuperClass()
+ : StaticTypeExactnessState::HasExactSuperType();
+ }
+
+ if (print_trace) {
+ THR_Print(" expected %s got %s type arguments\n",
+ SafeTypeArgumentsToCString(static_type_args),
+ SafeTypeArgumentsToCString(args));
+ }
+
+ return StaticTypeExactnessState::NotExact();
+ }
+
+ // The most complicated case: C<X0, ..., Xn> at G depends on
+ // Xi values. To compare type arguments we would need to instantiate
+ // it fully from value's type arguments and compare with <U0, ..., Un>.
+ // However this would complicate fast path in the native code. To avoid this
+ // complication we would optimize for the trivial case: we check if
+ // C<X0, ..., Xn> at G is exactly G<X0, ..., Xn> which means we can simply
+ // compare values type arguements (<T0, ..., Tn>) to fields type arguments
+ // (<U0, ..., Un>) to establish if field type is exact.
+ ASSERT(cls.IsGeneric());
+ const intptr_t num_type_params = cls.NumTypeParameters();
+ bool trivial_case =
+ (num_type_params ==
+ Class::Handle(static_type.type_class()).NumTypeParameters()) &&
+ (value.GetTypeArguments() == static_type.arguments());
+ if (!trivial_case && FLAG_trace_field_guards) {
+ THR_Print("Not a simple case: %" Pd " vs %" Pd
+ " type parameters, %s vs %s type arguments\n",
+ num_type_params,
+ Class::Handle(static_type.type_class()).NumTypeParameters(),
+ SafeTypeArgumentsToCString(
+ TypeArguments::Handle(value.GetTypeArguments())),
+ SafeTypeArgumentsToCString(static_type_args));
+ }
+
+ AbstractType& type_arg = AbstractType::Handle();
+ args = type.arguments();
+ for (intptr_t i = 0; (i < num_type_params) && trivial_case; i++) {
+ type_arg = args.TypeAt(i);
+ if (!type_arg.IsTypeParameter() ||
+ (TypeParameter::Cast(type_arg).index() != i)) {
+ if (FLAG_trace_field_guards) {
+ THR_Print(" => encountered %s at index % " Pd "\n",
+ type_arg.ToCString(), i);
+ }
+ trivial_case = false;
+ }
+ }
+
+ return trivial_case ? TrivialTypeExactnessFor(cls)
+ : StaticTypeExactnessState::NotExact();
+}
+
+const char* StaticTypeExactnessState::ToCString() const {
+ if (!IsTracking()) {
+ return "not-tracking";
+ } else if (!IsExactOrUninitialized()) {
+ return "not-exact";
+ } else if (IsTriviallyExact()) {
+ return Thread::Current()->zone()->PrintToString(
+ "trivially-exact(%" Pd ")", GetTypeArgumentsOffsetInWords());
+ } else if (IsHasExactSuperType()) {
+ return "has-exact-super-type";
+ } else if (IsHasExactSuperClass()) {
+ return "has-exact-super-class";
+ } else {
+ ASSERT(IsUninitialized());
+ return "uninitialized-exactness";
}
}
@@ -9287,130 +9483,8 @@
}
ASSERT(static_type_exactness_state().IsUninitialized());
- ASSERT(field_type.IsFinalized());
- const Class& cls = Class::Handle(instance.clazz());
- GrowableArray<const AbstractType*> path(10);
-
- bool is_super_class = true;
- if (!FindInstantiationOf(field_type, cls, &path,
- /*consider_only_super_classes=*/true)) {
- is_super_class = false;
- bool found_super_interface = FindInstantiationOf(
- field_type, cls, &path, /*consider_only_super_classes=*/false);
- ASSERT(found_super_interface);
- }
-
- // Trivial case: field has type G<T0, ..., Tn> and value has type
- // G<U0, ..., Un>. Check if type arguments match.
- if (path.is_empty()) {
- ASSERT(cls.raw() == field_type.type_class());
- args = instance.GetTypeArguments();
- // TODO(dartbug.com/34170) Evaluate if comparing relevant subvectors (that
- // disregards superclass own arguments) improves precision of the
- // tracking.
- if (args.raw() == field_type_args.raw()) {
- SetTrivialTypeExactness(*this, cls);
- return true;
- }
-
- if (FLAG_trace_field_guards) {
- THR_Print(" expected %s got %s type arguments\n",
- field_type_args.ToCString(), args.ToCString());
- }
- set_static_type_exactness_state(StaticTypeExactnessState::NotExact());
- return true;
- }
-
- // Value has type C<U0, ..., Un> and field has type G<T0, ..., Tn> and G != C.
- // Compute C<X0, ..., Xn> at G (Xi are free type arguments).
- // Path array contains a chain of immediate supertypes S0 <: S1 <: ... Sn,
- // such that S0 is an immediate supertype of C and Sn is G<...>.
- // Each Si might depend on type parameters of the previous supertype S{i-1}.
- // To compute C<X0, ..., Xn> at G we walk the chain backwards and
- // instantiate Si using type parameters of S{i-1} which gives us a type
- // depending on type parameters of S{i-2}.
- Error& error = Error::Handle();
- AbstractType& type = AbstractType::Handle(path.Last()->raw());
- for (intptr_t i = path.length() - 2; (i >= 0) && !type.IsInstantiated();
- i--) {
- args = path[i]->arguments();
- type = type.InstantiateFrom(
- args, TypeArguments::null_type_arguments(), kAllFree, &error,
- /*instantiation_trail=*/nullptr, /*bound_trail=*/nullptr, Heap::kNew);
- }
-
- if (type.IsInstantiated()) {
- // C<X0, ..., Xn> at G is fully instantiated and does not depend on
- // Xi. In this case just check if type arguments match.
- args = type.arguments();
- if (args.Equals(field_type_args)) {
- set_static_type_exactness_state(
- is_super_class ? StaticTypeExactnessState::HasExactSuperClass()
- : StaticTypeExactnessState::HasExactSuperType());
- } else {
- if (FLAG_trace_field_guards) {
- THR_Print(
- " expected %s got %s type arguments\n",
- field_type_args.ToCString(),
- TypeArguments::Handle(instance.GetTypeArguments()).ToCString());
- }
- set_static_type_exactness_state(StaticTypeExactnessState::NotExact());
- }
-
- // We are going from trivially exact to either super-exact or not-exact.
- // In either of those case invalidate any code that might be depending
- // on the field state.
- return true;
- }
-
- // The most complicated case: C<X0, ..., Xn> at G depends on
- // Xi values. To compare type arguments we would need to instantiate
- // it fully from value's type arguments and compare with <U0, ..., Un>.
- // However this would complicate fast path in the native code. To avoid this
- // complication we would optimize for the trivial case: we check if
- // C<X0, ..., Xn> at G is exactly G<X0, ..., Xn> which means we can simply
- // compare values type arguements (<T0, ..., Tn>) to fields type arguments
- // (<U0, ..., Un>) to establish if field type is exact.
- ASSERT(cls.IsGeneric());
- const intptr_t num_type_params = cls.NumTypeParameters();
- bool trivial_case =
- (num_type_params ==
- Class::Handle(field_type.type_class()).NumTypeParameters()) &&
- (instance.GetTypeArguments() == field_type.arguments());
- if (!trivial_case && FLAG_trace_field_guards) {
- THR_Print("Not a simple case: %" Pd " vs %" Pd
- " type parameters, %s vs %s type arguments\n",
- num_type_params,
- Class::Handle(field_type.type_class()).NumTypeParameters(),
- TypeArguments::Handle(instance.GetTypeArguments()).ToCString(),
- field_type_args.ToCString());
- }
-
- AbstractType& type_arg = AbstractType::Handle();
- args = type.arguments();
- for (intptr_t i = 0; (i < num_type_params) && trivial_case; i++) {
- type_arg = args.TypeAt(i);
- if (!type_arg.IsTypeParameter() ||
- (TypeParameter::Cast(type_arg).index() != i)) {
- if (FLAG_trace_field_guards) {
- THR_Print(" => encountered %s at index % " Pd "\n",
- type_arg.ToCString(), i);
- }
- trivial_case = false;
- }
- }
-
- if (trivial_case) {
- if (static_type_exactness_state().IsUninitialized()) {
- SetTrivialTypeExactness(*this, cls);
- return true;
- }
-
- // Nothing to do - already initialized and checked.
- return false;
- }
-
- set_static_type_exactness_state(StaticTypeExactnessState::NotExact());
+ set_static_type_exactness_state(StaticTypeExactnessState::Compute(
+ field_type, instance, FLAG_trace_field_guards));
return true;
}
@@ -13662,7 +13736,7 @@
Iterator iter(*this, RawPcDescriptors::kDeopt | RawPcDescriptors::kIcCall);
while (iter.MoveNext()) {
// 'deopt_id' is set for kDeopt and kIcCall and must be unique for one kind.
- if (Thread::IsDeoptAfter(iter.DeoptId())) {
+ if (DeoptId::IsDeoptAfter(iter.DeoptId())) {
// TODO(vegorov): some instructions contain multiple calls and have
// multiple "after" targets recorded. Right now it is benign but might
// lead to issues in the future. Fix that and enable verification.
@@ -14172,9 +14246,16 @@
return reinterpret_cast<RawUnlinkedCall*>(raw);
}
+#if !defined(DART_PRECOMPILED_RUNTIME)
+void ICData::SetStaticReceiverType(const AbstractType& type) const {
+ StorePointer(&raw_ptr()->static_receiver_type_, type.raw());
+}
+#endif
+
void ICData::ResetSwitchable(Zone* zone) const {
ASSERT(NumArgsTested() == 1);
- set_ic_data_array(Array::Handle(zone, CachedEmptyICDataArray(1)));
+ ASSERT(!IsTrackingExactness());
+ set_ic_data_array(Array::Handle(zone, CachedEmptyICDataArray(1, false)));
}
const char* ICData::ToCString() const {
@@ -14316,12 +14397,14 @@
StoreNonPointer(&raw_ptr()->state_bits_, bits);
}
-intptr_t ICData::TestEntryLengthFor(intptr_t num_args) {
- return num_args + 1 /* target function*/ + 1 /* frequency */;
+intptr_t ICData::TestEntryLengthFor(intptr_t num_args,
+ bool tracking_exactness) {
+ return num_args + 1 /* target function*/ + 1 /* frequency */ +
+ (tracking_exactness ? 1 : 0) /* exactness state */;
}
intptr_t ICData::TestEntryLength() const {
- return TestEntryLengthFor(NumArgsTested());
+ return TestEntryLengthFor(NumArgsTested(), IsTrackingExactness());
}
intptr_t ICData::Length() const {
@@ -14368,6 +14451,7 @@
void ICData::WriteSentinel(const Array& data, intptr_t test_entry_length) {
ASSERT(!data.IsNull());
+ RELEASE_ASSERT(smi_illegal_cid().Value() == kIllegalCid);
for (intptr_t i = 1; i <= test_entry_length; i++) {
data.SetAt(data.Length() - i, smi_illegal_cid());
}
@@ -14592,6 +14676,7 @@
void ICData::AddCheck(const GrowableArray<intptr_t>& class_ids,
const Function& target,
intptr_t count) const {
+ ASSERT(!IsTrackingExactness());
ASSERT(!target.IsNull());
ASSERT((target.name() == target_name()) || ValidateInterceptor(target));
DEBUG_ASSERT(!HasCheck(class_ids));
@@ -14636,7 +14721,7 @@
ASSERT(!target.IsNull());
data.SetAt(data_pos++, target);
value = Smi::New(count);
- data.SetAt(data_pos, value);
+ data.SetAt(data_pos++, value);
// Multithreaded access to ICData requires setting of array to be the last
// operation.
set_ic_data_array(data);
@@ -14689,7 +14774,8 @@
void ICData::AddReceiverCheck(intptr_t receiver_class_id,
const Function& target,
- intptr_t count) const {
+ intptr_t count,
+ StaticTypeExactnessState exactness) const {
#if defined(DEBUG)
GrowableArray<intptr_t> class_ids(1);
class_ids.Add(receiver_class_id);
@@ -14715,6 +14801,9 @@
if (Isolate::Current()->compilation_allowed()) {
data.SetAt(data_pos + 1, target);
data.SetAt(data_pos + 2, Smi::Handle(Smi::New(count)));
+ if (IsTrackingExactness()) {
+ data.SetAt(data_pos + 3, Smi::Handle(Smi::New(exactness.Encode())));
+ }
} else {
// Precompilation only, after all functions have been compiled.
ASSERT(target.HasCode());
@@ -14729,6 +14818,16 @@
set_ic_data_array(data);
}
+StaticTypeExactnessState ICData::GetExactnessAt(intptr_t index) const {
+ if (!IsTrackingExactness()) {
+ return StaticTypeExactnessState::NotTracking();
+ }
+ const Array& data = Array::Handle(ic_data());
+ intptr_t data_pos = index * TestEntryLength();
+ return StaticTypeExactnessState::Decode(
+ Smi::Value(Smi::RawCast(data.At(data_pos + NumArgsTested() + 2))));
+}
+
void ICData::GetCheckAt(intptr_t index,
GrowableArray<intptr_t>* class_ids,
Function* target) const {
@@ -14879,6 +14978,7 @@
data.SetAt(data_pos, value);
}
+#if !defined(DART_PRECOMPILED_RUNTIME)
RawFunction* ICData::GetTargetForReceiverClassId(intptr_t class_id,
intptr_t* count_return) const {
const intptr_t len = NumberOfChecks();
@@ -15071,6 +15171,7 @@
}
}
}
+#endif
bool ICData::IsUsedAt(intptr_t i) const {
if (GetCountAt(i) <= 0) {
@@ -15089,24 +15190,39 @@
}
void ICData::InitOnce() {
- for (int i = 0; i < kCachedICDataArrayCount; i++) {
- cached_icdata_arrays_[i] = ICData::NewNonCachedEmptyICDataArray(i);
+ for (int i = 0; i <= kCachedICDataMaxArgsTestedWithoutExactnessTracking;
+ i++) {
+ cached_icdata_arrays_
+ [kCachedICDataZeroArgTestedWithoutExactnessTrackingIdx + i] =
+ ICData::NewNonCachedEmptyICDataArray(i, false);
}
+ cached_icdata_arrays_[kCachedICDataOneArgWithExactnessTrackingIdx] =
+ ICData::NewNonCachedEmptyICDataArray(1, true);
}
-RawArray* ICData::NewNonCachedEmptyICDataArray(intptr_t num_args_tested) {
+RawArray* ICData::NewNonCachedEmptyICDataArray(intptr_t num_args_tested,
+ bool tracking_exactness) {
// IC data array must be null terminated (sentinel entry).
- const intptr_t len = TestEntryLengthFor(num_args_tested);
+ const intptr_t len = TestEntryLengthFor(num_args_tested, tracking_exactness);
const Array& array = Array::Handle(Array::New(len, Heap::kOld));
WriteSentinel(array, len);
array.MakeImmutable();
return array.raw();
}
-RawArray* ICData::CachedEmptyICDataArray(intptr_t num_args_tested) {
- ASSERT(num_args_tested >= 0);
- ASSERT(num_args_tested < kCachedICDataArrayCount);
- return cached_icdata_arrays_[num_args_tested];
+RawArray* ICData::CachedEmptyICDataArray(intptr_t num_args_tested,
+ bool tracking_exactness) {
+ if (tracking_exactness) {
+ ASSERT(num_args_tested == 1);
+ return cached_icdata_arrays_[kCachedICDataOneArgWithExactnessTrackingIdx];
+ } else {
+ ASSERT(num_args_tested >= 0);
+ ASSERT(num_args_tested <=
+ kCachedICDataMaxArgsTestedWithoutExactnessTracking);
+ return cached_icdata_arrays_
+ [kCachedICDataZeroArgTestedWithoutExactnessTrackingIdx +
+ num_args_tested];
+ }
}
// Does not initialize ICData array.
@@ -15116,7 +15232,8 @@
const Array& arguments_descriptor,
intptr_t deopt_id,
intptr_t num_args_tested,
- RebindRule rebind_rule) {
+ RebindRule rebind_rule,
+ const AbstractType& static_receiver_type) {
ASSERT(!owner.IsNull());
ASSERT(!target_name.IsNull());
ASSERT(!arguments_descriptor.IsNull());
@@ -15140,6 +15257,7 @@
#endif
result.set_rebind_rule(rebind_rule);
result.SetNumArgsTested(num_args_tested);
+ NOT_IN_PRECOMPILED(result.SetStaticReceiverType(static_receiver_type));
return result.raw();
}
@@ -15157,7 +15275,7 @@
NoSafepointScope no_safepoint;
result ^= raw;
}
- result.set_deopt_id(Thread::kNoDeoptId);
+ result.set_deopt_id(DeoptId::kNone);
result.set_state_bits(0);
#if defined(TAG_IC_DATA)
result.set_tag(ICData::Tag::kUnknown);
@@ -15170,21 +15288,26 @@
const Array& arguments_descriptor,
intptr_t deopt_id,
intptr_t num_args_tested,
- RebindRule rebind_rule) {
+ RebindRule rebind_rule,
+ const AbstractType& static_receiver_type) {
Zone* zone = Thread::Current()->zone();
const ICData& result = ICData::Handle(
- zone, NewDescriptor(zone, owner, target_name, arguments_descriptor,
- deopt_id, num_args_tested, rebind_rule));
- result.set_ic_data_array(
- Array::Handle(zone, CachedEmptyICDataArray(num_args_tested)));
+ zone,
+ NewDescriptor(zone, owner, target_name, arguments_descriptor, deopt_id,
+ num_args_tested, rebind_rule, static_receiver_type));
+ result.set_ic_data_array(Array::Handle(
+ zone,
+ CachedEmptyICDataArray(num_args_tested, result.IsTrackingExactness())));
return result.raw();
}
+#if !defined(DART_PRECOMPILED_RUNTIME)
RawICData* ICData::NewFrom(const ICData& from, intptr_t num_args_tested) {
const ICData& result = ICData::Handle(ICData::New(
Function::Handle(from.Owner()), String::Handle(from.target_name()),
Array::Handle(from.arguments_descriptor()), from.deopt_id(),
- num_args_tested, from.rebind_rule()));
+ num_args_tested, from.rebind_rule(),
+ AbstractType::Handle(from.StaticReceiverType())));
// Copy deoptimization reasons.
result.SetDeoptReasons(from.DeoptReasons());
return result.raw();
@@ -15196,7 +15319,8 @@
zone, Function::Handle(zone, from.Owner()),
String::Handle(zone, from.target_name()),
Array::Handle(zone, from.arguments_descriptor()), from.deopt_id(),
- from.NumArgsTested(), from.rebind_rule()));
+ from.NumArgsTested(), from.rebind_rule(),
+ AbstractType::Handle(from.StaticReceiverType())));
// Clone entry array.
const Array& from_array = Array::Handle(zone, from.ic_data());
const intptr_t len = from_array.Length();
@@ -15211,6 +15335,7 @@
result.SetDeoptReasons(from.DeoptReasons());
return result.raw();
}
+#endif
Code::Comments& Code::Comments::New(intptr_t count) {
Comments* comments;
@@ -15595,32 +15720,17 @@
compiler == nullptr ? 0 : compiler->UncheckedEntryOffset()));
INC_STAT(Thread::Current(), total_instr_size, assembler->CodeSize());
INC_STAT(Thread::Current(), total_code_size, assembler->CodeSize());
-
- // Copy the instructions into the instruction area and apply all fixups.
- // Embedded pointers are still in handles at this point.
- MemoryRegion region(reinterpret_cast<void*>(instrs.PayloadStart()),
- instrs.Size());
- assembler->FinalizeInstructions(region);
- CPU::FlushICache(instrs.PayloadStart(), instrs.Size());
-
-#if defined(DART_PRECOMPILER)
- if (stats != nullptr) {
- stats->Finalize();
- instrs.set_stats(stats);
- }
-#endif
-
- const Code::Comments& comments = assembler->GetCodeComments();
-
- code.set_compile_timestamp(OS::GetCurrentMonotonicMicros());
-#ifndef PRODUCT
- CodeCommentsWrapper comments_wrapper(comments);
- CodeObservers::NotifyAll(name, instrs.PayloadStart(),
- assembler->prologue_offset(), instrs.Size(),
- optimized, &comments_wrapper);
-#endif
+ // Important: if GC is triggerred at any point between Instructions::New
+ // and here it would write protect instructions object that we are trying
+ // to fill in.
{
NoSafepointScope no_safepoint;
+ // Copy the instructions into the instruction area and apply all fixups.
+ // Embedded pointers are still in handles at this point.
+ MemoryRegion region(reinterpret_cast<void*>(instrs.PayloadStart()),
+ instrs.Size());
+ assembler->FinalizeInstructions(region);
+
const ZoneGrowableArray<intptr_t>& pointer_offsets =
assembler->GetPointerOffsets();
ASSERT(pointer_offsets.length() == pointer_offset_count);
@@ -15632,9 +15742,14 @@
intptr_t offset_in_instrs = pointer_offsets[i];
code.SetPointerOffsetAt(i, offset_in_instrs);
uword addr = region.start() + offset_in_instrs;
+ ASSERT(instrs.PayloadStart() <= addr);
+ ASSERT((instrs.PayloadStart() + instrs.Size()) > addr);
const Object* object = *reinterpret_cast<Object**>(addr);
- instrs.raw()->StorePointer(reinterpret_cast<RawObject**>(addr),
- object->raw());
+ ASSERT(object->IsOld());
+ // N.B. The pointer is embedded in the Instructions object, but visited
+ // through the Code object.
+ code.raw()->StorePointer(reinterpret_cast<RawObject**>(addr),
+ object->raw());
}
// Hook up Code and Instructions objects.
@@ -15653,6 +15768,24 @@
instrs.raw()->Size(), VirtualMemory::kReadExecute);
}
}
+ CPU::FlushICache(instrs.PayloadStart(), instrs.Size());
+
+#if defined(DART_PRECOMPILER)
+ if (stats != nullptr) {
+ stats->Finalize();
+ instrs.set_stats(stats);
+ }
+#endif
+
+ const Code::Comments& comments = assembler->GetCodeComments();
+
+ code.set_compile_timestamp(OS::GetCurrentMonotonicMicros());
+#ifndef PRODUCT
+ CodeCommentsWrapper comments_wrapper(comments);
+ CodeObservers::NotifyAll(name, instrs.PayloadStart(),
+ assembler->prologue_offset(), instrs.Size(),
+ optimized, &comments_wrapper);
+#endif
code.set_comments(comments);
if (assembler->prologue_offset() >= 0) {
code.SetPrologueOffset(assembler->prologue_offset());
@@ -15822,7 +15955,7 @@
return iter.DeoptId();
}
}
- return Thread::kNoDeoptId;
+ return DeoptId::kNone;
}
const char* Code::ToCString() const {
diff --git a/runtime/vm/object.h b/runtime/vm/object.h
index 9628163..6fbd389 100644
--- a/runtime/vm/object.h
+++ b/runtime/vm/object.h
@@ -347,93 +347,6 @@
static RawObject* null() { return null_; }
- static const Object& null_object() {
- ASSERT(null_object_ != NULL);
- return *null_object_;
- }
- static const Array& null_array() {
- ASSERT(null_array_ != NULL);
- return *null_array_;
- }
- static const String& null_string() {
- ASSERT(null_string_ != NULL);
- return *null_string_;
- }
- static const Instance& null_instance() {
- ASSERT(null_instance_ != NULL);
- return *null_instance_;
- }
- static const Function& null_function() {
- ASSERT(null_function_ != NULL);
- return *null_function_;
- }
- static const TypeArguments& null_type_arguments() {
- ASSERT(null_type_arguments_ != NULL);
- return *null_type_arguments_;
- }
- static const TypeArguments& empty_type_arguments() {
- ASSERT(empty_type_arguments_ != NULL);
- return *empty_type_arguments_;
- }
-
- static const Array& empty_array() {
- ASSERT(empty_array_ != NULL);
- return *empty_array_;
- }
- static const Array& zero_array() {
- ASSERT(zero_array_ != NULL);
- return *zero_array_;
- }
-
- static const ContextScope& empty_context_scope() {
- ASSERT(empty_context_scope_ != NULL);
- return *empty_context_scope_;
- }
-
- static const ObjectPool& empty_object_pool() {
- ASSERT(empty_object_pool_ != NULL);
- return *empty_object_pool_;
- }
-
- static const PcDescriptors& empty_descriptors() {
- ASSERT(empty_descriptors_ != NULL);
- return *empty_descriptors_;
- }
-
- static const LocalVarDescriptors& empty_var_descriptors() {
- ASSERT(empty_var_descriptors_ != NULL);
- return *empty_var_descriptors_;
- }
-
- static const ExceptionHandlers& empty_exception_handlers() {
- ASSERT(empty_exception_handlers_ != NULL);
- return *empty_exception_handlers_;
- }
-
- static const Array& extractor_parameter_types() {
- ASSERT(extractor_parameter_types_ != NULL);
- return *extractor_parameter_types_;
- }
-
- static const Array& extractor_parameter_names() {
- ASSERT(extractor_parameter_names_ != NULL);
- return *extractor_parameter_names_;
- }
-
- // The sentinel is a value that cannot be produced by Dart code.
- // It can be used to mark special values, for example to distinguish
- // "uninitialized" fields.
- static const Instance& sentinel() {
- ASSERT(sentinel_ != NULL);
- return *sentinel_;
- }
- // Value marking that we are transitioning from sentinel, e.g., computing
- // a field value. Used to detect circular initialization.
- static const Instance& transition_sentinel() {
- ASSERT(transition_sentinel_ != NULL);
- return *transition_sentinel_;
- }
-
#if defined(HASH_IN_OBJECT_HEADER)
static uint32_t GetCachedHash(const RawObject* obj) {
return obj->ptr()->hash_;
@@ -444,61 +357,56 @@
}
#endif
- // Compiler's constant propagation constants.
- static const Instance& unknown_constant() {
- ASSERT(unknown_constant_ != NULL);
- return *unknown_constant_;
- }
- static const Instance& non_constant() {
- ASSERT(non_constant_ != NULL);
- return *non_constant_;
- }
+ // The list below enumerates read-only handles for singleton
+ // objects that are shared between the different isolates.
+ //
+ // - sentinel is a value that cannot be produced by Dart code. It can be used
+ // to mark special values, for example to distinguish "uninitialized" fields.
+ // - transition_sentinel is a value marking that we are transitioning from
+ // sentinel, e.g., computing a field value. Used to detect circular
+ // initialization.
+ // - unknown_constant and non_constant are optimizing compiler's constant
+ // propagation constants.
+#define SHARED_READONLY_HANDLES_LIST(V) \
+ V(Object, null_object) \
+ V(Array, null_array) \
+ V(String, null_string) \
+ V(Instance, null_instance) \
+ V(Function, null_function) \
+ V(TypeArguments, null_type_arguments) \
+ V(TypeArguments, empty_type_arguments) \
+ V(Array, empty_array) \
+ V(Array, zero_array) \
+ V(ContextScope, empty_context_scope) \
+ V(ObjectPool, empty_object_pool) \
+ V(PcDescriptors, empty_descriptors) \
+ V(LocalVarDescriptors, empty_var_descriptors) \
+ V(ExceptionHandlers, empty_exception_handlers) \
+ V(Array, extractor_parameter_types) \
+ V(Array, extractor_parameter_names) \
+ V(Instance, sentinel) \
+ V(Instance, transition_sentinel) \
+ V(Instance, unknown_constant) \
+ V(Instance, non_constant) \
+ V(Bool, bool_true) \
+ V(Bool, bool_false) \
+ V(Smi, smi_illegal_cid) \
+ V(LanguageError, snapshot_writer_error) \
+ V(LanguageError, branch_offset_error) \
+ V(LanguageError, speculative_inlining_error) \
+ V(LanguageError, background_compilation_error) \
+ V(Array, vm_isolate_snapshot_object_table) \
+ V(Type, dynamic_type) \
+ V(Type, void_type) \
+ V(AbstractType, null_abstract_type)
- static const Bool& bool_true() {
- ASSERT(bool_true_ != NULL);
- return *bool_true_;
+#define DEFINE_SHARED_READONLY_HANDLE_GETTER(Type, name) \
+ static const Type& name() { \
+ ASSERT(name##_ != nullptr); \
+ return *name##_; \
}
- static const Bool& bool_false() {
- ASSERT(bool_false_ != NULL);
- return *bool_false_;
- }
-
- static const Smi& smi_illegal_cid() {
- ASSERT(smi_illegal_cid_ != NULL);
- return *smi_illegal_cid_;
- }
- static const LanguageError& snapshot_writer_error() {
- ASSERT(snapshot_writer_error_ != NULL);
- return *snapshot_writer_error_;
- }
-
- static const LanguageError& branch_offset_error() {
- ASSERT(branch_offset_error_ != NULL);
- return *branch_offset_error_;
- }
-
- static const LanguageError& speculative_inlining_error() {
- ASSERT(speculative_inlining_error_ != NULL);
- return *speculative_inlining_error_;
- }
-
- static const LanguageError& background_compilation_error() {
- ASSERT(background_compilation_error_ != NULL);
- return *background_compilation_error_;
- }
-
- static const Array& vm_isolate_snapshot_object_table() {
- ASSERT(vm_isolate_snapshot_object_table_ != NULL);
- return *vm_isolate_snapshot_object_table_;
- }
- static const Type& dynamic_type() {
- ASSERT(dynamic_type_ != NULL);
- return *dynamic_type_;
- }
- static const Type& void_type() {
- ASSERT(void_type_ != NULL);
- return *void_type_;
- }
+ SHARED_READONLY_HANDLES_LIST(DEFINE_SHARED_READONLY_HANDLE_GETTER)
+#undef DEFINE_SHARED_READONLY_HANDLE_GETTER
static void set_vm_isolate_snapshot_object_table(const Array& table);
@@ -512,6 +420,9 @@
static RawClass* closure_data_class() { return closure_data_class_; }
static RawClass* signature_data_class() { return signature_data_class_; }
static RawClass* redirection_data_class() { return redirection_data_class_; }
+ static RawClass* native_entry_data_class() {
+ return native_entry_data_class_;
+ }
static RawClass* field_class() { return field_class_; }
static RawClass* literal_token_class() { return literal_token_class_; }
static RawClass* token_stream_class() { return token_stream_class_; }
@@ -777,6 +688,7 @@
static RawClass* closure_data_class_; // Class of ClosureData vm obj.
static RawClass* signature_data_class_; // Class of SignatureData vm obj.
static RawClass* redirection_data_class_; // Class of RedirectionData vm obj.
+ static RawClass* native_entry_data_class_; // Class of NativeEntryData.
static RawClass* field_class_; // Class of the Field vm object.
static RawClass* literal_token_class_; // Class of LiteralToken vm object.
static RawClass* token_stream_class_; // Class of the TokenStream vm object.
@@ -806,38 +718,9 @@
static RawClass* unhandled_exception_class_; // Class of UnhandledException.
static RawClass* unwind_error_class_; // Class of UnwindError.
- // The static values below are read-only handle pointers for singleton
- // objects that are shared between the different isolates.
- static Object* null_object_;
- static Array* null_array_;
- static String* null_string_;
- static Instance* null_instance_;
- static Function* null_function_;
- static TypeArguments* null_type_arguments_;
- static TypeArguments* empty_type_arguments_;
- static Array* empty_array_;
- static Array* zero_array_;
- static ContextScope* empty_context_scope_;
- static ObjectPool* empty_object_pool_;
- static PcDescriptors* empty_descriptors_;
- static LocalVarDescriptors* empty_var_descriptors_;
- static ExceptionHandlers* empty_exception_handlers_;
- static Array* extractor_parameter_types_;
- static Array* extractor_parameter_names_;
- static Instance* sentinel_;
- static Instance* transition_sentinel_;
- static Instance* unknown_constant_;
- static Instance* non_constant_;
- static Bool* bool_true_;
- static Bool* bool_false_;
- static Smi* smi_illegal_cid_;
- static LanguageError* snapshot_writer_error_;
- static LanguageError* branch_offset_error_;
- static LanguageError* speculative_inlining_error_;
- static LanguageError* background_compilation_error_;
- static Array* vm_isolate_snapshot_object_table_;
- static Type* dynamic_type_;
- static Type* void_type_;
+#define DECLARE_SHARED_READONLY_HANDLE(Type, name) static Type* name##_;
+ SHARED_READONLY_HANDLES_LIST(DECLARE_SHARED_READONLY_HANDLE)
+#undef DECLARE_SHARED_READONLY_HANDLE
friend void ClassTable::Register(const Class& cls);
friend void RawObject::Validate(Isolate* isolate) const;
@@ -1783,6 +1666,134 @@
friend class Class;
};
+// Representation of a state of runtime tracking of static type exactness for
+// a particular location in the program (e.g. exactness of type annotation
+// on a field).
+//
+// Given the static type G<T0, ..., Tn> we say that it is exact iff any
+// values that can be observed at this location has runtime type T such that
+// type arguments of T at G are exactly <T0, ..., Tn>.
+//
+// Currently we only support tracking for locations that are also known
+// to be monomorphic with respect to the actual class of the values it contains.
+//
+// Important: locations should never switch from tracked (kIsTriviallyExact,
+// kHasExactSuperType, kHasExactSuperClass, kNotExact) to not tracked
+// (kNotTracking) or the other way around because that would affect unoptimized
+// graphs generated by graph builder and skew deopt ids.
+class StaticTypeExactnessState final {
+ public:
+ // Values stored in the location with static type G<T0, ..., Tn> are all
+ // instances of C<T0, ..., Tn> and C<U0, ..., Un> at G has type parameters
+ // <U0, ..., Un>.
+ //
+ // For trivially exact types we can simply compare type argument
+ // vectors as pointers to check exactness. That's why we represent
+ // trivially exact locations as offset in words to the type arguments of
+ // class C. All other states are represented as non-positive values.
+ //
+ // Note: we are ignoring the type argument vector sharing optimization for
+ // now.
+ static inline StaticTypeExactnessState TriviallyExact(
+ intptr_t type_arguments_offset) {
+ ASSERT((type_arguments_offset > 0) &&
+ Utils::IsAligned(type_arguments_offset, kWordSize) &&
+ Utils::IsInt(8, type_arguments_offset / kWordSize));
+ return StaticTypeExactnessState(type_arguments_offset / kWordSize);
+ }
+
+ static inline bool CanRepresentAsTriviallyExact(
+ intptr_t type_arguments_offset) {
+ return Utils::IsInt(8, type_arguments_offset / kWordSize);
+ }
+
+ // Values stored in the location with static type G<T0, ..., Tn> are all
+ // instances of class C<...> and C<U0, ..., Un> at G has type
+ // parameters <T0, ..., Tn> for any <U0, ..., Un> - that is C<...> has a
+ // supertype G<T0, ..., Tn>.
+ //
+ // For such locations we can simply check if the value stored
+ // is an instance of an expected class and we don't have to look at
+ // type arguments carried by the instance.
+ //
+ // We distinguish situations where we know that G is a superclass of C from
+ // situations where G might be superinterface of C - because in the first
+ // type arguments of G give us constant prefix of type arguments of C.
+ static inline StaticTypeExactnessState HasExactSuperType() {
+ return StaticTypeExactnessState(kHasExactSuperType);
+ }
+
+ static inline StaticTypeExactnessState HasExactSuperClass() {
+ return StaticTypeExactnessState(kHasExactSuperClass);
+ }
+
+ // Values stored in the location don't fall under either kIsTriviallyExact
+ // or kHasExactSuperType categories.
+ //
+ // Note: that does not imply that static type annotation is not exact
+ // according to a broader definition, e.g. location might simply be
+ // polymorphic and store instances of multiple different types.
+ // However for simplicity we don't track such cases yet.
+ static inline StaticTypeExactnessState NotExact() {
+ return StaticTypeExactnessState(kNotExact);
+ }
+
+ // The location does not track exactness of its static type at runtime.
+ static inline StaticTypeExactnessState NotTracking() {
+ return StaticTypeExactnessState(kNotTracking);
+ }
+
+ static inline StaticTypeExactnessState Unitialized() {
+ return StaticTypeExactnessState(kUninitialized);
+ }
+
+ static StaticTypeExactnessState Compute(const Type& static_type,
+ const Instance& value,
+ bool print_trace = false);
+
+ bool IsTracking() const { return value_ != kNotTracking; }
+ bool IsUninitialized() const { return value_ == kUninitialized; }
+ bool IsHasExactSuperClass() const { return value_ == kHasExactSuperClass; }
+ bool IsHasExactSuperType() const { return value_ == kHasExactSuperType; }
+ bool IsTriviallyExact() const { return value_ > kUninitialized; }
+ bool NeedsFieldGuard() const { return value_ >= kUninitialized; }
+ bool IsExactOrUninitialized() const { return value_ > kNotExact; }
+ bool IsExact() const {
+ return IsTriviallyExact() || IsHasExactSuperType() ||
+ IsHasExactSuperClass();
+ }
+
+ const char* ToCString() const;
+
+ StaticTypeExactnessState CollapseSuperTypeExactness() const {
+ return IsHasExactSuperClass() ? HasExactSuperType() : *this;
+ }
+
+ static inline StaticTypeExactnessState Decode(int8_t value) {
+ return StaticTypeExactnessState(value);
+ }
+
+ int8_t Encode() const { return value_; }
+ intptr_t GetTypeArgumentsOffsetInWords() const {
+ ASSERT(IsTriviallyExact());
+ return value_;
+ }
+
+ static constexpr int8_t kUninitialized = 0;
+
+ private:
+ static constexpr int8_t kNotTracking = -4;
+ static constexpr int8_t kNotExact = -3;
+ static constexpr int8_t kHasExactSuperType = -2;
+ static constexpr int8_t kHasExactSuperClass = -1;
+
+ explicit StaticTypeExactnessState(int8_t value) : value_(value) {}
+
+ int8_t value_;
+
+ DISALLOW_ALLOCATION();
+};
+
// Object holding information about an IC: test classes and their
// corresponding targets. The owner of the ICData can be either the function
// or the original ICData object. In case of background compilation we
@@ -1821,6 +1832,18 @@
bool IsImmutable() const;
+#if !defined(DART_PRECOMPILED_RUNTIME)
+ RawAbstractType* StaticReceiverType() const {
+ return raw_ptr()->static_receiver_type_;
+ }
+ void SetStaticReceiverType(const AbstractType& type) const;
+ bool IsTrackingExactness() const {
+ return StaticReceiverType() != Object::null();
+ }
+#else
+ bool IsTrackingExactness() const { return false; }
+#endif
+
void Reset(Zone* zone) const;
void ResetSwitchable(Zone* zone) const;
@@ -1922,6 +1945,12 @@
static intptr_t owner_offset() { return OFFSET_OF(RawICData, owner_); }
+#if !defined(DART_PRECOMPILED_RUNTIME)
+ static intptr_t static_receiver_type_offset() {
+ return OFFSET_OF(RawICData, static_receiver_type_);
+ }
+#endif
+
// Replaces entry |index| with the sentinel.
void WriteSentinelAt(intptr_t index) const;
@@ -1955,11 +1984,16 @@
void AddCheck(const GrowableArray<intptr_t>& class_ids,
const Function& target,
intptr_t count = 1) const;
+
+ StaticTypeExactnessState GetExactnessAt(intptr_t count) const;
+
// Adds sorted so that Smi is the first class-id. Use only for
// num_args_tested == 1.
void AddReceiverCheck(intptr_t receiver_class_id,
const Function& target,
- intptr_t count = 1) const;
+ intptr_t count = 1,
+ StaticTypeExactnessState exactness =
+ StaticTypeExactnessState::NotTracking()) const;
// Does entry |index| contain the sentinel value?
bool IsSentinelAt(intptr_t index) const;
@@ -2016,18 +2050,25 @@
bool HasOneTarget() const;
bool HasReceiverClassId(intptr_t class_id) const;
- static RawICData* New(const Function& owner,
- const String& target_name,
- const Array& arguments_descriptor,
- intptr_t deopt_id,
- intptr_t num_args_tested,
- RebindRule rebind_rule);
+ // Note: passing non-null receiver_type enables exactness tracking for
+ // the receiver type. Receiver type is expected to be a fully
+ // instantiated generic (but not a FutureOr).
+ // See StaticTypeExactnessState for more information.
+ static RawICData* New(
+ const Function& owner,
+ const String& target_name,
+ const Array& arguments_descriptor,
+ intptr_t deopt_id,
+ intptr_t num_args_tested,
+ RebindRule rebind_rule,
+ const AbstractType& receiver_type = Object::null_abstract_type());
static RawICData* NewFrom(const ICData& from, intptr_t num_args_tested);
// Generates a new ICData with descriptor and data array copied (deep clone).
static RawICData* Clone(const ICData& from);
- static intptr_t TestEntryLengthFor(intptr_t num_args);
+ static intptr_t TestEntryLengthFor(intptr_t num_args,
+ bool tracking_exactness);
static intptr_t TargetIndexFor(intptr_t num_args) { return num_args; }
static intptr_t CodeIndexFor(intptr_t num_args) { return num_args; }
@@ -2036,6 +2077,9 @@
static intptr_t EntryPointIndexFor(intptr_t num_args) {
return (num_args + 1);
}
+ static intptr_t ExactnessOffsetFor(intptr_t num_args) {
+ return (num_args + 2);
+ }
bool IsUsedAt(intptr_t i) const;
@@ -2048,7 +2092,16 @@
// Initialize the preallocated empty ICData entry arrays.
static void InitOnce();
- enum { kCachedICDataArrayCount = 4 };
+ // We cache ICData with 0, 1, 2 arguments tested without exactness
+ // tracking and with 1 argument tested with exactness tracking.
+ enum {
+ kCachedICDataZeroArgTestedWithoutExactnessTrackingIdx = 0,
+ kCachedICDataMaxArgsTestedWithoutExactnessTracking = 2,
+ kCachedICDataOneArgWithExactnessTrackingIdx =
+ kCachedICDataZeroArgTestedWithoutExactnessTrackingIdx +
+ kCachedICDataMaxArgsTestedWithoutExactnessTracking + 1,
+ kCachedICDataArrayCount = kCachedICDataOneArgWithExactnessTrackingIdx + 1,
+ };
#if defined(TAG_IC_DATA)
using Tag = RawICData::Tag;
@@ -2102,15 +2155,18 @@
#endif // DEBUG
intptr_t TestEntryLength() const;
- static RawArray* NewNonCachedEmptyICDataArray(intptr_t num_args_tested);
- static RawArray* CachedEmptyICDataArray(intptr_t num_args_tested);
+ static RawArray* NewNonCachedEmptyICDataArray(intptr_t num_args_tested,
+ bool tracking_exactness);
+ static RawArray* CachedEmptyICDataArray(intptr_t num_args_tested,
+ bool tracking_exactness);
static RawICData* NewDescriptor(Zone* zone,
const Function& owner,
const String& target_name,
const Array& arguments_descriptor,
intptr_t deopt_id,
intptr_t num_args_tested,
- RebindRule rebind_rule);
+ RebindRule rebind_rule,
+ const AbstractType& receiver_type);
static void WriteSentinel(const Array& data, intptr_t test_entry_length);
@@ -2482,7 +2538,7 @@
bool NeedsArgumentTypeChecks(Isolate* I) const {
if (I->strong()) {
- if (FLAG_omit_strong_type_checks) {
+ if (!I->should_emit_strong_mode_checks()) {
return false;
}
return IsClosureFunction() ||
@@ -3160,114 +3216,37 @@
friend class HeapProfiler;
};
-// Representation of a state of runtime tracking of static type exactness for
-// a particular location in the program (e.g. exactness of type annotation
-// on a field).
-//
-// Given the static type G<T0, ..., Tn> we say that it is exact iff any
-// values that can be observed at this location has runtime type T such that
-// type arguments of T at G are exactly <T0, ..., Tn>.
-//
-// Currently we only support tracking for locations that are also known
-// to be monomorphic with respect to the actual class of the values it contains.
-//
-// Important: locations should never switch from tracked (kIsTriviallyExact,
-// kHasExactSuperType, kHasExactSuperClass, kNotExact) to not tracked
-// (kNotTracking) or the other way around because that would affect unoptimized
-// graphs generated by graph builder and skew deopt ids.
-class StaticTypeExactnessState final {
+class NativeEntryData : public Object {
public:
- // Values stored in the location with static type G<T0, ..., Tn> are all
- // instances of C<T0, ..., Tn> and C<U0, ..., Un> at G has type parameters
- // <U0, ..., Un>.
- //
- // For trivially exact types we can simply compare type argument
- // vectors as pointers to check exactness. That's why we represent
- // trivially exact locations as offset in words to the type arguments of
- // class C. All other states are represented as non-positive values.
- //
- // Note: we are ignoring the type argument vector sharing optimization for
- // now.
- static inline StaticTypeExactnessState TriviallyExact(
- intptr_t type_arguments_offset) {
- ASSERT((type_arguments_offset > 0) &&
- Utils::IsAligned(type_arguments_offset, kWordSize) &&
- Utils::IsInt(8, type_arguments_offset / kWordSize));
- return StaticTypeExactnessState(type_arguments_offset / kWordSize);
+ static intptr_t InstanceSize() {
+ return RoundedAllocationSize(sizeof(RawNativeEntryData));
}
- static inline bool CanRepresentAsTriviallyExact(
- intptr_t type_arguments_offset) {
- return Utils::IsInt(8, type_arguments_offset / kWordSize);
+ MethodRecognizer::Kind kind() const { return raw_ptr()->kind_; }
+ void set_kind(MethodRecognizer::Kind value) const {
+ StoreNonPointer(&raw_ptr()->kind_, value);
}
- // Values stored in the location with static type G<T0, ..., Tn> are all
- // instances of class C<...> and C<U0, ..., Un> at G has type
- // parameters <T0, ..., Tn> for any <U0, ..., Un> - that is C<...> has a
- // supertype G<T0, ..., Tn>.
- //
- // For such locations we can simply check if the value stored
- // is an instance of an expected class and we don't have to look at
- // type arguments carried by the instance.
- //
- // We distinguish situations where we know that G is a superclass of C from
- // situations where G might be superinterface of C - because in the first
- // type arguments of G give us constant prefix of type arguments of C.
- static inline StaticTypeExactnessState HasExactSuperType() {
- return StaticTypeExactnessState(kHasExactSuperType);
+ NativeFunctionWrapper trampoline() const { return raw_ptr()->trampoline_; }
+ void set_trampoline(NativeFunctionWrapper value) const {
+ StoreNonPointer(&raw_ptr()->trampoline_, value);
}
- static inline StaticTypeExactnessState HasExactSuperClass() {
- return StaticTypeExactnessState(kHasExactSuperClass);
+ NativeFunction native_function() const { return raw_ptr()->native_function_; }
+ void set_native_function(NativeFunction value) const {
+ StoreNonPointer(&raw_ptr()->native_function_, value);
}
- // Values stored in the location don't fall under either kIsTriviallyExact
- // or kHasExactSuperType categories.
- //
- // Note: that does not imply that static type annotation is not exact
- // according to a broader definition, e.g. location might simply be
- // polymorphic and store instances of multiple different types.
- // However for simplicity we don't track such cases yet.
- static inline StaticTypeExactnessState NotExact() {
- return StaticTypeExactnessState(kNotExact);
+ intptr_t argc_tag() const { return raw_ptr()->argc_tag_; }
+ void set_argc_tag(intptr_t value) const {
+ StoreNonPointer(&raw_ptr()->argc_tag_, value);
}
- // The location does not track exactness of its static type at runtime.
- static inline StaticTypeExactnessState NotTracking() {
- return StaticTypeExactnessState(kNotTracking);
- }
+ static RawNativeEntryData* New();
- static inline StaticTypeExactnessState Unitialized() {
- return StaticTypeExactnessState(kUninitialized);
- }
-
- bool IsTracking() const { return value_ != kNotTracking; }
- bool IsUninitialized() const { return value_ == kUninitialized; }
- bool IsHasExactSuperClass() const { return value_ == kHasExactSuperClass; }
- bool IsHasExactSuperType() const { return value_ == kHasExactSuperType; }
- bool IsTriviallyExact() const { return value_ > kUninitialized; }
- bool NeedsFieldGuard() const { return value_ >= kUninitialized; }
- bool IsExactOrUninitialized() const { return value_ > kNotExact; }
-
- static inline StaticTypeExactnessState Decode(int8_t value) {
- return StaticTypeExactnessState(value);
- }
-
- int8_t Encode() const { return value_; }
-
- static constexpr int8_t kUninitialized = 0;
-
- private:
- static constexpr int8_t kNotTracking = -4;
- static constexpr int8_t kNotExact = -3;
- static constexpr int8_t kHasExactSuperType = -2;
- static constexpr int8_t kHasExactSuperClass = -1;
-
- explicit StaticTypeExactnessState(int8_t value) : value_(value) {}
-
- const int8_t value_;
-
- DISALLOW_ALLOCATION();
+ FINAL_HEAP_OBJECT_IMPLEMENTATION(NativeEntryData, Object);
+ friend class Class;
+ friend class HeapProfiler;
};
class Field : public Object {
@@ -6584,9 +6563,7 @@
static intptr_t type_class_id_offset() {
return OFFSET_OF(RawType, type_class_id_);
}
- static intptr_t arguments_offset() {
- return OFFSET_OF(RawType, type_class_id_);
- }
+ static intptr_t arguments_offset() { return OFFSET_OF(RawType, arguments_); }
static intptr_t type_state_offset() {
return OFFSET_OF(RawType, type_state_);
}
diff --git a/runtime/vm/object_arm_test.cc b/runtime/vm/object_arm_test.cc
index 4bebaef..5f9f3d7 100644
--- a/runtime/vm/object_arm_test.cc
+++ b/runtime/vm/object_arm_test.cc
@@ -36,8 +36,7 @@
const String& string_object =
String::ZoneHandle(String::New(str, Heap::kOld));
__ LoadObject(R0, string_object);
- __ LeaveDartFrame();
- __ Ret();
+ __ LeaveDartFrameAndReturn();
}
// Generate a dart code sequence that embeds a smi object in it.
diff --git a/runtime/vm/object_graph.cc b/runtime/vm/object_graph.cc
index 6a56a57..1046b77 100644
--- a/runtime/vm/object_graph.cc
+++ b/runtime/vm/object_graph.cc
@@ -34,7 +34,7 @@
// Marks and pushes. Used to initialize this stack with roots.
virtual void VisitPointers(RawObject** first, RawObject** last) {
for (RawObject** current = first; current <= last; ++current) {
- if ((*current)->IsHeapObject() && !(*current)->IsMarked()) {
+ if ((*current)->IsHeapObject() && !(*current)->IsGraphMarked()) {
if (!include_vm_objects_) {
intptr_t cid = (*current)->GetClassId();
if (((cid < kInstanceCid) || (cid == kTypeArgumentsCid)) &&
@@ -42,7 +42,7 @@
continue;
}
}
- (*current)->SetMarkBit();
+ (*current)->SetGraphMarked();
Node node;
node.ptr = current;
node.obj = *current;
@@ -149,8 +149,8 @@
Unmarker() {}
void VisitObject(RawObject* obj) {
- if (obj->IsMarked()) {
- obj->ClearMarkBit();
+ if (obj->IsGraphMarked()) {
+ obj->ClearGraphMarked();
}
}
diff --git a/runtime/vm/object_reload.cc b/runtime/vm/object_reload.cc
index d2197e3..0474419 100644
--- a/runtime/vm/object_reload.cc
+++ b/runtime/vm/object_reload.cc
@@ -688,12 +688,13 @@
void ICData::Reset(Zone* zone) const {
RebindRule rule = rebind_rule();
if (rule == kInstance) {
- intptr_t num_args = NumArgsTested();
+ const intptr_t num_args = NumArgsTested();
+ const bool tracking_exactness = IsTrackingExactness();
if (num_args == 2) {
ClearWithSentinel();
} else {
- const Array& data_array =
- Array::Handle(zone, CachedEmptyICDataArray(num_args));
+ const Array& data_array = Array::Handle(
+ zone, CachedEmptyICDataArray(num_args, tracking_exactness));
set_ic_data_array(data_array);
}
return;
diff --git a/runtime/vm/object_service.cc b/runtime/vm/object_service.cc
index 7812ac5..4b99e44 100644
--- a/runtime/vm/object_service.cc
+++ b/runtime/vm/object_service.cc
@@ -346,6 +346,10 @@
Object::PrintJSONImpl(stream, ref);
}
+void NativeEntryData::PrintJSONImpl(JSONStream* stream, bool ref) const {
+ Object::PrintJSONImpl(stream, ref);
+}
+
void Field::PrintJSONImpl(JSONStream* stream, bool ref) const {
JSONObject jsobj(stream);
Class& cls = Class::Handle(Owner());
diff --git a/runtime/vm/object_test.cc b/runtime/vm/object_test.cc
index 35bc8dd..9af09d4 100644
--- a/runtime/vm/object_test.cc
+++ b/runtime/vm/object_test.cc
@@ -235,6 +235,7 @@
"}\n";
Dart_Handle lib_h = TestCase::LoadTestScript(kScript, NULL);
EXPECT_VALID(lib_h);
+ TransitionNativeToVM transition(thread);
Library& lib = Library::Handle();
lib ^= Api::UnwrapHandle(lib_h);
EXPECT(!lib.IsNull());
@@ -2271,7 +2272,7 @@
}
}
-TEST_CASE(Script) {
+ISOLATE_UNIT_TEST_CASE(Script) {
const char* url_chars = "builtin:test-case";
const char* source_chars = "This will not compile.";
const String& url = String::Handle(String::New(url_chars));
@@ -2291,6 +2292,7 @@
EXPECT_EQ('n', str.CharAt(10));
EXPECT_EQ('.', str.CharAt(21));
+ TransitionVMToNative transition(thread);
const char* kScript = "main() {}";
Dart_Handle h_lib = TestCase::LoadTestScript(kScript, NULL);
EXPECT_VALID(h_lib);
@@ -3841,6 +3843,7 @@
EXPECT_VALID(h_lib);
Dart_Handle result = Dart_Invoke(h_lib, NewString("main"), 0, NULL);
EXPECT_VALID(result);
+ TransitionNativeToVM transition(thread);
Library& lib = Library::Handle();
lib ^= Api::UnwrapHandle(h_lib);
EXPECT(!lib.IsNull());
@@ -3916,6 +3919,7 @@
" }\n"
"}";
TestCase::LoadTestScript(kScriptChars, NULL);
+ TransitionNativeToVM transition(thread);
EXPECT(ClassFinalizer::ProcessPendingClasses());
const String& name = String::Handle(String::New(TestCase::url()));
const Library& lib = Library::Handle(Library::LookupLibrary(thread, name));
@@ -3977,13 +3981,19 @@
Dart_Handle result = Dart_Invoke(lib, NewString("test"), 0, NULL);
EXPECT_VALID(result);
+ Function& func_b = Function::Handle();
+ {
+ TransitionNativeToVM transition(thread);
+ const String& name = String::Handle(String::New(TestCase::url()));
+ const Library& vmlib =
+ Library::Handle(Library::LookupLibrary(thread, name));
+ EXPECT(!vmlib.IsNull());
+ const Class& class_a = Class::Handle(
+ vmlib.LookupClass(String::Handle(Symbols::New(thread, "A"))));
+ func_b = GetFunction(class_a, "b");
+ }
+
// With no breakpoint, function A.b is inlineable.
- const String& name = String::Handle(String::New(TestCase::url()));
- const Library& vmlib = Library::Handle(Library::LookupLibrary(thread, name));
- EXPECT(!vmlib.IsNull());
- const Class& class_a = Class::Handle(
- vmlib.LookupClass(String::Handle(Symbols::New(thread, "A"))));
- const Function& func_b = Function::Handle(GetFunction(class_a, "b"));
EXPECT(func_b.CanBeInlined());
// After setting a breakpoint in a function A.b, it is no longer inlineable.
@@ -4348,6 +4358,8 @@
EXPECT(!lib.IsNull());
Dart_Handle result = Dart_Invoke(h_lib, NewString("main"), 0, NULL);
EXPECT_VALID(result);
+
+ TransitionNativeToVM transition(thread);
const Class& clazz = Class::Handle(GetClass(lib, "A"));
EXPECT(!clazz.IsNull());
const Instance& a0 = Instance::Handle(Instance::New(clazz));
@@ -4375,6 +4387,8 @@
EXPECT_VALID(h_result);
Integer& result = Integer::Handle();
result ^= Api::UnwrapHandle(h_result);
+
+ TransitionNativeToVM transition(thread);
String& foo = String::Handle(String::New("foo"));
Integer& expected = Integer::Handle();
expected ^= foo.HashCode();
@@ -4440,13 +4454,14 @@
Dart_Handle h_result = Dart_Invoke(h_lib, NewString("makeMap"), 0, NULL);
EXPECT_VALID(h_result);
+ TransitionNativeToVM transition(thread);
+
// 2. Create an empty internalized LinkedHashMap in C++.
Instance& dart_map = Instance::Handle();
dart_map ^= Api::UnwrapHandle(h_result);
LinkedHashMap& cc_map = LinkedHashMap::Handle(LinkedHashMap::NewDefault());
// 3. Expect them to have identical structure.
- TransitionNativeToVM transition(thread);
CheckIdenticalHashStructure(thread, dart_map, cc_map);
}
diff --git a/runtime/vm/os_fuchsia.cc b/runtime/vm/os_fuchsia.cc
index 17b21ad..a6b7a18 100644
--- a/runtime/vm/os_fuchsia.cc
+++ b/runtime/vm/os_fuchsia.cc
@@ -16,7 +16,6 @@
#include <fuchsia/timezone/cpp/fidl.h>
-#include "lib/component/cpp/environment_services.h"
#include "lib/component/cpp/startup_context.h"
#include "lib/svc/cpp/services.h"
diff --git a/runtime/vm/parser.cc b/runtime/vm/parser.cc
index 5cfa65a..d55273e 100644
--- a/runtime/vm/parser.cc
+++ b/runtime/vm/parser.cc
@@ -228,7 +228,7 @@
if (Compiler::IsBackgroundCompilation()) {
if (!other->IsConsistentWith(*field)) {
Compiler::AbortBackgroundCompilation(
- Thread::kNoDeoptId,
+ DeoptId::kNone,
"Field's guarded state changed during compilation");
}
}
diff --git a/runtime/vm/parser_test.cc b/runtime/vm/parser_test.cc
index a04d599..58c0125 100644
--- a/runtime/vm/parser_test.cc
+++ b/runtime/vm/parser_test.cc
@@ -106,7 +106,7 @@
EXPECT(!function.IsNull());
}
-TEST_CASE(ParseClassDefinition) {
+ISOLATE_UNIT_TEST_CASE(ParseClassDefinition) {
const char* script_chars =
"class C { } \n"
"class A { \n"
@@ -141,7 +141,7 @@
CheckFunction(lib, "A", "foo", true);
}
-TEST_CASE(Parser_TopLevel) {
+ISOLATE_UNIT_TEST_CASE(Parser_TopLevel) {
const char* script_chars =
"class A extends B { \n"
" static bar(var i, [var d = 5]) { return 77; } \n"
@@ -206,6 +206,7 @@
static void SaveVars(Dart_IsolateId isolate_id,
intptr_t bp_id,
const Dart_CodeLocation& loc) {
+ TransitionNativeToVM transition(Thread::Current());
DebuggerStackTrace* stack = Isolate::Current()->debugger()->StackTrace();
intptr_t num_frames = stack->Length();
const int kBufferLen = 2048;
diff --git a/runtime/vm/profiler_test.cc b/runtime/vm/profiler_test.cc
index 5d3d00b0..f69e319 100644
--- a/runtime/vm/profiler_test.cc
+++ b/runtime/vm/profiler_test.cc
@@ -148,15 +148,19 @@
}
static RawClass* GetClass(const Library& lib, const char* name) {
- const Class& cls = Class::Handle(lib.LookupClassAllowPrivate(
- String::Handle(Symbols::New(Thread::Current(), name))));
+ Thread* thread = Thread::Current();
+ TransitionNativeToVM transition(thread);
+ const Class& cls = Class::Handle(
+ lib.LookupClassAllowPrivate(String::Handle(Symbols::New(thread, name))));
EXPECT(!cls.IsNull()); // No ambiguity error expected.
return cls.raw();
}
static RawFunction* GetFunction(const Library& lib, const char* name) {
+ Thread* thread = Thread::Current();
+ TransitionNativeToVM transition(thread);
const Function& func = Function::Handle(lib.LookupFunctionAllowPrivate(
- String::Handle(Symbols::New(Thread::Current(), name))));
+ String::Handle(Symbols::New(thread, name))));
EXPECT(!func.IsNull()); // No ambiguity error expected.
return func.raw();
}
diff --git a/runtime/vm/raw_object.cc b/runtime/vm/raw_object.cc
index 71442f9..5db35fb 100644
--- a/runtime/vm/raw_object.cc
+++ b/runtime/vm/raw_object.cc
@@ -30,9 +30,26 @@
}
// Validate that the tags_ field is sensible.
uint32_t tags = ptr()->tags_;
- intptr_t reserved = ReservedBits::decode(tags);
- if (reserved != 0) {
- FATAL1("Invalid tags field encountered %x\n", tags);
+ if (IsNewObject()) {
+ if (!NewBit::decode(tags)) {
+ FATAL1("New object missing kNewBit: %x\n", tags);
+ }
+ if (OldBit::decode(tags)) {
+ FATAL1("New object has kOldBit: %x\n", tags);
+ }
+ if (OldAndNotMarkedBit::decode(tags)) {
+ FATAL1("New object has kOldAndNotMarkedBit: %x\n", tags);
+ }
+ if (OldAndNotRememberedBit::decode(tags)) {
+ FATAL1("Mew object has kOldAndNotRememberedBit: %x\n", tags);
+ }
+ } else {
+ if (NewBit::decode(tags)) {
+ FATAL1("Old object has kNewBit: %x\n", tags);
+ }
+ if (!OldBit::decode(tags)) {
+ FATAL1("Old object missing kOldBit: %x\n", tags);
+ }
}
intptr_t class_id = ClassIdTag::decode(tags);
if (!isolate->class_table()->IsValidIndex(class_id)) {
@@ -363,6 +380,7 @@
REGULAR_VISITOR(ClosureData)
REGULAR_VISITOR(SignatureData)
REGULAR_VISITOR(RedirectionData)
+NULL_VISITOR(NativeEntryData)
REGULAR_VISITOR(Field)
REGULAR_VISITOR(LiteralToken)
REGULAR_VISITOR(TokenStream)
diff --git a/runtime/vm/raw_object.h b/runtime/vm/raw_object.h
index 1738a30..c6e3669 100644
--- a/runtime/vm/raw_object.h
+++ b/runtime/vm/raw_object.h
@@ -7,6 +7,7 @@
#include "platform/assert.h"
#include "platform/atomic.h"
+#include "vm/compiler/method_recognizer.h"
#include "vm/exceptions.h"
#include "vm/globals.h"
#include "vm/snapshot.h"
@@ -27,6 +28,7 @@
V(ClosureData) \
V(SignatureData) \
V(RedirectionData) \
+ V(NativeEntryData) \
V(Field) \
V(LiteralToken) \
V(TokenStream) \
@@ -288,13 +290,16 @@
// The tags field which is a part of the object header uses the following
// bit fields for storing tags.
enum TagBits {
- kMarkBit = 0,
- kCanonicalBit = 1,
- kVMHeapObjectBit = 2,
- kRememberedBit = 3,
- kReservedTagPos = 4, // kReservedBit{10K,100K,1M,10M}
- kReservedTagSize = 4,
- kSizeTagPos = kReservedTagPos + kReservedTagSize, // = 8
+ kReservedBit = 0,
+ kOldAndNotMarkedBit = 1, // Incremental barrier target.
+ kNewBit = 2, // Generational barrier target.
+ kOldBit = 3, // Incremental barrier source.
+ kOldAndNotRememberedBit = 4, // Generational barrier source.
+ kCanonicalBit = 5,
+ kVMHeapObjectBit = 6,
+ kGraphMarkedBit = 7, // ObjectGraph needs to mark through new space.
+
+ kSizeTagPos = 8,
kSizeTagSize = 8,
kClassIdTagPos = kSizeTagPos + kSizeTagSize, // = 16
kClassIdTagSize = 16,
@@ -304,6 +309,15 @@
#endif
};
+ static const intptr_t kBarrierOverlapShift = 2;
+ COMPILE_ASSERT(kOldAndNotMarkedBit + kBarrierOverlapShift == kOldBit);
+ COMPILE_ASSERT(kNewBit + kBarrierOverlapShift == kOldAndNotRememberedBit);
+
+ // The bit in the Smi tag position must be something that can be set to 0
+ // for a dead filler object of either generation.
+ // See Object::MakeUnusedSpaceTraversable.
+ COMPILE_ASSERT(kReservedBit == 0);
+
COMPILE_ASSERT(kClassIdTagSize == (sizeof(classid_t) * kBitsPerByte));
// Encodes the object size in the tag in units of object alignment.
@@ -341,6 +355,24 @@
class ClassIdTag
: public BitField<uint32_t, intptr_t, kClassIdTagPos, kClassIdTagSize> {};
+ class OldAndNotMarkedBit
+ : public BitField<uint32_t, bool, kOldAndNotMarkedBit, 1> {};
+
+ class NewBit : public BitField<uint32_t, bool, kNewBit, 1> {};
+
+ class CanonicalObjectTag : public BitField<uint32_t, bool, kCanonicalBit, 1> {
+ };
+
+ class GraphMarkedBit : public BitField<uint32_t, bool, kGraphMarkedBit, 1> {};
+
+ class VMHeapObjectTag : public BitField<uint32_t, bool, kVMHeapObjectBit, 1> {
+ };
+
+ class OldBit : public BitField<uint32_t, bool, kOldBit, 1> {};
+
+ class OldAndNotRememberedBit
+ : public BitField<uint32_t, bool, kOldAndNotRememberedBit, 1> {};
+
bool IsWellFormed() const {
uword value = reinterpret_cast<uword>(this);
return (value & kSmiTagMask) == 0 ||
@@ -383,23 +415,32 @@
}
// Support for GC marking bit.
- bool IsMarked() const { return MarkBit::decode(ptr()->tags_); }
+ bool IsMarked() const {
+ ASSERT(IsOldObject());
+ return !OldAndNotMarkedBit::decode(ptr()->tags_);
+ }
void SetMarkBit() {
+ ASSERT(IsOldObject());
ASSERT(!IsMarked());
- UpdateTagBit<MarkBit>(true);
+ UpdateTagBit<OldAndNotMarkedBit>(false);
}
void SetMarkBitUnsynchronized() {
+ ASSERT(IsOldObject());
ASSERT(!IsMarked());
uint32_t tags = ptr()->tags_;
- ptr()->tags_ = MarkBit::update(true, tags);
+ ptr()->tags_ = OldAndNotMarkedBit::update(false, tags);
}
void ClearMarkBit() {
+ ASSERT(IsOldObject());
ASSERT(IsMarked());
- UpdateTagBit<MarkBit>(false);
+ UpdateTagBit<OldAndNotMarkedBit>(true);
}
// Returns false if the bit was already set.
DART_WARN_UNUSED_RESULT
- bool TryAcquireMarkBit() { return TryAcquireTagBit<MarkBit>(); }
+ bool TryAcquireMarkBit() {
+ ASSERT(IsOldObject());
+ return TryClearTagBit<OldAndNotMarkedBit>();
+ }
// Support for object tags.
bool IsCanonical() const { return CanonicalObjectTag::decode(ptr()->tags_); }
@@ -408,25 +449,44 @@
bool IsVMHeapObject() const { return VMHeapObjectTag::decode(ptr()->tags_); }
void SetVMHeapObject() { UpdateTagBit<VMHeapObjectTag>(true); }
+ // Support for ObjectGraph marking bit.
+ bool IsGraphMarked() const {
+ if (IsVMHeapObject()) return true;
+ return GraphMarkedBit::decode(ptr()->tags_);
+ }
+ void SetGraphMarked() {
+ ASSERT(!IsVMHeapObject());
+ uint32_t tags = ptr()->tags_;
+ ptr()->tags_ = GraphMarkedBit::update(true, tags);
+ }
+ void ClearGraphMarked() {
+ ASSERT(!IsVMHeapObject());
+ uint32_t tags = ptr()->tags_;
+ ptr()->tags_ = GraphMarkedBit::update(false, tags);
+ }
+
// Support for GC remembered bit.
- bool IsRemembered() const { return RememberedBit::decode(ptr()->tags_); }
+ bool IsRemembered() const {
+ ASSERT(IsOldObject());
+ return !OldAndNotRememberedBit::decode(ptr()->tags_);
+ }
void SetRememberedBit() {
ASSERT(!IsRemembered());
- UpdateTagBit<RememberedBit>(true);
+ UpdateTagBit<OldAndNotRememberedBit>(false);
}
void SetRememberedBitUnsynchronized() {
ASSERT(!IsRemembered());
uint32_t tags = ptr()->tags_;
- ptr()->tags_ = RememberedBit::update(true, tags);
+ ptr()->tags_ = OldAndNotRememberedBit::update(false, tags);
}
- void ClearRememberedBit() { UpdateTagBit<RememberedBit>(false); }
+ void ClearRememberedBit() {
+ ASSERT(IsOldObject());
+ UpdateTagBit<OldAndNotRememberedBit>(true);
+ }
void ClearRememberedBitUnsynchronized() {
uint32_t tags = ptr()->tags_;
- ptr()->tags_ = RememberedBit::update(false, tags);
+ ptr()->tags_ = OldAndNotRememberedBit::update(true, tags);
}
- // Returns false if the bit was already set.
- DART_WARN_UNUSED_RESULT
- bool TryAcquireRememberedBit() { return TryAcquireTagBit<RememberedBit>(); }
#define DEFINE_IS_CID(clazz) \
bool Is##clazz() const { return ((GetClassId() == k##clazz##Cid)); }
@@ -585,20 +645,6 @@
uint32_t hash_;
#endif
- class MarkBit : public BitField<uint32_t, bool, kMarkBit, 1> {};
-
- class RememberedBit : public BitField<uint32_t, bool, kRememberedBit, 1> {};
-
- class CanonicalObjectTag : public BitField<uint32_t, bool, kCanonicalBit, 1> {
- };
-
- class VMHeapObjectTag : public BitField<uint32_t, bool, kVMHeapObjectBit, 1> {
- };
-
- class ReservedBits
- : public BitField<uint32_t, intptr_t, kReservedTagPos, kReservedTagSize> {
- };
-
// TODO(koda): After handling tags_, return const*, like Object::raw_ptr().
RawObject* ptr() const {
ASSERT(IsHeapObject());
@@ -638,6 +684,12 @@
&ptr()->tags_, TagBitField::encode(true));
return !TagBitField::decode(old_tags);
}
+ template <class TagBitField>
+ bool TryClearTagBit() {
+ uint32_t old_tags = AtomicOperations::FetchAndRelaxedUint32(
+ &ptr()->tags_, ~TagBitField::encode(true));
+ return TagBitField::decode(old_tags);
+ }
// All writes to heap objects should ultimately pass through one of the
// methods below or their counterparts in Object, to ensure that the
@@ -1024,6 +1076,23 @@
VISIT_TO(RawObject*, target_);
};
+// Forward declarations.
+class NativeArguments;
+typedef void (*NativeFunction)(NativeArguments* arguments);
+typedef void (*NativeFunctionWrapper)(Dart_NativeArguments args,
+ Dart_NativeFunction func);
+
+class RawNativeEntryData : public RawObject {
+ private:
+ RAW_HEAP_OBJECT_IMPLEMENTATION(NativeEntryData);
+ VISIT_NOTHING();
+
+ NativeFunctionWrapper trampoline_;
+ NativeFunction native_function_;
+ intptr_t argc_tag_;
+ MethodRecognizer::Kind kind_;
+};
+
class RawField : public RawObject {
RAW_HEAP_OBJECT_IMPLEMENTATION(Field);
@@ -1697,6 +1766,10 @@
RawArray* ic_data_; // Contains class-ids, target and count.
RawString* target_name_; // Name of target function.
RawArray* args_descriptor_; // Arguments descriptor.
+ // Static type of the receiver. If it is set then we are performing
+ // exactness profiling for the receiver type. See StaticTypeExactnessState
+ // class for more information.
+ NOT_IN_PRECOMPILED(RawAbstractType* static_receiver_type_);
RawObject* owner_; // Parent/calling function or original IC of cloned IC.
VISIT_TO(RawObject*, owner_);
RawObject** to_snapshot(Snapshot::Kind kind) {
diff --git a/runtime/vm/raw_object_snapshot.cc b/runtime/vm/raw_object_snapshot.cc
index 279d28e..8c021bb 100644
--- a/runtime/vm/raw_object_snapshot.cc
+++ b/runtime/vm/raw_object_snapshot.cc
@@ -746,6 +746,22 @@
visitor.VisitPointers(from(), to());
}
+RawNativeEntryData* NativeEntryData::ReadFrom(SnapshotReader* reader,
+ intptr_t object_id,
+ intptr_t tags,
+ Snapshot::Kind kind,
+ bool as_reference) {
+ UNREACHABLE();
+ return NativeEntryData::null();
+}
+
+void RawNativeEntryData::WriteTo(SnapshotWriter* writer,
+ intptr_t object_id,
+ Snapshot::Kind kind,
+ bool as_reference) {
+ UNREACHABLE();
+}
+
RawFunction* Function::ReadFrom(SnapshotReader* reader,
intptr_t object_id,
intptr_t tags,
diff --git a/runtime/vm/regexp_assembler.cc b/runtime/vm/regexp_assembler.cc
index ecd1914..fb7dc74 100644
--- a/runtime/vm/regexp_assembler.cc
+++ b/runtime/vm/regexp_assembler.cc
@@ -61,7 +61,8 @@
#if !defined(DART_PRECOMPILED_RUNTIME)
if (!FLAG_interpret_irregexp) {
// Only needed by the compiled IR backend.
- block_ = new JoinEntryInstr(-1, -1, Thread::Current()->GetNextDeoptId());
+ block_ =
+ new JoinEntryInstr(-1, -1, CompilerState::Current().GetNextDeoptId());
}
#endif
}
diff --git a/runtime/vm/regexp_assembler_ir.h b/runtime/vm/regexp_assembler_ir.h
index 0b0dcca..3652b72 100644
--- a/runtime/vm/regexp_assembler_ir.h
+++ b/runtime/vm/regexp_assembler_ir.h
@@ -133,7 +133,9 @@
void FinalizeRegistersArray();
private:
- intptr_t GetNextDeoptId() const { return thread_->GetNextDeoptId(); }
+ intptr_t GetNextDeoptId() const {
+ return thread_->compiler_state().GetNextDeoptId();
+ }
// Generate the contents of preset blocks. The entry block is the entry point
// of the generated code.
diff --git a/runtime/vm/regexp_test.cc b/runtime/vm/regexp_test.cc
index c4646d4..531f12d 100644
--- a/runtime/vm/regexp_test.cc
+++ b/runtime/vm/regexp_test.cc
@@ -22,7 +22,7 @@
zone);
}
-TEST_CASE(RegExp_OneByteString) {
+ISOLATE_UNIT_TEST_CASE(RegExp_OneByteString) {
uint8_t chars[] = {'a', 'b', 'c', 'b', 'a'};
intptr_t len = ARRAY_SIZE(chars);
const String& str =
@@ -43,7 +43,7 @@
EXPECT_EQ(3, smi_2.Value());
}
-TEST_CASE(RegExp_TwoByteString) {
+ISOLATE_UNIT_TEST_CASE(RegExp_TwoByteString) {
uint16_t chars[] = {'a', 'b', 'c', 'b', 'a'};
intptr_t len = ARRAY_SIZE(chars);
const String& str =
@@ -68,7 +68,7 @@
Dart_WeakPersistentHandle handle,
void* peer) {}
-TEST_CASE(RegExp_ExternalOneByteString) {
+ISOLATE_UNIT_TEST_CASE(RegExp_ExternalOneByteString) {
uint8_t chars[] = {'a', 'b', 'c', 'b', 'a'};
intptr_t len = ARRAY_SIZE(chars);
const String& str = String::Handle(ExternalOneByteString::New(
@@ -89,7 +89,7 @@
EXPECT_EQ(3, smi_2.Value());
}
-TEST_CASE(RegExp_ExternalTwoByteString) {
+ISOLATE_UNIT_TEST_CASE(RegExp_ExternalTwoByteString) {
uint16_t chars[] = {'a', 'b', 'c', 'b', 'a'};
intptr_t len = ARRAY_SIZE(chars);
const String& str = String::Handle(ExternalTwoByteString::New(
diff --git a/runtime/vm/resolver_test.cc b/runtime/vm/resolver_test.cc
index 7df722a..6624b49 100644
--- a/runtime/vm/resolver_test.cc
+++ b/runtime/vm/resolver_test.cc
@@ -66,7 +66,7 @@
SetupFunction(test_library_name, test_class_name, test_function_name, false);
}
-TEST_CASE(DartStaticResolve) {
+ISOLATE_UNIT_TEST_CASE(DartStaticResolve) {
const char* test_library_name = "ResolverApp";
const char* test_class_name = "A";
const char* test_static_function_name = "static_foo";
@@ -125,7 +125,7 @@
}
}
-TEST_CASE(DartDynamicResolve) {
+ISOLATE_UNIT_TEST_CASE(DartDynamicResolve) {
const char* test_library_name = "ResolverApp";
const char* test_class_name = "A";
const char* test_function_name = "foo";
diff --git a/runtime/vm/runtime_entry.cc b/runtime/vm/runtime_entry.cc
index 1087bb6..3731a08 100644
--- a/runtime/vm/runtime_entry.cc
+++ b/runtime/vm/runtime_entry.cc
@@ -1234,7 +1234,21 @@
return target_function.raw();
}
if (args.length() == 1) {
- ic_data.AddReceiverCheck(args[0]->GetClassId(), target_function);
+ if (ic_data.IsTrackingExactness()) {
+#if !defined(DART_PRECOMPILED_RUNTIME)
+ const auto& receiver = *args[0];
+ const auto state = StaticTypeExactnessState::Compute(
+ Type::Cast(AbstractType::Handle(ic_data.StaticReceiverType())),
+ receiver);
+ ic_data.AddReceiverCheck(
+ receiver.GetClassId(), target_function,
+ /*count=*/1, /*exactness=*/state.CollapseSuperTypeExactness());
+#else
+ UNREACHABLE();
+#endif
+ } else {
+ ic_data.AddReceiverCheck(args[0]->GetClassId(), target_function);
+ }
} else {
GrowableArray<intptr_t> class_ids(args.length());
ASSERT(ic_data.NumArgsTested() == args.length());
@@ -1414,7 +1428,7 @@
kTypeArgsLen, old_target.num_fixed_parameters()));
const ICData& ic_data =
ICData::Handle(zone, ICData::New(caller_function, name, descriptor,
- Thread::kNoDeoptId, 1, /* args_tested */
+ DeoptId::kNone, 1, /* args_tested */
ICData::kInstance));
// Maybe add the new target.
@@ -1490,7 +1504,7 @@
const Array& descriptor = Array::Handle(zone, unlinked.args_descriptor());
const ICData& ic_data =
ICData::Handle(zone, ICData::New(caller_function, name, descriptor,
- Thread::kNoDeoptId, 1, /* args_tested */
+ DeoptId::kNone, 1, /* args_tested */
ICData::kInstance));
Class& cls = Class::Handle(zone, receiver.clazz());
@@ -1570,7 +1584,7 @@
kTypeArgsLen, old_target.num_fixed_parameters()));
const ICData& ic_data =
ICData::Handle(zone, ICData::New(caller_function, name, descriptor,
- Thread::kNoDeoptId, 1, /* args_tested */
+ DeoptId::kNone, 1, /* args_tested */
ICData::kInstance));
// Add the first target.
@@ -2708,7 +2722,7 @@
return reinterpret_cast<uword>(RuntimeEntry::InterpretCall);
}
-// Interpret a function call. Should be called only for uncompiled functions.
+// Interpret a function call. Should be called only for non-jitted functions.
// argc indicates the number of arguments, including the type arguments.
// argv points to the first argument.
// If argc < 0, arguments are passed at decreasing memory addresses from argv.
@@ -2723,6 +2737,9 @@
uword exit_fp = thread->top_exit_frame_info();
ASSERT(exit_fp != 0);
ASSERT(thread == Thread::Current());
+ // Caller is InterpretCall stub called from generated code.
+ // We stay in "in generated code" execution state when interpreting code.
+ ASSERT(thread->execution_state() == Thread::kThreadInGenerated);
ASSERT(!Function::HasCode(function));
ASSERT(Function::HasBytecode(function));
ASSERT(interpreter != NULL);
@@ -2730,7 +2747,12 @@
const Object& result = Object::Handle(
thread->zone(), interpreter->Call(function, argdesc, argc, argv, thread));
DEBUG_ASSERT(thread->top_exit_frame_info() == exit_fp);
- CheckResultError(result);
+ if (result.IsError()) {
+ // Propagating an error may cause allocation. Check if we need to block for
+ // a safepoint by switching to "in VM" execution state.
+ TransitionGeneratedToVM transition(thread);
+ Exceptions::PropagateError(Error::Cast(result));
+ }
return result.raw();
#else
UNREACHABLE();
diff --git a/runtime/vm/scanner_test.cc b/runtime/vm/scanner_test.cc
index 93fa232..f7546cb 100644
--- a/runtime/vm/scanner_test.cc
+++ b/runtime/vm/scanner_test.cc
@@ -378,7 +378,7 @@
EXPECT_EQ('\n', litchars[3]);
}
-TEST_CASE(Scanner_Test) {
+ISOLATE_UNIT_TEST_CASE(Scanner_Test) {
ScanLargeText();
BoringTest();
diff --git a/runtime/vm/scopes.h b/runtime/vm/scopes.h
index 1383695..952ecc7 100644
--- a/runtime/vm/scopes.h
+++ b/runtime/vm/scopes.h
@@ -130,7 +130,8 @@
// Returns true if this local variable represents a parameter that needs type
// check when we enter the function.
bool needs_type_check() const {
- return (type_check_mode_ == kDoTypeCheck) && !FLAG_omit_strong_type_checks;
+ return (type_check_mode_ == kDoTypeCheck) &&
+ Isolate::Current()->should_emit_strong_mode_checks();
}
// Returns true if this local variable represents a parameter which type is
diff --git a/runtime/vm/service_test.cc b/runtime/vm/service_test.cc
index 7291161..d132892 100644
--- a/runtime/vm/service_test.cc
+++ b/runtime/vm/service_test.cc
@@ -76,8 +76,12 @@
static RawArray* Eval(Dart_Handle lib, const char* expr) {
const String& dummy_isolate_id = String::Handle(String::New("isolateId"));
- Dart_Handle expr_val = Dart_EvaluateStaticExpr(lib, NewString(expr));
- EXPECT_VALID(expr_val);
+ Dart_Handle expr_val;
+ {
+ TransitionVMToNative transiton(Thread::Current());
+ expr_val = Dart_EvaluateStaticExpr(lib, NewString(expr));
+ EXPECT_VALID(expr_val);
+ }
Zone* zone = Thread::Current()->zone();
const GrowableObjectArray& value =
Api::UnwrapGrowableObjectArrayHandle(zone, expr_val);
@@ -126,33 +130,30 @@
}
static void HandleIsolateMessage(Isolate* isolate, const Array& msg) {
- TransitionNativeToVM transition(Thread::Current());
Service::HandleIsolateMessage(isolate, msg);
}
static void HandleRootMessage(const Array& message) {
- TransitionNativeToVM transition(Thread::Current());
Service::HandleRootMessage(message);
}
-TEST_CASE(Service_IsolateStickyError) {
+ISOLATE_UNIT_TEST_CASE(Service_IsolateStickyError) {
const char* kScript = "main() => throw 'HI THERE STICKY';\n";
Isolate* isolate = thread->isolate();
isolate->set_is_runnable(true);
- Dart_Handle lib = TestCase::LoadTestScript(kScript, NULL);
- EXPECT_VALID(lib);
- Library& vmlib = Library::Handle();
- vmlib ^= Api::UnwrapHandle(lib);
- EXPECT(!vmlib.IsNull());
- Dart_Handle result = Dart_Invoke(lib, NewString("main"), 0, NULL);
- EXPECT(Dart_IsUnhandledExceptionError(result));
- EXPECT(!Dart_HasStickyError());
+ Dart_Handle result;
+ {
+ TransitionVMToNative transition(thread);
+ Dart_Handle lib = TestCase::LoadTestScript(kScript, NULL);
+ EXPECT_VALID(lib);
+ result = Dart_Invoke(lib, NewString("main"), 0, NULL);
+ EXPECT(Dart_IsUnhandledExceptionError(result));
+ EXPECT(!Dart_HasStickyError());
+ }
EXPECT(Thread::Current()->sticky_error() == Error::null());
{
- TransitionNativeToVM transition(thread);
-
JSONStream js;
isolate->PrintJSON(&js, false);
// No error property and no PauseExit state.
@@ -161,14 +162,15 @@
EXPECT_NOTSUBSTRING("PauseExit", js.ToCString());
}
- // Set the sticky error.
- Dart_SetStickyError(result);
- Dart_SetPausedOnExit(true);
- EXPECT(Dart_HasStickyError());
+ {
+ // Set the sticky error.
+ TransitionVMToNative transition(thread);
+ Dart_SetStickyError(result);
+ Dart_SetPausedOnExit(true);
+ EXPECT(Dart_HasStickyError());
+ }
{
- TransitionNativeToVM transition(thread);
-
JSONStream js;
isolate->PrintJSON(&js, false);
// Error and PauseExit set.
@@ -178,7 +180,7 @@
}
}
-TEST_CASE(Service_IdZones) {
+ISOLATE_UNIT_TEST_CASE(Service_IdZones) {
Zone* zone = thread->zone();
Isolate* isolate = thread->isolate();
ObjectIdRing* ring = isolate->object_id_ring();
@@ -212,7 +214,7 @@
EXPECT_STREQ("objects/5", reuse_zone.GetServiceId(test_d));
}
-TEST_CASE(Service_Code) {
+ISOLATE_UNIT_TEST_CASE(Service_Code) {
const char* kScript =
"var port;\n" // Set to our mock port by C++.
"\n"
@@ -232,13 +234,17 @@
Isolate* isolate = thread->isolate();
isolate->set_is_runnable(true);
- Dart_Handle lib = TestCase::LoadTestScript(kScript, NULL);
- EXPECT_VALID(lib);
+ Dart_Handle lib;
Library& vmlib = Library::Handle();
- vmlib ^= Api::UnwrapHandle(lib);
- EXPECT(!vmlib.IsNull());
- Dart_Handle result = Dart_Invoke(lib, NewString("main"), 0, NULL);
- EXPECT_VALID(result);
+ {
+ TransitionVMToNative transition(thread);
+ lib = TestCase::LoadTestScript(kScript, NULL);
+ EXPECT_VALID(lib);
+ vmlib ^= Api::UnwrapHandle(lib);
+ EXPECT(!vmlib.IsNull());
+ Dart_Handle result = Dart_Invoke(lib, NewString("main"), 0, NULL);
+ EXPECT_VALID(result);
+ }
const Class& class_a = Class::Handle(GetClass(vmlib, "A"));
EXPECT(!class_a.IsNull());
const Function& function_c = Function::Handle(GetFunction(class_a, "c"));
@@ -256,7 +262,10 @@
Dart_Port port_id = PortMap::CreatePort(&handler);
Dart_Handle port = Api::NewHandle(thread, SendPort::New(port_id));
EXPECT_VALID(port);
- EXPECT_VALID(Dart_SetField(lib, NewString("port"), port));
+ {
+ TransitionVMToNative transition(thread);
+ EXPECT_VALID(Dart_SetField(lib, NewString("port"), port));
+ }
Array& service_msg = Array::Handle();
@@ -329,7 +338,7 @@
EXPECT_SUBSTRING("\"error\"", handler.msg());
}
-TEST_CASE(Service_TokenStream) {
+ISOLATE_UNIT_TEST_CASE(Service_TokenStream) {
const char* kScript =
"var port;\n" // Set to our mock port by C++.
"\n"
@@ -338,11 +347,15 @@
Isolate* isolate = thread->isolate();
isolate->set_is_runnable(true);
- Dart_Handle lib = TestCase::LoadTestScript(kScript, NULL);
- EXPECT_VALID(lib);
+ Dart_Handle lib;
Library& vmlib = Library::Handle();
- vmlib ^= Api::UnwrapHandle(lib);
- EXPECT(!vmlib.IsNull());
+ {
+ TransitionVMToNative transition(thread);
+ lib = TestCase::LoadTestScript(kScript, NULL);
+ EXPECT_VALID(lib);
+ vmlib ^= Api::UnwrapHandle(lib);
+ EXPECT(!vmlib.IsNull());
+ }
const String& script_name = String::Handle(String::New("test-lib"));
EXPECT(!script_name.IsNull());
@@ -359,7 +372,10 @@
Dart_Port port_id = PortMap::CreatePort(&handler);
Dart_Handle port = Api::NewHandle(thread, SendPort::New(port_id));
EXPECT_VALID(port);
- EXPECT_VALID(Dart_SetField(lib, NewString("port"), port));
+ {
+ TransitionVMToNative transition(thread);
+ EXPECT_VALID(Dart_SetField(lib, NewString("port"), port));
+ }
Array& service_msg = Array::Handle();
@@ -378,7 +394,7 @@
EXPECT_SUBSTRING("\"members\":[", handler.msg());
}
-TEST_CASE(Service_PcDescriptors) {
+ISOLATE_UNIT_TEST_CASE(Service_PcDescriptors) {
const char* kScript =
"var port;\n" // Set to our mock port by C++.
"\n"
@@ -398,13 +414,17 @@
Isolate* isolate = thread->isolate();
isolate->set_is_runnable(true);
- Dart_Handle lib = TestCase::LoadTestScript(kScript, NULL);
- EXPECT_VALID(lib);
+ Dart_Handle lib;
Library& vmlib = Library::Handle();
- vmlib ^= Api::UnwrapHandle(lib);
- EXPECT(!vmlib.IsNull());
- Dart_Handle result = Dart_Invoke(lib, NewString("main"), 0, NULL);
- EXPECT_VALID(result);
+ {
+ TransitionVMToNative transition(thread);
+ lib = TestCase::LoadTestScript(kScript, NULL);
+ EXPECT_VALID(lib);
+ vmlib ^= Api::UnwrapHandle(lib);
+ EXPECT(!vmlib.IsNull());
+ Dart_Handle result = Dart_Invoke(lib, NewString("main"), 0, NULL);
+ EXPECT_VALID(result);
+ }
const Class& class_a = Class::Handle(GetClass(vmlib, "A"));
EXPECT(!class_a.IsNull());
const Function& function_c = Function::Handle(GetFunction(class_a, "c"));
@@ -423,7 +443,10 @@
Dart_Port port_id = PortMap::CreatePort(&handler);
Dart_Handle port = Api::NewHandle(thread, SendPort::New(port_id));
EXPECT_VALID(port);
- EXPECT_VALID(Dart_SetField(lib, NewString("port"), port));
+ {
+ TransitionVMToNative transition(thread);
+ EXPECT_VALID(Dart_SetField(lib, NewString("port"), port));
+ }
Array& service_msg = Array::Handle();
@@ -441,7 +464,7 @@
EXPECT_SUBSTRING("\"members\":[", handler.msg());
}
-TEST_CASE(Service_LocalVarDescriptors) {
+ISOLATE_UNIT_TEST_CASE(Service_LocalVarDescriptors) {
const char* kScript =
"var port;\n" // Set to our mock port by C++.
"\n"
@@ -461,13 +484,17 @@
Isolate* isolate = thread->isolate();
isolate->set_is_runnable(true);
- Dart_Handle lib = TestCase::LoadTestScript(kScript, NULL);
- EXPECT_VALID(lib);
+ Dart_Handle lib;
Library& vmlib = Library::Handle();
- vmlib ^= Api::UnwrapHandle(lib);
- EXPECT(!vmlib.IsNull());
- Dart_Handle result = Dart_Invoke(lib, NewString("main"), 0, NULL);
- EXPECT_VALID(result);
+ {
+ TransitionVMToNative transition(thread);
+ lib = TestCase::LoadTestScript(kScript, NULL);
+ EXPECT_VALID(lib);
+ vmlib ^= Api::UnwrapHandle(lib);
+ EXPECT(!vmlib.IsNull());
+ Dart_Handle result = Dart_Invoke(lib, NewString("main"), 0, NULL);
+ EXPECT_VALID(result);
+ }
const Class& class_a = Class::Handle(GetClass(vmlib, "A"));
EXPECT(!class_a.IsNull());
const Function& function_c = Function::Handle(GetFunction(class_a, "c"));
@@ -486,7 +513,10 @@
Dart_Port port_id = PortMap::CreatePort(&handler);
Dart_Handle port = Api::NewHandle(thread, SendPort::New(port_id));
EXPECT_VALID(port);
- EXPECT_VALID(Dart_SetField(lib, NewString("port"), port));
+ {
+ TransitionVMToNative transition(thread);
+ EXPECT_VALID(Dart_SetField(lib, NewString("port"), port));
+ }
Array& service_msg = Array::Handle();
@@ -508,7 +538,7 @@
Dart_WeakPersistentHandle handle,
void* peer) {}
-TEST_CASE(Service_PersistentHandles) {
+ISOLATE_UNIT_TEST_CASE(Service_PersistentHandles) {
const char* kScript =
"var port;\n" // Set to our mock port by C++.
"\n"
@@ -522,28 +552,34 @@
Isolate* isolate = thread->isolate();
isolate->set_is_runnable(true);
- Dart_Handle lib = TestCase::LoadTestScript(kScript, NULL);
- EXPECT_VALID(lib);
- Library& vmlib = Library::Handle();
- vmlib ^= Api::UnwrapHandle(lib);
- EXPECT(!vmlib.IsNull());
- Dart_Handle result = Dart_Invoke(lib, NewString("main"), 0, NULL);
- EXPECT_VALID(result);
- // Create a persistent handle to global.
- Dart_PersistentHandle persistent_handle = Dart_NewPersistentHandle(result);
+ Dart_Handle lib;
+ Dart_PersistentHandle persistent_handle;
+ Dart_WeakPersistentHandle weak_persistent_handle;
+ {
+ TransitionVMToNative transition(thread);
+ lib = TestCase::LoadTestScript(kScript, NULL);
+ EXPECT_VALID(lib);
+ Dart_Handle result = Dart_Invoke(lib, NewString("main"), 0, NULL);
+ EXPECT_VALID(result);
- // Create a weak persistent handle to global.
- Dart_WeakPersistentHandle weak_persistent_handle =
- Dart_NewWeakPersistentHandle(result, reinterpret_cast<void*>(0xdeadbeef),
- 128, WeakHandleFinalizer);
+ // Create a persistent handle to global.
+ persistent_handle = Dart_NewPersistentHandle(result);
+
+ // Create a weak persistent handle to global.
+ weak_persistent_handle = Dart_NewWeakPersistentHandle(
+ result, reinterpret_cast<void*>(0xdeadbeef), 128, WeakHandleFinalizer);
+ }
// Build a mock message handler and wrap it in a dart port.
ServiceTestMessageHandler handler;
Dart_Port port_id = PortMap::CreatePort(&handler);
Dart_Handle port = Api::NewHandle(thread, SendPort::New(port_id));
EXPECT_VALID(port);
- EXPECT_VALID(Dart_SetField(lib, NewString("port"), port));
+ {
+ TransitionVMToNative transition(thread);
+ EXPECT_VALID(Dart_SetField(lib, NewString("port"), port));
+ }
Array& service_msg = Array::Handle();
@@ -558,9 +594,12 @@
EXPECT_SUBSTRING("\"externalSize\":\"128\"", handler.msg());
// Delete persistent handles.
- Dart_DeletePersistentHandle(persistent_handle);
- Dart_DeleteWeakPersistentHandle(Dart_CurrentIsolate(),
- weak_persistent_handle);
+ {
+ TransitionVMToNative transition(thread);
+ Dart_DeletePersistentHandle(persistent_handle);
+ Dart_DeleteWeakPersistentHandle(Dart_CurrentIsolate(),
+ weak_persistent_handle);
+ }
// Get persistent handles (again).
service_msg = Eval(lib, "[0, port, '0', '_getPersistentHandles', [], []]");
@@ -573,7 +612,7 @@
EXPECT_NOTSUBSTRING("\"externalSize\":\"128\"", handler.msg());
}
-TEST_CASE(Service_Address) {
+ISOLATE_UNIT_TEST_CASE(Service_Address) {
const char* kScript =
"var port;\n" // Set to our mock port by C++.
"\n"
@@ -582,15 +621,22 @@
Isolate* isolate = thread->isolate();
isolate->set_is_runnable(true);
- Dart_Handle lib = TestCase::LoadTestScript(kScript, NULL);
- EXPECT_VALID(lib);
+ Dart_Handle lib;
+ {
+ TransitionVMToNative transition(thread);
+ lib = TestCase::LoadTestScript(kScript, NULL);
+ EXPECT_VALID(lib);
+ }
// Build a mock message handler and wrap it in a dart port.
ServiceTestMessageHandler handler;
Dart_Port port_id = PortMap::CreatePort(&handler);
Dart_Handle port = Api::NewHandle(thread, SendPort::New(port_id));
EXPECT_VALID(port);
- EXPECT_VALID(Dart_SetField(lib, NewString("port"), port));
+ {
+ TransitionVMToNative transition(thread);
+ EXPECT_VALID(Dart_SetField(lib, NewString("port"), port));
+ }
const String& str = String::Handle(String::New("foobar", Heap::kOld));
Array& service_msg = Array::Handle();
@@ -648,7 +694,7 @@
return false;
}
-TEST_CASE(Service_EmbedderRootHandler) {
+ISOLATE_UNIT_TEST_CASE(Service_EmbedderRootHandler) {
const char* kScript =
"var port;\n" // Set to our mock port by C++.
"\n"
@@ -658,20 +704,28 @@
" x = (x / 13).floor();\n"
"}";
- Dart_RegisterRootServiceRequestCallback("alpha", alpha_callback, NULL);
- Dart_RegisterRootServiceRequestCallback("beta", beta_callback, NULL);
+ Dart_Handle lib;
+ {
+ TransitionVMToNative transition(thread);
- Dart_Handle lib = TestCase::LoadTestScript(kScript, NULL);
- EXPECT_VALID(lib);
- Dart_Handle result = Dart_Invoke(lib, NewString("main"), 0, NULL);
- EXPECT_VALID(result);
+ Dart_RegisterRootServiceRequestCallback("alpha", alpha_callback, NULL);
+ Dart_RegisterRootServiceRequestCallback("beta", beta_callback, NULL);
+
+ lib = TestCase::LoadTestScript(kScript, NULL);
+ EXPECT_VALID(lib);
+ Dart_Handle result = Dart_Invoke(lib, NewString("main"), 0, NULL);
+ EXPECT_VALID(result);
+ }
// Build a mock message handler and wrap it in a dart port.
ServiceTestMessageHandler handler;
Dart_Port port_id = PortMap::CreatePort(&handler);
Dart_Handle port = Api::NewHandle(thread, SendPort::New(port_id));
EXPECT_VALID(port);
- EXPECT_VALID(Dart_SetField(lib, NewString("port"), port));
+ {
+ TransitionVMToNative transition(thread);
+ EXPECT_VALID(Dart_SetField(lib, NewString("port"), port));
+ }
Array& service_msg = Array::Handle();
service_msg = Eval(lib, "[0, port, '\"', 'alpha', [], []]");
@@ -685,7 +739,7 @@
EXPECT_STREQ("{\"jsonrpc\":\"2.0\", \"error\":beta,\"id\":1}", handler.msg());
}
-TEST_CASE(Service_EmbedderIsolateHandler) {
+ISOLATE_UNIT_TEST_CASE(Service_EmbedderIsolateHandler) {
const char* kScript =
"var port;\n" // Set to our mock port by C++.
"\n"
@@ -695,22 +749,30 @@
" x = (x / 13).floor();\n"
"}";
- Dart_RegisterIsolateServiceRequestCallback("alpha", alpha_callback, NULL);
- Dart_RegisterIsolateServiceRequestCallback("beta", beta_callback, NULL);
+ Dart_Handle lib;
+ {
+ TransitionVMToNative transition(thread);
- Isolate* isolate = thread->isolate();
- Dart_Handle lib = TestCase::LoadTestScript(kScript, NULL);
- EXPECT_VALID(lib);
- Dart_Handle result = Dart_Invoke(lib, NewString("main"), 0, NULL);
- EXPECT_VALID(result);
+ Dart_RegisterIsolateServiceRequestCallback("alpha", alpha_callback, NULL);
+ Dart_RegisterIsolateServiceRequestCallback("beta", beta_callback, NULL);
+
+ lib = TestCase::LoadTestScript(kScript, NULL);
+ EXPECT_VALID(lib);
+ Dart_Handle result = Dart_Invoke(lib, NewString("main"), 0, NULL);
+ EXPECT_VALID(result);
+ }
// Build a mock message handler and wrap it in a dart port.
ServiceTestMessageHandler handler;
Dart_Port port_id = PortMap::CreatePort(&handler);
Dart_Handle port = Api::NewHandle(thread, SendPort::New(port_id));
EXPECT_VALID(port);
- EXPECT_VALID(Dart_SetField(lib, NewString("port"), port));
+ {
+ TransitionVMToNative transition(thread);
+ EXPECT_VALID(Dart_SetField(lib, NewString("port"), port));
+ }
+ Isolate* isolate = thread->isolate();
Array& service_msg = Array::Handle();
service_msg = Eval(lib, "[0, port, '0', 'alpha', [], []]");
HandleIsolateMessage(isolate, service_msg);
@@ -734,7 +796,7 @@
}
}
-TEST_CASE(Service_Profile) {
+ISOLATE_UNIT_TEST_CASE(Service_Profile) {
EnableProfiler();
const char* kScript =
"var port;\n" // Set to our mock port by C++.
@@ -747,17 +809,25 @@
Isolate* isolate = thread->isolate();
isolate->set_is_runnable(true);
- Dart_Handle lib = TestCase::LoadTestScript(kScript, NULL);
- EXPECT_VALID(lib);
- Dart_Handle result = Dart_Invoke(lib, NewString("main"), 0, NULL);
- EXPECT_VALID(result);
+ Dart_Handle lib;
+ {
+ TransitionVMToNative transition(thread);
+
+ lib = TestCase::LoadTestScript(kScript, NULL);
+ EXPECT_VALID(lib);
+ Dart_Handle result = Dart_Invoke(lib, NewString("main"), 0, NULL);
+ EXPECT_VALID(result);
+ }
// Build a mock message handler and wrap it in a dart port.
ServiceTestMessageHandler handler;
Dart_Port port_id = PortMap::CreatePort(&handler);
Dart_Handle port = Api::NewHandle(thread, SendPort::New(port_id));
EXPECT_VALID(port);
- EXPECT_VALID(Dart_SetField(lib, NewString("port"), port));
+ {
+ TransitionVMToNative transition(thread);
+ EXPECT_VALID(Dart_SetField(lib, NewString("port"), port));
+ }
Array& service_msg = Array::Handle();
service_msg = Eval(lib, "[0, port, '0', '_getCpuProfile', [], []]");
diff --git a/runtime/vm/simulator_arm.cc b/runtime/vm/simulator_arm.cc
index 4f6a19f..1fb6ddb 100644
--- a/runtime/vm/simulator_arm.cc
+++ b/runtime/vm/simulator_arm.cc
@@ -127,10 +127,9 @@
}
static Register LookupCpuRegisterByName(const char* name) {
- static const char* kNames[] = {"r0", "r1", "r2", "r3", "r4", "r5",
- "r6", "r7", "r8", "r9", "r10", "r11",
- "r12", "r13", "r14", "r15", "pc", "lr",
- "sp", "ip", "fp", "pp", "ctx"};
+ static const char* kNames[] = {
+ "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10",
+ "r11", "r12", "r13", "r14", "r15", "pc", "lr", "sp", "ip", "fp", "pp"};
static const Register kRegisters[] = {R0, R1, R2, R3, R4, R5, R6, R7,
R8, R9, R10, R11, R12, R13, R14, R15,
PC, LR, SP, IP, FP, PP};
diff --git a/runtime/vm/simulator_dbc.cc b/runtime/vm/simulator_dbc.cc
index 2565564..024d8b1 100644
--- a/runtime/vm/simulator_dbc.cc
+++ b/runtime/vm/simulator_dbc.cc
@@ -339,6 +339,7 @@
uword tags = 0;
tags = RawObject::ClassIdTag::update(kDoubleCid, tags);
tags = RawObject::SizeTag::update(instance_size, tags);
+ tags = RawObject::NewBit::update(true, tags);
// Also writes zero in the hash_ field.
*reinterpret_cast<uword*>(start + Double::tags_offset()) = tags;
*reinterpret_cast<double*>(start + Double::value_offset()) = value;
@@ -2741,6 +2742,7 @@
uint32_t tags = 0;
tags = RawObject::ClassIdTag::update(kContextCid, tags);
tags = RawObject::SizeTag::update(instance_size, tags);
+ tags = RawObject::NewBit::update(true, tags);
// Also writes 0 in the hash_ field of the header.
*reinterpret_cast<uword*>(start + Array::tags_offset()) = tags;
*reinterpret_cast<uword*>(start + Context::num_variables_offset()) =
@@ -2777,13 +2779,13 @@
{
BYTECODE(AllocateOpt, A_D);
- const uword tags =
- static_cast<uword>(Smi::Value(RAW_CAST(Smi, LOAD_CONSTANT(rD))));
+ uint32_t tags = Smi::Value(RAW_CAST(Smi, LOAD_CONSTANT(rD)));
const intptr_t instance_size = RawObject::SizeTag::decode(tags);
const uword start =
thread->heap()->new_space()->TryAllocateInTLAB(thread, instance_size);
if (LIKELY(start != 0)) {
// Writes both the tags and the initial identity hash on 64 bit platforms.
+ tags = RawObject::NewBit::update(true, tags);
*reinterpret_cast<uword*>(start + Instance::tags_offset()) = tags;
for (intptr_t current_offset = sizeof(RawInstance);
current_offset < instance_size; current_offset += kWordSize) {
@@ -2809,7 +2811,7 @@
{
BYTECODE(AllocateTOpt, A_D);
- const uword tags = Smi::Value(RAW_CAST(Smi, LOAD_CONSTANT(rD)));
+ uint32_t tags = Smi::Value(RAW_CAST(Smi, LOAD_CONSTANT(rD)));
const intptr_t instance_size = RawObject::SizeTag::decode(tags);
const uword start =
thread->heap()->new_space()->TryAllocateInTLAB(thread, instance_size);
@@ -2817,6 +2819,7 @@
RawObject* type_args = SP[0];
const intptr_t type_args_offset = Bytecode::DecodeD(*pc);
// Writes both the tags and the initial identity hash on 64 bit platforms.
+ tags = RawObject::NewBit::update(true, tags);
*reinterpret_cast<uword*>(start + Instance::tags_offset()) = tags;
for (intptr_t current_offset = sizeof(RawInstance);
current_offset < instance_size; current_offset += kWordSize) {
@@ -2860,6 +2863,7 @@
tags = RawObject::SizeTag::update(instance_size, tags);
}
tags = RawObject::ClassIdTag::update(cid, tags);
+ tags = RawObject::NewBit::update(true, tags);
// Writes both the tags and the initial identity hash on 64 bit
// platforms.
*reinterpret_cast<uword*>(start + Instance::tags_offset()) = tags;
diff --git a/runtime/vm/snapshot.h b/runtime/vm/snapshot.h
index 605d300..1a7db52 100644
--- a/runtime/vm/snapshot.h
+++ b/runtime/vm/snapshot.h
@@ -76,6 +76,7 @@
class RawPcDescriptors;
class RawReceivePort;
class RawRedirectionData;
+class RawNativeEntryData;
class RawScript;
class RawSignatureData;
class RawSendPort;
diff --git a/runtime/vm/snapshot_test.cc b/runtime/vm/snapshot_test.cc
index cbe79e2..10b4715 100644
--- a/runtime/vm/snapshot_test.cc
+++ b/runtime/vm/snapshot_test.cc
@@ -132,7 +132,7 @@
EXPECT(message == NULL);
}
-TEST_CASE(SerializeNull) {
+ISOLATE_UNIT_TEST_CASE(SerializeNull) {
StackZone zone(thread);
// Write snapshot with object content.
@@ -157,7 +157,7 @@
delete message;
}
-TEST_CASE(SerializeSmi1) {
+ISOLATE_UNIT_TEST_CASE(SerializeSmi1) {
StackZone zone(thread);
// Write snapshot with object content.
@@ -183,7 +183,7 @@
delete message;
}
-TEST_CASE(SerializeSmi2) {
+ISOLATE_UNIT_TEST_CASE(SerializeSmi2) {
StackZone zone(thread);
// Write snapshot with object content.
@@ -259,7 +259,7 @@
#endif
}
-TEST_CASE(SerializeMints) {
+ISOLATE_UNIT_TEST_CASE(SerializeMints) {
// Min positive mint.
CheckMint(Smi::kMaxValue + 1);
// Min positive mint + 1.
@@ -278,7 +278,7 @@
CheckMint(kMinInt64 + 1);
}
-TEST_CASE(SerializeDouble) {
+ISOLATE_UNIT_TEST_CASE(SerializeDouble) {
StackZone zone(thread);
// Write snapshot with object content.
@@ -304,7 +304,7 @@
delete message;
}
-TEST_CASE(SerializeTrue) {
+ISOLATE_UNIT_TEST_CASE(SerializeTrue) {
StackZone zone(thread);
// Write snapshot with true object.
@@ -332,7 +332,7 @@
delete message;
}
-TEST_CASE(SerializeFalse) {
+ISOLATE_UNIT_TEST_CASE(SerializeFalse) {
StackZone zone(thread);
// Write snapshot with false object.
@@ -358,7 +358,7 @@
delete message;
}
-TEST_CASE(SerializeCapability) {
+ISOLATE_UNIT_TEST_CASE(SerializeCapability) {
// Write snapshot with object content.
const Capability& capability = Capability::Handle(Capability::New(12345));
MessageWriter writer(true);
@@ -394,7 +394,7 @@
delete message; \
}
-TEST_CASE(SerializeSingletons) {
+ISOLATE_UNIT_TEST_CASE(SerializeSingletons) {
TEST_ROUND_TRIP_IDENTICAL(Object::class_class());
TEST_ROUND_TRIP_IDENTICAL(Object::type_arguments_class());
TEST_ROUND_TRIP_IDENTICAL(Object::function_class());
@@ -435,7 +435,7 @@
delete message;
}
-TEST_CASE(SerializeString) {
+ISOLATE_UNIT_TEST_CASE(SerializeString) {
TestString("This string shall be serialized");
TestString("æøå"); // This file is UTF-8 encoded.
const char* data =
@@ -450,7 +450,7 @@
// TODO(sgjesse): Add tests with non-BMP characters.
}
-TEST_CASE(SerializeArray) {
+ISOLATE_UNIT_TEST_CASE(SerializeArray) {
// Write snapshot with object content.
const int kArrayLength = 10;
Array& array = Array::Handle(Array::New(kArrayLength));
@@ -485,7 +485,7 @@
delete message;
}
-TEST_CASE(SerializeArrayWithTypeArgument) {
+ISOLATE_UNIT_TEST_CASE(SerializeArrayWithTypeArgument) {
// Write snapshot with object content.
const int kArrayLength = 10;
Array& array =
@@ -569,7 +569,7 @@
ExpectEncodeFail(&root);
}
-TEST_CASE(SerializeEmptyArray) {
+ISOLATE_UNIT_TEST_CASE(SerializeEmptyArray) {
// Write snapshot with object content.
const int kArrayLength = 0;
Array& array = Array::Handle(Array::New(kArrayLength));
@@ -595,7 +595,7 @@
delete message;
}
-TEST_CASE(SerializeByteArray) {
+ISOLATE_UNIT_TEST_CASE(SerializeByteArray) {
// Write snapshot with object content.
const int kTypedDataLength = 256;
TypedData& typed_data = TypedData::Handle(
@@ -672,7 +672,7 @@
delete message; \
}
-TEST_CASE(SerializeTypedArray) {
+ISOLATE_UNIT_TEST_CASE(SerializeTypedArray) {
TEST_TYPED_ARRAY(Int8, int8_t);
TEST_TYPED_ARRAY(Uint8, uint8_t);
TEST_TYPED_ARRAY(Int16, int16_t);
@@ -685,7 +685,7 @@
TEST_TYPED_ARRAY(Float64, double);
}
-TEST_CASE(SerializeExternalTypedArray) {
+ISOLATE_UNIT_TEST_CASE(SerializeExternalTypedArray) {
TEST_EXTERNAL_TYPED_ARRAY(Int8, int8_t);
TEST_EXTERNAL_TYPED_ARRAY(Uint8, uint8_t);
TEST_EXTERNAL_TYPED_ARRAY(Int16, int16_t);
@@ -698,7 +698,7 @@
TEST_EXTERNAL_TYPED_ARRAY(Float64, double);
}
-TEST_CASE(SerializeEmptyByteArray) {
+ISOLATE_UNIT_TEST_CASE(SerializeEmptyByteArray) {
// Write snapshot with object content.
const int kTypedDataLength = 0;
TypedData& typed_data = TypedData::Handle(
@@ -786,7 +786,7 @@
}
}
-TEST_CASE(SerializeScript) {
+ISOLATE_UNIT_TEST_CASE(SerializeScript) {
const char* kScriptChars =
"class A {\n"
" static bar() { return 42; }\n"
diff --git a/runtime/vm/source_report_test.cc b/runtime/vm/source_report_test.cc
index 691924e..6c5e1cf 100644
--- a/runtime/vm/source_report_test.cc
+++ b/runtime/vm/source_report_test.cc
@@ -11,6 +11,7 @@
#ifndef PRODUCT
static RawObject* ExecuteScript(const char* script) {
+ TransitionVMToNative transition(Thread::Current());
Dart_Handle h_lib = TestCase::LoadTestScript(script, NULL);
EXPECT_VALID(h_lib);
Library& lib = Library::Handle();
@@ -21,7 +22,7 @@
return Api::UnwrapHandle(h_lib);
}
-TEST_CASE(SourceReport_Coverage_NoCalls) {
+ISOLATE_UNIT_TEST_CASE(SourceReport_Coverage_NoCalls) {
char buffer[1024];
const char* kScript =
"main() {\n"
@@ -50,7 +51,7 @@
buffer);
}
-TEST_CASE(SourceReport_Coverage_SimpleCall) {
+ISOLATE_UNIT_TEST_CASE(SourceReport_Coverage_SimpleCall) {
char buffer[1024];
const char* kScript =
"helper0() {}\n"
@@ -94,7 +95,7 @@
buffer);
}
-TEST_CASE(SourceReport_Coverage_ForceCompile) {
+ISOLATE_UNIT_TEST_CASE(SourceReport_Coverage_ForceCompile) {
char buffer[1024];
const char* kScript =
"helper0() {}\n"
@@ -139,7 +140,7 @@
buffer);
}
-TEST_CASE(SourceReport_Coverage_UnusedClass_NoForceCompile) {
+ISOLATE_UNIT_TEST_CASE(SourceReport_Coverage_UnusedClass_NoForceCompile) {
char buffer[1024];
const char* kScript =
"helper0() {}\n"
@@ -181,7 +182,7 @@
buffer);
}
-TEST_CASE(SourceReport_Coverage_UnusedClass_ForceCompile) {
+ISOLATE_UNIT_TEST_CASE(SourceReport_Coverage_UnusedClass_ForceCompile) {
char buffer[1024];
const char* kScript =
"helper0() {}\n"
@@ -224,7 +225,7 @@
buffer);
}
-TEST_CASE(SourceReport_Coverage_UnusedClass_ForceCompileError) {
+ISOLATE_UNIT_TEST_CASE(SourceReport_Coverage_UnusedClass_ForceCompileError) {
char buffer[1024];
const char* kScript =
"helper0() {}\n"
@@ -270,7 +271,7 @@
buffer);
}
-TEST_CASE(SourceReport_Coverage_NestedFunctions) {
+ISOLATE_UNIT_TEST_CASE(SourceReport_Coverage_NestedFunctions) {
char buffer[1024];
const char* kScript =
"helper0() {\n"
@@ -325,7 +326,7 @@
buffer);
}
-TEST_CASE(SourceReport_Coverage_RestrictedRange) {
+ISOLATE_UNIT_TEST_CASE(SourceReport_Coverage_RestrictedRange) {
char buffer[1024];
const char* kScript =
"helper0() {\n"
@@ -376,7 +377,7 @@
buffer);
}
-TEST_CASE(SourceReport_Coverage_AllFunctions) {
+ISOLATE_UNIT_TEST_CASE(SourceReport_Coverage_AllFunctions) {
const char* kScript =
"helper0() {}\n"
"helper1() {}\n"
@@ -415,7 +416,7 @@
EXPECT_SUBSTRING("\"scriptIndex\":2", result);
}
-TEST_CASE(SourceReport_Coverage_AllFunctions_ForceCompile) {
+ISOLATE_UNIT_TEST_CASE(SourceReport_Coverage_AllFunctions_ForceCompile) {
const char* kScript =
"helper0() {}\n"
"helper1() {}\n"
@@ -436,10 +437,7 @@
// We generate a report with all functions in the VM.
Script& null_script = Script::Handle();
- {
- TransitionNativeToVM transition(Thread::Current());
- report.PrintJSON(&js, null_script);
- }
+ report.PrintJSON(&js, null_script);
const char* result = js.ToCString();
// Sanity check the header.
@@ -457,7 +455,7 @@
EXPECT_SUBSTRING("\"scriptIndex\":2", result);
}
-TEST_CASE(SourceReport_CallSites_SimpleCall) {
+ISOLATE_UNIT_TEST_CASE(SourceReport_CallSites_SimpleCall) {
char buffer[1024];
const char* kScript =
"helper0() {}\n"
@@ -503,7 +501,7 @@
buffer);
}
-TEST_CASE(SourceReport_CallSites_PolymorphicCall) {
+ISOLATE_UNIT_TEST_CASE(SourceReport_CallSites_PolymorphicCall) {
char buffer[1024];
const char* kScript =
"class Common {\n"
@@ -577,7 +575,7 @@
buffer);
}
-TEST_CASE(SourceReport_MultipleReports) {
+ISOLATE_UNIT_TEST_CASE(SourceReport_MultipleReports) {
char buffer[1024];
const char* kScript =
"helper0() {}\n"
@@ -625,7 +623,7 @@
buffer);
}
-TEST_CASE(SourceReport_PossibleBreakpoints_Simple) {
+ISOLATE_UNIT_TEST_CASE(SourceReport_PossibleBreakpoints_Simple) {
char buffer[1024];
const char* kScript =
"helper0() {}\n"
diff --git a/runtime/vm/stack_frame_test.cc b/runtime/vm/stack_frame_test.cc
index 896c8bd..1fa5faf 100644
--- a/runtime/vm/stack_frame_test.cc
+++ b/runtime/vm/stack_frame_test.cc
@@ -85,6 +85,8 @@
Dart_Handle index = Dart_GetNativeArgument(args, 0);
Dart_Handle name = Dart_GetNativeArgument(args, 1);
+
+ TransitionNativeToVM transition(thread);
const Smi& frame_index_smi = Smi::CheckedHandle(Api::UnwrapHandle(index));
const char* expected_name =
String::CheckedHandle(Api::UnwrapHandle(name)).ToCString();
diff --git a/runtime/vm/stub_code.cc b/runtime/vm/stub_code.cc
index 82e4767..8b1a357 100644
--- a/runtime/vm/stub_code.cc
+++ b/runtime/vm/stub_code.cc
@@ -178,7 +178,7 @@
}
Isolate* isolate = thread->isolate();
if (isolate->heap()->NeedsGarbageCollection()) {
- isolate->heap()->CollectAllGarbage();
+ isolate->heap()->CollectMostGarbage();
}
}
#ifndef PRODUCT
diff --git a/runtime/vm/stub_code.h b/runtime/vm/stub_code.h
index 6e3b534..5dc798b 100644
--- a/runtime/vm/stub_code.h
+++ b/runtime/vm/stub_code.h
@@ -21,7 +21,7 @@
// List of stubs created in the VM isolate, these stubs are shared by different
// isolates running in this dart process.
#if !defined(TARGET_ARCH_DBC)
-#define VM_STUB_CODE_LIST(V) \
+#define VM_STUB_CODE_LIST_ARCH_INDEPENDENT(V) \
V(GetCStackPointer) \
V(JumpToFrame) \
V(RunExceptionHandler) \
@@ -85,6 +85,19 @@
V(StackOverflowSharedWithFPURegs) \
V(StackOverflowSharedWithoutFPURegs)
+#if defined(TARGET_ARCH_X64)
+#define VM_STUB_CODE_LIST_ARCH_SPECIFIC(V) \
+ V(OneArgCheckInlineCacheWithExactnessCheck) \
+ V(OneArgOptimizedCheckInlineCacheWithExactnessCheck)
+
+#else
+#define VM_STUB_CODE_LIST_ARCH_SPECIFIC(V)
+#endif
+
+#define VM_STUB_CODE_LIST(V) \
+ VM_STUB_CODE_LIST_ARCH_INDEPENDENT(V) \
+ VM_STUB_CODE_LIST_ARCH_SPECIFIC(V)
+
#else
#define VM_STUB_CODE_LIST(V) \
V(LazyCompile) \
@@ -220,7 +233,8 @@
intptr_t num_args,
const RuntimeEntry& handle_ic_miss,
Token::Kind kind,
- bool optimized = false);
+ bool optimized = false,
+ bool exactness_check = false);
static void GenerateUsageCounterIncrement(Assembler* assembler,
Register temp_reg);
static void GenerateOptimizedUsageCounterIncrement(Assembler* assembler);
diff --git a/runtime/vm/stub_code_arm.cc b/runtime/vm/stub_code_arm.cc
index c28d7c2..89b2acf 100644
--- a/runtime/vm/stub_code_arm.cc
+++ b/runtime/vm/stub_code_arm.cc
@@ -817,7 +817,10 @@
// Get the class index and insert it into the tags.
// R8: size and bit tags.
- __ LoadImmediate(TMP, RawObject::ClassIdTag::encode(cid));
+ uint32_t tags = 0;
+ tags = RawObject::ClassIdTag::update(cid, tags);
+ tags = RawObject::NewBit::update(true, tags);
+ __ LoadImmediate(TMP, tags);
__ orr(R8, R8, Operand(TMP));
__ str(R8, FieldAddress(R0, Array::tags_offset())); // Store tags.
}
@@ -1054,7 +1057,10 @@
// Get the class index and insert it into the tags.
// R9: size and bit tags.
- __ LoadImmediate(IP, RawObject::ClassIdTag::encode(cid));
+ uint32_t tags = 0;
+ tags = RawObject::ClassIdTag::update(cid, tags);
+ tags = RawObject::NewBit::update(true, tags);
+ __ LoadImmediate(IP, tags);
__ orr(R9, R9, Operand(IP));
__ str(R9, FieldAddress(R0, Context::tags_offset()));
@@ -1139,8 +1145,8 @@
// Spilled: R1, R2, R3
// R0: Address being stored
__ ldr(TMP, FieldAddress(R0, Object::tags_offset()));
- __ tst(TMP, Operand(1 << RawObject::kRememberedBit));
- __ b(&add_to_buffer, EQ);
+ __ tst(TMP, Operand(1 << RawObject::kOldAndNotRememberedBit));
+ __ b(&add_to_buffer, NE);
__ Ret();
__ Bind(&add_to_buffer);
@@ -1154,7 +1160,7 @@
#if !defined(USING_SIMULATOR)
ASSERT(OS::NumberOfAvailableProcessors() <= 1);
#endif
- __ orr(R2, R2, Operand(1 << RawObject::kRememberedBit));
+ __ bic(R2, R2, Operand(1 << RawObject::kOldAndNotRememberedBit));
__ str(R2, FieldAddress(R0, Object::tags_offset()));
} else {
// Atomically set the remembered bit of the object header.
@@ -1164,7 +1170,7 @@
Label retry;
__ Bind(&retry);
__ ldrex(R2, R3);
- __ orr(R2, R2, Operand(1 << RawObject::kRememberedBit));
+ __ bic(R2, R2, Operand(1 << RawObject::kOldAndNotRememberedBit));
__ strex(R1, R2, R3);
__ cmp(R1, Operand(1));
__ b(&retry, EQ);
@@ -1210,9 +1216,6 @@
// SP + 0 : type arguments object (only if class is parameterized).
void StubCode::GenerateAllocationStubForClass(Assembler* assembler,
const Class& cls) {
- // Must load pool pointer before being able to patch.
- Register new_pp = NOTFP;
- __ LoadPoolPointer(new_pp);
// The generated code is different if the class is parameterized.
const bool is_cls_parameterized = cls.NumTypeArguments() > 0;
ASSERT(!is_cls_parameterized ||
@@ -1256,6 +1259,7 @@
tags = RawObject::SizeTag::update(instance_size, tags);
ASSERT(cls.id() != kIllegalCid);
tags = RawObject::ClassIdTag::update(cls.id(), tags);
+ tags = RawObject::NewBit::update(true, tags);
__ LoadImmediate(R2, tags);
__ str(R2, Address(R0, Instance::tags_offset()));
__ add(R0, R0, Operand(kHeapObjectTag));
@@ -1488,7 +1492,9 @@
intptr_t num_args,
const RuntimeEntry& handle_ic_miss,
Token::Kind kind,
- bool optimized) {
+ bool optimized,
+ bool exactness_check /* = false */) {
+ ASSERT(!exactness_check);
__ CheckCodePointer();
ASSERT(num_args == 1 || num_args == 2);
#if defined(DEBUG)
@@ -1570,7 +1576,7 @@
__ Bind(&update);
const intptr_t entry_size =
- ICData::TestEntryLengthFor(num_args) * kWordSize;
+ ICData::TestEntryLengthFor(num_args, exactness_check) * kWordSize;
__ AddImmediate(R8, entry_size); // Next entry.
__ CompareImmediate(R2, Smi::RawValue(kIllegalCid)); // Done?
@@ -2541,7 +2547,8 @@
__ CompareImmediate(R2, Smi::RawValue(kIllegalCid));
__ b(&miss, EQ);
- const intptr_t entry_length = ICData::TestEntryLengthFor(1) * kWordSize;
+ const intptr_t entry_length =
+ ICData::TestEntryLengthFor(1, /*tracking_exactness=*/false) * kWordSize;
__ AddImmediate(R8, entry_length); // Next entry.
__ b(&loop);
@@ -2575,7 +2582,8 @@
__ CompareImmediate(R2, Smi::RawValue(kIllegalCid));
__ b(&miss, EQ);
- const intptr_t entry_length = ICData::TestEntryLengthFor(1) * kWordSize;
+ const intptr_t entry_length =
+ ICData::TestEntryLengthFor(1, /*tracking_exactness=*/false) * kWordSize;
__ AddImmediate(R8, entry_length); // Next entry.
__ b(&loop);
diff --git a/runtime/vm/stub_code_arm64.cc b/runtime/vm/stub_code_arm64.cc
index 8e438bf..306900e 100644
--- a/runtime/vm/stub_code_arm64.cc
+++ b/runtime/vm/stub_code_arm64.cc
@@ -858,7 +858,10 @@
__ csel(R1, ZR, R1, HI);
// Get the class index and insert it into the tags.
- __ LoadImmediate(TMP, RawObject::ClassIdTag::encode(cid));
+ uint32_t tags = 0;
+ tags = RawObject::ClassIdTag::update(cid, tags);
+ tags = RawObject::NewBit::update(true, tags);
+ __ LoadImmediate(TMP, tags);
__ orr(R1, R1, Operand(TMP));
__ StoreFieldToOffset(R1, R0, Array::tags_offset());
@@ -1235,7 +1238,10 @@
// Get the class index and insert it into the tags.
// R2: size and bit tags.
- __ LoadImmediate(TMP, RawObject::ClassIdTag::encode(cid));
+ uint32_t tags = 0;
+ tags = RawObject::ClassIdTag::update(cid, tags);
+ tags = RawObject::NewBit::update(true, tags);
+ __ LoadImmediate(TMP, tags);
__ orr(R2, R2, Operand(TMP));
__ StoreFieldToOffset(R2, R0, Context::tags_offset());
@@ -1313,7 +1319,7 @@
// Check whether this object has already been remembered. Skip adding to the
// store buffer if the object is in the store buffer already.
__ LoadFieldFromOffset(TMP, R0, Object::tags_offset(), kWord);
- __ tbz(&add_to_buffer, TMP, RawObject::kRememberedBit);
+ __ tbnz(&add_to_buffer, TMP, RawObject::kOldAndNotRememberedBit);
__ ret();
__ Bind(&add_to_buffer);
@@ -1331,7 +1337,7 @@
Label retry;
__ Bind(&retry);
__ ldxr(R2, R3, kWord);
- __ orri(R2, R2, Immediate(1 << RawObject::kRememberedBit));
+ __ AndImmediate(R2, R2, ~(1 << RawObject::kOldAndNotRememberedBit));
__ stxr(R1, R2, R3, kWord);
__ cbnz(&retry, R1);
@@ -1422,6 +1428,7 @@
tags = RawObject::SizeTag::update(instance_size, tags);
ASSERT(cls.id() != kIllegalCid);
tags = RawObject::ClassIdTag::update(cls.id(), tags);
+ tags = RawObject::NewBit::update(true, tags);
__ LoadImmediate(R0, tags);
// 64 bit store also zeros the hash_field.
__ StoreToOffset(R0, R2, Instance::tags_offset());
@@ -1653,7 +1660,9 @@
intptr_t num_args,
const RuntimeEntry& handle_ic_miss,
Token::Kind kind,
- bool optimized) {
+ bool optimized,
+ bool exactness_check /* = false */) {
+ ASSERT(!exactness_check);
ASSERT(num_args == 1 || num_args == 2);
#if defined(DEBUG)
{
@@ -1737,7 +1746,7 @@
__ Bind(&update);
const intptr_t entry_size =
- ICData::TestEntryLengthFor(num_args) * kWordSize;
+ ICData::TestEntryLengthFor(num_args, exactness_check) * kWordSize;
__ AddImmediate(R6, entry_size); // Next entry.
__ CompareImmediate(R2, Smi::RawValue(kIllegalCid)); // Done?
@@ -2782,7 +2791,8 @@
__ CompareImmediate(R2, Smi::RawValue(kIllegalCid));
__ b(&miss, EQ);
- const intptr_t entry_length = ICData::TestEntryLengthFor(1) * kWordSize;
+ const intptr_t entry_length =
+ ICData::TestEntryLengthFor(1, /*tracking_exactness=*/false) * kWordSize;
__ AddImmediate(R8, entry_length); // Next entry.
__ b(&loop);
@@ -2816,7 +2826,8 @@
__ CompareImmediate(R2, Smi::RawValue(kIllegalCid));
__ b(&miss, EQ);
- const intptr_t entry_length = ICData::TestEntryLengthFor(1) * kWordSize;
+ const intptr_t entry_length =
+ ICData::TestEntryLengthFor(1, /*tracking_exactness=*/false) * kWordSize;
__ AddImmediate(R8, entry_length); // Next entry.
__ b(&loop);
diff --git a/runtime/vm/stub_code_arm64_test.cc b/runtime/vm/stub_code_arm64_test.cc
index 091cb42..a194b7c 100644
--- a/runtime/vm/stub_code_arm64_test.cc
+++ b/runtime/vm/stub_code_arm64_test.cc
@@ -50,7 +50,7 @@
__ ret();
}
-TEST_CASE(CallRuntimeStubCode) {
+ISOLATE_UNIT_TEST_CASE(CallRuntimeStubCode) {
extern const Function& RegisterFakeFunction(const char* name,
const Code& code);
const int length = 10;
@@ -87,7 +87,7 @@
__ ret(); // Return value is in R0.
}
-TEST_CASE(CallLeafRuntimeStubCode) {
+ISOLATE_UNIT_TEST_CASE(CallLeafRuntimeStubCode) {
extern const Function& RegisterFakeFunction(const char* name,
const Code& code);
const char* str_value = "abAB";
diff --git a/runtime/vm/stub_code_arm_test.cc b/runtime/vm/stub_code_arm_test.cc
index e717208..2741204 100644
--- a/runtime/vm/stub_code_arm_test.cc
+++ b/runtime/vm/stub_code_arm_test.cc
@@ -46,11 +46,10 @@
__ CallRuntime(kAllocateArrayRuntimeEntry, argc);
__ AddImmediate(SP, argc * kWordSize);
__ Pop(R0); // Pop return value from return slot.
- __ LeaveDartFrame();
- __ Ret();
+ __ LeaveDartFrameAndReturn();
}
-TEST_CASE(CallRuntimeStubCode) {
+ISOLATE_UNIT_TEST_CASE(CallRuntimeStubCode) {
extern const Function& RegisterFakeFunction(const char* name,
const Code& code);
const int length = 10;
@@ -83,11 +82,10 @@
__ LoadObject(R2, rhs_index);
__ LoadObject(R3, length);
__ CallRuntime(kCaseInsensitiveCompareUC16RuntimeEntry, 4);
- __ LeaveDartFrame();
- __ Ret(); // Return value is in R0.
+ __ LeaveDartFrameAndReturn(); // Return value is in R0.
}
-TEST_CASE(CallLeafRuntimeStubCode) {
+ISOLATE_UNIT_TEST_CASE(CallLeafRuntimeStubCode) {
extern const Function& RegisterFakeFunction(const char* name,
const Code& code);
const char* str_value = "abAB";
diff --git a/runtime/vm/stub_code_ia32.cc b/runtime/vm/stub_code_ia32.cc
index 1743093..cecf6c2 100644
--- a/runtime/vm/stub_code_ia32.cc
+++ b/runtime/vm/stub_code_ia32.cc
@@ -666,7 +666,10 @@
__ Bind(&done);
// Get the class index and insert it into the tags.
- __ orl(EDI, Immediate(RawObject::ClassIdTag::encode(cid)));
+ uint32_t tags = 0;
+ tags = RawObject::ClassIdTag::update(cid, tags);
+ tags = RawObject::NewBit::update(true, tags);
+ __ orl(EDI, Immediate(tags));
__ movl(FieldAddress(EAX, Array::tags_offset()), EDI); // Tags.
}
// EAX: new object start as a tagged pointer.
@@ -910,7 +913,10 @@
// EAX: new object.
// EDX: number of context variables.
// EBX: size and bit tags.
- __ orl(EBX, Immediate(RawObject::ClassIdTag::encode(cid)));
+ uint32_t tags = 0;
+ tags = RawObject::ClassIdTag::update(cid, tags);
+ tags = RawObject::NewBit::update(true, tags);
+ __ orl(EBX, Immediate(tags));
__ movl(FieldAddress(EAX, Context::tags_offset()), EBX); // Tags.
}
@@ -985,8 +991,8 @@
// Spilled: EAX, ECX
// EDX: Address being stored
__ movl(EAX, FieldAddress(EDX, Object::tags_offset()));
- __ testl(EAX, Immediate(1 << RawObject::kRememberedBit));
- __ j(EQUAL, &add_to_buffer, Assembler::kNearJump);
+ __ testl(EAX, Immediate(1 << RawObject::kOldAndNotRememberedBit));
+ __ j(NOT_EQUAL, &add_to_buffer, Assembler::kNearJump);
__ popl(ECX);
__ popl(EAX);
__ ret();
@@ -995,10 +1001,10 @@
// EDX: Address being stored
// EAX: Current tag value
__ Bind(&add_to_buffer);
- // lock+orl is an atomic read-modify-write.
+ // lock+andl is an atomic read-modify-write.
__ lock();
- __ orl(FieldAddress(EDX, Object::tags_offset()),
- Immediate(1 << RawObject::kRememberedBit));
+ __ andl(FieldAddress(EDX, Object::tags_offset()),
+ Immediate(~(1 << RawObject::kOldAndNotRememberedBit)));
// Load the StoreBuffer block out of the thread. Then load top_ out of the
// StoreBufferBlock and add the address to the pointers_.
@@ -1091,6 +1097,7 @@
tags = RawObject::SizeTag::update(instance_size, tags);
ASSERT(cls.id() != kIllegalCid);
tags = RawObject::ClassIdTag::update(cls.id(), tags);
+ tags = RawObject::NewBit::update(true, tags);
__ movl(Address(EAX, Instance::tags_offset()), Immediate(tags));
__ addl(EAX, Immediate(kHeapObjectTag));
@@ -1319,7 +1326,9 @@
intptr_t num_args,
const RuntimeEntry& handle_ic_miss,
Token::Kind kind,
- bool optimized) {
+ bool optimized,
+ bool exactness_check /* = false */) {
+ ASSERT(!exactness_check); // Not supported.
ASSERT(num_args == 1 || num_args == 2);
#if defined(DEBUG)
{
@@ -1383,7 +1392,8 @@
bool optimize = kind == Token::kILLEGAL;
const intptr_t target_offset = ICData::TargetIndexFor(num_args) * kWordSize;
const intptr_t count_offset = ICData::CountIndexFor(num_args) * kWordSize;
- const intptr_t entry_size = ICData::TestEntryLengthFor(num_args) * kWordSize;
+ const intptr_t entry_size =
+ ICData::TestEntryLengthFor(num_args, exactness_check) * kWordSize;
__ Bind(&loop);
for (int unroll = optimize ? 4 : 2; unroll >= 0; unroll--) {
diff --git a/runtime/vm/stub_code_ia32_test.cc b/runtime/vm/stub_code_ia32_test.cc
index e00932a..a4b5d5e 100644
--- a/runtime/vm/stub_code_ia32_test.cc
+++ b/runtime/vm/stub_code_ia32_test.cc
@@ -50,7 +50,7 @@
__ ret();
}
-TEST_CASE(CallRuntimeStubCode) {
+ISOLATE_UNIT_TEST_CASE(CallRuntimeStubCode) {
extern const Function& RegisterFakeFunction(const char* name,
const Code& code);
const int length = 10;
@@ -90,7 +90,7 @@
__ ret(); // Return value is in EAX.
}
-TEST_CASE(CallLeafRuntimeStubCode) {
+ISOLATE_UNIT_TEST_CASE(CallLeafRuntimeStubCode) {
extern const Function& RegisterFakeFunction(const char* name,
const Code& code);
const char* str_value = "abAB";
diff --git a/runtime/vm/stub_code_x64.cc b/runtime/vm/stub_code_x64.cc
index 79293ad..1158117 100644
--- a/runtime/vm/stub_code_x64.cc
+++ b/runtime/vm/stub_code_x64.cc
@@ -771,7 +771,10 @@
__ Bind(&done);
// Get the class index and insert it into the tags.
- __ orq(RDI, Immediate(RawObject::ClassIdTag::encode(cid)));
+ uint32_t tags = 0;
+ tags = RawObject::ClassIdTag::update(cid, tags);
+ tags = RawObject::NewBit::update(true, tags);
+ __ orq(RDI, Immediate(tags));
__ movq(FieldAddress(RAX, Array::tags_offset()), RDI); // Tags.
}
@@ -1174,7 +1177,10 @@
// RAX: new object.
// R10: number of context variables.
// R13: size and bit tags.
- __ orq(R13, Immediate(RawObject::ClassIdTag::encode(cid)));
+ uint32_t tags = 0;
+ tags = RawObject::ClassIdTag::update(cid, tags);
+ tags = RawObject::NewBit::update(true, tags);
+ __ orq(R13, Immediate(tags));
__ movq(FieldAddress(RAX, Context::tags_offset()), R13); // Tags.
}
@@ -1257,8 +1263,8 @@
// store buffer if the object is in the store buffer already.
// RDX: Address being stored
__ movl(TMP, FieldAddress(RDX, Object::tags_offset()));
- __ testl(TMP, Immediate(1 << RawObject::kRememberedBit));
- __ j(EQUAL, &add_to_buffer, Assembler::kNearJump);
+ __ testl(TMP, Immediate(1 << RawObject::kOldAndNotRememberedBit));
+ __ j(NOT_EQUAL, &add_to_buffer, Assembler::kNearJump);
__ ret();
// Update the tags that this object has been remembered.
@@ -1267,10 +1273,10 @@
// RDX: Address being stored
// RAX: Current tag value
__ Bind(&add_to_buffer);
- // lock+orl is an atomic read-modify-write.
+ // lock+andl is an atomic read-modify-write.
__ lock();
- __ orl(FieldAddress(RDX, Object::tags_offset()),
- Immediate(1 << RawObject::kRememberedBit));
+ __ andl(FieldAddress(RDX, Object::tags_offset()),
+ Immediate(~(1 << RawObject::kOldAndNotRememberedBit)));
// Save registers being destroyed.
__ pushq(RAX);
@@ -1361,6 +1367,7 @@
tags = RawObject::SizeTag::update(instance_size, tags);
ASSERT(cls.id() != kIllegalCid);
tags = RawObject::ClassIdTag::update(cls.id(), tags);
+ tags = RawObject::NewBit::update(true, tags);
// 64 bit store also zeros the identity hash field.
__ movq(Address(RAX, Instance::tags_offset()), Immediate(tags));
__ addq(RAX, Immediate(kHeapObjectTag));
@@ -1589,7 +1596,8 @@
intptr_t num_args,
const RuntimeEntry& handle_ic_miss,
Token::Kind kind,
- bool optimized) {
+ bool optimized,
+ bool exactness_check) {
ASSERT(num_args == 1 || num_args == 2);
#if defined(DEBUG)
{
@@ -1636,9 +1644,9 @@
// Get argument count as Smi into RCX.
__ movq(RCX, FieldAddress(R10, ArgumentsDescriptor::count_offset()));
- // Load first argument into R9.
- __ movq(R9, Address(RSP, RCX, TIMES_4, 0));
- __ LoadTaggedClassIdMayBeSmi(RAX, R9);
+ // Load first argument into RDX.
+ __ movq(RDX, Address(RSP, RCX, TIMES_4, 0));
+ __ LoadTaggedClassIdMayBeSmi(RAX, RDX);
// RAX: first argument class ID as Smi.
if (num_args == 2) {
// Load second argument into R9.
@@ -1653,6 +1661,8 @@
const bool optimize = kind == Token::kILLEGAL;
const intptr_t target_offset = ICData::TargetIndexFor(num_args) * kWordSize;
const intptr_t count_offset = ICData::CountIndexFor(num_args) * kWordSize;
+ const intptr_t exactness_offset =
+ ICData::ExactnessOffsetFor(num_args) * kWordSize;
__ Bind(&loop);
for (int unroll = optimize ? 4 : 2; unroll >= 0; unroll--) {
@@ -1670,7 +1680,7 @@
__ Bind(&update);
const intptr_t entry_size =
- ICData::TestEntryLengthFor(num_args) * kWordSize;
+ ICData::TestEntryLengthFor(num_args, exactness_check) * kWordSize;
__ addq(R13, Immediate(entry_size)); // Next entry.
__ cmpq(R9, Immediate(Smi::RawValue(kIllegalCid))); // Done?
@@ -1716,21 +1726,62 @@
__ Bind(&found);
// R13: Pointer to an IC data check group.
+ Label call_target_function_through_unchecked_entry;
+ if (exactness_check) {
+ Label exactness_ok;
+ ASSERT(num_args == 1);
+ __ movq(RAX, Address(R13, exactness_offset));
+ __ cmpq(RAX, Immediate(Smi::RawValue(
+ StaticTypeExactnessState::HasExactSuperType().Encode())));
+ __ j(LESS, &exactness_ok);
+ __ j(EQUAL, &call_target_function_through_unchecked_entry);
+
+ // Check trivial exactness.
+ // Note: RawICData::static_receiver_type_ is guaranteed to be not null
+ // because we only emit calls to this stub when it is not null.
+ __ movq(RCX, FieldAddress(RBX, ICData::static_receiver_type_offset()));
+ __ movq(RCX, FieldAddress(RCX, Type::arguments_offset()));
+ // RAX contains an offset to type arguments in words as a smi,
+ // hence TIMES_4. RDX is guaranteed to be non-smi because it is expected to
+ // have type arguments.
+ __ cmpq(RCX, FieldAddress(RDX, RAX, TIMES_4, 0));
+ __ j(EQUAL, &call_target_function_through_unchecked_entry);
+
+ // Update exactness state (not-exact anymore).
+ __ movq(Address(R13, exactness_offset),
+ Immediate(
+ Smi::RawValue(StaticTypeExactnessState::NotExact().Encode())));
+ __ Bind(&exactness_ok);
+ }
__ movq(RAX, Address(R13, target_offset));
if (FLAG_optimization_counter_threshold >= 0) {
- __ Comment("Update caller's counter");
+ __ Comment("Update ICData counter");
// Ignore overflow.
__ addq(Address(R13, count_offset), Immediate(Smi::RawValue(1)));
}
- __ Comment("Call target");
+ __ Comment("Call target (via checked entry point)");
__ Bind(&call_target_function);
// RAX: Target function.
__ movq(CODE_REG, FieldAddress(RAX, Function::code_offset()));
__ movq(RCX, FieldAddress(RAX, Function::entry_point_offset()));
__ jmp(RCX);
+ if (exactness_check) {
+ __ Bind(&call_target_function_through_unchecked_entry);
+ if (FLAG_optimization_counter_threshold >= 0) {
+ __ Comment("Update ICData counter");
+ // Ignore overflow.
+ __ addq(Address(R13, count_offset), Immediate(Smi::RawValue(1)));
+ }
+ __ Comment("Call target (via unchecked entry point)");
+ __ movq(RAX, Address(R13, target_offset));
+ __ movq(CODE_REG, FieldAddress(RAX, Function::code_offset()));
+ __ movq(RCX, FieldAddress(RAX, Function::unchecked_entry_point_offset()));
+ __ jmp(RCX);
+ }
+
#if !defined(PRODUCT)
if (!optimized) {
__ Bind(&stepping);
@@ -1761,6 +1812,14 @@
assembler, 1, kInlineCacheMissHandlerOneArgRuntimeEntry, Token::kILLEGAL);
}
+void StubCode::GenerateOneArgCheckInlineCacheWithExactnessCheckStub(
+ Assembler* assembler) {
+ GenerateUsageCounterIncrement(assembler, RCX);
+ GenerateNArgsCheckInlineCacheStub(
+ assembler, 1, kInlineCacheMissHandlerOneArgRuntimeEntry, Token::kILLEGAL,
+ /*optimized=*/false, /*exactness_check=*/true);
+}
+
void StubCode::GenerateTwoArgsCheckInlineCacheStub(Assembler* assembler) {
GenerateUsageCounterIncrement(assembler, RCX);
GenerateNArgsCheckInlineCacheStub(assembler, 2,
@@ -1802,7 +1861,16 @@
GenerateOptimizedUsageCounterIncrement(assembler);
GenerateNArgsCheckInlineCacheStub(assembler, 1,
kInlineCacheMissHandlerOneArgRuntimeEntry,
- Token::kILLEGAL, true /* optimized */);
+ Token::kILLEGAL, /*optimized=*/true);
+}
+
+void StubCode::GenerateOneArgOptimizedCheckInlineCacheWithExactnessCheckStub(
+ Assembler* assembler) {
+ GenerateOptimizedUsageCounterIncrement(assembler);
+ GenerateNArgsCheckInlineCacheStub(assembler, 1,
+ kInlineCacheMissHandlerOneArgRuntimeEntry,
+ Token::kILLEGAL, /*optimized=*/true,
+ /*exactness_check=*/true);
}
void StubCode::GenerateTwoArgsOptimizedCheckInlineCacheStub(
@@ -1810,7 +1878,7 @@
GenerateOptimizedUsageCounterIncrement(assembler);
GenerateNArgsCheckInlineCacheStub(assembler, 2,
kInlineCacheMissHandlerTwoArgsRuntimeEntry,
- Token::kILLEGAL, true /* optimized */);
+ Token::kILLEGAL, /*optimized=*/true);
}
// Intermediary stub between a static call and its target. ICData contains
@@ -2721,7 +2789,8 @@
__ testq(R9, R9);
__ j(ZERO, &miss, Assembler::kNearJump);
- const intptr_t entry_length = ICData::TestEntryLengthFor(1) * kWordSize;
+ const intptr_t entry_length =
+ ICData::TestEntryLengthFor(1, /*tracking_exactness=*/false) * kWordSize;
__ addq(R13, Immediate(entry_length)); // Next entry.
__ jmp(&loop);
@@ -2757,7 +2826,8 @@
__ testq(R9, R9);
__ j(ZERO, &miss, Assembler::kNearJump);
- const intptr_t entry_length = ICData::TestEntryLengthFor(1) * kWordSize;
+ const intptr_t entry_length =
+ ICData::TestEntryLengthFor(1, /*tracking_exactness=*/false) * kWordSize;
__ addq(R13, Immediate(entry_length)); // Next entry.
__ jmp(&loop);
diff --git a/runtime/vm/stub_code_x64_test.cc b/runtime/vm/stub_code_x64_test.cc
index b460282..c9d9474 100644
--- a/runtime/vm/stub_code_x64_test.cc
+++ b/runtime/vm/stub_code_x64_test.cc
@@ -50,7 +50,7 @@
__ ret();
}
-TEST_CASE(CallRuntimeStubCode) {
+ISOLATE_UNIT_TEST_CASE(CallRuntimeStubCode) {
extern const Function& RegisterFakeFunction(const char* name,
const Code& code);
const int length = 10;
@@ -87,7 +87,7 @@
__ ret(); // Return value is in RAX.
}
-TEST_CASE(CallLeafRuntimeStubCode) {
+ISOLATE_UNIT_TEST_CASE(CallLeafRuntimeStubCode) {
extern const Function& RegisterFakeFunction(const char* name,
const Code& code);
const char* str_value = "abAB";
diff --git a/runtime/vm/symbols.h b/runtime/vm/symbols.h
index bf63026..28c6b68 100644
--- a/runtime/vm/symbols.h
+++ b/runtime/vm/symbols.h
@@ -183,6 +183,7 @@
V(ClosureData, "ClosureData") \
V(SignatureData, "SignatureData") \
V(RedirectionData, "RedirectionData") \
+ V(NativeEntryData, "NativeEntryData") \
V(Field, "Field") \
V(LiteralToken, "LiteralToken") \
V(TokenStream, "TokenStream") \
@@ -464,7 +465,8 @@
V(vm_entry_point, "vm:entry-point") \
V(Get, "get") \
V(Set, "set") \
- V(vm_trace_entrypoints, "vm:testing.unsafe.trace-entrypoints-fn")
+ V(vm_trace_entrypoints, "vm:testing.unsafe.trace-entrypoints-fn") \
+ V(BoundsCheckForPartialInstantiation, "_boundsCheckForPartialInstantiation")
// Contains a list of frequently used strings in a canonicalized form. This
// list is kept in the vm_isolate in order to share the copy across isolates
diff --git a/runtime/vm/thread.cc b/runtime/vm/thread.cc
index 8e3761f..a188d2b1c 100644
--- a/runtime/vm/thread.cc
+++ b/runtime/vm/thread.cc
@@ -92,10 +92,8 @@
deferred_interrupts_mask_(0),
deferred_interrupts_(0),
stack_overflow_count_(0),
- cha_(NULL),
hierarchy_info_(NULL),
type_usage_info_(NULL),
- deopt_id_(0),
pending_functions_(GrowableObjectArray::null()),
active_exception_(Object::null()),
active_stacktrace_(Object::null()),
diff --git a/runtime/vm/thread.h b/runtime/vm/thread.h
index 5ad3d6e..65402de 100644
--- a/runtime/vm/thread.h
+++ b/runtime/vm/thread.h
@@ -22,7 +22,7 @@
class AbstractType;
class ApiLocalScope;
class Array;
-class CHA;
+class CompilerState;
class Class;
class Code;
class CompilerStats;
@@ -304,6 +304,9 @@
void ScheduleInterruptsLocked(uword interrupt_bits);
RawError* HandleInterrupts();
uword GetAndClearInterrupts();
+ bool HasScheduledInterrupts() const {
+ return (stack_limit_ & kInterruptsMask) != 0;
+ }
// OSThread corresponding to this thread.
OSThread* os_thread() const { return os_thread_; }
@@ -366,15 +369,9 @@
// Has |this| exited Dart code?
bool HasExitedDartCode() const;
- // The (topmost) CHA for the compilation in this thread.
- CHA* cha() const {
- ASSERT(isolate_ != NULL);
- return cha_;
- }
-
- void set_cha(CHA* value) {
- ASSERT(isolate_ != NULL);
- cha_ = value;
+ CompilerState& compiler_state() {
+ ASSERT(compiler_state_ != nullptr);
+ return *compiler_state_;
}
HierarchyInfo* hierarchy_info() const {
@@ -557,35 +554,6 @@
static bool ObjectAtOffset(intptr_t offset, Object* object);
static intptr_t OffsetFromThread(const RuntimeEntry* runtime_entry);
- static const intptr_t kNoDeoptId = -1;
- static const intptr_t kDeoptIdStep = 2;
- static const intptr_t kDeoptIdBeforeOffset = 0;
- static const intptr_t kDeoptIdAfterOffset = 1;
- intptr_t deopt_id() const { return deopt_id_; }
- void set_deopt_id(int value) {
- ASSERT(value >= 0);
- deopt_id_ = value;
- }
- intptr_t GetNextDeoptId() {
- ASSERT(deopt_id_ != kNoDeoptId);
- const intptr_t id = deopt_id_;
- deopt_id_ += kDeoptIdStep;
- return id;
- }
-
- static intptr_t ToDeoptAfter(intptr_t deopt_id) {
- ASSERT(IsDeoptBefore(deopt_id));
- return deopt_id + kDeoptIdAfterOffset;
- }
-
- static bool IsDeoptBefore(intptr_t deopt_id) {
- return (deopt_id % kDeoptIdStep) == kDeoptIdBeforeOffset;
- }
-
- static bool IsDeoptAfter(intptr_t deopt_id) {
- return (deopt_id % kDeoptIdStep) == kDeoptIdAfterOffset;
- }
-
LongJumpScope* long_jump_base() const { return long_jump_base_; }
void set_long_jump_base(LongJumpScope* value) { long_jump_base_ = value; }
@@ -816,6 +784,13 @@
template <class T>
T* AllocateReusableHandle();
+ // Set the current compiler state and return the previous compiler state.
+ CompilerState* SetCompilerState(CompilerState* state) {
+ CompilerState* previous = compiler_state_;
+ compiler_state_ = state;
+ return previous;
+ }
+
// Accessed from generated code.
// ** This block of fields must come first! **
// For AOT cross-compilation, we rely on these members having the same offsets
@@ -883,10 +858,9 @@
int32_t stack_overflow_count_;
// Compiler state:
- CHA* cha_;
+ CompilerState* compiler_state_ = nullptr;
HierarchyInfo* hierarchy_info_;
TypeUsageInfo* type_usage_info_;
- intptr_t deopt_id_; // Compilation specific counter.
RawGrowableObjectArray* pending_functions_;
// JumpToExceptionHandler state:
@@ -955,6 +929,7 @@
friend class Simulator;
friend class StackZone;
friend class ThreadRegistry;
+ friend class CompilerState;
DISALLOW_COPY_AND_ASSIGN(Thread);
};
diff --git a/runtime/vm/thread_test.cc b/runtime/vm/thread_test.cc
index 07200fb..561db06 100644
--- a/runtime/vm/thread_test.cc
+++ b/runtime/vm/thread_test.cc
@@ -287,7 +287,7 @@
bool* wait_;
};
-TEST_CASE(ManySimpleTasksWithZones) {
+ISOLATE_UNIT_TEST_CASE(ManySimpleTasksWithZones) {
const int kTaskCount = 10;
Monitor monitor;
Monitor sync;
diff --git a/runtime/vm/unicode_test.cc b/runtime/vm/unicode_test.cc
index 0af271c..b8807f1 100644
--- a/runtime/vm/unicode_test.cc
+++ b/runtime/vm/unicode_test.cc
@@ -8,7 +8,7 @@
namespace dart {
-TEST_CASE(Utf8Encode) {
+ISOLATE_UNIT_TEST_CASE(Utf8Encode) {
const intptr_t kInputLen = 3;
const uint16_t kInput[kInputLen] = {0xe6, 0xe7, 0xe8}; // æøå
const String& input = String::Handle(String::FromUTF16(kInput, kInputLen));
@@ -27,7 +27,7 @@
}
}
-TEST_CASE(Utf8Decode) {
+ISOLATE_UNIT_TEST_CASE(Utf8Decode) {
// Examples from the Unicode specification, chapter 3
{
const char* src = "\x41\xC3\xB1\x42";
diff --git a/runtime/vm/unit_test.cc b/runtime/vm/unit_test.cc
index 7ff72fd..f5d7f87 100644
--- a/runtime/vm/unit_test.cc
+++ b/runtime/vm/unit_test.cc
@@ -632,6 +632,7 @@
if (Dart_IsError(result)) {
// Keep load error.
} else if (isolate->reload_context()->reload_aborted()) {
+ TransitionNativeToVM transition(thread);
result = Api::NewHandle(thread, isolate->reload_context()->error());
} else {
result = Dart_RootLibrary();
diff --git a/runtime/vm/virtual_memory_fuchsia.cc b/runtime/vm/virtual_memory_fuchsia.cc
index 5bc755d..df1bfe8 100644
--- a/runtime/vm/virtual_memory_fuchsia.cc
+++ b/runtime/vm/virtual_memory_fuchsia.cc
@@ -57,17 +57,17 @@
zx_object_set_property(vmo, ZX_PROP_NAME, name, strlen(name));
}
- const uint32_t flags = ZX_VM_FLAG_PERM_READ | ZX_VM_FLAG_PERM_WRITE |
- (is_executable ? ZX_VM_FLAG_PERM_EXECUTE : 0);
+ const uint32_t flags = ZX_VM_PERM_READ | ZX_VM_PERM_WRITE |
+ (is_executable ? ZX_VM_PERM_EXECUTE : 0);
uword address;
- status = zx_vmar_map_old(zx_vmar_root_self(), 0, vmo, 0, size, flags, &address);
+ status = zx_vmar_map(zx_vmar_root_self(), flags, 0, vmo, 0, size, &address);
zx_handle_close(vmo);
if (status != ZX_OK) {
- LOG_ERR("zx_vmar_map_old(%ld, %u) failed: %s\n", size, flags,
+ LOG_ERR("zx_vmar_map(%u, %ld) failed: %s\n", flags, size,
zx_status_get_string(status));
return NULL;
}
- LOG_INFO("zx_vmar_map_old(%ld, %u) success\n", size, flags);
+ LOG_INFO("zx_vmar_map(%u,%ld) success\n", flags, size);
MemoryRegion region(reinterpret_cast<void*>(address), size);
return new VirtualMemory(region, region);
@@ -94,13 +94,13 @@
zx_object_set_property(vmo, ZX_PROP_NAME, name, strlen(name));
}
- const uint32_t flags = ZX_VM_FLAG_PERM_READ | ZX_VM_FLAG_PERM_WRITE |
- (is_executable ? ZX_VM_FLAG_PERM_EXECUTE : 0);
+ const zx_vm_option_t options = ZX_VM_PERM_READ | ZX_VM_PERM_WRITE |
+ (is_executable ? ZX_VM_PERM_EXECUTE : 0);
uword base;
- status = zx_vmar_map_old(vmar, 0u, vmo, 0u, allocated_size, flags, &base);
+ status = zx_vmar_map(vmar, options, 0u, vmo, 0u, allocated_size, &base);
zx_handle_close(vmo);
if (status != ZX_OK) {
- LOG_ERR("zx_vmar_map_old(%ld, %u) failed: %s\n", size, flags,
+ LOG_ERR("zx_vmar_map(%u, %ld) failed: %s\n", flags, size,
zx_status_get_string(status));
return NULL;
}
@@ -167,26 +167,25 @@
prot = 0;
break;
case kReadOnly:
- prot = ZX_VM_FLAG_PERM_READ;
+ prot = ZX_VM_PERM_READ;
break;
case kReadWrite:
- prot = ZX_VM_FLAG_PERM_READ | ZX_VM_FLAG_PERM_WRITE;
+ prot = ZX_VM_PERM_READ | ZX_VM_PERM_WRITE;
break;
case kReadExecute:
- prot = ZX_VM_FLAG_PERM_READ | ZX_VM_FLAG_PERM_EXECUTE;
+ prot = ZX_VM_PERM_READ | ZX_VM_PERM_EXECUTE;
break;
case kReadWriteExecute:
- prot = ZX_VM_FLAG_PERM_READ | ZX_VM_FLAG_PERM_WRITE |
- ZX_VM_FLAG_PERM_EXECUTE;
+ prot = ZX_VM_PERM_READ | ZX_VM_PERM_WRITE | ZX_VM_PERM_EXECUTE;
break;
}
- zx_status_t status = zx_vmar_protect_old(zx_vmar_root_self(), page_address,
- end_address - page_address, prot);
+ zx_status_t status = zx_vmar_protect(zx_vmar_root_self(), prot, page_address,
+ end_address - page_address);
if (status != ZX_OK) {
- FATAL3("zx_vmar_protect_old(%lx, %lx) failed: %s\n", page_address,
+ FATAL3("zx_vmar_protect(%lx, %lx) failed: %s\n", page_address,
end_address - page_address, zx_status_get_string(status));
}
- LOG_INFO("zx_vmar_protect_old(%lx, %lx, %x) success\n", page_address,
+ LOG_INFO("zx_vmar_protect(%lx, %lx, %x) success\n", page_address,
end_address - page_address, prot);
}
diff --git a/sdk/BUILD.gn b/sdk/BUILD.gn
index b657a32..857219e 100644
--- a/sdk/BUILD.gn
+++ b/sdk/BUILD.gn
@@ -62,7 +62,6 @@
# ......dart_server.platform
# ......dart_shared.platform
# ......_internal/
-#.........spec.sum
#.........strong.sum
#.........dart2js_platform.dill
#.........dart2js_server_platform.dill
@@ -73,13 +72,10 @@
#.........vm_platform.dill
#.........vm_platform_strong.dill
#.........dev_compiler/
-# ......analysis_server/
-# ......analyzer/
# ......async/
# ......collection/
# ......convert/
# ......core/
-# ......front_end/
# ......html/
# ......_http/
# ......internal/
@@ -87,7 +83,6 @@
# ......isolate/
# ......js/
# ......js_util/
-# ......kernel/
# ......math/
# ......mirrors/
# ......typed_data/
@@ -242,30 +237,10 @@
# ]
_platform_sdk_libraries = _full_sdk_libraries
-# Package sources copied to lib/
-_analyzer_source_dirs = [
- "analyzer",
- "analysis_server",
- "front_end",
- "kernel",
-]
-
# From here down to the copy_trees() invocation, we collect all the information
# about trees that need to be copied in the list of scopes, copy_tree_specs.
copy_tree_specs = []
-# This loop generates rules for copying analyzer sources into lib/
-foreach(analyzer_source_dir, _analyzer_source_dirs) {
- copy_tree_specs += [ {
- target = "copy_${analyzer_source_dir}_source_dir"
- visibility = [ ":copy_analyzer_sources" ]
- source = "../pkg/$analyzer_source_dir"
- dest = "$root_out_dir/dart-sdk/lib/$analyzer_source_dir"
- ignore_patterns =
- "*.svn,doc,*.py,*.gypi,*.sh,.gitignore,packages,test,testcases"
- } ]
-}
-
# This rule copies dartdoc templates to
# bin/snapshots/resources/dartdoc/templates
copy_tree_specs += [ {
@@ -489,15 +464,6 @@
}
}
-# This is the main rule for copying analyzer sources to lib/
-group("copy_analyzer_sources") {
- visibility = [ ":create_common_sdk" ]
- public_deps = []
- foreach(analyzer_source_dir, _analyzer_source_dirs) {
- public_deps += [ ":copy_${analyzer_source_dir}_source_dir" ]
- }
-}
-
# This rule writes the .packages file for dartdoc resources.
write_file("$root_out_dir/dart-sdk/bin/snapshots/resources/dartdoc/.packages",
"dartdoc:.")
@@ -516,11 +482,9 @@
visibility = [ ":create_common_sdk" ]
deps = [
":copy_libraries",
- "../utils/dartanalyzer:generate_summary_spec",
"../utils/dartanalyzer:generate_summary_strong",
]
sources = [
- "$root_gen_dir/spec.sum",
"$root_gen_dir/strong.sum",
]
outputs = [
@@ -952,7 +916,6 @@
visibility = [ ":create_sdk" ]
public_deps = [
":copy_analysis_summaries",
- ":copy_analyzer_sources",
":copy_api_readme",
":copy_dart",
":copy_dartdoc_files",
diff --git a/sdk/lib/async/future.dart b/sdk/lib/async/future.dart
index 494f471..beb982e 100644
--- a/sdk/lib/async/future.dart
+++ b/sdk/lib/async/future.dart
@@ -289,7 +289,11 @@
* Creates a future that runs its computation after a delay.
*
* The [computation] will be executed after the given [duration] has passed,
- * and the future is completed with the result of the computation,
+ * and the future is completed with the result of the computation.
+ *
+ * If [computation] returns a future,
+ * the future returned by this constructor will complete with the value or
+ * error of that future.
*
* If the duration is 0 or less,
* it completes no sooner than in the next event-loop iteration,
@@ -321,11 +325,12 @@
* Waits for multiple futures to complete and collects their results.
*
* Returns a future which will complete once all the provided futures
- * have completed, either with their results, or with an error if either
+ * have completed, either with their results, or with an error if any
* of the provided futures fail.
*
* The value of the returned future will be a list of all the values that
- * were produced.
+ * were produced in the order that the futures are provided by iterating
+ * [futures].
*
* If any future completes with an error,
* then the returned future completes with that error.
diff --git a/sdk/lib/async/stream.dart b/sdk/lib/async/stream.dart
index f8ef8ed..a0efcb7 100644
--- a/sdk/lib/async/stream.dart
+++ b/sdk/lib/async/stream.dart
@@ -58,6 +58,13 @@
* If a listener is added to a broadcast stream while an event is being fired,
* that listener will not receive the event currently being fired.
* If a listener is canceled, it immediately stops receiving events.
+ * Listening on a broadcast stream can be treated as listening on a new stream
+ * containing only the events that have not yet been emitted when the [listen]
+ * call occurs.
+ * For example, the [first] getter listens to the stream, then returns the first
+ * event that listener receives.
+ * This is not necessarily the first even emitted by the stream, but the first
+ * of the *remaining* events of the broadcast stream.
*
* When the "done" event is fired, subscribers are unsubscribed before
* receiving the event. After the event has been sent, the stream has no
@@ -334,7 +341,7 @@
/**
* Adds a subscription to this stream.
*
- * Returns a [StreamSubscription] which handles events from the stream using
+ * Returns a [StreamSubscription] which handles events from this stream using
* the provided [onData], [onError] and [onDone] handlers.
* The handlers can be changed on the subscription, but they start out
* as the provided functions.
@@ -348,10 +355,10 @@
* The [onError] callback must be of type `void onError(error)` or
* `void onError(error, StackTrace stackTrace)`. If [onError] accepts
* two arguments it is called with the error object and the stack trace
- * (which could be `null` if the stream itself received an error without
+ * (which could be `null` if this stream itself received an error without
* stack trace).
* Otherwise it is called with just the error object.
- * If [onError] is omitted, any errors on the stream are considered unhandled,
+ * If [onError] is omitted, any errors on this stream are considered unhandled,
* and will be passed to the current [Zone]'s error handler.
* By default unhandled async errors are treated
* as if they were uncaught top-level errors.
@@ -413,7 +420,7 @@
* mapped to a new event.
*
* This acts like [map], except that [convert] may return a [Future],
- * and in that case, the stream waits for that future to complete before
+ * and in that case, this stream waits for that future to complete before
* continuing with its result.
*
* The returned stream is a broadcast stream if this stream is.
@@ -540,10 +547,11 @@
* by the [onError] function.
*
* The [onError] callback must be of type `void onError(error)` or
- * `void onError(error, StackTrace stackTrace)`. Depending on the function
- * type the stream either invokes [onError] with or without a stack
- * trace. The stack trace argument might be `null` if the stream itself
- * received an error without stack trace.
+ * `void onError(error, StackTrace stackTrace)`.
+ * The function type determines whether [onError] is invoked with a stack
+ * trace argument.
+ * The stack trace argument may be `null` if this stream received an error
+ * without a stack trace.
*
* An asynchronous error `error` is matched by a test function if
*`test(error)` returns true. If [test] is omitted, every error is considered
@@ -551,7 +559,7 @@
*
* If the error is intercepted, the [onError] function can decide what to do
* with it. It can throw if it wants to raise a new (or the same) error,
- * or simply return to make the stream forget the error.
+ * or simply return to make this stream forget the error.
* If the received `error` value is thrown again by the [onError] function,
* it acts like a `rethrow` and it is emitted along with its original
* stack trace, not the stack trace of the `throw` inside [onError].
@@ -599,7 +607,7 @@
* The `streamConsumer` is closed when this stream has been successfully added
* to it - when the future returned by `addStream` completes without an error.
*
- * Returns a future which completes when the stream has been consumed
+ * Returns a future which completes when this stream has been consumed
* and the consumer has been closed.
*
* The returned future completes with the same result as the future returned
@@ -612,9 +620,9 @@
}
/**
- * Applies a [StreamTransformer] to the current stream.
+ * Applies [streamTransformer] to this stream.
*
- * Returns the result of the stream transformation,
+ * Returns the transformed stream,
* that is, the result of `streamTransformer.bind(this)`.
* This method simply allows writing the call to `streamTransformer.bind`
* in a chained fashion, like
@@ -636,7 +644,7 @@
* Combines a sequence of values by repeatedly applying [combine].
*
* Similar to [Iterable.reduce], this function maintains a value,
- * starting with the first element of the stream
+ * starting with the first element of this stream
* and updated for each further element of this stream.
* For each element after the first,
* the value is updated to the result of calling [combine]
@@ -645,7 +653,7 @@
* When this stream is done, the returned future is completed with
* the value at that time.
*
- * If the stream is empty, the returned future is completed with
+ * If this stream is empty, the returned future is completed with
* an error.
* If this stream emits an error, or the call to [combine] throws,
* the returned future is completed with that error,
@@ -728,11 +736,11 @@
* If [separator] is provided, it is inserted between element string
* representations.
*
- * The returned future is completed with the combined string when the stream
+ * The returned future is completed with the combined string when this stream
* is done.
*
- * If the stream contains an error, or if the call to [Object.toString]
- * throws, the returned future is completed with that error,
+ * If this stream emits an error, or the call to [Object.toString] throws,
+ * the returned future is completed with that error,
* and processing stops.
*/
Future<String> join([String separator = ""]) {
@@ -763,11 +771,12 @@
*
* Compares each element of this stream to [needle] using [Object.==].
* If an equal element is found, the returned future is completed with `true`.
- * If the stream ends without finding a match, the future is completed with
+ * If this stream ends without finding a match, the future is completed with
* `false`.
*
- * If the stream contains an error, or the call to `Object.==` throws,
- * the returned future is completed with that error, and processing stops.
+ * If this stream emits an error, or the call to [Object.==] throws,
+ * the returned future is completed with that error,
+ * and processing stops.
*/
Future<bool> contains(Object needle) {
_Future<bool> future = new _Future<bool>();
@@ -789,13 +798,14 @@
}
/**
- * Executes [action] on each element of the stream.
+ * Executes [action] on each element of this stream.
*
- * Completes the returned [Future] when all elements of the stream
+ * Completes the returned [Future] when all elements of this stream
* have been processed.
*
- * If the stream contains an error, or if the call to [action] throws,
- * the returned future completes with that error, and processing stops.
+ * If this stream emits an error, or if the call to [action] throws,
+ * the returned future completes with that error,
+ * and processing stops.
*/
Future forEach(void action(T element)) {
_Future future = new _Future();
@@ -817,15 +827,16 @@
/**
* Checks whether [test] accepts all elements provided by this stream.
*
- * Calls [test] on each element of the stream.
+ * Calls [test] on each element of this stream.
* If the call returns `false`, the returned future is completed with `false`
* and processing stops.
*
- * If the stream ends without finding an element that [test] rejects,
+ * If this stream ends without finding an element that [test] rejects,
* the returned future is completed with `true`.
*
- * If this stream contains an error, or if the call to [test] throws,
- * the returned future is completed with that error, and processing stops.
+ * If this stream emits an error, or if the call to [test] throws,
+ * the returned future is completed with that error,
+ * and processing stops.
*/
Future<bool> every(bool test(T element)) {
_Future<bool> future = new _Future<bool>();
@@ -849,15 +860,16 @@
/**
* Checks whether [test] accepts any element provided by this stream.
*
- * Calls [test] on each element of the stream.
+ * Calls [test] on each element of this stream.
* If the call returns `true`, the returned future is completed with `true`
* and processing stops.
*
- * If the stream ends without finding an element that [test] accepts,
+ * If this stream ends without finding an element that [test] accepts,
* the returned future is completed with `false`.
*
- * If this stream contains an error, or if the call to [test] throws,
- * the returned future is completed with that error, and processing stops.
+ * If this stream emits an error, or if the call to [test] throws,
+ * the returned future is completed with that error,
+ * and processing stops.
*/
Future<bool> any(bool test(T element)) {
_Future<bool> future = new _Future<bool>();
@@ -881,13 +893,14 @@
/**
* The number of elements in this stream.
*
- * Waits for all elements of this stream. When the stream ends,
+ * Waits for all elements of this stream. When this stream ends,
* the returned future is completed with the number of elements.
*
- * If the stream contains an error, the returned future is completed with
- * that error, and processing stops.
+ * If this stream emits an error,
+ * the returned future is completed with that error,
+ * and processing stops.
*
- * This operation listens to the stream, and a non-broadcast stream cannot
+ * This operation listens to this stream, and a non-broadcast stream cannot
* be reused after finding its length.
*/
Future<int> get length {
@@ -910,13 +923,13 @@
*
* Waits for the first element of this stream, then completes the returned
* future with `true`.
- * If the stream ends without emitting any elements, the returned future is
+ * If this stream ends without emitting any elements, the returned future is
* completed with `false`.
*
* If the first event is an error, the returned future is completed with that
* error.
*
- * This operation listens to the stream, and a non-broadcast stream cannot
+ * This operation listens to this stream, and a non-broadcast stream cannot
* be reused after checking whether it is empty.
*/
Future<bool> get isEmpty {
@@ -944,12 +957,13 @@
/**
* Collects all elements of this stream in a [List].
*
- * Creates a `List<T>` and adds all elements of the stream to the list
+ * Creates a `List<T>` and adds all elements of this stream to the list
* in the order they arrive.
- * When the stream ends, the returned future is completed with that list.
+ * When this stream ends, the returned future is completed with that list.
*
- * If the stream contains an error, the returned future is completed
- * with that error, and processing stops.
+ * If this stream emits an error,
+ * the returned future is completed with that error,
+ * and processing stops.
*/
Future<List<T>> toList() {
List<T> result = <T>[];
@@ -969,9 +983,9 @@
/**
* Collects the data of this stream in a [Set].
*
- * Creates a `Set<T>` and adds all elements of the stream to the set.
+ * Creates a `Set<T>` and adds all elements of this stream to the set.
* in the order they arrive.
- * When the stream ends, the returned future is completed with that set.
+ * When this stream ends, the returned future is completed with that set.
*
* The returned set is the same type as returned by `new Set<T>()`.
* If another type of set is needed, either use [forEach] to add each
@@ -979,8 +993,9 @@
* `toList().then((list) => new SomeOtherSet.from(list))`
* to create the set.
*
- * If the stream contains an error, the returned future is completed
- * with that error, and processing stops.
+ * If this stream emits an error,
+ * the returned future is completed with that error,
+ * and processing stops.
*/
Future<Set<T>> toSet() {
Set<T> result = new Set<T>();
@@ -998,12 +1013,15 @@
}
/**
- * Discards all data on the stream, but signals when it's done or an error
+ * Discards all data on this stream, but signals when it is done or an error
* occurred.
*
* When subscribing using [drain], cancelOnError will be true. This means
- * that the future will complete with the first error on the stream and then
+ * that the future will complete with the first error on this stream and then
* cancel the subscription.
+ * If this stream emits an error, or the call to [combine] throws,
+ * the returned future is completed with that error,
+ * and processing is stopped.
*
* In case of a `done` event the future completes with the given
* [futureValue].
@@ -1129,9 +1147,9 @@
}
/**
- * The first element of the stream.
+ * The first element of this stream.
*
- * Stops listening to the stream after the first element has been received.
+ * Stops listening to this stream after the first element has been received.
*
* Internally the method cancels its subscription after the first element.
* This means that single-subscription (non-broadcast) streams are closed
@@ -1259,7 +1277,7 @@
* If this stream emits an error before the first matching element,
* the returned future is completed with that error, and processing stops.
*
- * Stops listening to the stream after the first matching element or error
+ * Stops listening to this stream after the first matching element or error
* has been received.
*
* Internally the method cancels its subscription after the first element that
@@ -1346,7 +1364,7 @@
* Finds the single element in this stream matching [test].
*
* Like [lastWhere], except that it is an error if more than one
- * matching element occurs in the stream.
+ * matching element occurs in this stream.
*/
Future<T> singleWhere(bool test(T element), {T orElse()}) {
_Future<T> future = new _Future<T>();
@@ -1393,7 +1411,7 @@
/**
* Returns the value of the [index]th data event of this stream.
*
- * Stops listening to the stream after the [index]th data event has been
+ * Stops listening to this stream after the [index]th data event has been
* received.
*
* Internally the method cancels its subscription after these elements. This
@@ -1437,7 +1455,7 @@
*
* The countdown doesn't start until the returned stream is listened to.
* The countdown is reset every time an event is forwarded from this stream,
- * or when the stream is paused and resumed.
+ * or when this stream is paused and resumed.
*
* The [onTimeout] function is called with one argument: an
* [EventSink] that allows putting events into the returned stream.
@@ -2009,8 +2027,11 @@
* Returns a new stream with events that are computed from events of the
* provided [stream].
*
- * Implementors of the [StreamTransformer] interface should document
- * differences from the following expected behavior:
+ * The [StreamTransformer] interface is completely generic,
+ * so it cannot say what subclasses do.
+ * Each [StreamTransformer] should document clearly how it transforms the
+ * stream (on the class or variable used to access the transformer),
+ * as well as any differences from the following typical behavior:
*
* * When the returned stream is listened to, it starts listening to the
* input [stream].
@@ -2023,6 +2044,11 @@
* "Reasonable time" depends on the transformer and stream. Some transformers,
* like a "timeout" transformer, might make these operations depend on a
* duration. Others might not delay them at all, or just by a microtask.
+ *
+ * Transformers are free to handle errors in any way.
+ * A transformer implementation may choose to propagate errors,
+ * or convert them to other events, or ignore them completely,
+ * but if errors are ignored, it should be documented explicitly.
*/
Stream<T> bind(Stream<S> stream);
diff --git a/sdk/lib/collection/maps.dart b/sdk/lib/collection/maps.dart
index 795a2e3..60f66e1 100644
--- a/sdk/lib/collection/maps.dart
+++ b/sdk/lib/collection/maps.dart
@@ -283,6 +283,11 @@
}
/** This operation is not supported by an unmodifiable map. */
+ void addEntries(Iterable<MapEntry<K, V>> entries) {
+ throw new UnsupportedError("Cannot modify unmodifiable map");
+ }
+
+ /** This operation is not supported by an unmodifiable map. */
void clear() {
throw new UnsupportedError("Cannot modify unmodifiable map");
}
@@ -293,9 +298,24 @@
}
/** This operation is not supported by an unmodifiable map. */
+ void removeWhere(bool test(K key, V value)) {
+ throw new UnsupportedError("Cannot modify unmodifiable map");
+ }
+
+ /** This operation is not supported by an unmodifiable map. */
V putIfAbsent(K key, V ifAbsent()) {
throw new UnsupportedError("Cannot modify unmodifiable map");
}
+
+ /** This operation is not supported by an unmodifiable map. */
+ V update(K key, V update(V value), {V ifAbsent()}) {
+ throw new UnsupportedError("Cannot modify unmodifiable map");
+ }
+
+ /** This operation is not supported by an unmodifiable map. */
+ void updateAll(V update(K key, V value)) {
+ throw new UnsupportedError("Cannot modify unmodifiable map");
+ }
}
/**
@@ -341,7 +361,7 @@
Iterable<MapEntry<K, V>> get entries => _map.entries;
- void addEntries(Iterable<Object> entries) {
+ void addEntries(Iterable<MapEntry<K, V>> entries) {
_map.addEntries(entries);
}
diff --git a/sdk/lib/core/list.dart b/sdk/lib/core/list.dart
index 3e4feae..f7cf182 100644
--- a/sdk/lib/core/list.dart
+++ b/sdk/lib/core/list.dart
@@ -579,18 +579,26 @@
List<E> operator +(List<E> other);
/**
- * Returns a new list containing the objects from [start] inclusive to [end]
- * exclusive.
+ * Returns a new list containing the elements between [start] and [end].
*
- * List<String> colors = ['red', 'green', 'blue', 'orange', 'pink'];
- * colors.sublist(1, 3); // ['green', 'blue']
+ * The new list is a `List<E>` containing the elements of this list at
+ * positions greater than or equal to [start] and less than [end] in the same
+ * order as they occur in this list.
*
- * If [end] is omitted, the [length] of `this` is used.
+ * ```dart
+ * var colors = ["red", "green", "blue", "orange", "pink"];
+ * print(colors.sublist(1, 3)); // [green, blue]
+ * ```
*
- * colors.sublist(1); // ['green', 'blue', 'orange', 'pink']
+ * If [end] is omitted, it defaults to the [length] of this list.
*
- * An error occurs if [start] is outside the range `0` .. `length` or if
- * [end] is outside the range `start` .. `length`.
+ * ```dart
+ * print(colors.sublist(1)); // [green, blue, orange, pink]
+ * ```
+ *
+ * The `start` and `end` positions must satisfy the relations
+ * 0 ≤ `start` ≤ `end` ≤ `this.length`
+ * If `end` is equal to `start`, then the returned list is empty.
*/
List<E> sublist(int start, [int end]);
diff --git a/sdk/lib/core/map.dart b/sdk/lib/core/map.dart
index e122688..4e8a878 100644
--- a/sdk/lib/core/map.dart
+++ b/sdk/lib/core/map.dart
@@ -82,6 +82,10 @@
/**
* Creates an identity map with the default implementation, [LinkedHashMap].
*
+ * An identity map uses [identical] for equality and [identityHashCode]
+ * for hash codes of keys instead of the intrinsic [Object.operator==] and
+ * [Object.hashCode] of the keys.
+ *
* The returned map allows `null` as a key.
* It iterates in key insertion order.
*/
diff --git a/sdk/lib/core/string.dart b/sdk/lib/core/string.dart
index 5c19917..ef5c3e6 100644
--- a/sdk/lib/core/string.dart
+++ b/sdk/lib/core/string.dart
@@ -5,7 +5,15 @@
part of dart.core;
/**
- * A sequence of characters.
+ * A sequence of UTF-16 code units.
+ *
+ * Strings are mainly used to represent text. A character may be represented by
+ * multiple code points, each code point consisting of one or two code
+ * units. For example the Papua New Guinea flag character requires four code
+ * units to represent two code points, but should be treated like a single
+ * character: "🇵🇬". Platforms that do not support the flag character may show
+ * the letters "PG" instead. If the code points are swapped, it instead becomes
+ * the Guadeloupe flag "🇬🇵" ("GP").
*
* A string can be either single or multiline. Single line strings are
* written using matching single or double quotes, and multiline strings are
@@ -84,7 +92,7 @@
* [RegExp] to work with regular expressions.
*
* Also see:
-
+ *
* * [Dart Cookbook](https://www.dartlang.org/docs/cookbook/#strings)
* for String examples and recipes.
* * [Dart Up and Running](https://www.dartlang.org/docs/dart-up-and-running/ch03.html#strings-and-regular-expressions)
diff --git a/sdk/lib/internal/cast.dart b/sdk/lib/internal/cast.dart
index 8d10ce4..b3620f5 100644
--- a/sdk/lib/internal/cast.dart
+++ b/sdk/lib/internal/cast.dart
@@ -251,43 +251,6 @@
T lookup(Object key) => _source.lookup(key) as T;
}
-abstract class _CastQueueMixin<S, T> implements Queue<T> {
- Queue<S> get _source;
-
- T removeFirst() => _source.removeFirst() as T;
- T removeLast() => _source.removeLast() as T;
-
- @deprecated
- void add(T value) {
- _source.add(value as S);
- }
-
- void addFirst(T value) {
- _source.addFirst(value as S);
- }
-
- void addLast(T value) {
- _source.addLast(value as S);
- }
-
- bool remove(Object other) => _source.remove(other);
- void addAll(Iterable<T> elements) {
- _source.addAll(new CastIterable<T, S>(elements));
- }
-
- void removeWhere(bool test(T element)) {
- _source.removeWhere((S element) => test(element as T));
- }
-
- void retainWhere(bool test(T element)) {
- _source.retainWhere((S element) => test(element as T));
- }
-
- void clear() {
- _source.clear();
- }
-}
-
class CastMap<SK, SV, K, V> extends MapBase<K, V> {
final Map<SK, SV> _source;
@@ -359,18 +322,40 @@
}
}
-class CastQueue<S, T> extends _CastIterableBase<S, T>
- with _CastQueueMixin<S, T> {
+class CastQueue<S, T> extends _CastIterableBase<S, T> implements Queue<T> {
final Queue<S> _source;
CastQueue(this._source);
Queue<R> cast<R>() => new CastQueue<S, R>(_source);
-}
-// TODO(lrn): Use when ListQueue implements List.
-// class CastListQueue<S, T>
-// extends _CastListBase<S, T> with _CastQueueMixin<S, T>
-// implements ListQueue<T> {
-// final ListQueue<S> _source;
-// CastListQueue(this._source);
-// ListQueue<R> cast<R>() => new CastListQueue<S, R>(_source);
-// }
+ T removeFirst() => _source.removeFirst() as T;
+ T removeLast() => _source.removeLast() as T;
+
+ void add(T value) {
+ _source.add(value as S);
+ }
+
+ void addFirst(T value) {
+ _source.addFirst(value as S);
+ }
+
+ void addLast(T value) {
+ _source.addLast(value as S);
+ }
+
+ bool remove(Object other) => _source.remove(other);
+ void addAll(Iterable<T> elements) {
+ _source.addAll(new CastIterable<T, S>(elements));
+ }
+
+ void removeWhere(bool test(T element)) {
+ _source.removeWhere((S element) => test(element as T));
+ }
+
+ void retainWhere(bool test(T element)) {
+ _source.retainWhere((S element) => test(element as T));
+ }
+
+ void clear() {
+ _source.clear();
+ }
+}
diff --git a/sdk/lib/io/directory.dart b/sdk/lib/io/directory.dart
index bdd4af1..2fc0930 100644
--- a/sdk/lib/io/directory.dart
+++ b/sdk/lib/io/directory.dart
@@ -135,6 +135,7 @@
return overrides.createDirectory(path);
}
+ @pragma("vm:entry-point")
factory Directory.fromRawPath(Uint8List path) {
// TODO(bkonyi): Handle overrides.
return new _Directory.fromRawPath(path);
diff --git a/sdk/lib/io/file.dart b/sdk/lib/io/file.dart
index e34008c..6fe447f 100644
--- a/sdk/lib/io/file.dart
+++ b/sdk/lib/io/file.dart
@@ -267,6 +267,7 @@
* Creates a File object from a raw path, that is, a sequence of bytes
* as represented by the OS.
*/
+ @pragma("vm:entry-point")
factory File.fromRawPath(Uint8List rawPath) {
// TODO(bkonyi): Handle overrides.
return new _File.fromRawPath(rawPath);
diff --git a/sdk/lib/io/stdio.dart b/sdk/lib/io/stdio.dart
index 626ce7e..bba0d70 100644
--- a/sdk/lib/io/stdio.dart
+++ b/sdk/lib/io/stdio.dart
@@ -198,6 +198,10 @@
*
* This class can also be used to check whether `stdout` or `stderr` is
* connected to a terminal and query some terminal properties.
+ *
+ * The [addError] API is inherited from [StreamSink] and calling it will result
+ * in an unhandled asynchronous error unless there is an error handler on
+ * [done].
*/
class Stdout extends _StdSink implements IOSink {
final int _fd;
@@ -403,6 +407,10 @@
}
/// The standard output stream of data written by this program.
+///
+/// The `addError` API is inherited from `StreamSink` and calling it will
+/// result in an unhandled asynchronous error unless there is an error handler
+/// on `done`.
Stdout get stdout {
if (_stdout == null) {
_stdout = _StdIOUtils._getStdioOutputStream(_stdoutFD);
@@ -411,6 +419,10 @@
}
/// The standard output stream of errors written by this program.
+///
+/// The `addError` API is inherited from `StreamSink` and calling it will
+/// result in an unhandled asynchronous error unless there is an error handler
+/// on `done`.
Stdout get stderr {
if (_stderr == null) {
_stderr = _StdIOUtils._getStdioOutputStream(_stderrFD);
diff --git a/tests/co19/co19-dart2js.status b/tests/co19/co19-dart2js.status
index c5b7ce6..7e97123 100644
--- a/tests/co19/co19-dart2js.status
+++ b/tests/co19/co19-dart2js.status
@@ -4,12 +4,48 @@
[ $compiler == dart2js ]
Language/Classes/Constructors/Generative_Constructors/execution_of_a_superinitializer_t01: RuntimeError, OK # co19 issue 258
+Language/Classes/Constructors/Generative_Constructors/execution_of_an_initializer_t02: MissingCompileTimeError
+Language/Classes/Constructors/Generative_Constructors/execution_t04: Crash
+Language/Classes/Constructors/Generative_Constructors/execution_t05: Crash
+Language/Classes/Constructors/Generative_Constructors/execution_t06: Crash
+Language/Classes/Constructors/Generative_Constructors/execution_t07: Crash
+Language/Classes/Constructors/Generative_Constructors/execution_t12: Crash
+Language/Classes/Constructors/Generative_Constructors/initializing_formals_execution_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/definition_t24: 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/Assignment/expression_assignment_t07: RuntimeError
+Language/Expressions/Assignment/no_such_method_t01: RuntimeError
+Language/Expressions/Assignment/no_such_method_t02: RuntimeError
+Language/Expressions/Assignment/no_such_method_t03: RuntimeError
+Language/Expressions/Assignment/no_such_method_t04: RuntimeError
+Language/Expressions/Assignment/no_such_method_t05: RuntimeError
+Language/Expressions/Assignment/no_such_method_t06: RuntimeError
+Language/Expressions/Assignment/no_such_method_t07: RuntimeError
+Language/Expressions/Assignment/no_such_method_t08: RuntimeError
+Language/Expressions/Assignment/no_such_method_t09: RuntimeError
Language/Expressions/Assignment/super_assignment_failed_t05: RuntimeError # Issue 25671
Language/Expressions/Assignment/super_assignment_value_t02: RuntimeError # Please triage this failure
Language/Expressions/Await_Expressions/evaluation_throws_t03: RuntimeError # Please triage this failure
Language/Expressions/Await_Expressions/evaluation_throws_t04: RuntimeError # Please triage this failure
Language/Expressions/Await_Expressions/evaluation_throws_t06: RuntimeError # Please triage this failure
Language/Expressions/Await_Expressions/evaluation_throws_t07: RuntimeError # Please triage this failure
+Language/Expressions/Constants/bitwise_operators_t05: MissingCompileTimeError
+Language/Expressions/Constants/depending_on_itself_t03: Crash
+Language/Expressions/Constants/exception_t02: Pass
+Language/Expressions/Constants/literal_number_t01: CompileTimeError # Larger than 64 bit int
+Language/Expressions/Constants/logical_expression_t04: MissingCompileTimeError
+Language/Expressions/Constants/math_operators_t01: CompileTimeError # Larger than 64 bit int
+Language/Expressions/Constants/math_operators_t06: CompileTimeError # Larger than 64 bit int
+Language/Expressions/Function_Invocation/Unqualified_Invocation/instance_context_invocation_t04: Crash
Language/Expressions/Function_Invocation/async_cleanup_t01: Skip # https://github.com/dart-lang/sdk/issues/28873
Language/Expressions/Function_Invocation/async_cleanup_t03: Skip # https://github.com/dart-lang/sdk/issues/28873
Language/Expressions/Function_Invocation/async_cleanup_t05: Skip # https://github.com/dart-lang/sdk/issues/28873
@@ -21,10 +57,17 @@
Language/Expressions/Function_Invocation/async_invokation_t04: RuntimeError, Pass # co19 issue 57
Language/Expressions/Instance_Creation/New/evaluation_t19: RuntimeError # Please triage this failure
Language/Expressions/Instance_Creation/New/evaluation_t20: RuntimeError # Please triage this failure
+Language/Expressions/Method_Invocation/Ordinary_Invocation/evaluation_t08: RuntimeError
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_t02: Crash
+Language/Expressions/Method_Invocation/Super_Invocation/evaluation_t05: RuntimeError
+Language/Expressions/Method_Invocation/Super_Invocation/invocation_t02: Crash
+Language/Expressions/Null/instance_of_class_null_t01: RuntimeError
+Language/Expressions/Numbers/static_type_of_int_t01: CompileTimeError # Larger than 64 bit int
Language/Expressions/Numbers/syntax_t06: Fail # Issue 21098
Language/Expressions/Numbers/syntax_t09: Fail # Issue 21098
+Language/Expressions/Numbers/syntax_t10: CompileTimeError # Larger than 64 bit int
Language/Expressions/Object_Identity/Object_Identity/constant_objects_t01: Fail # Issue 11551, also related to issue 563, 18738
Language/Expressions/Object_Identity/Object_Identity/double_t02: Fail # Issue 11551, also related to issue 563, 18738
Language/Expressions/Object_Identity/constant_objects_t01: RuntimeError # Please triage this failure
@@ -41,15 +84,46 @@
Language/Expressions/Property_Extraction/Getter_Access_and_Method_Extraction/class_object_member_t08: MissingCompileTimeError # Issue 24332
Language/Expressions/Shift/syntax_t01/14: MissingRuntimeError # Please triage this failure
Language/Expressions/Spawning_an_Isolate/new_isolate_t01: SkipByDesign
+Language/Expressions/This/placement_t04: Crash
+Language/Functions/External_Functions/not_connected_to_a_body_t01: RuntimeError
+Language/Functions/Formal_Parameters/Optional_Formals/default_value_t01: MissingCompileTimeError
+Language/Functions/Formal_Parameters/Optional_Formals/default_value_t02: MissingCompileTimeError
Language/Libraries_and_Scripts/Imports/invalid_uri_deferred_t02: CompileTimeError # Please triage this failure
+Language/Libraries_and_Scripts/Imports/same_name_t10: RuntimeError
+Language/Libraries_and_Scripts/Scripts/top_level_main_t01: CompileTimeError
+Language/Metadata/before_class_t01: RuntimeError
+Language/Metadata/before_ctor_t01: RuntimeError
+Language/Metadata/before_ctor_t02: RuntimeError
Language/Metadata/before_export_t01: RuntimeError # Please triage this failure
+Language/Metadata/before_factory_t01: RuntimeError
+Language/Metadata/before_function_t01: RuntimeError
+Language/Metadata/before_function_t02: RuntimeError
+Language/Metadata/before_function_t03: RuntimeError
+Language/Metadata/before_function_t04: RuntimeError
+Language/Metadata/before_function_t05: RuntimeError
+Language/Metadata/before_function_t06: RuntimeError
+Language/Metadata/before_function_t07: RuntimeError
Language/Metadata/before_import_t01: RuntimeError # Please triage this failure
Language/Metadata/before_library_t01: RuntimeError # Please triage this failure
+Language/Metadata/before_param_t01: RuntimeError
+Language/Metadata/before_param_t02: RuntimeError
+Language/Metadata/before_param_t03: RuntimeError
+Language/Metadata/before_param_t04: RuntimeError
+Language/Metadata/before_param_t05: RuntimeError
+Language/Metadata/before_param_t06: RuntimeError
+Language/Metadata/before_param_t07: RuntimeError
+Language/Metadata/before_param_t08: RuntimeError
Language/Metadata/before_param_t09: RuntimeError # Please triage this failure
Language/Metadata/before_type_param_t01: RuntimeError # Please triage this failure
Language/Metadata/before_typedef_t01: RuntimeError # Please triage this failure
Language/Metadata/before_variable_t01: RuntimeError # Please triage this failure
+Language/Metadata/before_variable_t02: RuntimeError
+Language/Mixins/Mixin_Application/error_t01: MissingCompileTimeError
+Language/Mixins/Mixin_Application/error_t02: MissingCompileTimeError
Language/Mixins/Mixin_Application/syntax_t20: CompileTimeError # Please triage this failure
+Language/Mixins/Mixin_Application/syntax_t23: RuntimeError
+Language/Mixins/Mixin_Application/syntax_t24: RuntimeError
+Language/Mixins/Mixin_Application/syntax_t25: RuntimeError
Language/Mixins/declaring_constructor_t05: MissingCompileTimeError # Issue 24767
Language/Mixins/declaring_constructor_t06: MissingCompileTimeError # Issue 24767
Language/Mixins/deferred_t01: MissingCompileTimeError # Please triage this failure
@@ -58,6 +132,7 @@
Language/Reference/Operator_Precedence/precedence_15_unary_prefix_t08: RuntimeError # Please triage this failure
Language/Statements/Assert/syntax_t04: MissingCompileTimeError # This is legal Dart
Language/Statements/Continue/async_loops_t09: Crash # Please triage this failure
+Language/Statements/Continue/async_loops_t10: Timeout
Language/Statements/Yield_and_Yield_Each/Yield/execution_async_t02: RuntimeError # Please triage this failure
Language/Statements/Yield_and_Yield_Each/Yield/execution_async_t03: Skip # https://github.com/dart-lang/sdk/issues/28873
Language/Statements/Yield_and_Yield_Each/Yield/execution_async_t05: Skip # https://github.com/dart-lang/sdk/issues/28873
@@ -72,8 +147,11 @@
Language/Types/Interface_Types/subtype_t28: Pass, Fail, Crash # Stack overflow. Issue 25282
Language/Types/Interface_Types/subtype_t30: Fail # Issue 14654
Language/Types/Type_Void/syntax_t08: MissingCompileTimeError
+Language/Types/Type_Void/syntax_t09: MissingCompileTimeError
LayoutTests/fast/borders/border-color-visited_t01: RuntimeError # See issue 143
LayoutTests/fast/canvas/fillText-shadow_t01: RuntimeError # See issue 143
+LayoutTests/fast/canvas/gradient-addColorStop-with-invalid-color_t01: Pass, RuntimeError
+LayoutTests/fast/canvas/rgba-parsing_t01: Pass, RuntimeError
LayoutTests/fast/css/content/content-quotes-01_t01: Pass, RuntimeError
LayoutTests/fast/css/font-face-cache-bug_t01: Pass, RuntimeError
LayoutTests/fast/css/font-shorthand-mix-inherit_t01: Pass, RuntimeError # Please triage this failure
@@ -96,6 +174,9 @@
LayoutTests/fast/dom/subtree-modified-attributes_t01: Skip # https://github.com/dart-lang/sdk/issues/28873
LayoutTests/fast/events/form-onchange_t01: RuntimeError # See issue 143
LayoutTests/fast/events/onerror-bubbling_t01: RuntimeError # See issue 143
+LayoutTests/fast/files/blob-parts-slice-test_t01: CompileTimeError, OK # Error if web int literal cannot be represented exactly, see http://dartbug.com/33351
+LayoutTests/fast/files/blob-slice-overflow_t01: CompileTimeError, OK # Error if web int literal cannot be represented exactly, see http://dartbug.com/33351
+LayoutTests/fast/files/blob-slice-test_t01: CompileTimeError, OK # Error if web int literal cannot be represented exactly, see http://dartbug.com/33351
LayoutTests/fast/files/file-reader-done-reading-abort_t01: Skip # https://github.com/dart-lang/sdk/issues/28873
LayoutTests/fast/forms/autofocus-attribute_t01: RuntimeError # See issue 143
LayoutTests/fast/forms/autofocus-opera-004_t01: RuntimeError # See issue 143
@@ -156,46 +237,96 @@
LibTest/core/DateTime/to8601String_A01_t01: RuntimeError # Please triage this failure
LibTest/core/DateTime/to8601String_A01_t02: RuntimeError # Please triage this failure
LibTest/core/DateTime/to8601String_A01_t03: RuntimeError # Please triage this failure
+LibTest/core/Duration/Duration_A01_t01: CompileTimeError, OK # Error if web int literal cannot be represented exactly, see http://dartbug.com/33351
+LibTest/core/Duration/Duration_A02_t01: CompileTimeError, OK # Error if web int literal cannot be represented exactly, see http://dartbug.com/33351
+LibTest/core/Duration/inDays_A01_t01: CompileTimeError, OK # Error if web int literal cannot be represented exactly, see http://dartbug.com/33351
+LibTest/core/Duration/inHours_A01_t01: CompileTimeError, OK # Error if web int literal cannot be represented exactly, see http://dartbug.com/33351
+LibTest/core/Duration/inMilliseconds_A01_t01: CompileTimeError, OK # Error if web int literal cannot be represented exactly, see http://dartbug.com/33351
+LibTest/core/Duration/inMinutes_A01_t01: CompileTimeError, OK # Error if web int literal cannot be represented exactly, see http://dartbug.com/33351
+LibTest/core/Duration/inSeconds_A01_t01: CompileTimeError, OK # Error if web int literal cannot be represented exactly, see http://dartbug.com/33351
+LibTest/core/Invocation/namedArguments_A01_t01: RuntimeError
LibTest/core/List/List_class_A01_t01: RuntimeError # co19-roll r623: Please triage this failure
LibTest/core/List/getRange_A03_t01: RuntimeError, OK # Tests that fail because they use the legacy try-catch syntax. co19 issue 184.
LibTest/core/List/removeAt_A02_t01: RuntimeError # Issue 1533
LibTest/core/List/sort_A01_t06: Slow, Pass # Slow tests that needs extra time to finish.
LibTest/core/double/INFINITY_A01_t04: RuntimeError # Expected to fail because double.INFINITY is int.
LibTest/core/double/NEGATIVE_INFINITY_A01_t04: RuntimeError # Expected to fail because double.NEGATIVE_INFINITY is int.
+LibTest/core/double/isInfinite_A01_t03: CompileTimeError # Larger than 64 bit int
+LibTest/core/double/operator_GE_A01_t02: CompileTimeError, OK # Error if web int literal cannot be represented exactly, see http://dartbug.com/33351
+LibTest/core/double/operator_GT_A01_t02: CompileTimeError, OK # Error if web int literal cannot be represented exactly, see http://dartbug.com/33351
+LibTest/core/double/operator_LE_A01_t02: CompileTimeError, OK # Error if web int literal cannot be represented exactly, see http://dartbug.com/33351
+LibTest/core/double/operator_LT_A01_t02: CompileTimeError, OK # Error if web int literal cannot be represented exactly, see http://dartbug.com/33351
LibTest/core/double/operator_addition_A01_t06: RuntimeError # Large integer literal. Not valid dart 2.
LibTest/core/double/operator_addition_A01_t08: Crash # Large integer literal. Not valid dart 2.
LibTest/core/double/operator_subtraction_A01_t06: RuntimeError # Large integer literal. Not valid dart 2.
LibTest/core/double/operator_subtraction_A01_t09: Crash # Large integer literal. Not valid dart 2.
+LibTest/core/int/abs_A01_t01: CompileTimeError # Larger than 64 bit int
+LibTest/core/int/ceilToDouble_A01_t01: CompileTimeError # Larger than 64 bit int
+LibTest/core/int/ceil_A01_t01: CompileTimeError # Larger than 64 bit int
+LibTest/core/int/floorToDouble_A01_t01: CompileTimeError # Larger than 64 bit int
+LibTest/core/int/floor_A01_t01: CompileTimeError # Larger than 64 bit int
+LibTest/core/int/hashCode_A01_t01: CompileTimeError, OK # Error if web int literal cannot be represented exactly, see http://dartbug.com/33351
LibTest/core/int/hashCode_A01_t01: RuntimeError, OK # co19 issue 308
LibTest/core/int/isEven_A01_t01: RuntimeError, OK # co19 issue 277
+LibTest/core/int/isInfinite_A01_t01: CompileTimeError # Larger than 64 bit int
+LibTest/core/int/isNaN_A01_t01: CompileTimeError # Larger than 64 bit int
+LibTest/core/int/isNegative_A01_t01: CompileTimeError # Larger than 64 bit int
LibTest/core/int/isOdd_A01_t01: RuntimeError, OK # co19 issue 277
LibTest/core/int/operator_AND_A01_t01: RuntimeError, OK # Requires bigints.
+LibTest/core/int/operator_GE_A01_t01: CompileTimeError # Larger than 64 bit int
LibTest/core/int/operator_GT_A01_t01: RuntimeError, OK # co19 issue 200
+LibTest/core/int/operator_LE_A01_t01: CompileTimeError # Larger than 64 bit int
LibTest/core/int/operator_LT_A01_t01: RuntimeError, OK # co19 issue 200
LibTest/core/int/operator_NOT_A01_t01: RuntimeError, OK # Expects negative result from bit-operation.
LibTest/core/int/operator_OR_A01_t01: RuntimeError, OK # Requires bigints.
LibTest/core/int/operator_XOR_A01_t01: RuntimeError, OK # Requires bigints.
LibTest/core/int/operator_addition_A01_t01: RuntimeError, OK # co19 issue 200
+LibTest/core/int/operator_division_A01_t01: CompileTimeError # Larger than 64 bit int
LibTest/core/int/operator_division_A01_t01: RuntimeError # Large integer literal. Not valid dart 2.
+LibTest/core/int/operator_multiplication_A01_t01: CompileTimeError # Larger than 64 bit int
LibTest/core/int/operator_multiplication_A01_t01: RuntimeError # Large integer literal. Not valid dart 2.
LibTest/core/int/operator_remainder_A01_t01: RuntimeError, OK # Requires bigints.
+LibTest/core/int/operator_remainder_A01_t02: CompileTimeError # Larger than 64 bit int
LibTest/core/int/operator_remainder_A01_t02: RuntimeError, OK # Requires bigints.
LibTest/core/int/operator_right_shift_A01_t01: RuntimeError, OK # Expects negative result from bit-operation.
+LibTest/core/int/operator_subtraction_A01_t01: CompileTimeError # Larger than 64 bit int
LibTest/core/int/operator_subtraction_A01_t01: RuntimeError # Large integer literal. Not valid dart 2.
+LibTest/core/int/operator_truncating_division_A01_t01: CompileTimeError # Larger than 64 bit int
LibTest/core/int/operator_truncating_division_A01_t01: RuntimeError # Large integer literal. Not valid dart 2.
+LibTest/core/int/operator_unary_minus_A01_t01: CompileTimeError # Larger than 64 bit int
+LibTest/core/int/parse_A01_t01: CompileTimeError # Larger than 64 bit int
+LibTest/core/int/remainder_A01_t02: CompileTimeError # Larger than 64 bit int
+LibTest/core/int/roundToDouble_A01_t01: CompileTimeError # Larger than 64 bit int
+LibTest/core/int/round_A01_t01: CompileTimeError # Larger than 64 bit int
LibTest/core/int/toDouble_A01_t01: RuntimeError, OK # co19 issue 200
+LibTest/core/int/toInt_A01_t01: CompileTimeError # Larger than 64 bit int
+LibTest/core/int/truncateToDouble_A01_t01: CompileTimeError # Larger than 64 bit int
+LibTest/core/int/truncate_A01_t01: CompileTimeError # Larger than 64 bit int
LibTest/html/Element/addEventListener_A01_t04: Skip # https://github.com/dart-lang/sdk/issues/28873
LibTest/html/Element/mouseEnterEvent_A01_t01: Pass, RuntimeError # Please triage this failure
LibTest/html/Element/queryAll_A01_t01: RuntimeError # See issue 143
LibTest/html/Element/query_A01_t01: RuntimeError # See issue 143
+LibTest/html/HttpRequest/getAllResponseHeaders_A01_t01: Crash
+LibTest/html/HttpRequest/getResponseHeader_A01_t01: Crash
+LibTest/html/HttpRequest/getString_A01_t01: Crash
+LibTest/html/HttpRequest/request_A01_t01: Crash
LibTest/html/HttpRequest/responseType_A01_t03: CompileTimeError # co19-roll r706: Please triage this failure
+LibTest/html/HttpRequest/setRequestHeader_A01_t01: Crash
+LibTest/html/HttpRequest/statusText_A01_t01: Crash
+LibTest/html/HttpRequest/status_A01_t01: Crash
LibTest/html/IFrameElement/addEventListener_A01_t04: Skip # https://github.com/dart-lang/sdk/issues/28873
+LibTest/html/IFrameElement/contentWindow_A01_t01: Crash
LibTest/html/IFrameElement/enteredView_A01_t01: CompileTimeError # co19-roll r706: Please triage this failure
LibTest/html/Window/postMessage_A01_t01: Skip # https://github.com/dart-lang/sdk/issues/28873
+LibTest/html/Window/postMessage_A01_t02: Crash
+LibTest/html/Window/requestFileSystem_A01_t01: Crash
+LibTest/html/Window/requestFileSystem_A01_t02: Crash
+LibTest/html/Window/requestFileSystem_A02_t01: Crash
LibTest/isolate/*: SkipByDesign # dart:isolate not supported.
LibTest/math/MutableRectangle/boundingBox_A01_t01: RuntimeError, Pass # co19-roll r706: Please triage this failure.
LibTest/math/Rectangle/boundingBox_A01_t01: RuntimeError, Pass # co19-roll r706: Please triage this failure.
LibTest/math/pow_A04_t01: Fail # co19-roll r587: Please triage this failure
+LibTest/math/pow_A10_t01: CompileTimeError # Larger than 64 bit int
LibTest/math/pow_A14_t01: Fail # co19-roll r587: Please triage this failure
LibTest/math/pow_A16_t01: Fail # co19-roll r587: Please triage this failure
LibTest/typed_data/ByteData/*Int64*: Fail # co19-roll r569: Please triage this failure
@@ -316,6 +447,7 @@
WebPlatformTest/dom/nodes/Document-createElement_t01: CompileTimeError # co19-roll r722: Please triage this failure.
WebPlatformTest/dom/nodes/Element-childElementCount-nochild_t01: CompileTimeError # co19-roll r722: Please triage this failure.
WebPlatformTest/html/dom/elements/global-attributes/classlist-nonstring_t01: RuntimeError # See issue 143
+WebPlatformTest/html/semantics/embedded-content/the-audio-element/audio_constructor_t01: RuntimeError
WebPlatformTest/html/semantics/forms/the-textarea-element/textarea-type_t01: RuntimeError # See issue 143
WebPlatformTest/html/semantics/tabular-data/the-table-element/insertRow-method_t01: RuntimeError # See issue 143
WebPlatformTest/html/semantics/tabular-data/the-table-element/insertRow-method_t02: RuntimeError # See issue 143
@@ -1376,9 +1508,6 @@
LayoutTests/fast/dom/HTMLScriptElement/remove-source_t01: RuntimeError # Please triage this failure
LayoutTests/fast/events/event-listener-html-non-html-confusion_t01: RuntimeError # Please triage this failure
-[ $compiler == dart2js && $runtime == chrome && !$fasta ]
-LayoutTests/fast/canvas/gradient-addColorStop-with-invalid-color_t01: RuntimeError
-
[ $compiler == dart2js && $runtime != chrome && $browser && $fast_startup ]
WebPlatformTest/shadow-dom/elements-and-dom-objects/extensions-to-element-interface/attributes/test-005_t01: Fail # please triage
WebPlatformTest/shadow-dom/elements-and-dom-objects/extensions-to-element-interface/methods/test-001_t01: Fail # please triage
@@ -1457,19 +1586,17 @@
[ $compiler == dart2js && $runtime == d8 ]
Language/Statements/Continue/async_loops_t10: Skip # Issue 33150
+LayoutTests/*: SkipByDesign
+LibTest/html/*: SkipByDesign
LibTest/typed_data/Float32x4List/Float32x4List.view_A06_t01: Fail # co19-roll r587: Please triage this failure
LibTest/typed_data/Int32x4/operator_OR_A01_t01: RuntimeError # Issue 7728, timer not supported in jsshell
+WebPlatformTest/*: SkipByDesign
[ $compiler == dart2js && $runtime == d8 && $checked && $fast_startup && $minified ]
Language/Classes/Constructors/Factories/function_type_t02: RuntimeError
Language/Expressions/Instance_Creation/New/redirecting_factory_constructor_t02: RuntimeError
Language/Generics/malformed_t02: Crash
-[ $compiler == dart2js && $runtime == d8 && $fasta ]
-LayoutTests/*: SkipByDesign
-LibTest/html/*: SkipByDesign
-WebPlatformTest/*: SkipByDesign
-
[ $compiler == dart2js && $runtime != d8 && $runtime != jsshell && !$checked ]
LayoutTests/fast/xpath/invalid-resolver_t01: RuntimeError # Please triage this failure
@@ -2559,8 +2686,8 @@
LibTest/html/Window/moveTo_A02_t01: RuntimeError # Please triage this failure
LibTest/html/Window/postMessage_A01_t01: RuntimeError # Please triage this failure
LibTest/html/Window/postMessage_A01_t02: RuntimeError # Please triage this failure
-LibTest/html/Window/requestFileSystem_A01_t01: RuntimeError # Please triage this failure
-LibTest/html/Window/requestFileSystem_A01_t02: RuntimeError # Please triage this failure
+LibTest/html/Window/requestFileSystem_A01_t01: Crash, RuntimeError # Please triage this failure
+LibTest/html/Window/requestFileSystem_A01_t02: Crash, RuntimeError # Please triage this failure
LibTest/html/Window/requestFileSystem_A02_t01: RuntimeError # Please triage this failure
LibTest/html/Window/resizeBy_A01_t01: RuntimeError # Please triage this failure
LibTest/html/Window/resizeTo_A01_t01: RuntimeError # Please triage this failure
@@ -2863,20 +2990,20 @@
[ $compiler == dart2js && $runtime == ff && !$checked ]
LayoutTests/fast/xpath/invalid-resolver_t01: RuntimeError # Please triage this failure
-[ $compiler == dart2js && $runtime == ff && $fasta ]
-LibTest/html/Window/requestFileSystem_A01_t01: Crash
-LibTest/html/Window/requestFileSystem_A01_t02: Crash
-
[ $compiler == dart2js && $runtime == ie11 ]
*: SkipByDesign # ie11 bot has not been migrated to the test matrix, co19-1 has thousands of broken tests due to breaking changes with ALL_CAPS constants.
[ $compiler == dart2js && $runtime == jsshell ]
+Language/Expressions/Await_Expressions/evaluation_throws_t05: RuntimeError
Language/Expressions/Await_Expressions/execution_t01: RuntimeError # Issue 7728, timer not supported in jsshell
Language/Expressions/Await_Expressions/execution_t02: RuntimeError # Issue 7728, timer not supported in jsshell
Language/Expressions/Await_Expressions/execution_t03: RuntimeError # Issue 7728, timer not supported in jsshell
Language/Expressions/Await_Expressions/execution_t04: RuntimeError # Issue 7728, timer not supported in jsshell
Language/Expressions/Await_Expressions/execution_t05: RuntimeError # Issue 7728, timer not supported in jsshell
Language/Expressions/Await_Expressions/execution_t06: RuntimeError # Issue 7728, timer not supported in jsshell
+Language/Expressions/Method_Invocation/Ordinary_Invocation/method_lookup_failed_t19: RuntimeError
+Language/Libraries_and_Scripts/Exports/syntax_t02: RuntimeError
+Language/Libraries_and_Scripts/Imports/syntax_t37: RuntimeError
Language/Statements/For/Asynchronous_For_in/execution_t04: RuntimeError # Issue 7728, timer not supported in jsshell
Language/Statements/Yield_and_Yield_Each/Yield/execution_async_t01: RuntimeError # Issue 7728, timer not supported in jsshell
Language/Statements/Yield_and_Yield_Each/Yield/execution_async_t04: RuntimeError # Issue 7728, timer not supported in jsshell
@@ -4087,12 +4214,6 @@
WebPlatformTest/webstorage/event_session_storagearea_t01: Pass, RuntimeError # Fails on 7.1. Please triage this failure
WebPlatformTest/webstorage/event_session_url_t01: Skip # Times out. Please triage this failure
-[ $compiler == dart2js && $runtime == safari && $fasta ]
-Language/Expressions/Await_Expressions/evaluation_throws_t05: RuntimeError
-Language/Expressions/Method_Invocation/Ordinary_Invocation/method_lookup_failed_t19: RuntimeError
-Language/Libraries_and_Scripts/Exports/syntax_t02: RuntimeError
-Language/Libraries_and_Scripts/Imports/syntax_t37: RuntimeError
-
[ $compiler == dart2js && $browser ]
LayoutTests/fast/css-generated-content/bug91547_t01: Skip # Test reloads itself. Issue 18558.
LayoutTests/fast/dom/HTMLButtonElement/change-type_t01: Skip # Test reloads itself. Issue 18558.
@@ -4262,7 +4383,7 @@
LibTest/core/Uri/Uri_A06_t03: Slow, Pass # Please triage this failure
LibTest/math/Point/operator_mult_A02_t01: RuntimeError # Issue 1533
-[ $compiler == dart2js && $checked && $fasta && $host_checked ]
+[ $compiler == dart2js && $checked && $host_checked ]
Language/Classes/Constructors/Factories/function_type_t02: RuntimeError
Language/Expressions/Instance_Creation/New/redirecting_factory_constructor_t02: RuntimeError
Language/Generics/malformed_t02: Crash
@@ -4325,141 +4446,7 @@
Language/Metadata/compilation_t11: Pass # mirrors not supported, fails for the wrong reason
WebPlatformTest/shadow-dom/testcommon: Fail # mirrors not supported
-[ $compiler == dart2js && $fasta ]
-Language/Classes/Constructors/Generative_Constructors/execution_of_an_initializer_t02: MissingCompileTimeError
-Language/Classes/Constructors/Generative_Constructors/execution_t04: Crash
-Language/Classes/Constructors/Generative_Constructors/execution_t05: Crash
-Language/Classes/Constructors/Generative_Constructors/execution_t06: Crash
-Language/Classes/Constructors/Generative_Constructors/execution_t07: Crash
-Language/Classes/Constructors/Generative_Constructors/execution_t12: Crash
-Language/Classes/Constructors/Generative_Constructors/initializing_formals_execution_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/definition_t24: 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/Assignment/expression_assignment_t07: RuntimeError
-Language/Expressions/Assignment/no_such_method_t01: RuntimeError
-Language/Expressions/Assignment/no_such_method_t02: RuntimeError
-Language/Expressions/Assignment/no_such_method_t03: RuntimeError
-Language/Expressions/Assignment/no_such_method_t04: RuntimeError
-Language/Expressions/Assignment/no_such_method_t05: RuntimeError
-Language/Expressions/Assignment/no_such_method_t06: RuntimeError
-Language/Expressions/Assignment/no_such_method_t07: RuntimeError
-Language/Expressions/Assignment/no_such_method_t08: RuntimeError
-Language/Expressions/Assignment/no_such_method_t09: RuntimeError
-Language/Expressions/Constants/bitwise_operators_t05: MissingCompileTimeError
-Language/Expressions/Constants/depending_on_itself_t03: Crash
-Language/Expressions/Constants/exception_t02: Pass
-Language/Expressions/Constants/literal_number_t01: CompileTimeError # Larger than 64 bit int
-Language/Expressions/Constants/logical_expression_t04: MissingCompileTimeError
-Language/Expressions/Constants/math_operators_t01: CompileTimeError # Larger than 64 bit int
-Language/Expressions/Constants/math_operators_t06: CompileTimeError # Larger than 64 bit int
-Language/Expressions/Function_Invocation/Unqualified_Invocation/instance_context_invocation_t04: Crash
-Language/Expressions/Method_Invocation/Ordinary_Invocation/evaluation_t08: RuntimeError
-Language/Expressions/Method_Invocation/Super_Invocation/accessible_instance_member_t02: Crash
-Language/Expressions/Method_Invocation/Super_Invocation/evaluation_t05: RuntimeError
-Language/Expressions/Method_Invocation/Super_Invocation/invocation_t02: Crash
-Language/Expressions/Null/instance_of_class_null_t01: RuntimeError
-Language/Expressions/Numbers/static_type_of_int_t01: CompileTimeError # Larger than 64 bit int
-Language/Expressions/Numbers/syntax_t10: CompileTimeError # Larger than 64 bit int
-Language/Expressions/This/placement_t04: Crash
-Language/Functions/External_Functions/not_connected_to_a_body_t01: RuntimeError
-Language/Functions/Formal_Parameters/Optional_Formals/default_value_t01: MissingCompileTimeError
-Language/Functions/Formal_Parameters/Optional_Formals/default_value_t02: MissingCompileTimeError
-Language/Libraries_and_Scripts/Imports/same_name_t10: RuntimeError
-Language/Libraries_and_Scripts/Scripts/top_level_main_t01: CompileTimeError
-Language/Metadata/before_class_t01: RuntimeError
-Language/Metadata/before_ctor_t01: RuntimeError
-Language/Metadata/before_ctor_t02: RuntimeError
-Language/Metadata/before_factory_t01: RuntimeError
-Language/Metadata/before_function_t01: RuntimeError
-Language/Metadata/before_function_t02: RuntimeError
-Language/Metadata/before_function_t03: RuntimeError
-Language/Metadata/before_function_t04: RuntimeError
-Language/Metadata/before_function_t05: RuntimeError
-Language/Metadata/before_function_t06: RuntimeError
-Language/Metadata/before_function_t07: RuntimeError
-Language/Metadata/before_param_t01: RuntimeError
-Language/Metadata/before_param_t02: RuntimeError
-Language/Metadata/before_param_t03: RuntimeError
-Language/Metadata/before_param_t04: RuntimeError
-Language/Metadata/before_param_t05: RuntimeError
-Language/Metadata/before_param_t06: RuntimeError
-Language/Metadata/before_param_t07: RuntimeError
-Language/Metadata/before_param_t08: RuntimeError
-Language/Metadata/before_variable_t02: RuntimeError
-Language/Mixins/Mixin_Application/error_t01: MissingCompileTimeError
-Language/Mixins/Mixin_Application/error_t02: MissingCompileTimeError
-Language/Mixins/Mixin_Application/syntax_t23: RuntimeError
-Language/Mixins/Mixin_Application/syntax_t24: RuntimeError
-Language/Mixins/Mixin_Application/syntax_t25: RuntimeError
-Language/Statements/Continue/async_loops_t10: Timeout
-Language/Types/Type_Void/syntax_t09: MissingCompileTimeError
-LayoutTests/fast/canvas/gradient-addColorStop-with-invalid-color_t01: Pass, RuntimeError
-LayoutTests/fast/canvas/rgba-parsing_t01: Pass, RuntimeError
-LayoutTests/fast/files/blob-parts-slice-test_t01: CompileTimeError, OK # Error if web int literal cannot be represented exactly, see http://dartbug.com/33351
-LayoutTests/fast/files/blob-slice-overflow_t01: CompileTimeError, OK # Error if web int literal cannot be represented exactly, see http://dartbug.com/33351
-LayoutTests/fast/files/blob-slice-test_t01: CompileTimeError, OK # Error if web int literal cannot be represented exactly, see http://dartbug.com/33351
-LibTest/core/Duration/Duration_A01_t01: CompileTimeError, OK # Error if web int literal cannot be represented exactly, see http://dartbug.com/33351
-LibTest/core/Duration/Duration_A02_t01: CompileTimeError, OK # Error if web int literal cannot be represented exactly, see http://dartbug.com/33351
-LibTest/core/Duration/inDays_A01_t01: CompileTimeError, OK # Error if web int literal cannot be represented exactly, see http://dartbug.com/33351
-LibTest/core/Duration/inHours_A01_t01: CompileTimeError, OK # Error if web int literal cannot be represented exactly, see http://dartbug.com/33351
-LibTest/core/Duration/inMilliseconds_A01_t01: CompileTimeError, OK # Error if web int literal cannot be represented exactly, see http://dartbug.com/33351
-LibTest/core/Duration/inMinutes_A01_t01: CompileTimeError, OK # Error if web int literal cannot be represented exactly, see http://dartbug.com/33351
-LibTest/core/Duration/inSeconds_A01_t01: CompileTimeError, OK # Error if web int literal cannot be represented exactly, see http://dartbug.com/33351
-LibTest/core/Invocation/namedArguments_A01_t01: RuntimeError
-LibTest/core/double/isInfinite_A01_t03: CompileTimeError # Larger than 64 bit int
-LibTest/core/double/operator_GE_A01_t02: CompileTimeError, OK # Error if web int literal cannot be represented exactly, see http://dartbug.com/33351
-LibTest/core/double/operator_GT_A01_t02: CompileTimeError, OK # Error if web int literal cannot be represented exactly, see http://dartbug.com/33351
-LibTest/core/double/operator_LE_A01_t02: CompileTimeError, OK # Error if web int literal cannot be represented exactly, see http://dartbug.com/33351
-LibTest/core/double/operator_LT_A01_t02: CompileTimeError, OK # Error if web int literal cannot be represented exactly, see http://dartbug.com/33351
-LibTest/core/int/abs_A01_t01: CompileTimeError # Larger than 64 bit int
-LibTest/core/int/ceilToDouble_A01_t01: CompileTimeError # Larger than 64 bit int
-LibTest/core/int/ceil_A01_t01: CompileTimeError # Larger than 64 bit int
-LibTest/core/int/floorToDouble_A01_t01: CompileTimeError # Larger than 64 bit int
-LibTest/core/int/floor_A01_t01: CompileTimeError # Larger than 64 bit int
-LibTest/core/int/hashCode_A01_t01: CompileTimeError, OK # Error if web int literal cannot be represented exactly, see http://dartbug.com/33351
-LibTest/core/int/isInfinite_A01_t01: CompileTimeError # Larger than 64 bit int
-LibTest/core/int/isNaN_A01_t01: CompileTimeError # Larger than 64 bit int
-LibTest/core/int/isNegative_A01_t01: CompileTimeError # Larger than 64 bit int
-LibTest/core/int/operator_GE_A01_t01: CompileTimeError # Larger than 64 bit int
-LibTest/core/int/operator_LE_A01_t01: CompileTimeError # Larger than 64 bit int
-LibTest/core/int/operator_division_A01_t01: CompileTimeError # Larger than 64 bit int
-LibTest/core/int/operator_multiplication_A01_t01: CompileTimeError # Larger than 64 bit int
-LibTest/core/int/operator_remainder_A01_t02: CompileTimeError # Larger than 64 bit int
-LibTest/core/int/operator_subtraction_A01_t01: CompileTimeError # Larger than 64 bit int
-LibTest/core/int/operator_truncating_division_A01_t01: CompileTimeError # Larger than 64 bit int
-LibTest/core/int/operator_unary_minus_A01_t01: CompileTimeError # Larger than 64 bit int
-LibTest/core/int/parse_A01_t01: CompileTimeError # Larger than 64 bit int
-LibTest/core/int/remainder_A01_t02: CompileTimeError # Larger than 64 bit int
-LibTest/core/int/roundToDouble_A01_t01: CompileTimeError # Larger than 64 bit int
-LibTest/core/int/round_A01_t01: CompileTimeError # Larger than 64 bit int
-LibTest/core/int/toInt_A01_t01: CompileTimeError # Larger than 64 bit int
-LibTest/core/int/truncateToDouble_A01_t01: CompileTimeError # Larger than 64 bit int
-LibTest/core/int/truncate_A01_t01: CompileTimeError # Larger than 64 bit int
-LibTest/html/HttpRequest/getAllResponseHeaders_A01_t01: Crash
-LibTest/html/HttpRequest/getResponseHeader_A01_t01: Crash
-LibTest/html/HttpRequest/getString_A01_t01: Crash
-LibTest/html/HttpRequest/request_A01_t01: Crash
-LibTest/html/HttpRequest/setRequestHeader_A01_t01: Crash
-LibTest/html/HttpRequest/statusText_A01_t01: Crash
-LibTest/html/HttpRequest/status_A01_t01: Crash
-LibTest/html/IFrameElement/contentWindow_A01_t01: Crash
-LibTest/html/Window/postMessage_A01_t02: Crash
-LibTest/html/Window/requestFileSystem_A01_t01: Crash
-LibTest/html/Window/requestFileSystem_A01_t02: Crash
-LibTest/html/Window/requestFileSystem_A02_t01: Crash
-LibTest/math/pow_A10_t01: CompileTimeError # Larger than 64 bit int
-WebPlatformTest/html/semantics/embedded-content/the-audio-element/audio_constructor_t01: RuntimeError
-
-[ $compiler == dart2js && $fasta && $host_checked ]
+[ $compiler == dart2js && $host_checked ]
Language/Classes/Constructors/Generative_Constructors/execution_t04: Crash
Language/Classes/Constructors/Generative_Constructors/execution_t05: Crash
Language/Classes/Constructors/Generative_Constructors/execution_t06: Crash
@@ -4499,70 +4486,6 @@
LibTest/html/Window/requestFileSystem_A01_t02: Crash
LibTest/html/Window/requestFileSystem_A02_t01: Crash
-[ $compiler == dart2js && $fasta && $minified ]
-Language/Expressions/Assignment/expression_assignment_failed_t01: RuntimeError
-Language/Expressions/Assignment/expression_assignment_failed_t02: RuntimeError
-Language/Expressions/Assignment/expression_assignment_value_t02: RuntimeError
-Language/Expressions/Assignment/indexed_expression_t04: RuntimeError
-Language/Expressions/Function_Invocation/Function_Expression_Invocation/property_extraction_t02: RuntimeError
-Language/Expressions/Method_Invocation/Ordinary_Invocation/method_lookup_failed_t02: RuntimeError
-Language/Expressions/Method_Invocation/Ordinary_Invocation/method_lookup_failed_t03: RuntimeError
-LibTest/core/Invocation/memberName_A01_t01: RuntimeError
-
-[ $compiler == dart2js && $fasta && !$minified ]
-Language/Expressions/Identifier_Reference/evaluation_variable_or_parameter_t02: RuntimeError
-
-[ $compiler == dart2js && !$fasta ]
-Language/Classes/Constructors/Generative_Constructors/execution_t03: RuntimeError # https://github.com/dart-lang/sdk/issues/29596
-Language/Classes/Getters/static_getter_t02: CompileTimeError # Should be fixed with unified frontend. Issue 24534
-Language/Classes/Instance_Methods/same_name_setter_t01: Fail # Issue 21201
-Language/Classes/Setters/name_t01: CompileTimeError # Issue 5023
-Language/Classes/Setters/name_t02: CompileTimeError # Issue 5023
-Language/Classes/Setters/name_t03: RuntimeError # Issue 5023
-Language/Classes/Setters/name_t07: CompileTimeError # Issue 5023
-Language/Classes/Setters/static_setter_t06: RuntimeError # Should be fixed with unified frontend. Issue 23749
-Language/Classes/Static_Methods/same_name_method_and_setter_t01: CompileTimeError # Should be fixed with unified frontend. Issue 23749
-Language/Classes/same_name_type_variable_t01: Fail # Missing CT error on class with same name a type parameter
-Language/Classes/same_name_type_variable_t02: Fail # Missing CT error on member with same name a type parameter
-Language/Classes/same_name_type_variable_t03: Fail # Missing CT error on member with same name a type parameter
-Language/Classes/same_name_type_variable_t05: Fail # Missing CT error on member with same name a type parameter
-Language/Classes/same_name_type_variable_t06: Fail # Missing CT error on member with same name a type parameter
-Language/Classes/same_name_type_variable_t08: Fail # Missing CT error on member with same name a type parameter
-Language/Classes/same_name_type_variable_t09: Fail # Missing CT error on member with same name a type parameter
-Language/Errors_and_Warnings/compile_error_t06: MissingCompileTimeError # Please triage this failure
-Language/Errors_and_Warnings/compile_error_t07: MissingCompileTimeError # Please triage this failure
-Language/Expressions/Constants/identifier_denotes_a_constant_t06: MissingCompileTimeError # Issue 26580
-Language/Expressions/Constants/identifier_denotes_a_constant_t07: MissingCompileTimeError # Issue 26580
-Language/Expressions/Instance_Creation/New/execution_t04: RuntimeError # https://github.com/dart-lang/sdk/issues/29596
-Language/Expressions/Instance_Creation/New/execution_t06: RuntimeError # https://github.com/dart-lang/sdk/issues/29596
-Language/Expressions/Maps/key_value_equals_operator_t02: CompileTimeError # Please triage this failure
-Language/Expressions/Maps/static_type_dynamic_t01: CompileTimeError # Maybe ok. Issue 17207
-Language/Functions/External_Functions/not_connected_to_a_body_t01: CompileTimeError, OK # Issue 5021
-Language/Interfaces/Superinterfaces/Inheritance_and_Overriding/same_name_method_and_getter_t01: CompileTimeError # Please triage this failure
-Language/Interfaces/Superinterfaces/Inheritance_and_Overriding/same_name_method_and_getter_t02: CompileTimeError # Please triage this failure
-Language/Libraries_and_Scripts/Imports/invalid_uri_deferred_t01/01: CompileTimeError # Please triage this failure
-Language/Libraries_and_Scripts/Scripts/top_level_main_t05: RuntimeError # Please triage this failure
-Language/Mixins/Mixin_Application/static_warning_t01: CompileTimeError # Please triage this failure
-Language/Mixins/Mixin_Application/static_warning_t02: CompileTimeError # Please triage this failure
-Language/Mixins/Mixin_Application/superinterfaces_t06: CompileTimeError # Please triage this failure
-Language/Mixins/Mixin_Application/superinterfaces_t07: CompileTimeError # Please triage this failure
-Language/Mixins/Mixin_Application/syntax_t11: CompileTimeError # Please triage this failure
-Language/Mixins/Mixin_Application/syntax_t12: CompileTimeError # Please triage this failure
-Language/Mixins/Mixin_Application/syntax_t13: CompileTimeError # Please triage this failure
-Language/Mixins/Mixin_Application/syntax_t14: CompileTimeError # Please triage this failure
-Language/Mixins/Mixin_Application/syntax_t21: CompileTimeError # Please triage this failure
-Language/Mixins/Mixin_Application/syntax_t22: CompileTimeError # Please triage this failure
-Language/Mixins/Mixin_Application/syntax_t23: CompileTimeError # Please triage this failure
-Language/Mixins/Mixin_Application/syntax_t24: CompileTimeError # Please triage this failure
-Language/Mixins/Mixin_Application/syntax_t25: CompileTimeError # Please triage this failure
-Language/Statements/Local_Function_Declaration/reference_before_declaration_t01: MissingCompileTimeError # Issue 21050
-Language/Statements/Local_Function_Declaration/reference_before_declaration_t03: MissingCompileTimeError # Issue 21050
-Language/Statements/Try/catch_scope_t01: RuntimeError # Please triage this failure
-Language/Types/Type_Void/syntax_t02: CompileTimeError # Please triage this failure
-Language/Variables/final_t01/01: CompileTimeError # co19 issue 77
-Language/Variables/final_t02/01: CompileTimeError # co19 issue 77
-Language/Variables/local_variable_t01: MissingCompileTimeError # Issue 21050
-
[ $compiler == dart2js && $jscl ]
LibTest/core/RegExp/Pattern_semantics/firstMatch_NonEmptyClassRanges_A01_t01: RuntimeError, OK # This is not rejected by V8. Issue 22200
LibTest/core/RegExp/Pattern_semantics/firstMatch_NonEmptyClassRanges_A01_t05: RuntimeError # Issue 22200
@@ -4580,7 +4503,15 @@
LibTest/core/int/toRadixString_A01_t01: RuntimeError, OK # Bad test: uses Expect.fail, Expect.throws, assumes case of result, and uses unsupported radixes.
[ $compiler == dart2js && $minified ]
+Language/Expressions/Assignment/expression_assignment_failed_t01: RuntimeError
+Language/Expressions/Assignment/expression_assignment_failed_t02: RuntimeError
+Language/Expressions/Assignment/expression_assignment_value_t02: RuntimeError
+Language/Expressions/Assignment/indexed_expression_t04: RuntimeError
+Language/Expressions/Function_Invocation/Function_Expression_Invocation/property_extraction_t02: RuntimeError
+Language/Expressions/Method_Invocation/Ordinary_Invocation/method_lookup_failed_t02: RuntimeError
+Language/Expressions/Method_Invocation/Ordinary_Invocation/method_lookup_failed_t03: RuntimeError
Language/Expressions/Property_Extraction/Getter_Access_and_Method_Extraction/no_such_method_t01: RuntimeError # Issue 32434
+LibTest/core/Invocation/memberName_A01_t01: RuntimeError
LibTest/typed_data/Float32List/runtimeType_A01_t01: Fail # co19-roll r559: Please triage this failure
LibTest/typed_data/Float32x4List/runtimeType_A01_t01: Fail # co19-roll r559: Please triage this failure
LibTest/typed_data/Float64List/runtimeType_A01_t01: Fail # co19-roll r559: Please triage this failure
@@ -4592,6 +4523,9 @@
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 && !$minified ]
+Language/Expressions/Identifier_Reference/evaluation_variable_or_parameter_t02: RuntimeError
+
[ $compiler == dart2js && $strong ]
*: SkipByDesign # co19 suite is not for strong-mode
diff --git a/tests/co19/co19-kernel.status b/tests/co19/co19-kernel.status
index 95caf2c..70c8436 100644
--- a/tests/co19/co19-kernel.status
+++ b/tests/co19/co19-kernel.status
@@ -4,8 +4,16 @@
[ $compiler == fasta ]
Language/Classes/Constructors/Generative_Constructors/final_variables_t01: CompileTimeError # Expects a warning, but this is an error in Dart 2
+Language/Expressions/Instance_Creation/New/generic_type_t01: CompileTimeError
+Language/Expressions/Instance_Creation/New/generic_type_t02: CompileTimeError
+Language/Expressions/Instance_Creation/New/generic_type_t03: CompileTimeError
+Language/Expressions/Method_Invocation/Ordinary_Invocation/function_type_t01: CompileTimeError # Expects a warning, but this is an error in Dart 2
+Language/Expressions/Method_Invocation/Ordinary_Invocation/static_type_t01: CompileTimeError # Expects a warning, but this is an error in Dart 2
Language/Functions/Formal_Parameters/Optional_Formals/default_value_t01: MissingCompileTimeError
Language/Functions/Formal_Parameters/Optional_Formals/default_value_t02: MissingCompileTimeError
+Language/Types/Parameterized_Types/arity_mismatch_t01: CompileTimeError
+Language/Types/Parameterized_Types/arity_mismatch_t05: CompileTimeError
+Language/Types/Parameterized_Types/arity_mismatch_t07: CompileTimeError
Language/Types/Type_Void/syntax_t08: MissingCompileTimeError
Language/Types/Type_Void/syntax_t09: MissingCompileTimeError
LayoutTests/*: Skip # TODO(ahe): Make dart:html available.
@@ -151,10 +159,6 @@
Language/Classes/Constructors/Factories/accessible_class_t03/01: CompileTimeError
Language/Classes/Constructors/Factories/accessible_class_t04/01: CompileTimeError
Language/Classes/Constructors/Factories/accessible_class_t04/02: CompileTimeError
-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/function_type_t02: CompileTimeError
Language/Classes/Constructors/Factories/redirecting_constructor_call_t01: CompileTimeError
Language/Classes/Constructors/Factories/redirecting_constructor_call_t02: CompileTimeError
@@ -196,7 +200,6 @@
Language/Classes/Instance_Methods/override_subtype_t04: CompileTimeError
Language/Classes/Instance_Methods/override_subtype_t05: CompileTimeError
Language/Classes/Instance_Methods/override_subtype_t06: CompileTimeError
-Language/Classes/Instance_Variables/constant_t01: MissingCompileTimeError
Language/Classes/Instance_Variables/definition_t03: CompileTimeError
Language/Classes/Setters/name_t01: CompileTimeError
Language/Classes/Setters/name_t05: CompileTimeError
@@ -573,6 +576,8 @@
Language/Expressions/Lists/static_type_t05: CompileTimeError
Language/Expressions/Lists/value_of_a_constant_list_t02: CompileTimeError
Language/Expressions/Logical_Boolean_Expressions/evaluation_form_and_t01: CompileTimeError
+Language/Expressions/Logical_Boolean_Expressions/evaluation_form_and_t02: CompileTimeError
+Language/Expressions/Logical_Boolean_Expressions/evaluation_form_or_t02: CompileTimeError
Language/Expressions/Logical_Boolean_Expressions/static_type_t02: CompileTimeError
Language/Expressions/Logical_Boolean_Expressions/syntax_t01: CompileTimeError
Language/Expressions/Logical_Boolean_Expressions/syntax_t10/01: CompileTimeError
@@ -884,6 +889,7 @@
Language/Functions/async_return_type_t01: CompileTimeError
Language/Functions/generator_return_type_t01: CompileTimeError
Language/Functions/generator_return_type_t02: CompileTimeError
+Language/Functions/implicit_return_t01: CompileTimeError
Language/Functions/syntax_t01: CompileTimeError
Language/Functions/syntax_t36: CompileTimeError
Language/Functions/syntax_t37: CompileTimeError
@@ -921,7 +927,6 @@
Language/Libraries_and_Scripts/Imports/dart_core_t04: CompileTimeError
Language/Libraries_and_Scripts/Imports/invalid_uri_deferred_t01/01: CompileTimeError
Language/Libraries_and_Scripts/Imports/invalid_uri_deferred_t02: CompileTimeError
-Language/Libraries_and_Scripts/Imports/invalid_uri_t01: MissingCompileTimeError
Language/Libraries_and_Scripts/Imports/namespace_changes_t01: CompileTimeError
Language/Libraries_and_Scripts/Imports/namespace_changes_t02: CompileTimeError
Language/Libraries_and_Scripts/Imports/namespace_changes_t03: CompileTimeError
@@ -1013,6 +1018,7 @@
Language/Statements/Continue/control_transfer_t09: CompileTimeError
Language/Statements/Continue/label_t07: MissingCompileTimeError
Language/Statements/Do/condition_type_t01: CompileTimeError
+Language/Statements/Do/condition_type_t02: CompileTimeError
Language/Statements/Do/condition_type_t03: CompileTimeError
Language/Statements/Do/execution_t03: CompileTimeError
Language/Statements/Expression_Statements/syntax_t01: CompileTimeError
@@ -1051,9 +1057,6 @@
Language/Statements/Switch/execution_case_no_default_t02: CompileTimeError
Language/Statements/Switch/execution_case_t02: CompileTimeError
Language/Statements/Switch/execution_t01: CompileTimeError
-Language/Statements/Switch/expressions_t01: MissingCompileTimeError
-Language/Statements/Switch/expressions_t02: MissingCompileTimeError
-Language/Statements/Switch/expressions_t04: MissingCompileTimeError
Language/Statements/Switch/last_statement_t01: CompileTimeError
Language/Statements/Switch/scope_t02: CompileTimeError
Language/Statements/Switch/type_t01: CompileTimeError
@@ -1110,8 +1113,14 @@
Language/Types/Static_Types/malformed_type_t05: CompileTimeError
Language/Types/Static_Types/malformed_type_t06: CompileTimeError
Language/Types/Type_Declarations/Typedef/syntax_t01: CompileTimeError
+Language/Types/Type_Void/returning_t03: CompileTimeError
+Language/Types/Type_Void/returning_t04: CompileTimeError
+Language/Types/Type_Void/returning_t05: CompileTimeError
Language/Types/Type_Void/syntax_t08: MissingCompileTimeError
Language/Types/Type_Void/syntax_t09: MissingCompileTimeError
+Language/Types/Type_Void/syntax_t09: Pass
+Language/Types/Type_Void/using_t01: CompileTimeError
+Language/Types/Type_Void/using_t02: CompileTimeError
Language/Variables/constant_variable_t01: CompileTimeError
Language/Variables/constant_variable_t02: CompileTimeError
Language/Variables/constant_variable_t03: CompileTimeError
@@ -1188,6 +1197,9 @@
LibTest/async/Zone/registerBinaryCallback_A01_t01: CompileTimeError
LibTest/async/Zone/registerCallback_A01_t01: CompileTimeError
LibTest/async/Zone/registerUnaryCallback_A01_t01: CompileTimeError
+LibTest/async/Zone/runBinaryGuarded_A01_t01: CompileTimeError
+LibTest/async/Zone/runGuarded_A01_t01: CompileTimeError
+LibTest/async/Zone/runUnaryGuarded_A01_t01: CompileTimeError
LibTest/collection/DoubleLinkedQueue/DoubleLinkedQueue_class_A01_t01: CompileTimeError
LibTest/collection/DoubleLinkedQueue/firstWhere_A02_t01: CompileTimeError
LibTest/collection/DoubleLinkedQueue/firstWhere_A03_t01: CompileTimeError
@@ -1678,8 +1690,6 @@
[ $fasta && !$strong ]
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/Generative_Constructors/execution_t03: CompileTimeError # super initializer not last
@@ -1688,7 +1698,6 @@
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/Instance_Variables/constant_t01: MissingCompileTimeError
Language/Classes/Static_Methods/declaration_t01: MissingCompileTimeError
Language/Classes/Static_Methods/same_name_method_and_setter_t01: CompileTimeError # Invalid test, see #33237
Language/Classes/Superclasses/wrong_superclass_t08: MissingCompileTimeError
@@ -1729,7 +1738,6 @@
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
diff --git a/tests/co19_2/co19_2-analyzer.status b/tests/co19_2/co19_2-analyzer.status
index 75c8e79..cbe12fd 100644
--- a/tests/co19_2/co19_2-analyzer.status
+++ b/tests/co19_2/co19_2-analyzer.status
@@ -2,32 +2,64 @@
# 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 == dart2analyzer && $strong ]
-Language/Classes/Abstract_Instance_Members/override_default_value_t01: MissingCompileTimeError # Issue 27476
-Language/Classes/Abstract_Instance_Members/override_default_value_t02: MissingCompileTimeError # Issue 27476
-Language/Classes/Abstract_Instance_Members/override_default_value_t03: MissingCompileTimeError # Issue 27476
-Language/Classes/Abstract_Instance_Members/override_default_value_t04: MissingCompileTimeError # Issue 27476
-Language/Classes/Abstract_Instance_Members/override_default_value_t05: MissingCompileTimeError # Issue 27476
-Language/Classes/Abstract_Instance_Members/same_name_static_method_in_superclass_t01: MissingCompileTimeError # Issue 27476
-Language/Classes/Abstract_Instance_Members/same_name_static_method_in_superclass_t02: MissingCompileTimeError # Issue 27476
-Language/Classes/Abstract_Instance_Members/same_name_static_method_in_superclass_t04: MissingCompileTimeError # Issue 27476
-Language/Classes/Abstract_Instance_Members/same_name_static_method_in_superclass_t05: MissingCompileTimeError # Issue 27476
-Language/Classes/Abstract_Instance_Members/same_name_static_method_in_superclass_t06: MissingCompileTimeError # Issue 27476
-Language/Classes/Getters/type_object_t01: CompileTimeError # Issue 23721
-Language/Classes/Getters/type_object_t02: CompileTimeError # Issue 23721
-Language/Classes/Instance_Methods/override_different_default_values_t01: MissingCompileTimeError # Issue 27476
-Language/Classes/Instance_Methods/override_different_default_values_t02: MissingCompileTimeError # Issue 27476
-Language/Classes/Instance_Methods/same_name_static_member_in_superclass_t01: MissingCompileTimeError # Issue 27476
+[ $compiler == dart2analyzer ]
+Language/Classes/Abstract_Instance_Members/override_default_value_t01: MissingCompileTimeError # Issue 33995
+Language/Classes/Abstract_Instance_Members/override_default_value_t02: MissingCompileTimeError # Issue 33995
+Language/Classes/Abstract_Instance_Members/override_default_value_t03: MissingCompileTimeError # Issue 33995
+Language/Classes/Abstract_Instance_Members/override_default_value_t04: MissingCompileTimeError # Issue 33995
+Language/Classes/Abstract_Instance_Members/override_default_value_t05: MissingCompileTimeError # Issue 33995
+Language/Classes/Abstract_Instance_Members/same_name_static_method_in_superclass_t01: MissingCompileTimeError # Issue 33995
+Language/Classes/Abstract_Instance_Members/same_name_static_method_in_superclass_t02: MissingCompileTimeError # Issue 33995
+Language/Classes/Abstract_Instance_Members/same_name_static_method_in_superclass_t04: MissingCompileTimeError # Issue 33995
+Language/Classes/Abstract_Instance_Members/same_name_static_method_in_superclass_t05: MissingCompileTimeError # Issue 33995
+Language/Classes/Abstract_Instance_Members/same_name_static_method_in_superclass_t06: MissingCompileTimeError # Issue 33995
+Language/Classes/Constructors/Generative_Constructors/final_variables_t01: CompileTimeError # co19 issue 155
+Language/Classes/Getters/instance_getter_t01: MissingCompileTimeError # Legal, see #33235
+Language/Classes/Getters/instance_getter_t02: MissingCompileTimeError # Legal, see #33235
+Language/Classes/Getters/instance_getter_t03: MissingCompileTimeError # Legal, see #33235
+Language/Classes/Getters/instance_getter_t04: MissingCompileTimeError # Legal, see #33235
+Language/Classes/Getters/instance_getter_t05: MissingCompileTimeError # Legal, see #33235
+Language/Classes/Getters/instance_getter_t06: MissingCompileTimeError # Legal, see #33235
+Language/Classes/Getters/type_object_t01: CompileTimeError # Issue 33995
+Language/Classes/Getters/type_object_t02: CompileTimeError # Issue 33995
+Language/Classes/Instance_Methods/Operators/return_type_t01: CompileTimeError # co19 issue 156
+Language/Classes/Instance_Methods/override_different_default_values_t01: MissingCompileTimeError # Issue 33995
+Language/Classes/Instance_Methods/override_different_default_values_t02: MissingCompileTimeError # Issue 33995
+Language/Classes/Instance_Methods/same_name_static_member_in_superclass_t01: MissingCompileTimeError # Issue 33995
Language/Classes/Instance_Methods/same_name_static_member_in_superclass_t02: MissingCompileTimeError # Issue 27476
Language/Classes/Instance_Methods/same_name_static_member_in_superclass_t04: MissingCompileTimeError # Issue 27476
Language/Classes/Instance_Methods/same_name_static_member_in_superclass_t05: MissingCompileTimeError # Issue 27476
Language/Classes/Instance_Methods/same_name_static_member_in_superclass_t06: MissingCompileTimeError # Issue 27476
Language/Classes/Instance_Methods/same_name_static_member_in_superclass_t07: MissingCompileTimeError # Issue 27476
Language/Classes/Instance_Methods/same_name_static_member_in_superclass_t09: MissingCompileTimeError # Issue 27476
+Language/Classes/Setters/instance_setter_t01: MissingCompileTimeError # Legal, see #33235
+Language/Classes/Setters/instance_setter_t02: MissingCompileTimeError # Legal, see #33235
+Language/Classes/Setters/instance_setter_t03: MissingCompileTimeError # Legal, see #33235
+Language/Classes/Setters/instance_setter_t04: MissingCompileTimeError # Legal, see #33235
+Language/Classes/Setters/instance_setter_t05: MissingCompileTimeError # Legal, see #33235
+Language/Classes/Setters/instance_setter_t06: MissingCompileTimeError # Legal, see #33235
+Language/Classes/Setters/return_type_not_void_t01: CompileTimeError # co19 issue 153
+Language/Classes/Setters/same_name_getter_different_type_t01: CompileTimeError # co19 issue 154
+Language/Classes/Setters/syntax_t04: CompileTimeError # co19 issue 153
+Language/Classes/Setters/type_object_t02: CompileTimeError # co19 issue 153
Language/Classes/method_definition_t06: MissingCompileTimeError # Please triage this failure
+Language/Enums/syntax_t08: CompileTimeError # Issue 33995
+Language/Enums/syntax_t09: CompileTimeError # Issue 33995
+Language/Errors_and_Warnings/static_warning_t01: CompileTimeError # issue #34319
+Language/Expressions/Conditional/syntax_t03: MissingCompileTimeError # Issue 33995
+Language/Expressions/Conditional/syntax_t04: MissingCompileTimeError # Issue 33995
Language/Expressions/Constants/constant_list_t02: MissingCompileTimeError # Please triage this failure
Language/Expressions/Constants/constant_map_t02: MissingCompileTimeError # Please triage this failure
+Language/Expressions/Equality/syntax_t02: MissingCompileTimeError # Issue 33995
Language/Expressions/Function_Invocation/Unqualified_Invocation/function_expr_invocation_t05: CompileTimeError # Please triage this failure
+Language/Expressions/Function_Invocation/async_cleanup_t01: CompileTimeError # Issue 33995
+Language/Expressions/Function_Invocation/async_cleanup_t02: CompileTimeError # Issue 33995
+Language/Expressions/Function_Invocation/async_cleanup_t03: CompileTimeError # Issue 33995
+Language/Expressions/Function_Invocation/async_cleanup_t04: CompileTimeError # Issue 33995
+Language/Expressions/Function_Invocation/async_cleanup_t05: CompileTimeError # Issue 33995
+Language/Expressions/Function_Invocation/async_cleanup_t06: CompileTimeError # Issue 33995
+Language/Expressions/Function_Invocation/async_cleanup_t07: CompileTimeError # Issue 33995
+Language/Expressions/Function_Invocation/async_cleanup_t08: CompileTimeError # Issue 33995
Language/Expressions/Identifier_Reference/evaluation_library_or_getter_t01: StaticWarning # Please triage this failure
Language/Expressions/Instance_Creation/Const/arguments_t03: MissingCompileTimeError # Please triage this failure
Language/Expressions/Instance_Creation/Const/parameterized_type_t01: CompileTimeError # Please triage this failure
@@ -41,6 +73,10 @@
Language/Generics/scope_t03: CompileTimeError # Please triage this failure
Language/Generics/syntax_t02: CompileTimeError # Please triage this failure
Language/Generics/syntax_t03: Crash # Issue 29388
+Language/Libraries_and_Scripts/Exports/implicit_hide_t01: MissingStaticWarning # Issue #34302
+Language/Libraries_and_Scripts/Imports/implicit_hide_t01: MissingStaticWarning # Issue #34302
+Language/Libraries_and_Scripts/Imports/implicit_hide_t02: MissingStaticWarning # Issue #34302
+Language/Libraries_and_Scripts/Imports/library_name_t01: CompileTimeError # co19 issue 152
Language/Libraries_and_Scripts/Parts/compilation_t01: MissingCompileTimeError, Pass # Please triage this failure
Language/Libraries_and_Scripts/Parts/compilation_t04: Pass, CompileTimeError, MissingCompileTimeError # Please triage this failure
Language/Libraries_and_Scripts/Parts/compilation_t15: CompileTimeError, Pass # Please triage this failure
@@ -60,18 +96,74 @@
Language/Mixins/Mixin_Application/warning_t03: CompileTimeError # Issue 23878
Language/Mixins/declaring_constructor_t05: MissingCompileTimeError # Issue 24767
Language/Mixins/declaring_constructor_t06: MissingCompileTimeError # Issue 24767
+Language/Statements/Continue/async_loops_t01: CompileTimeError # Issue 33995
+Language/Statements/Continue/async_loops_t02: CompileTimeError # Issue 33995
+Language/Statements/Continue/async_loops_t03: CompileTimeError # Issue 33995
+Language/Statements/Continue/async_loops_t04: CompileTimeError # Issue 33995
+Language/Statements/Continue/async_loops_t05: CompileTimeError # Issue 33995
+Language/Statements/Continue/async_loops_t06: CompileTimeError # Issue 33995
+Language/Statements/Continue/async_loops_t07: CompileTimeError # Issue 33995
+Language/Statements/Continue/async_loops_t08: CompileTimeError # Issue 33995
+Language/Statements/Continue/async_loops_t09: CompileTimeError # Issue 33995
+Language/Statements/Continue/async_loops_t10: CompileTimeError # Issue 33995
+Language/Statements/Continue/control_transfer_t08: CompileTimeError # Issue 33995
+Language/Statements/Continue/control_transfer_t09: CompileTimeError # Issue 33995
+Language/Statements/Return/many_return_statements_t01: CompileTimeError # co19 issue 157
+Language/Statements/Return/many_return_statements_t02: CompileTimeError # issue #34319
+Language/Statements/Return/no_expression_function_t01: CompileTimeError # issue #34319
+Language/Statements/Return/no_expression_function_t02: CompileTimeError # issue #34319
+Language/Statements/Return/no_expression_function_t03: CompileTimeError # issue #34319
+Language/Statements/Return/no_expression_function_t04: CompileTimeError # issue #34319
+Language/Statements/Return/no_expression_function_t05: CompileTimeError # issue #34319
+Language/Statements/Return/no_expression_function_t07: CompileTimeError # issue #34319
+Language/Statements/Return/no_expression_function_t08: CompileTimeError # issue #34319
+Language/Statements/Return/no_expression_function_t09: CompileTimeError # issue #34319
+Language/Statements/Return/no_expression_function_t10: CompileTimeError # issue #34319
+Language/Statements/Return/no_expression_function_t11: CompileTimeError # issue #34319
+Language/Statements/Return/no_expression_function_t16: CompileTimeError # issue #34319
+Language/Statements/Return/no_expression_not_function_t01: CompileTimeError # issue #34319
Language/Types/Interface_Types/subtype_t30: CompileTimeError # Please triage this failure
+Language/Types/Type_Void/syntax_t08: MissingCompileTimeError # Issue 33995
Language/Types/Type_Void/syntax_t09: CompileTimeError # Please triage this failure
Language/Types/Type_Void/using_t02: CompileTimeError # Please triage this failure
-Language/Variables/final_or_static_initialization_t01: MissingCompileTimeError # Issue 27510
-Language/Variables/final_or_static_initialization_t02: MissingCompileTimeError # Issue 27510
-Language/Variables/final_or_static_initialization_t03: MissingCompileTimeError # Issue 27510
+LanguageFeatures/Instantiate-to-bound/Callable/Callable_named_extends_neg_assign_l1_t03: MissingCompileTimeError # Issue 34087
+LanguageFeatures/Instantiate-to-bound/Callable/Callable_named_extends_neg_assign_l1_t04: MissingCompileTimeError # Issue 34087
+LanguageFeatures/Instantiate-to-bound/Callable/Callable_named_extends_neg_assign_l1_t05: MissingCompileTimeError # Issue 34087
+LanguageFeatures/Instantiate-to-bound/Callable/Callable_named_extends_neg_assign_l1_t06: MissingCompileTimeError # Issue 34087
+LanguageFeatures/Instantiate-to-bound/Callable/Callable_named_extends_neg_assign_l1_t07: MissingCompileTimeError # Issue 34087
+LanguageFeatures/Instantiate-to-bound/Callable/Callable_named_extends_neg_assign_l1_t08: MissingCompileTimeError # Issue 34087
+LanguageFeatures/Instantiate-to-bound/Callable/Callable_named_extends_neg_assign_l1_t09: MissingCompileTimeError # Issue 34087
+LanguageFeatures/Instantiate-to-bound/Callable/Callable_named_extends_neg_assign_l1_t10: MissingCompileTimeError # Issue 34087
+LanguageFeatures/Instantiate-to-bound/Callable/Callable_named_extends_neg_assign_l1_t11: MissingCompileTimeError # Issue 34087
+LanguageFeatures/Instantiate-to-bound/Callable/Callable_named_extends_neg_assign_l1_t12: MissingCompileTimeError # Issue 34087
+LanguageFeatures/Instantiate-to-bound/Callable/Callable_optparam_extends_neg_assign_l1_t03: MissingCompileTimeError # Issue 34087
+LanguageFeatures/Instantiate-to-bound/Callable/Callable_optparam_extends_neg_assign_l1_t04: MissingCompileTimeError # Issue 34087
+LanguageFeatures/Instantiate-to-bound/Callable/Callable_optparam_extends_neg_assign_l1_t05: MissingCompileTimeError # Issue 34087
+LanguageFeatures/Instantiate-to-bound/Callable/Callable_optparam_extends_neg_assign_l1_t06: MissingCompileTimeError # Issue 34087
+LanguageFeatures/Instantiate-to-bound/Callable/Callable_optparam_extends_neg_assign_l1_t07: MissingCompileTimeError # Issue 34087
+LanguageFeatures/Instantiate-to-bound/Callable/Callable_optparam_extends_neg_assign_l1_t08: MissingCompileTimeError # Issue 34087
+LanguageFeatures/Instantiate-to-bound/Callable/Callable_optparam_extends_neg_assign_l1_t09: MissingCompileTimeError # Issue 34087
+LanguageFeatures/Instantiate-to-bound/Callable/Callable_optparam_extends_neg_assign_l1_t10: MissingCompileTimeError # Issue 34087
+LanguageFeatures/Instantiate-to-bound/Callable/Callable_optparam_extends_neg_assign_l1_t11: MissingCompileTimeError # Issue 34087
+LanguageFeatures/Instantiate-to-bound/Callable/Callable_optparam_extends_neg_assign_l1_t12: MissingCompileTimeError # Issue 34087
+LanguageFeatures/Instantiate-to-bound/Callable/Callable_param_extends_neg_assign_l1_t03: MissingCompileTimeError # Issue 34087
+LanguageFeatures/Instantiate-to-bound/Callable/Callable_param_extends_neg_assign_l1_t04: MissingCompileTimeError # Issue 34087
+LanguageFeatures/Instantiate-to-bound/Callable/Callable_param_extends_neg_assign_l1_t05: MissingCompileTimeError # Issue 34087
+LanguageFeatures/Instantiate-to-bound/Callable/Callable_param_extends_neg_assign_l1_t06: MissingCompileTimeError # Issue 34087
+LanguageFeatures/Instantiate-to-bound/Callable/Callable_param_extends_neg_assign_l1_t07: MissingCompileTimeError # Issue 34087
+LanguageFeatures/Instantiate-to-bound/Callable/Callable_param_extends_neg_assign_l1_t08: MissingCompileTimeError # Issue 34087
+LanguageFeatures/Instantiate-to-bound/Callable/Callable_param_extends_neg_assign_l1_t09: MissingCompileTimeError # Issue 34087
+LanguageFeatures/Instantiate-to-bound/Callable/Callable_param_extends_neg_assign_l1_t10: MissingCompileTimeError # Issue 34087
+LanguageFeatures/Instantiate-to-bound/Callable/Callable_param_extends_neg_assign_l1_t11: MissingCompileTimeError # Issue 34087
+LanguageFeatures/Instantiate-to-bound/Callable/Callable_param_extends_neg_assign_l1_t12: MissingCompileTimeError # Issue 34087
LanguageFeatures/Instantiate-to-bound/Callable/Callable_ret_extends_neg_assign_l1_t12: MissingCompileTimeError # Issue 34087
LanguageFeatures/Instantiate-to-bound/Callable/Callable_ret_extends_neg_assign_l1_t13: MissingCompileTimeError # Issue 34087
LanguageFeatures/Instantiate-to-bound/Callable/Callable_ret_extends_neg_assign_l1_t14: MissingCompileTimeError # Issue 34087
LanguageFeatures/Instantiate-to-bound/Callable/Callable_ret_extends_neg_assign_l1_t15: MissingCompileTimeError # Issue 34087
+LanguageFeatures/Instantiate-to-bound/Callable/Callable_ret_extends_neg_assign_l1_t16: MissingCompileTimeError # Issue 34087
LanguageFeatures/Instantiate-to-bound/Callable/Callable_ret_extends_neg_assign_l1_t17: MissingCompileTimeError # Issue 34087
LanguageFeatures/Instantiate-to-bound/Callable/Callable_ret_extends_neg_assign_l1_t18: MissingCompileTimeError # Issue 34087
+LanguageFeatures/Instantiate-to-bound/Callable/Callable_ret_extends_neg_assign_l1_t19: MissingCompileTimeError # Issue 34087
LanguageFeatures/Instantiate-to-bound/Callable/Callable_ret_extends_neg_assign_l1_t20: MissingCompileTimeError # Issue 34087
LanguageFeatures/Instantiate-to-bound/Callable/Callable_ret_extends_neg_assign_l1_t21: MissingCompileTimeError # Issue 34087
LanguageFeatures/Instantiate-to-bound/class/custom_extends_neg_assign_l3_t01: Crash # Issue 33152, 33477
@@ -83,21 +175,23 @@
LanguageFeatures/Instantiate-to-bound/class/custom_extends_neg_assign_l4_t05: Crash # Issue 33152, 33477
LanguageFeatures/Instantiate-to-bound/class/custom_extends_neg_assign_l4_t06: Crash # Issue 33152, 33477
LanguageFeatures/Instantiate-to-bound/class/custom_extends_neg_assign_l4_t07: Crash # Issue 33152, 33477
-LanguageFeatures/Instantiate-to-bound/function/function_named_extends_neg_assign_l1_t10: CompileTimeError # Issue 33805
-LanguageFeatures/Instantiate-to-bound/function/function_named_extends_pos_l1_t04: CompileTimeError # Issue 32903
-LanguageFeatures/Instantiate-to-bound/function/function_named_extends_pos_l1_t05: CompileTimeError # Issue 32903
-LanguageFeatures/Instantiate-to-bound/function/function_named_extends_pos_l1_t06: CompileTimeError # Issue 33864
-LanguageFeatures/Instantiate-to-bound/function/function_optparam_extends_neg_assign_l1_t10: CompileTimeError # Issue 33805
-LanguageFeatures/Instantiate-to-bound/function/function_optparam_extends_pos_l1_t04: CompileTimeError # Issue 32903
-LanguageFeatures/Instantiate-to-bound/function/function_optparam_extends_pos_l1_t05: CompileTimeError # Issue 32903
-LanguageFeatures/Instantiate-to-bound/function/function_optparam_extends_pos_l1_t06: CompileTimeError # Issue 33864
-LanguageFeatures/Instantiate-to-bound/function/function_param_extends_neg_assign_l1_t10: CompileTimeError # Issue 33805
-LanguageFeatures/Instantiate-to-bound/function/function_param_extends_pos_l1_t04: CompileTimeError # Issue 32903
-LanguageFeatures/Instantiate-to-bound/function/function_param_extends_pos_l1_t05: CompileTimeError # Issue 32903
-LanguageFeatures/Instantiate-to-bound/function/function_pos_l1_t01: CompileTimeError # Issue 33864
-LanguageFeatures/Instantiate-to-bound/function/function_ret_extends_neg_assign_l1_t01: MissingCompileTimeError # Issue 33597
-LanguageFeatures/Instantiate-to-bound/function/function_ret_extends_neg_assign_l1_t19: CompileTimeError # Issue 33597
-LanguageFeatures/Instantiate-to-bound/interface/interface_neg_assign_l2_t01: MissingCompileTimeError # Issue 33308
+LanguageFeatures/Instantiate-to-bound/class/custom_extends_neg_l1_t04: MissingCompileTimeError # Issue 33995--use-fasta-parser
+LanguageFeatures/Instantiate-to-bound/function/function_named_extends_neg_assign_l1_t10: CompileTimeError # Issue 33995
+LanguageFeatures/Instantiate-to-bound/function/function_named_extends_pos_l1_t04: CompileTimeError # Issue 33995
+LanguageFeatures/Instantiate-to-bound/function/function_named_extends_pos_l1_t05: CompileTimeError # Issue 33995
+LanguageFeatures/Instantiate-to-bound/function/function_named_extends_pos_l1_t06: CompileTimeError # Issue 33995
+LanguageFeatures/Instantiate-to-bound/function/function_optparam_extends_neg_assign_l1_t10: CompileTimeError # Issue 33995
+LanguageFeatures/Instantiate-to-bound/function/function_optparam_extends_pos_l1_t04: CompileTimeError # Issue 33995
+LanguageFeatures/Instantiate-to-bound/function/function_optparam_extends_pos_l1_t05: CompileTimeError # Issue 33995
+LanguageFeatures/Instantiate-to-bound/function/function_optparam_extends_pos_l1_t06: CompileTimeError # Issue 33995
+LanguageFeatures/Instantiate-to-bound/function/function_param_extends_neg_assign_l1_t10: CompileTimeError # Issue 33995
+LanguageFeatures/Instantiate-to-bound/function/function_param_extends_pos_l1_t04: CompileTimeError # Issue 33995
+LanguageFeatures/Instantiate-to-bound/function/function_param_extends_pos_l1_t05: CompileTimeError # Issue 33995
+LanguageFeatures/Instantiate-to-bound/function/function_pos_l1_t01: CompileTimeError # Issue 33995
+LanguageFeatures/Instantiate-to-bound/function/function_ret_extends_neg_assign_l1_t01: MissingCompileTimeError # Issue 33995
+LanguageFeatures/Instantiate-to-bound/function/function_ret_extends_neg_assign_l1_t19: CompileTimeError # Issue 33995
+LanguageFeatures/Instantiate-to-bound/function/function_ret_extends_neg_l1_t01: MissingCompileTimeError # Issue 33995
+LanguageFeatures/Instantiate-to-bound/interface/interface_neg_assign_l2_t01: MissingCompileTimeError # Issue 33995
LanguageFeatures/Instantiate-to-bound/interface/interface_neg_assign_l2_t02: MissingCompileTimeError # Issue 33308
LanguageFeatures/Instantiate-to-bound/mixin/mixin_neg_l1_t02: MissingCompileTimeError # Issue 33596
LanguageFeatures/Instantiate-to-bound/typedef/typedef_named_extends_neg_l1_t02: Crash # Issue 33599
@@ -107,9 +201,11 @@
LanguageFeatures/Instantiate-to-bound/typedef/typedef_optparam_extends_neg_l1_t03: MissingCompileTimeError # Issue 33597
LanguageFeatures/Instantiate-to-bound/typedef/typedef_optparam_extends_neg_l2_t01: Crash # Issue 33599
LanguageFeatures/Instantiate-to-bound/typedef/typedef_param_extends_neg_l1_t02: Crash # Issue 33599
+LanguageFeatures/Instantiate-to-bound/typedef/typedef_param_extends_neg_l1_t03: MissingCompileTimeError # Issue 33995--use-fasta-parser
LanguageFeatures/Instantiate-to-bound/typedef/typedef_param_extends_neg_l1_t04: MissingCompileTimeError # Issue 33597
LanguageFeatures/Instantiate-to-bound/typedef/typedef_param_extends_neg_l2_t01: Crash # Issue 33599
LanguageFeatures/Instantiate-to-bound/typedef/typedef_ret_extends_neg_l1_t02: Crash # Issue 33599
+LanguageFeatures/Instantiate-to-bound/typedef/typedef_ret_extends_neg_l1_t03: MissingCompileTimeError # Issue 33995
LanguageFeatures/Instantiate-to-bound/typedef/typedef_ret_extends_neg_l1_t04: MissingCompileTimeError # Issue 33597
LanguageFeatures/Instantiate-to-bound/typedef/typedef_ret_extends_neg_l2_t01: Crash # Issue 33599
LanguageFeatures/Super-bounded-types/motivation_example_A01_t01: CompileTimeError # Issue 32903
@@ -124,3 +220,23 @@
LanguageFeatures/Super-bounded-types/static_analysis_A01_t07: CompileTimeError # Issue 32903
LanguageFeatures/Super-bounded-types/static_analysis_A01_t08: CompileTimeError # Issue 32903
LanguageFeatures/Super-bounded-types/static_analysis_A01_t09: CompileTimeError # Issue 32903
+LanguageFeatures/int-to-double/arguments_binding_t01: CompileTimeError # Please triage this failure
+LanguageFeatures/int-to-double/arguments_binding_t02: CompileTimeError # Please triage this failure
+LanguageFeatures/int-to-double/assignment_class_member_t01: CompileTimeError # Please triage this failure
+LanguageFeatures/int-to-double/assignment_class_member_t02: CompileTimeError # Please triage this failure
+LanguageFeatures/int-to-double/assignment_global_variable_t01: CompileTimeError # Please triage this failure
+LanguageFeatures/int-to-double/assignment_global_variable_t02: CompileTimeError # Please triage this failure
+LanguageFeatures/int-to-double/assignment_local_variable_t01: CompileTimeError # Please triage this failure
+LanguageFeatures/int-to-double/assignment_local_variable_t02: CompileTimeError # Please triage this failure
+LanguageFeatures/int-to-double/assignment_super_t01: CompileTimeError # Please triage this failure
+LanguageFeatures/int-to-double/assignment_super_t02: CompileTimeError # Please triage this failure
+LanguageFeatures/int-to-double/assignment_this_t01: CompileTimeError # Please triage this failure
+LanguageFeatures/int-to-double/assignment_this_t02: CompileTimeError # Please triage this failure
+LanguageFeatures/int-to-double/max_acceptable_value_t01: CompileTimeError # Please triage this failure
+LanguageFeatures/int-to-double/min_acceptable_values_t01: CompileTimeError # Please triage this failure
+LanguageFeatures/int-to-double/representation_t01: CompileTimeError # Please triage this failure
+LanguageFeatures/int-to-double/representation_t02: CompileTimeError # Please triage this failure
+LanguageFeatures/int-to-double/representation_t03: CompileTimeError # Please triage this failure
+LanguageFeatures/int-to-double/representation_t04: CompileTimeError # Please triage this failure
+LanguageFeatures/int-to-double/return_value_t01: CompileTimeError # Please triage this failure
+LanguageFeatures/int-to-double/return_value_t02: CompileTimeError # Please triage this failure
diff --git a/tests/co19_2/co19_2-dart2js.status b/tests/co19_2/co19_2-dart2js.status
new file mode 100644
index 0000000..6ba2d65
--- /dev/null
+++ b/tests/co19_2/co19_2-dart2js.status
@@ -0,0 +1,7990 @@
+# Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
+# for details. All rights reserved. Use of this source code is governed by a
+# BSD-style license that can be found in the LICENSE file.
+
+[ $compiler == dart2js ]
+Language/Classes/Constructors/Generative_Constructors/execution_of_a_superinitializer_t01: RuntimeError
+Language/Expressions/Assignment/null_aware_assignment_static_type_t01: RuntimeError
+Language/Expressions/Await_Expressions/evaluation_throws_t03: RuntimeError
+Language/Expressions/Booleans/Boolean_Conversion/definition_t01: RuntimeError
+Language/Expressions/Constants/literal_number_t01: CompileTimeError
+Language/Expressions/Constants/math_operators_t01: CompileTimeError
+Language/Expressions/Constants/math_operators_t06: CompileTimeError
+Language/Expressions/Function_Invocation/async_invokation_t02: RuntimeError
+Language/Expressions/Instance_Creation/New/evaluation_t19: RuntimeError
+Language/Expressions/Instance_Creation/New/evaluation_t20: RuntimeError
+Language/Expressions/Numbers/integer_size_t03: CompileTimeError
+Language/Expressions/Numbers/static_type_of_int_t01: CompileTimeError
+Language/Expressions/Object_Identity/constant_objects_t01: RuntimeError
+Language/Expressions/Object_Identity/double_t03: RuntimeError
+Language/Expressions/Object_Identity/object_t02: RuntimeError
+Language/Expressions/Shift/integer_t01: CompileTimeError
+Language/Expressions/Spawning_an_Isolate/new_isolate_t01: SkipByDesign
+Language/Functions/External_Functions/not_connected_to_a_body_t01: CompileTimeError
+Language/Libraries_and_Scripts/Parts/compilation_t03: RuntimeError
+Language/Libraries_and_Scripts/Parts/compilation_t05: RuntimeError
+Language/Libraries_and_Scripts/Scripts/top_level_syntax_t01: CompileTimeError
+Language/Metadata/before_class_t01: RuntimeError
+Language/Metadata/before_ctor_t01: RuntimeError
+Language/Metadata/before_export_t01: RuntimeError
+Language/Metadata/before_factory_t01: RuntimeError
+Language/Metadata/before_function_t05: RuntimeError
+Language/Metadata/before_function_t06: RuntimeError
+Language/Metadata/before_library_t01: RuntimeError
+Language/Metadata/before_param_t01: RuntimeError
+Language/Metadata/before_param_t02: RuntimeError
+Language/Metadata/before_param_t04: RuntimeError
+Language/Metadata/before_param_t06: RuntimeError
+Language/Metadata/before_param_t08: RuntimeError
+Language/Metadata/before_type_param_t01: RuntimeError
+Language/Metadata/before_typedef_t01: RuntimeError
+Language/Metadata/before_variable_t01: RuntimeError
+Language/Mixins/Mixin_Application/syntax_t24: RuntimeError
+Language/Statements/Assert/execution_t03: RuntimeError
+Language/Statements/Assert/execution_t08: RuntimeError
+Language/Statements/Assert/execution_t11: RuntimeError
+Language/Statements/Do/execution_t06: RuntimeError
+Language/Statements/For/For_Loop/execution_t11: RuntimeError
+Language/Statements/For/For_in/execution_t02: RuntimeError
+Language/Statements/If/condition_evaluation_t02: RuntimeError
+Language/Statements/If/condition_evaluation_t03: RuntimeError
+Language/Statements/While/execution_t02: RuntimeError
+Language/Statements/Yield_and_Yield_Each/Yield/execution_async_t02: RuntimeError
+Language/Statements/Yield_and_Yield_Each/Yield_Each/execution_sync_t05: RuntimeError
+Language/Types/Function_Types/subtype_named_args_t01: RuntimeError
+Language/Types/Function_Types/subtype_named_args_t04: RuntimeError
+Language/Types/Function_Types/subtype_named_args_t12: RuntimeError
+Language/Types/Function_Types/subtype_no_args_t04: RuntimeError
+Language/Types/Function_Types/subtype_optional_args_t03: RuntimeError
+Language/Types/Function_Types/subtype_required_args_t01: RuntimeError
+Language/Types/Function_Types/subtype_required_args_t02: RuntimeError
+Language/Types/Interface_Types/subtype_t02: RuntimeError
+Language/Types/Interface_Types/subtype_t03: RuntimeError
+Language/Types/Interface_Types/subtype_t17: RuntimeError
+Language/Types/Interface_Types/subtype_t22: RuntimeError
+Language/Types/Interface_Types/subtype_t26: RuntimeError
+Language/Types/Interface_Types/subtype_t27: Pass, Crash # Issue 34389
+Language/Types/Type_Declarations/Typedef/dynamic_param_type_t02: RuntimeError
+Language/Variables/constant_initialization_t03: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/interface_compositionality_arguments_binding_A02_t01: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/interface_compositionality_arguments_binding_A02_t02: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/interface_compositionality_arguments_binding_A02_t03: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/interface_compositionality_class_member_A02_t01: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/interface_compositionality_class_member_A02_t02: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/interface_compositionality_global_variable_A02_t01: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A51_t03: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A52_t01: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A52_t02: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A52_t03: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A53_t02: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A53_t03: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A51_t01: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A52_t01: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A52_t02: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A52_t03: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_global_variable_fail_A53_t01: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_return_value_fail_A51_t01: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_return_value_fail_A52_t01: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/positional_function_types_fail_arguments_binding_fail_A31_t03: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/positional_function_types_fail_arguments_binding_fail_A32_t03: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/positional_function_types_fail_class_member_fail_A31_t02: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/positional_function_types_fail_class_member_fail_A32_t01: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/positional_function_types_fail_global_variable_fail_A31_t01: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/positional_function_types_fail_global_variable_fail_A32_t01: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/positional_function_types_fail_return_value_fail_A31_t01: RuntimeError
+LanguageFeatures/Subtyping/static/generated/interface_compositionality_arguments_binding_A02_t02: RuntimeError
+LanguageFeatures/Subtyping/static/generated/interface_compositionality_arguments_binding_A02_t03: RuntimeError
+LayoutTests/fast/alignment/parse-align-items_t01: RuntimeError
+LayoutTests/fast/alignment/parse-align-self_t01: RuntimeError
+LayoutTests/fast/alignment/parse-justify-self_t01: RuntimeError
+LayoutTests/fast/canvas/2d.text.draw.fill.maxWidth.gradient_t01: RuntimeError, Timeout
+LayoutTests/fast/canvas/2d.text.draw.fill.maxWidth.veryLarge_t01: RuntimeError
+LayoutTests/fast/canvas/2d.text.draw.fill.maxWidth.verySmall_t01: RuntimeError
+LayoutTests/fast/canvas/alpha_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-blending-clipping_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-blending-color-over-gradient_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-blending-color-over-image_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-blending-color-over-pattern_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-blending-fill-style_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-blending-gradient-over-image_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-blending-image-over-image_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-blending-image-over-pattern_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-blending-pattern-over-color_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-blending-pattern-over-gradient_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-blending-pattern-over-pattern_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-blending-shadow_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-currentTransform_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-empty-image-pattern_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-getImageData-large-crash_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-getImageData-largeNonintegralDimensions_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-large-dimensions_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-large-fills_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-lineDash-input-sequence_t01: RuntimeError
+LayoutTests/fast/canvas/draw-custom-focus-ring_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/bad-arguments-test_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/context-attributes-alpha-depth-stencil-antialias-t01: RuntimeError
+LayoutTests/fast/canvas/webgl/draw-arrays-out-of-bounds_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/drawingbuffer-test_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/error-reporting_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/framebuffer-object-attachment_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/functions-returning-strings_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/index-validation-verifies-too-many-indices_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/index-validation_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/null-object-behaviour_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/null-uniform-location_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/object-deletion-behaviour_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-image-rgb565_t01: Timeout, Pass
+LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-image-rgba5551_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-video-rgba4444_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-video-rgba5551_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-video_t01: Timeout, Pass
+LayoutTests/fast/canvas/webgl/tex-image-and-uniform-binding-bugs_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/texImage2DImageDataTest_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/triangle_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/uniform-location_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/webgl-depth-texture_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/webgl-large-texture_t01: RuntimeError
+LayoutTests/fast/css-generated-content/pseudo-element-events_t01: RuntimeError
+LayoutTests/fast/css-generated-content/pseudo-transition_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/auto-content-resolution-rows_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/display-grid-set-get_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/flex-and-minmax-content-resolution-rows_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/grid-auto-columns-rows-get-set_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/grid-container-change-explicit-grid-recompute-child_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/grid-element-empty-row-column_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/grid-element-min-max-height_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/grid-element-padding-grid-item_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/grid-element-shrink-to-fit_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/grid-item-bad-resolution-double-span_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/grid-item-display_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/grid-item-margin-auto-columns-rows-vert-lr_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/implicit-rows-auto-resolution_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/minmax-fixed-logical-width-only_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/percent-padding-margin-resolution-grid-item_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/percent-resolution-grid-item_t01: RuntimeError
+LayoutTests/fast/css-intrinsic-dimensions/css-tables_t01: RuntimeError
+LayoutTests/fast/css-intrinsic-dimensions/intrinsic-sized-absolutes_t01: RuntimeError
+LayoutTests/fast/css-intrinsic-dimensions/tables_t01: RuntimeError
+LayoutTests/fast/css/aspect-ratio-parsing-tests_t01: RuntimeError
+LayoutTests/fast/css/checked-pseudo-selector_t01: RuntimeError
+LayoutTests/fast/css/comment-before-charset-external_t01: RuntimeError
+LayoutTests/fast/css/content/content-normal_t01: RuntimeError
+LayoutTests/fast/css/css-escaped-identifier_t01: RuntimeError
+LayoutTests/fast/css/css3-nth-tokens-style_t01: RuntimeError
+LayoutTests/fast/css/deprecated-flexbox-auto-min-size_t01: RuntimeError
+LayoutTests/fast/css/first-child-display-change-inverse_t01: RuntimeError
+LayoutTests/fast/css/fontfaceset-loadingdone_t01: RuntimeError
+LayoutTests/fast/css/getComputedStyle/computed-style-font_t01: RuntimeError
+LayoutTests/fast/css/getPropertyValue-clip_t01: RuntimeError
+LayoutTests/fast/css/id-or-class-before-stylesheet_t01: RuntimeError
+LayoutTests/fast/css/inherit-initial-shorthand-values_t01: RuntimeError
+LayoutTests/fast/css/invalid-hex-color_t01: RuntimeError
+LayoutTests/fast/css/invalidation/targeted-class-shadow-combinator_t01: RuntimeError
+LayoutTests/fast/css/link-alternate-stylesheet-2_t01: RuntimeError
+LayoutTests/fast/css/link-alternate-stylesheet-3_t01: RuntimeError
+LayoutTests/fast/css/link-alternate-stylesheet-4_t01: RuntimeError
+LayoutTests/fast/css/link-alternate-stylesheet-5_t01: RuntimeError
+LayoutTests/fast/css/link-disabled-attr-parser_t01: RuntimeError
+LayoutTests/fast/css/max-device-aspect-ratio_t01: RuntimeError
+LayoutTests/fast/css/min-device-aspect-ratio_t01: RuntimeError
+LayoutTests/fast/css/parsing-at-rule-recovery_t01: RuntimeError
+LayoutTests/fast/css/parsing-css-allowed-string-characters_t01: RuntimeError
+LayoutTests/fast/css/parsing-selector-error-recovery_t01: RuntimeError
+LayoutTests/fast/css/percent-width-img-src-change_t01: Timeout, Pass
+LayoutTests/fast/css/readonly-pseudoclass-opera-001_t01: RuntimeError
+LayoutTests/fast/css/readonly-pseudoclass-opera-002_t01: RuntimeError
+LayoutTests/fast/css/style-scoped/style-scoped-nested_t01: RuntimeError
+LayoutTests/fast/css/stylesheet-enable-first-alternate-on-load-link_t01: RuntimeError
+LayoutTests/fast/css/stylesheet-enable-second-alternate-link_t01: RuntimeError
+LayoutTests/fast/css/webkit-keyframes-errors_t01: RuntimeError
+LayoutTests/fast/css3-text/css3-text-decoration/getComputedStyle/getComputedStyle-text-decoration-color_t01: RuntimeError
+LayoutTests/fast/css3-text/css3-text-indent/getComputedStyle/getComputedStyle-text-indent_t01: RuntimeError
+LayoutTests/fast/css3-text/css3-text-justify/getComputedStyle/getComputedStyle-text-justify_t01: RuntimeError
+LayoutTests/fast/dom/52776_t01: RuntimeError
+LayoutTests/fast/dom/Document/CaretRangeFromPoint/basic_t01: RuntimeError
+LayoutTests/fast/dom/Document/CaretRangeFromPoint/hittest-relative-to-viewport_t01: RuntimeError
+LayoutTests/fast/dom/Document/createElementNS-namespace-err_t01: RuntimeError
+LayoutTests/fast/dom/Document/document-title-get_t01: RuntimeError
+LayoutTests/fast/dom/Element/setAttributeNS-namespace-err_t01: RuntimeError
+LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-hash_t01: RuntimeError
+LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-hostname_t01: RuntimeError
+LayoutTests/fast/dom/HTMLDialogElement/dialog-autofocus_t01: RuntimeError
+LayoutTests/fast/dom/HTMLDialogElement/inert-node-is-unfocusable_t01: RuntimeError
+LayoutTests/fast/dom/HTMLDialogElement/non-anchored-dialog-positioning_t01: RuntimeError
+LayoutTests/fast/dom/HTMLDialogElement/show-modal-focusing-steps_t01: RuntimeError
+LayoutTests/fast/dom/HTMLElement/insertAdjacentHTML-errors_t01: RuntimeError
+LayoutTests/fast/dom/HTMLElement/set-inner-outer-optimization_t01: RuntimeError
+LayoutTests/fast/dom/HTMLElement/spellcheck_t01: RuntimeError
+LayoutTests/fast/dom/HTMLFormElement/move-option-between-documents_t01: RuntimeError
+LayoutTests/fast/dom/HTMLImageElement/image-loading-gc_t01: Timeout, Pass
+LayoutTests/fast/dom/HTMLLinkElement/link-onerror-stylesheet-with-existent-and-non-existent-import_t01: RuntimeError
+LayoutTests/fast/dom/HTMLLinkElement/link-onload_t01: RuntimeError
+LayoutTests/fast/dom/HTMLLinkElement/onload-completion-test_t01: RuntimeError
+LayoutTests/fast/dom/HTMLLinkElement/resolve-url-on-insertion_t01: RuntimeError
+LayoutTests/fast/dom/HTMLOutputElement/dom-settable-token-list_t01: RuntimeError
+LayoutTests/fast/dom/HTMLScriptElement/async-inline-script_t01: RuntimeError
+LayoutTests/fast/dom/HTMLScriptElement/script-load-events_t01: Timeout, Pass
+LayoutTests/fast/dom/HTMLTemplateElement/custom-element-wrapper-gc_t01: RuntimeError
+LayoutTests/fast/dom/HTMLTemplateElement/innerHTML_t01: RuntimeError
+LayoutTests/fast/dom/HTMLTemplateElement/ownerDocumentXHTML_t01: RuntimeError
+LayoutTests/fast/dom/MutationObserver/observe-childList_t01: RuntimeError
+LayoutTests/fast/dom/Node/fragment-mutation_t01: RuntimeError
+LayoutTests/fast/dom/Node/initial-values_t01: RuntimeError
+LayoutTests/fast/dom/Range/insertNode-empty-fragment-crash_t01: RuntimeError
+LayoutTests/fast/dom/Range/mutation_t01: RuntimeError
+LayoutTests/fast/dom/Range/range-constructor_t01: RuntimeError
+LayoutTests/fast/dom/Range/range-expand_t01: RuntimeError
+LayoutTests/fast/dom/Range/range-insertNode-separate-endContainer_t01: RuntimeError
+LayoutTests/fast/dom/StyleSheet/css-medialist-item_t01: RuntimeError
+LayoutTests/fast/dom/StyleSheet/discarded-sheet-owner-null_t01: RuntimeError
+LayoutTests/fast/dom/Window/window-resize-contents_t01: RuntimeError
+LayoutTests/fast/dom/Window/window-resize_t01: RuntimeError
+LayoutTests/fast/dom/Window/window-scroll-arguments_t01: RuntimeError
+LayoutTests/fast/dom/attribute-namespaces-get-set_t01: RuntimeError
+LayoutTests/fast/dom/client-width-height-quirks_t01: RuntimeError
+LayoutTests/fast/dom/custom/document-register-basic_t01: RuntimeError
+LayoutTests/fast/dom/custom/document-register-svg-extends_t01: RuntimeError
+LayoutTests/fast/dom/custom/element-names_t01: RuntimeError
+LayoutTests/fast/dom/dataset-xhtml_t01: RuntimeError
+LayoutTests/fast/dom/dataset_t01: RuntimeError
+LayoutTests/fast/dom/document-importNode-arguments_t01: RuntimeError
+LayoutTests/fast/dom/image-object_t01: RuntimeError
+LayoutTests/fast/dom/option-properties_t01: RuntimeError
+LayoutTests/fast/dom/shadow/distribution-crash_t01: RuntimeError
+LayoutTests/fast/dom/shadow/distribution-update-recalcs-style_t01: RuntimeError
+LayoutTests/fast/dom/shadow/insertion-point-list-menu-crash_t01: RuntimeError
+LayoutTests/fast/dom/shadow/nested-reprojection-inconsistent_t01: RuntimeError
+LayoutTests/fast/dom/shadow/pseudoclass-update-enabled-optgroup_t01: RuntimeError
+LayoutTests/fast/dom/shadow/pseudoclass-update-enabled-option_t01: RuntimeError
+LayoutTests/fast/dom/shadow/shadow-aware-shadow-root_t01: RuntimeError
+LayoutTests/fast/dom/shadow/shadow-element-inactive_t01: RuntimeError
+LayoutTests/fast/dom/shadow/shadow-root-js-api_t01: RuntimeError
+LayoutTests/fast/dom/shadow/shadowdom-for-input-spellcheck_t01: RuntimeError
+LayoutTests/fast/dom/shadow/shadowroot-clonenode_t01: RuntimeError
+LayoutTests/fast/dom/shadow/style-sharing-styles-in-older-shadow-roots_t01: RuntimeError
+LayoutTests/fast/dynamic/crash-generated-quote_t01: RuntimeError
+LayoutTests/fast/dynamic/insertAdjacentElement_t01: RuntimeError
+LayoutTests/fast/dynamic/recursive-layout_t01: RuntimeError
+LayoutTests/fast/events/add-event-without-document_t01: RuntimeError
+LayoutTests/fast/events/clipboard-clearData_t01: RuntimeError
+LayoutTests/fast/events/clipboard-dataTransferItemList_t01: RuntimeError
+LayoutTests/fast/events/div-focus_t01: RuntimeError, Pass
+LayoutTests/fast/events/event-attributes-after-exception_t01: RuntimeError
+LayoutTests/fast/events/event-trace_t01: RuntimeError
+LayoutTests/fast/events/invalid-001_t01: RuntimeError
+LayoutTests/fast/events/invalid-004_t01: RuntimeError
+LayoutTests/fast/events/invalid-005_t01: RuntimeError
+LayoutTests/fast/events/mutation-during-replace-child-2_t01: RuntimeError
+LayoutTests/fast/events/nested-event-remove-node-crash_t01: RuntimeError
+LayoutTests/fast/events/xhr-onclick-crash_t01: RuntimeError
+LayoutTests/fast/exclusions/parsing/parsing-wrap-flow_t01: RuntimeError
+LayoutTests/fast/files/blob-close-revoke_t01: RuntimeError
+LayoutTests/fast/files/blob-parts-slice-test_t01: CompileTimeError
+LayoutTests/fast/files/blob-slice-overflow_t01: CompileTimeError
+LayoutTests/fast/files/blob-slice-test_t01: CompileTimeError
+LayoutTests/fast/files/xhr-response-blob_t01: RuntimeError
+LayoutTests/fast/filesystem/file-writer-abort_t01: RuntimeError
+LayoutTests/fast/flexbox/flexing-overflow-scroll-item_t01: RuntimeError
+LayoutTests/fast/flexbox/intrinsic-min-width-applies-with-fixed-width_t01: RuntimeError
+LayoutTests/fast/forms/ValidityState-valueMissing-001_t01: RuntimeError
+LayoutTests/fast/forms/ValidityState-valueMissing-002_t01: RuntimeError
+LayoutTests/fast/forms/ValidityState-valueMissing-003_t01: RuntimeError
+LayoutTests/fast/forms/clone-input-with-dirty-value_t01: RuntimeError
+LayoutTests/fast/forms/datalist/datalist_t01: RuntimeError
+LayoutTests/fast/forms/date/input-valueasdate-date_t01: RuntimeError
+LayoutTests/fast/forms/datetimelocal/ValidityState-typeMismatch-datetimelocal_t01: RuntimeError
+LayoutTests/fast/forms/file/file-input-capture_t01: RuntimeError
+LayoutTests/fast/forms/form-attribute_t01: RuntimeError
+LayoutTests/fast/forms/input-width-height-attributes-without-renderer-loaded-image_t01: RuntimeError
+LayoutTests/fast/forms/menulist-disabled-selected-option_t01: RuntimeError
+LayoutTests/fast/forms/menulist-selection-reset_t01: RuntimeError
+LayoutTests/fast/forms/multiple-selected-options-innerHTML_t01: RuntimeError
+LayoutTests/fast/forms/search-popup-crasher_t01: RuntimeError
+LayoutTests/fast/forms/setrangetext_t01: RuntimeError
+LayoutTests/fast/forms/submit-form-attributes_t01: RuntimeError
+LayoutTests/fast/forms/submit-nil-value-field-assert_t01: RuntimeError
+LayoutTests/fast/forms/textarea-maxlength_t01: RuntimeError
+LayoutTests/fast/html/imports/import-element-removed-flag_t01: RuntimeError
+LayoutTests/fast/html/imports/import-events_t01: RuntimeError
+LayoutTests/fast/inline/empty-inline-before-collapsed-space_t01: RuntimeError
+LayoutTests/fast/inline/inline-with-empty-inline-children_t01: RuntimeError
+LayoutTests/fast/inline/out-of-flow-objects-and-whitespace-after-empty-inline_t01: RuntimeError
+LayoutTests/fast/lists/list-style-position-inside_t01: RuntimeError
+LayoutTests/fast/loader/scroll-position-restored-on-reload-at-load-event_t01: RuntimeError
+LayoutTests/fast/multicol/break-properties_t01: RuntimeError
+LayoutTests/fast/multicol/cssom-view_t01: Crash
+LayoutTests/fast/multicol/fixed-column-percent-logical-height-orthogonal-writing-mode_t01: RuntimeError
+LayoutTests/fast/multicol/hit-test-above-or-below_t01: RuntimeError
+LayoutTests/fast/multicol/hit-test-end-of-column-with-line-height_t01: RuntimeError
+LayoutTests/fast/parser/foster-parent-adopted_t02: RuntimeError
+LayoutTests/fast/parser/innerhtml-with-prefixed-elements_t01: RuntimeError
+LayoutTests/fast/replaced/table-percent-height-text-controls_t01: RuntimeError
+LayoutTests/fast/shapes/parsing/parsing-shape-lengths_t01: RuntimeError
+LayoutTests/fast/shapes/shape-outside-floats/shape-outside-big-box-border-radius_t01: RuntimeError
+LayoutTests/fast/shapes/shape-outside-floats/shape-outside-floats-diamond-margin-polygon_t01: RuntimeError
+LayoutTests/fast/shapes/shape-outside-floats/shape-outside-floats-ellipse-margin-left_t01: RuntimeError
+LayoutTests/fast/shapes/shape-outside-floats/shape-outside-floats-ellipse-margin-right_t01: RuntimeError
+LayoutTests/fast/shapes/shape-outside-floats/shape-outside-floats-inset-rounded-different-writing-modes-right_t01: RuntimeError
+LayoutTests/fast/speechsynthesis/speech-synthesis-utterance-uses-voice_t01: RuntimeError, Timeout
+LayoutTests/fast/speechsynthesis/speech-synthesis-voices_t01: RuntimeError
+LayoutTests/fast/storage/disallowed-storage_t01: RuntimeError
+LayoutTests/fast/sub-pixel/cssom-subpixel-precision_t01: RuntimeError
+LayoutTests/fast/table/anonymous-table-section-removed_t01: RuntimeError
+LayoutTests/fast/table/caption-orthogonal-writing-mode-sizing_t01: RuntimeError
+LayoutTests/fast/table/css-table-max-width_t01: RuntimeError
+LayoutTests/fast/table/large-shrink-wrapped-width_t01: RuntimeError
+LayoutTests/fast/table/min-width-css-inline-table_t01: RuntimeError
+LayoutTests/fast/table/min-width-html-block-table_t01: RuntimeError
+LayoutTests/fast/table/min-width-html-inline-table_t01: RuntimeError
+LayoutTests/fast/table/padding-height-and-override-height_t01: RuntimeError
+LayoutTests/fast/table/table-cell-offset-width_t01: RuntimeError
+LayoutTests/fast/text/international/thai-offsetForPosition-inside-character_t01: RuntimeError
+LayoutTests/fast/text/line-break-after-empty-inline-hebrew_t01: Crash
+LayoutTests/fast/text/line-break-after-inline-latin1_t01: Crash
+LayoutTests/fast/text/line-break-after-question-mark_t01: RuntimeError
+LayoutTests/fast/text/multiglyph-characters_t01: Crash
+LayoutTests/fast/text/remove-zero-length-run_t01: RuntimeError
+LayoutTests/fast/text/sub-pixel/text-scaling-pixel_t01: RuntimeError
+LayoutTests/fast/text/text-combine-shrink-to-fit_t01: RuntimeError
+LayoutTests/fast/url/host_t01: RuntimeError
+LayoutTests/fast/url/relative-unix_t01: RuntimeError
+LayoutTests/fast/url/segments-from-data-url_t01: RuntimeError
+LayoutTests/fast/url/trivial-segments_t01: RuntimeError
+LayoutTests/fast/url/trivial_t01: RuntimeError
+LayoutTests/fast/writing-mode/auto-sizing-orthogonal-flows_t01: RuntimeError
+LayoutTests/fast/writing-mode/flipped-blocks-hit-test-overflow-scroll_t01: RuntimeError
+LayoutTests/fast/xmlhttprequest/xmlhttprequest-responseXML-invalid-xml_t01: RuntimeError
+LayoutTests/fast/xmlhttprequest/xmlhttprequest-responseXML-xml-document-responsetype_t01: RuntimeError
+LayoutTests/fast/xmlhttprequest/xmlhttprequest-responsetype-arraybuffer_t01: RuntimeError
+LayoutTests/fast/xmlhttprequest/xmlhttprequest-responsetype-document_t01: RuntimeError
+LayoutTests/fast/xpath/4XPath/Borrowed/cz_20030217_t01: RuntimeError
+LayoutTests/fast/xpath/4XPath/Borrowed/namespace-nodes_t01: RuntimeError
+LayoutTests/fast/xpath/4XPath/Core/test_core_functions_t01: RuntimeError
+LayoutTests/fast/xpath/4XPath/Core/test_core_functions_t02: RuntimeError
+LayoutTests/fast/xpath/4XPath/Core/test_node_test_t01: RuntimeError
+LayoutTests/fast/xpath/attr-namespace_t02: RuntimeError
+LayoutTests/fast/xpath/node-name-case-sensitivity_t01: RuntimeError
+LayoutTests/fast/xpath/position_t01: RuntimeError
+LayoutTests/fast/xpath/py-dom-xpath/abbreviations_t01: RuntimeError
+LayoutTests/fast/xpath/py-dom-xpath/axes_t01: RuntimeError
+LayoutTests/fast/xpath/py-dom-xpath/data_t01: RuntimeError
+LayoutTests/fast/xpath/py-dom-xpath/paths_t01: RuntimeError
+LayoutTests/fast/xpath/reverse-axes_t01: RuntimeError
+LibTest/async/Stream/Stream.fromFutures_A04_t03: RuntimeError
+LibTest/async/Stream/Stream.periodic_A02_t01: RuntimeError
+LibTest/async/Stream/Stream.periodic_A03_t01: RuntimeError
+LibTest/async/StreamController/StreamController_A03_t03: RuntimeError
+LibTest/async/StreamController/stream_A02_t02: RuntimeError
+LibTest/async/StreamController/stream_A03_t03: RuntimeError
+LibTest/async/StreamTransformer/StreamTransformer.fromHandlers_A01_t04: RuntimeError
+LibTest/async/StreamTransformer/StreamTransformer_A01_t02: RuntimeError
+LibTest/async/StreamTransformer/StreamTransformer_A01_t03: RuntimeError
+LibTest/async/StreamTransformer/StreamTransformer_A02_t01: RuntimeError
+LibTest/async/StreamTransformer/StreamTransformer_A02_t02: RuntimeError
+LibTest/collection/DoubleLinkedQueue/DoubleLinkedQueue.from_A01_t01: RuntimeError
+LibTest/collection/DoubleLinkedQueue/reduce_A01_t01: RuntimeError
+LibTest/collection/DoubleLinkedQueue/removeWhere_A02_t02: RuntimeError
+LibTest/collection/DoubleLinkedQueue/retainWhere_A02_t03: RuntimeError
+LibTest/collection/HashMap/HashMap_A06_t01: RuntimeError
+LibTest/collection/IterableMixin/IterableMixin_class_A02_t01: RuntimeError
+LibTest/collection/IterableMixin/any_A01_t02: RuntimeError
+LibTest/collection/IterableMixin/every_A02_t01: RuntimeError
+LibTest/collection/IterableMixin/first_A01_t02: RuntimeError
+LibTest/collection/IterableMixin/reduce_A01_t01: RuntimeError
+LibTest/collection/IterableMixin/single_A01_t02: RuntimeError
+LibTest/collection/IterableMixin/skipWhile_A03_t01: RuntimeError
+LibTest/collection/IterableMixin/skipWhile_A04_t01: RuntimeError
+LibTest/collection/LinkedHashSet/LinkedHashSet.from_A03_t01: RuntimeError
+LibTest/collection/LinkedHashSet/LinkedHashSet_class_A01_t01: RuntimeError
+LibTest/collection/LinkedList/LinkedList_A01_t01: RuntimeError
+LibTest/collection/LinkedList/LinkedList_class_A03_t01: RuntimeError
+LibTest/collection/LinkedList/remove_A01_t03: RuntimeError
+LibTest/collection/LinkedListEntry/insertAfter_A01_t01: RuntimeError
+LibTest/collection/LinkedListEntry/insertAfter_A01_t02: RuntimeError
+LibTest/collection/LinkedListEntry/insertAfter_A02_t03: RuntimeError
+LibTest/collection/LinkedListEntry/insertBefore_A02_t02: RuntimeError
+LibTest/collection/LinkedListEntry/insertBefore_A02_t03: RuntimeError
+LibTest/collection/LinkedListEntry/list_A01_t03: RuntimeError
+LibTest/collection/LinkedListEntry/unlink_A01_t02: RuntimeError
+LibTest/collection/LinkedListEntry/unlink_A01_t03: RuntimeError
+LibTest/collection/ListBase/ListBase_class_A01_t01: RuntimeError
+LibTest/collection/ListQueue/ListQueue_class_A01_t01: RuntimeError
+LibTest/collection/Queue/Queue.from_A01_t01: RuntimeError
+LibTest/collection/Queue/Queue_class_A01_t01: RuntimeError
+LibTest/collection/SetBase/SetBase_class_A01_t01: RuntimeError
+LibTest/collection/SetMixin/SetMixin_class_A01_t01: RuntimeError
+LibTest/collection/SplayTreeSet/SplayTreeSet_class_A01_t01: RuntimeError
+LibTest/collection/UnmodifiableListView/UnmodifiableListView_class_A01_t01: RuntimeError
+LibTest/convert/ByteConversionSink/ByteConversionSink.from_A01_t01: RuntimeError
+LibTest/convert/ByteConversionSink/ByteConversionSink_class_A01_t01: RuntimeError
+LibTest/convert/JsonCodec/encode_A01_t01: RuntimeError
+LibTest/convert/JsonCodec/encode_A01_t02: RuntimeError
+LibTest/convert/JsonCodec/encoder_A01_t01: RuntimeError
+LibTest/convert/JsonDecoder/fuse_A01_t01: RuntimeError
+LibTest/convert/JsonEncoder/convert_A01_t01: RuntimeError
+LibTest/convert/JsonUtf8Encoder/convert_A01_t01: RuntimeError
+LibTest/convert/StringConversionSink/StringConversionSink.from_A01_t01: RuntimeError
+LibTest/convert/StringConversionSink/asStringSink_A02_t01: RuntimeError
+LibTest/convert/StringConversionSink/asUtf8Sink_A02_t01: RuntimeError
+LibTest/convert/Utf8Codec/Utf8Codec_A01_t02: RuntimeError
+LibTest/convert/Utf8Codec/Utf8Codec_A01_t03: RuntimeError
+LibTest/convert/Utf8Codec/decode_A03_t01: RuntimeError
+LibTest/convert/Utf8Codec/decode_A03_t02: RuntimeError
+LibTest/convert/Utf8Decoder/Utf8Decoder_A02_t01: RuntimeError
+LibTest/convert/Utf8Decoder/Utf8Decoder_A02_t02: RuntimeError
+LibTest/core/AssertionError/toString_A01_t01: RuntimeError
+LibTest/core/DateTime/to8601String_A01_t03: RuntimeError
+LibTest/core/Duration/inMinutes_A01_t01: CompileTimeError
+LibTest/core/Expando/operator_square_brackets_A01_t03: RuntimeError
+LibTest/core/List/Iterable_A01_t01: RuntimeError
+LibTest/core/List/List_class_A01_t01: RuntimeError
+LibTest/core/RegExp/Pattern_semantics/firstMatch_CharacterEscape_A06_t02: RuntimeError
+LibTest/core/RegExp/Pattern_semantics/firstMatch_DecimalEscape_A01_t02: RuntimeError
+LibTest/core/StackOverflowError/stackTrace_A01_t01: RuntimeError
+LibTest/core/StackOverflowError/stackTrace_A01_t02: RuntimeError
+LibTest/core/String/String.fromEnvironment_A01_t01: RuntimeError
+LibTest/core/String/replaceAllMapped_A03_t01: RuntimeError
+LibTest/core/Uri/Uri.dataFromBytes_A01_t01: RuntimeError
+LibTest/core/Uri/Uri.dataFromString_A01_t02: RuntimeError
+LibTest/core/Uri/Uri.dataFromString_A01_t05: RuntimeError
+LibTest/core/Uri/Uri.dataFromString_A02_t01: RuntimeError
+LibTest/core/Uri/Uri.directory_A05_t01: RuntimeError
+LibTest/core/Uri/parse_A07_t01: RuntimeError
+LibTest/core/Uri/queryParametersAll_A01_t01: RuntimeError
+LibTest/core/Uri/queryParametersAll_A01_t02: RuntimeError
+LibTest/core/Uri/queryParametersAll_A04_t01: RuntimeError
+LibTest/core/UriData/UriData.fromString_A02_t03: RuntimeError
+LibTest/core/UriData/UriData.fromUri_A01_t03: RuntimeError
+LibTest/core/UriData/isBase64_A01_t01: RuntimeError
+LibTest/core/UriData/toString_A01_t01: RuntimeError
+LibTest/core/double/operator_LE_A01_t02: CompileTimeError
+LibTest/core/double/operator_addition_A01_t06: RuntimeError
+LibTest/core/int/abs_A01_t01: CompileTimeError
+LibTest/core/int/ceilToDouble_A01_t01: CompileTimeError
+LibTest/core/int/isEven_A01_t01: CompileTimeError
+LibTest/core/int/isNaN_A01_t01: CompileTimeError
+LibTest/core/int/operator_GT_A01_t01: CompileTimeError
+LibTest/core/int/operator_LE_A01_t01: CompileTimeError
+LibTest/core/int/operator_NOT_A01_t01: CompileTimeError
+LibTest/core/int/operator_OR_A01_t01: CompileTimeError
+LibTest/core/int/operator_division_A01_t01: CompileTimeError
+LibTest/core/int/operator_equality_A02_t01: CompileTimeError
+LibTest/core/int/operator_multiplication_A01_t01: RuntimeError
+LibTest/core/int/operator_remainder_A01_t01: CompileTimeError
+LibTest/core/int/operator_right_shift_A01_t01: RuntimeError
+LibTest/core/int/parse_A01_t01: CompileTimeError
+LibTest/core/int/parse_A01_t02: RuntimeError
+LibTest/core/int/remainder_A01_t01: CompileTimeError
+LibTest/core/int/remainder_A01_t03: RuntimeError
+LibTest/core/int/round_A01_t01: CompileTimeError
+LibTest/core/int/toDouble_A01_t01: CompileTimeError
+LibTest/core/int/toInt_A01_t01: CompileTimeError
+LibTest/core/int/truncate_A01_t01: CompileTimeError
+LibTest/html/CanvasRenderingContext2D/addEventListener_A01_t03: RuntimeError
+LibTest/html/CanvasRenderingContext2D/addEventListener_A01_t06: RuntimeError
+LibTest/html/Document/clone_A01_t01: RuntimeError
+LibTest/html/Document/clone_A01_t02: RuntimeError
+LibTest/html/Element/Element.tag_A01_t01: RuntimeError
+LibTest/html/Element/addEventListener_A01_t03: RuntimeError
+LibTest/html/Element/borderEdge_A01_t01: RuntimeError
+LibTest/html/Element/clickEvent_A01_t01: RuntimeError
+LibTest/html/Element/contentEdge_A01_t01: RuntimeError
+LibTest/html/Element/contextMenuEvent_A01_t01: RuntimeError
+LibTest/html/Element/copyEvent_A01_t01: RuntimeError
+LibTest/html/Element/cutEvent_A01_t01: RuntimeError
+LibTest/html/Element/dataset_A02_t01: RuntimeError
+LibTest/html/Element/dragEndEvent_A01_t01: RuntimeError
+LibTest/html/Element/dragEnterEvent_A01_t01: RuntimeError
+LibTest/html/Element/dragEvent_A01_t01: RuntimeError
+LibTest/html/Element/dragLeaveEvent_A01_t01: RuntimeError
+LibTest/html/Element/dragOverEvent_A01_t01: RuntimeError
+LibTest/html/Element/dragStartEvent_A01_t01: RuntimeError
+LibTest/html/Element/dropEvent_A01_t01: RuntimeError
+LibTest/html/Element/getAttributeNS_A01_t01: RuntimeError
+LibTest/html/Element/getNamespacedAttributes_A01_t01: RuntimeError
+LibTest/html/Element/isTagSupported_A01_t01: RuntimeError
+LibTest/html/Element/loadEvent_A01_t01: RuntimeError
+LibTest/html/Element/marginEdge_A01_t01: RuntimeError
+LibTest/html/Element/mouseWheelEvent_A01_t01: RuntimeError
+LibTest/html/Element/onClick_A01_t01: RuntimeError
+LibTest/html/Element/onContextMenu_A01_t01: RuntimeError
+LibTest/html/Element/onCopy_A01_t01: RuntimeError
+LibTest/html/Element/onCut_A01_t01: RuntimeError
+LibTest/html/Element/onDragEnd_A01_t01: RuntimeError
+LibTest/html/Element/onDragEnter_A01_t01: RuntimeError
+LibTest/html/Element/onDragLeave_A01_t01: RuntimeError
+LibTest/html/Element/onDragOver_A01_t01: RuntimeError
+LibTest/html/Element/onDragStart_A01_t01: RuntimeError
+LibTest/html/Element/onDrag_A01_t01: RuntimeError
+LibTest/html/Element/onDrop_A01_t01: RuntimeError
+LibTest/html/Element/onKeyDown_A01_t01: RuntimeError
+LibTest/html/Element/onKeyPress_A01_t01: RuntimeError
+LibTest/html/Element/onKeyUp_A01_t01: RuntimeError
+LibTest/html/Element/onMouseDown_A01_t01: RuntimeError
+LibTest/html/Element/onMouseEnter_A01_t01: RuntimeError
+LibTest/html/Element/onMouseLeave_A01_t01: RuntimeError
+LibTest/html/Element/onMouseMove_A01_t01: RuntimeError
+LibTest/html/Element/onMouseOut_A01_t01: RuntimeError
+LibTest/html/Element/onMouseOver_A01_t01: RuntimeError
+LibTest/html/Element/onMouseUp_A01_t01: RuntimeError
+LibTest/html/Element/onMouseWheel_A01_t01: RuntimeError
+LibTest/html/Element/onPaste_A01_t01: RuntimeError
+LibTest/html/Element/onTouchCancel_A01_t01: RuntimeError
+LibTest/html/Element/onTouchEnd_A01_t01: RuntimeError
+LibTest/html/Element/onTouchEnter_A01_t01: RuntimeError
+LibTest/html/Element/onTouchLeave_A01_t01: RuntimeError
+LibTest/html/Element/onTouchMove_A01_t01: RuntimeError
+LibTest/html/Element/onTouchStart_A01_t01: RuntimeError
+LibTest/html/Element/onTransitionEnd_A01_t01: Timeout, Pass
+LibTest/html/Element/paddingEdge_A01_t01: RuntimeError
+LibTest/html/Element/pasteEvent_A01_t01: RuntimeError
+LibTest/html/Element/previousNode_A01_t01: RuntimeError
+LibTest/html/Element/querySelectorAll_A01_t02: RuntimeError
+LibTest/html/Element/replaceWith_A01_t01: RuntimeError
+LibTest/html/Element/replaceWith_A01_t02: RuntimeError
+LibTest/html/Element/touchCancelEvent_A01_t01: RuntimeError
+LibTest/html/Element/touchEndEvent_A01_t01: RuntimeError
+LibTest/html/Element/touchEnterEvent_A01_t01: RuntimeError
+LibTest/html/Element/touchLeaveEvent_A01_t01: RuntimeError
+LibTest/html/Element/touchMoveEvent_A01_t01: RuntimeError
+LibTest/html/Element/touchStartEvent_A01_t01: RuntimeError
+LibTest/html/Element/transitionEndEvent_A01_t01: RuntimeError
+LibTest/html/Event/Event_A01_t01: RuntimeError
+LibTest/html/Event/currentTarget_A01_t01: RuntimeError
+LibTest/html/Event/defaultPrevented_A01_t01: RuntimeError
+LibTest/html/Event/eventPhase_A01_t01: RuntimeError
+LibTest/html/Event/preventDefault_A01_t01: RuntimeError
+LibTest/html/Event/stopPropagation_A01_t01: RuntimeError
+LibTest/html/Event/target_A01_t01: RuntimeError
+LibTest/html/HttpRequest/getAllResponseHeaders_A01_t01: RuntimeError
+LibTest/html/HttpRequest/getResponseHeader_A01_t01: RuntimeError
+LibTest/html/HttpRequest/getString_A01_t01: RuntimeError
+LibTest/html/HttpRequest/onError_A01_t02: Timeout, Pass
+LibTest/html/HttpRequest/readyStateChangeEvent_A01_t01: RuntimeError
+LibTest/html/HttpRequest/request_A01_t01: RuntimeError
+LibTest/html/HttpRequest/responseText_A01_t02: RuntimeError
+LibTest/html/HttpRequest/responseType_A01_t01: RuntimeError
+LibTest/html/HttpRequest/responseType_A01_t03: RuntimeError
+LibTest/html/HttpRequest/setRequestHeader_A01_t01: RuntimeError
+LibTest/html/HttpRequest/statusText_A01_t01: RuntimeError
+LibTest/html/HttpRequest/status_A01_t01: RuntimeError
+LibTest/html/HttpRequestUpload/onError_A01_t02: RuntimeError
+LibTest/html/HttpRequestUpload/onLoadEnd_A01_t01: RuntimeError
+LibTest/html/HttpRequestUpload/onLoadStart_A01_t01: RuntimeError
+LibTest/html/IFrameElement/addEventListener_A01_t03: RuntimeError
+LibTest/html/IFrameElement/appendHtml_A01_t01: RuntimeError
+LibTest/html/IFrameElement/appendHtml_A01_t02: RuntimeError
+LibTest/html/IFrameElement/attributeChanged_A01_t01: RuntimeError
+LibTest/html/IFrameElement/attributes_setter_A01_t01: RuntimeError
+LibTest/html/IFrameElement/blur_A01_t01: Timeout, Pass
+LibTest/html/IFrameElement/borderEdge_A01_t01: RuntimeError
+LibTest/html/IFrameElement/clone_A01_t02: RuntimeError
+LibTest/html/IFrameElement/contentWindow_A01_t01: RuntimeError
+LibTest/html/IFrameElement/createFragment_A01_t01: RuntimeError
+LibTest/html/IFrameElement/createFragment_A01_t02: RuntimeError
+LibTest/html/IFrameElement/createFragment_A01_t03: RuntimeError
+LibTest/html/IFrameElement/createShadowRoot_A01_t01: RuntimeError
+LibTest/html/IFrameElement/innerHtml_A01_t01: RuntimeError
+LibTest/html/IFrameElement/leftView_A01_t01: RuntimeError
+LibTest/html/IFrameElement/marginEdge_A01_t01: RuntimeError
+LibTest/html/IFrameElement/offsetTo_A01_t01: RuntimeError
+LibTest/html/IFrameElement/onClick_A01_t01: RuntimeError
+LibTest/html/IFrameElement/onContextMenu_A01_t01: RuntimeError
+LibTest/html/IFrameElement/onCopy_A01_t01: RuntimeError
+LibTest/html/IFrameElement/onCut_A01_t01: RuntimeError
+LibTest/html/IFrameElement/onDragEnd_A01_t01: RuntimeError
+LibTest/html/IFrameElement/onDragEnter_A01_t01: RuntimeError
+LibTest/html/IFrameElement/onDragLeave_A01_t01: RuntimeError
+LibTest/html/IFrameElement/onDragOver_A01_t01: RuntimeError
+LibTest/html/IFrameElement/onDragStart_A01_t01: RuntimeError
+LibTest/html/IFrameElement/onDrag_A01_t01: RuntimeError
+LibTest/html/IFrameElement/onDrop_A01_t01: RuntimeError
+LibTest/html/IFrameElement/onKeyDown_A01_t01: RuntimeError
+LibTest/html/IFrameElement/onKeyPress_A01_t01: RuntimeError
+LibTest/html/IFrameElement/onKeyUp_A01_t01: RuntimeError
+LibTest/html/IFrameElement/onMouseDown_A01_t01: RuntimeError
+LibTest/html/IFrameElement/onMouseEnter_A01_t01: RuntimeError
+LibTest/html/IFrameElement/onMouseLeave_A01_t01: RuntimeError
+LibTest/html/IFrameElement/onMouseMove_A01_t01: RuntimeError
+LibTest/html/IFrameElement/onMouseOut_A01_t01: RuntimeError
+LibTest/html/IFrameElement/onMouseOver_A01_t01: RuntimeError
+LibTest/html/IFrameElement/onMouseUp_A01_t01: RuntimeError
+LibTest/html/IFrameElement/onMouseWheel_A01_t01: RuntimeError
+LibTest/html/IFrameElement/onPaste_A01_t01: RuntimeError
+LibTest/html/IFrameElement/onTouchCancel_A01_t01: RuntimeError
+LibTest/html/IFrameElement/onTouchEnd_A01_t01: RuntimeError
+LibTest/html/IFrameElement/onTouchEnter_A01_t01: RuntimeError
+LibTest/html/IFrameElement/onTouchLeave_A01_t01: RuntimeError
+LibTest/html/IFrameElement/onTouchMove_A01_t01: RuntimeError
+LibTest/html/IFrameElement/onTouchStart_A01_t01: RuntimeError
+LibTest/html/IFrameElement/onTransitionEnd_A01_t01: RuntimeError
+LibTest/html/IFrameElement/paddingEdge_A01_t01: RuntimeError
+LibTest/html/IFrameElement/querySelector_A01_t01: RuntimeError
+LibTest/html/IFrameElement/replaceWith_A01_t01: RuntimeError
+LibTest/html/IFrameElement/setInnerHtml_A01_t01: RuntimeError
+LibTest/html/Node/append_A01_t02: RuntimeError
+LibTest/html/Node/nodes_A01_t02: RuntimeError
+LibTest/html/Node/ownerDocument_A01_t01: RuntimeError
+LibTest/html/Node/parent_A01_t01: RuntimeError
+LibTest/html/Node/previousNode_A01_t01: RuntimeError
+LibTest/html/Window/document_A01_t01: RuntimeError
+LibTest/html/Window/find_A01_t01: RuntimeError
+LibTest/html/Window/find_A03_t01: RuntimeError
+LibTest/html/Window/find_A06_t01: RuntimeError
+LibTest/html/Window/moveBy_A01_t01: RuntimeError
+LibTest/html/Window/moveTo_A01_t01: RuntimeError
+LibTest/html/Window/moveTo_A02_t01: RuntimeError
+LibTest/html/Window/postMessage_A01_t01: RuntimeError
+LibTest/html/Window/postMessage_A01_t02: RuntimeError
+LibTest/html/Window/requestFileSystem_A02_t01: RuntimeError
+LibTest/html/Window/resizeBy_A01_t01: RuntimeError
+LibTest/html/Window/resizeTo_A01_t01: RuntimeError
+LibTest/io/*: SkipByDesign # dart:io not supported.
+LibTest/isolate/*: SkipByDesign # dart:isolate not supported.
+LibTest/math/MutableRectangle/MutableRectangle_A03_t04: RuntimeError
+LibTest/math/MutableRectangle/height_A03_t02: RuntimeError
+LibTest/math/MutableRectangle/width_A03_t02: RuntimeError
+LibTest/math/Point/operator_mult_A02_t01: RuntimeError
+LibTest/math/Rectangle/Rectangle_A03_t04: RuntimeError
+LibTest/math/acos_A01_t01: RuntimeError
+LibTest/math/asin_A01_t01: RuntimeError
+LibTest/math/pow_A04_t01: RuntimeError
+LibTest/math/pow_A10_t01: CompileTimeError
+LibTest/math/pow_A14_t01: RuntimeError
+LibTest/math/pow_A16_t01: RuntimeError
+LibTest/typed_data/ByteBuffer/asByteData_A01_t01: RuntimeError
+LibTest/typed_data/ByteBuffer/asByteData_A02_t01: RuntimeError
+LibTest/typed_data/ByteBuffer/asByteData_A03_t01: RuntimeError
+LibTest/typed_data/ByteBuffer/asFloat32List_A01_t01: RuntimeError
+LibTest/typed_data/ByteBuffer/asFloat32List_A02_t01: RuntimeError
+LibTest/typed_data/ByteBuffer/asFloat32List_A03_t01: RuntimeError
+LibTest/typed_data/ByteBuffer/asFloat32x4List_A01_t01: RuntimeError
+LibTest/typed_data/ByteBuffer/asFloat32x4List_A02_t01: RuntimeError
+LibTest/typed_data/ByteBuffer/asFloat32x4List_A03_t01: RuntimeError
+LibTest/typed_data/ByteBuffer/asFloat64List_A01_t01: RuntimeError
+LibTest/typed_data/ByteBuffer/asFloat64List_A02_t01: RuntimeError
+LibTest/typed_data/ByteBuffer/asFloat64List_A03_t01: RuntimeError
+LibTest/typed_data/ByteBuffer/asFloat64x2List_A01_t01: RuntimeError
+LibTest/typed_data/ByteBuffer/asFloat64x2List_A02_t01: RuntimeError
+LibTest/typed_data/ByteBuffer/asFloat64x2List_A03_t01: RuntimeError
+LibTest/typed_data/ByteBuffer/asInt16List_A01_t01: RuntimeError
+LibTest/typed_data/ByteBuffer/asInt16List_A02_t01: RuntimeError
+LibTest/typed_data/ByteBuffer/asInt16List_A03_t01: RuntimeError
+LibTest/typed_data/ByteBuffer/asInt32List_A01_t01: RuntimeError
+LibTest/typed_data/ByteBuffer/asInt32List_A02_t01: RuntimeError
+LibTest/typed_data/ByteBuffer/asInt32List_A03_t01: RuntimeError
+LibTest/typed_data/ByteBuffer/asInt32x4List_A01_t01: RuntimeError
+LibTest/typed_data/ByteBuffer/asInt32x4List_A02_t01: RuntimeError
+LibTest/typed_data/ByteBuffer/asInt32x4List_A03_t01: RuntimeError
+LibTest/typed_data/ByteBuffer/asInt64List_A01_t01: RuntimeError
+LibTest/typed_data/ByteBuffer/asInt64List_A02_t01: RuntimeError
+LibTest/typed_data/ByteBuffer/asInt64List_A03_t01: RuntimeError
+LibTest/typed_data/ByteBuffer/asInt8List_A01_t01: RuntimeError
+LibTest/typed_data/ByteBuffer/asInt8List_A02_t01: RuntimeError
+LibTest/typed_data/ByteBuffer/asInt8List_A03_t01: RuntimeError
+LibTest/typed_data/ByteBuffer/asUint16List_A01_t01: RuntimeError
+LibTest/typed_data/ByteBuffer/asUint16List_A02_t01: RuntimeError
+LibTest/typed_data/ByteBuffer/asUint16List_A03_t01: RuntimeError
+LibTest/typed_data/ByteBuffer/asUint32List_A01_t01: RuntimeError
+LibTest/typed_data/ByteBuffer/asUint32List_A02_t01: RuntimeError
+LibTest/typed_data/ByteBuffer/asUint32List_A03_t01: RuntimeError
+LibTest/typed_data/ByteBuffer/asUint64List_A01_t01: RuntimeError
+LibTest/typed_data/ByteBuffer/asUint64List_A02_t01: RuntimeError
+LibTest/typed_data/ByteBuffer/asUint64List_A03_t01: RuntimeError
+LibTest/typed_data/ByteBuffer/asUint8ClampedList_A01_t01: RuntimeError
+LibTest/typed_data/ByteBuffer/asUint8ClampedList_A02_t01: RuntimeError
+LibTest/typed_data/ByteBuffer/asUint8ClampedList_A03_t01: RuntimeError
+LibTest/typed_data/ByteBuffer/asUint8List_A01_t01: RuntimeError
+LibTest/typed_data/ByteBuffer/asUint8List_A02_t01: RuntimeError
+LibTest/typed_data/ByteBuffer/asUint8List_A03_t01: RuntimeError
+LibTest/typed_data/ByteData/ByteData.view_A05_t01: RuntimeError
+LibTest/typed_data/ByteData/ByteData.view_A05_t02: RuntimeError
+LibTest/typed_data/ByteData/ByteData.view_A05_t03: RuntimeError
+LibTest/typed_data/ByteData/getFloat32_A02_t01: RuntimeError
+LibTest/typed_data/ByteData/getFloat32_A02_t02: RuntimeError
+LibTest/typed_data/ByteData/getFloat64_A02_t01: RuntimeError
+LibTest/typed_data/ByteData/getFloat64_A02_t02: RuntimeError
+LibTest/typed_data/ByteData/getInt16_A02_t01: RuntimeError
+LibTest/typed_data/ByteData/getInt16_A02_t02: RuntimeError
+LibTest/typed_data/ByteData/getInt32_A02_t01: RuntimeError
+LibTest/typed_data/ByteData/getInt32_A02_t02: RuntimeError
+LibTest/typed_data/ByteData/getInt64_A01_t01: CompileTimeError
+LibTest/typed_data/ByteData/getInt64_A02_t01: RuntimeError
+LibTest/typed_data/ByteData/getInt64_A02_t02: RuntimeError
+LibTest/typed_data/ByteData/getInt8_A02_t01: RuntimeError
+LibTest/typed_data/ByteData/getInt8_A02_t02: RuntimeError
+LibTest/typed_data/ByteData/getUint16_A02_t01: RuntimeError
+LibTest/typed_data/ByteData/getUint16_A02_t02: RuntimeError
+LibTest/typed_data/ByteData/getUint32_A02_t01: RuntimeError
+LibTest/typed_data/ByteData/getUint32_A02_t02: RuntimeError
+LibTest/typed_data/ByteData/getUint64_A01_t01: CompileTimeError
+LibTest/typed_data/ByteData/getUint64_A02_t01: RuntimeError
+LibTest/typed_data/ByteData/getUint64_A02_t02: RuntimeError
+LibTest/typed_data/ByteData/getUint8_A02_t01: RuntimeError
+LibTest/typed_data/ByteData/getUint8_A02_t02: RuntimeError
+LibTest/typed_data/ByteData/setFloat32_A02_t01: RuntimeError
+LibTest/typed_data/ByteData/setFloat32_A02_t02: RuntimeError
+LibTest/typed_data/ByteData/setFloat64_A02_t01: RuntimeError
+LibTest/typed_data/ByteData/setFloat64_A02_t02: RuntimeError
+LibTest/typed_data/ByteData/setInt16_A02_t01: RuntimeError
+LibTest/typed_data/ByteData/setInt16_A02_t02: RuntimeError
+LibTest/typed_data/ByteData/setInt32_A02_t01: RuntimeError
+LibTest/typed_data/ByteData/setInt32_A02_t02: RuntimeError
+LibTest/typed_data/ByteData/setInt64_A01_t01: CompileTimeError
+LibTest/typed_data/ByteData/setInt64_A02_t01: RuntimeError
+LibTest/typed_data/ByteData/setInt64_A02_t02: RuntimeError
+LibTest/typed_data/ByteData/setInt8_A02_t01: RuntimeError
+LibTest/typed_data/ByteData/setInt8_A02_t02: RuntimeError
+LibTest/typed_data/ByteData/setUint16_A02_t01: RuntimeError
+LibTest/typed_data/ByteData/setUint16_A02_t02: RuntimeError
+LibTest/typed_data/ByteData/setUint32_A02_t01: RuntimeError
+LibTest/typed_data/ByteData/setUint32_A02_t02: RuntimeError
+LibTest/typed_data/ByteData/setUint64_A01_t01: CompileTimeError
+LibTest/typed_data/ByteData/setUint64_A02_t01: RuntimeError
+LibTest/typed_data/ByteData/setUint64_A02_t02: RuntimeError
+LibTest/typed_data/ByteData/setUint8_A02_t01: RuntimeError
+LibTest/typed_data/ByteData/setUint8_A02_t02: RuntimeError
+LibTest/typed_data/Float32List/Float32List.view_A05_t01: RuntimeError
+LibTest/typed_data/Float32List/Float32List.view_A05_t02: RuntimeError
+LibTest/typed_data/Float32List/Float32List.view_A05_t03: RuntimeError
+LibTest/typed_data/Float32List/Float32List_A02_t01: RuntimeError
+LibTest/typed_data/Float32List/any_A01_t01: RuntimeError
+LibTest/typed_data/Float32List/every_A01_t01: RuntimeError
+LibTest/typed_data/Float32List/first_A01_t02: RuntimeError
+LibTest/typed_data/Float32List/fold_A01_t01: RuntimeError
+LibTest/typed_data/Float32List/join_A01_t01: RuntimeError
+LibTest/typed_data/Float32List/join_A01_t02: RuntimeError
+LibTest/typed_data/Float32List/last_A01_t02: RuntimeError
+LibTest/typed_data/Float32x4List/Float32x4List.view_A05_t01: RuntimeError
+LibTest/typed_data/Float32x4List/Float32x4List.view_A05_t02: RuntimeError
+LibTest/typed_data/Float32x4List/Float32x4List.view_A05_t03: RuntimeError
+LibTest/typed_data/Float32x4List/Float32x4List.view_A06_t01: RuntimeError
+LibTest/typed_data/Float32x4List/Float32x4List_A02_t01: RuntimeError
+LibTest/typed_data/Float32x4List/any_A01_t01: RuntimeError
+LibTest/typed_data/Float32x4List/every_A01_t01: RuntimeError
+LibTest/typed_data/Float32x4List/fold_A01_t01: RuntimeError
+LibTest/typed_data/Float32x4List/join_A01_t01: RuntimeError
+LibTest/typed_data/Float32x4List/join_A01_t02: RuntimeError
+LibTest/typed_data/Float32x4List/shuffle_A01_t01: RuntimeError
+LibTest/typed_data/Float64List/Float64List.view_A05_t01: RuntimeError
+LibTest/typed_data/Float64List/Float64List.view_A05_t02: RuntimeError
+LibTest/typed_data/Float64List/Float64List.view_A05_t03: RuntimeError
+LibTest/typed_data/Float64List/Float64List_A02_t01: RuntimeError
+LibTest/typed_data/Float64List/any_A01_t01: RuntimeError
+LibTest/typed_data/Float64List/every_A01_t01: RuntimeError
+LibTest/typed_data/Float64List/fold_A01_t01: RuntimeError
+LibTest/typed_data/Float64List/join_A01_t01: RuntimeError
+LibTest/typed_data/Float64List/join_A01_t02: RuntimeError
+LibTest/typed_data/Float64List/setAll_A04_t01: RuntimeError
+LibTest/typed_data/Float64x2List/Float64x2List.view_A05_t01: RuntimeError
+LibTest/typed_data/Float64x2List/Float64x2List.view_A05_t02: RuntimeError
+LibTest/typed_data/Float64x2List/Float64x2List.view_A05_t03: RuntimeError
+LibTest/typed_data/Float64x2List/Float64x2List.view_A06_t01: RuntimeError
+LibTest/typed_data/Float64x2List/Float64x2List_A02_t01: RuntimeError
+LibTest/typed_data/Float64x2List/fold_A01_t01: RuntimeError
+LibTest/typed_data/Float64x2List/join_A01_t01: RuntimeError
+LibTest/typed_data/Float64x2List/join_A01_t02: RuntimeError
+LibTest/typed_data/Float64x2List/setAll_A04_t01: RuntimeError
+LibTest/typed_data/Float64x2List/shuffle_A01_t01: RuntimeError
+LibTest/typed_data/Float64x2List/sort_A01_t01: RuntimeError
+LibTest/typed_data/Float64x2List/toString_A01_t01: RuntimeError
+LibTest/typed_data/Int16List/Int16List.view_A05_t01: RuntimeError
+LibTest/typed_data/Int16List/Int16List.view_A05_t02: RuntimeError
+LibTest/typed_data/Int16List/Int16List.view_A05_t03: RuntimeError
+LibTest/typed_data/Int16List/Int16List_A02_t01: RuntimeError
+LibTest/typed_data/Int16List/any_A01_t01: RuntimeError
+LibTest/typed_data/Int16List/every_A01_t01: RuntimeError
+LibTest/typed_data/Int32List/Int32List.view_A05_t01: RuntimeError
+LibTest/typed_data/Int32List/Int32List.view_A05_t02: RuntimeError
+LibTest/typed_data/Int32List/Int32List.view_A05_t03: RuntimeError
+LibTest/typed_data/Int32List/Int32List_A02_t01: RuntimeError
+LibTest/typed_data/Int32List/any_A01_t01: RuntimeError
+LibTest/typed_data/Int32List/every_A01_t01: RuntimeError
+LibTest/typed_data/Int32x4/operator_OR_A01_t01: RuntimeError
+LibTest/typed_data/Int32x4List/Int32x4List.fromList_A01_t01: RuntimeError
+LibTest/typed_data/Int32x4List/Int32x4List.fromList_A01_t02: RuntimeError
+LibTest/typed_data/Int32x4List/Int32x4List.view_A01_t01: RuntimeError
+LibTest/typed_data/Int32x4List/Int32x4List.view_A05_t01: RuntimeError
+LibTest/typed_data/Int32x4List/Int32x4List.view_A05_t02: RuntimeError
+LibTest/typed_data/Int32x4List/Int32x4List.view_A05_t03: RuntimeError
+LibTest/typed_data/Int32x4List/Int32x4List.view_A06_t01: RuntimeError
+LibTest/typed_data/Int32x4List/clear_A01_t01: RuntimeError
+LibTest/typed_data/Int32x4List/fold_A01_t01: RuntimeError
+LibTest/typed_data/Int32x4List/forEach_A01_t01: RuntimeError
+LibTest/typed_data/Int32x4List/join_A01_t01: RuntimeError
+LibTest/typed_data/Int32x4List/join_A01_t02: RuntimeError
+LibTest/typed_data/Int32x4List/lengthInBytes_A01_t01: RuntimeError
+LibTest/typed_data/Int32x4List/length_A01_t01: RuntimeError
+LibTest/typed_data/Int32x4List/offsetInBytes_A01_t01: RuntimeError
+LibTest/typed_data/Int32x4List/setAll_A04_t01: RuntimeError
+LibTest/typed_data/Int32x4List/shuffle_A01_t01: RuntimeError
+LibTest/typed_data/Int32x4List/skip_A01_t01: RuntimeError
+LibTest/typed_data/Int32x4List/skip_A02_t01: RuntimeError
+LibTest/typed_data/Int32x4List/sublist_A01_t01: RuntimeError
+LibTest/typed_data/Int32x4List/take_A01_t01: RuntimeError
+LibTest/typed_data/Int32x4List/take_A02_t01: RuntimeError
+LibTest/typed_data/Int64List/Int64List.fromList_A01_t01: CompileTimeError
+LibTest/typed_data/Int64List/Int64List.fromList_A01_t02: CompileTimeError
+LibTest/typed_data/Int64List/Int64List.view_A01_t01: CompileTimeError
+LibTest/typed_data/Int64List/Int64List.view_A01_t02: CompileTimeError
+LibTest/typed_data/Int64List/Int64List.view_A02_t01: RuntimeError
+LibTest/typed_data/Int64List/Int64List.view_A03_t01: RuntimeError
+LibTest/typed_data/Int64List/Int64List.view_A04_t01: RuntimeError
+LibTest/typed_data/Int64List/Int64List.view_A05_t01: RuntimeError
+LibTest/typed_data/Int64List/Int64List.view_A05_t02: RuntimeError
+LibTest/typed_data/Int64List/Int64List.view_A05_t03: RuntimeError
+LibTest/typed_data/Int64List/Int64List.view_A06_t01: RuntimeError
+LibTest/typed_data/Int64List/Int64List_A01_t01: RuntimeError
+LibTest/typed_data/Int64List/Int64List_A01_t02: RuntimeError
+LibTest/typed_data/Int64List/addAll_A01_t01: RuntimeError
+LibTest/typed_data/Int64List/add_A01_t01: RuntimeError
+LibTest/typed_data/Int64List/any_A01_t01: RuntimeError
+LibTest/typed_data/Int64List/asMap_A01_t01: RuntimeError
+LibTest/typed_data/Int64List/asMap_A01_t02: RuntimeError
+LibTest/typed_data/Int64List/asMap_A02_t01: RuntimeError
+LibTest/typed_data/Int64List/buffer_A01_t01: RuntimeError
+LibTest/typed_data/Int64List/buffer_A01_t02: RuntimeError
+LibTest/typed_data/Int64List/clear_A01_t01: RuntimeError
+LibTest/typed_data/Int64List/contains_A01_t01: RuntimeError
+LibTest/typed_data/Int64List/elementAt_A01_t01: RuntimeError
+LibTest/typed_data/Int64List/elementAt_A02_t01: RuntimeError
+LibTest/typed_data/Int64List/elementSizeInBytes_A01_t01: RuntimeError
+LibTest/typed_data/Int64List/elementSizeInBytes_A01_t02: RuntimeError
+LibTest/typed_data/Int64List/every_A01_t01: RuntimeError
+LibTest/typed_data/Int64List/expand_A01_t01: RuntimeError
+LibTest/typed_data/Int64List/expand_A02_t01: RuntimeError
+LibTest/typed_data/Int64List/fillRange_A01_t01: RuntimeError
+LibTest/typed_data/Int64List/fillRange_A02_t01: RuntimeError
+LibTest/typed_data/Int64List/firstWhere_A01_t01: RuntimeError
+LibTest/typed_data/Int64List/firstWhere_A02_t01: RuntimeError
+LibTest/typed_data/Int64List/firstWhere_A03_t01: RuntimeError
+LibTest/typed_data/Int64List/first_A01_t01: RuntimeError
+LibTest/typed_data/Int64List/first_A01_t02: RuntimeError
+LibTest/typed_data/Int64List/first_A02_t01: RuntimeError
+LibTest/typed_data/Int64List/first_A03_t01: RuntimeError
+LibTest/typed_data/Int64List/fold_A01_t01: RuntimeError
+LibTest/typed_data/Int64List/forEach_A01_t01: RuntimeError
+LibTest/typed_data/Int64List/getRange_A01_t01: RuntimeError
+LibTest/typed_data/Int64List/getRange_A02_t01: RuntimeError
+LibTest/typed_data/Int64List/getRange_A03_t01: RuntimeError
+LibTest/typed_data/Int64List/getRange_A04_t01: RuntimeError
+LibTest/typed_data/Int64List/hashCode_A01_t01: RuntimeError
+LibTest/typed_data/Int64List/hashCode_A01_t02: RuntimeError
+LibTest/typed_data/Int64List/indexOf_A01_t01: RuntimeError
+LibTest/typed_data/Int64List/indexOf_A01_t02: RuntimeError
+LibTest/typed_data/Int64List/indexOf_A02_t01: RuntimeError
+LibTest/typed_data/Int64List/indexOf_A03_t01: RuntimeError
+LibTest/typed_data/Int64List/insertAll_A01_t01: RuntimeError
+LibTest/typed_data/Int64List/insert_A01_t01: RuntimeError
+LibTest/typed_data/Int64List/isEmpty_A01_t01: RuntimeError
+LibTest/typed_data/Int64List/isEmpty_A01_t02: RuntimeError
+LibTest/typed_data/Int64List/isNotEmpty_A01_t01: RuntimeError
+LibTest/typed_data/Int64List/isNotEmpty_A01_t02: RuntimeError
+LibTest/typed_data/Int64List/iterator_A01_t01: RuntimeError
+LibTest/typed_data/Int64List/iterator_A01_t02: RuntimeError
+LibTest/typed_data/Int64List/iterator_current_A01_t01: RuntimeError
+LibTest/typed_data/Int64List/iterator_moveNext_A01_t01: RuntimeError
+LibTest/typed_data/Int64List/join_A01_t01: RuntimeError
+LibTest/typed_data/Int64List/join_A01_t02: RuntimeError
+LibTest/typed_data/Int64List/lastIndexOf_A01_t01: RuntimeError
+LibTest/typed_data/Int64List/lastIndexOf_A01_t02: RuntimeError
+LibTest/typed_data/Int64List/lastIndexOf_A02_t01: RuntimeError
+LibTest/typed_data/Int64List/lastIndexOf_A03_t01: RuntimeError
+LibTest/typed_data/Int64List/lastWhere_A01_t01: RuntimeError
+LibTest/typed_data/Int64List/lastWhere_A02_t01: RuntimeError
+LibTest/typed_data/Int64List/lastWhere_A03_t01: RuntimeError
+LibTest/typed_data/Int64List/last_A01_t01: RuntimeError
+LibTest/typed_data/Int64List/last_A01_t02: RuntimeError
+LibTest/typed_data/Int64List/last_A02_t01: RuntimeError
+LibTest/typed_data/Int64List/lengthInBytes_A01_t01: RuntimeError
+LibTest/typed_data/Int64List/lengthInBytes_A01_t02: RuntimeError
+LibTest/typed_data/Int64List/length_A01_t01: RuntimeError
+LibTest/typed_data/Int64List/length_A02_t01: RuntimeError
+LibTest/typed_data/Int64List/map_A01_t01: RuntimeError
+LibTest/typed_data/Int64List/map_A02_t01: RuntimeError
+LibTest/typed_data/Int64List/map_A03_t01: RuntimeError
+LibTest/typed_data/Int64List/offsetInBytes_A01_t01: RuntimeError
+LibTest/typed_data/Int64List/offsetInBytes_A01_t02: RuntimeError
+LibTest/typed_data/Int64List/operator_equality_A01_t01: RuntimeError
+LibTest/typed_data/Int64List/operator_subscript_A01_t01: RuntimeError
+LibTest/typed_data/Int64List/operator_subscript_A02_t01: RuntimeError
+LibTest/typed_data/Int64List/operator_subscripted_assignment_A01_t01: RuntimeError
+LibTest/typed_data/Int64List/operator_subscripted_assignment_A02_t01: RuntimeError
+LibTest/typed_data/Int64List/reduce_A01_t01: RuntimeError
+LibTest/typed_data/Int64List/reduce_A02_t01: RuntimeError
+LibTest/typed_data/Int64List/removeAt_A01_t01: RuntimeError
+LibTest/typed_data/Int64List/removeLast_A01_t01: RuntimeError
+LibTest/typed_data/Int64List/removeRange_A01_t01: RuntimeError
+LibTest/typed_data/Int64List/removeWhere_A01_t01: RuntimeError
+LibTest/typed_data/Int64List/remove_A01_t01: RuntimeError
+LibTest/typed_data/Int64List/replaceRange_A01_t01: RuntimeError
+LibTest/typed_data/Int64List/retainWhere_A01_t01: RuntimeError
+LibTest/typed_data/Int64List/reversed_A01_t01: RuntimeError
+LibTest/typed_data/Int64List/reversed_A01_t02: RuntimeError
+LibTest/typed_data/Int64List/runtimeType_A01_t01: RuntimeError
+LibTest/typed_data/Int64List/runtimeType_A01_t02: RuntimeError
+LibTest/typed_data/Int64List/setAll_A01_t01: RuntimeError
+LibTest/typed_data/Int64List/setAll_A02_t01: RuntimeError
+LibTest/typed_data/Int64List/setAll_A03_t01: RuntimeError
+LibTest/typed_data/Int64List/setAll_A04_t01: RuntimeError
+LibTest/typed_data/Int64List/setRange_A01_t01: RuntimeError
+LibTest/typed_data/Int64List/setRange_A02_t01: RuntimeError
+LibTest/typed_data/Int64List/setRange_A03_t01: RuntimeError
+LibTest/typed_data/Int64List/setRange_A04_t01: RuntimeError
+LibTest/typed_data/Int64List/setRange_A05_t01: RuntimeError
+LibTest/typed_data/Int64List/shuffle_A01_t01: RuntimeError
+LibTest/typed_data/Int64List/singleWhere_A01_t01: RuntimeError
+LibTest/typed_data/Int64List/singleWhere_A02_t01: RuntimeError
+LibTest/typed_data/Int64List/singleWhere_A02_t02: RuntimeError
+LibTest/typed_data/Int64List/single_A01_t01: RuntimeError
+LibTest/typed_data/Int64List/single_A01_t02: RuntimeError
+LibTest/typed_data/Int64List/single_A02_t01: RuntimeError
+LibTest/typed_data/Int64List/single_A02_t02: RuntimeError
+LibTest/typed_data/Int64List/skipWhile_A01_t01: RuntimeError
+LibTest/typed_data/Int64List/skipWhile_A02_t01: RuntimeError
+LibTest/typed_data/Int64List/skipWhile_A03_t01: RuntimeError
+LibTest/typed_data/Int64List/skipWhile_A04_t01: RuntimeError
+LibTest/typed_data/Int64List/skip_A01_t01: RuntimeError
+LibTest/typed_data/Int64List/skip_A02_t01: RuntimeError
+LibTest/typed_data/Int64List/skip_A03_t01: RuntimeError
+LibTest/typed_data/Int64List/sort_A01_t01: RuntimeError
+LibTest/typed_data/Int64List/sublist_A01_t01: RuntimeError
+LibTest/typed_data/Int64List/sublist_A02_t01: RuntimeError
+LibTest/typed_data/Int64List/sublist_A03_t01: RuntimeError
+LibTest/typed_data/Int64List/sublist_A03_t02: RuntimeError
+LibTest/typed_data/Int64List/takeWhile_A01_t01: RuntimeError
+LibTest/typed_data/Int64List/takeWhile_A02_t01: RuntimeError
+LibTest/typed_data/Int64List/takeWhile_A03_t01: RuntimeError
+LibTest/typed_data/Int64List/takeWhile_A04_t01: RuntimeError
+LibTest/typed_data/Int64List/take_A01_t01: RuntimeError
+LibTest/typed_data/Int64List/take_A02_t01: RuntimeError
+LibTest/typed_data/Int64List/take_A03_t01: RuntimeError
+LibTest/typed_data/Int64List/toList_A01_t01: RuntimeError
+LibTest/typed_data/Int64List/toList_A02_t01: RuntimeError
+LibTest/typed_data/Int64List/toList_A02_t02: RuntimeError
+LibTest/typed_data/Int64List/toSet_A01_t01: RuntimeError
+LibTest/typed_data/Int64List/toString_A01_t01: RuntimeError
+LibTest/typed_data/Int64List/where_A01_t01: RuntimeError
+LibTest/typed_data/Int64List/where_A02_t01: RuntimeError
+LibTest/typed_data/Int64List/where_A03_t01: RuntimeError
+LibTest/typed_data/Int8List/Int8List.view_A05_t01: RuntimeError
+LibTest/typed_data/Int8List/Int8List.view_A05_t02: RuntimeError
+LibTest/typed_data/Int8List/Int8List.view_A05_t03: RuntimeError
+LibTest/typed_data/Int8List/Int8List_A02_t01: RuntimeError
+LibTest/typed_data/Int8List/any_A01_t01: RuntimeError
+LibTest/typed_data/Int8List/every_A01_t01: RuntimeError
+LibTest/typed_data/Uint16List/Uint16List.view_A05_t01: RuntimeError
+LibTest/typed_data/Uint16List/Uint16List.view_A05_t02: RuntimeError
+LibTest/typed_data/Uint16List/Uint16List.view_A05_t03: RuntimeError
+LibTest/typed_data/Uint16List/Uint16List_A02_t01: RuntimeError
+LibTest/typed_data/Uint16List/any_A01_t01: RuntimeError
+LibTest/typed_data/Uint16List/every_A01_t01: RuntimeError
+LibTest/typed_data/Uint32List/Uint32List.view_A05_t01: RuntimeError
+LibTest/typed_data/Uint32List/Uint32List.view_A05_t02: RuntimeError
+LibTest/typed_data/Uint32List/Uint32List.view_A05_t03: RuntimeError
+LibTest/typed_data/Uint32List/Uint32List_A02_t01: RuntimeError
+LibTest/typed_data/Uint32List/any_A01_t01: RuntimeError
+LibTest/typed_data/Uint32List/every_A01_t01: RuntimeError
+LibTest/typed_data/Uint64List/Uint64List.fromList_A01_t01: CompileTimeError
+LibTest/typed_data/Uint64List/Uint64List.fromList_A01_t02: CompileTimeError
+LibTest/typed_data/Uint64List/Uint64List.fromList_A02_t01: CompileTimeError
+LibTest/typed_data/Uint64List/Uint64List.view_A01_t01: CompileTimeError
+LibTest/typed_data/Uint64List/Uint64List.view_A01_t02: CompileTimeError
+LibTest/typed_data/Uint64List/Uint64List.view_A02_t01: RuntimeError
+LibTest/typed_data/Uint64List/Uint64List.view_A03_t01: RuntimeError
+LibTest/typed_data/Uint64List/Uint64List.view_A04_t01: RuntimeError
+LibTest/typed_data/Uint64List/Uint64List.view_A05_t01: RuntimeError
+LibTest/typed_data/Uint64List/Uint64List.view_A05_t02: RuntimeError
+LibTest/typed_data/Uint64List/Uint64List.view_A05_t03: RuntimeError
+LibTest/typed_data/Uint64List/Uint64List.view_A06_t01: RuntimeError
+LibTest/typed_data/Uint64List/Uint64List_A01_t01: RuntimeError
+LibTest/typed_data/Uint64List/Uint64List_A01_t02: RuntimeError
+LibTest/typed_data/Uint64List/addAll_A01_t01: RuntimeError
+LibTest/typed_data/Uint64List/add_A01_t01: RuntimeError
+LibTest/typed_data/Uint64List/any_A01_t01: RuntimeError
+LibTest/typed_data/Uint64List/asMap_A01_t01: RuntimeError
+LibTest/typed_data/Uint64List/asMap_A01_t02: RuntimeError
+LibTest/typed_data/Uint64List/asMap_A02_t01: RuntimeError
+LibTest/typed_data/Uint64List/buffer_A01_t01: RuntimeError
+LibTest/typed_data/Uint64List/buffer_A01_t02: RuntimeError
+LibTest/typed_data/Uint64List/clear_A01_t01: RuntimeError
+LibTest/typed_data/Uint64List/contains_A01_t01: RuntimeError
+LibTest/typed_data/Uint64List/elementAt_A01_t01: RuntimeError
+LibTest/typed_data/Uint64List/elementAt_A02_t01: RuntimeError
+LibTest/typed_data/Uint64List/elementSizeInBytes_A01_t01: RuntimeError
+LibTest/typed_data/Uint64List/elementSizeInBytes_A01_t02: RuntimeError
+LibTest/typed_data/Uint64List/every_A01_t01: RuntimeError
+LibTest/typed_data/Uint64List/expand_A01_t01: RuntimeError
+LibTest/typed_data/Uint64List/expand_A02_t01: RuntimeError
+LibTest/typed_data/Uint64List/fillRange_A01_t01: RuntimeError
+LibTest/typed_data/Uint64List/fillRange_A02_t01: RuntimeError
+LibTest/typed_data/Uint64List/firstWhere_A01_t01: RuntimeError
+LibTest/typed_data/Uint64List/firstWhere_A02_t01: RuntimeError
+LibTest/typed_data/Uint64List/firstWhere_A03_t01: RuntimeError
+LibTest/typed_data/Uint64List/first_A01_t01: RuntimeError
+LibTest/typed_data/Uint64List/first_A01_t02: RuntimeError
+LibTest/typed_data/Uint64List/first_A02_t01: RuntimeError
+LibTest/typed_data/Uint64List/first_A03_t01: RuntimeError
+LibTest/typed_data/Uint64List/fold_A01_t01: RuntimeError
+LibTest/typed_data/Uint64List/forEach_A01_t01: RuntimeError
+LibTest/typed_data/Uint64List/getRange_A01_t01: RuntimeError
+LibTest/typed_data/Uint64List/getRange_A02_t01: RuntimeError
+LibTest/typed_data/Uint64List/getRange_A03_t01: RuntimeError
+LibTest/typed_data/Uint64List/getRange_A04_t01: RuntimeError
+LibTest/typed_data/Uint64List/hashCode_A01_t01: RuntimeError
+LibTest/typed_data/Uint64List/hashCode_A01_t02: RuntimeError
+LibTest/typed_data/Uint64List/indexOf_A01_t01: RuntimeError
+LibTest/typed_data/Uint64List/indexOf_A01_t02: RuntimeError
+LibTest/typed_data/Uint64List/indexOf_A02_t01: RuntimeError
+LibTest/typed_data/Uint64List/indexOf_A03_t01: RuntimeError
+LibTest/typed_data/Uint64List/insertAll_A01_t01: RuntimeError
+LibTest/typed_data/Uint64List/insert_A01_t01: RuntimeError
+LibTest/typed_data/Uint64List/isEmpty_A01_t01: RuntimeError
+LibTest/typed_data/Uint64List/isEmpty_A01_t02: RuntimeError
+LibTest/typed_data/Uint64List/isNotEmpty_A01_t01: RuntimeError
+LibTest/typed_data/Uint64List/isNotEmpty_A01_t02: RuntimeError
+LibTest/typed_data/Uint64List/iterator_A01_t01: RuntimeError
+LibTest/typed_data/Uint64List/iterator_A01_t02: RuntimeError
+LibTest/typed_data/Uint64List/iterator_current_A01_t01: RuntimeError
+LibTest/typed_data/Uint64List/iterator_moveNext_A01_t01: RuntimeError
+LibTest/typed_data/Uint64List/join_A01_t01: RuntimeError
+LibTest/typed_data/Uint64List/join_A01_t02: RuntimeError
+LibTest/typed_data/Uint64List/lastIndexOf_A01_t01: RuntimeError
+LibTest/typed_data/Uint64List/lastIndexOf_A01_t02: RuntimeError
+LibTest/typed_data/Uint64List/lastIndexOf_A02_t01: RuntimeError
+LibTest/typed_data/Uint64List/lastIndexOf_A03_t01: RuntimeError
+LibTest/typed_data/Uint64List/lastWhere_A01_t01: RuntimeError
+LibTest/typed_data/Uint64List/lastWhere_A02_t01: RuntimeError
+LibTest/typed_data/Uint64List/lastWhere_A03_t01: RuntimeError
+LibTest/typed_data/Uint64List/last_A01_t01: RuntimeError
+LibTest/typed_data/Uint64List/last_A01_t02: RuntimeError
+LibTest/typed_data/Uint64List/last_A02_t01: RuntimeError
+LibTest/typed_data/Uint64List/lengthInBytes_A01_t01: RuntimeError
+LibTest/typed_data/Uint64List/lengthInBytes_A01_t02: RuntimeError
+LibTest/typed_data/Uint64List/length_A01_t01: RuntimeError
+LibTest/typed_data/Uint64List/length_A02_t01: RuntimeError
+LibTest/typed_data/Uint64List/map_A01_t01: RuntimeError
+LibTest/typed_data/Uint64List/map_A02_t01: RuntimeError
+LibTest/typed_data/Uint64List/map_A03_t01: RuntimeError
+LibTest/typed_data/Uint64List/offsetInBytes_A01_t01: RuntimeError
+LibTest/typed_data/Uint64List/offsetInBytes_A01_t02: RuntimeError
+LibTest/typed_data/Uint64List/operator_equality_A01_t01: RuntimeError
+LibTest/typed_data/Uint64List/operator_subscript_A01_t01: RuntimeError
+LibTest/typed_data/Uint64List/operator_subscript_A02_t01: RuntimeError
+LibTest/typed_data/Uint64List/operator_subscripted_assignment_A01_t01: RuntimeError
+LibTest/typed_data/Uint64List/operator_subscripted_assignment_A02_t01: RuntimeError
+LibTest/typed_data/Uint64List/reduce_A01_t01: RuntimeError
+LibTest/typed_data/Uint64List/reduce_A02_t01: RuntimeError
+LibTest/typed_data/Uint64List/reduce_A03_t01: CompileTimeError
+LibTest/typed_data/Uint64List/removeAt_A01_t01: RuntimeError
+LibTest/typed_data/Uint64List/removeLast_A01_t01: RuntimeError
+LibTest/typed_data/Uint64List/removeRange_A01_t01: RuntimeError
+LibTest/typed_data/Uint64List/removeWhere_A01_t01: RuntimeError
+LibTest/typed_data/Uint64List/remove_A01_t01: RuntimeError
+LibTest/typed_data/Uint64List/replaceRange_A01_t01: RuntimeError
+LibTest/typed_data/Uint64List/retainWhere_A01_t01: RuntimeError
+LibTest/typed_data/Uint64List/reversed_A01_t01: RuntimeError
+LibTest/typed_data/Uint64List/reversed_A01_t02: RuntimeError
+LibTest/typed_data/Uint64List/runtimeType_A01_t01: RuntimeError
+LibTest/typed_data/Uint64List/runtimeType_A01_t02: RuntimeError
+LibTest/typed_data/Uint64List/setAll_A01_t01: RuntimeError
+LibTest/typed_data/Uint64List/setAll_A02_t01: RuntimeError
+LibTest/typed_data/Uint64List/setAll_A03_t01: RuntimeError
+LibTest/typed_data/Uint64List/setAll_A04_t01: RuntimeError
+LibTest/typed_data/Uint64List/setRange_A01_t01: RuntimeError
+LibTest/typed_data/Uint64List/setRange_A02_t01: RuntimeError
+LibTest/typed_data/Uint64List/setRange_A03_t01: RuntimeError
+LibTest/typed_data/Uint64List/setRange_A04_t01: RuntimeError
+LibTest/typed_data/Uint64List/setRange_A05_t01: RuntimeError
+LibTest/typed_data/Uint64List/shuffle_A01_t01: RuntimeError
+LibTest/typed_data/Uint64List/singleWhere_A01_t01: RuntimeError
+LibTest/typed_data/Uint64List/singleWhere_A02_t01: RuntimeError
+LibTest/typed_data/Uint64List/singleWhere_A02_t02: RuntimeError
+LibTest/typed_data/Uint64List/single_A01_t01: RuntimeError
+LibTest/typed_data/Uint64List/single_A01_t02: RuntimeError
+LibTest/typed_data/Uint64List/single_A02_t01: RuntimeError
+LibTest/typed_data/Uint64List/single_A02_t02: RuntimeError
+LibTest/typed_data/Uint64List/skipWhile_A01_t01: RuntimeError
+LibTest/typed_data/Uint64List/skipWhile_A02_t01: RuntimeError
+LibTest/typed_data/Uint64List/skipWhile_A03_t01: RuntimeError
+LibTest/typed_data/Uint64List/skipWhile_A04_t01: RuntimeError
+LibTest/typed_data/Uint64List/skip_A01_t01: RuntimeError
+LibTest/typed_data/Uint64List/skip_A02_t01: RuntimeError
+LibTest/typed_data/Uint64List/skip_A03_t01: RuntimeError
+LibTest/typed_data/Uint64List/sort_A01_t01: RuntimeError
+LibTest/typed_data/Uint64List/sublist_A01_t01: RuntimeError
+LibTest/typed_data/Uint64List/sublist_A02_t01: RuntimeError
+LibTest/typed_data/Uint64List/sublist_A03_t01: RuntimeError
+LibTest/typed_data/Uint64List/sublist_A03_t02: RuntimeError
+LibTest/typed_data/Uint64List/takeWhile_A01_t01: RuntimeError
+LibTest/typed_data/Uint64List/takeWhile_A02_t01: RuntimeError
+LibTest/typed_data/Uint64List/takeWhile_A03_t01: RuntimeError
+LibTest/typed_data/Uint64List/takeWhile_A04_t01: RuntimeError
+LibTest/typed_data/Uint64List/take_A01_t01: RuntimeError
+LibTest/typed_data/Uint64List/take_A02_t01: RuntimeError
+LibTest/typed_data/Uint64List/take_A03_t01: RuntimeError
+LibTest/typed_data/Uint64List/toList_A01_t01: RuntimeError
+LibTest/typed_data/Uint64List/toList_A02_t01: RuntimeError
+LibTest/typed_data/Uint64List/toList_A02_t02: RuntimeError
+LibTest/typed_data/Uint64List/toSet_A01_t01: RuntimeError
+LibTest/typed_data/Uint64List/toSet_A02_t01: RuntimeError
+LibTest/typed_data/Uint64List/toString_A01_t01: RuntimeError
+LibTest/typed_data/Uint64List/where_A01_t01: RuntimeError
+LibTest/typed_data/Uint64List/where_A02_t01: RuntimeError
+LibTest/typed_data/Uint64List/where_A03_t01: RuntimeError
+LibTest/typed_data/Uint8ClampedList/Uint8ClampedList.view_A05_t01: RuntimeError
+LibTest/typed_data/Uint8ClampedList/Uint8ClampedList.view_A05_t02: RuntimeError
+LibTest/typed_data/Uint8ClampedList/Uint8ClampedList.view_A05_t03: RuntimeError
+LibTest/typed_data/Uint8ClampedList/Uint8ClampedList_A02_t01: RuntimeError
+LibTest/typed_data/Uint8ClampedList/any_A01_t01: RuntimeError
+LibTest/typed_data/Uint8ClampedList/every_A01_t01: RuntimeError
+LibTest/typed_data/Uint8List/Uint8List.view_A05_t01: RuntimeError
+LibTest/typed_data/Uint8List/Uint8List.view_A05_t02: RuntimeError
+LibTest/typed_data/Uint8List/Uint8List.view_A05_t03: RuntimeError
+LibTest/typed_data/Uint8List/Uint8List_A02_t01: RuntimeError
+LibTest/typed_data/Uint8List/any_A01_t01: RuntimeError
+LibTest/typed_data/Uint8List/every_A01_t01: RuntimeError
+Utils/tests/Expect/identical_A01_t01: RuntimeError
+WebPlatformTest/DOMEvents/approved/EventObject.after.dispatchEvenr_t01: RuntimeError
+WebPlatformTest/DOMEvents/approved/ProcessingInstruction.DOMCharacterDataModified_t01: RuntimeError
+WebPlatformTest/Utils/test/testFail_t01: RuntimeError
+WebPlatformTest/custom-elements/concepts/type_A05_t01: RuntimeError
+WebPlatformTest/custom-elements/concepts/type_A06_t01: RuntimeError
+WebPlatformTest/custom-elements/instantiating/createElement_A05_t01: RuntimeError
+WebPlatformTest/dom/EventTarget/dispatchEvent_A02_t01: RuntimeError
+WebPlatformTest/dom/nodes/DOMImplementation-createHTMLDocument_t01: RuntimeError
+WebPlatformTest/dom/nodes/Document-createElement_t01: RuntimeError
+WebPlatformTest/dom/nodes/Document-getElementsByTagName_t01: RuntimeError
+WebPlatformTest/dom/nodes/Node-appendChild_t01: RuntimeError
+WebPlatformTest/dom/nodes/Node-appendChild_t02: RuntimeError
+WebPlatformTest/dom/nodes/Node-isEqualNode_t01: RuntimeError
+WebPlatformTest/dom/nodes/Node-replaceChild_t01: RuntimeError
+WebPlatformTest/dom/nodes/attributes/setAttributeNS_A05_t01: RuntimeError
+WebPlatformTest/dom/nodes/attributes/setAttributeNS_A06_t03: RuntimeError
+WebPlatformTest/dom/nodes/attributes/setAttributeNS_A07_t02: RuntimeError
+WebPlatformTest/dom/nodes/attributes/setAttributeNS_A08_t01: RuntimeError
+WebPlatformTest/dom/ranges/Range-comparePoint_t02: RuntimeError
+WebPlatformTest/html-imports/link-import_t01: RuntimeError
+WebPlatformTest/html-templates/parsing-html-templates/clearing-the-stack-back-to-a-given-context/clearing-stack-back-to-a-table-context_t01: RuntimeError
+WebPlatformTest/html-templates/parsing-html-templates/clearing-the-stack-back-to-a-given-context/clearing-stack-back-to-a-table-row-context_t01: RuntimeError
+WebPlatformTest/html-templates/parsing-html-templates/creating-an-element-for-the-token/template-owner-document_t01: RuntimeError
+WebPlatformTest/html/browsers/browsing-the-web/read-media/pageload-image_t01: RuntimeError
+WebPlatformTest/html/browsers/browsing-the-web/read-text/load-text-plain_t01: RuntimeError
+WebPlatformTest/html/dom/documents/dom-tree-accessors/nameditem_t02: RuntimeError
+WebPlatformTest/html/dom/elements/global-attributes/dataset-delete_t01: RuntimeError
+WebPlatformTest/html/dom/elements/global-attributes/dataset-set_t01: RuntimeError
+WebPlatformTest/html/semantics/document-metadata/styling/LinkStyle_t01: RuntimeError
+WebPlatformTest/html/semantics/embedded-content/media-elements/interfaces/HTMLElement/HTMLTrackElement/src_t01: RuntimeError
+WebPlatformTest/html/semantics/embedded-content/media-elements/interfaces/TextTrack/cues_t01: RuntimeError
+WebPlatformTest/html/semantics/embedded-content/media-elements/interfaces/TextTrack/mode_t01: RuntimeError
+WebPlatformTest/html/semantics/forms/attributes-common-to-form-controls/formAction_document_address_t01: RuntimeError
+WebPlatformTest/html/semantics/forms/attributes-common-to-form-controls/formaction_t01: RuntimeError
+WebPlatformTest/html/semantics/forms/the-datalist-element/datalistoptions_t01: RuntimeError
+WebPlatformTest/html/semantics/forms/the-form-element/form-autocomplete_t01: RuntimeError
+WebPlatformTest/html/semantics/forms/the-form-element/form-elements-nameditem_t02: RuntimeError
+WebPlatformTest/html/semantics/forms/the-input-element/date_t01: RuntimeError
+WebPlatformTest/html/semantics/forms/the-input-element/datetime-local_t01: RuntimeError
+WebPlatformTest/html/semantics/forms/the-input-element/datetime_t01: RuntimeError
+WebPlatformTest/html/semantics/forms/the-input-element/email_t01: RuntimeError
+WebPlatformTest/html/semantics/forms/the-input-element/hidden_t01: RuntimeError
+WebPlatformTest/html/semantics/forms/the-input-element/input-textselection_t01: RuntimeError
+WebPlatformTest/html/semantics/forms/the-input-element/text_t01: RuntimeError
+WebPlatformTest/html/semantics/forms/the-input-element/valueMode_t01: RuntimeError
+WebPlatformTest/html/semantics/forms/the-meter-element/meter_t01: RuntimeError
+WebPlatformTest/html/semantics/forms/the-option-element/option-text-recurse_t01: RuntimeError
+WebPlatformTest/html/semantics/grouping-content/the-blockquote-element/grouping-blockquote_t01: RuntimeError
+WebPlatformTest/html/semantics/interactive-elements/the-dialog-element/dialog-showModal_t01: RuntimeError
+WebPlatformTest/html/semantics/scripting-1/the-script-element/script-text_t02: RuntimeError
+WebPlatformTest/html/semantics/selectors/pseudo-classes/dir_t01: RuntimeError
+WebPlatformTest/html/semantics/selectors/pseudo-classes/enabled_t01: RuntimeError
+WebPlatformTest/html/semantics/tabular-data/the-table-element/tBodies_t01: RuntimeError
+WebPlatformTest/shadow-dom/elements-and-dom-objects/extensions-to-element-interface/attributes/test-004_t01: RuntimeError
+WebPlatformTest/shadow-dom/elements-and-dom-objects/extensions-to-element-interface/attributes/test-004_t02: RuntimeError
+WebPlatformTest/shadow-dom/elements-and-dom-objects/extensions-to-element-interface/methods/elements-001_t01: RuntimeError
+WebPlatformTest/shadow-dom/elements-and-dom-objects/the-content-html-element/test-004_t01: RuntimeError
+WebPlatformTest/shadow-dom/elements-and-dom-objects/the-content-html-element/test-006_t01: RuntimeError
+WebPlatformTest/shadow-dom/elements-and-dom-objects/the-shadow-html-element/test-001_t01: RuntimeError
+WebPlatformTest/shadow-dom/elements-and-dom-objects/the-shadow-html-element/test-003_t02: RuntimeError
+WebPlatformTest/shadow-dom/elements-and-dom-objects/the-shadow-html-element/test-004_t01: RuntimeError
+WebPlatformTest/shadow-dom/events/event-dispatch/test-001_t01: RuntimeError
+WebPlatformTest/shadow-dom/events/event-dispatch/test-003_t01: RuntimeError
+WebPlatformTest/shadow-dom/events/event-retargeting/test-002_t01: RuntimeError
+WebPlatformTest/shadow-dom/events/event-retargeting/test-004_t01: RuntimeError
+WebPlatformTest/shadow-dom/events/retargeting-focus-events/test-002_t01: RuntimeError
+WebPlatformTest/shadow-dom/events/retargeting-focus-events/test-003_t01: RuntimeError
+WebPlatformTest/shadow-dom/events/retargeting-relatedtarget/test-003_t01: RuntimeError
+WebPlatformTest/shadow-dom/html-elements-and-their-shadow-trees/test-002_t01: RuntimeError
+WebPlatformTest/shadow-dom/shadow-trees/composition/test-001_t01: RuntimeError
+WebPlatformTest/shadow-dom/shadow-trees/distributed-pseudo-element/test-001_t01: RuntimeError
+WebPlatformTest/shadow-dom/shadow-trees/hosting-multiple-shadow-trees/test-001_t01: RuntimeError
+WebPlatformTest/shadow-dom/shadow-trees/hosting-multiple-shadow-trees/test-002_t01: RuntimeError
+WebPlatformTest/shadow-dom/shadow-trees/lower-boundary-encapsulation/test-004_t01: RuntimeError
+WebPlatformTest/shadow-dom/shadow-trees/rendering-shadow-trees/test-001_t01: RuntimeError
+WebPlatformTest/shadow-dom/shadow-trees/upper-boundary-encapsulation/ownerdocument-001_t01: RuntimeError
+WebPlatformTest/shadow-dom/shadow-trees/upper-boundary-encapsulation/selectors-api-001_t01: RuntimeError
+WebPlatformTest/shadow-dom/shadow-trees/upper-boundary-encapsulation/selectors-api-002_t01: RuntimeError
+WebPlatformTest/shadow-dom/shadow-trees/upper-boundary-encapsulation/test-007_t01: RuntimeError
+WebPlatformTest/shadow-dom/shadow-trees/upper-boundary-encapsulation/test-009_t01: RuntimeError
+WebPlatformTest/webstorage/event_constructor_t01: RuntimeError
+WebPlatformTest/webstorage/event_local_key_t01: RuntimeError
+WebPlatformTest/webstorage/event_local_oldvalue_t01: RuntimeError
+WebPlatformTest/webstorage/event_local_storagearea_t01: RuntimeError
+WebPlatformTest/webstorage/event_session_newvalue_t01: RuntimeError
+WebPlatformTest/webstorage/event_session_oldvalue_t01: RuntimeError
+WebPlatformTest/webstorage/event_session_storagearea_t01: RuntimeError
+
+[ $builder_tag != run_webgl_tests && $compiler == dart2js ]
+LayoutTests/fast/canvas/webgl*: Skip # Only run WebGL on special builders, issue 29961
+
+[ $compiler == dart2js && $runtime == chrome ]
+Language/Expressions/Additive_Expressions/syntax_t01: RuntimeError
+Language/Expressions/Await_Expressions/evaluation_throws_t04: RuntimeError
+Language/Expressions/Await_Expressions/evaluation_throws_t06: RuntimeError
+Language/Expressions/Await_Expressions/evaluation_throws_t07: RuntimeError
+Language/Expressions/Constants/depending_on_itself_t03: Crash
+Language/Expressions/Constants/exception_t02/01: CompileTimeError
+Language/Expressions/Constants/integer_size_t03: CompileTimeError
+Language/Expressions/Constants/integer_size_t04: CompileTimeError
+Language/Expressions/Function_Invocation/async_generator_invokation_t08: Timeout
+Language/Expressions/Function_Invocation/async_generator_invokation_t10: Timeout
+Language/Expressions/Identifier_Reference/evaluation_variable_or_parameter_t02: RuntimeError
+Language/Expressions/If_null_Expressions/static_type_t01: RuntimeError
+Language/Expressions/Lists/identical_t02: RuntimeError
+Language/Expressions/Maps/identical_t02: RuntimeError
+Language/Expressions/Null/instance_of_class_null_t01: RuntimeError
+Language/Expressions/Numbers/syntax_t06: CompileTimeError
+Language/Expressions/Numbers/syntax_t09: CompileTimeError
+Language/Expressions/Object_Identity/double_t02: RuntimeError
+Language/Expressions/Shift/integer_t02: CompileTimeError
+Language/Expressions/Type_Cast/syntax_t01: RuntimeError
+Language/Expressions/Unary_Expressions/variable_negative_t03: RuntimeError
+Language/Libraries_and_Scripts/Scripts/top_level_main_t01: CompileTimeError
+Language/Libraries_and_Scripts/top_level_syntax_t01: CompileTimeError
+Language/Metadata/before_ctor_t02: RuntimeError
+Language/Metadata/before_function_t01: RuntimeError
+Language/Metadata/before_function_t02: RuntimeError
+Language/Metadata/before_function_t03: RuntimeError
+Language/Metadata/before_function_t04: RuntimeError
+Language/Metadata/before_function_t07: RuntimeError
+Language/Metadata/before_import_t01: RuntimeError
+Language/Metadata/before_param_t03: RuntimeError
+Language/Metadata/before_param_t05: RuntimeError
+Language/Metadata/before_param_t07: RuntimeError
+Language/Metadata/before_param_t09: RuntimeError
+Language/Metadata/before_variable_t02: RuntimeError
+Language/Mixins/Mixin_Application/syntax_t23: RuntimeError
+Language/Mixins/Mixin_Application/syntax_t25: RuntimeError
+Language/Overview/Privacy/private_and_public_t18: RuntimeError
+Language/Reference/Operator_Precedence/precedence_15_unary_prefix_t08: RuntimeError
+Language/Statements/Assert/execution_t09: RuntimeError
+Language/Types/Function_Types/call_t01: RuntimeError
+Language/Types/Function_Types/subtype_named_args_t02: RuntimeError
+Language/Types/Function_Types/subtype_named_args_t03: RuntimeError
+Language/Types/Function_Types/subtype_named_args_t11: RuntimeError
+Language/Types/Function_Types/subtype_optional_args_t01: RuntimeError
+Language/Types/Function_Types/subtype_optional_args_t02: RuntimeError
+Language/Types/Function_Types/subtype_optional_args_t04: RuntimeError
+Language/Types/Interface_Types/subtype_t06: RuntimeError
+Language/Types/Interface_Types/subtype_t21: RuntimeError
+Language/Types/Interface_Types/subtype_t23: RuntimeError
+Language/Variables/constant_variable_t09: RuntimeError
+LanguageFeatures/Instantiate-to-bound/check_types/typedef_param_t02: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/interface_compositionality_class_member_A02_t03: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/interface_compositionality_local_variable_A02_t01: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/interface_compositionality_return_value_A02_t01: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A51_t01: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A51_t02: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A53_t01: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A51_t02: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A51_t03: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A53_t01: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A53_t02: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A53_t03: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_global_variable_fail_A51_t01: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_global_variable_fail_A52_t01: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_local_variable_fail_A51_t01: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_local_variable_fail_A52_t01: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_local_variable_fail_A53_t01: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_return_value_fail_A53_t01: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/positional_function_types_fail_arguments_binding_fail_A31_t01: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/positional_function_types_fail_arguments_binding_fail_A31_t02: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/positional_function_types_fail_arguments_binding_fail_A32_t01: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/positional_function_types_fail_arguments_binding_fail_A32_t02: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/positional_function_types_fail_class_member_fail_A31_t01: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/positional_function_types_fail_class_member_fail_A31_t03: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/positional_function_types_fail_class_member_fail_A32_t02: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/positional_function_types_fail_class_member_fail_A32_t03: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/positional_function_types_fail_local_variable_fail_A31_t01: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/positional_function_types_fail_local_variable_fail_A32_t01: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/positional_function_types_fail_return_value_fail_A32_t01: RuntimeError
+LanguageFeatures/Subtyping/static/generated/interface_compositionality_arguments_binding_A02_t01: RuntimeError
+LanguageFeatures/Subtyping/static/generated/interface_compositionality_class_member_A02_t01: RuntimeError
+LanguageFeatures/Subtyping/static/generated/interface_compositionality_class_member_A02_t02: RuntimeError
+LanguageFeatures/Subtyping/static/generated/interface_compositionality_class_member_A02_t03: RuntimeError
+LayoutTests/fast/animation/request-animation-frame-cancel2_t01: Timeout, Pass
+LayoutTests/fast/animation/request-animation-frame-cancel_t01: Timeout, Pass
+LayoutTests/fast/animation/request-animation-frame-prefix_t01: Timeout, Pass
+LayoutTests/fast/animation/request-animation-frame-timestamps-advance_t01: Timeout, Pass
+LayoutTests/fast/animation/request-animation-frame-timestamps_t01: Timeout, Pass
+LayoutTests/fast/backgrounds/background-position-parsing-2_t01: RuntimeError
+LayoutTests/fast/backgrounds/background-shorthand-with-backgroundSize-style_t01: RuntimeError
+LayoutTests/fast/backgrounds/repeat/parsing-background-repeat_t01: RuntimeError
+LayoutTests/fast/canvas/2d.composite.globalAlpha.fillPath_t01: RuntimeError
+LayoutTests/fast/canvas/2d.fillText.gradient_t01: RuntimeError
+LayoutTests/fast/canvas/2d.text.draw.fill.maxWidth.negative_t01: RuntimeError
+LayoutTests/fast/canvas/DrawImageSinglePixelStretch_t01: Timeout
+LayoutTests/fast/canvas/canvas-as-image-incremental-repaint_t01: Timeout, Pass
+LayoutTests/fast/canvas/canvas-blending-color-over-color_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-blending-global-alpha_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-blending-gradient-over-color_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-blending-gradient-over-gradient_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-blending-gradient-over-pattern_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-blending-image-over-color_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-blending-image-over-gradient_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-blending-pattern-over-image_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-blending-text_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-blending-transforms_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-getImageData-invalid_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-getImageData-rounding_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-imageSmoothingEnabled-repaint_t01: Timeout, Pass
+LayoutTests/fast/canvas/canvas-lose-restore-googol-size_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-lose-restore-max-int-size_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-putImageData_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-resize-after-paint_t01: Timeout, Pass
+LayoutTests/fast/canvas/drawImage-with-valid-image_t01: Timeout
+LayoutTests/fast/canvas/getPutImageDataPairTest_t01: RuntimeError
+LayoutTests/fast/canvas/gradient-addColorStop-with-invalid-color_t01: RuntimeError
+LayoutTests/fast/canvas/rgba-parsing_t01: RuntimeError
+LayoutTests/fast/canvas/setWidthResetAfterForcedRender_t01: Timeout, Pass
+LayoutTests/fast/canvas/webgl/canvas-zero-size_t01: RuntimeError, Pass
+LayoutTests/fast/canvas/webgl/context-destroyed-crash_t01: RuntimeError, Pass
+LayoutTests/fast/canvas/webgl/copy-tex-image-and-sub-image-2d_t01: RuntimeError, Pass
+LayoutTests/fast/canvas/webgl/css-webkit-canvas_t01: RuntimeError, Pass
+LayoutTests/fast/canvas/webgl/draw-elements-out-of-bounds_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/framebuffer-bindings-unaffected-on-resize_t01: Timeout, Pass
+LayoutTests/fast/canvas/webgl/get-active-test_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/gl-bind-attrib-location-test_t01: RuntimeError, Pass
+LayoutTests/fast/canvas/webgl/gl-get-calls_t01: RuntimeError, Pass
+LayoutTests/fast/canvas/webgl/gl-getshadersource_t01: RuntimeError, Pass
+LayoutTests/fast/canvas/webgl/gl-getstring_t01: RuntimeError, Pass
+LayoutTests/fast/canvas/webgl/gl-object-get-calls_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/gl-teximage_t01: Timeout, Pass
+LayoutTests/fast/canvas/webgl/gl-vertex-attrib_t01: RuntimeError, Pass
+LayoutTests/fast/canvas/webgl/glsl-conformance_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/incorrect-context-object-behaviour_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/index-validation-copies-indices_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/index-validation-with-resized-buffer_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/oes-element-index-uint_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/oes-vertex-array-object_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/point-size_t01: RuntimeError, Pass
+LayoutTests/fast/canvas/webgl/premultiplyalpha-test_t01: RuntimeError, Pass
+LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-array-buffer-view_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-canvas-rgb565_t01: RuntimeError, Pass
+LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-canvas-rgba4444_t01: RuntimeError, Pass
+LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-image-data-rgb565_t01: RuntimeError, Pass
+LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-image-data-rgba4444_t01: RuntimeError, Pass
+LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-image-data-rgba5551_t01: RuntimeError, Pass
+LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-image-rgba4444_t01: Timeout, RuntimeError
+LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-image-rgba5551_t01: Timeout
+LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-image_t01: Timeout, Pass
+LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-video-rgb565_t01: Timeout, RuntimeError
+LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-video-rgba4444_t01: Timeout
+LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-video-rgba5551_t01: Timeout
+LayoutTests/fast/canvas/webgl/texture-active-bind_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/texture-bindings-uneffected-on-resize_t01: RuntimeError, Pass
+LayoutTests/fast/canvas/webgl/texture-color-profile_t01: Timeout, Pass
+LayoutTests/fast/canvas/webgl/texture-complete_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/texture-transparent-pixels-initialized_t01: Timeout, Pass
+LayoutTests/fast/canvas/webgl/webgl-layer-update_t01: Timeout, Pass
+LayoutTests/fast/canvas/webgl/webgl-specific_t01: RuntimeError
+LayoutTests/fast/css-generated-content/bug91547_t01: RuntimeError
+LayoutTests/fast/css-generated-content/malformed-url_t01: RuntimeError
+LayoutTests/fast/css-generated-content/pseudo-animation-before-onload_t01: RuntimeError, Pass
+LayoutTests/fast/css-generated-content/pseudo-animation_t01: RuntimeError, Pass
+LayoutTests/fast/css-generated-content/pseudo-element-events_t01: Timeout
+LayoutTests/fast/css-generated-content/pseudo-transition-event_t01: Timeout, Pass
+LayoutTests/fast/css-grid-layout/breadth-size-resolution-grid_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/calc-resolution-grid-item_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/flex-content-resolution-columns_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/flex-content-resolution-rows_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/grid-auto-flow-get-set_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/grid-auto-flow-update_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/grid-element-border-grid-item_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/grid-element-border-padding-grid-item_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/grid-element-padding-margin_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/grid-item-area-get-set_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/grid-item-bad-named-area-auto-placement_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/grid-item-change-order-auto-flow_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/grid-item-margin-auto-columns-rows-horiz-bt_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/grid-item-margin-auto-columns-rows-vert-rl_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/grid-item-margin-auto-columns-rows_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/grid-item-margin-resolution_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/grid-item-order-auto-flow-resolution_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/justify-self-cell_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/minmax-fixed-logical-height-only_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/percent-grid-item-in-percent-grid-track-in-percent-grid_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/percent-grid-item-in-percent-grid-track-update_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/percent-grid-item-in-percent-grid-track_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/percent-padding-margin-resolution-grid-item-update_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/place-cell-by-index_t01: RuntimeError
+LayoutTests/fast/css-intrinsic-dimensions/intrinsic-sized-blocks_t01: RuntimeError
+LayoutTests/fast/css-intrinsic-dimensions/intrinsic-sized-column-flex-items_t01: RuntimeError
+LayoutTests/fast/css-intrinsic-dimensions/intrinsic-sized-flex-items_t01: RuntimeError
+LayoutTests/fast/css-intrinsic-dimensions/intrinsic-sized-replaced-absolutes_t01: RuntimeError
+LayoutTests/fast/css-intrinsic-dimensions/width-shrinks-avoid-floats_t01: RuntimeError
+LayoutTests/fast/css/MarqueeLayoutTest_t01: RuntimeError, Pass
+LayoutTests/fast/css/aspect-ratio-inheritance_t01: RuntimeError
+LayoutTests/fast/css/auto-min-size_t01: RuntimeError
+LayoutTests/fast/css/background-serialize_t01: RuntimeError
+LayoutTests/fast/css/box-sizing-border-box-dynamic-padding-border-update_t01: RuntimeError
+LayoutTests/fast/css/content/content-none_t01: RuntimeError
+LayoutTests/fast/css/content/content-quotes-01_t01: RuntimeError, Pass
+LayoutTests/fast/css/content/content-quotes-05_t01: RuntimeError, Pass
+LayoutTests/fast/css/counters/complex-before_t01: RuntimeError, Pass
+LayoutTests/fast/css/deprecated-flex-box-zero-width-intrinsic-max-width_t01: RuntimeError
+LayoutTests/fast/css/device-aspect-ratio_t01: RuntimeError
+LayoutTests/fast/css/fixed-width-intrinsic-width-excludes-scrollbars_t01: RuntimeError
+LayoutTests/fast/css/focus-display-block-inline_t01: RuntimeError, Pass
+LayoutTests/fast/css/font-face-cache-bug_t01: RuntimeError, Pass
+LayoutTests/fast/css/font-face-insert-link_t01: RuntimeError
+LayoutTests/fast/css/font-face-unicode-range-load_t01: RuntimeError, Timeout
+LayoutTests/fast/css/font-face-unicode-range-overlap-load_t01: RuntimeError, Timeout
+LayoutTests/fast/css/fontfaceset-events_t01: RuntimeError
+LayoutTests/fast/css/getComputedStyle/computed-style-cross-fade_t01: RuntimeError
+LayoutTests/fast/css/getComputedStyle/font-family-fallback-reset_t01: RuntimeError
+LayoutTests/fast/css/html-attr-case-sensitivity_t01: RuntimeError
+LayoutTests/fast/css/implicit-attach-marking_t01: Timeout, Pass
+LayoutTests/fast/css/insertRule-media_t01: RuntimeError
+LayoutTests/fast/css/invalid-predefined-color_t01: RuntimeError
+LayoutTests/fast/css/link-alternate-stylesheet-1_t01: RuntimeError
+LayoutTests/fast/css/media-query-recovery_t01: RuntimeError
+LayoutTests/fast/css/modify-ua-rules-from-javascript_t01: RuntimeError
+LayoutTests/fast/css/padding-no-renderer_t01: RuntimeError, Pass
+LayoutTests/fast/css/parsing-page-rule_t01: RuntimeError
+LayoutTests/fast/css/percent-min-width-img-src-change_t01: Timeout, Pass
+LayoutTests/fast/css/pseudo-any_t01: RuntimeError, Pass
+LayoutTests/fast/css/pseudo-target-indirect-sibling-001_t01: Timeout
+LayoutTests/fast/css/pseudo-target-indirect-sibling-002_t01: Timeout, Pass
+LayoutTests/fast/css/readonly-pseudoclass-opera-003_t01: RuntimeError
+LayoutTests/fast/css/readonly-pseudoclass-opera-004_t01: RuntimeError
+LayoutTests/fast/css/readonly-pseudoclass-opera-005_t01: RuntimeError
+LayoutTests/fast/css/sheet-collection-link_t01: RuntimeError
+LayoutTests/fast/css/space-before-charset-external_t01: RuntimeError
+LayoutTests/fast/css/style-element-process-crash_t01: Timeout, Pass
+LayoutTests/fast/css/style-scoped/style-scoped-scoping-nodes-different-order_t01: RuntimeError
+LayoutTests/fast/css/style-scoped/style-scoped-with-dom-operation_t01: RuntimeError
+LayoutTests/fast/css/style-scoped/style-scoped-with-important-rule_t01: RuntimeError
+LayoutTests/fast/css/stylesheet-enable-first-alternate-link_t01: RuntimeError
+LayoutTests/fast/css/stylesheet-enable-first-alternate-on-load-sheet_t01: RuntimeError
+LayoutTests/fast/css/word-break-user-modify-allowed-values_t01: RuntimeError
+LayoutTests/fast/css3-text/css3-text-indent/getComputedStyle/getComputedStyle-text-indent-inherited_t01: RuntimeError
+LayoutTests/fast/dom/DOMImplementation/createDocument-namespace-err_t01: RuntimeError
+LayoutTests/fast/dom/Document/CaretRangeFromPoint/caretRangeFromPoint-in-zoom-and-scroll_t01: RuntimeError
+LayoutTests/fast/dom/Element/attribute-uppercase_t01: RuntimeError
+LayoutTests/fast/dom/Element/client-rect-list-argument_t01: RuntimeError
+LayoutTests/fast/dom/Element/getClientRects_t01: RuntimeError
+LayoutTests/fast/dom/HTMLAnchorElement/remove-href-from-focused-anchor_t01: Timeout, Pass
+LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-host_t01: RuntimeError
+LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-pathname_t01: RuntimeError
+LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-port_t01: RuntimeError
+LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-protocol_t01: RuntimeError
+LayoutTests/fast/dom/HTMLBaseElement/href-attribute-resolves-with-respect-to-document_t01: RuntimeError
+LayoutTests/fast/dom/HTMLButtonElement/value/getset_t01: RuntimeError
+LayoutTests/fast/dom/HTMLDialogElement/dialog-close-event_t01: RuntimeError
+LayoutTests/fast/dom/HTMLDialogElement/dialog-open_t01: RuntimeError
+LayoutTests/fast/dom/HTMLDialogElement/dialog-return-value_t01: RuntimeError
+LayoutTests/fast/dom/HTMLDialogElement/dialog-scrolled-viewport_t01: RuntimeError
+LayoutTests/fast/dom/HTMLDialogElement/inert-node-is-unselectable_t01: RuntimeError
+LayoutTests/fast/dom/HTMLDialogElement/multiple-centered-dialogs_t01: RuntimeError
+LayoutTests/fast/dom/HTMLDialogElement/submit-dialog-close-event_t01: Timeout, Pass
+LayoutTests/fast/dom/HTMLDialogElement/top-layer-position-relative_t01: RuntimeError
+LayoutTests/fast/dom/HTMLDialogElement/top-layer-position-static_t01: RuntimeError
+LayoutTests/fast/dom/HTMLDocument/active-element-gets-unforcusable_t01: Timeout, Pass
+LayoutTests/fast/dom/HTMLDocument/set-focus-on-valid-element_t01: Timeout, Pass
+LayoutTests/fast/dom/HTMLImageElement/image-alt-text_t01: RuntimeError
+LayoutTests/fast/dom/HTMLImageElement/image-natural-width-height_t01: Timeout
+LayoutTests/fast/dom/HTMLImageElement/parse-src_t01: RuntimeError
+LayoutTests/fast/dom/HTMLInputElement/input-image-alt-text_t01: RuntimeError
+LayoutTests/fast/dom/HTMLLabelElement/click-label_t01: RuntimeError
+LayoutTests/fast/dom/HTMLLabelElement/form/test1_t01: RuntimeError
+LayoutTests/fast/dom/HTMLLinkElement/link-and-subresource-test_t01: Timeout
+LayoutTests/fast/dom/HTMLLinkElement/link-beforeload-recursive_t01: Timeout
+LayoutTests/fast/dom/HTMLLinkElement/link-onerror-stylesheet-with-non-existent-import_t01: RuntimeError
+LayoutTests/fast/dom/HTMLLinkElement/link-onload-before-page-load_t01: RuntimeError
+LayoutTests/fast/dom/HTMLLinkElement/link-onload-stylesheet-with-import_t01: RuntimeError
+LayoutTests/fast/dom/HTMLLinkElement/link-onload2_t01: RuntimeError
+LayoutTests/fast/dom/HTMLLinkElement/prefetch-onload_t01: Timeout
+LayoutTests/fast/dom/HTMLLinkElement/prefetch_t01: Timeout
+LayoutTests/fast/dom/HTMLObjectElement/beforeload-set-text-crash_t01: Timeout
+LayoutTests/fast/dom/HTMLOptionElement/collection-setter-getter_t01: RuntimeError
+LayoutTests/fast/dom/HTMLProgressElement/indeterminate-progress-002_t01: RuntimeError
+LayoutTests/fast/dom/HTMLScriptElement/async-false-inside-async-false-load_t01: Timeout
+LayoutTests/fast/dom/HTMLScriptElement/async-onbeforeload_t01: Timeout
+LayoutTests/fast/dom/HTMLScriptElement/defer-inline-script_t01: RuntimeError
+LayoutTests/fast/dom/HTMLScriptElement/defer-onbeforeload_t01: Timeout, Pass
+LayoutTests/fast/dom/HTMLScriptElement/defer-script-invalid-url_t01: Timeout
+LayoutTests/fast/dom/HTMLScriptElement/dont-load-unknown-type_t01: Timeout
+LayoutTests/fast/dom/HTMLScriptElement/remove-in-beforeload_t01: Timeout, Pass
+LayoutTests/fast/dom/HTMLScriptElement/remove-source_t01: Timeout
+LayoutTests/fast/dom/HTMLScriptElement/script-for-attribute-unexpected-execution_t01: Timeout
+LayoutTests/fast/dom/HTMLScriptElement/script-reexecution_t01: Timeout
+LayoutTests/fast/dom/HTMLScriptElement/script-set-src_t01: Timeout
+LayoutTests/fast/dom/HTMLStyleElement/style-onerror-with-existent-and-non-existent-import_t01: RuntimeError
+LayoutTests/fast/dom/HTMLTableElement/insert-row_t01: RuntimeError
+LayoutTests/fast/dom/HTMLTableSectionElement/rows_t01: RuntimeError
+LayoutTests/fast/dom/HTMLTemplateElement/innerHTML-inert_t01: Timeout, Pass
+LayoutTests/fast/dom/MutationObserver/removed-out-of-order_t01: RuntimeError
+LayoutTests/fast/dom/MutationObserver/weak-callback-gc-crash_t01: RuntimeError
+LayoutTests/fast/dom/Range/bug-19527_t01: RuntimeError
+LayoutTests/fast/dom/Range/getClientRects-character_t01: RuntimeError
+LayoutTests/fast/dom/Range/range-created-during-remove-children_t01: RuntimeError, Pass
+LayoutTests/fast/dom/Range/range-detached-exceptions_t01: RuntimeError
+LayoutTests/fast/dom/Range/range-insertNode-splittext_t01: RuntimeError
+LayoutTests/fast/dom/StyleSheet/detached-style-2_t01: RuntimeError
+LayoutTests/fast/dom/StyleSheet/detached-style_t01: RuntimeError
+LayoutTests/fast/dom/StyleSheet/detached-stylesheet-without-wrapper_t01: RuntimeError
+LayoutTests/fast/dom/blur-contenteditable_t01: RuntimeError, Pass
+LayoutTests/fast/dom/characterdata-api-arguments_t01: RuntimeError
+LayoutTests/fast/dom/css-cached-import-rule_t01: RuntimeError
+LayoutTests/fast/dom/css-innerHTML_t01: RuntimeError
+LayoutTests/fast/dom/css-insert-import-rule-twice_t01: RuntimeError
+LayoutTests/fast/dom/css-insert-import-rule_t01: RuntimeError
+LayoutTests/fast/dom/css-shorthand-common-value_t01: RuntimeError
+LayoutTests/fast/dom/cssTarget-crash_t01: RuntimeError
+LayoutTests/fast/dom/custom/upgrade-candidate-remove-crash_t01: RuntimeError
+LayoutTests/fast/dom/domparser-parsefromstring-mimetype-support_t01: RuntimeError
+LayoutTests/fast/dom/empty-hash-and-search_t01: RuntimeError
+LayoutTests/fast/dom/focus-contenteditable_t01: RuntimeError, Pass
+LayoutTests/fast/dom/gc-image-element-2_t01: Timeout
+LayoutTests/fast/dom/gc-image-element_t01: Timeout
+LayoutTests/fast/dom/getElementsByClassName/010_t01: RuntimeError
+LayoutTests/fast/dom/getElementsByClassName/011_t01: RuntimeError
+LayoutTests/fast/dom/horizontal-scrollbar-in-rtl-doesnt-fire-onscroll_t01: RuntimeError
+LayoutTests/fast/dom/horizontal-scrollbar-in-rtl_t01: RuntimeError
+LayoutTests/fast/dom/horizontal-scrollbar-when-dir-change_t01: RuntimeError
+LayoutTests/fast/dom/image-object_t01: Timeout
+LayoutTests/fast/dom/non-styled-element-id-crash_t01: RuntimeError
+LayoutTests/fast/dom/partial-layout-overlay-scrollbars_t01: RuntimeError
+LayoutTests/fast/dom/set-innerHTML_t01: RuntimeError
+LayoutTests/fast/dom/shadow/insertion-point-shadow-crash_t01: RuntimeError
+LayoutTests/fast/dom/shadow/insertion-point-video-crash_t01: RuntimeError
+LayoutTests/fast/dom/shadow/olderShadowRoot_t01: RuntimeError
+LayoutTests/fast/dom/shadow/pseudoclass-update-checked-option_t01: RuntimeError
+LayoutTests/fast/dom/shadow/pseudoclass-update-disabled-optgroup_t01: RuntimeError
+LayoutTests/fast/dom/shadow/pseudoclass-update-disabled-option_t01: RuntimeError
+LayoutTests/fast/dom/shadow/shadow-content-crash_t01: RuntimeError
+LayoutTests/fast/dom/shadow/shadow-disable_t01: RuntimeError
+LayoutTests/fast/dom/shadow/shadow-removechild-and-blur-event_t01: RuntimeError, Pass
+LayoutTests/fast/dom/shadow/shadowdom-for-input-type-change_t01: RuntimeError
+LayoutTests/fast/dom/shadow/shadowroot-host_t01: RuntimeError
+LayoutTests/fast/dom/shadow/stale-distribution-after-shadow-removal_t01: RuntimeError
+LayoutTests/fast/dynamic/checkbox-selection-crash_t01: RuntimeError
+LayoutTests/fast/dynamic/crash-generated-counter_t01: RuntimeError
+LayoutTests/fast/dynamic/crash-generated-image_t01: RuntimeError
+LayoutTests/fast/dynamic/crash-generated-text_t01: RuntimeError
+LayoutTests/fast/events/change-overflow-on-overflow-change_t01: Timeout
+LayoutTests/fast/events/clipboard-clearData_t01: Timeout
+LayoutTests/fast/events/clipboard-dataTransferItemList_t01: Timeout
+LayoutTests/fast/events/event-creation_t01: RuntimeError
+LayoutTests/fast/events/event-listener-html-non-html-confusion_t01: RuntimeError
+LayoutTests/fast/events/event-on-xhr-document_t01: RuntimeError
+LayoutTests/fast/events/fire-scroll-event_t01: RuntimeError, Timeout
+LayoutTests/fast/events/init-message-event_t01: RuntimeError
+LayoutTests/fast/events/input-focus-no-duplicate-events_t01: RuntimeError, Pass
+LayoutTests/fast/events/invalid-002_t01: RuntimeError
+LayoutTests/fast/events/invalid-003_t01: RuntimeError
+LayoutTests/fast/events/label-focus_t01: RuntimeError, Pass
+LayoutTests/fast/events/mutation-during-replace-child_t01: RuntimeError
+LayoutTests/fast/events/nested-event-remove-node-crash_t01: Timeout, Pass
+LayoutTests/fast/events/overflowchanged-event-raf-timing_t01: RuntimeError
+LayoutTests/fast/events/scoped/editing-commands_t01: RuntimeError
+LayoutTests/fast/events/scroll-during-zoom-change_t01: Timeout, Pass
+LayoutTests/fast/events/scroll-event-phase_t01: Timeout, Pass
+LayoutTests/fast/events/tabindex-removal-from-focused-element_t01: RuntimeError, Pass
+LayoutTests/fast/exclusions/parsing/parsing-wrap-through_t01: RuntimeError
+LayoutTests/fast/files/blob-close-read_t01: RuntimeError
+LayoutTests/fast/files/blob-constructor_t01: RuntimeError
+LayoutTests/fast/files/read-blob-as-array-buffer_t01: RuntimeError
+LayoutTests/fast/filesystem/directory-entry-to-uri_t01: RuntimeError
+LayoutTests/fast/filesystem/file-entry-to-uri_t01: RuntimeError
+LayoutTests/fast/filesystem/file-writer-abort-continue_t01: RuntimeError
+LayoutTests/fast/filesystem/file-writer-events_t01: RuntimeError
+LayoutTests/fast/forms/ValidityState-customError_t01: RuntimeError
+LayoutTests/fast/forms/ValidityState-tooLong-textarea_t01: RuntimeError
+LayoutTests/fast/forms/ValidityState-valueMissing-004_t01: RuntimeError
+LayoutTests/fast/forms/autofocus-focus-only-once_t01: Timeout, Pass
+LayoutTests/fast/forms/autofocus-input-css-style-change_t01: Timeout, Pass
+LayoutTests/fast/forms/autofocus-opera-007_t01: Timeout, Pass
+LayoutTests/fast/forms/autofocus-readonly-attribute_t01: Timeout, Pass
+LayoutTests/fast/forms/button/button-disabled-blur_t01: RuntimeError, Pass
+LayoutTests/fast/forms/date-multiple-fields/date-multiple-fields-onblur-setvalue-onfocusremoved_t01: RuntimeError, Pass
+LayoutTests/fast/forms/datetimelocal/input-valueasdate-datetimelocal_t01: RuntimeError
+LayoutTests/fast/forms/focus-style-pending_t01: Timeout, Pass
+LayoutTests/fast/forms/focus_t01: RuntimeError, Pass
+LayoutTests/fast/forms/form-attribute-nonexistence-form-id_t01: RuntimeError
+LayoutTests/fast/forms/input-appearance-elementFromPoint_t01: RuntimeError
+LayoutTests/fast/forms/input-implicit-length-limit_t01: RuntimeError
+LayoutTests/fast/forms/input-inputmode_t01: RuntimeError
+LayoutTests/fast/forms/listbox-selection-2_t01: RuntimeError
+LayoutTests/fast/forms/onchange-change-type_t01: RuntimeError
+LayoutTests/fast/forms/option-change-single-selected_t01: RuntimeError
+LayoutTests/fast/forms/option-strip-unicode-spaces_t01: RuntimeError
+LayoutTests/fast/forms/parser-associated-form-removal_t01: RuntimeError
+LayoutTests/fast/forms/paste-into-textarea_t01: RuntimeError
+LayoutTests/fast/forms/plaintext-mode-1_t01: RuntimeError
+LayoutTests/fast/forms/select-change-popup-to-listbox-in-event-handler_t01: Timeout
+LayoutTests/fast/forms/select-clientheight-large-size_t01: RuntimeError
+LayoutTests/fast/forms/selection-wrongtype_t01: RuntimeError
+LayoutTests/fast/forms/textarea-paste-newline_t01: RuntimeError
+LayoutTests/fast/forms/textfield-focus-out_t01: Timeout, Pass
+LayoutTests/fast/html/adjacent-html-context-element_t01: RuntimeError
+LayoutTests/fast/html/article-element_t01: RuntimeError
+LayoutTests/fast/html/details-add-child-2_t01: RuntimeError
+LayoutTests/fast/html/details-add-details-child-1_t01: RuntimeError
+LayoutTests/fast/html/details-add-details-child-2_t01: RuntimeError
+LayoutTests/fast/html/figure-element_t01: RuntimeError
+LayoutTests/fast/html/header-element_t01: RuntimeError
+LayoutTests/fast/html/hgroup-element_t01: RuntimeError
+LayoutTests/fast/html/hidden-attr_t01: RuntimeError
+LayoutTests/fast/html/imports/import-element-removed-flag_t01: Timeout
+LayoutTests/fast/html/main-element_t01: RuntimeError
+LayoutTests/fast/html/select-dropdown-consistent-background-color_t01: RuntimeError
+LayoutTests/fast/inline/boundingBox-with-continuation_t01: RuntimeError
+LayoutTests/fast/inline/inline-position-top-align_t01: RuntimeError
+LayoutTests/fast/inline/parent-inline-element-padding-contributes-width_t01: RuntimeError
+LayoutTests/fast/inline/positioned-element-padding-contributes-width_t01: RuntimeError
+LayoutTests/fast/lists/marker-preferred-margins_t01: RuntimeError
+LayoutTests/fast/loader/about-blank-hash-change_t01: Timeout
+LayoutTests/fast/loader/about-blank-hash-kept_t01: Timeout
+LayoutTests/fast/loader/local-css-allowed-in-strict-mode_t01: RuntimeError
+LayoutTests/fast/loader/onhashchange-attribute-listeners_t01: Timeout, Pass
+LayoutTests/fast/loader/scroll-position-restored-on-back_t01: Timeout
+LayoutTests/fast/masking/parsing-clip-path-shape_t01: RuntimeError
+LayoutTests/fast/masking/parsing-mask_t01: RuntimeError
+LayoutTests/fast/media/media-query-list-syntax_t01: RuntimeError
+LayoutTests/fast/mediastream/RTCPeerConnection-AddRemoveStream_t01: RuntimeError
+LayoutTests/fast/mediastream/RTCPeerConnection_t01: RuntimeError
+LayoutTests/fast/multicol/break-after-always-bottom-margin_t01: RuntimeError
+LayoutTests/fast/multicol/cssom-view_t01: RuntimeError
+LayoutTests/fast/multicol/float-truncation_t01: RuntimeError
+LayoutTests/fast/multicol/hit-test-end-of-column_t01: RuntimeError
+LayoutTests/fast/multicol/hit-test-float_t01: RuntimeError
+LayoutTests/fast/multicol/inline-getclientrects_t01: RuntimeError
+LayoutTests/fast/multicol/newmulticol/balance-images_t01: RuntimeError
+LayoutTests/fast/multicol/newmulticol/balance-maxheight_t01: RuntimeError
+LayoutTests/fast/multicol/vertical-lr/float-truncation_t01: RuntimeError
+LayoutTests/fast/multicol/vertical-rl/float-truncation_t01: RuntimeError
+LayoutTests/fast/overflow/replaced-child-100percent-height-inside-fixed-container-with-overflow-auto_t01: RuntimeError
+LayoutTests/fast/overflow/scrollbar-restored_t01: RuntimeError
+LayoutTests/fast/parser/fragment-parser-doctype_t01: RuntimeError
+LayoutTests/fast/replaced/available-height-for-content_t01: RuntimeError
+LayoutTests/fast/replaced/container-width-zero_t01: RuntimeError
+LayoutTests/fast/replaced/iframe-with-percentage-height-within-table-with-table-cell-ignore-height_t01: RuntimeError
+LayoutTests/fast/replaced/table-percent-height_t01: RuntimeError
+LayoutTests/fast/replaced/table-percent-width_t01: RuntimeError
+LayoutTests/fast/ruby/ruby-line-height_t01: RuntimeError
+LayoutTests/fast/shapes/shape-outside-floats/shape-outside-floats-image-margin_t01: RuntimeError
+LayoutTests/fast/shapes/shape-outside-floats/shape-outside-floats-inset-rounded-different-writing-modes-left_t01: RuntimeError
+LayoutTests/fast/shapes/shape-outside-floats/shape-outside-rounded-boxes_t01: RuntimeError
+LayoutTests/fast/shapes/shape-outside-floats/shape-outside-rounded-boxes_t02: RuntimeError
+LayoutTests/fast/speechsynthesis/speech-synthesis-boundary-events_t01: Timeout, Pass
+LayoutTests/fast/speechsynthesis/speech-synthesis-cancel_t01: Timeout, RuntimeError
+LayoutTests/fast/speechsynthesis/speech-synthesis-pause-resume_t01: Timeout, Pass
+LayoutTests/fast/speechsynthesis/speech-synthesis-speak_t01: Timeout, Pass
+LayoutTests/fast/storage/storage-disallowed-in-data-url_t01: RuntimeError
+LayoutTests/fast/sub-pixel/computedstylemargin_t01: RuntimeError, Pass
+LayoutTests/fast/table/fixed-table-layout-toggle-colwidth_t01: RuntimeError, Pass
+LayoutTests/fast/table/fixed-table-with-percent-width-inside-extra-large-div_t01: RuntimeError, Pass
+LayoutTests/fast/table/hittest-tablecell-bottom-edge_t01: RuntimeError
+LayoutTests/fast/table/hittest-tablecell-with-borders-bottom-edge_t01: RuntimeError
+LayoutTests/fast/table/html-table-width-max-width-constrained_t01: RuntimeError
+LayoutTests/fast/table/incorrect-colgroup-span-values_t01: RuntimeError
+LayoutTests/fast/table/margins-flipped-text-direction_t01: RuntimeError
+LayoutTests/fast/table/min-width-css-block-table_t01: RuntimeError
+LayoutTests/fast/table/nested-tables-with-div-offset_t01: RuntimeError
+LayoutTests/fast/table/resize-table-binding-cell_t01: RuntimeError, Pass
+LayoutTests/fast/table/resize-table-cell_t01: RuntimeError, Pass
+LayoutTests/fast/table/table-all-rowspans-height-distribution-in-rows_t01: RuntimeError
+LayoutTests/fast/table/table-colgroup-present-after-table-row_t01: RuntimeError
+LayoutTests/fast/table/table-rowspan-cell-with-empty-cell_t01: RuntimeError
+LayoutTests/fast/table/table-rowspan-height-distribution-in-rows_t01: RuntimeError
+LayoutTests/fast/table/table-rowspan-height-distribution-in-rows_t02: RuntimeError
+LayoutTests/fast/table/table-with-content-width-exceeding-max-width_t01: RuntimeError
+LayoutTests/fast/text/font-ligatures-linebreak-word_t01: RuntimeError, Pass
+LayoutTests/fast/text/font-ligatures-linebreak_t01: RuntimeError, Pass
+LayoutTests/fast/text/international/iso-8859-8_t01: RuntimeError
+LayoutTests/fast/text/line-break-after-empty-inline-hebrew_t01: RuntimeError
+LayoutTests/fast/text/line-break-after-inline-latin1_t01: RuntimeError
+LayoutTests/fast/text/multiglyph-characters_t01: RuntimeError
+LayoutTests/fast/text/offsetForPosition-cluster-at-zero_t01: RuntimeError
+LayoutTests/fast/text/sub-pixel/text-scaling-ltr_t01: RuntimeError
+LayoutTests/fast/text/sub-pixel/text-scaling-vertical_t01: RuntimeError, Pass
+LayoutTests/fast/text/sub-pixel/text-scaling-webfont_t01: RuntimeError
+LayoutTests/fast/text/zero-width-characters-complex-script_t01: RuntimeError
+LayoutTests/fast/url/anchor_t01: RuntimeError
+LayoutTests/fast/url/file-http-base_t01: RuntimeError
+LayoutTests/fast/url/file_t01: RuntimeError
+LayoutTests/fast/url/idna2003_t01: RuntimeError
+LayoutTests/fast/url/idna2008_t01: RuntimeError
+LayoutTests/fast/url/invalid-urls-utf8_t01: RuntimeError
+LayoutTests/fast/url/ipv4_t01: RuntimeError
+LayoutTests/fast/url/ipv6_t01: RuntimeError
+LayoutTests/fast/url/mailto_t01: RuntimeError
+LayoutTests/fast/url/path_t01: RuntimeError
+LayoutTests/fast/url/query_t01: RuntimeError
+LayoutTests/fast/url/relative-win_t01: RuntimeError
+LayoutTests/fast/url/relative_t01: RuntimeError
+LayoutTests/fast/url/segments_t01: RuntimeError
+LayoutTests/fast/url/standard-url_t01: RuntimeError
+LayoutTests/fast/writing-mode/flipped-blocks-hit-test-overflow_t01: RuntimeError
+LayoutTests/fast/writing-mode/flipped-blocks-text-map-local-to-container_t01: RuntimeError
+LayoutTests/fast/writing-mode/percentage-margins-absolute-replaced_t01: RuntimeError, Pass
+LayoutTests/fast/writing-mode/percentage-margins-absolute_t01: RuntimeError, Pass
+LayoutTests/fast/writing-mode/table-hit-test_t01: RuntimeError
+LayoutTests/fast/xmlhttprequest/xmlhttprequest-responseXML-html-document-responsetype-quirks_t01: RuntimeError
+LayoutTests/fast/xmlhttprequest/xmlhttprequest-responseXML-xml-text-responsetype_t01: RuntimeError
+LayoutTests/fast/xpath/4XPath/Borrowed/od_20000608_t01: RuntimeError
+LayoutTests/fast/xpath/4XPath/Core/test_node_test_t02: RuntimeError
+LayoutTests/fast/xpath/4XPath/Core/test_parser_t01: RuntimeError
+LayoutTests/fast/xpath/ambiguous-operators_t01: RuntimeError
+LayoutTests/fast/xpath/ensure-null-namespace_t01: RuntimeError
+LayoutTests/fast/xpath/implicit-node-args_t01: RuntimeError
+LayoutTests/fast/xpath/node-name-case-sensitivity_t02: RuntimeError
+LayoutTests/fast/xpath/py-dom-xpath/expressions_t01: RuntimeError
+LayoutTests/fast/xsl/default-html_t01: RuntimeError
+LibTest/async/Future/asStream_A01_t02: RuntimeError
+LibTest/async/Stream/Stream.fromFutures_A04_t01: RuntimeError
+LibTest/async/Stream/Stream.fromFutures_A04_t02: RuntimeError
+LibTest/async/Stream/Stream.fromIterable_A02_t01: RuntimeError, Pass
+LibTest/async/Stream/Stream.fromIterable_A03_t02: RuntimeError
+LibTest/async/Stream/Stream.periodic_A04_t02: RuntimeError
+LibTest/async/Stream/Stream.periodic_A04_t03: RuntimeError
+LibTest/async/StreamController/StreamController.broadcast_A03_t02: RuntimeError
+LibTest/async/StreamController/StreamController.broadcast_A09_t02: RuntimeError
+LibTest/async/StreamController/StreamController.broadcast_A09_t03: RuntimeError
+LibTest/async/StreamController/StreamController.broadcast_A10_t02: RuntimeError
+LibTest/async/StreamController/StreamController.broadcast_A10_t03: RuntimeError
+LibTest/async/StreamController/addStream_A03_t01: RuntimeError
+LibTest/async/StreamController/stream_A02_t03: RuntimeError
+LibTest/async/StreamController/stream_A03_t02: RuntimeError
+LibTest/async/StreamSink/addStream_A01_t02: RuntimeError
+LibTest/async/StreamTransformer/StreamTransformer.fromHandlers_A01_t03: RuntimeError
+LibTest/async/Zone/registerBinaryCallback_A01_t01: RuntimeError
+LibTest/collection/DoubleLinkedQueue/fold_A01_t01: RuntimeError
+LibTest/collection/DoubleLinkedQueue/removeWhere_A02_t03: RuntimeError
+LibTest/collection/DoubleLinkedQueue/retainWhere_A02_t02: RuntimeError
+LibTest/collection/HashSet/HashSet_A04_t01: RuntimeError
+LibTest/collection/HashSet/HashSet_class_A01_t01: RuntimeError
+LibTest/collection/IterableBase/IterableBase_class_A01_t02: RuntimeError
+LibTest/collection/IterableMixin/contains_A02_t01: RuntimeError
+LibTest/collection/IterableMixin/every_A01_t02: RuntimeError
+LibTest/collection/IterableMixin/expand_A01_t01: RuntimeError
+LibTest/collection/IterableMixin/expand_A02_t01: RuntimeError
+LibTest/collection/IterableMixin/fold_A01_t01: RuntimeError
+LibTest/collection/LinkedList/addAll_A01_t02: RuntimeError
+LibTest/collection/LinkedList/join_A01_t01: RuntimeError
+LibTest/collection/LinkedList/toString_A03_t01: RuntimeError
+LibTest/collection/LinkedListEntry/LinkedListEntry_class_A03_t01: RuntimeError
+LibTest/collection/LinkedListEntry/insertAfter_A02_t02: RuntimeError
+LibTest/collection/LinkedListEntry/insertBefore_A01_t01: RuntimeError
+LibTest/collection/LinkedListEntry/insertBefore_A01_t02: RuntimeError
+LibTest/collection/LinkedListEntry/list_A01_t01: RuntimeError
+LibTest/collection/LinkedListEntry/next_A01_t02: RuntimeError
+LibTest/collection/LinkedListEntry/next_A01_t03: RuntimeError
+LibTest/collection/LinkedListEntry/previous_A01_t02: RuntimeError
+LibTest/collection/LinkedListEntry/previous_A01_t03: RuntimeError
+LibTest/collection/LinkedListEntry/unlink_A01_t01: RuntimeError
+LibTest/collection/LinkedListEntry/unlink_A02_t02: RuntimeError
+LibTest/collection/ListMixin/ListMixin_class_A01_t01: RuntimeError
+LibTest/collection/ListQueue/ListQueue.from_A01_t01: RuntimeError
+LibTest/convert/LineSplitter/fuse_A01_t01: RuntimeError
+LibTest/core/AssertionError/AssertionError_A01_t01: RuntimeError
+LibTest/core/AssertionError/message_A01_t01: RuntimeError
+LibTest/core/CyclicInitializationError/CyclicInitializationError.class_A01_t01: RuntimeError
+LibTest/core/CyclicInitializationError/variableName_A01_t01: RuntimeError
+LibTest/core/DateTime/DateTime.fromMicrosecondsSinceEpoch_A01_t01: RuntimeError
+LibTest/core/DateTime/microsecond_A01_t01: RuntimeError
+LibTest/core/DateTime/microsecondsSinceEpoch_A01_t01: RuntimeError
+LibTest/core/DateTime/parse_A01_t03: RuntimeError
+LibTest/core/DateTime/to8601String_A01_t01: RuntimeError
+LibTest/core/DateTime/to8601String_A01_t02: RuntimeError
+LibTest/core/Duration/Duration_A01_t01: CompileTimeError
+LibTest/core/Duration/Duration_A02_t01: CompileTimeError
+LibTest/core/Duration/inDays_A01_t01: CompileTimeError
+LibTest/core/Duration/inHours_A01_t01: CompileTimeError
+LibTest/core/Duration/inMicroseconds_A01_t01: CompileTimeError
+LibTest/core/Duration/inMilliseconds_A01_t01: CompileTimeError
+LibTest/core/Duration/inSeconds_A01_t01: CompileTimeError
+LibTest/core/Error/stackTrace_A01_t01: RuntimeError
+LibTest/core/Expando/operator_square_brackets_A01_t01: RuntimeError
+LibTest/core/Expando/operator_square_brackets_A01_t04: RuntimeError
+LibTest/core/Expando/operator_square_brackets_A01_t05: RuntimeError
+LibTest/core/Function/Function_class_A01_t01: RuntimeError
+LibTest/core/IndexError/stackTrace_A01_t01: RuntimeError
+LibTest/core/RegExp/Pattern_semantics/firstMatch_NonEmptyClassRanges_A01_t01: RuntimeError
+LibTest/core/Runes/any_A01_t01: RuntimeError
+LibTest/core/Runes/every_A01_t01: RuntimeError
+LibTest/core/String/padRight_A01_t01: RuntimeError
+LibTest/core/String/replaceFirstMapped_A03_t01: RuntimeError
+LibTest/core/Symbol/Symbol_A01_t04: RuntimeError
+LibTest/core/Uri/Uri.dataFromBytes_A01_t02: RuntimeError
+LibTest/core/Uri/Uri.dataFromBytes_A01_t03: RuntimeError
+LibTest/core/Uri/Uri.dataFromBytes_A01_t04: RuntimeError
+LibTest/core/Uri/Uri.dataFromBytes_A01_t05: RuntimeError
+LibTest/core/Uri/Uri.dataFromString_A01_t01: RuntimeError
+LibTest/core/Uri/Uri.dataFromString_A01_t03: RuntimeError
+LibTest/core/Uri/Uri.dataFromString_A01_t04: RuntimeError
+LibTest/core/Uri/Uri.dataFromString_A02_t03: RuntimeError
+LibTest/core/Uri/Uri.file_A02_t03: RuntimeError
+LibTest/core/Uri/queryParametersAll_A01_t04: RuntimeError
+LibTest/core/Uri/queryParametersAll_A03_t01: RuntimeError
+LibTest/core/UriData/UriData.fromBytes_A01_t03: RuntimeError
+LibTest/core/UriData/charset_A01_t01: RuntimeError
+LibTest/core/UriData/contentText_A01_t01: RuntimeError
+LibTest/core/UriData/parse_A01_t01: RuntimeError
+LibTest/core/double/INFINITY_A01_t04: RuntimeError
+LibTest/core/double/NEGATIVE_INFINITY_A01_t04: RuntimeError
+LibTest/core/double/isInfinite_A01_t03: CompileTimeError
+LibTest/core/double/operator_GE_A01_t02: CompileTimeError
+LibTest/core/double/operator_GT_A01_t02: CompileTimeError
+LibTest/core/double/operator_LT_A01_t02: CompileTimeError
+LibTest/core/double/operator_addition_A01_t08: Crash
+LibTest/core/double/operator_subtraction_A01_t06: RuntimeError
+LibTest/core/double/operator_subtraction_A01_t09: Crash
+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/hashCode_A01_t01: CompileTimeError
+LibTest/core/int/isInfinite_A01_t01: CompileTimeError
+LibTest/core/int/isNegative_A01_t01: CompileTimeError
+LibTest/core/int/isOdd_A01_t01: RuntimeError
+LibTest/core/int/operator_AND_A01_t01: CompileTimeError
+LibTest/core/int/operator_GE_A01_t01: CompileTimeError
+LibTest/core/int/operator_LT_A01_t01: CompileTimeError
+LibTest/core/int/operator_XOR_A01_t01: CompileTimeError
+LibTest/core/int/operator_addition_A01_t01: CompileTimeError
+LibTest/core/int/operator_equality_A01_t01: CompileTimeError
+LibTest/core/int/operator_equality_A03_t01: CompileTimeError
+LibTest/core/int/operator_left_shift_A01_t01: RuntimeError
+LibTest/core/int/operator_remainder_A01_t03: RuntimeError
+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: RuntimeError
+LibTest/core/int/operator_unary_minus_A01_t01: CompileTimeError
+LibTest/core/int/parse_A03_t02: CompileTimeError
+LibTest/core/int/roundToDouble_A01_t01: CompileTimeError
+LibTest/core/int/truncateToDouble_A01_t01: CompileTimeError
+LibTest/html/CanvasRenderingContext2D/addEventListener_A01_t03: Timeout
+LibTest/html/Element/blur_A01_t01: Timeout, Pass
+LibTest/html/Element/focus_A01_t01: Timeout, Pass
+LibTest/html/Element/loadEvent_A01_t01: Timeout
+LibTest/html/Element/mouseWheelEvent_A01_t01: Timeout
+LibTest/html/Element/onLoad_A01_t01: Timeout, Pass
+LibTest/html/Element/onMouseWheel_A01_t01: Timeout
+LibTest/html/Element/transitionEndEvent_A01_t01: Timeout
+LibTest/html/HttpRequest/responseText_A01_t02: Timeout
+LibTest/html/HttpRequestUpload/onError_A01_t02: Timeout
+LibTest/html/HttpRequestUpload/onLoadEnd_A01_t01: Timeout
+LibTest/html/HttpRequestUpload/onLoadStart_A01_t01: Timeout
+LibTest/html/HttpRequestUpload/onLoad_A01_t01: Timeout, Pass
+LibTest/html/IFrameElement/enteredView_A01_t01: Timeout, Pass
+LibTest/html/IFrameElement/focus_A01_t01: Timeout, Pass
+LibTest/html/IFrameElement/onMouseWheel_A01_t01: Timeout
+LibTest/html/IFrameElement/onTransitionEnd_A01_t01: Timeout
+LibTest/typed_data/Int16List/shuffle_A01_t01: RuntimeError, Pass
+Utils/tests/Expect/throws_A01_t04: RuntimeError
+WebPlatformTest/DOMEvents/approved/ProcessingInstruction.DOMCharacterDataModified_t01: Timeout
+WebPlatformTest/DOMEvents/approved/addEventListener.optional.useCapture_t01: RuntimeError
+WebPlatformTest/Utils/test/asyncTestFail_t01: RuntimeError
+WebPlatformTest/Utils/test/asyncTestFail_t02: RuntimeError
+WebPlatformTest/Utils/test/asyncTestTimeout_t01: Timeout
+WebPlatformTest/custom-elements/concepts/type_A03_t01: RuntimeError
+WebPlatformTest/custom-elements/instantiating/createElementNS_A05_t01: RuntimeError
+WebPlatformTest/dom/events/type_A01_t01: RuntimeError
+WebPlatformTest/dom/nodes/DOMImplementation-createDocument_t01: RuntimeError
+WebPlatformTest/dom/nodes/Document-adoptNode_t01: RuntimeError
+WebPlatformTest/dom/nodes/Node-insertBefore_t01: RuntimeError
+WebPlatformTest/dom/nodes/Node-isEqualNode_t01: Timeout
+WebPlatformTest/dom/nodes/Node-nodeName_t01: RuntimeError
+WebPlatformTest/dom/nodes/attributes/setAttributeNS_A07_t03: RuntimeError
+WebPlatformTest/dom/nodes/attributes/setAttribute_A03_t01: RuntimeError
+WebPlatformTest/html-imports/link-import_t02: RuntimeError
+WebPlatformTest/html-imports/loading-import_t01: RuntimeError
+WebPlatformTest/html-templates/innerhtml-on-templates/innerhtml_t01: RuntimeError
+WebPlatformTest/html-templates/parsing-html-templates/additions-to-the-in-head-insertion-mode/generating-of-implied-end-tags_t01: RuntimeError
+WebPlatformTest/html-templates/parsing-html-templates/clearing-the-stack-back-to-a-given-context/clearing-stack-back-to-a-table-body-context_t01: RuntimeError
+WebPlatformTest/html/browsers/browsing-the-web/read-media/pageload-video_t01: RuntimeError
+WebPlatformTest/html/dom/documents/dom-tree-accessors/document.body-setter_t01: RuntimeError
+WebPlatformTest/html/dom/documents/dom-tree-accessors/document.getElementsByName-namespace_t01: RuntimeError
+WebPlatformTest/html/dom/elements/global-attributes/dataset-get_t01: RuntimeError
+WebPlatformTest/html/semantics/embedded-content/media-elements/error-codes/error_t01: Timeout
+WebPlatformTest/html/semantics/embedded-content/media-elements/interfaces/HTMLElement/HTMLMediaElement/addTextTrack_t01: RuntimeError
+WebPlatformTest/html/semantics/embedded-content/media-elements/interfaces/HTMLElement/HTMLTrackElement/kind_t01: RuntimeError
+WebPlatformTest/html/semantics/embedded-content/media-elements/interfaces/TextTrack/cues_t01: Timeout
+WebPlatformTest/html/semantics/embedded-content/media-elements/interfaces/TextTrack/kind_t01: RuntimeError
+WebPlatformTest/html/semantics/forms/textfieldselection/textfieldselection-setRangeText_t01: RuntimeError
+WebPlatformTest/html/semantics/forms/textfieldselection/textfieldselection-setSelectionRange_t01: RuntimeError, Pass
+WebPlatformTest/html/semantics/forms/the-button-element/button-validation_t01: RuntimeError
+WebPlatformTest/html/semantics/forms/the-form-element/form-elements-matches_t01: RuntimeError
+WebPlatformTest/html/semantics/forms/the-form-element/form-nameditem_t01: RuntimeError
+WebPlatformTest/html/semantics/forms/the-input-element/datetime_t02: RuntimeError
+WebPlatformTest/html/semantics/forms/the-input-element/input-type-button_t01: RuntimeError
+WebPlatformTest/html/semantics/forms/the-input-element/mobiles_t01: RuntimeError
+WebPlatformTest/html/semantics/forms/the-input-element/month_t01: RuntimeError
+WebPlatformTest/html/semantics/forms/the-input-element/password_t01: RuntimeError
+WebPlatformTest/html/semantics/forms/the-input-element/range_t01: RuntimeError
+WebPlatformTest/html/semantics/forms/the-input-element/time_t01: RuntimeError
+WebPlatformTest/html/semantics/forms/the-input-element/time_t02: RuntimeError
+WebPlatformTest/html/semantics/forms/the-input-element/type-change-state_t01: RuntimeError
+WebPlatformTest/html/semantics/forms/the-input-element/week_t01: RuntimeError
+WebPlatformTest/html/semantics/forms/the-option-element/option-text-spaces_t01: RuntimeError
+WebPlatformTest/html/semantics/forms/the-textarea-element/textarea-type_t01: RuntimeError
+WebPlatformTest/html/semantics/interactive-elements/the-dialog-element/dialog-close_t01: RuntimeError
+WebPlatformTest/html/semantics/selectors/pseudo-classes/checked_t01: RuntimeError
+WebPlatformTest/html/semantics/selectors/pseudo-classes/focus_t01: RuntimeError, Pass
+WebPlatformTest/html/semantics/selectors/pseudo-classes/indeterminate_t01: RuntimeError
+WebPlatformTest/html/semantics/selectors/pseudo-classes/link_t01: RuntimeError
+WebPlatformTest/html/semantics/tabular-data/attributes-common-to-td-and-th-elements/cellIndex_t01: RuntimeError
+WebPlatformTest/html/semantics/tabular-data/the-table-element/table-rows_t01: RuntimeError
+WebPlatformTest/html/webappapis/system-state-and-capabilities/the-navigator-object/protocol_t00: RuntimeError
+WebPlatformTest/shadow-dom/elements-and-dom-objects/extensions-to-element-interface/attributes/test-001_t01: RuntimeError
+WebPlatformTest/shadow-dom/elements-and-dom-objects/extensions-to-element-interface/attributes/test-005_t01: RuntimeError
+WebPlatformTest/shadow-dom/elements-and-dom-objects/extensions-to-element-interface/methods/test-003_t01: RuntimeError
+WebPlatformTest/shadow-dom/elements-and-dom-objects/the-content-html-element/test-004_t02: RuntimeError
+WebPlatformTest/shadow-dom/elements-and-dom-objects/the-shadow-html-element/test-002_t01: RuntimeError
+WebPlatformTest/shadow-dom/elements-and-dom-objects/the-shadow-html-element/test-003_t01: RuntimeError
+WebPlatformTest/shadow-dom/elements-and-dom-objects/the-shadow-html-element/test-005_t01: RuntimeError
+WebPlatformTest/shadow-dom/events/event-dispatch/test-002_t01: RuntimeError
+WebPlatformTest/shadow-dom/events/event-retargeting/test-001_t01: RuntimeError
+WebPlatformTest/shadow-dom/events/retargeting-focus-events/test-001_t01: Timeout, Pass
+WebPlatformTest/shadow-dom/events/retargeting-focus-events/test-001_t02: Timeout, Pass
+WebPlatformTest/shadow-dom/events/retargeting-focus-events/test-001_t05: Timeout, Pass
+WebPlatformTest/shadow-dom/events/retargeting-focus-events/test-001_t06: Timeout, Pass
+WebPlatformTest/shadow-dom/events/retargeting-relatedtarget/test-001_t01: RuntimeError, Pass
+WebPlatformTest/shadow-dom/html-elements-and-their-shadow-trees/test-001_t01: RuntimeError
+WebPlatformTest/shadow-dom/html-elements-and-their-shadow-trees/test-003_t01: RuntimeError
+WebPlatformTest/shadow-dom/html-elements-and-their-shadow-trees/test-004_t01: RuntimeError
+WebPlatformTest/shadow-dom/shadow-trees/custom-pseudo-elements/test-001_t01: RuntimeError
+WebPlatformTest/shadow-dom/shadow-trees/distributed-pseudo-element/test-002_t01: RuntimeError
+WebPlatformTest/shadow-dom/shadow-trees/hosting-multiple-shadow-trees/test-003_t01: RuntimeError
+WebPlatformTest/shadow-dom/shadow-trees/reprojection/test-001_t01: RuntimeError
+WebPlatformTest/shadow-dom/shadow-trees/upper-boundary-encapsulation/ownerdocument-002_t01: RuntimeError
+WebPlatformTest/shadow-dom/shadow-trees/upper-boundary-encapsulation/test-005_t01: RuntimeError
+WebPlatformTest/webstorage/event_constructor_t02: RuntimeError
+WebPlatformTest/webstorage/event_local_key_t01: Timeout
+WebPlatformTest/webstorage/event_local_newvalue_t01: Timeout
+WebPlatformTest/webstorage/event_local_oldvalue_t01: Timeout
+WebPlatformTest/webstorage/event_local_storagearea_t01: Timeout
+WebPlatformTest/webstorage/event_local_url_t01: Timeout, Pass
+WebPlatformTest/webstorage/event_session_key_t01: Timeout, Pass
+WebPlatformTest/webstorage/event_session_newvalue_t01: Timeout
+WebPlatformTest/webstorage/event_session_oldvalue_t01: Timeout
+WebPlatformTest/webstorage/event_session_storagearea_t01: Timeout
+WebPlatformTest/webstorage/event_session_url_t01: Timeout
+
+[ $compiler == dart2js && $runtime == chrome && $system == linux && $fast_startup ]
+LayoutTests/fast/animation/request-animation-frame-cancel_t01: Timeout, Pass
+LayoutTests/fast/canvas/webgl/read-pixels-test_t01: RuntimeError, Pass
+LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-image-data_t01: RuntimeError, Pass
+LayoutTests/fast/dom/HTMLDialogElement/submit-dialog-close-event_t01: Timeout, Pass
+LayoutTests/fast/table/col-width-span-expand_t01: RuntimeError, Pass
+LayoutTests/fast/text/international/combining-marks-position_t01: RuntimeError
+
+[ $compiler == dart2js && $runtime == chrome && $system == macos ]
+LayoutTests/fast/canvas/webgl/gl-get-calls_t01: RuntimeError, Pass
+LayoutTests/fast/canvas/webgl/tex-input-validation_t01: RuntimeError, Pass
+LayoutTests/fast/css/fontface-properties_t01: RuntimeError, Pass
+LayoutTests/fast/dom/shadow/elementfrompoint_t01: RuntimeError, Pass
+LayoutTests/fast/dom/vertical-scrollbar-in-rtl-doesnt-fire-onscroll_t01: RuntimeError, Pass
+LayoutTests/fast/events/scroll-event-does-not-bubble_t01: Timeout, Pass
+LayoutTests/fast/filesystem/async-operations_t01: RuntimeError, Pass
+LayoutTests/fast/forms/button-baseline-and-collapsing_t01: RuntimeError
+LayoutTests/fast/forms/percent-height-auto-width-form-controls_t01: RuntimeError, Pass
+LayoutTests/fast/multicol/column-width-zero_t01: RuntimeError, Pass
+LayoutTests/fast/shapes/parsing/parsing-shape-outside_t01: RuntimeError, Pass
+LayoutTests/fast/shapes/shape-outside-floats/shape-outside-floats-image-margin_t02: RuntimeError, Pass
+LayoutTests/fast/speechsynthesis/speech-synthesis-boundary-events_t01: RuntimeError, Pass
+LayoutTests/fast/text/sub-pixel/text-scaling-rtl_t01: RuntimeError, Pass
+
+[ $compiler == dart2js && $runtime == chrome && $system == macos && $fast_startup ]
+LayoutTests/fast/canvas/webgl/gl-get-calls_t01: RuntimeError
+LayoutTests/fast/css/overflow-property_t01: RuntimeError, Pass
+LayoutTests/fast/dom/shadow/elementfrompoint_t01: RuntimeError, Pass
+LayoutTests/fast/events/fire-scroll-event-element_t01: Timeout, Pass
+LayoutTests/fast/forms/percent-height-auto-width-form-controls_t01: RuntimeError
+LayoutTests/fast/shapes/parsing/parsing-shape-outside_t01: RuntimeError, Pass
+LayoutTests/fast/text/sub-pixel/text-scaling-rtl_t01: RuntimeError
+
+[ $compiler == dart2js && $runtime == chrome && $system == windows ]
+LayoutTests/fast/css/font-face-multiple-ranges-for-unicode-range_t01: RuntimeError
+LayoutTests/fast/filesystem/async-operations_t01: RuntimeError, Pass
+LayoutTests/fast/text/regional-indicator-symobls_t01: RuntimeError
+LibTest/typed_data/Uint8List/shuffle_A01_t01: RuntimeError, Pass
+
+[ $compiler == dart2js && $runtime == chrome && $fast_startup ]
+LayoutTests/fast/canvas/setWidthResetAfterForcedRender_t01: Timeout, Pass
+LayoutTests/fast/canvas/webgl/css-webkit-canvas_t01: RuntimeError, Pass
+LayoutTests/fast/canvas/webgl/gl-bind-attrib-location-test_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-canvas_t01: RuntimeError, Pass
+LayoutTests/fast/canvas/webgl/tex-input-validation_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/texImageTest_t01: RuntimeError, Pass
+LayoutTests/fast/css/cssText-shorthand_t01: RuntimeError
+LayoutTests/fast/css/font-face-cache-bug_t01: RuntimeError, Pass
+LayoutTests/fast/dom/DOMException/XPathException_t01: RuntimeError
+LayoutTests/fast/dom/shadow/shadowhost-keyframes_t01: RuntimeError, Pass
+LayoutTests/fast/dom/vertical-scrollbar-in-rtl-doesnt-fire-onscroll_t01: RuntimeError, Pass
+LayoutTests/fast/filesystem/async-operations_t01: RuntimeError, Pass
+LayoutTests/fast/replaced/iframe-with-percentage-height-within-table-with-anonymous-table-cell_t01: RuntimeError
+LayoutTests/fast/shapes/shape-outside-floats/shape-outside-floats-image-margin_t02: RuntimeError
+LayoutTests/fast/sub-pixel/computedstylemargin_t01: RuntimeError, Pass
+LayoutTests/fast/table/css-table-max-height_t01: RuntimeError
+LayoutTests/fast/table/css-table-width-with-border-padding_t01: RuntimeError
+LayoutTests/fast/table/hittest-tablecell-right-edge_t01: RuntimeError
+LayoutTests/fast/table/hittest-tablecell-with-borders-right-edge_t01: RuntimeError
+LayoutTests/fast/table/margins-perpendicular-containing-block_t01: RuntimeError
+LayoutTests/fast/table/min-max-width-preferred-size_t01: RuntimeError
+LayoutTests/fast/table/table-all-rowspans-height-distribution-in-rows-except-overlapped_t01: RuntimeError
+LayoutTests/fast/table/table-width-exceeding-max-width_t01: RuntimeError
+LayoutTests/fast/text-autosizing/vertical-writing-mode_t01: RuntimeError
+LayoutTests/fast/text/find-spaces_t01: RuntimeError
+LayoutTests/fast/text/international/cjk-segmentation_t01: RuntimeError
+LayoutTests/fast/transforms/bounding-rect-zoom_t01: RuntimeError
+LayoutTests/fast/transforms/hit-test-large-scale_t01: RuntimeError
+LibTest/math/cos_A01_t01: RuntimeError
+WebPlatformTest/html/semantics/scripting-1/the-script-element/async_t11: RuntimeError
+WebPlatformTest/html/syntax/parsing/Document.getElementsByTagName-foreign_t01: RuntimeError
+WebPlatformTest/shadow-dom/events/retargeting-relatedtarget/test-002_t01: RuntimeError, Pass
+
+[ $compiler == dart2js && $runtime == chrome && !$fast_startup ]
+WebPlatformTest/html/syntax/parsing/Document.getElementsByTagName-foreign_t01: RuntimeError
+
+[ $compiler == dart2js && $runtime != chrome ]
+LayoutTests/fast/backgrounds/background-repeat-computed-style_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-ellipse-zero-lineto_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-scale-strokePath-shadow_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/gl-teximage_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-image-rgb565_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-image_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-video_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/texture-color-profile_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/texture-transparent-pixels-initialized_t01: RuntimeError
+LayoutTests/fast/css-generated-content/pseudo-transition-event_t01: RuntimeError
+LayoutTests/fast/css/dynamic-class-backdrop-pseudo_t01: RuntimeError
+LayoutTests/fast/css/invalidation/detach-reattach-shadow_t01: RuntimeError
+LayoutTests/fast/css/invalidation/shadow-host-toggle_t01: RuntimeError
+LayoutTests/fast/css/percent-min-width-img-src-change_t01: RuntimeError
+LayoutTests/fast/css/percent-width-img-src-change_t01: RuntimeError
+LayoutTests/fast/css/pseudo-target-indirect-sibling-002_t01: RuntimeError
+LayoutTests/fast/css/style-scoped/style-scoped-in-shadow_t01: RuntimeError
+LayoutTests/fast/dom/HTMLDialogElement/dialog-enabled_t01: RuntimeError
+LayoutTests/fast/dom/HTMLDialogElement/dialog-show-modal_t01: RuntimeError
+LayoutTests/fast/dom/HTMLDialogElement/inert-does-not-match-disabled-selector_t01: RuntimeError
+LayoutTests/fast/dom/HTMLImageElement/image-loading-gc_t01: RuntimeError
+LayoutTests/fast/dom/HTMLScriptElement/defer-onbeforeload_t01: RuntimeError
+LayoutTests/fast/dom/HTMLScriptElement/remove-in-beforeload_t01: RuntimeError
+LayoutTests/fast/dom/HTMLScriptElement/script-load-events_t01: RuntimeError
+LayoutTests/fast/dom/HTMLTemplateElement/innerHTML-inert_t01: RuntimeError
+LayoutTests/fast/dom/StyleSheet/css-insert-import-rule-to-shadow-stylesheets_t01: RuntimeError
+LayoutTests/fast/dom/anchor-without-content_t01: RuntimeError
+LayoutTests/fast/dom/blur-contenteditable_t01: RuntimeError, Pass
+LayoutTests/fast/dom/custom/constructor-calls-created-synchronously_t01: RuntimeError
+LayoutTests/fast/dom/custom/document-register-namespace_t01: RuntimeError
+LayoutTests/fast/dom/custom/document-register-on-create-callback_t01: RuntimeError
+LayoutTests/fast/dom/custom/document-register-type-extensions_t01: RuntimeError
+LayoutTests/fast/dom/custom/element-type_t01: RuntimeError
+LayoutTests/fast/dom/custom/element-upgrade_t01: RuntimeError
+LayoutTests/fast/dom/custom/type-extensions_t01: RuntimeError
+LayoutTests/fast/dom/importNode-unsupported-node-type_t01: RuntimeError
+LayoutTests/fast/dom/navigatorcontentutils/register-protocol-handler_t01: RuntimeError, Pass
+LayoutTests/fast/dom/shadow/content-element-api_t01: RuntimeError
+LayoutTests/fast/dom/shadow/content-element-crash_t01: RuntimeError
+LayoutTests/fast/dom/shadow/content-element-outside-shadow-style_t01: RuntimeError
+LayoutTests/fast/dom/shadow/content-pseudo-element-css-text_t01: RuntimeError
+LayoutTests/fast/dom/shadow/content-pseudo-element-overridden_t01: RuntimeError
+LayoutTests/fast/dom/shadow/content-reprojection-fallback-crash_t01: RuntimeError
+LayoutTests/fast/dom/shadow/custom-pseudo-in-selector-api_t01: RuntimeError
+LayoutTests/fast/dom/shadow/form-in-shadow_t01: RuntimeError
+LayoutTests/fast/dom/shadow/get-distributed-nodes-orphan_t01: RuntimeError
+LayoutTests/fast/dom/shadow/get-element-by-id-in-shadow-mutation_t01: RuntimeError
+LayoutTests/fast/dom/shadow/getelementbyid-shadow_t01: RuntimeError
+LayoutTests/fast/dom/shadow/host-context-pseudo-class-css-text_t01: RuntimeError
+LayoutTests/fast/dom/shadow/host-pseudo-class-css-text_t01: RuntimeError
+LayoutTests/fast/dom/shadow/host-wrapper-reclaimed_t01: RuntimeError
+LayoutTests/fast/dom/shadow/reinsert-insertion-point_t01: RuntimeError
+LayoutTests/fast/dom/shadow/remove-and-insert-style_t01: RuntimeError
+LayoutTests/fast/dom/shadow/remove-styles-in-shadow-crash-2_t01: RuntimeError
+LayoutTests/fast/dom/shadow/remove-styles-in-shadow-crash_t01: RuntimeError
+LayoutTests/fast/dom/shadow/shadow-element_t01: RuntimeError
+LayoutTests/fast/dom/shadow/shadow-root-append_t01: RuntimeError
+LayoutTests/fast/dom/shadow/shadowdom-dynamic-styling_t01: RuntimeError
+LayoutTests/fast/dom/shadow/shadowdom-for-unknown-with-form_t01: RuntimeError
+LayoutTests/fast/dom/shadow/shadowhost-keyframes_t01: RuntimeError
+LayoutTests/fast/dom/shadow/shadowroot-keyframes_t01: RuntimeError
+LayoutTests/fast/dom/shadow/style-insertion-crash_t01: RuntimeError
+LayoutTests/fast/dom/shadow/style-of-distributed-node_t01: RuntimeError
+LayoutTests/fast/dom/shadow/style-sharing-sibling-shadow_t01: RuntimeError
+LayoutTests/fast/dom/shadow/suppress-mutation-events-in-shadow-characterdata_t01: RuntimeError
+LayoutTests/fast/dom/shadow/title-element-in-shadow_t01: RuntimeError
+LayoutTests/fast/events/label-focus_t01: RuntimeError, Pass
+LayoutTests/fast/filesystem/file-from-file-entry_t01: RuntimeError
+LayoutTests/fast/filesystem/file-writer-abort-depth_t01: RuntimeError
+LayoutTests/fast/filesystem/file-writer-empty-blob_t01: RuntimeError
+LayoutTests/fast/filesystem/file-writer-gc-blob_t01: RuntimeError
+LayoutTests/fast/filesystem/filesystem-reference_t01: RuntimeError
+LayoutTests/fast/filesystem/op-get-entry_t01: RuntimeError
+LayoutTests/fast/filesystem/op-move_t01: RuntimeError
+LayoutTests/fast/filesystem/op-remove_t01: RuntimeError
+LayoutTests/fast/filesystem/op-restricted-unicode_t01: RuntimeError
+LayoutTests/fast/filesystem/read-directory-many_t01: RuntimeError
+LayoutTests/fast/filesystem/simple-readonly_t01: RuntimeError
+LayoutTests/fast/filesystem/simple-required-arguments-getdirectory_t01: RuntimeError
+LayoutTests/fast/filesystem/simple-required-arguments-getfile_t01: RuntimeError
+LayoutTests/fast/forms/button-baseline-and-collapsing_t01: RuntimeError
+LayoutTests/fast/forms/datalist/datalist-child-validation_t01: RuntimeError
+LayoutTests/fast/forms/datalist/input-list_t01: RuntimeError
+LayoutTests/fast/forms/date/ValidityState-rangeOverflow-date_t01: RuntimeError
+LayoutTests/fast/forms/date/ValidityState-rangeUnderflow-date_t01: RuntimeError
+LayoutTests/fast/forms/date/ValidityState-stepMismatch-date_t01: RuntimeError
+LayoutTests/fast/forms/datetimelocal-multiple-fields/datetimelocal-multiple-fields-change-layout-by-value_t01: RuntimeError
+LayoutTests/fast/forms/datetimelocal/ValidityState-rangeOverflow-datetimelocal_t01: RuntimeError
+LayoutTests/fast/forms/datetimelocal/ValidityState-rangeUnderflow-datetimelocal_t01: RuntimeError
+LayoutTests/fast/forms/datetimelocal/ValidityState-stepMismatch-datetimelocal_t01: RuntimeError
+LayoutTests/fast/forms/datetimelocal/datetimelocal-pseudo-classes_t01: RuntimeError
+LayoutTests/fast/forms/select-max-length_t01: RuntimeError
+LayoutTests/fast/loader/onhashchange-attribute-listeners_t01: RuntimeError
+LayoutTests/fast/shapes/parsing/parsing-shape-outside_t01: RuntimeError
+LayoutTests/fast/speechsynthesis/speech-synthesis-pause-resume_t01: RuntimeError
+LayoutTests/fast/speechsynthesis/speech-synthesis-speak_t01: RuntimeError
+LayoutTests/fast/svg/tabindex-focus_t01: RuntimeError
+LayoutTests/fast/svg/whitespace-integer_t01: RuntimeError
+LayoutTests/fast/table/col-width-span-expand_t01: RuntimeError, Pass
+LayoutTests/fast/text/international/listbox-width-rtl_t01: RuntimeError
+LayoutTests/fast/text/sub-pixel/text-scaling-rtl_t01: RuntimeError
+LayoutTests/fast/url/port_t01: RuntimeError
+LibTest/html/Element/attributeChanged_A01_t01: RuntimeError
+LibTest/html/Element/enteredView_A01_t01: RuntimeError
+LibTest/html/Element/leftView_A01_t01: RuntimeError
+LibTest/html/Element/onLoad_A01_t01: RuntimeError
+LibTest/html/Element/onTransitionEnd_A01_t01: RuntimeError
+LibTest/html/Element/tagName_A01_t03: RuntimeError
+LibTest/html/HttpRequest/onError_A01_t02: RuntimeError
+LibTest/html/HttpRequestUpload/onLoad_A01_t01: RuntimeError
+LibTest/html/IFrameElement/IFrameElement.created_A01_t01: RuntimeError
+LibTest/html/IFrameElement/blur_A01_t01: RuntimeError
+LibTest/html/IFrameElement/enteredView_A01_t01: RuntimeError
+LibTest/html/IFrameElement/tagName_A01_t03: RuntimeError
+LibTest/html/Window/requestFileSystem_A01_t01: RuntimeError
+LibTest/html/Window/requestFileSystem_A01_t02: RuntimeError
+WebPlatformTest/custom-elements/concepts/type_A01_t01: RuntimeError
+WebPlatformTest/custom-elements/concepts/type_A07_t01: RuntimeError
+WebPlatformTest/custom-elements/instantiating/createElementNS_A01_t01: RuntimeError
+WebPlatformTest/custom-elements/instantiating/createElementNS_A02_t01: RuntimeError
+WebPlatformTest/custom-elements/instantiating/createElement_A03_t01: RuntimeError
+WebPlatformTest/custom-elements/instantiating/isAttribute_A01_t01: RuntimeError
+WebPlatformTest/custom-elements/instantiating/isAttribute_A02_t01: RuntimeError
+WebPlatformTest/custom-elements/instantiating/namespace_A01_t01: RuntimeError
+WebPlatformTest/shadow-dom/elements-and-dom-objects/extensions-to-element-interface/methods/test-001_t01: RuntimeError
+WebPlatformTest/shadow-dom/elements-and-dom-objects/extensions-to-element-interface/methods/test-002_t01: RuntimeError
+WebPlatformTest/shadow-dom/elements-and-dom-objects/shadowroot-object/shadowroot-attributes/test-007_t01: RuntimeError
+WebPlatformTest/shadow-dom/elements-and-dom-objects/shadowroot-object/shadowroot-attributes/test-008_t01: RuntimeError
+WebPlatformTest/shadow-dom/elements-and-dom-objects/shadowroot-object/shadowroot-attributes/test-010_t01: RuntimeError
+WebPlatformTest/shadow-dom/elements-and-dom-objects/shadowroot-object/shadowroot-attributes/test-012_t01: RuntimeError
+WebPlatformTest/shadow-dom/elements-and-dom-objects/shadowroot-object/shadowroot-methods/test-007_t01: RuntimeError
+WebPlatformTest/shadow-dom/elements-and-dom-objects/shadowroot-object/shadowroot-methods/test-010_t01: RuntimeError
+WebPlatformTest/shadow-dom/elements-and-dom-objects/the-content-html-element/test-001_t01: RuntimeError
+WebPlatformTest/shadow-dom/elements-and-dom-objects/the-content-html-element/test-002_t01: RuntimeError
+WebPlatformTest/shadow-dom/events/event-retargeting/test-003_t01: RuntimeError
+WebPlatformTest/shadow-dom/events/events-that-are-always-stopped/test-002_t01: RuntimeError
+WebPlatformTest/shadow-dom/events/events-that-are-always-stopped/test-004_t01: RuntimeError
+WebPlatformTest/shadow-dom/events/events-that-are-always-stopped/test-006_t01: RuntimeError
+WebPlatformTest/shadow-dom/events/events-that-are-always-stopped/test-009_t01: RuntimeError
+WebPlatformTest/shadow-dom/events/retargeting-focus-events/test-001_t01: RuntimeError
+WebPlatformTest/shadow-dom/events/retargeting-focus-events/test-001_t02: RuntimeError
+WebPlatformTest/shadow-dom/events/retargeting-focus-events/test-001_t03: RuntimeError
+WebPlatformTest/shadow-dom/events/retargeting-focus-events/test-001_t05: RuntimeError
+WebPlatformTest/shadow-dom/events/retargeting-relatedtarget/test-002_t01: RuntimeError
+WebPlatformTest/shadow-dom/html-elements-in-shadow-trees/inert-html-elements/test-002_t01: RuntimeError
+WebPlatformTest/shadow-dom/shadow-trees/lower-boundary-encapsulation/test-003_t01: RuntimeError
+WebPlatformTest/shadow-dom/shadow-trees/satisfying-matching-criteria/test-001_t01: RuntimeError
+WebPlatformTest/shadow-dom/shadow-trees/satisfying-matching-criteria/test-002_t01: RuntimeError
+WebPlatformTest/shadow-dom/shadow-trees/satisfying-matching-criteria/test-003_t01: RuntimeError
+WebPlatformTest/shadow-dom/shadow-trees/satisfying-matching-criteria/test-004_t01: RuntimeError
+WebPlatformTest/shadow-dom/shadow-trees/satisfying-matching-criteria/test-005_t01: RuntimeError
+WebPlatformTest/shadow-dom/shadow-trees/satisfying-matching-criteria/test-017_t01: RuntimeError
+WebPlatformTest/shadow-dom/shadow-trees/upper-boundary-encapsulation/dom-tree-accessors-002_t01: RuntimeError
+WebPlatformTest/shadow-dom/shadow-trees/upper-boundary-encapsulation/shadow-root-001_t01: RuntimeError
+WebPlatformTest/webstorage/event_local_url_t01: RuntimeError
+WebPlatformTest/webstorage/event_session_key_t01: RuntimeError
+WebPlatformTest/webstorage/storage_session_setitem_quotaexceedederr_t01: RuntimeError
+
+[ $compiler == dart2js && $runtime != chrome && $runtime != ff && $runtime != safari && !$fast_startup ]
+Language/Functions/setter_modifier_t02: Crash
+Language/Functions/setter_modifier_t03: Crash
+Language/Functions/setter_modifier_t05: Crash
+Language/Functions/setter_modifier_t06: Crash
+LayoutTests/fast/animation/request-animation-frame-callback-id_t01: RuntimeError
+LayoutTests/fast/animation/request-animation-frame-cancel_t01: RuntimeError
+LayoutTests/fast/animation/request-animation-frame-timestamps-advance_t01: RuntimeError
+LayoutTests/fast/animation/request-animation-frame-timestamps_t01: RuntimeError
+LayoutTests/fast/animation/request-animation-frame-within-callback_t01: RuntimeError
+LayoutTests/fast/backgrounds/001_t01: RuntimeError
+LayoutTests/fast/backgrounds/multiple-backgrounds-computed-style_t01: RuntimeError
+LayoutTests/fast/backgrounds/multiple-backgrounds-initial-values_t01: RuntimeError
+LayoutTests/fast/box-shadow/box-shadow-parsing-invalid_t01: RuntimeError
+LayoutTests/fast/box-sizing/css-table-with-box-sizing_t01: RuntimeError
+LayoutTests/fast/canvas/access-zero-sized-canvas_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-2d-imageData-create-nonfinite_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-arc-negative-radius_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-arc-zero-lineto_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-as-image_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-bezier-same-endpoint_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-color-clamping_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-composite-canvas_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-copyPixels_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-css-crazy_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-drawImage-incomplete_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-ellipse_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-fill-rule_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-getImageData-negative-source_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-getImageData_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-gradient-without-path_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-invalid-strokestyle_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-largedraws_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-lineDash-invalid_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-lineWidth_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-measureText_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-pattern-behaviour_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-pattern-transform_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-radial-gradient-spreadMethod_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-resize-after-paint_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-save-restore_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-set-properties-with-non-invertible-ctm_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-skia-excessive-size_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-strokePath-shadow_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-strokeRect_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-toDataURL-case-insensitive-mimetype_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-toDataURL-jpeg-crash_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-with-incorrect-args_t01: RuntimeError
+LayoutTests/fast/canvas/canvas_arc_largeangles_t01: RuntimeError
+LayoutTests/fast/canvas/change-context_t01: RuntimeError
+LayoutTests/fast/canvas/drawImage-with-negative-source-destination_t01: RuntimeError
+LayoutTests/fast/canvas/drawImageFromRect_withToDataURLAsSource_t01: RuntimeError
+LayoutTests/fast/canvas/fallback-content_t01: RuntimeError
+LayoutTests/fast/canvas/fillrect-gradient-zero-stops_t01: RuntimeError
+LayoutTests/fast/canvas/invalid-set-font-crash_t01: RuntimeError
+LayoutTests/fast/canvas/pointInPath_t01: RuntimeError
+LayoutTests/fast/canvas/radialGradient-infinite-values_t01: RuntimeError
+LayoutTests/fast/canvas/shadow-huge-blur_t01: RuntimeError
+LayoutTests/fast/canvas/text-globalAlpha_t01: RuntimeError
+LayoutTests/fast/canvas/transformed-canvas-reset_t01: RuntimeError
+LayoutTests/fast/canvas/translate-text_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/array-bounds-clamping_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/buffer-bind-test_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/canvas-2d-webgl-texture_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/canvas-test_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/compressed-tex-image_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/context-lost-restored_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/draw-webgl-to-canvas-2d_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/framebuffer-bindings-unaffected-on-resize_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/framebuffer-test_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/gl-enable-enum-test_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/gl-get-calls_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/gl-uniformmatrix4fv_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/gl-vertex-attrib-zero-issues_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/gl-vertexattribpointer_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/index-validation-crash-with-buffer-sub-data_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/invalid-UTF-16_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/invalid-passed-params_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/is-object_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/program-test_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/read-pixels-pack-alignment_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/renderbuffer-initialization_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-canvas-rgba5551_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/tex-image-webgl_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/tex-sub-image-2d-bad-args_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/tex-sub-image-2d_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/tex-sub-image-cube-maps_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/uniform-location-length-limits_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/webgl-composite-modes-repaint_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/webgl-composite-modes_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/webgl-exceptions_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/webgl-layer-update_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/webgl-texture-binding-preserved_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/webgl-viewport-parameters-preserved_t01: RuntimeError
+LayoutTests/fast/canvas/winding-enumeration_t01: RuntimeError
+LayoutTests/fast/css-generated-content/after-with-first-letter-float-crash_t01: RuntimeError
+LayoutTests/fast/css-generated-content/before-content-with-list-marker-in-anon-block-crash_t01: RuntimeError
+LayoutTests/fast/css-generated-content/block-after_t01: RuntimeError
+LayoutTests/fast/css-generated-content/empty-first-letter-with-columns-crash_t01: RuntimeError
+LayoutTests/fast/css-generated-content/first-letter-next-sibling-crash_t01: RuntimeError
+LayoutTests/fast/css-generated-content/float-first-letter-siblings-convert-to-inline_t01: RuntimeError
+LayoutTests/fast/css-generated-content/hit-test-generated-content_t01: RuntimeError
+LayoutTests/fast/css-generated-content/inline-splitting-with-after-float-crash_t01: RuntimeError
+LayoutTests/fast/css-generated-content/media-generated-content_t01: RuntimeError
+LayoutTests/fast/css-generated-content/positioned-generated-content-under-run-in-crash_t01: RuntimeError
+LayoutTests/fast/css-generated-content/pseudo-animation-before-onload_t01: RuntimeError
+LayoutTests/fast/css-generated-content/pseudo-animation-display_t01: RuntimeError
+LayoutTests/fast/css-generated-content/quote-first-letter-crash_t01: RuntimeError
+LayoutTests/fast/css-generated-content/table-row-after-no-crash_t01: RuntimeError
+LayoutTests/fast/css-generated-content/text-before-table-col-crash_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/grid-element-remove-svg-child_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/grid-strict-ordering-crash_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/should-not-collapse-anonymous-blocks_t01: RuntimeError
+LayoutTests/fast/css/add-remove-stylesheets-at-once-minimal-recalc-style_t01: RuntimeError
+LayoutTests/fast/css/assert-marquee-not-last-element_t01: RuntimeError
+LayoutTests/fast/css/background-position-inherit_t01: RuntimeError
+LayoutTests/fast/css/border-spacing-without-vertical-value_t01: RuntimeError
+LayoutTests/fast/css/case-sensitive-attr_t01: RuntimeError
+LayoutTests/fast/css/collapsed-whitespace-reattach-in-style-recalc_t01: RuntimeError
+LayoutTests/fast/css/content-language-dynamically-added_t01: RuntimeError
+LayoutTests/fast/css/content-language-dynamically-removed_t01: RuntimeError
+LayoutTests/fast/css/content-language-multiple_t01: RuntimeError
+LayoutTests/fast/css/content/content-quotes-02_t01: RuntimeError
+LayoutTests/fast/css/content/content-quotes-03_t01: RuntimeError
+LayoutTests/fast/css/content/content-quotes-04_t01: RuntimeError
+LayoutTests/fast/css/content/content-quotes-crash_t01: RuntimeError
+LayoutTests/fast/css/counters/counter-function-input_t01: RuntimeError
+LayoutTests/fast/css/counters/counter-ruby-text-cleared_t01: RuntimeError
+LayoutTests/fast/css/counters/render-tree-reorg-crash_t01: RuntimeError
+LayoutTests/fast/css/crash-comparing-equal_t01: RuntimeError
+LayoutTests/fast/css/crash-on-gradient-with-derived-color_t01: RuntimeError
+LayoutTests/fast/css/css-selector-deeply-nested_t01: RuntimeError
+LayoutTests/fast/css/css-selector-text_t01: RuntimeError
+LayoutTests/fast/css/css3-nth-space_t01: RuntimeError
+LayoutTests/fast/css/cssText-cache_t01: RuntimeError
+LayoutTests/fast/css/dfn-default-font-style_t01: RuntimeError
+LayoutTests/fast/css/display-inline-block-scrollbar_t01: RuntimeError
+LayoutTests/fast/css/display-none-inline-style-change-crash_t01: RuntimeError
+LayoutTests/fast/css/duplicate-property-in-rule-important_t01: RuntimeError
+LayoutTests/fast/css/duplicate-property-in-rule_t01: RuntimeError
+LayoutTests/fast/css/empty-display-none_t01: RuntimeError
+LayoutTests/fast/css/empty-first-line-crash_t01: RuntimeError
+LayoutTests/fast/css/end-of-buffer-crash_t01: RuntimeError
+LayoutTests/fast/css/ex-unit-with-no-x-height_t01: RuntimeError
+LayoutTests/fast/css/fill-layer-crash_t01: RuntimeError
+LayoutTests/fast/css/first-child-display-change_t01: RuntimeError
+LayoutTests/fast/css/first-letter-anonymous-block-crash_t01: RuntimeError
+LayoutTests/fast/css/first-letter-inline-flow-split-crash_t01: RuntimeError
+LayoutTests/fast/css/first-letter-inline-flow-split-table-crash_t01: RuntimeError
+LayoutTests/fast/css/first-letter-nested_t01: RuntimeError
+LayoutTests/fast/css/first-letter-wbr_t01: RuntimeError
+LayoutTests/fast/css/font-face-descending-unicode-range_t01: RuntimeError
+LayoutTests/fast/css/font-face-font-family-descriptor_t01: RuntimeError
+LayoutTests/fast/css/font-face-html-as-svg_t01: RuntimeError
+LayoutTests/fast/css/font-face-in-media-rule_t01: RuntimeError
+LayoutTests/fast/css/font-face-inherit-initial_t01: RuntimeError
+LayoutTests/fast/css/font-face-multiple-families_t01: RuntimeError
+LayoutTests/fast/css/font-face-unused-source-loaded_t01: RuntimeError
+LayoutTests/fast/css/font-family-initial-shorthand_t01: RuntimeError
+LayoutTests/fast/css/fontfaceset-download-error_t01: RuntimeError
+LayoutTests/fast/css/getComputedStyle/counterIncrement-without-counter_t01: RuntimeError
+LayoutTests/fast/css/getComputedStyle/pending-stylesheet_t01: RuntimeError
+LayoutTests/fast/css/id-or-class-before-stylesheet-strict_t01: RuntimeError
+LayoutTests/fast/css/image-set-value-crash-in-fillImageSet_t01: RuntimeError
+LayoutTests/fast/css/important-js-override_t01: RuntimeError
+LayoutTests/fast/css/infinite-floating-value_t01: RuntimeError
+LayoutTests/fast/css/invalid-appearance-progress-bar-meter_t01: RuntimeError
+LayoutTests/fast/css/invalid-cursor-property-crash_t01: RuntimeError
+LayoutTests/fast/css/invalid-parsercontext-valid-keyword-crash_t01: RuntimeError
+LayoutTests/fast/css/invalid-rule-value_t01: RuntimeError
+LayoutTests/fast/css/invalidation/style-update-with-added-stylesheet_t01: RuntimeError
+LayoutTests/fast/css/invalidation/targeted-attribute-style-invalidation_t01: RuntimeError
+LayoutTests/fast/css/invalidation/targeted-class-id_t01: RuntimeError
+LayoutTests/fast/css/invalidation/targeted-id-style-invalidation_t01: RuntimeError
+LayoutTests/fast/css/large-number-round-trip_t01: RuntimeError
+LayoutTests/fast/css/large-value-csstext_t01: RuntimeError
+LayoutTests/fast/css/many-spaces-before-charset_t01: RuntimeError
+LayoutTests/fast/css/max-height-and-max-width_t01: RuntimeError
+LayoutTests/fast/css/media-rule-screenDepthPerComponent_t01: RuntimeError
+LayoutTests/fast/css/min-max-width_t01: RuntimeError
+LayoutTests/fast/css/misplaced-charset_t01: RuntimeError
+LayoutTests/fast/css/negative-orphans-crash_t01: RuntimeError
+LayoutTests/fast/css/nested-rule-parent-sheet_t01: RuntimeError
+LayoutTests/fast/css/next-sibling-changed_t01: RuntimeError
+LayoutTests/fast/css/nth-child-negative-a-param_t01: RuntimeError
+LayoutTests/fast/css/nth-child-odd-case-insensitive_t01: RuntimeError
+LayoutTests/fast/css/number-parsing-crash-2_t01: RuntimeError
+LayoutTests/fast/css/number-parsing-crash_t01: RuntimeError
+LayoutTests/fast/css/orphaned_units_crash_t01: RuntimeError
+LayoutTests/fast/css/outline-currentcolor_t01: RuntimeError
+LayoutTests/fast/css/outline-hidden-illegal-value_t01: RuntimeError
+LayoutTests/fast/css/outline-invert-assertion_t01: RuntimeError
+LayoutTests/fast/css/outline-offset-crash_t01: RuntimeError
+LayoutTests/fast/css/parse-color-int-or-percent-crash_t01: RuntimeError
+LayoutTests/fast/css/parse-timing-function-crash_t01: RuntimeError
+LayoutTests/fast/css/parsing-css-nonascii_t01: RuntimeError
+LayoutTests/fast/css/parsing-not-after-supports_t01: RuntimeError
+LayoutTests/fast/css/parsing-object-fit_t01: RuntimeError
+LayoutTests/fast/css/pending-images-crash_t01: RuntimeError
+LayoutTests/fast/css/positioned-in-relative-position-inline-crash_t01: RuntimeError
+LayoutTests/fast/css/pseudo-default-003_t01: RuntimeError
+LayoutTests/fast/css/pseudo-default-004_t01: RuntimeError
+LayoutTests/fast/css/pseudo-element-opagedxy-crash_t01: RuntimeError
+LayoutTests/fast/css/pseudo-empty-dynamic-empty_t01: RuntimeError
+LayoutTests/fast/css/pseudo-in-range-invalid-value_t01: RuntimeError
+LayoutTests/fast/css/pseudo-in-range_t01: RuntimeError
+LayoutTests/fast/css/pseudo-invalid-002_t01: RuntimeError
+LayoutTests/fast/css/pseudo-out-of-range_t01: RuntimeError
+LayoutTests/fast/css/pseudo-valid-001_t01: RuntimeError
+LayoutTests/fast/css/pseudo-valid-004_t01: RuntimeError
+LayoutTests/fast/css/pseudo-valid-007_t01: RuntimeError
+LayoutTests/fast/css/pseudo-valid-dynamic_t01: RuntimeError
+LayoutTests/fast/css/pseudostyle-anonymous-text_t01: RuntimeError
+LayoutTests/fast/css/recursive-delay-update-scroll_t01: RuntimeError
+LayoutTests/fast/css/relative-position-replaced-in-table-display-crash_t01: RuntimeError
+LayoutTests/fast/css/rem-units-body_t01: RuntimeError
+LayoutTests/fast/css/remove-class-name_t01: RuntimeError
+LayoutTests/fast/css/remove-style-after-insert-import-rule-crash_t01: RuntimeError
+LayoutTests/fast/css/resize-object-crash_t01: RuntimeError
+LayoutTests/fast/css/selector-text-escape_t01: RuntimeError
+LayoutTests/fast/css/sheet-title_t01: RuntimeError
+LayoutTests/fast/css/shorthands-four-values_t01: RuntimeError
+LayoutTests/fast/css/sibling-selectors-dynamic_t01: RuntimeError
+LayoutTests/fast/css/space-before-charset_t01: RuntimeError
+LayoutTests/fast/css/sticky/sticky-table-col-crash_t01: RuntimeError
+LayoutTests/fast/css/string-quote-binary_t01: RuntimeError
+LayoutTests/fast/css/style-sharing-inline-stylesheet_t01: RuntimeError
+LayoutTests/fast/css/use-incorrect-svg-crash_t01: RuntimeError
+LayoutTests/fast/css/visited-link-hang_t01: RuntimeError
+LayoutTests/fast/css/webfont-lighter-weight-crash_t01: RuntimeError
+LayoutTests/fast/css/webkit-marquee-speed-unit-in-quirksmode_t01: RuntimeError
+LayoutTests/fast/dom/DOMException/prototype-object_t01: RuntimeError
+LayoutTests/fast/dom/Document/replace-child_t01: RuntimeError
+LayoutTests/fast/dom/Document/title-property-creates-title-element_t01: RuntimeError
+LayoutTests/fast/dom/Document/title-property-set-multiple-times_t01: RuntimeError
+LayoutTests/fast/dom/Element/class-name_t01: RuntimeError
+LayoutTests/fast/dom/Element/hostname-host_t01: RuntimeError
+LayoutTests/fast/dom/Element/id-in-map_t01: RuntimeError
+LayoutTests/fast/dom/Element/id-in-param_t01: RuntimeError
+LayoutTests/fast/dom/Element/node-list-identity_t01: RuntimeError
+LayoutTests/fast/dom/Element/remove_t01: RuntimeError
+LayoutTests/fast/dom/Element/setAttribute-with-colon_t01: RuntimeError
+LayoutTests/fast/dom/HTMLAnchorElement/anchor-ismap-crash_t01: RuntimeError
+LayoutTests/fast/dom/HTMLAnchorElement/get-href-attribute-port_t01: RuntimeError
+LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-whitespace_t01: RuntimeError
+LayoutTests/fast/dom/HTMLBaseElement/multiple-base-elements_t01: RuntimeError
+LayoutTests/fast/dom/HTMLDocument/activeElement_t01: RuntimeError
+LayoutTests/fast/dom/HTMLFormElement/associated-elements-after-index-assertion-fail1_t01: RuntimeError
+LayoutTests/fast/dom/HTMLFormElement/htmlformelement-indexed-getter_t01: RuntimeError
+LayoutTests/fast/dom/HTMLHtmlElement/duplicate-html-element-crash_t01: RuntimeError
+LayoutTests/fast/dom/HTMLImageElement/constructor-mutation-event-dispatch_t01: RuntimeError
+LayoutTests/fast/dom/HTMLImageElement/image-src-absolute-url_t01: RuntimeError
+LayoutTests/fast/dom/HTMLInputElement/cloned-input-checked-state_t01: RuntimeError
+LayoutTests/fast/dom/HTMLInputElement/size-attribute_t01: RuntimeError
+LayoutTests/fast/dom/HTMLLabelElement/focus-label_t01: RuntimeError
+LayoutTests/fast/dom/HTMLLinkElement/cachedresource-types_t01: RuntimeError
+LayoutTests/fast/dom/HTMLLinkElement/prefetch-beforeload_t01: RuntimeError
+LayoutTests/fast/dom/HTMLLinkElement/prefetch-detached_t01: RuntimeError
+LayoutTests/fast/dom/HTMLLinkElement/prefetch-too-many-clients_t01: RuntimeError
+LayoutTests/fast/dom/HTMLMetaElement/meta-attributes_t01: RuntimeError
+LayoutTests/fast/dom/HTMLObjectElement/set-type-to-null-crash_t01: RuntimeError
+LayoutTests/fast/dom/HTMLOutputElement/htmloutputelement-value_t01: RuntimeError
+LayoutTests/fast/dom/HTMLOutputElement/htmloutputelement_t01: RuntimeError
+LayoutTests/fast/dom/HTMLProgressElement/progress-element-indeterminate-crash_t01: RuntimeError
+LayoutTests/fast/dom/HTMLScriptElement/isURLAttribute_t01: RuntimeError
+LayoutTests/fast/dom/HTMLScriptElement/script-async-attr_t01: RuntimeError
+LayoutTests/fast/dom/HTMLSelectElement/listbox-select-reset_t01: RuntimeError
+LayoutTests/fast/dom/HTMLSelectElement/named-options_t01: RuntimeError
+LayoutTests/fast/dom/HTMLSelectElement/remove-element-from-within-focus-handler-crash_t01: RuntimeError
+LayoutTests/fast/dom/HTMLSelectElement/select-element-item-argument_t01: RuntimeError
+LayoutTests/fast/dom/HTMLStyleElement/insert-parser-generated_t01: RuntimeError
+LayoutTests/fast/dom/HTMLStyleElement/programmatically-add-style-with-onload-handler_t01: RuntimeError
+LayoutTests/fast/dom/HTMLStyleElement/style-onerror_t01: RuntimeError
+LayoutTests/fast/dom/HTMLStyleElement/style-onload-before-page-load_t01: RuntimeError
+LayoutTests/fast/dom/HTMLTableElement/early-acid3-66-excerpt_t01: RuntimeError
+LayoutTests/fast/dom/HTMLTableElement/table-with-invalid-border_t01: RuntimeError
+LayoutTests/fast/dom/HTMLTableRowElement/cells_t01: RuntimeError
+LayoutTests/fast/dom/HTMLTemplateElement/inertContents_t01: RuntimeError
+LayoutTests/fast/dom/HTMLTemplateElement/no-form-association_t01: RuntimeError
+LayoutTests/fast/dom/MutationObserver/callback-arguments_t01: RuntimeError
+LayoutTests/fast/dom/MutationObserver/cross-document_t01: RuntimeError
+LayoutTests/fast/dom/MutationObserver/disconnect-cancel-pending_t01: RuntimeError
+LayoutTests/fast/dom/MutationObserver/mutate-during-delivery_t01: RuntimeError
+LayoutTests/fast/dom/MutationObserver/mutation-record-nullity_t01: RuntimeError
+LayoutTests/fast/dom/MutationObserver/observe-characterdata_t01: RuntimeError
+LayoutTests/fast/dom/MutationObserver/observe-exceptions_t01: RuntimeError
+LayoutTests/fast/dom/NodeIterator/NodeIterator-basic_t01: RuntimeError
+LayoutTests/fast/dom/NodeList/nodelist-reachable_t01: RuntimeError
+LayoutTests/fast/dom/Range-insertNode-crash_t01: RuntimeError
+LayoutTests/fast/dom/Range/13000_t01: RuntimeError
+LayoutTests/fast/dom/Range/create-contextual-fragment-script-not-ran_t01: RuntimeError
+LayoutTests/fast/dom/Range/create-contextual-fragment_t01: RuntimeError
+LayoutTests/fast/dom/Range/range-clone-empty_t01: RuntimeError
+LayoutTests/fast/dom/Range/range-delete-contents-mutation-event-crash_t01: RuntimeError
+LayoutTests/fast/dom/Range/range-extract-contents-event-fire-crash2_t01: RuntimeError
+LayoutTests/fast/dom/Range/range-extract-contents_t01: RuntimeError
+LayoutTests/fast/dom/Range/remove-all-children-crash_t01: RuntimeError
+LayoutTests/fast/dom/Range/remove-twice-crash_t01: RuntimeError
+LayoutTests/fast/dom/Range/select-node-different-document_t01: RuntimeError
+LayoutTests/fast/dom/Range/split-text-in-range_t01: RuntimeError
+LayoutTests/fast/dom/Range/surroundContents-1_t01: RuntimeError
+LayoutTests/fast/dom/Range/surroundContents-check-boundary-points_t01: RuntimeError
+LayoutTests/fast/dom/Selection/collapseToX-empty-selection_t01: RuntimeError
+LayoutTests/fast/dom/Selection/getRangeAt_t01: RuntimeError
+LayoutTests/fast/dom/SelectorAPI/caseID-almost-strict_t01: RuntimeError
+LayoutTests/fast/dom/SelectorAPI/caseID-strict_t01: RuntimeError
+LayoutTests/fast/dom/SelectorAPI/dumpNodeList-2_t01: RuntimeError
+LayoutTests/fast/dom/SelectorAPI/dumpNodeList-almost-strict_t01: RuntimeError
+LayoutTests/fast/dom/SelectorAPI/duplicate-id-scope_t01: RuntimeError
+LayoutTests/fast/dom/SelectorAPI/elementRoot_t01: RuntimeError
+LayoutTests/fast/dom/SelectorAPI/id-fastpath-almost-strict_t01: RuntimeError
+LayoutTests/fast/dom/SelectorAPI/id-fastpath_t01: RuntimeError
+LayoutTests/fast/dom/Text/next-element-sibling_t01: RuntimeError
+LayoutTests/fast/dom/Text/normalize-crash-in-spell-checker_t01: RuntimeError
+LayoutTests/fast/dom/Text/remove_t01: RuntimeError
+LayoutTests/fast/dom/Text/replaceWholeText_t01: RuntimeError
+LayoutTests/fast/dom/Window/atob-btoa_t01: RuntimeError
+LayoutTests/fast/dom/Window/console-functions_t01: RuntimeError
+LayoutTests/fast/dom/Window/dispatchEvent_t01: RuntimeError
+LayoutTests/fast/dom/Window/querySelectorAll-with-pseudo-elements_t01: RuntimeError
+LayoutTests/fast/dom/Window/window-remove-event-listener_t01: RuntimeError
+LayoutTests/fast/dom/Window/window-screen-properties_t01: RuntimeError
+LayoutTests/fast/dom/XMLSerializer-attribute-namespaces_t01: RuntimeError
+LayoutTests/fast/dom/XMLSerializer-doctype2_t01: RuntimeError
+LayoutTests/fast/dom/anchor-text_t01: RuntimeError
+LayoutTests/fast/dom/clone-node-default-argument_t01: RuntimeError
+LayoutTests/fast/dom/clone-node-form-elements_t01: RuntimeError
+LayoutTests/fast/dom/clone-node-style_t01: RuntimeError
+LayoutTests/fast/dom/clone-node-z-index_t01: RuntimeError
+LayoutTests/fast/dom/cloneNode_t01: RuntimeError
+LayoutTests/fast/dom/comment-dom-node_t01: RuntimeError
+LayoutTests/fast/dom/computed-style-set-property_t01: RuntimeError
+LayoutTests/fast/dom/createDocumentType-ownerDocument_t01: RuntimeError
+LayoutTests/fast/dom/createDocumentType_t01: RuntimeError
+LayoutTests/fast/dom/createElement-with-column_t01: RuntimeError
+LayoutTests/fast/dom/createElement-with-column_xml_t01: RuntimeError
+LayoutTests/fast/dom/createElementNS-namespace-errors_t01: RuntimeError
+LayoutTests/fast/dom/css-inline-style-declaration-crash_t01: RuntimeError
+LayoutTests/fast/dom/css-mediarule-deleteRule-update_t01: RuntimeError
+LayoutTests/fast/dom/custom/html-element-type-extension-assert_t01: RuntimeError
+LayoutTests/fast/dom/custom/type-extension-undo-assert_t01: RuntimeError
+LayoutTests/fast/dom/delete-contents_t01: RuntimeError
+LayoutTests/fast/dom/destroy-selected-radio-button-crash_t01: RuntimeError
+LayoutTests/fast/dom/document-set-title-no-child-on-empty_t01: RuntimeError
+LayoutTests/fast/dom/dom-method-document-change_t01: RuntimeError
+LayoutTests/fast/dom/duplicate-ids-document-order_t01: RuntimeError
+LayoutTests/fast/dom/elementFromPoint-scaled-scrolled_t01: RuntimeError
+LayoutTests/fast/dom/getElementById-consistency3_t01: RuntimeError
+LayoutTests/fast/dom/getElementById-consistency5_t01: RuntimeError
+LayoutTests/fast/dom/getElementsByClassName/002_t01: RuntimeError
+LayoutTests/fast/dom/getElementsByClassName/005_t01: RuntimeError
+LayoutTests/fast/dom/getElementsByClassName/008_t01: RuntimeError
+LayoutTests/fast/dom/getElementsByClassName/013_t01: RuntimeError
+LayoutTests/fast/dom/getElementsByClassName/015_t01: RuntimeError
+LayoutTests/fast/dom/getElementsByClassName/dumpNodeList_t01: RuntimeError
+LayoutTests/fast/dom/getelementsbyname-invalidation-cache_t01: RuntimeError
+LayoutTests/fast/dom/htmlcollection-namedItem_t01: RuntimeError
+LayoutTests/fast/dom/icon-size-property_t01: RuntimeError
+LayoutTests/fast/dom/icon-url-change_t01: RuntimeError
+LayoutTests/fast/dom/implementation-api-args_t01: RuntimeError
+LayoutTests/fast/dom/implementation-createHTMLDocument_t01: RuntimeError
+LayoutTests/fast/dom/import-document-fragment_t01: RuntimeError
+LayoutTests/fast/dom/importNodeXML_t01: RuntimeError
+LayoutTests/fast/dom/insert-span-into-long-text-bug-28245_t01: RuntimeError
+LayoutTests/fast/dom/left-overflow-in-ltr_t01: RuntimeError
+LayoutTests/fast/dom/move-style-element-to-inactive-document-crash_t01: RuntimeError
+LayoutTests/fast/dom/mutation-event-remove-inserted-node_t01: RuntimeError
+LayoutTests/fast/dom/no-elements_t01: RuntimeError
+LayoutTests/fast/dom/noscript-canvas-in-created-html-document_t01: RuntimeError
+LayoutTests/fast/dom/noscript-style_t01: RuntimeError
+LayoutTests/fast/dom/object-plugin-hides-properties_t01: RuntimeError
+LayoutTests/fast/dom/offset-parent-positioned-and-inline_t01: RuntimeError
+LayoutTests/fast/dom/onerror-img_t01: RuntimeError
+LayoutTests/fast/dom/partial-layout-block_t01: RuntimeError
+LayoutTests/fast/dom/remove-children-notification-order_t01: RuntimeError
+LayoutTests/fast/dom/remove-named-attribute-crash_t01: RuntimeError
+LayoutTests/fast/dom/replace-first-child_t01: RuntimeError
+LayoutTests/fast/dom/setAttribute-using-initial-input-value_t01: RuntimeError
+LayoutTests/fast/dom/setAttributeNS-namespace-errors_t01: RuntimeError
+LayoutTests/fast/dom/setter-type-enforcement_t01: RuntimeError
+LayoutTests/fast/dom/shadow/event-path_t01: RuntimeError
+LayoutTests/fast/dom/shadow/ol-with-distribution-recalc-crash_t01: RuntimeError
+LayoutTests/fast/dom/shared-inline-style-after-node-removal_t01: RuntimeError
+LayoutTests/fast/dom/stripNullFromTextNodes_t01: RuntimeError
+LayoutTests/fast/dom/text-control-crash-on-select_t01: RuntimeError
+LayoutTests/fast/dom/title-content-set-innerText-get_t01: RuntimeError
+LayoutTests/fast/dom/xhtml-fragment-parsing-exceptions_t01: RuntimeError
+LayoutTests/fast/dom/xmlserializer-serialize-to-string-exception_t01: RuntimeError
+LayoutTests/fast/dynamic/5872671_t01: RuntimeError
+LayoutTests/fast/dynamic/float-remove-above-line-2_t01: RuntimeError
+LayoutTests/fast/dynamic/insertAdjacentHTML-allowed-parents_t01: RuntimeError
+LayoutTests/fast/dynamic/insertAdjacentHTML_t01: RuntimeError
+LayoutTests/fast/dynamic/insertAdjacentText_t01: RuntimeError
+LayoutTests/fast/dynamic/position-absolute-to-fixed-crash_t01: RuntimeError
+LayoutTests/fast/events/dispatch-event-no-document_t01: RuntimeError
+LayoutTests/fast/events/dispatch-synthetic-mouseevent_t01: RuntimeError
+LayoutTests/fast/events/domnodeinsertedintodocument-dispatched-post-rendering_t01: RuntimeError
+LayoutTests/fast/events/event-listener-sharing_t01: RuntimeError
+LayoutTests/fast/events/event-on-created-document_t01: RuntimeError
+LayoutTests/fast/events/focus-remove-focuesed-node_t01: RuntimeError
+LayoutTests/fast/events/init-event-null-view_t01: RuntimeError
+LayoutTests/fast/events/initkeyboardevent-crash_t01: RuntimeError
+LayoutTests/fast/events/keyboardevent-mousedown-crash_t01: RuntimeError
+LayoutTests/fast/events/onerror-img-after-gc_t01: RuntimeError
+LayoutTests/fast/events/page-visibility-null-view_t01: RuntimeError
+LayoutTests/fast/events/programmatic-check-no-change-event_t01: RuntimeError
+LayoutTests/fast/events/scroll-event-phase_t01: RuntimeError
+LayoutTests/fast/events/stop-immediate-propagation_t01: RuntimeError
+LayoutTests/fast/events/stopPropagation-checkbox_t01: RuntimeError
+LayoutTests/fast/events/submit-reset-nested-bubble_t01: RuntimeError
+LayoutTests/fast/files/file-reader-immediate-abort_t01: RuntimeError
+LayoutTests/fast/files/file-reader-methods-illegal-arguments_t01: RuntimeError
+LayoutTests/fast/files/not-enough-arguments_t01: RuntimeError
+LayoutTests/fast/files/revoke-blob-url_t01: RuntimeError
+LayoutTests/fast/flexbox/child-flexing_t01: RuntimeError
+LayoutTests/fast/flexbox/crash-anonymous-box_t01: RuntimeError
+LayoutTests/fast/flexbox/crash-button-keygen_t01: RuntimeError
+LayoutTests/fast/flexbox/crash-button-relayout_t01: RuntimeError
+LayoutTests/fast/flexbox/crash-flexbox-no-layout-child_t01: RuntimeError
+LayoutTests/fast/flexbox/layoutHorizontalBox-crash_t01: RuntimeError
+LayoutTests/fast/flexbox/line-clamp-crash_t01: RuntimeError
+LayoutTests/fast/flexbox/overhanging-floats-not-removed-crash_t01: RuntimeError
+LayoutTests/fast/forms/HTMLOptionElement_selected_t01: RuntimeError
+LayoutTests/fast/forms/ValidityState-patternMismatch-unsupported_t01: RuntimeError
+LayoutTests/fast/forms/ValidityState-removed-control_t01: RuntimeError
+LayoutTests/fast/forms/ValidityState-stepMismatch_t01: RuntimeError
+LayoutTests/fast/forms/ValidityState-valueMissing-005_t01: RuntimeError
+LayoutTests/fast/forms/ValidityState-valueMissing-009_t01: RuntimeError
+LayoutTests/fast/forms/activate-and-disabled-elements_t01: RuntimeError
+LayoutTests/fast/forms/autofocus-attribute_t01: RuntimeError
+LayoutTests/fast/forms/autofocus-opera-008_t01: RuntimeError
+LayoutTests/fast/forms/checkValidity-001_t01: RuntimeError
+LayoutTests/fast/forms/checkValidity-002_t01: RuntimeError
+LayoutTests/fast/forms/checkValidity-004_t01: RuntimeError
+LayoutTests/fast/forms/checkValidity-cancel_t01: RuntimeError
+LayoutTests/fast/forms/checkbox-click-indeterminate_t01: RuntimeError
+LayoutTests/fast/forms/checkbox-onchange_t01: RuntimeError
+LayoutTests/fast/forms/datalist/datalist-nonoption-child_t01: RuntimeError
+LayoutTests/fast/forms/datalist/slider-appearance-with-ticks-crash_t01: RuntimeError
+LayoutTests/fast/forms/date/date-click-on-label_t01: RuntimeError
+LayoutTests/fast/forms/datetimelocal/datetimelocal-interactive-validation-required_t01: RuntimeError
+LayoutTests/fast/forms/disabled-attr-checkvalidity_t01: RuntimeError
+LayoutTests/fast/forms/enctype-attribute_t01: RuntimeError
+LayoutTests/fast/forms/fieldset/fieldset-crash_t01: RuntimeError
+LayoutTests/fast/forms/fieldset/focus-in-fieldset-disabled_t01: RuntimeError
+LayoutTests/fast/forms/file/file-setrangetext_t01: RuntimeError
+LayoutTests/fast/forms/formmethod-attribute-button-html_t01: RuntimeError
+LayoutTests/fast/forms/formmethod-attribute-input-2_t01: RuntimeError
+LayoutTests/fast/forms/formmethod-attribute-input-html_t01: RuntimeError
+LayoutTests/fast/forms/formnovalidate-attribute_t01: RuntimeError
+LayoutTests/fast/forms/hidden-input-enabled_t01: RuntimeError
+LayoutTests/fast/forms/hidden/change-type-to-hidden-after-updating-value_t01: RuntimeError
+LayoutTests/fast/forms/hidden/hidden-setrangetext_t01: RuntimeError
+LayoutTests/fast/forms/image/image-setrangetext_t01: RuntimeError
+LayoutTests/fast/forms/input-minmax_t01: RuntimeError
+LayoutTests/fast/forms/input-pattern_t01: RuntimeError
+LayoutTests/fast/forms/input-selection-hidden_t01: RuntimeError
+LayoutTests/fast/forms/input-setvalue-selection_t01: RuntimeError
+LayoutTests/fast/forms/input-stepup-stepdown_t01: RuntimeError
+LayoutTests/fast/forms/input-text-maxlength_t01: RuntimeError
+LayoutTests/fast/forms/input-type-change3_t01: RuntimeError
+LayoutTests/fast/forms/input-valueasnumber-unsupported_t01: RuntimeError
+LayoutTests/fast/forms/input-width-height-attributes-without-renderer_t01: RuntimeError
+LayoutTests/fast/forms/input-zero-height-focus_t01: RuntimeError
+LayoutTests/fast/forms/interactive-validation-assertion-by-validate-twice_t01: RuntimeError
+LayoutTests/fast/forms/interactive-validation-attach-assertion_t01: RuntimeError
+LayoutTests/fast/forms/large-parts_t01: RuntimeError
+LayoutTests/fast/forms/legend-display-none_t01: RuntimeError
+LayoutTests/fast/forms/menulist-no-renderer-onmousedown_t01: RuntimeError
+LayoutTests/fast/forms/missing-action_t01: RuntimeError
+LayoutTests/fast/forms/novalidate-attribute_t01: RuntimeError
+LayoutTests/fast/forms/option-index_t01: RuntimeError
+LayoutTests/fast/forms/pattern-attribute-001_t01: RuntimeError
+LayoutTests/fast/forms/pattern-attribute-003_t01: RuntimeError
+LayoutTests/fast/forms/required-attribute-001_t01: RuntimeError
+LayoutTests/fast/forms/select-change-listbox-to-popup-roundtrip_t01: RuntimeError
+LayoutTests/fast/forms/select-reset-multiple-selections-4-single-selection_t01: RuntimeError
+LayoutTests/fast/forms/select-reset_t01: RuntimeError
+LayoutTests/fast/forms/select-set-length-with-mutation-reorder_t01: RuntimeError
+LayoutTests/fast/forms/select-set-length-with-mutation-reparent_t01: RuntimeError
+LayoutTests/fast/forms/select-set-length-with-mutation_t01: RuntimeError
+LayoutTests/fast/forms/select-set-length_t01: RuntimeError
+LayoutTests/fast/forms/select-width-font-change_t01: RuntimeError
+LayoutTests/fast/forms/selected-index-assert_t01: RuntimeError
+LayoutTests/fast/forms/setCustomValidity_t01: RuntimeError
+LayoutTests/fast/forms/text-control-select-blurred_t01: RuntimeError
+LayoutTests/fast/forms/textarea-and-mutation-events-appending-text_t01: RuntimeError
+LayoutTests/fast/forms/textarea-default-value-leading-newline_t01: RuntimeError
+LayoutTests/fast/forms/textarea-initial-caret-position_t01: RuntimeError
+LayoutTests/fast/forms/textarea-newline_t01: RuntimeError
+LayoutTests/fast/forms/textarea-scrollbar-height_t01: RuntimeError
+LayoutTests/fast/forms/textarea-setvalue-without-renderer_t01: RuntimeError
+LayoutTests/fast/forms/textarea-wrap-attribute_t01: RuntimeError
+LayoutTests/fast/forms/update-from-element-during-editing-crash-1_t01: RuntimeError
+LayoutTests/fast/forms/update-from-element-during-editing-crash-2_t01: RuntimeError
+LayoutTests/fast/html/clone-range_t01: RuntimeError
+LayoutTests/fast/html/hidden-attr-dom_t01: RuntimeError
+LayoutTests/fast/html/input-type-change-crash_t01: RuntimeError
+LayoutTests/fast/html/numbered-header-element_t01: RuntimeError
+LayoutTests/fast/html/range-point-in-range-for-different-documents_t01: RuntimeError
+LayoutTests/fast/html/tabindex-removal_t01: RuntimeError
+LayoutTests/fast/html/text-field-input-types_t01: RuntimeError
+LayoutTests/fast/html/unknown-tag_t01: RuntimeError
+LayoutTests/fast/inline/fixed-pos-moves-with-abspos-parent-relative-ancestor_t01: RuntimeError
+LayoutTests/fast/inline/skipped-whitespace-client-rect_t01: RuntimeError
+LayoutTests/fast/innerHTML/005_t01: RuntimeError
+LayoutTests/fast/innerHTML/additional-inline-style_t01: RuntimeError
+LayoutTests/fast/innerHTML/innerHTML-iframe_t01: RuntimeError
+LayoutTests/fast/innerHTML/innerHTML-nbsp_t01: RuntimeError
+LayoutTests/fast/innerHTML/innerHTML-special-elements_t01: RuntimeError
+LayoutTests/fast/loader/hashchange-event-properties_t01: RuntimeError
+LayoutTests/fast/loader/loadInProgress_t01: RuntimeError
+LayoutTests/fast/loader/onload-policy-ignore-for-frame_t01: RuntimeError
+LayoutTests/fast/loader/stateobjects/pushstate-updates-location_t01: RuntimeError
+LayoutTests/fast/loader/stateobjects/replacestate-updates-location_t01: RuntimeError
+LayoutTests/fast/media/color-does-not-include-alpha_t01: RuntimeError
+LayoutTests/fast/media/mq-color-index_t01: RuntimeError
+LayoutTests/fast/media/mq-js-media-except_t01: RuntimeError
+LayoutTests/fast/media/mq-js-media-except_t02: RuntimeError
+LayoutTests/fast/media/mq-parsing_t01: RuntimeError
+LayoutTests/fast/multicol/newmulticol/balance-maxheight_t02: RuntimeError
+LayoutTests/fast/multicol/newmulticol/balance_t07: RuntimeError
+LayoutTests/fast/multicol/newmulticol/balance_t09: RuntimeError
+LayoutTests/fast/multicol/vertical-rl/image-inside-nested-blocks-with-border_t01: RuntimeError
+LayoutTests/fast/multicol/widows-and-orphans_t01: RuntimeError
+LayoutTests/fast/multicol/widows_t02: RuntimeError
+LayoutTests/fast/parser/foster-parent-adopted_t01: RuntimeError
+LayoutTests/fast/parser/pop-all-after-after-body_t01: RuntimeError
+LayoutTests/fast/parser/pre-first-line-break_t01: RuntimeError
+LayoutTests/fast/parser/stray-end-tags-with-attributes-002-alt_t01: RuntimeError
+LayoutTests/fast/replaced/table-replaced-element_t01: RuntimeError
+LayoutTests/fast/ruby/modify-positioned-ruby-text-crash_t01: RuntimeError
+LayoutTests/fast/scrolling/scroll-max-value_t01: RuntimeError
+LayoutTests/fast/selectors/style-sharing-adjacent-selector_t01: RuntimeError
+LayoutTests/fast/sub-pixel/float-containing-block-with-margin_t01: RuntimeError
+LayoutTests/fast/sub-pixel/float-list-inside_t01: RuntimeError
+LayoutTests/fast/sub-pixel/float-with-margin-in-container_t01: RuntimeError
+LayoutTests/fast/sub-pixel/float-with-right-margin-zoom_t01: RuntimeError
+LayoutTests/fast/sub-pixel/layout-boxes-with-zoom_t01: RuntimeError
+LayoutTests/fast/sub-pixel/replaced-element-baseline_t01: RuntimeError
+LayoutTests/fast/sub-pixel/size-of-span-with-different-positions_t01: RuntimeError
+LayoutTests/fast/sub-pixel/table-cells-with-padding-do-not-wrap_t01: RuntimeError
+LayoutTests/fast/svg/whitespace-length-invalid_t01: RuntimeError
+LayoutTests/fast/table/auto-table-layout-colgroup-removal-crash_t01: RuntimeError
+LayoutTests/fast/table/col-width-span-expand_t01: RuntimeError
+LayoutTests/fast/table/fixed-table-with-percent-width-inside-extra-large-div_t01: RuntimeError
+LayoutTests/fast/table/resize-table-binding-cell_t01: RuntimeError
+LayoutTests/fast/table/table-sections-border-spacing_t01: RuntimeError
+LayoutTests/fast/text-autosizing/display-type-change-lineHeight_t01: RuntimeError
+LayoutTests/fast/text-autosizing/inline-width_t01: RuntimeError
+LayoutTests/fast/text/find-backwards_t01: RuntimeError
+LayoutTests/fast/text/find-quotes_t01: RuntimeError
+LayoutTests/fast/text/font-fallback-synthetic-italics_t01: RuntimeError
+LayoutTests/fast/text/font-linux-normalize_t01: RuntimeError
+LayoutTests/fast/text/international/complex-text-rectangle_t01: RuntimeError
+LayoutTests/fast/text/international/rtl-text-wrapping_t01: RuntimeError
+LayoutTests/fast/text/ipa-tone-letters_t01: RuntimeError
+LayoutTests/fast/text/justification-padding-mid-word_t01: RuntimeError
+LayoutTests/fast/text/line-breaks-after-ideographic-comma-or-full-stop_t01: RuntimeError
+LayoutTests/fast/text/line-breaks-after-ideographic-comma-or-full-stop_t02: RuntimeError
+LayoutTests/fast/text/regional-indicator-symobls_t01: RuntimeError
+LayoutTests/fast/text/split-text-crash_t01: RuntimeError
+LayoutTests/fast/text/text-between-two-brs-in-nowrap-overflow_t01: RuntimeError
+LayoutTests/fast/text/whitespace/nowrap-line-break-after-white-space_t01: RuntimeError
+LayoutTests/fast/tokenizer/entities_t01: RuntimeError
+LayoutTests/fast/transforms/scrollIntoView-transformed_t01: RuntimeError
+LayoutTests/fast/url/scheme_t01: RuntimeError
+LayoutTests/fast/writing-mode/broken-ideographic-font_t01: RuntimeError
+LayoutTests/fast/writing-mode/percentage-margins-absolute-replaced_t01: RuntimeError
+LayoutTests/fast/writing-mode/percentage-margins-absolute_t01: RuntimeError
+LayoutTests/fast/writing-mode/relative-positioning-percentages_t01: RuntimeError
+LayoutTests/fast/xmlhttprequest/null-document-xmlhttprequest-open_t01: RuntimeError
+LayoutTests/fast/xmlhttprequest/xmlhttprequest-bad-mimetype_t01: RuntimeError
+LayoutTests/fast/xmlhttprequest/xmlhttprequest-default-attributes_t01: RuntimeError
+LayoutTests/fast/xmlhttprequest/xmlhttprequest-get_t01: RuntimeError
+LayoutTests/fast/xmlhttprequest/xmlhttprequest-invalid-values_t01: RuntimeError
+LayoutTests/fast/xmlhttprequest/xmlhttprequest-responseXML-html-no-responsetype_t01: RuntimeError
+LayoutTests/fast/xmlhttprequest/xmlhttprequest-responsetype-before-open_t01: RuntimeError
+LayoutTests/fast/xmlhttprequest/xmlhttprequest-responsetype-set-at-headers-received_t01: RuntimeError
+LayoutTests/fast/xpath/4XPath/Borrowed/kd_20010423_t01: RuntimeError
+LayoutTests/fast/xpath/4XPath/Borrowed/rs_20010831_t01: RuntimeError
+LayoutTests/fast/xpath/4XPath/Borrowed/sr_20021217_t01: RuntimeError
+LayoutTests/fast/xpath/4XPath/Core/test_boolean_expr_t01: RuntimeError
+LayoutTests/fast/xpath/4XPath/Core/test_location_path_t01: RuntimeError
+LayoutTests/fast/xpath/4XPath/Core/test_predicate_list_t01: RuntimeError
+LayoutTests/fast/xpath/ancestor-axis_t01: RuntimeError
+LayoutTests/fast/xpath/detached-subtree-invalidate-iterator_t01: RuntimeError
+LayoutTests/fast/xpath/evaluator-exceptions_t01: RuntimeError
+LayoutTests/fast/xpath/name-null-namespace_t01: RuntimeError
+LayoutTests/fast/xpath/nodeset-duplicates_t01: RuntimeError
+LayoutTests/fast/xpath/substring-after_t01: RuntimeError
+LayoutTests/fast/xpath/substring-non-positive-postion_t01: RuntimeError
+LayoutTests/fast/xpath/xpath-empty-string_t01: RuntimeError
+LibTest/html/CanvasRenderingContext2D/addEventListener_A01_t01: RuntimeError
+LibTest/html/CanvasRenderingContext2D/addEventListener_A01_t02: RuntimeError
+LibTest/html/CanvasRenderingContext2D/addEventListener_A01_t04: RuntimeError
+LibTest/html/CanvasRenderingContext2D/addEventListener_A01_t05: RuntimeError
+LibTest/html/CanvasRenderingContext2D/arc_A01_t01: RuntimeError
+LibTest/html/Document/addEventListener_A01_t01: RuntimeError
+LibTest/html/Document/adoptNode_A01_t01: RuntimeError
+LibTest/html/Document/append_A01_t01: RuntimeError
+LibTest/html/Document/append_A02_t01: RuntimeError
+LibTest/html/Document/append_A02_t02: RuntimeError
+LibTest/html/Document/childNodes_A01_t01: RuntimeError
+LibTest/html/Document/contains_A01_t02: RuntimeError
+LibTest/html/Document/createDocumentFragment_A01_t01: RuntimeError
+LibTest/html/Document/createElement_A01_t01: RuntimeError
+LibTest/html/Document/dispatchEvent_A01_t01: RuntimeError
+LibTest/html/Document/documentElement_A01_t01: RuntimeError
+LibTest/html/Document/firstChild_A01_t01: RuntimeError
+LibTest/html/Document/getElementById_A01_t01: RuntimeError
+LibTest/html/Document/getElementsByClassName_A01_t01: RuntimeError
+LibTest/html/Document/getElementsByName_A01_t01: RuntimeError
+LibTest/html/Document/getElementsByTagName_A01_t01: RuntimeError
+LibTest/html/Document/hasChildNodes_A01_t01: RuntimeError
+LibTest/html/Document/importNode_A01_t01: RuntimeError
+LibTest/html/Document/insertAllBefore_A01_t01: RuntimeError
+LibTest/html/Document/insertAllBefore_A02_t01: RuntimeError
+LibTest/html/Document/insertBefore_A01_t01: RuntimeError
+LibTest/html/Document/insertBefore_A02_t01: RuntimeError
+LibTest/html/Document/lastChild_A01_t01: RuntimeError
+LibTest/html/Document/nodeName_A01_t01: RuntimeError
+LibTest/html/Document/nodeType_A01_t01: RuntimeError
+LibTest/html/Document/nodes_A01_t01: RuntimeError
+LibTest/html/Document/on_A01_t01: RuntimeError
+LibTest/html/Document/on_A01_t02: RuntimeError
+LibTest/html/Document/querySelectorAll_A01_t01: RuntimeError
+LibTest/html/Document/querySelector_A01_t01: RuntimeError
+LibTest/html/Document/readyState_A01_t01: RuntimeError
+LibTest/html/Document/removeEventListener_A01_t01: RuntimeError
+LibTest/html/Document/window_A01_t01: RuntimeError
+LibTest/html/Element/Element.html_A01_t01: RuntimeError
+LibTest/html/Element/Element.html_A02_t01: RuntimeError
+LibTest/html/Element/Element.html_A03_t01: RuntimeError
+LibTest/html/Element/Element.html_A04_t01: RuntimeError
+LibTest/html/Element/Element.html_A04_t02: RuntimeError
+LibTest/html/Element/Element.tag_A01_t02: RuntimeError
+LibTest/html/Element/Element_element_ctors_A01_t01: RuntimeError
+LibTest/html/Element/abortEvent_A01_t01: RuntimeError
+LibTest/html/Element/addEventListener_A01_t01: RuntimeError
+LibTest/html/Element/addEventListener_A01_t02: RuntimeError
+LibTest/html/Element/addEventListener_A01_t04: RuntimeError
+LibTest/html/Element/addEventListener_A01_t05: RuntimeError
+LibTest/html/Element/addEventListener_A01_t06: RuntimeError
+LibTest/html/Element/appendHtml_A01_t01: RuntimeError
+LibTest/html/Element/appendText_A01_t01: RuntimeError
+LibTest/html/Element/append_A01_t01: RuntimeError
+LibTest/html/Element/append_A02_t01: RuntimeError
+LibTest/html/Element/append_A02_t02: RuntimeError
+LibTest/html/Element/attributes_A01_t01: RuntimeError
+LibTest/html/Element/attributes_A02_t01: RuntimeError
+LibTest/html/Element/beforeCopyEvent_A01_t01: RuntimeError
+LibTest/html/Element/beforeCutEvent_A01_t01: RuntimeError
+LibTest/html/Element/beforePasteEvent_A01_t01: RuntimeError
+LibTest/html/Element/blurEvent_A01_t01: RuntimeError
+LibTest/html/Element/changeEvent_A01_t01: RuntimeError
+LibTest/html/Element/childNodes_A01_t01: RuntimeError
+LibTest/html/Element/childNodes_A01_t02: RuntimeError
+LibTest/html/Element/children_A01_t01: RuntimeError
+LibTest/html/Element/children_A01_t02: RuntimeError
+LibTest/html/Element/className_A01_t01: RuntimeError
+LibTest/html/Element/classes_A01_t01: RuntimeError
+LibTest/html/Element/click_A01_t01: RuntimeError
+LibTest/html/Element/clone_A01_t01: RuntimeError
+LibTest/html/Element/clone_A01_t02: RuntimeError
+LibTest/html/Element/clone_A02_t01: RuntimeError
+LibTest/html/Element/clone_A03_t01: RuntimeError
+LibTest/html/Element/contains_A01_t01: RuntimeError
+LibTest/html/Element/contains_A01_t02: RuntimeError
+LibTest/html/Element/contains_A01_t03: RuntimeError
+LibTest/html/Element/contentEditable_A01_t01: RuntimeError
+LibTest/html/Element/contentEditable_A01_t02: RuntimeError
+LibTest/html/Element/createFragment_A01_t01: RuntimeError
+LibTest/html/Element/createFragment_A01_t02: RuntimeError
+LibTest/html/Element/createFragment_A01_t03: RuntimeError
+LibTest/html/Element/dataset_A01_t01: RuntimeError
+LibTest/html/Element/dataset_A01_t02: RuntimeError
+LibTest/html/Element/dir_A01_t01: RuntimeError
+LibTest/html/Element/dir_A01_t02: RuntimeError
+LibTest/html/Element/documentOffset_A01_t01: RuntimeError
+LibTest/html/Element/doubleClickEvent_A01_t01: RuntimeError
+LibTest/html/Element/draggable_A01_t01: RuntimeError
+LibTest/html/Element/draggable_A01_t02: RuntimeError
+LibTest/html/Element/errorEvent_A01_t01: RuntimeError
+LibTest/html/Element/firstChild_A01_t01: RuntimeError
+LibTest/html/Element/focusEvent_A01_t01: RuntimeError
+LibTest/html/Element/fullscreenChangeEvent_A01_t01: RuntimeError
+LibTest/html/Element/fullscreenErrorEvent_A01_t01: RuntimeError
+LibTest/html/Element/getAttributeNS_A02_t01: RuntimeError
+LibTest/html/Element/getAttribute_A01_t01: RuntimeError
+LibTest/html/Element/getBoundingClientRect_A01_t01: RuntimeError
+LibTest/html/Element/getBoundingClientRect_A01_t02: RuntimeError
+LibTest/html/Element/getClientRects_A01_t01: Crash
+LibTest/html/Element/getElementsByClassName_A01_t01: RuntimeError
+LibTest/html/Element/getElementsByClassName_A02_t01: RuntimeError
+LibTest/html/Element/hasChildNodes_A01_t01: RuntimeError
+LibTest/html/Element/hidden_A01_t01: RuntimeError
+LibTest/html/Element/id_A01_t01: RuntimeError
+LibTest/html/Element/innerHtml_A01_t01: RuntimeError
+LibTest/html/Element/innerHtml_A02_t01: RuntimeError
+LibTest/html/Element/inputEvent_A01_t01: RuntimeError
+LibTest/html/Element/insertAdjacentElement_A01_t01: RuntimeError
+LibTest/html/Element/insertAdjacentHtml_A01_t01: RuntimeError
+LibTest/html/Element/insertAdjacentText_A01_t01: RuntimeError
+LibTest/html/Element/insertAllBefore_A01_t01: RuntimeError
+LibTest/html/Element/insertAllBefore_A02_t01: RuntimeError
+LibTest/html/Element/insertBefore_A01_t01: RuntimeError
+LibTest/html/Element/insertBefore_A02_t01: RuntimeError
+LibTest/html/Element/invalidEvent_A01_t01: RuntimeError
+LibTest/html/Element/isContentEditable_A01_t01: RuntimeError
+LibTest/html/Element/isTagSupported_A01_t02: RuntimeError
+LibTest/html/Element/isTagSupported_A01_t03: RuntimeError
+LibTest/html/Element/keyDownEvent_A01_t01: RuntimeError
+LibTest/html/Element/keyPressEvent_A01_t01: RuntimeError
+LibTest/html/Element/keyUpEvent_A01_t01: RuntimeError
+LibTest/html/Element/lang_A01_t01: RuntimeError
+LibTest/html/Element/lang_A01_t02: RuntimeError
+LibTest/html/Element/lastChild_A01_t01: RuntimeError
+LibTest/html/Element/matchesWithAncestors_A01_t01: RuntimeError
+LibTest/html/Element/matches_A01_t01: RuntimeError
+LibTest/html/Element/mouseDownEvent_A01_t01: RuntimeError
+LibTest/html/Element/mouseEnterEvent_A01_t01: RuntimeError
+LibTest/html/Element/mouseLeaveEvent_A01_t01: RuntimeError
+LibTest/html/Element/mouseMoveEvent_A01_t01: RuntimeError
+LibTest/html/Element/mouseOutEvent_A01_t01: RuntimeError
+LibTest/html/Element/mouseOverEvent_A01_t01: RuntimeError
+LibTest/html/Element/mouseUpEvent_A01_t01: RuntimeError
+LibTest/html/Element/namespaceUri_A01_t01: RuntimeError
+LibTest/html/Element/nextElementSibling_A01_t01: RuntimeError
+LibTest/html/Element/nextNode_A01_t01: RuntimeError
+LibTest/html/Element/nodeName_A03_t01: RuntimeError
+LibTest/html/Element/nodeName_A04_t01: RuntimeError
+LibTest/html/Element/nodeName_A05_t01: RuntimeError
+LibTest/html/Element/nodeName_A06_t01: RuntimeError
+LibTest/html/Element/nodeName_A07_t01: RuntimeError
+LibTest/html/Element/nodeName_A12_t01: RuntimeError
+LibTest/html/Element/nodes_A01_t01: RuntimeError
+LibTest/html/Element/nodes_A01_t02: RuntimeError
+LibTest/html/Element/offsetHeight_A01_t01: RuntimeError
+LibTest/html/Element/offsetLeft_A01_t01: RuntimeError
+LibTest/html/Element/offsetParent_A01_t01: RuntimeError
+LibTest/html/Element/offsetTo_A01_t01: RuntimeError
+LibTest/html/Element/offsetTo_A01_t02: RuntimeError
+LibTest/html/Element/offsetTop_A01_t01: RuntimeError
+LibTest/html/Element/offsetWidth_A01_t01: RuntimeError
+LibTest/html/Element/offset_A01_t01: RuntimeError
+LibTest/html/Element/onAbort_A01_t01: RuntimeError
+LibTest/html/Element/onBeforeCopy_A01_t01: RuntimeError
+LibTest/html/Element/onBeforeCut_A01_t01: RuntimeError
+LibTest/html/Element/onBeforePaste_A01_t01: RuntimeError
+LibTest/html/Element/onBlur_A01_t01: RuntimeError
+LibTest/html/Element/onChange_A01_t01: RuntimeError
+LibTest/html/Element/onDoubleClick_A01_t01: RuntimeError
+LibTest/html/Element/onError_A01_t01: RuntimeError
+LibTest/html/Element/onFocus_A01_t01: RuntimeError
+LibTest/html/Element/onFullscreenChange_A01_t01: RuntimeError
+LibTest/html/Element/onFullscreenError_A01_t01: RuntimeError
+LibTest/html/Element/onInput_A01_t01: RuntimeError
+LibTest/html/Element/onInvalid_A01_t01: RuntimeError
+LibTest/html/Element/onReset_A01_t01: RuntimeError
+LibTest/html/Element/onScroll_A01_t01: RuntimeError
+LibTest/html/Element/onSearch_A01_t01: RuntimeError
+LibTest/html/Element/onSelectStart_A01_t01: RuntimeError
+LibTest/html/Element/onSelect_A01_t01: RuntimeError
+LibTest/html/Element/onSubmit_A01_t01: RuntimeError
+LibTest/html/Element/on_A01_t01: RuntimeError
+LibTest/html/Element/outerHtml_A01_t01: RuntimeError
+LibTest/html/Element/ownerDocument_A01_t01: RuntimeError
+LibTest/html/Element/ownerDocument_A01_t02: RuntimeError
+LibTest/html/Element/ownerDocument_A01_t03: RuntimeError
+LibTest/html/Element/ownerDocument_A01_t04: RuntimeError
+LibTest/html/Element/ownerDocument_A01_t05: RuntimeError
+LibTest/html/Element/parentNode_A01_t01: RuntimeError
+LibTest/html/Element/parentNode_A01_t02: RuntimeError
+LibTest/html/Element/parentNode_A01_t03: RuntimeError
+LibTest/html/Element/parent_A01_t01: RuntimeError
+LibTest/html/Element/parent_A01_t02: RuntimeError
+LibTest/html/Element/parent_A01_t03: RuntimeError
+LibTest/html/Element/previousElementSibling_A01_t01: RuntimeError
+LibTest/html/Element/querySelectorAll_A01_t01: RuntimeError
+LibTest/html/Element/querySelector_A01_t01: RuntimeError
+LibTest/html/Element/removeEventListener_A01_t01: RuntimeError
+LibTest/html/Element/removeEventListener_A01_t02: RuntimeError
+LibTest/html/Element/remove_A01_t01: RuntimeError
+LibTest/html/Element/resetEvent_A01_t01: RuntimeError
+LibTest/html/Element/scrollEvent_A01_t01: RuntimeError
+LibTest/html/Element/searchEvent_A01_t01: RuntimeError
+LibTest/html/Element/selectEvent_A01_t01: RuntimeError
+LibTest/html/Element/selectStartEvent_A01_t01: RuntimeError
+LibTest/html/Element/setAttributeNS_A01_t01: RuntimeError
+LibTest/html/Element/setAttribute_A01_t01: RuntimeError
+LibTest/html/Element/setInnerHtml_A01_t01: RuntimeError
+LibTest/html/Element/setInnerHtml_A01_t02: RuntimeError
+LibTest/html/Element/setInnerHtml_A01_t03: RuntimeError
+LibTest/html/Element/spellcheck_A01_t01: RuntimeError
+LibTest/html/Element/spellcheck_A01_t02: RuntimeError
+LibTest/html/Element/style_A01_t01: RuntimeError
+LibTest/html/Element/style_A01_t02: RuntimeError
+LibTest/html/Element/submitEvent_A01_t01: RuntimeError
+LibTest/html/Element/tabIndex_A01_t01: RuntimeError
+LibTest/html/Element/tagName_A01_t01: RuntimeError
+LibTest/html/Element/tagName_A01_t02: RuntimeError
+LibTest/html/Element/text_A01_t01: RuntimeError
+LibTest/html/Element/text_A02_t01: RuntimeError
+LibTest/html/Element/text_A03_t01: RuntimeError
+LibTest/html/Element/text_A04_t01: RuntimeError
+LibTest/html/Element/title_A01_t01: RuntimeError
+LibTest/html/Event/Event.eventType_A01_t01: RuntimeError
+LibTest/html/Event/Event_A01_t02: RuntimeError
+LibTest/html/Event/Event_A01_t03: RuntimeError
+LibTest/html/Event/Event_A01_t04: RuntimeError
+LibTest/html/Event/bubbles_A01_t01: RuntimeError
+LibTest/html/Event/cancelable_A01_t01: RuntimeError
+LibTest/html/Event/matchingTarget_A01_t01: RuntimeError
+LibTest/html/Event/matchingTarget_A01_t02: RuntimeError
+LibTest/html/Event/stopImmediatePropagation_A01_t01: RuntimeError
+LibTest/html/Event/stopImmediatePropagation_A01_t02: RuntimeError
+LibTest/html/Event/type_A01_t01: RuntimeError
+LibTest/html/HttpRequest/HttpRequest_A01_t01: RuntimeError
+LibTest/html/HttpRequest/abort_A01_t01: RuntimeError
+LibTest/html/HttpRequest/addEventListener_A01_t01: RuntimeError
+LibTest/html/HttpRequest/dispatchEvent_A01_t01: RuntimeError
+LibTest/html/HttpRequest/onAbort_A01_t01: RuntimeError
+LibTest/html/HttpRequest/onLoadEnd_A01_t01: RuntimeError
+LibTest/html/HttpRequest/onLoadStart_A01_t01: RuntimeError
+LibTest/html/HttpRequest/onLoad_A01_t01: RuntimeError
+LibTest/html/HttpRequest/onReadyStateChange_A01_t01: RuntimeError
+LibTest/html/HttpRequest/open_A01_t01: RuntimeError
+LibTest/html/HttpRequest/removeEventListener_A01_t01: RuntimeError
+LibTest/html/HttpRequest/responseText_A01_t01: RuntimeError
+LibTest/html/HttpRequest/responseType_A01_t02: RuntimeError
+LibTest/html/IFrameElement/addEventListener_A01_t01: RuntimeError
+LibTest/html/IFrameElement/addEventListener_A01_t02: RuntimeError
+LibTest/html/IFrameElement/addEventListener_A01_t04: RuntimeError
+LibTest/html/IFrameElement/addEventListener_A01_t05: RuntimeError
+LibTest/html/IFrameElement/addEventListener_A01_t06: RuntimeError
+LibTest/html/IFrameElement/appendText_A01_t01: RuntimeError
+LibTest/html/IFrameElement/append_A01_t01: RuntimeError
+LibTest/html/IFrameElement/append_A02_t01: RuntimeError
+LibTest/html/IFrameElement/append_A02_t02: RuntimeError
+LibTest/html/IFrameElement/attributes_A01_t01: RuntimeError
+LibTest/html/IFrameElement/attributes_A02_t01: RuntimeError
+LibTest/html/IFrameElement/childNodes_A01_t01: RuntimeError
+LibTest/html/IFrameElement/childNodes_A01_t02: RuntimeError
+LibTest/html/IFrameElement/children_A01_t01: RuntimeError
+LibTest/html/IFrameElement/children_A01_t02: RuntimeError
+LibTest/html/IFrameElement/children_setter_A01_t01: RuntimeError
+LibTest/html/IFrameElement/className_A01_t01: RuntimeError
+LibTest/html/IFrameElement/classes_A01_t01: RuntimeError
+LibTest/html/IFrameElement/classes_setter_A01_t01: RuntimeError
+LibTest/html/IFrameElement/click_A01_t01: RuntimeError
+LibTest/html/IFrameElement/clone_A01_t01: RuntimeError
+LibTest/html/IFrameElement/clone_A02_t01: RuntimeError
+LibTest/html/IFrameElement/clone_A03_t01: RuntimeError
+LibTest/html/IFrameElement/contains_A01_t01: RuntimeError
+LibTest/html/IFrameElement/contains_A01_t02: RuntimeError
+LibTest/html/IFrameElement/contentEdge_A01_t01: RuntimeError
+LibTest/html/IFrameElement/dataset_A01_t01: RuntimeError
+LibTest/html/IFrameElement/dataset_A01_t02: RuntimeError
+LibTest/html/IFrameElement/dataset_setter_A01_t01: RuntimeError
+LibTest/html/IFrameElement/dispatchEvent_A01_t01: RuntimeError
+LibTest/html/IFrameElement/documentOffset_A01_t01: RuntimeError
+LibTest/html/IFrameElement/draggable_A01_t01: RuntimeError
+LibTest/html/IFrameElement/draggable_A01_t02: RuntimeError
+LibTest/html/IFrameElement/firstChild_A01_t01: RuntimeError
+LibTest/html/IFrameElement/getAttributeNS_A01_t01: RuntimeError
+LibTest/html/IFrameElement/getAttribute_A01_t01: RuntimeError
+LibTest/html/IFrameElement/getBoundingClientRect_A01_t01: RuntimeError
+LibTest/html/IFrameElement/getClientRects_A01_t01: Crash
+LibTest/html/IFrameElement/getClientRects_A01_t02: RuntimeError
+LibTest/html/IFrameElement/getElementsByClassName_A01_t01: RuntimeError
+LibTest/html/IFrameElement/getElementsByClassName_A02_t01: RuntimeError
+LibTest/html/IFrameElement/getNamespacedAttributes_A01_t01: RuntimeError
+LibTest/html/IFrameElement/hasChildNodes_A01_t01: RuntimeError
+LibTest/html/IFrameElement/hasChildNodes_A01_t02: RuntimeError
+LibTest/html/IFrameElement/hidden_A01_t01: RuntimeError
+LibTest/html/IFrameElement/id_A01_t01: RuntimeError
+LibTest/html/IFrameElement/insertAdjacentElement_A01_t01: RuntimeError
+LibTest/html/IFrameElement/insertAdjacentHtml_A01_t01: RuntimeError
+LibTest/html/IFrameElement/insertAdjacentText_A01_t01: RuntimeError
+LibTest/html/IFrameElement/insertAllBefore_A01_t01: RuntimeError
+LibTest/html/IFrameElement/insertAllBefore_A02_t01: RuntimeError
+LibTest/html/IFrameElement/insertBefore_A01_t01: RuntimeError
+LibTest/html/IFrameElement/insertBefore_A02_t01: RuntimeError
+LibTest/html/IFrameElement/lang_A01_t01: RuntimeError
+LibTest/html/IFrameElement/lang_A01_t02: RuntimeError
+LibTest/html/IFrameElement/lastChild_A01_t01: RuntimeError
+LibTest/html/IFrameElement/matchesWithAncestors_A01_t01: RuntimeError
+LibTest/html/IFrameElement/matches_A01_t01: RuntimeError
+LibTest/html/IFrameElement/namespaceUri_A01_t01: RuntimeError
+LibTest/html/IFrameElement/nextElementSibling_A01_t01: RuntimeError
+LibTest/html/IFrameElement/nextNode_A01_t01: RuntimeError
+LibTest/html/IFrameElement/nodeName_A01_t01: RuntimeError
+LibTest/html/IFrameElement/nodeType_A01_t01: RuntimeError
+LibTest/html/IFrameElement/nodeValue_A01_t01: RuntimeError
+LibTest/html/IFrameElement/nodes_A01_t01: RuntimeError
+LibTest/html/IFrameElement/nodes_A01_t02: RuntimeError
+LibTest/html/IFrameElement/nodes_setter_A01_t01: RuntimeError
+LibTest/html/IFrameElement/offsetTo_A01_t02: RuntimeError
+LibTest/html/IFrameElement/onAbort_A01_t01: RuntimeError
+LibTest/html/IFrameElement/onBeforeCopy_A01_t01: RuntimeError
+LibTest/html/IFrameElement/onBeforeCut_A01_t01: RuntimeError
+LibTest/html/IFrameElement/onBeforePaste_A01_t01: RuntimeError
+LibTest/html/IFrameElement/onBlur_A01_t01: RuntimeError
+LibTest/html/IFrameElement/onChange_A01_t01: RuntimeError
+LibTest/html/IFrameElement/onDoubleClick_A01_t01: RuntimeError
+LibTest/html/IFrameElement/onError_A01_t01: RuntimeError
+LibTest/html/IFrameElement/onFocus_A01_t01: RuntimeError
+LibTest/html/IFrameElement/onFullscreenChange_A01_t01: RuntimeError
+LibTest/html/IFrameElement/onFullscreenError_A01_t01: RuntimeError
+LibTest/html/IFrameElement/onInput_A01_t01: RuntimeError
+LibTest/html/IFrameElement/onInvalid_A01_t01: RuntimeError
+LibTest/html/IFrameElement/onLoad_A01_t01: RuntimeError
+LibTest/html/IFrameElement/onReset_A01_t01: RuntimeError
+LibTest/html/IFrameElement/onScroll_A01_t01: RuntimeError
+LibTest/html/IFrameElement/onSearch_A01_t01: RuntimeError
+LibTest/html/IFrameElement/onSelectStart_A01_t01: RuntimeError
+LibTest/html/IFrameElement/onSelect_A01_t01: RuntimeError
+LibTest/html/IFrameElement/onSubmit_A01_t01: RuntimeError
+LibTest/html/IFrameElement/on_A01_t01: RuntimeError
+LibTest/html/IFrameElement/outerHtml_A01_t01: RuntimeError
+LibTest/html/IFrameElement/ownerDocument_A01_t01: RuntimeError
+LibTest/html/IFrameElement/ownerDocument_A01_t02: RuntimeError
+LibTest/html/IFrameElement/ownerDocument_A01_t03: RuntimeError
+LibTest/html/IFrameElement/ownerDocument_A01_t04: RuntimeError
+LibTest/html/IFrameElement/ownerDocument_A01_t05: RuntimeError
+LibTest/html/IFrameElement/parentNode_A01_t01: RuntimeError
+LibTest/html/IFrameElement/parent_A01_t01: RuntimeError
+LibTest/html/IFrameElement/parent_A01_t02: RuntimeError
+LibTest/html/IFrameElement/previousElementSibling_A01_t01: RuntimeError
+LibTest/html/IFrameElement/previousNode_A01_t01: RuntimeError
+LibTest/html/IFrameElement/removeEventListener_A01_t01: RuntimeError
+LibTest/html/IFrameElement/removeEventListener_A01_t02: RuntimeError
+LibTest/html/IFrameElement/remove_A01_t01: RuntimeError
+LibTest/html/IFrameElement/resetEvent_A01_t01: RuntimeError
+LibTest/html/IFrameElement/scrollEvent_A01_t01: RuntimeError
+LibTest/html/IFrameElement/searchEvent_A01_t01: RuntimeError
+LibTest/html/IFrameElement/selectEvent_A01_t01: RuntimeError
+LibTest/html/IFrameElement/selectStartEvent_A01_t01: RuntimeError
+LibTest/html/IFrameElement/setAttributeNS_A01_t01: RuntimeError
+LibTest/html/IFrameElement/setAttribute_A01_t01: RuntimeError
+LibTest/html/IFrameElement/spellcheck_A01_t02: RuntimeError
+LibTest/html/IFrameElement/style_A01_t01: RuntimeError
+LibTest/html/IFrameElement/style_A01_t02: RuntimeError
+LibTest/html/IFrameElement/tabIndex_A01_t01: RuntimeError
+LibTest/html/IFrameElement/tagName_A01_t01: RuntimeError
+LibTest/html/IFrameElement/tagName_A01_t02: RuntimeError
+LibTest/html/IFrameElement/text_A01_t01: RuntimeError
+LibTest/html/IFrameElement/text_A02_t01: RuntimeError
+LibTest/html/IFrameElement/text_A03_t01: RuntimeError
+LibTest/html/IFrameElement/text_A04_t01: RuntimeError
+LibTest/html/IFrameElement/text_setter_A01_t01: RuntimeError
+LibTest/html/IFrameElement/title_A01_t01: RuntimeError
+LibTest/html/Node/addEventListener_A01_t01: RuntimeError
+LibTest/html/Node/addEventListener_A01_t02: RuntimeError
+LibTest/html/Node/addEventListener_A01_t03: RuntimeError
+LibTest/html/Node/addEventListener_A01_t04: RuntimeError
+LibTest/html/Node/addEventListener_A01_t05: RuntimeError
+LibTest/html/Node/append_A01_t01: RuntimeError
+LibTest/html/Node/append_A02_t01: RuntimeError
+LibTest/html/Node/childNodes_A01_t01: RuntimeError
+LibTest/html/Node/childNodes_A01_t02: RuntimeError
+LibTest/html/Node/clone_A01_t01: RuntimeError
+LibTest/html/Node/clone_A01_t02: RuntimeError
+LibTest/html/Node/contains_A01_t01: RuntimeError
+LibTest/html/Node/contains_A01_t02: RuntimeError
+LibTest/html/Node/dispatchEvent_A01_t01: RuntimeError
+LibTest/html/Node/firstChild_A01_t01: RuntimeError
+LibTest/html/Node/hasChildNodes_A01_t01: RuntimeError
+LibTest/html/Node/lastChild_A01_t01: RuntimeError
+LibTest/html/Node/nextNode_A01_t01: RuntimeError
+LibTest/html/Node/nodeType_A03_t01: RuntimeError
+LibTest/html/Node/nodeType_A04_t01: RuntimeError
+LibTest/html/Node/nodeType_A05_t01: RuntimeError
+LibTest/html/Node/nodeType_A06_t01: RuntimeError
+LibTest/html/Node/nodeType_A07_t01: RuntimeError
+LibTest/html/Node/nodeType_A12_t01: RuntimeError
+LibTest/html/Node/nodeValue_A03_t01: RuntimeError
+LibTest/html/Node/nodeValue_A04_t01: RuntimeError
+LibTest/html/Node/nodeValue_A06_t01: RuntimeError
+LibTest/html/Node/nodeValue_A07_t01: RuntimeError
+LibTest/html/Node/nodeValue_A12_t01: RuntimeError
+LibTest/html/Node/nodes_A01_t01: RuntimeError
+LibTest/html/Node/on_A01_t01: RuntimeError
+LibTest/html/Node/parentNode_A01_t01: RuntimeError
+LibTest/html/Node/removeEventListener_A01_t01: RuntimeError
+LibTest/html/Node/removeEventListener_A01_t02: RuntimeError
+LibTest/html/Node/remove_A01_t01: RuntimeError
+LibTest/html/Node/replaceWith_A01_t01: RuntimeError
+LibTest/html/Window/addEventListener_A01_t01: RuntimeError
+LibTest/html/Window/animationFrame_A01_t01: RuntimeError
+LibTest/html/Window/dispatchEvent_A01_t01: RuntimeError
+LibTest/html/Window/find_A01_t02: RuntimeError
+LibTest/html/Window/find_A02_t01: RuntimeError
+LibTest/html/Window/find_A03_t02: RuntimeError
+LibTest/html/Window/find_A05_t01: RuntimeError
+LibTest/html/Window/find_A07_t01: RuntimeError
+LibTest/html/Window/open_A01_t01: RuntimeError
+LibTest/html/Window/removeEventListener_A01_t01: RuntimeError
+WebPlatformTest/DOMEvents/approved/DOM.event.flow_t01: RuntimeError
+WebPlatformTest/DOMEvents/approved/EventListener.eventHandler_t01: RuntimeError
+WebPlatformTest/DOMEvents/approved/Propagation.path.target.moved_t01: RuntimeError
+WebPlatformTest/DOMEvents/approved/dispatchEvent.return.value_t01: RuntimeError
+WebPlatformTest/DOMEvents/approved/stopImmediatePropagation.effect_t01: RuntimeError
+WebPlatformTest/DOMEvents/approved/stopPropagation.dispatchEvent_t01: RuntimeError
+WebPlatformTest/Utils/test/testPass_t01: RuntimeError
+WebPlatformTest/dom/EventTarget/dispatchEvent_A01_t01: RuntimeError
+WebPlatformTest/dom/EventTarget/dispatchEvent_A03_t01: RuntimeError
+WebPlatformTest/dom/EventTarget/dispatchEvent_A04_t01: RuntimeError
+WebPlatformTest/dom/collections/emptyName_A01_t01: RuntimeError
+WebPlatformTest/dom/collections/emptyName_A01_t06: RuntimeError
+WebPlatformTest/dom/collections/emptyName_A01_t07: RuntimeError
+WebPlatformTest/dom/events/defaultPrevented_A01_t01: RuntimeError
+WebPlatformTest/dom/events/defaultPrevented_A01_t02: RuntimeError
+WebPlatformTest/dom/events/defaultPrevented_A01_t03: RuntimeError
+WebPlatformTest/dom/events/defaultPrevented_A01_t04: RuntimeError
+WebPlatformTest/dom/events/defaultPrevented_A01_t05: RuntimeError
+WebPlatformTest/dom/events/event_constructors/Event_A02_t01: RuntimeError
+WebPlatformTest/dom/lists/DOMTokenList.toString_A01_t01: RuntimeError
+WebPlatformTest/dom/nodes/CharacterData/appendData_A01_t01: RuntimeError
+WebPlatformTest/dom/nodes/CharacterData/deleteData_A02_t01: RuntimeError
+WebPlatformTest/dom/nodes/CharacterData/insertData_A01_t01: RuntimeError
+WebPlatformTest/dom/nodes/CharacterData/remove_A01_t01: RuntimeError
+WebPlatformTest/dom/nodes/CharacterData/remove_A01_t02: RuntimeError
+WebPlatformTest/dom/nodes/CharacterData/remove_A02_t01: RuntimeError
+WebPlatformTest/dom/nodes/Comment-constructor_t01: RuntimeError
+WebPlatformTest/dom/nodes/Document-getElementById_t01: RuntimeError
+WebPlatformTest/dom/nodes/Document-importNode_t01: RuntimeError
+WebPlatformTest/dom/nodes/Element-childElementCount-dynamic-add_t01: RuntimeError
+WebPlatformTest/dom/nodes/Element-childElementCount-nochild_t01: RuntimeError
+WebPlatformTest/dom/nodes/Element-childElementCount_t01: RuntimeError
+WebPlatformTest/dom/nodes/Node-cloneNode_t01: RuntimeError
+WebPlatformTest/dom/nodes/attributes/attributes_A03_t01: RuntimeError
+WebPlatformTest/dom/nodes/attributes/attributes_A06_t01: RuntimeError
+WebPlatformTest/dom/nodes/attributes/setAttributeNS_A01_t01: RuntimeError
+WebPlatformTest/dom/nodes/attributes/setAttributeNS_A07_t01: RuntimeError
+WebPlatformTest/dom/nodes/attributes/setAttributeNS_A09_t01: RuntimeError
+WebPlatformTest/dom/nodes/attributes/setAttribute_A09_t01: RuntimeError
+WebPlatformTest/dom/ranges/Range-attributes_t01: RuntimeError
+WebPlatformTest/dom/ranges/Range-comparePoint_t03: RuntimeError
+WebPlatformTest/dom/ranges/Range-detach_t01: RuntimeError
+WebPlatformTest/html-imports/link-import-null_t01: RuntimeError
+WebPlatformTest/html-templates/definitions/template-contents-owner-test-001_t01: RuntimeError
+WebPlatformTest/html-templates/parsing-html-templates/additions-to-foster-parenting/template-is-not-a-foster-parent-element_t01: RuntimeError
+WebPlatformTest/html-templates/parsing-html-templates/additions-to-the-in-body-insertion-mode/generating-of-implied-end-tags_t01: RuntimeError
+WebPlatformTest/html-templates/parsing-html-templates/additions-to-the-in-body-insertion-mode/ignore-head-token_t01: RuntimeError
+WebPlatformTest/html-templates/parsing-html-templates/additions-to-the-in-body-insertion-mode/start-tag-body_t01: RuntimeError
+WebPlatformTest/html-templates/parsing-html-templates/additions-to-the-in-body-insertion-mode/template-end-tag-without-start-one_t01: RuntimeError
+WebPlatformTest/html-templates/parsing-html-templates/additions-to-the-in-head-insertion-mode/template-end-tag-without-start-one_t01: RuntimeError
+WebPlatformTest/html-templates/template-element/content-attribute_t01: RuntimeError
+WebPlatformTest/html-templates/template-element/template-content-node-document_t01: RuntimeError
+WebPlatformTest/html/dom/documents/dom-tree-accessors/document.body-getter_t01: RuntimeError
+WebPlatformTest/html/dom/documents/dom-tree-accessors/document.getElementsByName-case_t01: RuntimeError
+WebPlatformTest/html/dom/documents/dom-tree-accessors/document.getElementsByName-id_t01: RuntimeError
+WebPlatformTest/html/dom/documents/dom-tree-accessors/document.getElementsByName-param_t01: RuntimeError
+WebPlatformTest/html/dom/documents/dom-tree-accessors/document.title_t01: RuntimeError
+WebPlatformTest/html/dom/documents/dom-tree-accessors/document.title_t03: RuntimeError
+WebPlatformTest/html/dom/documents/dom-tree-accessors/document.title_t07: RuntimeError
+WebPlatformTest/html/dom/documents/dom-tree-accessors/nameditem_t03: RuntimeError
+WebPlatformTest/html/dom/elements/global-attributes/classlist-nonstring_t01: RuntimeError
+WebPlatformTest/html/semantics/edits/the-del-element/del_effect_t01: RuntimeError
+WebPlatformTest/html/semantics/edits/the-ins-element/ins_effect_t01: RuntimeError
+WebPlatformTest/html/semantics/embedded-content/media-elements/interfaces/HTMLElement/HTMLMediaElement/textTracks_t01: RuntimeError
+WebPlatformTest/html/semantics/embedded-content/media-elements/interfaces/HTMLElement/HTMLTrackElement/readyState_t01: RuntimeError
+WebPlatformTest/html/semantics/embedded-content/media-elements/interfaces/HTMLElement/HTMLTrackElement/srclang_t01: RuntimeError
+WebPlatformTest/html/semantics/forms/the-fieldset-element/HTMLFieldSetElement_t01: RuntimeError
+WebPlatformTest/html/semantics/forms/the-input-element/required_attribute_t01: RuntimeError
+WebPlatformTest/html/semantics/forms/the-input-element/search_input_t01: RuntimeError
+WebPlatformTest/html/semantics/forms/the-option-element/option-text-backslash_t01: RuntimeError
+WebPlatformTest/html/semantics/forms/the-output-element/output_t01: RuntimeError
+WebPlatformTest/html/semantics/interactive-elements/the-details-element/toggleEvent_t01: RuntimeError
+WebPlatformTest/html/semantics/scripting-1/the-script-element/async_t01: RuntimeError
+WebPlatformTest/html/semantics/scripting-1/the-script-element/async_t02: RuntimeError
+WebPlatformTest/html/semantics/scripting-1/the-script-element/script-text_t01: RuntimeError
+WebPlatformTest/html/semantics/selectors/pseudo-classes/default_t01: RuntimeError
+WebPlatformTest/html/semantics/selectors/pseudo-classes/disabled_t01: RuntimeError
+WebPlatformTest/html/semantics/tabular-data/the-caption-element/caption_t01: RuntimeError
+WebPlatformTest/html/semantics/tabular-data/the-table-element/border_t01: RuntimeError
+WebPlatformTest/html/semantics/tabular-data/the-table-element/insertRow-method_t01: RuntimeError
+WebPlatformTest/html/syntax/parsing/math-parse_t01: RuntimeError
+WebPlatformTest/html/syntax/serializing-html-fragments/outerHTML_t01: RuntimeError
+WebPlatformTest/webstorage/event_session_storageeventinit_t01: RuntimeError
+WebPlatformTest/webstorage/storage_builtins_t01: RuntimeError
+WebPlatformTest/webstorage/storage_clear_t01: RuntimeError
+WebPlatformTest/webstorage/storage_local_getitem_t01: RuntimeError
+WebPlatformTest/webstorage/storage_local_key_t01: RuntimeError
+WebPlatformTest/webstorage/storage_local_length_t01: RuntimeError
+WebPlatformTest/webstorage/storage_session_getitem_t01: RuntimeError
+WebPlatformTest/webstorage/storage_session_key_t01: RuntimeError
+WebPlatformTest/webstorage/storage_session_setitem_t01: RuntimeError
+
+[ $compiler == dart2js && $runtime != chrome && $runtime != ff && !$fast_startup ]
+LayoutTests/fast/canvas/canvas-blend-image_t01: RuntimeError
+LayoutTests/fast/css/computed-offset-with-zoom_t01: RuntimeError
+LayoutTests/fast/css/counters/counter-cssText_t01: RuntimeError
+LayoutTests/fast/css/font-face-unicode-range-monospace_t01: RuntimeError
+LayoutTests/fast/css/getPropertyValue-columns_t01: RuntimeError
+LayoutTests/fast/css/invalid-not-with-simple-selector-sequence_t01: RuntimeError
+LayoutTests/fast/css/parsing-object-position_t01: RuntimeError
+LayoutTests/fast/css/shadow-current-color_t01: RuntimeError
+LayoutTests/fast/css/sticky/parsing-position-sticky_t01: RuntimeError
+LayoutTests/fast/css3-text/css3-text-align-last/getComputedStyle/getComputedStyle-text-align-last-inherited_t01: RuntimeError
+LayoutTests/fast/css3-text/css3-text-align-last/getComputedStyle/getComputedStyle-text-align-last_t01: RuntimeError
+LayoutTests/fast/dom/Attr/direction-attribute-set-and-cleared_t01: RuntimeError
+LayoutTests/fast/dom/HTMLSelectElement/selected-index-preserved-when-option-text-changes_t01: RuntimeError
+LayoutTests/fast/dom/MutationObserver/observe-options-attributes_t01: RuntimeError
+LayoutTests/fast/files/file-reader-readystate_t01: RuntimeError
+LayoutTests/fast/filesystem/input-access-entries_t01: RuntimeError
+LayoutTests/fast/forms/date-multiple-fields/date-multiple-fields-change-layout-by-value_t01: RuntimeError
+LayoutTests/fast/forms/date/date-input-type_t01: RuntimeError
+LayoutTests/fast/forms/date/input-valueasnumber-date_t01: RuntimeError
+LayoutTests/fast/inline/continuation-inlines-inserted-in-reverse-after-block_t01: RuntimeError
+LayoutTests/fast/innerHTML/innerHTML-uri-resolution_t01: RuntimeError
+LayoutTests/fast/media/media-query-list_t01: RuntimeError
+LayoutTests/fast/multicol/balance-short-trailing-empty-block_t01: RuntimeError
+LayoutTests/fast/multicol/balance-trailing-border_t01: RuntimeError
+LayoutTests/fast/multicol/balance-trailing-border_t02: RuntimeError
+LayoutTests/fast/multicol/columns-shorthand-parsing_t02: RuntimeError
+LayoutTests/fast/sub-pixel/table-rows-have-stable-height_t01: RuntimeError
+LayoutTests/fast/table/absolute-table-percent-lengths_t01: RuntimeError
+LayoutTests/fast/table/switch-table-layout-dynamic-cells_t01: RuntimeError
+LayoutTests/fast/text/font-ligatures-linebreak-word_t01: RuntimeError
+LayoutTests/fast/text/font-ligatures-linebreak_t01: RuntimeError
+LayoutTests/fast/text/selection-exceptions_t01: RuntimeError
+LayoutTests/fast/writing-mode/vertical-font-vmtx-units-per-em_t01: RuntimeError
+LayoutTests/fast/xmlhttprequest/xmlhttprequest-responsetype-sync-request_t01: RuntimeError
+LibTest/html/Element/getClientRects_A01_t02: RuntimeError
+LibTest/html/Element/isContentEditable_A02_t01: RuntimeError
+LibTest/html/IFrameElement/isContentEditable_A01_t01: RuntimeError
+LibTest/html/Window/close_A01_t01: RuntimeError
+
+[ $compiler == dart2js && $runtime != chrome && $runtime != safari ]
+LayoutTests/fast/animation/request-animation-frame-cancel2_t01: RuntimeError, Timeout
+LayoutTests/fast/backgrounds/mask-box-image-width_t01: RuntimeError
+LayoutTests/fast/borders/border-color-visited_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-fill-zeroSizeGradient_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-frameless-document-text_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-strokeRect-zeroSizeGradient_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-strokeText-zeroSizeGradient_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/gl-enum-tests_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/renderer-and-vendor-strings_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/grid-template-areas-get-set_t01: RuntimeError
+LayoutTests/fast/css-intrinsic-dimensions/height-property-value_t01: RuntimeError
+LayoutTests/fast/css-intrinsic-dimensions/width-property-value_t01: RuntimeError
+LayoutTests/fast/css/background-parser-crash_t01: RuntimeError
+LayoutTests/fast/css/border-width-large_t01: RuntimeError
+LayoutTests/fast/css/content/content-quotes-06_t01: RuntimeError
+LayoutTests/fast/css/counters/counter-reset-subtree-insert-crash_t01: RuntimeError
+LayoutTests/fast/css/font-shorthand-mix-inherit_t01: RuntimeError
+LayoutTests/fast/css/getComputedStyle/computed-style-properties_t01: RuntimeError
+LayoutTests/fast/css/getComputedStyle/getComputedStyle-border-radius-shorthand_t01: RuntimeError
+LayoutTests/fast/css/getComputedStyle/getComputedStyle-column-rule_t01: RuntimeError
+LayoutTests/fast/css/getPropertyValue-webkit-text-stroke_t01: RuntimeError
+LayoutTests/fast/css/insertRule-font-face_t01: RuntimeError
+LayoutTests/fast/css/invalidation/clears-invalidation-whole-tree_t01: RuntimeError
+LayoutTests/fast/css/invalidation/targeted-class-any-pseudo_t01: RuntimeError
+LayoutTests/fast/css/legacy-opacity-styles_t01: RuntimeError
+LayoutTests/fast/css/margin-start-end_t01: RuntimeError
+LayoutTests/fast/css/parsing-webkit-font-smoothing_t01: RuntimeError
+LayoutTests/fast/css/pseudo-any_t01: RuntimeError
+LayoutTests/fast/css/pseudo-valid-unapplied_t01: RuntimeError
+LayoutTests/fast/css/readwrite-contenteditable-recalc_t01: RuntimeError
+LayoutTests/fast/css/recalc-optgroup-inherit_t01: RuntimeError
+LayoutTests/fast/css/sibling-selectors_t01: RuntimeError
+LayoutTests/fast/css/style-element-process-crash_t01: RuntimeError
+LayoutTests/fast/css/text-align-webkit-match-parent-parse_t01: RuntimeError
+LayoutTests/fast/css/vertical-align-length-copy-bug_t01: RuntimeError
+LayoutTests/fast/css/webkit-keyframes-crash_t01: RuntimeError
+LayoutTests/fast/dom/Element/fixed-position-offset-parent_t01: RuntimeError
+LayoutTests/fast/dom/HTMLElement/attr-dir-auto-text-form-control-child_t01: RuntimeError
+LayoutTests/fast/dom/HTMLElement/attr-dir-auto-text-form-control_t01: RuntimeError
+LayoutTests/fast/dom/HTMLElement/attr-dir-value-change_t01: RuntimeError
+LayoutTests/fast/dom/HTMLElement/attr-invalid-string_t01: RuntimeError
+LayoutTests/fast/dom/HTMLElement/attr-missing-ancestor-false_t01: RuntimeError
+LayoutTests/fast/dom/HTMLElement/attr-true-string_t01: RuntimeError
+LayoutTests/fast/dom/HTMLElement/set-false_t01: RuntimeError
+LayoutTests/fast/dom/HTMLElement/set-value-caseinsensitive_t01: RuntimeError
+LayoutTests/fast/dom/HTMLInputElement/input-hidden-value_t01: RuntimeError
+LayoutTests/fast/dom/MutationObserver/database-callback-delivery_t01: RuntimeError
+LayoutTests/fast/dom/MutationObserver/observe-attributes_t01: RuntimeError
+LayoutTests/fast/dom/SelectorAPI/caseTagX_t01: RuntimeError
+LayoutTests/fast/dom/background-shorthand-csstext_t01: RuntimeError
+LayoutTests/fast/dom/boolean-attribute-reflection_t01: RuntimeError
+LayoutTests/fast/dom/css-rule-functions_t01: RuntimeError
+LayoutTests/fast/dom/css-shortHands_t01: RuntimeError
+LayoutTests/fast/dom/dom-parse-serialize-display_t01: RuntimeError
+LayoutTests/fast/dom/dom-parse-serialize_t01: RuntimeError
+LayoutTests/fast/dom/fragment-activation-focuses-target_t01: RuntimeError
+LayoutTests/fast/dom/insertBefore-refChild-crash_t01: RuntimeError
+LayoutTests/fast/dom/partial-layout-non-overlay-scrollbars_t01: RuntimeError
+LayoutTests/fast/dom/remove-body-during-body-replacement_t01: RuntimeError
+LayoutTests/fast/dom/shadow/no-renderers-for-light-children_t01: RuntimeError
+LayoutTests/fast/dom/subtree-modified-attributes_t01: RuntimeError
+LayoutTests/fast/dom/vertical-scrollbar-when-dir-change_t01: RuntimeError
+LayoutTests/fast/events/event-fire-order_t01: RuntimeError
+LayoutTests/fast/events/form-onchange_t01: RuntimeError
+LayoutTests/fast/events/selectstart-prevent-selectall_t01: RuntimeError
+LayoutTests/fast/flexbox/box-size-integer-overflow_t01: RuntimeError
+LayoutTests/fast/forms/11423_t01: RuntimeError
+LayoutTests/fast/forms/8250_t01: RuntimeError
+LayoutTests/fast/forms/ValidityState-patternMismatch_t01: RuntimeError
+LayoutTests/fast/forms/autofocus-opera-005_t01: RuntimeError
+LayoutTests/fast/forms/autofocus-readonly-attribute_t01: RuntimeError
+LayoutTests/fast/forms/checkValidity-handler-updates-dom_t01: RuntimeError
+LayoutTests/fast/forms/delete-text-with-invisible-br_t01: RuntimeError
+LayoutTests/fast/forms/form-dirname-attribute_t01: RuntimeError
+LayoutTests/fast/forms/input-text-paste-maxlength_t01: RuntimeError
+LayoutTests/fast/forms/input-widths_t01: RuntimeError
+LayoutTests/fast/forms/min-content-form-controls_t01: RuntimeError
+LayoutTests/fast/forms/paste-multiline-text-input_t01: RuntimeError
+LayoutTests/fast/forms/select-change-popup-to-listbox-roundtrip_t01: RuntimeError
+LayoutTests/fast/forms/select-namedItem_t01: RuntimeError
+LayoutTests/fast/forms/submit-form-with-dirname-attribute-with-nonhtml-ancestor_t01: RuntimeError
+LayoutTests/fast/forms/textarea-no-scroll-on-blur_t01: RuntimeError
+LayoutTests/fast/forms/textfield-clone_t01: RuntimeError
+LayoutTests/fast/forms/textfield-focus-out_t01: RuntimeError
+LayoutTests/fast/inline/inline-relative-offset-boundingbox_t01: RuntimeError
+LayoutTests/fast/masking/parsing-clip-path-iri_t01: RuntimeError
+LayoutTests/fast/media/media-query-serialization_t01: RuntimeError
+LayoutTests/fast/multicol/column-width-zero_t01: RuntimeError
+LayoutTests/fast/multicol/hit-test-gap-between-pages_t01: RuntimeError
+LayoutTests/fast/multicol/inherit-column-values_t01: RuntimeError
+LayoutTests/fast/multicol/initial-column-values_t01: RuntimeError
+LayoutTests/fast/multicol/newmulticol/balance_t06: RuntimeError
+LayoutTests/fast/multicol/vertical-lr/break-properties_t01: RuntimeError
+LayoutTests/fast/multicol/vertical-lr/gap-non-negative_t01: RuntimeError
+LayoutTests/fast/multicol/vertical-lr/image-inside-nested-blocks-with-border_t01: RuntimeError
+LayoutTests/fast/multicol/vertical-rl/break-properties_t01: RuntimeError
+LayoutTests/fast/multicol/vertical-rl/gap-non-negative_t01: RuntimeError
+LayoutTests/fast/overflow/height-during-simplified-layout_t01: RuntimeError
+LayoutTests/fast/overflow/overflow-rtl-vertical-origin_t01: RuntimeError
+LayoutTests/fast/parser/block-nesting-cap_t01: RuntimeError
+LayoutTests/fast/selectors/specificity-overflow_t01: RuntimeError
+LayoutTests/fast/shapes/parsing/parsing-shape-image-threshold_t01: RuntimeError, Pass
+LayoutTests/fast/shapes/parsing/parsing-shape-property-aliases_t01: RuntimeError, Pass
+LayoutTests/fast/table/border-changes_t01: RuntimeError
+LayoutTests/fast/text/line-breaks-after-hyphen-before-number_t01: RuntimeError
+LayoutTests/fast/writing-mode/block-formatting-context_t01: RuntimeError
+LayoutTests/fast/writing-mode/display-mutation_t01: RuntimeError
+LayoutTests/fast/writing-mode/percentage-padding_t01: RuntimeError
+LayoutTests/fast/xmlhttprequest/xmlhttprequest-responsetype-abort_t01: RuntimeError
+LibTest/html/Element/translate_A01_t01: RuntimeError
+LibTest/html/HttpRequestUpload/onAbort_A01_t01: RuntimeError
+LibTest/html/IFrameElement/spellcheck_A01_t01: RuntimeError
+LibTest/html/IFrameElement/translate_A01_t01: RuntimeError
+LibTest/html/Window/find_A04_t01: RuntimeError
+WebPlatformTest/dom/nodes/attributes/setAttributeNS_A10_t01: RuntimeError
+WebPlatformTest/html-templates/additions-to-the-steps-to-clone-a-node/templates-copy-document-owner_t01: RuntimeError
+WebPlatformTest/html-templates/template-element/template-content_t01: RuntimeError
+WebPlatformTest/html/semantics/forms/the-input-element/range_t02: RuntimeError
+WebPlatformTest/html/syntax/parsing/math-parse_t03: RuntimeError
+
+[ $compiler == dart2js && $runtime != chrome && $system != macos ]
+LayoutTests/fast/canvas/canvas-alphaImageData-behavior_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-scale-drawImage-shadow_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-scale-fillRect-shadow_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-strokePath-alpha-shadow_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-transforms-fillRect-shadow_t01: RuntimeError
+LayoutTests/fast/css/getComputedStyle/getComputedStyle-zoom-and-background-size_t01: RuntimeError
+
+[ $compiler == dart2js && $runtime == d8 ]
+Language/Expressions/Additive_Expressions/syntax_t01: RuntimeError
+Language/Expressions/Await_Expressions/evaluation_throws_t04: RuntimeError
+Language/Expressions/Await_Expressions/evaluation_throws_t06: RuntimeError
+Language/Expressions/Await_Expressions/evaluation_throws_t07: RuntimeError
+Language/Expressions/Constants/depending_on_itself_t03: Crash
+Language/Expressions/Constants/exception_t02/01: CompileTimeError
+Language/Expressions/Constants/integer_size_t03: CompileTimeError
+Language/Expressions/Constants/integer_size_t04: CompileTimeError
+Language/Expressions/Function_Invocation/async_generator_invokation_t08: Fail
+Language/Expressions/Function_Invocation/async_generator_invokation_t10: Fail
+Language/Expressions/Identifier_Reference/evaluation_variable_or_parameter_t02: RuntimeError
+Language/Expressions/If_null_Expressions/static_type_t01: RuntimeError
+Language/Expressions/Lists/identical_t02: RuntimeError
+Language/Expressions/Maps/identical_t02: RuntimeError
+Language/Expressions/Null/instance_of_class_null_t01: RuntimeError
+Language/Expressions/Numbers/syntax_t06: CompileTimeError
+Language/Expressions/Numbers/syntax_t09: CompileTimeError
+Language/Expressions/Object_Identity/double_t02: RuntimeError
+Language/Expressions/Shift/integer_t02: CompileTimeError
+Language/Expressions/Type_Cast/syntax_t01: RuntimeError
+Language/Expressions/Unary_Expressions/variable_negative_t03: RuntimeError
+Language/Functions/setter_modifier_t01: Crash
+Language/Functions/setter_modifier_t04: Crash
+Language/Libraries_and_Scripts/Scripts/top_level_main_t01: CompileTimeError
+Language/Libraries_and_Scripts/top_level_syntax_t01: CompileTimeError
+Language/Metadata/before_ctor_t02: RuntimeError
+Language/Metadata/before_function_t01: RuntimeError
+Language/Metadata/before_function_t02: RuntimeError
+Language/Metadata/before_function_t03: RuntimeError
+Language/Metadata/before_function_t04: RuntimeError
+Language/Metadata/before_function_t07: RuntimeError
+Language/Metadata/before_import_t01: RuntimeError
+Language/Metadata/before_param_t03: RuntimeError
+Language/Metadata/before_param_t05: RuntimeError
+Language/Metadata/before_param_t07: RuntimeError
+Language/Metadata/before_param_t09: RuntimeError
+Language/Metadata/before_variable_t02: RuntimeError
+Language/Mixins/Mixin_Application/syntax_t23: RuntimeError
+Language/Mixins/Mixin_Application/syntax_t25: RuntimeError
+Language/Overview/Privacy/private_and_public_t18: RuntimeError
+Language/Reference/Operator_Precedence/precedence_15_unary_prefix_t08: RuntimeError
+Language/Statements/Assert/execution_t09: RuntimeError
+Language/Statements/For/syntax_t13: Crash
+Language/Statements/For/syntax_t20: Crash
+Language/Types/Function_Types/call_t01: RuntimeError
+Language/Types/Function_Types/subtype_named_args_t02: RuntimeError
+Language/Types/Function_Types/subtype_named_args_t03: RuntimeError
+Language/Types/Function_Types/subtype_named_args_t11: RuntimeError
+Language/Types/Function_Types/subtype_optional_args_t01: RuntimeError
+Language/Types/Function_Types/subtype_optional_args_t02: RuntimeError
+Language/Types/Function_Types/subtype_optional_args_t04: RuntimeError
+Language/Types/Interface_Types/subtype_t06: RuntimeError
+Language/Types/Interface_Types/subtype_t21: RuntimeError
+Language/Types/Interface_Types/subtype_t23: RuntimeError
+Language/Variables/constant_variable_t09: RuntimeError
+LanguageFeatures/Instantiate-to-bound/Callable/Callable_named_extends_neg_assign_l1_t01: MissingCompileTimeError
+LanguageFeatures/Instantiate-to-bound/Callable/Callable_optparam_extends_neg_assign_l1_t01: MissingCompileTimeError
+LanguageFeatures/Instantiate-to-bound/Callable/Callable_ret_extends_neg_assign_l1_t01: MissingCompileTimeError
+LanguageFeatures/Instantiate-to-bound/Callable/Callable_ret_extends_neg_assign_l1_t03: MissingCompileTimeError
+LanguageFeatures/Instantiate-to-bound/Callable/Callable_ret_extends_neg_assign_l1_t04: MissingCompileTimeError
+LanguageFeatures/Instantiate-to-bound/Callable/Callable_ret_extends_neg_assign_l1_t05: MissingCompileTimeError
+LanguageFeatures/Instantiate-to-bound/Callable/Callable_ret_extends_neg_assign_l1_t06: MissingCompileTimeError
+LanguageFeatures/Instantiate-to-bound/Callable/Callable_ret_extends_neg_assign_l1_t07: MissingCompileTimeError
+LanguageFeatures/Instantiate-to-bound/Callable/Callable_ret_extends_neg_assign_l1_t08: MissingCompileTimeError
+LanguageFeatures/Instantiate-to-bound/Callable/Callable_ret_extends_neg_assign_l1_t09: MissingCompileTimeError
+LanguageFeatures/Instantiate-to-bound/Callable/Callable_ret_extends_neg_assign_l1_t10: MissingCompileTimeError
+LanguageFeatures/Instantiate-to-bound/check_types/typedef_param_t02: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/interface_compositionality_class_member_A02_t03: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/interface_compositionality_local_variable_A02_t01: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/interface_compositionality_return_value_A02_t01: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A51_t01: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A51_t02: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A53_t01: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A51_t02: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A51_t03: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A53_t01: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A53_t02: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A53_t03: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_global_variable_fail_A51_t01: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_global_variable_fail_A52_t01: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_local_variable_fail_A51_t01: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_local_variable_fail_A52_t01: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_local_variable_fail_A53_t01: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_return_value_fail_A53_t01: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/positional_function_types_fail_arguments_binding_fail_A31_t01: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/positional_function_types_fail_arguments_binding_fail_A31_t02: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/positional_function_types_fail_arguments_binding_fail_A32_t01: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/positional_function_types_fail_arguments_binding_fail_A32_t02: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/positional_function_types_fail_class_member_fail_A31_t01: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/positional_function_types_fail_class_member_fail_A31_t03: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/positional_function_types_fail_class_member_fail_A32_t02: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/positional_function_types_fail_class_member_fail_A32_t03: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/positional_function_types_fail_local_variable_fail_A31_t01: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/positional_function_types_fail_local_variable_fail_A32_t01: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/positional_function_types_fail_return_value_fail_A32_t01: RuntimeError
+LanguageFeatures/Subtyping/static/generated/interface_compositionality_arguments_binding_A02_t01: RuntimeError
+LanguageFeatures/Subtyping/static/generated/interface_compositionality_class_member_A02_t01: RuntimeError
+LanguageFeatures/Subtyping/static/generated/interface_compositionality_class_member_A02_t02: RuntimeError
+LanguageFeatures/Subtyping/static/generated/interface_compositionality_class_member_A02_t03: RuntimeError
+LayoutTests/fast/animation/request-animation-frame-prefix_t01: RuntimeError
+LayoutTests/fast/backgrounds/animated-gif-as-background_t01: RuntimeError
+LayoutTests/fast/backgrounds/background-fill-zero-area-crash_t01: RuntimeError
+LayoutTests/fast/backgrounds/background-position-parsing-2_t01: RuntimeError
+LayoutTests/fast/backgrounds/background-shorthand-with-backgroundSize-style_t01: RuntimeError
+LayoutTests/fast/backgrounds/composite-highlight-is-invalid_t01: RuntimeError
+LayoutTests/fast/backgrounds/multiple-backgrounds-assert_t01: RuntimeError
+LayoutTests/fast/backgrounds/repeat/margin-shorthand_t01: RuntimeError
+LayoutTests/fast/backgrounds/repeat/parsing-background-repeat_t01: RuntimeError
+LayoutTests/fast/borders/border-image-width-negative_t01: RuntimeError
+LayoutTests/fast/borders/border-image-width-numbers-computed-style_t01: RuntimeError
+LayoutTests/fast/borders/border-radius-child_t01: RuntimeError
+LayoutTests/fast/borders/border-width-percent_t01: RuntimeError
+LayoutTests/fast/box-sizing/table-cell_t01: RuntimeError
+LayoutTests/fast/canvas/2d.composite.globalAlpha.fillPath_t01: RuntimeError
+LayoutTests/fast/canvas/2d.fillText.gradient_t01: RuntimeError
+LayoutTests/fast/canvas/2d.text.draw.fill.maxWidth.negative_t01: RuntimeError
+LayoutTests/fast/canvas/DrawImageSinglePixelStretch_t01: RuntimeError
+LayoutTests/fast/canvas/arc-crash_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-arc-360-winding_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-arc-connecting-line_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-as-image-incremental-repaint_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-before-css_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-blend-solid_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-blending-color-over-color_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-blending-global-alpha_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-blending-gradient-over-color_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-blending-gradient-over-gradient_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-blending-gradient-over-pattern_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-blending-image-over-color_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-blending-image-over-gradient_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-blending-pattern-over-image_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-blending-text_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-blending-transforms_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-clearRect_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-clip-rule_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-closePath-single-point_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-composite-alpha_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-composite-image_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-composite-stroke-alpha_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-composite-text-alpha_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-currentColor_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-ellipse-360-winding_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-ellipse-negative-radius_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-fillRect-zeroSizeGradient_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-fillRect_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-fillStyle-no-quirks-parsing_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-fillText-invalid-maxWidth_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-fillText-zeroSizeGradient_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-font-consistency_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-font-ex-units-crash_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-getContext-invalid_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-getImageData-invalid_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-getImageData-rounding_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-imageSmoothingEnabled-repaint_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-imageSmoothingEnabled-zero-size_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-imageSmoothingEnabled_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-invalid-fillstyle_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-lineWidth-intact-after-strokeRect_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-longlived-context_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-lose-restore-googol-size_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-lose-restore-max-int-size_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-modify-emptyPath_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-pattern-modify_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-putImageData_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-quadratic-same-endpoint_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-resetTransform_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-save-restore-with-path_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-scale-fillPath-shadow_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-scale-shadowBlur_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-setTransform_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-shadow_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-state-intact-after-putImageData_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-stroke-empty-fill_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-stroke-zeroSizeGradient_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-strokePath-cap-join_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-strokePath-gradient-shadow_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-strokeRect-alpha-shadow_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-strokeRect-gradient-shadow_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-strokeText-invalid-maxWidth_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-strokeText-strokes-shadow_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-style-intact-after-text_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-to-canvas_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-toDataURL-crash_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-transparency-and-composite_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-with-illegal-args_t01: RuntimeError
+LayoutTests/fast/canvas/crash-set-font_t01: RuntimeError
+LayoutTests/fast/canvas/drawImage-with-bad-canvas_t01: RuntimeError
+LayoutTests/fast/canvas/drawImage-with-broken-image_t01: RuntimeError
+LayoutTests/fast/canvas/drawImage-with-valid-image_t01: RuntimeError
+LayoutTests/fast/canvas/fillText-shadow_t01: RuntimeError
+LayoutTests/fast/canvas/getPutImageDataPairTest_t01: RuntimeError
+LayoutTests/fast/canvas/gradient-addColorStop-with-invalid-color_t01: RuntimeError
+LayoutTests/fast/canvas/gradient-with-clip_t01: RuntimeError
+LayoutTests/fast/canvas/linearGradient-infinite-values_t01: RuntimeError
+LayoutTests/fast/canvas/pattern-with-transform_t01: RuntimeError
+LayoutTests/fast/canvas/resize-while-save-active_t01: RuntimeError
+LayoutTests/fast/canvas/rgba-parsing_t01: RuntimeError
+LayoutTests/fast/canvas/set-colors_t01: RuntimeError
+LayoutTests/fast/canvas/setWidthResetAfterForcedRender_t01: RuntimeError
+LayoutTests/fast/canvas/toDataURL-noData_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/WebGLContextEvent_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/attrib-location-length-limits_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/canvas-resize-crash_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/canvas-zero-size_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/context-destroyed-crash_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/copy-tex-image-and-sub-image-2d_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/css-webkit-canvas-repaint_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/css-webkit-canvas_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/draw-elements-out-of-bounds_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/get-active-test_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/gl-bind-attrib-location-test_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/gl-getshadersource_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/gl-getstring_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/gl-object-get-calls_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/gl-pixelstorei_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/gl-vertex-attrib_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/glsl-conformance_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/incorrect-context-object-behaviour_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/index-validation-copies-indices_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/index-validation-with-resized-buffer_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/oes-element-index-uint_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/oes-vertex-array-object_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/point-size_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/premultiplyalpha-test_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/read-pixels-test_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/shader-precision-format_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-array-buffer-view_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-canvas-rgb565_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-canvas-rgba4444_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-canvas_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-image-data-rgb565_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-image-data-rgba4444_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-image-data-rgba5551_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-image-data_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-image-rgba4444_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-svg-image_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-video-rgb565_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/texImageTest_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/texture-active-bind_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/texture-bindings-uneffected-on-resize_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/texture-complete_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/texture-npot_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/viewport-unchanged-upon-resize_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/webgl-specific_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/webgl-unprefixed-context-id_t01: RuntimeError
+LayoutTests/fast/canvas/zero-size-fill-rect_t01: RuntimeError
+LayoutTests/fast/cookies/local-file-can-set-cookies_t01: RuntimeError
+LayoutTests/fast/css-generated-content/bug-106384_t01: RuntimeError
+LayoutTests/fast/css-generated-content/bug91547_t01: RuntimeError
+LayoutTests/fast/css-generated-content/details-before-after-content_t01: RuntimeError
+LayoutTests/fast/css-generated-content/empty-content-with-float-crash_t01: RuntimeError
+LayoutTests/fast/css-generated-content/floating-before-content-with-list-marker-crash_t01: RuntimeError
+LayoutTests/fast/css-generated-content/malformed-url_t01: RuntimeError
+LayoutTests/fast/css-generated-content/pseudo-animation-before-onload_t01: RuntimeError
+LayoutTests/fast/css-generated-content/pseudo-animation_t01: RuntimeError
+LayoutTests/fast/css-generated-content/quote-layout-focus-crash_t01: RuntimeError
+LayoutTests/fast/css-generated-content/remove-div-from-flexible-box-with-floating-after-content-crash_t01: RuntimeError
+LayoutTests/fast/css-generated-content/reset-content-to-initial_t01: RuntimeError
+LayoutTests/fast/css-generated-content/summary-before-after-content_t01: RuntimeError
+LayoutTests/fast/css-generated-content/table-with-scrollbar-corner_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/anonymous-grid-items_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/breadth-size-resolution-grid_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/calc-resolution-grid-item_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/flex-content-resolution-columns_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/flex-content-resolution-rows_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/grid-auto-flow-get-set_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/grid-auto-flow-update_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/grid-crash-out-of-flow-positioned-element_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/grid-element-bad-cast-addchild_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/grid-element-border-grid-item_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/grid-element-border-padding-grid-item_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/grid-element-padding-margin_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/grid-item-area-get-set_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/grid-item-bad-named-area-auto-placement_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/grid-item-change-order-auto-flow_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/grid-item-margin-auto-columns-rows-horiz-bt_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/grid-item-margin-auto-columns-rows-vert-rl_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/grid-item-margin-auto-columns-rows_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/grid-item-margin-resolution_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/grid-item-order-auto-flow-resolution_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/justify-self-cell_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/minmax-fixed-logical-height-only_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/percent-grid-item-in-percent-grid-track-in-percent-grid_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/percent-grid-item-in-percent-grid-track-update_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/percent-grid-item-in-percent-grid-track_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/percent-padding-margin-resolution-grid-item-update_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/place-cell-by-index_t01: RuntimeError
+LayoutTests/fast/css-intrinsic-dimensions/intrinsic-sized-blocks_t01: RuntimeError
+LayoutTests/fast/css-intrinsic-dimensions/intrinsic-sized-column-flex-items_t01: RuntimeError
+LayoutTests/fast/css-intrinsic-dimensions/intrinsic-sized-flex-items_t01: RuntimeError
+LayoutTests/fast/css-intrinsic-dimensions/intrinsic-sized-replaced-absolutes_t01: RuntimeError
+LayoutTests/fast/css-intrinsic-dimensions/width-shrinks-avoid-floats_t01: RuntimeError
+LayoutTests/fast/css/MarqueeLayoutTest_t01: RuntimeError
+LayoutTests/fast/css/appearance-caps-lock-indicator_t01: RuntimeError
+LayoutTests/fast/css/aspect-ratio-inheritance_t01: RuntimeError
+LayoutTests/fast/css/attribute-selector-begin-dynamic-no-elementstyle_t01: RuntimeError
+LayoutTests/fast/css/attribute-selector-recursive-update-on-setAttribute_t01: RuntimeError
+LayoutTests/fast/css/auto-min-size_t01: RuntimeError
+LayoutTests/fast/css/background-currentcolor_t01: RuntimeError
+LayoutTests/fast/css/background-position-serialize_t01: RuntimeError
+LayoutTests/fast/css/background-serialize_t01: RuntimeError
+LayoutTests/fast/css/border-image-fill-crash_t01: RuntimeError
+LayoutTests/fast/css/border-image-null-image-crash_t01: RuntimeError
+LayoutTests/fast/css/border-image-style-length_t01: RuntimeError
+LayoutTests/fast/css/border-shorthand-initialize-longhands_t01: RuntimeError
+LayoutTests/fast/css/border-start-end_t01: RuntimeError
+LayoutTests/fast/css/box-sizing-backwards-compat-prefix_t01: RuntimeError
+LayoutTests/fast/css/box-sizing-border-box-dynamic-padding-border-update_t01: RuntimeError
+LayoutTests/fast/css/button-height_t01: RuntimeError
+LayoutTests/fast/css/cached-sheet-restore-crash_t01: RuntimeError
+LayoutTests/fast/css/comment-before-charset_t01: RuntimeError
+LayoutTests/fast/css/content-language-case-insensitivity_t01: RuntimeError
+LayoutTests/fast/css/content-language-mapped-to-webkit-locale_t01: RuntimeError
+LayoutTests/fast/css/content-language-no-content_t01: RuntimeError
+LayoutTests/fast/css/content/content-none_t01: RuntimeError
+LayoutTests/fast/css/content/content-quotes-01_t01: RuntimeError
+LayoutTests/fast/css/content/content-quotes-05_t01: RuntimeError
+LayoutTests/fast/css/counters/asterisk-counter-update-after-layout-crash_t01: RuntimeError
+LayoutTests/fast/css/counters/complex-before_t01: RuntimeError
+LayoutTests/fast/css/counters/counter-before-selector-crash_t01: RuntimeError
+LayoutTests/fast/css/counters/counter-function-input-2_t01: RuntimeError
+LayoutTests/fast/css/counters/counter-number-input_t01: RuntimeError
+LayoutTests/fast/css/counters/counter-reparent-table-children-crash_t01: RuntimeError
+LayoutTests/fast/css/counters/counter-traverse-object-crash_t01: RuntimeError
+LayoutTests/fast/css/counters/reparent-table-children-with-counters-crash_t01: RuntimeError
+LayoutTests/fast/css/crash-on-incomplete-not_t01: RuntimeError
+LayoutTests/fast/css/crash-on-incomplete-webkit-any_t01: RuntimeError
+LayoutTests/fast/css/css-escaped-identifier-crash_t01: RuntimeError
+LayoutTests/fast/css/css-keyframe-style-crash_t01: RuntimeError
+LayoutTests/fast/css/css-keyframe-unexpected-end_t01: RuntimeError
+LayoutTests/fast/css/css-properties-case-insensitive_t01: RuntimeError
+LayoutTests/fast/css/css-set-selector-text-crash_t01: RuntimeError
+LayoutTests/fast/css/css3-nth-tokens-script_t01: RuntimeError
+LayoutTests/fast/css/cssom-remove-shorthand-property_t01: RuntimeError
+LayoutTests/fast/css/csstext-of-content-string_t01: RuntimeError
+LayoutTests/fast/css/cursor-parsing-image-set_t01: RuntimeError
+LayoutTests/fast/css/cursor-parsing-quirks_t01: RuntimeError
+LayoutTests/fast/css/cursor-parsing_t01: RuntimeError
+LayoutTests/fast/css/dashboard-regions-attr-crash_t01: RuntimeError
+LayoutTests/fast/css/dashboard-regions-undefined-length-assertion_t01: RuntimeError
+LayoutTests/fast/css/delete-rule-crash_t01: RuntimeError
+LayoutTests/fast/css/deprecated-flex-box-zero-width-intrinsic-max-width_t01: Crash
+LayoutTests/fast/css/device-aspect-ratio_t01: RuntimeError
+LayoutTests/fast/css/div_plus_nav_bug47971_t01: RuntimeError
+LayoutTests/fast/css/draggable-region-parser_t01: RuntimeError
+LayoutTests/fast/css/dynamic-class-pseudo-elements_t01: RuntimeError
+LayoutTests/fast/css/dynamic-pseudo-class_t01: RuntimeError
+LayoutTests/fast/css/dynamic-style-attribute-query_t01: RuntimeError
+LayoutTests/fast/css/emptyStyleTag_t01: RuntimeError
+LayoutTests/fast/css/first-letter-block-form-controls-crash_t01: RuntimeError
+LayoutTests/fast/css/first-letter-capitalized-edit-select-crash_t01: RuntimeError
+LayoutTests/fast/css/first-line-parent-style-different_t01: RuntimeError
+LayoutTests/fast/css/fixed-width-intrinsic-width-excludes-scrollbars_t01: RuntimeError
+LayoutTests/fast/css/focus-display-block-inline_t01: RuntimeError
+LayoutTests/fast/css/font-face-cache-bug_t01: RuntimeError
+LayoutTests/fast/css/font-face-data-uri-invalid_t01: RuntimeError
+LayoutTests/fast/css/font-face-insert-link_t01: RuntimeError
+LayoutTests/fast/css/font-face-multiple-ranges-for-unicode-range_t01: RuntimeError
+LayoutTests/fast/css/font-face-svg-decoding-error_t01: RuntimeError
+LayoutTests/fast/css/font-face-unicode-range-load_t01: RuntimeError
+LayoutTests/fast/css/font-face-unicode-range-overlap-load_t01: RuntimeError
+LayoutTests/fast/css/font-face-used-after-retired_t01: RuntimeError
+LayoutTests/fast/css/font-family-builtins_t01: RuntimeError
+LayoutTests/fast/css/font-family-trailing-bracket-gunk_t01: RuntimeError
+LayoutTests/fast/css/font-property-priority_t01: RuntimeError
+LayoutTests/fast/css/font-shorthand-from-longhands_t01: RuntimeError
+LayoutTests/fast/css/fontface-properties_t01: RuntimeError
+LayoutTests/fast/css/fontfaceset-events_t01: RuntimeError
+LayoutTests/fast/css/getComputedStyle/computed-style-border-image_t01: RuntimeError
+LayoutTests/fast/css/getComputedStyle/computed-style-cross-fade_t01: RuntimeError
+LayoutTests/fast/css/getComputedStyle/computed-style-display-none_t01: RuntimeError
+LayoutTests/fast/css/getComputedStyle/computed-style-negative-top_t01: RuntimeError
+LayoutTests/fast/css/getComputedStyle/computed-style-page-break-inside_t01: RuntimeError
+LayoutTests/fast/css/getComputedStyle/computed-style-select-overflow_t01: RuntimeError
+LayoutTests/fast/css/getComputedStyle/computed-style-with-zoom_t01: RuntimeError
+LayoutTests/fast/css/getComputedStyle/font-family-fallback-reset_t01: RuntimeError
+LayoutTests/fast/css/getComputedStyle/getComputedStyle-border-box_t01: RuntimeError
+LayoutTests/fast/css/getComputedStyle/getComputedStyle-border-image-slice_t01: RuntimeError
+LayoutTests/fast/css/getComputedStyle/getComputedStyle-border-style-shorthand_t01: RuntimeError
+LayoutTests/fast/css/getComputedStyle/getComputedStyle-borderRadius-2_t01: RuntimeError
+LayoutTests/fast/css/getComputedStyle/getComputedStyle-height_t01: RuntimeError
+LayoutTests/fast/css/getComputedStyle/getComputedStyle-length-unit_t01: RuntimeError
+LayoutTests/fast/css/getComputedStyle/getComputedStyle-outline-offset_t01: RuntimeError
+LayoutTests/fast/css/getComputedStyle/getComputedStyle-relayout_t01: RuntimeError
+LayoutTests/fast/css/getComputedStyle/getComputedStyle-text-overflow_t01: RuntimeError
+LayoutTests/fast/css/getComputedStyle/getComputedStyle-zIndex-auto_t01: RuntimeError
+LayoutTests/fast/css/getComputedStyle/zoom-on-display-none_t01: RuntimeError
+LayoutTests/fast/css/getPropertyValue-column-rule_t01: RuntimeError
+LayoutTests/fast/css/getPropertyValue-webkit-margin-collapse_t01: RuntimeError
+LayoutTests/fast/css/html-attr-case-sensitivity_t01: RuntimeError
+LayoutTests/fast/css/image-set-parsing-invalid_t01: RuntimeError
+LayoutTests/fast/css/image-set-setting_t01: RuntimeError
+LayoutTests/fast/css/implicit-attach-marking_t01: RuntimeError
+LayoutTests/fast/css/inherited-properties-explicit_t01: RuntimeError
+LayoutTests/fast/css/inherited-properties-rare-text_t01: RuntimeError
+LayoutTests/fast/css/input-search-table-column-crash_t01: RuntimeError
+LayoutTests/fast/css/inputtext-crash_t01: RuntimeError
+LayoutTests/fast/css/insertRule-media_t01: RuntimeError
+LayoutTests/fast/css/invalid-import-rule-insertion_t01: RuntimeError
+LayoutTests/fast/css/invalid-not-with-pseudo-element_t01: RuntimeError
+LayoutTests/fast/css/invalid-predefined-color_t01: RuntimeError
+LayoutTests/fast/css/invalidation/detach-reattach_t01: RuntimeError
+LayoutTests/fast/css/invalidation/dynamic-selector-list-pseudo_t01: RuntimeError
+LayoutTests/fast/css/invalidation/invalidation-set-with-adjacent-combinators_t01: RuntimeError
+LayoutTests/fast/css/invalidation/no-invalidation-set-local-style_t01: RuntimeError
+LayoutTests/fast/css/invalidation/targeted-class-host-pseudo_t01: RuntimeError
+LayoutTests/fast/css/invalidation/targeted-class-style-invalidation_t01: RuntimeError
+LayoutTests/fast/css/invalidation/targeted-class-type-selectors_t01: RuntimeError
+LayoutTests/fast/css/invalidation/toggle-style-inside-shadow-root_t01: RuntimeError
+LayoutTests/fast/css/large-font-size-crash_t01: RuntimeError
+LayoutTests/fast/css/last-child-innerhtml_t01: RuntimeError
+LayoutTests/fast/css/link-alternate-stylesheet-1_t01: RuntimeError
+LayoutTests/fast/css/list-item-text-align_t01: RuntimeError
+LayoutTests/fast/css/max-width-none_t01: RuntimeError
+LayoutTests/fast/css/media-query-recovery_t01: RuntimeError
+LayoutTests/fast/css/media-rule-dyn_t01: RuntimeError
+LayoutTests/fast/css/media-rule-no-whitespace_t01: RuntimeError
+LayoutTests/fast/css/modify-ua-rules-from-javascript_t01: RuntimeError
+LayoutTests/fast/css/named-colors_t01: RuntimeError
+LayoutTests/fast/css/nested-at-rules_t01: RuntimeError
+LayoutTests/fast/css/nested-first-letter-with-float-crash_t01: RuntimeError
+LayoutTests/fast/css/nth-child-implied-step_t01: RuntimeError
+LayoutTests/fast/css/nth-child-n_t01: RuntimeError
+LayoutTests/fast/css/nth-child-no-mutations_t01: RuntimeError
+LayoutTests/fast/css/nth-child-unary-prefix_t01: RuntimeError
+LayoutTests/fast/css/overflow-property_t01: RuntimeError
+LayoutTests/fast/css/padding-no-renderer_t01: RuntimeError
+LayoutTests/fast/css/padding-start-end_t01: RuntimeError
+LayoutTests/fast/css/parse-border-image-repeat-null-crash_t01: RuntimeError
+LayoutTests/fast/css/parsing-css-comment_t01: RuntimeError
+LayoutTests/fast/css/parsing-css-escapes_t01: RuntimeError
+LayoutTests/fast/css/parsing-css-nth-child_t01: RuntimeError
+LayoutTests/fast/css/parsing-css-surrogate-pairs_t01: RuntimeError
+LayoutTests/fast/css/parsing-expr-error-recovery_t01: RuntimeError
+LayoutTests/fast/css/parsing-font-variant-ligatures_t01: RuntimeError
+LayoutTests/fast/css/parsing-page-rule_t01: RuntimeError
+LayoutTests/fast/css/parsing-text-rendering_t01: RuntimeError
+LayoutTests/fast/css/parsing-unexpected-eof_t01: RuntimeError
+LayoutTests/fast/css/percent-character-as-value_t01: RuntimeError
+LayoutTests/fast/css/position-absolute-float_t01: RuntimeError
+LayoutTests/fast/css/positioned-overflow-scroll_t01: RuntimeError
+LayoutTests/fast/css/pseudo-default-001_t01: RuntimeError
+LayoutTests/fast/css/pseudo-default-002_t01: RuntimeError
+LayoutTests/fast/css/pseudo-empty-display-none_t01: RuntimeError
+LayoutTests/fast/css/pseudo-escaped-parenthesis_t01: RuntimeError
+LayoutTests/fast/css/pseudo-invalid-001_t01: RuntimeError
+LayoutTests/fast/css/pseudo-invalid-novalidate-001_t01: RuntimeError
+LayoutTests/fast/css/pseudo-not_t01: RuntimeError
+LayoutTests/fast/css/pseudo-required-optional-001_t01: RuntimeError
+LayoutTests/fast/css/pseudo-required-optional-002_t01: RuntimeError
+LayoutTests/fast/css/pseudo-required-optional-003_t01: RuntimeError
+LayoutTests/fast/css/pseudo-required-optional-004_t01: RuntimeError
+LayoutTests/fast/css/pseudo-required-optional-005_t01: RuntimeError
+LayoutTests/fast/css/pseudo-required-optional-006_t01: RuntimeError
+LayoutTests/fast/css/pseudo-required-optional-unapplied_t01: RuntimeError
+LayoutTests/fast/css/pseudo-target-indirect-sibling-001_t01: RuntimeError
+LayoutTests/fast/css/pseudo-valid-002_t01: RuntimeError
+LayoutTests/fast/css/readonly-pseudoclass-opera-003_t01: RuntimeError
+LayoutTests/fast/css/readonly-pseudoclass-opera-004_t01: RuntimeError
+LayoutTests/fast/css/readonly-pseudoclass-opera-005_t01: RuntimeError
+LayoutTests/fast/css/recalc-direct-adjacent-001_t01: RuntimeError
+LayoutTests/fast/css/relative-positioned-block-crash_t01: RuntimeError
+LayoutTests/fast/css/remove-attribute-style_t01: RuntimeError
+LayoutTests/fast/css/remove-fixed-resizer-crash_t01: RuntimeError
+LayoutTests/fast/css/resize-value-compared_t01: RuntimeError
+LayoutTests/fast/css/rgba-custom-text_t01: RuntimeError
+LayoutTests/fast/css/scrollbar-crash_t01: RuntimeError
+LayoutTests/fast/css/shadow-dom-scope_t01: RuntimeError
+LayoutTests/fast/css/sheet-collection-link_t01: RuntimeError
+LayoutTests/fast/css/short-inline-style_t01: RuntimeError
+LayoutTests/fast/css/shorthand-priority_t01: RuntimeError
+LayoutTests/fast/css/shorthand-setProperty-important_t01: RuntimeError
+LayoutTests/fast/css/small-caps-crash_t01: RuntimeError
+LayoutTests/fast/css/space-before-charset-external_t01: RuntimeError
+LayoutTests/fast/css/sticky/remove-inline-sticky-crash_t01: RuntimeError
+LayoutTests/fast/css/sticky/remove-sticky-crash_t01: RuntimeError
+LayoutTests/fast/css/style-scoped/style-scoped-scoping-nodes-different-order_t01: RuntimeError
+LayoutTests/fast/css/style-scoped/style-scoped-shadow-crash_t01: RuntimeError
+LayoutTests/fast/css/style-scoped/style-scoped-with-dom-operation_t01: RuntimeError
+LayoutTests/fast/css/style-scoped/style-scoped-with-important-rule_t01: RuntimeError
+LayoutTests/fast/css/style-sharing-grand-parent-invalidate_t01: RuntimeError
+LayoutTests/fast/css/style-sharing-type-and-readonly_t01: RuntimeError
+LayoutTests/fast/css/stylesheet-enable-first-alternate-link_t01: RuntimeError
+LayoutTests/fast/css/stylesheet-enable-first-alternate-on-load-sheet_t01: RuntimeError
+LayoutTests/fast/css/stylesheet-parentStyleSheet_t01: RuntimeError
+LayoutTests/fast/css/test-setting-canvas-color_t01: RuntimeError
+LayoutTests/fast/css/text-align-initial_t01: RuntimeError
+LayoutTests/fast/css/text-align-webkit-match-parent_t01: RuntimeError
+LayoutTests/fast/css/text-rendering-priority_t01: RuntimeError
+LayoutTests/fast/css/transform-origin-parsing_t01: RuntimeError
+LayoutTests/fast/css/transition_shorthand_parsing_t01: RuntimeError
+LayoutTests/fast/css/unicode-bidi-computed-value_t01: RuntimeError
+LayoutTests/fast/css/visibility-collapse-form-buttons_t01: RuntimeError
+LayoutTests/fast/css/webkit-color-adjust_t01: RuntimeError
+LayoutTests/fast/css/webkit-empty-transform-preserve3d-crash_t01: RuntimeError
+LayoutTests/fast/css/word-break-user-modify-allowed-values_t01: RuntimeError
+LayoutTests/fast/css/zoom-in-length-round-trip_t01: RuntimeError
+LayoutTests/fast/css/zoom-property-parsing_t01: RuntimeError
+LayoutTests/fast/css3-text/css3-text-decoration/getComputedStyle/getComputedStyle-text-decoration-line_t01: RuntimeError
+LayoutTests/fast/css3-text/css3-text-decoration/getComputedStyle/getComputedStyle-text-decoration-style_t01: RuntimeError
+LayoutTests/fast/css3-text/css3-text-decoration/getComputedStyle/getComputedStyle-text-underline-position_t01: RuntimeError
+LayoutTests/fast/css3-text/css3-text-indent/getComputedStyle/getComputedStyle-text-indent-inherited_t01: RuntimeError
+LayoutTests/fast/dom/Attr/access-after-element-destruction_t01: RuntimeError
+LayoutTests/fast/dom/Attr/change-id-via-attr-node-value_t01: RuntimeError
+LayoutTests/fast/dom/Comment/comment-constructor_t01: RuntimeError
+LayoutTests/fast/dom/Comment/remove_t01: RuntimeError
+LayoutTests/fast/dom/DOMImplementation/createDocument-namespace-err_t01: RuntimeError
+LayoutTests/fast/dom/DOMImplementation/createHTMLDocument-title_t01: RuntimeError
+LayoutTests/fast/dom/Document/CaretRangeFromPoint/caretRangeFromPoint-in-strict-mode-wtih-checkbox_t01: RuntimeError
+LayoutTests/fast/dom/Document/CaretRangeFromPoint/caretRangeFromPoint-in-user-select-none_t01: RuntimeError
+LayoutTests/fast/dom/Document/CaretRangeFromPoint/caretRangeFromPoint-in-zoom-and-scroll_t01: Crash
+LayoutTests/fast/dom/Document/CaretRangeFromPoint/caretRangeFromPoint-with-first-letter-style_t01: RuntimeError
+LayoutTests/fast/dom/Document/clone-node_t01: RuntimeError
+LayoutTests/fast/dom/Document/createElement-invalid-names_t01: RuntimeError
+LayoutTests/fast/dom/Document/createElement-valid-names_t01: RuntimeError
+LayoutTests/fast/dom/Document/title-with-multiple-children_t01: RuntimeError
+LayoutTests/fast/dom/DocumentFragment/document-fragment-constructor_t01: RuntimeError
+LayoutTests/fast/dom/Element/attribute-uppercase_t01: RuntimeError
+LayoutTests/fast/dom/Element/client-rect-list-argument_t01: Crash
+LayoutTests/fast/dom/Element/dimension-properties-unrendered_t01: RuntimeError
+LayoutTests/fast/dom/Element/getBoundingClientRect-getClientRects-relative-to-viewport_t01: RuntimeError
+LayoutTests/fast/dom/Element/getClientRects_t01: Crash
+LayoutTests/fast/dom/Element/id-in-frame_t01: RuntimeError
+LayoutTests/fast/dom/Element/id-in-getelement01_t01: RuntimeError
+LayoutTests/fast/dom/Element/id-in-insert-hr_t01: RuntimeError
+LayoutTests/fast/dom/Element/offsetTop-table-cell_t01: RuntimeError
+LayoutTests/fast/dom/Element/scrollWidth_t01: RuntimeError
+LayoutTests/fast/dom/Element/setAttribute-case-insensitivity_t01: RuntimeError
+LayoutTests/fast/dom/HTMLAnchorElement/remove-href-from-focused-anchor_t01: RuntimeError
+LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-host_t01: RuntimeError
+LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-pathname_t01: RuntimeError
+LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-port_t01: RuntimeError
+LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-prevents-rebase_t01: RuntimeError
+LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-protocol_t01: RuntimeError
+LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-rebase_t01: RuntimeError
+LayoutTests/fast/dom/HTMLAreaElement/area-islink-focus-null-ptr-crash_t01: RuntimeError
+LayoutTests/fast/dom/HTMLBaseElement/href-attribute-resolves-with-respect-to-document_t01: RuntimeError
+LayoutTests/fast/dom/HTMLButtonElement/change-type_t01: RuntimeError
+LayoutTests/fast/dom/HTMLButtonElement/value/getset_t01: RuntimeError
+LayoutTests/fast/dom/HTMLDialogElement/dialog-close-event_t01: RuntimeError
+LayoutTests/fast/dom/HTMLDialogElement/dialog-open_t01: RuntimeError
+LayoutTests/fast/dom/HTMLDialogElement/dialog-return-value_t01: RuntimeError
+LayoutTests/fast/dom/HTMLDialogElement/dialog-scrolled-viewport_t01: RuntimeError
+LayoutTests/fast/dom/HTMLDialogElement/inert-node-is-unselectable_t01: RuntimeError
+LayoutTests/fast/dom/HTMLDialogElement/multiple-centered-dialogs_t01: RuntimeError
+LayoutTests/fast/dom/HTMLDialogElement/submit-dialog-close-event_t01: RuntimeError
+LayoutTests/fast/dom/HTMLDialogElement/synthetic-click-inert_t01: RuntimeError
+LayoutTests/fast/dom/HTMLDialogElement/top-layer-position-relative_t01: RuntimeError
+LayoutTests/fast/dom/HTMLDialogElement/top-layer-position-static_t01: RuntimeError
+LayoutTests/fast/dom/HTMLDocument/active-element-gets-unforcusable_t01: RuntimeError
+LayoutTests/fast/dom/HTMLDocument/clone-node_t01: RuntimeError
+LayoutTests/fast/dom/HTMLDocument/set-focus-on-valid-element_t01: RuntimeError
+LayoutTests/fast/dom/HTMLDocument/title-get_t01: RuntimeError
+LayoutTests/fast/dom/HTMLDocument/title-set_t01: RuntimeError
+LayoutTests/fast/dom/HTMLElement/attr-dir-auto-change-before-text-node_t01: RuntimeError
+LayoutTests/fast/dom/HTMLElement/attr-dir-auto-change-child-node_t01: RuntimeError
+LayoutTests/fast/dom/HTMLElement/attr-dir-auto-change-text-form-control_t01: RuntimeError
+LayoutTests/fast/dom/HTMLElement/attr-dir-auto-change-text_t01: RuntimeError
+LayoutTests/fast/dom/HTMLElement/attr-dir-auto-children_t01: RuntimeError
+LayoutTests/fast/dom/HTMLElement/attr-dir-auto-remove-add-children_t01: RuntimeError
+LayoutTests/fast/dom/HTMLElement/attr-dir-auto_t01: RuntimeError
+LayoutTests/fast/dom/HTMLElement/attr-empty-string_t01: RuntimeError
+LayoutTests/fast/dom/HTMLElement/attr-false-string_t01: RuntimeError
+LayoutTests/fast/dom/HTMLElement/attr-missing-ancestor-true_t01: RuntimeError
+LayoutTests/fast/dom/HTMLElement/attr-missing-parent-ancestor-missing_t01: RuntimeError
+LayoutTests/fast/dom/HTMLElement/attr-missing-parent-false_t01: RuntimeError
+LayoutTests/fast/dom/HTMLElement/attr-missing-parent-true_t01: RuntimeError
+LayoutTests/fast/dom/HTMLElement/innerHTML-selection-crash_t01: RuntimeError
+LayoutTests/fast/dom/HTMLElement/set-inherit-parent-false_t01: RuntimeError
+LayoutTests/fast/dom/HTMLElement/set-inherit-parent-true_t01: RuntimeError
+LayoutTests/fast/dom/HTMLElement/set-invalid-value_t01: RuntimeError
+LayoutTests/fast/dom/HTMLElement/set-true_t01: RuntimeError
+LayoutTests/fast/dom/HTMLElement/translate_t01: RuntimeError
+LayoutTests/fast/dom/HTMLFontElement/size-attribute_t01: RuntimeError
+LayoutTests/fast/dom/HTMLFormElement/adopt-assertion_t01: RuntimeError
+LayoutTests/fast/dom/HTMLFormElement/associated-elements-after-index-assertion-fail2_t01: RuntimeError
+LayoutTests/fast/dom/HTMLFormElement/elements-not-in-document_t01: RuntimeError
+LayoutTests/fast/dom/HTMLImageElement/image-alt-text_t01: RuntimeError
+LayoutTests/fast/dom/HTMLImageElement/image-natural-width-height_t01: RuntimeError
+LayoutTests/fast/dom/HTMLImageElement/image-without-renderer-width_t01: RuntimeError
+LayoutTests/fast/dom/HTMLImageElement/parse-src_t01: RuntimeError
+LayoutTests/fast/dom/HTMLInputElement/checked-pseudo-selector_t01: RuntimeError
+LayoutTests/fast/dom/HTMLInputElement/clone-input-checked_t01: RuntimeError
+LayoutTests/fast/dom/HTMLInputElement/duplicate-element-names_t01: RuntimeError
+LayoutTests/fast/dom/HTMLInputElement/input-checked-reset_t01: RuntimeError
+LayoutTests/fast/dom/HTMLInputElement/input-image-alt-text_t01: RuntimeError
+LayoutTests/fast/dom/HTMLInputElement/input-size-attribute_t01: RuntimeError
+LayoutTests/fast/dom/HTMLInputElement/input-text-reset_t01: RuntimeError
+LayoutTests/fast/dom/HTMLInputElement/size-as-number_t01: RuntimeError
+LayoutTests/fast/dom/HTMLLabelElement/click-label_t01: RuntimeError
+LayoutTests/fast/dom/HTMLLabelElement/form/test1_t01: RuntimeError
+LayoutTests/fast/dom/HTMLLabelElement/label-control_t01: RuntimeError
+LayoutTests/fast/dom/HTMLLinkElement/link-and-subresource-test-nonexistent_t01: RuntimeError
+LayoutTests/fast/dom/HTMLLinkElement/link-and-subresource-test_t01: RuntimeError
+LayoutTests/fast/dom/HTMLLinkElement/link-beforeload-recursive_t01: RuntimeError
+LayoutTests/fast/dom/HTMLLinkElement/link-onerror-stylesheet-with-non-existent-import_t01: RuntimeError
+LayoutTests/fast/dom/HTMLLinkElement/link-onerror_t01: RuntimeError
+LayoutTests/fast/dom/HTMLLinkElement/link-onload-before-page-load_t01: RuntimeError
+LayoutTests/fast/dom/HTMLLinkElement/link-onload-stylesheet-with-import_t01: RuntimeError
+LayoutTests/fast/dom/HTMLLinkElement/link-onload2_t01: RuntimeError
+LayoutTests/fast/dom/HTMLLinkElement/link-sheet-out-of-tree_t01: RuntimeError
+LayoutTests/fast/dom/HTMLLinkElement/prefetch-onerror_t01: RuntimeError
+LayoutTests/fast/dom/HTMLLinkElement/prefetch-onload_t01: RuntimeError
+LayoutTests/fast/dom/HTMLLinkElement/prefetch_t01: RuntimeError
+LayoutTests/fast/dom/HTMLLinkElement/subresource_t01: RuntimeError
+LayoutTests/fast/dom/HTMLMeterElement/meter-percent-size_t01: RuntimeError
+LayoutTests/fast/dom/HTMLMeterElement/set-meter-properties_t01: RuntimeError
+LayoutTests/fast/dom/HTMLObjectElement/beforeload-set-text-crash_t01: RuntimeError
+LayoutTests/fast/dom/HTMLObjectElement/children-changed_t01: RuntimeError
+LayoutTests/fast/dom/HTMLObjectElement/form/test1_t01: RuntimeError
+LayoutTests/fast/dom/HTMLOptionElement/collection-setter-getter_t01: RuntimeError
+LayoutTests/fast/dom/HTMLOutputElement/htmloutputelement-children-removed_t01: RuntimeError
+LayoutTests/fast/dom/HTMLOutputElement/htmloutputelement-reset-event_t01: RuntimeError
+LayoutTests/fast/dom/HTMLOutputElement/htmloutputelement-validity_t01: RuntimeError
+LayoutTests/fast/dom/HTMLProgressElement/indeterminate-progress-002_t01: RuntimeError
+LayoutTests/fast/dom/HTMLProgressElement/progress-element-with-child-crash_t01: RuntimeError
+LayoutTests/fast/dom/HTMLProgressElement/progress-element-with-style-crash_t01: RuntimeError
+LayoutTests/fast/dom/HTMLProgressElement/set-progress-properties_t01: RuntimeError
+LayoutTests/fast/dom/HTMLScriptElement/async-false-inside-async-false-load_t01: RuntimeError
+LayoutTests/fast/dom/HTMLScriptElement/async-onbeforeload_t01: RuntimeError
+LayoutTests/fast/dom/HTMLScriptElement/defer-inline-script_t01: RuntimeError
+LayoutTests/fast/dom/HTMLScriptElement/defer-script-invalid-url_t01: RuntimeError
+LayoutTests/fast/dom/HTMLScriptElement/dont-load-unknown-type_t01: RuntimeError
+LayoutTests/fast/dom/HTMLScriptElement/remove-source_t01: RuntimeError
+LayoutTests/fast/dom/HTMLScriptElement/script-for-attribute-unexpected-execution_t01: RuntimeError
+LayoutTests/fast/dom/HTMLScriptElement/script-reexecution_t01: RuntimeError
+LayoutTests/fast/dom/HTMLScriptElement/script-set-src_t01: RuntimeError
+LayoutTests/fast/dom/HTMLSelectElement/select-selectedOptions_t01: RuntimeError
+LayoutTests/fast/dom/HTMLSelectElement/selected-false_t01: RuntimeError
+LayoutTests/fast/dom/HTMLStyleElement/programmatically-add-style-with-onerror-handler_t01: RuntimeError
+LayoutTests/fast/dom/HTMLStyleElement/style-onerror-with-existent-and-non-existent-import_t01: RuntimeError
+LayoutTests/fast/dom/HTMLStyleElement/style-onload2_t01: RuntimeError
+LayoutTests/fast/dom/HTMLStyleElement/style-onload_t01: RuntimeError
+LayoutTests/fast/dom/HTMLTableElement/cellpadding-attribute_t01: RuntimeError
+LayoutTests/fast/dom/HTMLTableElement/createCaption_t01: RuntimeError
+LayoutTests/fast/dom/HTMLTableElement/early-acid3-65-excerpt_t01: RuntimeError
+LayoutTests/fast/dom/HTMLTableElement/exceptions_t01: RuntimeError
+LayoutTests/fast/dom/HTMLTableElement/insert-row_t01: RuntimeError
+LayoutTests/fast/dom/HTMLTableElement/rows_t01: RuntimeError
+LayoutTests/fast/dom/HTMLTableElement/tBodies_t01: RuntimeError
+LayoutTests/fast/dom/HTMLTableRowElement/exceptions_t01: RuntimeError
+LayoutTests/fast/dom/HTMLTableRowElement/insertCell_t01: RuntimeError
+LayoutTests/fast/dom/HTMLTableSectionElement/rows_t01: RuntimeError
+LayoutTests/fast/dom/HTMLTemplateElement/cloneNode_t01: RuntimeError
+LayoutTests/fast/dom/HTMLTemplateElement/content-outlives-template-crash_t01: RuntimeError
+LayoutTests/fast/dom/HTMLTemplateElement/contentWrappers_t01: RuntimeError
+LayoutTests/fast/dom/HTMLTemplateElement/cycles-in-shadow_t01: RuntimeError
+LayoutTests/fast/dom/HTMLTemplateElement/cycles_t01: RuntimeError
+LayoutTests/fast/dom/HTMLTemplateElement/ownerDocument_t01: RuntimeError
+LayoutTests/fast/dom/HTMLTemplateElement/xhtml-parsing-and-serialization_t01: RuntimeError
+LayoutTests/fast/dom/HTMLTextAreaElement/reset-textarea_t01: RuntimeError
+LayoutTests/fast/dom/MutationObserver/added-out-of-order_t01: RuntimeError
+LayoutTests/fast/dom/MutationObserver/clear-transient-without-delivery_t01: RuntimeError
+LayoutTests/fast/dom/MutationObserver/create-during-delivery_t01: RuntimeError
+LayoutTests/fast/dom/MutationObserver/delivery-order_t01: RuntimeError
+LayoutTests/fast/dom/MutationObserver/disconnect-transient-crash_t01: RuntimeError
+LayoutTests/fast/dom/MutationObserver/document-fragment-insertion_t01: RuntimeError
+LayoutTests/fast/dom/MutationObserver/mutation-record-constructor_t01: RuntimeError
+LayoutTests/fast/dom/MutationObserver/observe-options-character-data_t01: RuntimeError
+LayoutTests/fast/dom/MutationObserver/observe-subtree_t01: RuntimeError
+LayoutTests/fast/dom/MutationObserver/observer-wrapper-dropoff-transient_t01: RuntimeError
+LayoutTests/fast/dom/MutationObserver/observer-wrapper-dropoff_t01: RuntimeError
+LayoutTests/fast/dom/MutationObserver/removed-out-of-order_t01: RuntimeError
+LayoutTests/fast/dom/MutationObserver/takeRecords_t01: RuntimeError
+LayoutTests/fast/dom/MutationObserver/transient-gc-crash_t01: RuntimeError
+LayoutTests/fast/dom/MutationObserver/weak-callback-gc-crash_t01: RuntimeError
+LayoutTests/fast/dom/Node/DOMNodeRemovedEvent_t01: RuntimeError
+LayoutTests/fast/dom/Node/contains-method_t01: RuntimeError
+LayoutTests/fast/dom/NodeList/childNodes-reset-cache_t01: RuntimeError
+LayoutTests/fast/dom/NodeList/childNodes-reverse-iteration_t01: RuntimeError
+LayoutTests/fast/dom/NodeList/invalidate-node-lists-when-parsing_t01: RuntimeError
+LayoutTests/fast/dom/NodeList/nodelist-moved-to-fragment-2_t01: RuntimeError
+LayoutTests/fast/dom/Range/31684_t01: RuntimeError
+LayoutTests/fast/dom/Range/bug-19527_t01: RuntimeError
+LayoutTests/fast/dom/Range/create-contextual-fragment-script-unmark-already-started_t01: RuntimeError
+LayoutTests/fast/dom/Range/deleted-range-endpoints_t01: RuntimeError
+LayoutTests/fast/dom/Range/getClientRects-character_t01: Crash
+LayoutTests/fast/dom/Range/missing-arguments_t01: RuntimeError
+LayoutTests/fast/dom/Range/range-clone-contents_t01: RuntimeError
+LayoutTests/fast/dom/Range/range-comparePoint_t01: RuntimeError
+LayoutTests/fast/dom/Range/range-created-during-remove-children_t01: RuntimeError
+LayoutTests/fast/dom/Range/range-delete-contents-event-fire-crash_t01: RuntimeError
+LayoutTests/fast/dom/Range/range-detached-exceptions_t01: RuntimeError
+LayoutTests/fast/dom/Range/range-exceptions_t01: RuntimeError
+LayoutTests/fast/dom/Range/range-extract-contents-event-fire-crash_t01: RuntimeError
+LayoutTests/fast/dom/Range/range-extractContents_t01: RuntimeError
+LayoutTests/fast/dom/Range/range-insertNode-assertion_t01: RuntimeError
+LayoutTests/fast/dom/Range/range-insertNode-splittext_t01: RuntimeError
+LayoutTests/fast/dom/Range/range-isPointInRange_t01: RuntimeError
+LayoutTests/fast/dom/Range/range-modifycontents_t01: RuntimeError
+LayoutTests/fast/dom/Range/range-on-detached-node_t01: RuntimeError
+LayoutTests/fast/dom/Range/range-processing-instructions_t01: RuntimeError
+LayoutTests/fast/dom/Range/surroundContents-for-detached-node_t01: RuntimeError
+LayoutTests/fast/dom/SelectorAPI/bug-17313_t01: RuntimeError
+LayoutTests/fast/dom/SelectorAPI/caseID_t01: RuntimeError
+LayoutTests/fast/dom/SelectorAPI/caseTag_t01: RuntimeError
+LayoutTests/fast/dom/SelectorAPI/detached-element_t01: RuntimeError
+LayoutTests/fast/dom/SelectorAPI/dumpNodeList_t01: RuntimeError
+LayoutTests/fast/dom/SelectorAPI/id-fastpath-strict_t01: RuntimeError
+LayoutTests/fast/dom/SelectorAPI/not-supported-namespace-in-selector_t01: RuntimeError
+LayoutTests/fast/dom/SelectorAPI/viewless-document_t01: RuntimeError
+LayoutTests/fast/dom/StyleSheet/detached-shadow-style_t01: RuntimeError
+LayoutTests/fast/dom/StyleSheet/detached-style-2_t01: RuntimeError
+LayoutTests/fast/dom/StyleSheet/detached-style_t01: RuntimeError
+LayoutTests/fast/dom/StyleSheet/detached-stylesheet-without-wrapper_t01: RuntimeError
+LayoutTests/fast/dom/StyleSheet/empty-shadow-style_t01: RuntimeError
+LayoutTests/fast/dom/Text/previous-element-sibling_t01: RuntimeError
+LayoutTests/fast/dom/Text/text-constructor_t01: RuntimeError
+LayoutTests/fast/dom/TreeWalker/TreeWalker-basic_t01: RuntimeError
+LayoutTests/fast/dom/TreeWalker/TreeWalker-currentNode_t01: RuntimeError
+LayoutTests/fast/dom/Window/invalid-protocol_t01: RuntimeError
+LayoutTests/fast/dom/XMLSerializer-attribute-entities_t01: RuntimeError
+LayoutTests/fast/dom/XMLSerializer-attribute-ns-prefix_t01: RuntimeError
+LayoutTests/fast/dom/XMLSerializer-doctype_t01: RuntimeError
+LayoutTests/fast/dom/XMLSerializer-double-xmlns_t01: RuntimeError
+LayoutTests/fast/dom/XMLSerializer-element-ns-no-reemit_t01: RuntimeError
+LayoutTests/fast/dom/XMLSerializer_t01: RuntimeError
+LayoutTests/fast/dom/allowed-children_t01: RuntimeError
+LayoutTests/fast/dom/anchor-origin_t01: RuntimeError
+LayoutTests/fast/dom/anchor-toString_t01: RuntimeError
+LayoutTests/fast/dom/assertion-on-node-removal_t01: RuntimeError
+LayoutTests/fast/dom/capturing-event-listeners_t01: RuntimeError
+LayoutTests/fast/dom/characterdata-api-arguments_t01: RuntimeError
+LayoutTests/fast/dom/class-attr-change-double-mutation-fire_t01: RuntimeError
+LayoutTests/fast/dom/click-method-on-html-element_t01: RuntimeError
+LayoutTests/fast/dom/clone-contents-0-end-offset_t01: RuntimeError
+LayoutTests/fast/dom/clone-node-form-elements-with-attr_t01: RuntimeError
+LayoutTests/fast/dom/clone-node-load-event-crash_t01: RuntimeError
+LayoutTests/fast/dom/cloneNode-below-body-attribute-merging_t01: RuntimeError
+LayoutTests/fast/dom/comment-not-documentElement_t01: RuntimeError
+LayoutTests/fast/dom/containerNode_t01: RuntimeError
+LayoutTests/fast/dom/createDocumentType2_t01: RuntimeError
+LayoutTests/fast/dom/createDocument_t01: RuntimeError
+LayoutTests/fast/dom/createElementNS-empty-namespace_t01: RuntimeError
+LayoutTests/fast/dom/createElementNS_t01: RuntimeError
+LayoutTests/fast/dom/createElement_t01: RuntimeError
+LayoutTests/fast/dom/css-cached-import-rule_t01: RuntimeError
+LayoutTests/fast/dom/css-delete-doc_t01: RuntimeError
+LayoutTests/fast/dom/css-inline-style-important_t01: RuntimeError
+LayoutTests/fast/dom/css-innerHTML_t01: RuntimeError
+LayoutTests/fast/dom/css-insert-import-rule-twice_t01: RuntimeError
+LayoutTests/fast/dom/css-insert-import-rule_t01: RuntimeError
+LayoutTests/fast/dom/css-mediarule-functions_t01: RuntimeError
+LayoutTests/fast/dom/css-mediarule-insertRule-update_t01: RuntimeError
+LayoutTests/fast/dom/css-mediarule-parentRule_t01: RuntimeError
+LayoutTests/fast/dom/css-selectorText_t01: RuntimeError
+LayoutTests/fast/dom/css-set-property-exception_t01: RuntimeError
+LayoutTests/fast/dom/css-shorthand-common-value_t01: RuntimeError
+LayoutTests/fast/dom/cssTarget-crash_t01: RuntimeError
+LayoutTests/fast/dom/custom/attribute-changed-callback_t01: RuntimeError
+LayoutTests/fast/dom/custom/created-callback_t01: RuntimeError
+LayoutTests/fast/dom/custom/invalid-type-extension-crash_t01: RuntimeError
+LayoutTests/fast/dom/custom/lifecycle-created-createElement-recursion_t01: RuntimeError
+LayoutTests/fast/dom/custom/unresolved-pseudoclass_t01: RuntimeError
+LayoutTests/fast/dom/custom/upgrade-candidate-remove-crash_t01: RuntimeError
+LayoutTests/fast/dom/document-set-title-mutations_t01: RuntimeError
+LayoutTests/fast/dom/document-set-title-no-reuse_t01: RuntimeError
+LayoutTests/fast/dom/document-stylesheets-empty-style_t01: RuntimeError
+LayoutTests/fast/dom/document-width-height-force-layout_t01: RuntimeError
+LayoutTests/fast/dom/dom-instanceof_t01: RuntimeError
+LayoutTests/fast/dom/dom-parse-serialize-xmldecl_t01: RuntimeError
+LayoutTests/fast/dom/domparser-parsefromstring-mimetype-support_t01: RuntimeError
+LayoutTests/fast/dom/domtimestamp-is-number_t01: RuntimeError
+LayoutTests/fast/dom/duplicate-ids_t01: RuntimeError
+LayoutTests/fast/dom/empty-hash-and-search_t01: RuntimeError
+LayoutTests/fast/dom/focus-contenteditable_t01: RuntimeError, Pass
+LayoutTests/fast/dom/gc-image-element-2_t01: RuntimeError
+LayoutTests/fast/dom/gc-image-element_t01: RuntimeError
+LayoutTests/fast/dom/getElementById-consistency2_t01: RuntimeError
+LayoutTests/fast/dom/getElementById-consistency4_t01: RuntimeError
+LayoutTests/fast/dom/getElementById-consistency_t01: RuntimeError
+LayoutTests/fast/dom/getElementsByClassName/001_t01: RuntimeError
+LayoutTests/fast/dom/getElementsByClassName/003_t01: RuntimeError
+LayoutTests/fast/dom/getElementsByClassName/004_t01: RuntimeError
+LayoutTests/fast/dom/getElementsByClassName/006_t01: RuntimeError
+LayoutTests/fast/dom/getElementsByClassName/007_t01: RuntimeError
+LayoutTests/fast/dom/getElementsByClassName/009_t01: RuntimeError
+LayoutTests/fast/dom/getElementsByClassName/010_t01: RuntimeError
+LayoutTests/fast/dom/getElementsByClassName/011_t01: RuntimeError
+LayoutTests/fast/dom/getElementsByClassName/012_t01: RuntimeError
+LayoutTests/fast/dom/getElementsByClassName/014_t01: RuntimeError
+LayoutTests/fast/dom/getelementbyname-invalidation_t01: RuntimeError
+LayoutTests/fast/dom/horizontal-scrollbar-in-rtl-doesnt-fire-onscroll_t01: RuntimeError
+LayoutTests/fast/dom/horizontal-scrollbar-in-rtl_t01: RuntimeError
+LayoutTests/fast/dom/horizontal-scrollbar-when-dir-change_t01: RuntimeError
+LayoutTests/fast/dom/html-collections-named-getter-mandatory-arg_t01: RuntimeError
+LayoutTests/fast/dom/htmlcollection-length-after-item_t01: RuntimeError
+LayoutTests/fast/dom/icon-url-list_t01: RuntimeError
+LayoutTests/fast/dom/id-attribute-with-namespace-crash_t01: RuntimeError
+LayoutTests/fast/dom/importNode-confusing-localName_t01: RuntimeError
+LayoutTests/fast/dom/importNode-prefix_t01: RuntimeError
+LayoutTests/fast/dom/importNodeHTML_t01: RuntimeError
+LayoutTests/fast/dom/inner-text-first-letter_t01: RuntimeError
+LayoutTests/fast/dom/inner-text_t01: RuntimeError
+LayoutTests/fast/dom/inner-width-height_t01: RuntimeError
+LayoutTests/fast/dom/innerHTML-detached-element_t01: RuntimeError
+LayoutTests/fast/dom/innerHTML-escaping-attribute_t01: RuntimeError
+LayoutTests/fast/dom/innerHTML-nbsp_t01: RuntimeError
+LayoutTests/fast/dom/insertAdjacentHTML-DocumentFragment-crash_t01: RuntimeError
+LayoutTests/fast/dom/javascript-backslash_t01: RuntimeError
+LayoutTests/fast/dom/jsDevicePixelRatio_t01: RuntimeError
+LayoutTests/fast/dom/legend-display-inline_t01: RuntimeError
+LayoutTests/fast/dom/length-attribute-mapping_t01: RuntimeError
+LayoutTests/fast/dom/location-hash_t01: RuntimeError
+LayoutTests/fast/dom/multiple-ids_t01: RuntimeError
+LayoutTests/fast/dom/navigator-userAgent_t01: RuntimeError
+LayoutTests/fast/dom/navigator-vendorSub_t01: RuntimeError
+LayoutTests/fast/dom/node-childNodes-idempotence_t01: RuntimeError
+LayoutTests/fast/dom/node-iterator-reference-node-removed_t01: RuntimeError
+LayoutTests/fast/dom/node-iterator-with-doctype-root_t01: RuntimeError
+LayoutTests/fast/dom/non-styled-element-id-crash_t01: RuntimeError
+LayoutTests/fast/dom/null-chardata-crash_t01: RuntimeError
+LayoutTests/fast/dom/partial-layout-overlay-scrollbars_t01: RuntimeError
+LayoutTests/fast/dom/remove-style-element_t01: RuntimeError
+LayoutTests/fast/dom/replace-child-siblings_t01: RuntimeError
+LayoutTests/fast/dom/script-innerHTML_t01: RuntimeError
+LayoutTests/fast/dom/serialize-attribute_t01: RuntimeError
+LayoutTests/fast/dom/set-custom-validity-with-too-few-arguments_t01: RuntimeError
+LayoutTests/fast/dom/set-innerHTML_t01: RuntimeError
+LayoutTests/fast/dom/shadow/access-document-of-detached-stylesheetlist-crash_t01: RuntimeError
+LayoutTests/fast/dom/shadow/base-in-shadow-tree_t01: RuntimeError
+LayoutTests/fast/dom/shadow/content-element-includer_t01: RuntimeError
+LayoutTests/fast/dom/shadow/content-pseudo-element-dynamic-attribute-change_t01: RuntimeError
+LayoutTests/fast/dom/shadow/content-pseudo-element-relative-selector-css-text_t01: RuntimeError
+LayoutTests/fast/dom/shadow/content-pseudo-element-with-host-pseudo-class_t01: RuntimeError
+LayoutTests/fast/dom/shadow/distribution-for-event-path_t01: RuntimeError
+LayoutTests/fast/dom/shadow/elementfrompoint_t01: RuntimeError
+LayoutTests/fast/dom/shadow/elements-in-frameless-document_t01: RuntimeError
+LayoutTests/fast/dom/shadow/event-path-not-in-document_t01: RuntimeError
+LayoutTests/fast/dom/shadow/getComputedStyle-composed-parent-dirty_t01: RuntimeError
+LayoutTests/fast/dom/shadow/getelementbyid-in-orphan_t01: RuntimeError
+LayoutTests/fast/dom/shadow/insertion-point-shadow-crash_t01: RuntimeError
+LayoutTests/fast/dom/shadow/insertion-point-video-crash_t01: RuntimeError
+LayoutTests/fast/dom/shadow/link-in-shadow-tree_t01: RuntimeError
+LayoutTests/fast/dom/shadow/offsetWidth-host-style-change_t01: RuntimeError
+LayoutTests/fast/dom/shadow/olderShadowRoot_t01: RuntimeError
+LayoutTests/fast/dom/shadow/pseudoclass-update-checked-option_t01: RuntimeError
+LayoutTests/fast/dom/shadow/pseudoclass-update-disabled-optgroup_t01: RuntimeError
+LayoutTests/fast/dom/shadow/pseudoclass-update-disabled-option_t01: RuntimeError
+LayoutTests/fast/dom/shadow/shadow-content-crash_t01: RuntimeError
+LayoutTests/fast/dom/shadow/shadow-disable_t01: RuntimeError
+LayoutTests/fast/dom/shadow/shadow-hierarchy-exception_t01: RuntimeError
+LayoutTests/fast/dom/shadow/shadow-removechild-and-blur-event_t01: RuntimeError
+LayoutTests/fast/dom/shadow/shadow-root-node-list_t01: RuntimeError
+LayoutTests/fast/dom/shadow/shadow-root-text-child_t01: RuntimeError
+LayoutTests/fast/dom/shadow/shadow-ul-li_t01: RuntimeError
+LayoutTests/fast/dom/shadow/shadowdom-for-input-type-change_t01: RuntimeError
+LayoutTests/fast/dom/shadow/shadowroot-host_t01: RuntimeError
+LayoutTests/fast/dom/shadow/sibling-rules-dynamic-changes_t01: RuntimeError
+LayoutTests/fast/dom/shadow/stale-distribution-after-shadow-removal_t01: RuntimeError
+LayoutTests/fast/dom/style-sheet-candidate-remove-unrendered-document_t01: RuntimeError
+LayoutTests/fast/dom/text-api-arguments_t01: RuntimeError
+LayoutTests/fast/dom/text-node-attach-crash_t01: RuntimeError
+LayoutTests/fast/dom/xhtml-fragment-whitespace_t01: RuntimeError
+LayoutTests/fast/dynamic/ancestor-to-absolute_t01: RuntimeError
+LayoutTests/fast/dynamic/checkbox-selection-crash_t01: RuntimeError
+LayoutTests/fast/dynamic/continuation-detach-crash_t01: RuntimeError
+LayoutTests/fast/dynamic/crash-generated-counter_t01: RuntimeError
+LayoutTests/fast/dynamic/crash-generated-image_t01: RuntimeError
+LayoutTests/fast/dynamic/crash-generated-text_t01: RuntimeError
+LayoutTests/fast/dynamic/float-remove-above-line_t01: RuntimeError
+LayoutTests/fast/dynamic/inline-to-block-crash_t01: RuntimeError
+LayoutTests/fast/dynamic/jQuery-animation-crash_t01: RuntimeError
+LayoutTests/fast/dynamic/layer-no-longer-paginated_t01: RuntimeError
+LayoutTests/fast/dynamic/position-change-layout_t01: RuntimeError
+LayoutTests/fast/dynamic/style-access-late-stylesheet-load_t01: RuntimeError
+LayoutTests/fast/dynamic/subtree-common-root_t01: RuntimeError
+LayoutTests/fast/encoding/bom-in-content_t01: RuntimeError
+LayoutTests/fast/events/change-overflow-on-overflow-change_t01: RuntimeError
+LayoutTests/fast/events/clipboard-dataTransferItemList-remove_t01: RuntimeError
+LayoutTests/fast/events/create-document-crash-on-attach-event_t01: RuntimeError
+LayoutTests/fast/events/defaultprevented_t01: RuntimeError
+LayoutTests/fast/events/delayed-style-mutation-event-crash_t01: RuntimeError
+LayoutTests/fast/events/dispatch-event-being-dispatched_t01: RuntimeError
+LayoutTests/fast/events/dispatchEvent-crash_t01: RuntimeError
+LayoutTests/fast/events/event-creation_t01: RuntimeError
+LayoutTests/fast/events/event-fired-after-removal_t01: RuntimeError
+LayoutTests/fast/events/event-listener-html-non-html-confusion_t01: RuntimeError
+LayoutTests/fast/events/event-listener-list-mutation_t01: RuntimeError
+LayoutTests/fast/events/event-listener-moving-documents_t01: RuntimeError
+LayoutTests/fast/events/event-on-xhr-document_t01: RuntimeError
+LayoutTests/fast/events/fire-scroll-event-element_t01: RuntimeError
+LayoutTests/fast/events/fire-scroll-event_t01: RuntimeError
+LayoutTests/fast/events/init-message-event_t01: RuntimeError
+LayoutTests/fast/events/invalid-002_t01: RuntimeError
+LayoutTests/fast/events/invalid-003_t01: RuntimeError
+LayoutTests/fast/events/mutation-during-append-child_t01: RuntimeError
+LayoutTests/fast/events/mutation-during-insert-before_t01: RuntimeError
+LayoutTests/fast/events/mutation-during-replace-child_t01: RuntimeError
+LayoutTests/fast/events/no-window-load_t01: RuntimeError
+LayoutTests/fast/events/onerror-bubbling_t01: RuntimeError
+LayoutTests/fast/events/overflowchanged-event-raf-timing_t01: RuntimeError
+LayoutTests/fast/events/remove-event-listener_t01: RuntimeError
+LayoutTests/fast/events/scoped/editing-commands_t01: RuntimeError
+LayoutTests/fast/events/scroll-during-zoom-change_t01: RuntimeError
+LayoutTests/fast/events/scroll-event-does-not-bubble_t01: RuntimeError
+LayoutTests/fast/events/selectstart-on-selectall_t01: RuntimeError
+LayoutTests/fast/events/tabindex-removal-from-focused-element_t01: RuntimeError
+LayoutTests/fast/events/wheelevent-constructor_t01: RuntimeError
+LayoutTests/fast/events/window-load-capture_t01: RuntimeError
+LayoutTests/fast/eventsource/eventsource-attribute-listeners_t01: RuntimeError
+LayoutTests/fast/exclusions/parsing/parsing-wrap-through_t01: RuntimeError
+LayoutTests/fast/files/blob-close-read_t01: RuntimeError
+LayoutTests/fast/files/blob-constructor_t01: RuntimeError
+LayoutTests/fast/files/file-reader-abort-in-last-progress_t01: RuntimeError
+LayoutTests/fast/files/file-reader-done-reading-abort_t01: RuntimeError
+LayoutTests/fast/files/file-reader-fffd_t01: RuntimeError
+LayoutTests/fast/files/file-reader-result-twice_t01: RuntimeError
+LayoutTests/fast/files/read-blob-as-array-buffer_t01: RuntimeError
+LayoutTests/fast/files/workers/inline-worker-via-blob-url_t01: RuntimeError
+LayoutTests/fast/filesystem/async-operations_t01: RuntimeError
+LayoutTests/fast/filesystem/directory-entry-to-uri_t01: RuntimeError
+LayoutTests/fast/filesystem/file-after-reload-crash_t01: RuntimeError
+LayoutTests/fast/filesystem/file-entry-to-uri_t01: RuntimeError
+LayoutTests/fast/filesystem/file-metadata-after-write_t01: RuntimeError
+LayoutTests/fast/filesystem/file-writer-abort-continue_t01: RuntimeError
+LayoutTests/fast/filesystem/file-writer-events_t01: RuntimeError
+LayoutTests/fast/filesystem/file-writer-truncate-extend_t01: RuntimeError
+LayoutTests/fast/filesystem/file-writer-write-overlapped_t01: RuntimeError
+LayoutTests/fast/filesystem/filesystem-unserializable_t01: RuntimeError
+LayoutTests/fast/filesystem/filesystem-uri-origin_t01: RuntimeError
+LayoutTests/fast/filesystem/op-copy_t01: RuntimeError
+LayoutTests/fast/filesystem/op-get-metadata_t01: RuntimeError
+LayoutTests/fast/filesystem/op-get-parent_t01: RuntimeError
+LayoutTests/fast/filesystem/op-read-directory_t01: RuntimeError
+LayoutTests/fast/filesystem/op-restricted-chars_t01: RuntimeError
+LayoutTests/fast/filesystem/op-restricted-names_t01: RuntimeError
+LayoutTests/fast/filesystem/read-directory_t01: RuntimeError
+LayoutTests/fast/filesystem/simple-readonly-file-object_t01: RuntimeError
+LayoutTests/fast/filesystem/simple-temporary_t01: RuntimeError
+LayoutTests/fast/filesystem/snapshot-file-with-gc_t01: RuntimeError
+LayoutTests/fast/flexbox/box-orient-button_t01: RuntimeError
+LayoutTests/fast/flexbox/crash-button-input-autofocus_t01: RuntimeError
+LayoutTests/fast/flexbox/inline-children-crash_t01: RuntimeError
+LayoutTests/fast/flexbox/order-iterator-crash_t01: RuntimeError
+LayoutTests/fast/flexbox/repaint-scrollbar_t01: RuntimeError
+LayoutTests/fast/flexbox/vertical-box-form-controls_t01: RuntimeError
+LayoutTests/fast/forms/4628409_t01: RuntimeError
+LayoutTests/fast/forms/HTMLOptionElement_selected2_t01: RuntimeError
+LayoutTests/fast/forms/ValidityState-customError_t01: RuntimeError
+LayoutTests/fast/forms/ValidityState-rangeOverflow_t01: RuntimeError
+LayoutTests/fast/forms/ValidityState-rangeUnderflow_t01: RuntimeError
+LayoutTests/fast/forms/ValidityState-tooLong-textarea_t01: RuntimeError
+LayoutTests/fast/forms/ValidityState-typeMismatch-email_t01: RuntimeError
+LayoutTests/fast/forms/ValidityState-typeMismatch-url_t01: RuntimeError
+LayoutTests/fast/forms/ValidityState-valueMissing-004_t01: RuntimeError
+LayoutTests/fast/forms/ValidityState-valueMissing-006_t01: RuntimeError
+LayoutTests/fast/forms/ValidityState-valueMissing-008_t01: RuntimeError
+LayoutTests/fast/forms/add-remove-form-elements-stress-test_t01: RuntimeError
+LayoutTests/fast/forms/autocomplete_t01: RuntimeError
+LayoutTests/fast/forms/autofocus-focus-only-once_t01: RuntimeError
+LayoutTests/fast/forms/autofocus-input-css-style-change_t01: RuntimeError
+LayoutTests/fast/forms/autofocus-opera-004_t01: RuntimeError
+LayoutTests/fast/forms/autofocus-opera-007_t01: RuntimeError
+LayoutTests/fast/forms/button-click-DOM_t01: RuntimeError
+LayoutTests/fast/forms/button/button-disabled-blur_t01: RuntimeError
+LayoutTests/fast/forms/change-form-element-document-crash_t01: RuntimeError
+LayoutTests/fast/forms/checkValidity-003_t01: RuntimeError
+LayoutTests/fast/forms/checkbox-default-value_t01: RuntimeError
+LayoutTests/fast/forms/color/color-setrangetext_t01: RuntimeError
+LayoutTests/fast/forms/color/input-value-sanitization-color_t01: RuntimeError
+LayoutTests/fast/forms/control-detach-crash_t01: RuntimeError
+LayoutTests/fast/forms/cursor-position_t01: RuntimeError
+LayoutTests/fast/forms/dangling-form-element-crash_t01: RuntimeError
+LayoutTests/fast/forms/date-multiple-fields/date-multiple-fields-onblur-setvalue-onfocusremoved_t01: RuntimeError
+LayoutTests/fast/forms/date/ValidityState-typeMismatch-date_t01: RuntimeError
+LayoutTests/fast/forms/date/date-interactive-validation-required_t01: RuntimeError
+LayoutTests/fast/forms/date/date-pseudo-classes_t01: RuntimeError
+LayoutTests/fast/forms/date/date-setrangetext_t01: RuntimeError
+LayoutTests/fast/forms/date/input-date-validation-message_t01: RuntimeError
+LayoutTests/fast/forms/datetimelocal/datetimelocal-input-type_t01: RuntimeError
+LayoutTests/fast/forms/datetimelocal/datetimelocal-setrangetext_t01: RuntimeError
+LayoutTests/fast/forms/datetimelocal/input-valueasdate-datetimelocal_t01: RuntimeError
+LayoutTests/fast/forms/datetimelocal/input-valueasnumber-datetimelocal_t01: RuntimeError
+LayoutTests/fast/forms/double-focus_t01: RuntimeError
+LayoutTests/fast/forms/fieldset/fieldset-disabled_t01: RuntimeError
+LayoutTests/fast/forms/fieldset/fieldset-name_t01: RuntimeError
+LayoutTests/fast/forms/fieldset/fieldset-type_t01: RuntimeError
+LayoutTests/fast/forms/fieldset/validation-in-fieldset_t01: RuntimeError
+LayoutTests/fast/forms/focus-style-pending_t01: RuntimeError
+LayoutTests/fast/forms/focus_t01: RuntimeError
+LayoutTests/fast/forms/form-added-to-table_t01: RuntimeError
+LayoutTests/fast/forms/form-associated-element-crash_t01: RuntimeError
+LayoutTests/fast/forms/form-attribute-nonexistence-form-id_t01: RuntimeError
+LayoutTests/fast/forms/form-attribute-not-in-document_t01: RuntimeError
+LayoutTests/fast/forms/form-input-named-arguments_t01: RuntimeError
+LayoutTests/fast/forms/form-submission-create-crash_t01: RuntimeError
+LayoutTests/fast/forms/formmethod-attribute-test_t01: RuntimeError
+LayoutTests/fast/forms/image/image-error-event-crash_t01: RuntimeError
+LayoutTests/fast/forms/image/image-error-event-modifies-type-crash_t01: RuntimeError
+LayoutTests/fast/forms/image/width-and-height-of-detached-input_t01: RuntimeError
+LayoutTests/fast/forms/incremental-dom-property_t01: RuntimeError
+LayoutTests/fast/forms/indeterminate-input-types_t01: RuntimeError
+LayoutTests/fast/forms/input-appearance-elementFromPoint_t01: RuntimeError
+LayoutTests/fast/forms/input-appearance-maxlength_t01: RuntimeError
+LayoutTests/fast/forms/input-changing-value_t01: RuntimeError
+LayoutTests/fast/forms/input-file-set-value_t01: RuntimeError
+LayoutTests/fast/forms/input-hit-test-border_t01: RuntimeError
+LayoutTests/fast/forms/input-implicit-length-limit_t01: RuntimeError
+LayoutTests/fast/forms/input-inputmode_t01: RuntimeError
+LayoutTests/fast/forms/input-maxlength-unsupported_t01: RuntimeError
+LayoutTests/fast/forms/input-maxlength_t01: RuntimeError
+LayoutTests/fast/forms/input-multiple_t01: RuntimeError
+LayoutTests/fast/forms/input-select-webkit-user-select-none_t01: RuntimeError
+LayoutTests/fast/forms/input-type-change-focusout_t01: RuntimeError
+LayoutTests/fast/forms/input-type-change_t01: RuntimeError
+LayoutTests/fast/forms/input-value-sanitization_t01: RuntimeError
+LayoutTests/fast/forms/input-width-height-attributes_t01: RuntimeError
+LayoutTests/fast/forms/interactive-validation-select-crash_t01: RuntimeError
+LayoutTests/fast/forms/legend-absolute-position-auto-width_t01: RuntimeError
+LayoutTests/fast/forms/listbox-scroll-after-options-removed_t01: RuntimeError
+LayoutTests/fast/forms/listbox-select-all_t01: RuntimeError
+LayoutTests/fast/forms/listbox-selection-2_t01: RuntimeError
+LayoutTests/fast/forms/method-attribute_t01: RuntimeError
+LayoutTests/fast/forms/misplaced-img-form-registration_t01: RuntimeError
+LayoutTests/fast/forms/onchange-change-type_t01: RuntimeError
+LayoutTests/fast/forms/option-change-single-selected_t01: RuntimeError
+LayoutTests/fast/forms/option-label-trim-html-spaces_t01: RuntimeError
+LayoutTests/fast/forms/option-strip-unicode-spaces_t01: RuntimeError
+LayoutTests/fast/forms/option-value-and-label-changed-by-js_t01: RuntimeError
+LayoutTests/fast/forms/option-value-and-label_t01: RuntimeError
+LayoutTests/fast/forms/option-value-trim-html-spaces_t01: RuntimeError
+LayoutTests/fast/forms/output-reset-assertion-failed_t01: RuntimeError
+LayoutTests/fast/forms/parser-associated-form-removal_t01: RuntimeError
+LayoutTests/fast/forms/paste-into-textarea_t01: RuntimeError
+LayoutTests/fast/forms/pattern-attribute-002_t01: RuntimeError
+LayoutTests/fast/forms/percent-height-auto-width-form-controls_t01: RuntimeError
+LayoutTests/fast/forms/placeholder-dom-property_t01: RuntimeError
+LayoutTests/fast/forms/placeholder-non-textfield_t01: RuntimeError
+LayoutTests/fast/forms/plaintext-mode-1_t01: RuntimeError
+LayoutTests/fast/forms/radio-checkbox-restore-indeterminate_t01: RuntimeError
+LayoutTests/fast/forms/required-attribute-002_t01: RuntimeError
+LayoutTests/fast/forms/search-placeholder-value-changed_t01: RuntimeError
+LayoutTests/fast/forms/select-clientheight-large-size_t01: RuntimeError
+LayoutTests/fast/forms/select-display-none-style-resolve_t01: RuntimeError
+LayoutTests/fast/forms/select-generated-content_t01: RuntimeError
+LayoutTests/fast/forms/select-out-of-bounds-index_t01: RuntimeError
+LayoutTests/fast/forms/select-remove-option_t01: RuntimeError
+LayoutTests/fast/forms/select-set-inner_t01: RuntimeError
+LayoutTests/fast/forms/select-set-length-with-mutation-remove_t01: RuntimeError
+LayoutTests/fast/forms/selection-direction_t01: RuntimeError
+LayoutTests/fast/forms/selection-wrongtype_t01: RuntimeError
+LayoutTests/fast/forms/setCustomValidity-arguments_t01: RuntimeError
+LayoutTests/fast/forms/setCustomValidity-existence_t01: RuntimeError
+LayoutTests/fast/forms/shadow-tree-exposure_t01: RuntimeError
+LayoutTests/fast/forms/slow-click_t01: RuntimeError
+LayoutTests/fast/forms/submit-form-with-dirname-attribute-with-ancestor-dir-attribute_t01: RuntimeError
+LayoutTests/fast/forms/submit-form-with-dirname-attribute_t01: RuntimeError
+LayoutTests/fast/forms/text-control-selection-crash_t01: RuntimeError
+LayoutTests/fast/forms/text-set-value-crash_t01: RuntimeError
+LayoutTests/fast/forms/textarea-and-mutation-events_t01: RuntimeError
+LayoutTests/fast/forms/textarea-checkValidity-crash_t01: RuntimeError
+LayoutTests/fast/forms/textarea-crlf_t01: RuntimeError
+LayoutTests/fast/forms/textarea-paste-newline_t01: RuntimeError
+LayoutTests/fast/forms/textarea-placeholder-dom-property_t01: RuntimeError
+LayoutTests/fast/forms/textarea-placeholder-relayout-assertion_t01: RuntimeError
+LayoutTests/fast/forms/textarea-rows-cols_t01: RuntimeError
+LayoutTests/fast/forms/textarea-selection-preservation_t01: RuntimeError
+LayoutTests/fast/forms/textarea-set-defaultvalue-after-value_t01: RuntimeError
+LayoutTests/fast/forms/textarea-submit-crash_t01: RuntimeError
+LayoutTests/fast/forms/textarea-trailing-newline_t01: RuntimeError
+LayoutTests/fast/forms/validationMessage_t01: RuntimeError
+LayoutTests/fast/forms/validity-property_t01: RuntimeError
+LayoutTests/fast/forms/willvalidate_t01: RuntimeError
+LayoutTests/fast/html/adjacent-html-context-element_t01: RuntimeError
+LayoutTests/fast/html/article-element_t01: RuntimeError
+LayoutTests/fast/html/body-offset-properties_t01: RuntimeError
+LayoutTests/fast/html/details-add-child-2_t01: RuntimeError
+LayoutTests/fast/html/details-add-details-child-1_t01: RuntimeError
+LayoutTests/fast/html/details-add-details-child-2_t01: RuntimeError
+LayoutTests/fast/html/details-click-controls_t01: RuntimeError
+LayoutTests/fast/html/details-mouse-click_t01: RuntimeError
+LayoutTests/fast/html/disable-style-element_t01: RuntimeError
+LayoutTests/fast/html/draggable_t01: RuntimeError
+LayoutTests/fast/html/empty-fragment-id-goto-top_t01: RuntimeError
+LayoutTests/fast/html/eventhandler-attribute-non-callable_t01: RuntimeError
+LayoutTests/fast/html/figure-element_t01: RuntimeError
+LayoutTests/fast/html/header-element_t01: RuntimeError
+LayoutTests/fast/html/hgroup-element_t01: RuntimeError
+LayoutTests/fast/html/hidden-attr_t01: RuntimeError
+LayoutTests/fast/html/layout-with-pending-stylesheet_t01: RuntimeError
+LayoutTests/fast/html/main-element_t01: RuntimeError
+LayoutTests/fast/html/object-border_t01: RuntimeError
+LayoutTests/fast/html/select-dropdown-consistent-background-color_t01: RuntimeError
+LayoutTests/fast/html/xhtml-serialize_t01: RuntimeError
+LayoutTests/fast/inline-block/inline-block-vertical-align-t02: RuntimeError
+LayoutTests/fast/inline/boundingBox-with-continuation_t01: RuntimeError
+LayoutTests/fast/inline/fixed-pos-moves-with-abspos-inline-parent_t01: RuntimeError
+LayoutTests/fast/inline/fixed-pos-moves-with-abspos-parent_t01: RuntimeError
+LayoutTests/fast/inline/fixed-pos-with-transform-container-moves-with-abspos-parent_t01: RuntimeError
+LayoutTests/fast/inline/inline-position-top-align_t01: RuntimeError
+LayoutTests/fast/inline/parent-inline-element-padding-contributes-width_t01: RuntimeError
+LayoutTests/fast/inline/positioned-element-padding-contributes-width_t01: RuntimeError
+LayoutTests/fast/inline/reattach-inlines-in-anonymous-blocks-with-out-of-flow-siblings_t01: RuntimeError
+LayoutTests/fast/innerHTML/001_t01: RuntimeError
+LayoutTests/fast/innerHTML/002_t01: RuntimeError
+LayoutTests/fast/innerHTML/003_t01: RuntimeError
+LayoutTests/fast/innerHTML/innerHTML-case_t01: RuntimeError
+LayoutTests/fast/innerHTML/innerHTML-custom-tag_t01: RuntimeError
+LayoutTests/fast/innerHTML/innerHTML-svg-read_t01: RuntimeError
+LayoutTests/fast/innerHTML/innerHTML-svg-write_t01: RuntimeError
+LayoutTests/fast/innerHTML/innerHTML-template-crash_t01: RuntimeError
+LayoutTests/fast/innerHTML/javascript-url_t01: RuntimeError
+LayoutTests/fast/layers/negative-scroll-positions_t01: RuntimeError
+LayoutTests/fast/layers/normal-flow-hit-test_t01: RuntimeError
+LayoutTests/fast/layers/zindex-hit-test_t01: RuntimeError
+LayoutTests/fast/lists/calc-width-with-space_t01: RuntimeError
+LayoutTests/fast/lists/item-not-in-list-line-wrapping_t01: RuntimeError
+LayoutTests/fast/lists/marker-preferred-margins_t01: RuntimeError
+LayoutTests/fast/loader/about-blank-hash-change_t01: RuntimeError
+LayoutTests/fast/loader/about-blank-hash-kept_t01: RuntimeError
+LayoutTests/fast/loader/hashchange-event-async_t01: RuntimeError
+LayoutTests/fast/loader/local-css-allowed-in-strict-mode_t01: RuntimeError
+LayoutTests/fast/loader/scroll-position-restored-on-back_t01: RuntimeError
+LayoutTests/fast/loader/stateobjects/replacestate-in-onunload_t01: RuntimeError
+LayoutTests/fast/masking/parsing-clip-path-shape_t01: RuntimeError
+LayoutTests/fast/masking/parsing-mask_t01: RuntimeError
+LayoutTests/fast/media/invalid-lengths_t01: RuntimeError
+LayoutTests/fast/media/matchmedium-query-api_t01: RuntimeError
+LayoutTests/fast/media/media-query-list-syntax_t01: RuntimeError
+LayoutTests/fast/media/mq-append-delete_t01: RuntimeError
+LayoutTests/fast/media/mq-color-index_t02: RuntimeError
+LayoutTests/fast/media/mq-js-media-except_t03: RuntimeError
+LayoutTests/fast/media/mq-js-update-media_t01: RuntimeError
+LayoutTests/fast/mediastream/RTCIceCandidate_t01: RuntimeError
+LayoutTests/fast/mediastream/RTCPeerConnection-AddRemoveStream_t01: RuntimeError
+LayoutTests/fast/mediastream/RTCPeerConnection_t01: RuntimeError
+LayoutTests/fast/mediastream/constructors_t01: RuntimeError
+LayoutTests/fast/multicol/balance-unbreakable_t01: RuntimeError
+LayoutTests/fast/multicol/break-after-always-bottom-margin_t01: RuntimeError
+LayoutTests/fast/multicol/float-truncation_t01: RuntimeError
+LayoutTests/fast/multicol/gap-non-negative_t01: RuntimeError
+LayoutTests/fast/multicol/hit-test-end-of-column_t01: RuntimeError
+LayoutTests/fast/multicol/hit-test-float_t01: RuntimeError
+LayoutTests/fast/multicol/hit-test-gap-between-pages-flipped_t01: RuntimeError
+LayoutTests/fast/multicol/image-inside-nested-blocks-with-border_t01: RuntimeError
+LayoutTests/fast/multicol/inline-getclientrects_t01: Crash
+LayoutTests/fast/multicol/newmulticol/balance-images_t01: RuntimeError
+LayoutTests/fast/multicol/newmulticol/balance-maxheight_t01: RuntimeError
+LayoutTests/fast/multicol/newmulticol/balance_t01: RuntimeError
+LayoutTests/fast/multicol/newmulticol/balance_t02: RuntimeError
+LayoutTests/fast/multicol/newmulticol/balance_t03: RuntimeError
+LayoutTests/fast/multicol/newmulticol/balance_t04: RuntimeError
+LayoutTests/fast/multicol/newmulticol/balance_t05: RuntimeError
+LayoutTests/fast/multicol/newmulticol/balance_t08: RuntimeError
+LayoutTests/fast/multicol/newmulticol/balance_t10: RuntimeError
+LayoutTests/fast/multicol/orphans-relayout_t01: RuntimeError
+LayoutTests/fast/multicol/vertical-lr/float-truncation_t01: RuntimeError
+LayoutTests/fast/multicol/vertical-rl/float-truncation_t01: RuntimeError
+LayoutTests/fast/multicol/widows_t01: RuntimeError
+LayoutTests/fast/multicol/zeroColumnCount_t01: RuntimeError
+LayoutTests/fast/overflow/child-100percent-height-inside-fixed-container-with-overflow-auto_t01: RuntimeError
+LayoutTests/fast/overflow/replaced-child-100percent-height-inside-fixed-container-with-overflow-auto_t01: RuntimeError
+LayoutTests/fast/overflow/scroll-vertical-not-horizontal_t01: RuntimeError
+LayoutTests/fast/overflow/scrollbar-restored_t01: RuntimeError
+LayoutTests/fast/parser/foster-parent_t01: RuntimeError
+LayoutTests/fast/parser/fragment-parser-doctype_t01: RuntimeError
+LayoutTests/fast/parser/href-whitespace_t01: RuntimeError
+LayoutTests/fast/parser/image-tag-parses-to-HTMLImageElement_t01: RuntimeError
+LayoutTests/fast/parser/parse-wbr_t01: RuntimeError
+LayoutTests/fast/parser/residual-style-close-across-n-blocks_t01: RuntimeError
+LayoutTests/fast/parser/stray-end-tags-with-attributes-001_t01: RuntimeError
+LayoutTests/fast/parser/stray-end-tags-with-attributes-002_t01: RuntimeError
+LayoutTests/fast/parser/stray-param_t01: RuntimeError
+LayoutTests/fast/parser/strict-img-in-map_t01: RuntimeError
+LayoutTests/fast/replaced/available-height-for-content_t01: RuntimeError
+LayoutTests/fast/replaced/computed-image-width-with-percent-height-and-fixed-ancestor-vertical-lr_t01: RuntimeError
+LayoutTests/fast/replaced/computed-image-width-with-percent-height-and-fixed-ancestor_t01: RuntimeError
+LayoutTests/fast/replaced/computed-image-width-with-percent-height-inside-table-cell-and-fixed-ancestor-vertical-lr_t01: RuntimeError
+LayoutTests/fast/replaced/computed-image-width-with-percent-height-inside-table-cell-and-fixed-ancestor_t01: RuntimeError
+LayoutTests/fast/replaced/container-width-zero_t01: RuntimeError
+LayoutTests/fast/replaced/iframe-with-percentage-height-within-table-with-table-cell-ignore-height_t01: RuntimeError
+LayoutTests/fast/replaced/preferred-widths_t01: RuntimeError
+LayoutTests/fast/replaced/table-percent-height_t01: RuntimeError
+LayoutTests/fast/replaced/table-percent-width_t01: RuntimeError
+LayoutTests/fast/ruby/after-doesnt-crash_t01: RuntimeError
+LayoutTests/fast/ruby/before-block-doesnt-crash_t01: RuntimeError
+LayoutTests/fast/ruby/parse-rp_t01: RuntimeError
+LayoutTests/fast/ruby/ruby-line-height_t01: RuntimeError
+LayoutTests/fast/scrolling/scroll-element-into-view_t01: RuntimeError
+LayoutTests/fast/selectors/querySelector-in-range-crash_t01: RuntimeError
+LayoutTests/fast/selectors/querySelector-leftmost-selector-matches-ancestor_t01: RuntimeError
+LayoutTests/fast/selectors/querySelector-leftmost-selector-matches-rootNode_t01: RuntimeError
+LayoutTests/fast/selectors/querySelector-scope_t01: RuntimeError
+LayoutTests/fast/selectors/style-sharing-last-child_t01: RuntimeError
+LayoutTests/fast/shapes/parsing/parsing-shape-margin_t01: RuntimeError
+LayoutTests/fast/shapes/parsing/parsing-shape-outside-none_t01: RuntimeError
+LayoutTests/fast/shapes/shape-outside-floats/shape-outside-floats-image-margin_t01: RuntimeError
+LayoutTests/fast/shapes/shape-outside-floats/shape-outside-floats-inset-rounded-different-writing-modes-left_t01: RuntimeError
+LayoutTests/fast/shapes/shape-outside-floats/shape-outside-rounded-boxes_t01: RuntimeError
+LayoutTests/fast/shapes/shape-outside-floats/shape-outside-rounded-boxes_t02: RuntimeError
+LayoutTests/fast/speechsynthesis/speech-synthesis-boundary-events_t01: RuntimeError
+LayoutTests/fast/speechsynthesis/speech-synthesis-cancel_t01: RuntimeError
+LayoutTests/fast/storage/storage-disallowed-in-data-url_t01: RuntimeError
+LayoutTests/fast/sub-pixel/auto-table-layout-should-avoid-text-wrapping_t01: RuntimeError
+LayoutTests/fast/sub-pixel/block-preferred-widths-with-sub-pixel-floats_t01: RuntimeError
+LayoutTests/fast/sub-pixel/boundingclientrect-subpixel-margin_t01: RuntimeError
+LayoutTests/fast/sub-pixel/client-and-offset-width_t01: RuntimeError
+LayoutTests/fast/sub-pixel/computedstylemargin_t01: RuntimeError
+LayoutTests/fast/sub-pixel/float-percentage-widths_t01: RuntimeError
+LayoutTests/fast/sub-pixel/inline-block-with-padding_t01: RuntimeError
+LayoutTests/fast/sub-pixel/shadows-computed-style_t01: RuntimeError
+LayoutTests/fast/sub-pixel/table-cells-have-stable-width_t01: RuntimeError
+LayoutTests/fast/sub-pixel/tiled-canvas-elements_t01: RuntimeError
+LayoutTests/fast/sub-pixel/vertical-align-middle-overflow_t01: RuntimeError
+LayoutTests/fast/svg/getbbox_t01: RuntimeError
+LayoutTests/fast/svg/whitespace-angle_t01: RuntimeError
+LayoutTests/fast/svg/whitespace-length_t01: RuntimeError
+LayoutTests/fast/svg/whitespace-number_t01: RuntimeError
+LayoutTests/fast/table/before-child-non-table-section-add-table-crash_t01: RuntimeError
+LayoutTests/fast/table/columngroup-inside-columngroup_t01: RuntimeError
+LayoutTests/fast/table/css-table-width_t01: RuntimeError
+LayoutTests/fast/table/fixed-table-layout-toggle-colwidth_t01: RuntimeError
+LayoutTests/fast/table/fixed-table-layout-width-change_t01: RuntimeError
+LayoutTests/fast/table/form-with-non-table-display-inside-table-elements_t01: RuntimeError
+LayoutTests/fast/table/hittest-tablecell-bottom-edge_t01: RuntimeError
+LayoutTests/fast/table/hittest-tablecell-with-borders-bottom-edge_t01: RuntimeError
+LayoutTests/fast/table/html-table-width-max-width-constrained_t01: RuntimeError
+LayoutTests/fast/table/incorrect-colgroup-span-values_t01: RuntimeError
+LayoutTests/fast/table/margins-flipped-text-direction_t01: RuntimeError
+LayoutTests/fast/table/min-width-css-block-table_t01: RuntimeError
+LayoutTests/fast/table/nested-tables-with-div-offset_t01: RuntimeError
+LayoutTests/fast/table/prepend-in-anonymous-table_t01: RuntimeError
+LayoutTests/fast/table/resize-table-cell_t01: RuntimeError
+LayoutTests/fast/table/resize-table-row_t01: RuntimeError
+LayoutTests/fast/table/rowindex-comment-nodes_t01: RuntimeError
+LayoutTests/fast/table/switch-table-layout-multiple-section_t01: RuntimeError
+LayoutTests/fast/table/switch-table-layout_t01: RuntimeError
+LayoutTests/fast/table/table-all-rowspans-height-distribution-in-rows_t01: RuntimeError
+LayoutTests/fast/table/table-colgroup-present-after-table-row_t01: RuntimeError
+LayoutTests/fast/table/table-rowspan-cell-with-empty-cell_t01: RuntimeError
+LayoutTests/fast/table/table-rowspan-height-distribution-in-rows_t01: RuntimeError
+LayoutTests/fast/table/table-rowspan-height-distribution-in-rows_t02: RuntimeError
+LayoutTests/fast/table/table-size-integer-overflow_t01: RuntimeError
+LayoutTests/fast/table/table-with-borderattr-null_t01: RuntimeError
+LayoutTests/fast/table/table-with-borderattr-set-to-null_t01: RuntimeError
+LayoutTests/fast/table/table-with-content-width-exceeding-max-width_t01: RuntimeError
+LayoutTests/fast/table/td-bordercolor-attribute_t01: RuntimeError
+LayoutTests/fast/text-autosizing/table-inline-width_t01: RuntimeError
+LayoutTests/fast/text-autosizing/text-removal_t01: RuntimeError
+LayoutTests/fast/text/container-align-with-inlines_t01: RuntimeError
+LayoutTests/fast/text/decomposed-after-stacked-diacritics_t01: RuntimeError
+LayoutTests/fast/text/find-case-folding_t01: RuntimeError
+LayoutTests/fast/text/find-hidden-text_t01: RuntimeError
+LayoutTests/fast/text/find-kana_t01: RuntimeError
+LayoutTests/fast/text/find-russian_t01: RuntimeError
+LayoutTests/fast/text/find-soft-hyphen_t01: RuntimeError
+LayoutTests/fast/text/font-ligature-letter-spacing_t01: RuntimeError
+LayoutTests/fast/text/font-size-zero_t01: RuntimeError
+LayoutTests/fast/text/glyph-reordering_t01: RuntimeError
+LayoutTests/fast/text/international/iso-8859-8_t01: Crash
+LayoutTests/fast/text/line-breaks-after-closing-punctuations_t01: RuntimeError
+LayoutTests/fast/text/offsetForPosition-cluster-at-zero_t01: RuntimeError
+LayoutTests/fast/text/soft-hyphen-5_t01: RuntimeError
+LayoutTests/fast/text/sub-pixel/text-scaling-ltr_t01: RuntimeError
+LayoutTests/fast/text/sub-pixel/text-scaling-vertical_t01: RuntimeError
+LayoutTests/fast/text/sub-pixel/text-scaling-webfont_t01: RuntimeError
+LayoutTests/fast/text/text-combine-first-line-crash_t01: RuntimeError
+LayoutTests/fast/text/text-fragment-first-letter-update-crash_t01: RuntimeError
+LayoutTests/fast/text/window-find_t01: RuntimeError
+LayoutTests/fast/text/zero-width-characters-complex-script_t01: RuntimeError
+LayoutTests/fast/tokenizer/doctype-search-reset_t01: RuntimeError
+LayoutTests/fast/tokenizer/entities_t02: RuntimeError
+LayoutTests/fast/tokenizer/entities_t03: RuntimeError
+LayoutTests/fast/transforms/topmost-becomes-bottomost-for-scrolling_t01: RuntimeError
+LayoutTests/fast/transforms/transform-hit-test-flipped_t01: RuntimeError
+LayoutTests/fast/transforms/transform-inside-overflow-scroll_t01: RuntimeError
+LayoutTests/fast/url/anchor_t01: RuntimeError
+LayoutTests/fast/url/file-http-base_t01: RuntimeError
+LayoutTests/fast/url/file_t01: RuntimeError
+LayoutTests/fast/url/host-lowercase-per-scheme_t01: RuntimeError
+LayoutTests/fast/url/idna2003_t01: RuntimeError
+LayoutTests/fast/url/idna2008_t01: RuntimeError
+LayoutTests/fast/url/invalid-urls-utf8_t01: RuntimeError
+LayoutTests/fast/url/ipv4_t01: RuntimeError
+LayoutTests/fast/url/ipv6_t01: RuntimeError
+LayoutTests/fast/url/mailto_t01: RuntimeError
+LayoutTests/fast/url/path-url_t01: RuntimeError
+LayoutTests/fast/url/path_t01: RuntimeError
+LayoutTests/fast/url/query_t01: RuntimeError
+LayoutTests/fast/url/relative-win_t01: RuntimeError
+LayoutTests/fast/url/relative_t01: RuntimeError
+LayoutTests/fast/url/safari-extension_t01: RuntimeError
+LayoutTests/fast/url/segments_t01: RuntimeError
+LayoutTests/fast/url/standard-url_t01: RuntimeError
+LayoutTests/fast/writing-mode/auto-margins-across-boundaries_t01: RuntimeError
+LayoutTests/fast/writing-mode/flipped-blocks-hit-test-overflow_t01: RuntimeError
+LayoutTests/fast/writing-mode/flipped-blocks-text-map-local-to-container_t01: Crash
+LayoutTests/fast/writing-mode/overhanging-float-legend-crash_t01: RuntimeError
+LayoutTests/fast/writing-mode/positionForPoint_t01: RuntimeError
+LayoutTests/fast/writing-mode/table-hit-test_t01: RuntimeError
+LayoutTests/fast/writing-mode/vertical-inline-block-hittest_t01: RuntimeError
+LayoutTests/fast/xmlhttprequest/xmlhttprequest-html-response-encoding_t01: RuntimeError
+LayoutTests/fast/xmlhttprequest/xmlhttprequest-responseXML-html-document-responsetype-quirks_t01: RuntimeError
+LayoutTests/fast/xmlhttprequest/xmlhttprequest-responseXML-xml-text-responsetype_t01: RuntimeError
+LayoutTests/fast/xmlhttprequest/xmlhttprequest-responsetype-before-open-sync-request_t01: RuntimeError
+LayoutTests/fast/xmlhttprequest/xmlhttprequest-responsetype-text_t01: RuntimeError
+LayoutTests/fast/xmlhttprequest/xmlhttprequest-set-responsetype_t01: RuntimeError
+LayoutTests/fast/xmlhttprequest/xmlhttprequest-withcredentials-before-open_t01: RuntimeError
+LayoutTests/fast/xpath/4XPath/Borrowed/od_20000608_t01: RuntimeError
+LayoutTests/fast/xpath/4XPath/Core/test_literal_expr_t01: RuntimeError
+LayoutTests/fast/xpath/4XPath/Core/test_node_test_t02: RuntimeError
+LayoutTests/fast/xpath/4XPath/Core/test_nodeset_expr_t01: RuntimeError
+LayoutTests/fast/xpath/4XPath/Core/test_numeric_expr_t01: RuntimeError
+LayoutTests/fast/xpath/4XPath/Core/test_parser_t01: RuntimeError
+LayoutTests/fast/xpath/4XPath/Core/test_step_t01: RuntimeError
+LayoutTests/fast/xpath/ambiguous-operators_t01: RuntimeError
+LayoutTests/fast/xpath/attr-namespace_t01: RuntimeError
+LayoutTests/fast/xpath/attribute-node-predicate_t01: RuntimeError
+LayoutTests/fast/xpath/complex-id_t01: RuntimeError
+LayoutTests/fast/xpath/empty-string-substring_t01: RuntimeError
+LayoutTests/fast/xpath/ensure-null-namespace_t01: RuntimeError
+LayoutTests/fast/xpath/id-path_t01: RuntimeError
+LayoutTests/fast/xpath/id-simple_t01: RuntimeError
+LayoutTests/fast/xpath/implicit-node-args_t01: RuntimeError
+LayoutTests/fast/xpath/invalid-resolver_t01: RuntimeError
+LayoutTests/fast/xpath/nan-to-boolean_t01: RuntimeError
+LayoutTests/fast/xpath/node-name-case-sensitivity_t02: RuntimeError
+LayoutTests/fast/xpath/py-dom-xpath/expressions_t01: RuntimeError
+LayoutTests/fast/xpath/substring-nan-position_t01: RuntimeError
+LayoutTests/fast/xpath/xpath-detached-nodes_t01: RuntimeError
+LayoutTests/fast/xpath/xpath-result-eventlistener-crash_t01: RuntimeError
+LayoutTests/fast/xpath/xpath-template-element_t01: RuntimeError
+LayoutTests/fast/xsl/default-html_t01: RuntimeError
+LayoutTests/fast/xsl/extra-lf-at-end_t01: RuntimeError
+LayoutTests/fast/xsl/nbsp-in-stylesheet_t01: RuntimeError
+LayoutTests/fast/xsl/transformToFragment-XML-declaration_t01: RuntimeError
+LayoutTests/fast/xsl/xslt-bad-import-uri_t01: RuntimeError
+LayoutTests/fast/xsl/xslt-fragment-in-empty-doc_t01: RuntimeError
+LayoutTests/fast/xsl/xslt-string-parameters_t01: RuntimeError
+LayoutTests/fast/xsl/xslt-transform-to-fragment-crash_t01: RuntimeError
+LibTest/async/Future/asStream_A01_t02: RuntimeError
+LibTest/async/Stream/Stream.fromFutures_A04_t01: RuntimeError
+LibTest/async/Stream/Stream.fromFutures_A04_t02: RuntimeError
+LibTest/async/Stream/Stream.fromIterable_A02_t01: RuntimeError, Pass
+LibTest/async/Stream/Stream.fromIterable_A03_t02: RuntimeError
+LibTest/async/Stream/Stream.periodic_A04_t02: RuntimeError
+LibTest/async/Stream/Stream.periodic_A04_t03: RuntimeError
+LibTest/async/StreamController/StreamController.broadcast_A03_t02: RuntimeError
+LibTest/async/StreamController/StreamController.broadcast_A09_t02: RuntimeError
+LibTest/async/StreamController/StreamController.broadcast_A09_t03: RuntimeError
+LibTest/async/StreamController/StreamController.broadcast_A10_t02: RuntimeError
+LibTest/async/StreamController/StreamController.broadcast_A10_t03: RuntimeError
+LibTest/async/StreamController/addStream_A03_t01: RuntimeError
+LibTest/async/StreamController/stream_A02_t03: RuntimeError
+LibTest/async/StreamController/stream_A03_t02: RuntimeError
+LibTest/async/StreamSink/addStream_A01_t02: RuntimeError
+LibTest/async/StreamTransformer/StreamTransformer.fromHandlers_A01_t03: RuntimeError
+LibTest/async/Zone/registerBinaryCallback_A01_t01: RuntimeError
+LibTest/collection/DoubleLinkedQueue/fold_A01_t01: RuntimeError
+LibTest/collection/DoubleLinkedQueue/removeWhere_A02_t03: RuntimeError
+LibTest/collection/DoubleLinkedQueue/retainWhere_A02_t02: RuntimeError
+LibTest/collection/HashSet/HashSet_A04_t01: RuntimeError
+LibTest/collection/HashSet/HashSet_class_A01_t01: RuntimeError
+LibTest/collection/IterableBase/IterableBase_class_A01_t02: RuntimeError
+LibTest/collection/IterableMixin/contains_A02_t01: RuntimeError
+LibTest/collection/IterableMixin/every_A01_t02: RuntimeError
+LibTest/collection/IterableMixin/expand_A01_t01: RuntimeError
+LibTest/collection/IterableMixin/expand_A02_t01: RuntimeError
+LibTest/collection/IterableMixin/fold_A01_t01: RuntimeError
+LibTest/collection/LinkedList/addAll_A01_t02: RuntimeError
+LibTest/collection/LinkedList/join_A01_t01: RuntimeError
+LibTest/collection/LinkedList/toString_A03_t01: RuntimeError
+LibTest/collection/LinkedListEntry/LinkedListEntry_class_A03_t01: RuntimeError
+LibTest/collection/LinkedListEntry/insertAfter_A02_t02: RuntimeError
+LibTest/collection/LinkedListEntry/insertBefore_A01_t01: RuntimeError
+LibTest/collection/LinkedListEntry/insertBefore_A01_t02: RuntimeError
+LibTest/collection/LinkedListEntry/list_A01_t01: RuntimeError
+LibTest/collection/LinkedListEntry/next_A01_t02: RuntimeError
+LibTest/collection/LinkedListEntry/next_A01_t03: RuntimeError
+LibTest/collection/LinkedListEntry/previous_A01_t02: RuntimeError
+LibTest/collection/LinkedListEntry/previous_A01_t03: RuntimeError
+LibTest/collection/LinkedListEntry/unlink_A01_t01: RuntimeError
+LibTest/collection/LinkedListEntry/unlink_A02_t02: RuntimeError
+LibTest/collection/ListMixin/ListMixin_class_A01_t01: RuntimeError
+LibTest/collection/ListQueue/ListQueue.from_A01_t01: RuntimeError
+LibTest/convert/LineSplitter/fuse_A01_t01: RuntimeError
+LibTest/core/AssertionError/AssertionError_A01_t01: RuntimeError
+LibTest/core/AssertionError/message_A01_t01: RuntimeError
+LibTest/core/CyclicInitializationError/CyclicInitializationError.class_A01_t01: RuntimeError
+LibTest/core/CyclicInitializationError/variableName_A01_t01: RuntimeError
+LibTest/core/DateTime/DateTime.fromMicrosecondsSinceEpoch_A01_t01: RuntimeError
+LibTest/core/DateTime/microsecond_A01_t01: RuntimeError
+LibTest/core/DateTime/microsecondsSinceEpoch_A01_t01: RuntimeError
+LibTest/core/DateTime/parse_A01_t03: RuntimeError
+LibTest/core/DateTime/to8601String_A01_t01: RuntimeError
+LibTest/core/DateTime/to8601String_A01_t02: RuntimeError
+LibTest/core/Duration/Duration_A01_t01: CompileTimeError
+LibTest/core/Duration/Duration_A02_t01: CompileTimeError
+LibTest/core/Duration/inDays_A01_t01: CompileTimeError
+LibTest/core/Duration/inHours_A01_t01: CompileTimeError
+LibTest/core/Duration/inMicroseconds_A01_t01: CompileTimeError
+LibTest/core/Duration/inMilliseconds_A01_t01: CompileTimeError
+LibTest/core/Duration/inSeconds_A01_t01: CompileTimeError
+LibTest/core/Error/stackTrace_A01_t01: RuntimeError
+LibTest/core/Expando/operator_square_brackets_A01_t01: RuntimeError
+LibTest/core/Expando/operator_square_brackets_A01_t04: RuntimeError
+LibTest/core/Expando/operator_square_brackets_A01_t05: RuntimeError
+LibTest/core/Function/Function_class_A01_t01: RuntimeError
+LibTest/core/IndexError/stackTrace_A01_t01: RuntimeError
+LibTest/core/RegExp/Pattern_semantics/firstMatch_NonEmptyClassRanges_A01_t01: RuntimeError
+LibTest/core/Runes/any_A01_t01: RuntimeError
+LibTest/core/Runes/every_A01_t01: RuntimeError
+LibTest/core/String/padRight_A01_t01: RuntimeError
+LibTest/core/String/replaceFirstMapped_A03_t01: RuntimeError
+LibTest/core/Symbol/Symbol_A01_t04: RuntimeError
+LibTest/core/Uri/Uri.dataFromBytes_A01_t02: RuntimeError
+LibTest/core/Uri/Uri.dataFromBytes_A01_t03: RuntimeError
+LibTest/core/Uri/Uri.dataFromBytes_A01_t04: RuntimeError
+LibTest/core/Uri/Uri.dataFromBytes_A01_t05: RuntimeError
+LibTest/core/Uri/Uri.dataFromString_A01_t01: RuntimeError
+LibTest/core/Uri/Uri.dataFromString_A01_t03: RuntimeError
+LibTest/core/Uri/Uri.dataFromString_A01_t04: RuntimeError
+LibTest/core/Uri/Uri.dataFromString_A02_t03: RuntimeError
+LibTest/core/Uri/Uri.file_A02_t03: RuntimeError
+LibTest/core/Uri/queryParametersAll_A01_t04: RuntimeError
+LibTest/core/Uri/queryParametersAll_A03_t01: RuntimeError
+LibTest/core/UriData/UriData.fromBytes_A01_t03: RuntimeError
+LibTest/core/UriData/charset_A01_t01: RuntimeError
+LibTest/core/UriData/contentText_A01_t01: RuntimeError
+LibTest/core/UriData/parse_A01_t01: RuntimeError
+LibTest/core/double/INFINITY_A01_t04: RuntimeError
+LibTest/core/double/NEGATIVE_INFINITY_A01_t04: RuntimeError
+LibTest/core/double/isInfinite_A01_t03: CompileTimeError
+LibTest/core/double/operator_GE_A01_t02: CompileTimeError
+LibTest/core/double/operator_GT_A01_t02: CompileTimeError
+LibTest/core/double/operator_LT_A01_t02: CompileTimeError
+LibTest/core/double/operator_addition_A01_t08: Crash
+LibTest/core/double/operator_subtraction_A01_t06: RuntimeError
+LibTest/core/double/operator_subtraction_A01_t09: Crash
+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/hashCode_A01_t01: CompileTimeError
+LibTest/core/int/isInfinite_A01_t01: CompileTimeError
+LibTest/core/int/isNegative_A01_t01: CompileTimeError
+LibTest/core/int/isOdd_A01_t01: RuntimeError
+LibTest/core/int/operator_AND_A01_t01: CompileTimeError
+LibTest/core/int/operator_GE_A01_t01: CompileTimeError
+LibTest/core/int/operator_LT_A01_t01: CompileTimeError
+LibTest/core/int/operator_XOR_A01_t01: CompileTimeError
+LibTest/core/int/operator_addition_A01_t01: CompileTimeError
+LibTest/core/int/operator_equality_A01_t01: CompileTimeError
+LibTest/core/int/operator_equality_A03_t01: CompileTimeError
+LibTest/core/int/operator_left_shift_A01_t01: RuntimeError
+LibTest/core/int/operator_remainder_A01_t03: RuntimeError
+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: RuntimeError
+LibTest/core/int/operator_unary_minus_A01_t01: CompileTimeError
+LibTest/core/int/parse_A03_t02: CompileTimeError
+LibTest/core/int/roundToDouble_A01_t01: CompileTimeError
+LibTest/core/int/truncateToDouble_A01_t01: CompileTimeError
+LibTest/html/Element/focus_A01_t01: RuntimeError
+LibTest/typed_data/Float64List/shuffle_A01_t01: RuntimeError, Pass
+Utils/tests/Expect/throws_A01_t04: RuntimeError
+WebPlatformTest/DOMEvents/approved/Event.bubbles.false_t01: RuntimeError
+WebPlatformTest/DOMEvents/approved/EventObject.multiple.dispatchEvent_t01: RuntimeError
+WebPlatformTest/DOMEvents/approved/Propagation.path.target.removed_t01: RuntimeError
+WebPlatformTest/DOMEvents/approved/addEventListener.optional.useCapture_t01: RuntimeError
+WebPlatformTest/DOMEvents/approved/stopPropagation.deferred.effect_t01: RuntimeError
+WebPlatformTest/Utils/test/asyncTestFail_t01: RuntimeError
+WebPlatformTest/Utils/test/asyncTestFail_t02: RuntimeError
+WebPlatformTest/Utils/test/asyncTestPass_t01: RuntimeError
+WebPlatformTest/Utils/test/asyncTestTimeout_t01: RuntimeError
+WebPlatformTest/custom-elements/concepts/type_A04_t01: RuntimeError
+WebPlatformTest/custom-elements/concepts/type_A08_t01: RuntimeError
+WebPlatformTest/custom-elements/instantiating/createElementNS_A03_t01: RuntimeError
+WebPlatformTest/custom-elements/instantiating/createElementNS_A04_t01: RuntimeError
+WebPlatformTest/custom-elements/instantiating/createElementNS_A05_t01: RuntimeError
+WebPlatformTest/custom-elements/instantiating/createElement_A01_t01: RuntimeError
+WebPlatformTest/custom-elements/instantiating/createElement_A02_t01: RuntimeError
+WebPlatformTest/custom-elements/instantiating/createElement_A04_t01: RuntimeError
+WebPlatformTest/custom-elements/instantiating/isAttribute_A01_t02: RuntimeError
+WebPlatformTest/custom-elements/instantiating/isAttribute_A03_t01: RuntimeError
+WebPlatformTest/custom-elements/instantiating/localName_A01_t01: RuntimeError
+WebPlatformTest/dom/collections/emptyName_A01_t02: RuntimeError
+WebPlatformTest/dom/collections/emptyName_A01_t05: RuntimeError
+WebPlatformTest/dom/events/defaultPrevented_A01_t06: RuntimeError
+WebPlatformTest/dom/events/event_constructors/Event_A01_t01: RuntimeError
+WebPlatformTest/dom/events/propagation_A01_t01: RuntimeError
+WebPlatformTest/dom/events/type_A01_t01: RuntimeError
+WebPlatformTest/dom/nodes/CharacterData/deleteData_A01_t01: RuntimeError
+WebPlatformTest/dom/nodes/CharacterData/insertData_A02_t01: RuntimeError
+WebPlatformTest/dom/nodes/CharacterData/remove_A02_t02: RuntimeError
+WebPlatformTest/dom/nodes/DOMImplementation-createDocument_t01: RuntimeError
+WebPlatformTest/dom/nodes/Document-adoptNode_t01: RuntimeError
+WebPlatformTest/dom/nodes/Document-createElementNS_t02: RuntimeError
+WebPlatformTest/dom/nodes/DocumentType-remove_t01: RuntimeError
+WebPlatformTest/dom/nodes/Element-childElementCount-dynamic-remove_t01: RuntimeError
+WebPlatformTest/dom/nodes/Node-contains_t01: RuntimeError
+WebPlatformTest/dom/nodes/Node-insertBefore_t01: RuntimeError
+WebPlatformTest/dom/nodes/Node-nodeName_t01: RuntimeError
+WebPlatformTest/dom/nodes/Node-parentElement_t01: RuntimeError
+WebPlatformTest/dom/nodes/Node-parentNode_t01: RuntimeError
+WebPlatformTest/dom/nodes/Node-textContent_t01: RuntimeError
+WebPlatformTest/dom/nodes/attributes/attributes_A01_t01: RuntimeError
+WebPlatformTest/dom/nodes/attributes/attributes_A02_t01: RuntimeError
+WebPlatformTest/dom/nodes/attributes/attributes_A04_t01: RuntimeError
+WebPlatformTest/dom/nodes/attributes/attributes_A05_t01: RuntimeError
+WebPlatformTest/dom/nodes/attributes/setAttributeNS_A03_t01: RuntimeError
+WebPlatformTest/dom/nodes/attributes/setAttributeNS_A04_t01: RuntimeError
+WebPlatformTest/dom/nodes/attributes/setAttributeNS_A06_t01: RuntimeError
+WebPlatformTest/dom/nodes/attributes/setAttributeNS_A06_t02: RuntimeError
+WebPlatformTest/dom/nodes/attributes/setAttributeNS_A07_t03: RuntimeError
+WebPlatformTest/dom/nodes/attributes/setAttributeNS_A09_t02: RuntimeError
+WebPlatformTest/dom/nodes/attributes/setAttributeNS_A10_t02: RuntimeError
+WebPlatformTest/dom/nodes/attributes/setAttribute_A01_t01: RuntimeError
+WebPlatformTest/dom/nodes/attributes/setAttribute_A02_t01: RuntimeError
+WebPlatformTest/dom/nodes/attributes/setAttribute_A02_t02: RuntimeError
+WebPlatformTest/dom/nodes/attributes/setAttribute_A03_t01: RuntimeError
+WebPlatformTest/dom/nodes/attributes/setAttribute_A04_t01: RuntimeError
+WebPlatformTest/dom/nodes/attributes/setAttribute_A06_t01: RuntimeError
+WebPlatformTest/dom/nodes/attributes/setAttribute_A07_t01: RuntimeError
+WebPlatformTest/dom/nodes/attributes/setAttribute_A08_t01: RuntimeError
+WebPlatformTest/dom/ranges/Range-attributes_t02: RuntimeError
+WebPlatformTest/html-imports/link-import_t02: RuntimeError
+WebPlatformTest/html-imports/loading-import_t01: RuntimeError
+WebPlatformTest/html-templates/additions-to-the-steps-to-clone-a-node/template-clone-children_t01: RuntimeError
+WebPlatformTest/html-templates/definitions/template-contents-owner-document-type_t01: RuntimeError
+WebPlatformTest/html-templates/definitions/template-contents_t01: RuntimeError
+WebPlatformTest/html-templates/innerhtml-on-templates/innerhtml_t01: RuntimeError
+WebPlatformTest/html-templates/parsing-html-templates/additions-to-foster-parenting/template-is-a-foster-parent-element_t01: RuntimeError
+WebPlatformTest/html-templates/parsing-html-templates/additions-to-the-in-body-insertion-mode/ignore-body-token_t01: RuntimeError
+WebPlatformTest/html-templates/parsing-html-templates/additions-to-the-in-body-insertion-mode/ignore-frameset-token_t01: RuntimeError
+WebPlatformTest/html-templates/parsing-html-templates/additions-to-the-in-body-insertion-mode/ignore-html-token_t01: RuntimeError
+WebPlatformTest/html-templates/parsing-html-templates/additions-to-the-in-head-insertion-mode/generating-of-implied-end-tags_t01: RuntimeError
+WebPlatformTest/html-templates/parsing-html-templates/additions-to-the-in-table-insertion-mode/end-tag-table_t01: RuntimeError
+WebPlatformTest/html-templates/parsing-html-templates/appending-to-a-template/template-child-nodes_t01: RuntimeError
+WebPlatformTest/html-templates/parsing-html-templates/clearing-the-stack-back-to-a-given-context/clearing-stack-back-to-a-table-body-context_t01: RuntimeError
+WebPlatformTest/html-templates/serializing-html-templates/outerhtml_t01: RuntimeError
+WebPlatformTest/html-templates/template-element/node-document-changes_t01: RuntimeError
+WebPlatformTest/html-templates/template-element/template-as-a-descendant_t01: RuntimeError
+WebPlatformTest/html/browsers/browsing-the-web/read-media/pageload-video_t01: RuntimeError
+WebPlatformTest/html/dom/documents/dom-tree-accessors/Document.getElementsByClassName-null_t01: RuntimeError
+WebPlatformTest/html/dom/documents/dom-tree-accessors/Element.getElementsByClassName-null_t01: RuntimeError
+WebPlatformTest/html/dom/documents/dom-tree-accessors/document.body-setter_t01: RuntimeError
+WebPlatformTest/html/dom/documents/dom-tree-accessors/document.getElementsByName-namespace_t01: RuntimeError
+WebPlatformTest/html/dom/documents/dom-tree-accessors/document.getElementsByName-newelements_t01: RuntimeError
+WebPlatformTest/html/dom/documents/dom-tree-accessors/document.head_t01: RuntimeError
+WebPlatformTest/html/dom/documents/dom-tree-accessors/document.head_t02: RuntimeError
+WebPlatformTest/html/dom/documents/dom-tree-accessors/nameditem_t04: RuntimeError
+WebPlatformTest/html/dom/documents/dom-tree-accessors/nameditem_t05: RuntimeError
+WebPlatformTest/html/dom/documents/dom-tree-accessors/nameditem_t06: RuntimeError
+WebPlatformTest/html/dom/elements/global-attributes/dataset-enumeration_t01: RuntimeError
+WebPlatformTest/html/dom/elements/global-attributes/dataset-get_t01: RuntimeError
+WebPlatformTest/html/dom/elements/global-attributes/id-name_t01: RuntimeError
+WebPlatformTest/html/semantics/disabled-elements/disabledElement_t01: RuntimeError
+WebPlatformTest/html/semantics/embedded-content/media-elements/error-codes/error_t01: RuntimeError
+WebPlatformTest/html/semantics/embedded-content/media-elements/interfaces/HTMLElement/HTMLMediaElement/addTextTrack_t01: RuntimeError
+WebPlatformTest/html/semantics/embedded-content/media-elements/interfaces/HTMLElement/HTMLTrackElement/default_t01: RuntimeError
+WebPlatformTest/html/semantics/embedded-content/media-elements/interfaces/HTMLElement/HTMLTrackElement/kind_t01: RuntimeError
+WebPlatformTest/html/semantics/embedded-content/media-elements/interfaces/HTMLElement/HTMLTrackElement/label_t01: RuntimeError
+WebPlatformTest/html/semantics/embedded-content/media-elements/interfaces/HTMLElement/HTMLTrackElement/track_t01: RuntimeError
+WebPlatformTest/html/semantics/embedded-content/media-elements/interfaces/TextTrack/kind_t01: RuntimeError
+WebPlatformTest/html/semantics/embedded-content/the-audio-element/audio_constructor_t01: RuntimeError
+WebPlatformTest/html/semantics/forms/textfieldselection/selection-not-application-textarea_t01: RuntimeError
+WebPlatformTest/html/semantics/forms/textfieldselection/selection_t01: RuntimeError
+WebPlatformTest/html/semantics/forms/textfieldselection/textfieldselection-setRangeText_t01: RuntimeError
+WebPlatformTest/html/semantics/forms/textfieldselection/textfieldselection-setSelectionRange_t01: RuntimeError
+WebPlatformTest/html/semantics/forms/the-button-element/button-validation_t01: RuntimeError
+WebPlatformTest/html/semantics/forms/the-datalist-element/datalistelement_t01: RuntimeError
+WebPlatformTest/html/semantics/forms/the-fieldset-element/disabled_t01: RuntimeError
+WebPlatformTest/html/semantics/forms/the-form-element/form-elements-matches_t01: RuntimeError
+WebPlatformTest/html/semantics/forms/the-form-element/form-nameditem_t01: RuntimeError
+WebPlatformTest/html/semantics/forms/the-input-element/color_t01: RuntimeError
+WebPlatformTest/html/semantics/forms/the-input-element/datetime_t02: RuntimeError
+WebPlatformTest/html/semantics/forms/the-input-element/input-type-button_t01: RuntimeError
+WebPlatformTest/html/semantics/forms/the-input-element/input-type-checkbox_t01: RuntimeError
+WebPlatformTest/html/semantics/forms/the-input-element/mobiles_t01: RuntimeError
+WebPlatformTest/html/semantics/forms/the-input-element/month_t01: RuntimeError
+WebPlatformTest/html/semantics/forms/the-input-element/password_t01: RuntimeError
+WebPlatformTest/html/semantics/forms/the-input-element/pattern_attribute_t01: RuntimeError
+WebPlatformTest/html/semantics/forms/the-input-element/range_t01: RuntimeError
+WebPlatformTest/html/semantics/forms/the-input-element/telephone_t01: RuntimeError
+WebPlatformTest/html/semantics/forms/the-input-element/time_t01: RuntimeError
+WebPlatformTest/html/semantics/forms/the-input-element/time_t02: RuntimeError
+WebPlatformTest/html/semantics/forms/the-input-element/type-change-state_t01: RuntimeError
+WebPlatformTest/html/semantics/forms/the-input-element/url_t01: RuntimeError
+WebPlatformTest/html/semantics/forms/the-input-element/week_t01: RuntimeError
+WebPlatformTest/html/semantics/forms/the-option-element/option-text-spaces_t01: RuntimeError
+WebPlatformTest/html/semantics/forms/the-textarea-element/textarea-type_t01: RuntimeError
+WebPlatformTest/html/semantics/grouping-content/the-li-element/grouping-li_t01: RuntimeError
+WebPlatformTest/html/semantics/grouping-content/the-ol-element/ol.start-reflection_t01: RuntimeError
+WebPlatformTest/html/semantics/interactive-elements/the-dialog-element/dialog-close_t01: RuntimeError
+WebPlatformTest/html/semantics/selectors/pseudo-classes/checked_t01: RuntimeError
+WebPlatformTest/html/semantics/selectors/pseudo-classes/focus_t01: RuntimeError
+WebPlatformTest/html/semantics/selectors/pseudo-classes/indeterminate_t01: RuntimeError
+WebPlatformTest/html/semantics/selectors/pseudo-classes/inrange-outofrange_t01: RuntimeError
+WebPlatformTest/html/semantics/selectors/pseudo-classes/link_t01: RuntimeError
+WebPlatformTest/html/semantics/selectors/pseudo-classes/required-optional_t01: RuntimeError
+WebPlatformTest/html/semantics/selectors/pseudo-classes/valid-invalid_t01: RuntimeError
+WebPlatformTest/html/semantics/tabular-data/attributes-common-to-td-and-th-elements/cellIndex_t01: RuntimeError
+WebPlatformTest/html/semantics/tabular-data/the-table-element/caption-methods_t01: RuntimeError
+WebPlatformTest/html/semantics/tabular-data/the-table-element/createTBody_t01: RuntimeError
+WebPlatformTest/html/semantics/tabular-data/the-table-element/insertRow-method_t02: RuntimeError
+WebPlatformTest/html/semantics/tabular-data/the-table-element/table-insertRow_t01: RuntimeError
+WebPlatformTest/html/semantics/tabular-data/the-table-element/table-rows_t01: RuntimeError
+WebPlatformTest/html/semantics/tabular-data/the-tr-element/rowIndex_t01: RuntimeError
+WebPlatformTest/html/semantics/text-level-semantics/the-a-element/a.text-getter_t01: RuntimeError
+WebPlatformTest/html/semantics/text-level-semantics/the-a-element/a.text-setter_t01: RuntimeError
+WebPlatformTest/html/syntax/parsing/Document.getElementsByTagName-foreign_t01: RuntimeError, Pass
+WebPlatformTest/html/syntax/parsing/Document.getElementsByTagName-foreign_t02: RuntimeError
+WebPlatformTest/html/webappapis/system-state-and-capabilities/the-navigator-object/protocol_t00: RuntimeError
+WebPlatformTest/shadow-dom/elements-and-dom-objects/extensions-to-element-interface/attributes/test-001_t01: RuntimeError
+WebPlatformTest/shadow-dom/elements-and-dom-objects/extensions-to-element-interface/attributes/test-005_t01: RuntimeError
+WebPlatformTest/shadow-dom/elements-and-dom-objects/extensions-to-element-interface/attributes/test-006_t01: RuntimeError
+WebPlatformTest/shadow-dom/elements-and-dom-objects/extensions-to-element-interface/methods/test-003_t01: RuntimeError
+WebPlatformTest/shadow-dom/elements-and-dom-objects/extensions-to-event-interface/event-path-001_t01: RuntimeError
+WebPlatformTest/shadow-dom/elements-and-dom-objects/shadowroot-object/shadowroot-attributes/test-009_t01: RuntimeError
+WebPlatformTest/shadow-dom/elements-and-dom-objects/shadowroot-object/shadowroot-attributes/test-011_t01: RuntimeError
+WebPlatformTest/shadow-dom/elements-and-dom-objects/shadowroot-object/shadowroot-attributes/test-013_t01: RuntimeError
+WebPlatformTest/shadow-dom/elements-and-dom-objects/shadowroot-object/shadowroot-methods/test-001_t01: RuntimeError
+WebPlatformTest/shadow-dom/elements-and-dom-objects/shadowroot-object/shadowroot-methods/test-006_t01: RuntimeError
+WebPlatformTest/shadow-dom/elements-and-dom-objects/the-content-html-element/test-003_t01: RuntimeError
+WebPlatformTest/shadow-dom/elements-and-dom-objects/the-content-html-element/test-004_t02: RuntimeError
+WebPlatformTest/shadow-dom/elements-and-dom-objects/the-content-html-element/test-005_t01: RuntimeError
+WebPlatformTest/shadow-dom/elements-and-dom-objects/the-shadow-html-element/test-002_t01: RuntimeError
+WebPlatformTest/shadow-dom/elements-and-dom-objects/the-shadow-html-element/test-003_t01: RuntimeError
+WebPlatformTest/shadow-dom/elements-and-dom-objects/the-shadow-html-element/test-005_t01: RuntimeError
+WebPlatformTest/shadow-dom/events/event-dispatch/test-002_t01: RuntimeError
+WebPlatformTest/shadow-dom/events/event-retargeting/test-001_t01: RuntimeError
+WebPlatformTest/shadow-dom/events/events-that-are-always-stopped/test-001_t01: RuntimeError
+WebPlatformTest/shadow-dom/events/events-that-are-always-stopped/test-003_t01: RuntimeError
+WebPlatformTest/shadow-dom/events/events-that-are-always-stopped/test-005_t01: RuntimeError
+WebPlatformTest/shadow-dom/events/events-that-are-always-stopped/test-007_t01: RuntimeError
+WebPlatformTest/shadow-dom/events/events-that-are-always-stopped/test-008_t01: RuntimeError
+WebPlatformTest/shadow-dom/events/retargeting-focus-events/test-001_t04: RuntimeError
+WebPlatformTest/shadow-dom/events/retargeting-focus-events/test-001_t06: RuntimeError
+WebPlatformTest/shadow-dom/events/retargeting-relatedtarget/test-001_t01: RuntimeError
+WebPlatformTest/shadow-dom/html-elements-and-their-shadow-trees/test-001_t01: RuntimeError
+WebPlatformTest/shadow-dom/html-elements-and-their-shadow-trees/test-003_t01: RuntimeError
+WebPlatformTest/shadow-dom/html-elements-and-their-shadow-trees/test-004_t01: RuntimeError
+WebPlatformTest/shadow-dom/html-elements-in-shadow-trees/html-forms/test-001_t01: RuntimeError
+WebPlatformTest/shadow-dom/html-elements-in-shadow-trees/html-forms/test-002_t01: RuntimeError
+WebPlatformTest/shadow-dom/shadow-trees/custom-pseudo-elements/test-001_t01: RuntimeError
+WebPlatformTest/shadow-dom/shadow-trees/distributed-pseudo-element/test-002_t01: RuntimeError
+WebPlatformTest/shadow-dom/shadow-trees/hosting-multiple-shadow-trees/test-003_t01: RuntimeError
+WebPlatformTest/shadow-dom/shadow-trees/lower-boundary-encapsulation/distribution-003_t01: RuntimeError
+WebPlatformTest/shadow-dom/shadow-trees/lower-boundary-encapsulation/test-005_t01: RuntimeError
+WebPlatformTest/shadow-dom/shadow-trees/nested-shadow-trees/test-001_t01: RuntimeError
+WebPlatformTest/shadow-dom/shadow-trees/reprojection/test-001_t01: RuntimeError
+WebPlatformTest/shadow-dom/shadow-trees/satisfying-matching-criteria/test-006_t01: RuntimeError
+WebPlatformTest/shadow-dom/shadow-trees/upper-boundary-encapsulation/ownerdocument-002_t01: RuntimeError
+WebPlatformTest/shadow-dom/shadow-trees/upper-boundary-encapsulation/test-005_t01: RuntimeError
+WebPlatformTest/shadow-dom/shadow-trees/upper-boundary-encapsulation/test-011_t01: RuntimeError
+WebPlatformTest/webstorage/event_constructor_t02: RuntimeError
+WebPlatformTest/webstorage/event_local_newvalue_t01: RuntimeError
+WebPlatformTest/webstorage/event_local_storageeventinit_t01: RuntimeError
+WebPlatformTest/webstorage/event_session_url_t01: RuntimeError
+WebPlatformTest/webstorage/storage_local_remove_t01: RuntimeError
+WebPlatformTest/webstorage/storage_local_setitem_quotaexceedederr_t01: RuntimeError
+WebPlatformTest/webstorage/storage_local_setitem_t01: RuntimeError
+WebPlatformTest/webstorage/storage_session_getitem_t02: RuntimeError
+WebPlatformTest/webstorage/storage_session_length_t01: RuntimeError
+WebPlatformTest/webstorage/storage_session_removeitem_t01: RuntimeError
+
+[ $compiler == dart2js && $runtime == d8 && $system == linux && !$fast_startup ]
+LayoutTests/fast/canvas/canvas-drawImage-scaled-copy-to-self_t01: RuntimeError
+LayoutTests/fast/events/input-focus-no-duplicate-events_t01: RuntimeError
+
+[ $compiler == dart2js && $runtime == ff ]
+Language/Expressions/Additive_Expressions/syntax_t01: RuntimeError
+Language/Expressions/Await_Expressions/evaluation_throws_t04: RuntimeError
+Language/Expressions/Await_Expressions/evaluation_throws_t06: RuntimeError
+Language/Expressions/Await_Expressions/evaluation_throws_t07: RuntimeError
+Language/Expressions/Constants/depending_on_itself_t03: Crash
+Language/Expressions/Constants/exception_t02/01: CompileTimeError
+Language/Expressions/Constants/integer_size_t03: CompileTimeError
+Language/Expressions/Constants/integer_size_t04: CompileTimeError
+Language/Expressions/Function_Invocation/async_generator_invokation_t08: Timeout
+Language/Expressions/Function_Invocation/async_generator_invokation_t10: Timeout
+Language/Expressions/Identifier_Reference/evaluation_variable_or_parameter_t02: RuntimeError
+Language/Expressions/If_null_Expressions/static_type_t01: RuntimeError
+Language/Expressions/Lists/identical_t02: RuntimeError
+Language/Expressions/Maps/identical_t02: RuntimeError
+Language/Expressions/Null/instance_of_class_null_t01: RuntimeError
+Language/Expressions/Numbers/syntax_t06: CompileTimeError
+Language/Expressions/Numbers/syntax_t09: CompileTimeError
+Language/Expressions/Object_Identity/double_t02: RuntimeError
+Language/Expressions/Shift/integer_t02: CompileTimeError
+Language/Expressions/Type_Cast/syntax_t01: RuntimeError
+Language/Expressions/Unary_Expressions/variable_negative_t03: RuntimeError
+Language/Libraries_and_Scripts/Scripts/top_level_main_t01: CompileTimeError
+Language/Libraries_and_Scripts/top_level_syntax_t01: CompileTimeError
+Language/Metadata/before_ctor_t02: RuntimeError
+Language/Metadata/before_function_t01: RuntimeError
+Language/Metadata/before_function_t02: RuntimeError
+Language/Metadata/before_function_t03: RuntimeError
+Language/Metadata/before_function_t04: RuntimeError
+Language/Metadata/before_function_t07: RuntimeError
+Language/Metadata/before_import_t01: RuntimeError
+Language/Metadata/before_param_t03: RuntimeError
+Language/Metadata/before_param_t05: RuntimeError
+Language/Metadata/before_param_t07: RuntimeError
+Language/Metadata/before_param_t09: RuntimeError
+Language/Metadata/before_variable_t02: RuntimeError
+Language/Mixins/Mixin_Application/syntax_t23: RuntimeError
+Language/Mixins/Mixin_Application/syntax_t25: RuntimeError
+Language/Overview/Privacy/private_and_public_t18: RuntimeError
+Language/Reference/Operator_Precedence/precedence_15_unary_prefix_t08: RuntimeError
+Language/Statements/Assert/execution_t09: RuntimeError
+Language/Types/Function_Types/call_t01: RuntimeError
+Language/Types/Function_Types/subtype_named_args_t02: RuntimeError
+Language/Types/Function_Types/subtype_named_args_t03: RuntimeError
+Language/Types/Function_Types/subtype_named_args_t11: RuntimeError
+Language/Types/Function_Types/subtype_optional_args_t01: RuntimeError
+Language/Types/Function_Types/subtype_optional_args_t02: RuntimeError
+Language/Types/Function_Types/subtype_optional_args_t04: RuntimeError
+Language/Types/Interface_Types/subtype_t06: RuntimeError
+Language/Types/Interface_Types/subtype_t21: RuntimeError
+Language/Types/Interface_Types/subtype_t23: RuntimeError
+Language/Variables/constant_variable_t09: RuntimeError
+LanguageFeatures/Instantiate-to-bound/check_types/typedef_param_t02: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/interface_compositionality_class_member_A02_t03: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/interface_compositionality_local_variable_A02_t01: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/interface_compositionality_return_value_A02_t01: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A51_t01: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A51_t02: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A53_t01: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A51_t02: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A51_t03: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A53_t01: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A53_t02: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A53_t03: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_global_variable_fail_A51_t01: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_global_variable_fail_A52_t01: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_local_variable_fail_A51_t01: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_local_variable_fail_A52_t01: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_local_variable_fail_A53_t01: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_return_value_fail_A53_t01: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/positional_function_types_fail_arguments_binding_fail_A31_t01: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/positional_function_types_fail_arguments_binding_fail_A31_t02: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/positional_function_types_fail_arguments_binding_fail_A32_t01: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/positional_function_types_fail_arguments_binding_fail_A32_t02: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/positional_function_types_fail_class_member_fail_A31_t01: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/positional_function_types_fail_class_member_fail_A31_t03: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/positional_function_types_fail_class_member_fail_A32_t02: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/positional_function_types_fail_class_member_fail_A32_t03: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/positional_function_types_fail_local_variable_fail_A31_t01: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/positional_function_types_fail_local_variable_fail_A32_t01: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/positional_function_types_fail_return_value_fail_A32_t01: RuntimeError
+LanguageFeatures/Subtyping/static/generated/interface_compositionality_arguments_binding_A02_t01: RuntimeError
+LanguageFeatures/Subtyping/static/generated/interface_compositionality_class_member_A02_t01: RuntimeError
+LanguageFeatures/Subtyping/static/generated/interface_compositionality_class_member_A02_t02: RuntimeError
+LanguageFeatures/Subtyping/static/generated/interface_compositionality_class_member_A02_t03: RuntimeError
+LayoutTests/fast/animation/request-animation-frame-cancel_t01: Timeout, Pass
+LayoutTests/fast/animation/request-animation-frame-timestamps-advance_t01: Timeout, Pass
+LayoutTests/fast/backgrounds/background-position-parsing-2_t01: RuntimeError
+LayoutTests/fast/backgrounds/background-shorthand-with-backgroundSize-style_t01: RuntimeError
+LayoutTests/fast/backgrounds/repeat/parsing-background-repeat_t01: RuntimeError
+LayoutTests/fast/borders/border-image-width-numbers-computed-style_t01: RuntimeError
+LayoutTests/fast/borders/border-width-percent_t01: RuntimeError
+LayoutTests/fast/canvas/2d.composite.globalAlpha.fillPath_t01: RuntimeError
+LayoutTests/fast/canvas/2d.fillText.gradient_t01: RuntimeError
+LayoutTests/fast/canvas/2d.text.draw.fill.maxWidth.negative_t01: RuntimeError
+LayoutTests/fast/canvas/DrawImageSinglePixelStretch_t01: Timeout
+LayoutTests/fast/canvas/canvas-blend-solid_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-blending-color-over-color_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-blending-global-alpha_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-blending-gradient-over-color_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-blending-gradient-over-gradient_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-blending-gradient-over-pattern_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-blending-image-over-color_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-blending-image-over-gradient_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-blending-pattern-over-image_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-blending-text_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-blending-transforms_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-composite-text-alpha_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-fillRect-zeroSizeGradient_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-fillText-zeroSizeGradient_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-font-ex-units-crash_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-getImageData-invalid_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-getImageData-rounding_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-imageSmoothingEnabled-repaint_t01: Timeout, Pass
+LayoutTests/fast/canvas/canvas-lose-restore-googol-size_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-lose-restore-max-int-size_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-putImageData_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-resize-after-paint_t01: Timeout, Pass
+LayoutTests/fast/canvas/canvas-scale-fillPath-shadow_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-scale-shadowBlur_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-stroke-zeroSizeGradient_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-strokePath-gradient-shadow_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-strokeRect-alpha-shadow_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-strokeRect-gradient-shadow_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-toDataURL-crash_t01: RuntimeError
+LayoutTests/fast/canvas/drawImage-with-valid-image_t01: Timeout
+LayoutTests/fast/canvas/getPutImageDataPairTest_t01: RuntimeError
+LayoutTests/fast/canvas/gradient-addColorStop-with-invalid-color_t01: RuntimeError
+LayoutTests/fast/canvas/rgba-parsing_t01: RuntimeError
+LayoutTests/fast/canvas/setWidthResetAfterForcedRender_t01: Timeout, Pass
+LayoutTests/fast/canvas/webgl/WebGLContextEvent_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/draw-elements-out-of-bounds_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/get-active-test_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/gl-get-calls_t01: RuntimeError, Pass
+LayoutTests/fast/canvas/webgl/gl-object-get-calls_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/gl-teximage_t01: Timeout
+LayoutTests/fast/canvas/webgl/glsl-conformance_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/incorrect-context-object-behaviour_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/index-validation-copies-indices_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/index-validation-with-resized-buffer_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/oes-element-index-uint_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/oes-vertex-array-object_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-array-buffer-view_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-image-rgba4444_t01: Timeout
+LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-image-rgba5551_t01: Timeout
+LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-image_t01: Timeout
+LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-video-rgb565_t01: Timeout
+LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-video-rgba4444_t01: Timeout
+LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-video-rgba5551_t01: Timeout
+LayoutTests/fast/canvas/webgl/texture-active-bind_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/texture-color-profile_t01: Timeout
+LayoutTests/fast/canvas/webgl/texture-complete_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/texture-transparent-pixels-initialized_t01: Timeout
+LayoutTests/fast/canvas/webgl/webgl-specific_t01: RuntimeError
+LayoutTests/fast/css-generated-content/bug91547_t01: RuntimeError
+LayoutTests/fast/css-generated-content/details-before-after-content_t01: RuntimeError
+LayoutTests/fast/css-generated-content/malformed-url_t01: Timeout, RuntimeError
+LayoutTests/fast/css-generated-content/pseudo-animation-before-onload_t01: RuntimeError, Pass
+LayoutTests/fast/css-generated-content/pseudo-animation_t01: RuntimeError, Pass
+LayoutTests/fast/css-generated-content/pseudo-element-events_t01: Timeout
+LayoutTests/fast/css-generated-content/pseudo-transition-event_t01: Timeout
+LayoutTests/fast/css-grid-layout/breadth-size-resolution-grid_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/calc-resolution-grid-item_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/flex-content-resolution-columns_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/flex-content-resolution-rows_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/grid-auto-flow-get-set_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/grid-auto-flow-update_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/grid-element-border-grid-item_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/grid-element-border-padding-grid-item_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/grid-element-padding-margin_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/grid-item-area-get-set_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/grid-item-bad-named-area-auto-placement_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/grid-item-change-order-auto-flow_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/grid-item-margin-auto-columns-rows-horiz-bt_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/grid-item-margin-auto-columns-rows-vert-rl_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/grid-item-margin-auto-columns-rows_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/grid-item-margin-resolution_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/grid-item-order-auto-flow-resolution_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/justify-self-cell_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/minmax-fixed-logical-height-only_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/percent-grid-item-in-percent-grid-track-in-percent-grid_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/percent-grid-item-in-percent-grid-track-update_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/percent-grid-item-in-percent-grid-track_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/percent-padding-margin-resolution-grid-item-update_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/place-cell-by-index_t01: RuntimeError
+LayoutTests/fast/css-intrinsic-dimensions/intrinsic-sized-blocks_t01: RuntimeError
+LayoutTests/fast/css-intrinsic-dimensions/intrinsic-sized-column-flex-items_t01: RuntimeError
+LayoutTests/fast/css-intrinsic-dimensions/intrinsic-sized-flex-items_t01: RuntimeError
+LayoutTests/fast/css-intrinsic-dimensions/intrinsic-sized-replaced-absolutes_t01: RuntimeError
+LayoutTests/fast/css-intrinsic-dimensions/width-shrinks-avoid-floats_t01: RuntimeError
+LayoutTests/fast/css/aspect-ratio-inheritance_t01: RuntimeError
+LayoutTests/fast/css/auto-min-size_t01: RuntimeError
+LayoutTests/fast/css/background-serialize_t01: RuntimeError
+LayoutTests/fast/css/border-image-null-image-crash_t01: RuntimeError
+LayoutTests/fast/css/border-image-style-length_t01: RuntimeError
+LayoutTests/fast/css/border-shorthand-initialize-longhands_t01: RuntimeError
+LayoutTests/fast/css/border-start-end_t01: RuntimeError
+LayoutTests/fast/css/box-sizing-border-box-dynamic-padding-border-update_t01: RuntimeError
+LayoutTests/fast/css/content/content-none_t01: RuntimeError
+LayoutTests/fast/css/counters/complex-before_t01: RuntimeError
+LayoutTests/fast/css/cursor-parsing-image-set_t01: RuntimeError
+LayoutTests/fast/css/cursor-parsing_t01: RuntimeError
+LayoutTests/fast/css/deprecated-flex-box-zero-width-intrinsic-max-width_t01: RuntimeError
+LayoutTests/fast/css/device-aspect-ratio_t01: RuntimeError
+LayoutTests/fast/css/draggable-region-parser_t01: RuntimeError
+LayoutTests/fast/css/fixed-width-intrinsic-width-excludes-scrollbars_t01: RuntimeError
+LayoutTests/fast/css/focus-display-block-inline_t01: RuntimeError, Pass
+LayoutTests/fast/css/font-face-insert-link_t01: RuntimeError
+LayoutTests/fast/css/font-face-unicode-range-load_t01: RuntimeError
+LayoutTests/fast/css/font-face-unicode-range-overlap-load_t01: RuntimeError
+LayoutTests/fast/css/font-property-priority_t01: RuntimeError
+LayoutTests/fast/css/fontface-properties_t01: RuntimeError
+LayoutTests/fast/css/fontfaceset-events_t01: RuntimeError
+LayoutTests/fast/css/getComputedStyle/computed-style-border-image_t01: RuntimeError
+LayoutTests/fast/css/getComputedStyle/computed-style-cross-fade_t01: RuntimeError
+LayoutTests/fast/css/getComputedStyle/font-family-fallback-reset_t01: RuntimeError
+LayoutTests/fast/css/getComputedStyle/getComputedStyle-border-style-shorthand_t01: RuntimeError
+LayoutTests/fast/css/getComputedStyle/getComputedStyle-borderRadius-2_t01: RuntimeError
+LayoutTests/fast/css/getComputedStyle/getComputedStyle-length-unit_t01: RuntimeError
+LayoutTests/fast/css/getComputedStyle/getComputedStyle-zIndex-auto_t01: RuntimeError
+LayoutTests/fast/css/getPropertyValue-column-rule_t01: RuntimeError
+LayoutTests/fast/css/getPropertyValue-webkit-margin-collapse_t01: RuntimeError
+LayoutTests/fast/css/html-attr-case-sensitivity_t01: RuntimeError
+LayoutTests/fast/css/image-set-setting_t01: RuntimeError
+LayoutTests/fast/css/implicit-attach-marking_t01: Timeout, Pass
+LayoutTests/fast/css/inherited-properties-rare-text_t01: RuntimeError
+LayoutTests/fast/css/insertRule-media_t01: RuntimeError
+LayoutTests/fast/css/invalid-predefined-color_t01: RuntimeError
+LayoutTests/fast/css/invalidation/dynamic-selector-list-pseudo_t01: RuntimeError
+LayoutTests/fast/css/invalidation/targeted-class-host-pseudo_t01: RuntimeError
+LayoutTests/fast/css/invalidation/toggle-style-inside-shadow-root_t01: RuntimeError
+LayoutTests/fast/css/link-alternate-stylesheet-1_t01: RuntimeError
+LayoutTests/fast/css/media-query-recovery_t01: RuntimeError
+LayoutTests/fast/css/modify-ua-rules-from-javascript_t01: RuntimeError
+LayoutTests/fast/css/nested-at-rules_t01: RuntimeError
+LayoutTests/fast/css/overflow-property_t01: RuntimeError
+LayoutTests/fast/css/padding-start-end_t01: RuntimeError
+LayoutTests/fast/css/parsing-page-rule_t01: RuntimeError
+LayoutTests/fast/css/percent-min-width-img-src-change_t01: Timeout
+LayoutTests/fast/css/pseudo-required-optional-004_t01: RuntimeError
+LayoutTests/fast/css/pseudo-required-optional-005_t01: RuntimeError
+LayoutTests/fast/css/pseudo-required-optional-unapplied_t01: RuntimeError
+LayoutTests/fast/css/pseudo-target-indirect-sibling-001_t01: Timeout
+LayoutTests/fast/css/pseudo-target-indirect-sibling-002_t01: Timeout
+LayoutTests/fast/css/readonly-pseudoclass-opera-003_t01: RuntimeError
+LayoutTests/fast/css/readonly-pseudoclass-opera-004_t01: RuntimeError
+LayoutTests/fast/css/readonly-pseudoclass-opera-005_t01: RuntimeError
+LayoutTests/fast/css/sheet-collection-link_t01: RuntimeError
+LayoutTests/fast/css/shorthand-setProperty-important_t01: RuntimeError
+LayoutTests/fast/css/space-before-charset-external_t01: RuntimeError
+LayoutTests/fast/css/style-element-process-crash_t01: Timeout
+LayoutTests/fast/css/style-scoped/style-scoped-scoping-nodes-different-order_t01: RuntimeError
+LayoutTests/fast/css/style-scoped/style-scoped-shadow-crash_t01: RuntimeError
+LayoutTests/fast/css/style-scoped/style-scoped-with-dom-operation_t01: RuntimeError
+LayoutTests/fast/css/style-scoped/style-scoped-with-important-rule_t01: RuntimeError
+LayoutTests/fast/css/stylesheet-enable-first-alternate-link_t01: RuntimeError
+LayoutTests/fast/css/stylesheet-enable-first-alternate-on-load-sheet_t01: RuntimeError
+LayoutTests/fast/css/text-align-webkit-match-parent_t01: RuntimeError
+LayoutTests/fast/css/unicode-bidi-computed-value_t01: RuntimeError
+LayoutTests/fast/css/webkit-color-adjust_t01: RuntimeError
+LayoutTests/fast/css/word-break-user-modify-allowed-values_t01: RuntimeError
+LayoutTests/fast/css/zoom-property-parsing_t01: RuntimeError
+LayoutTests/fast/css3-text/css3-text-decoration/getComputedStyle/getComputedStyle-text-decoration-line_t01: RuntimeError
+LayoutTests/fast/css3-text/css3-text-decoration/getComputedStyle/getComputedStyle-text-underline-position_t01: RuntimeError
+LayoutTests/fast/css3-text/css3-text-indent/getComputedStyle/getComputedStyle-text-indent-inherited_t01: RuntimeError
+LayoutTests/fast/dom/DOMImplementation/createDocument-namespace-err_t01: RuntimeError
+LayoutTests/fast/dom/Document/CaretRangeFromPoint/caretRangeFromPoint-in-strict-mode-wtih-checkbox_t01: RuntimeError
+LayoutTests/fast/dom/Document/CaretRangeFromPoint/caretRangeFromPoint-in-user-select-none_t01: RuntimeError
+LayoutTests/fast/dom/Document/CaretRangeFromPoint/caretRangeFromPoint-in-zoom-and-scroll_t01: RuntimeError
+LayoutTests/fast/dom/Document/CaretRangeFromPoint/caretRangeFromPoint-with-first-letter-style_t01: RuntimeError
+LayoutTests/fast/dom/Document/createElement-valid-names_t01: RuntimeError
+LayoutTests/fast/dom/Element/attribute-uppercase_t01: RuntimeError
+LayoutTests/fast/dom/Element/client-rect-list-argument_t01: RuntimeError
+LayoutTests/fast/dom/Element/getClientRects_t01: RuntimeError
+LayoutTests/fast/dom/Element/id-in-insert-hr_t01: RuntimeError
+LayoutTests/fast/dom/Element/offsetTop-table-cell_t01: RuntimeError
+LayoutTests/fast/dom/Element/scrollWidth_t01: RuntimeError
+LayoutTests/fast/dom/HTMLAnchorElement/remove-href-from-focused-anchor_t01: Timeout, Pass
+LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-host_t01: RuntimeError
+LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-pathname_t01: RuntimeError
+LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-port_t01: RuntimeError
+LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-protocol_t01: RuntimeError
+LayoutTests/fast/dom/HTMLBaseElement/href-attribute-resolves-with-respect-to-document_t01: RuntimeError
+LayoutTests/fast/dom/HTMLButtonElement/value/getset_t01: RuntimeError
+LayoutTests/fast/dom/HTMLDialogElement/dialog-close-event_t01: RuntimeError
+LayoutTests/fast/dom/HTMLDialogElement/dialog-open_t01: RuntimeError
+LayoutTests/fast/dom/HTMLDialogElement/dialog-return-value_t01: RuntimeError
+LayoutTests/fast/dom/HTMLDialogElement/dialog-scrolled-viewport_t01: RuntimeError
+LayoutTests/fast/dom/HTMLDialogElement/inert-node-is-unselectable_t01: RuntimeError
+LayoutTests/fast/dom/HTMLDialogElement/multiple-centered-dialogs_t01: RuntimeError
+LayoutTests/fast/dom/HTMLDialogElement/submit-dialog-close-event_t01: RuntimeError
+LayoutTests/fast/dom/HTMLDialogElement/synthetic-click-inert_t01: RuntimeError
+LayoutTests/fast/dom/HTMLDialogElement/top-layer-position-relative_t01: RuntimeError
+LayoutTests/fast/dom/HTMLDialogElement/top-layer-position-static_t01: RuntimeError
+LayoutTests/fast/dom/HTMLDocument/active-element-gets-unforcusable_t01: Timeout, RuntimeError
+LayoutTests/fast/dom/HTMLDocument/set-focus-on-valid-element_t01: Timeout
+LayoutTests/fast/dom/HTMLElement/attr-dir-auto-change-before-text-node_t01: RuntimeError
+LayoutTests/fast/dom/HTMLElement/attr-dir-auto-change-child-node_t01: RuntimeError
+LayoutTests/fast/dom/HTMLElement/attr-dir-auto-change-text-form-control_t01: RuntimeError
+LayoutTests/fast/dom/HTMLElement/attr-dir-auto-change-text_t01: RuntimeError
+LayoutTests/fast/dom/HTMLElement/attr-dir-auto-children_t01: RuntimeError
+LayoutTests/fast/dom/HTMLElement/attr-dir-auto-remove-add-children_t01: RuntimeError
+LayoutTests/fast/dom/HTMLElement/attr-dir-auto_t01: RuntimeError
+LayoutTests/fast/dom/HTMLElement/attr-empty-string_t01: RuntimeError
+LayoutTests/fast/dom/HTMLElement/attr-false-string_t01: RuntimeError
+LayoutTests/fast/dom/HTMLElement/attr-missing-ancestor-true_t01: RuntimeError
+LayoutTests/fast/dom/HTMLElement/attr-missing-parent-ancestor-missing_t01: RuntimeError
+LayoutTests/fast/dom/HTMLElement/attr-missing-parent-false_t01: RuntimeError
+LayoutTests/fast/dom/HTMLElement/attr-missing-parent-true_t01: RuntimeError
+LayoutTests/fast/dom/HTMLElement/set-inherit-parent-false_t01: RuntimeError
+LayoutTests/fast/dom/HTMLElement/set-inherit-parent-true_t01: RuntimeError
+LayoutTests/fast/dom/HTMLElement/set-invalid-value_t01: RuntimeError
+LayoutTests/fast/dom/HTMLElement/set-true_t01: RuntimeError
+LayoutTests/fast/dom/HTMLElement/translate_t01: RuntimeError
+LayoutTests/fast/dom/HTMLImageElement/image-alt-text_t01: RuntimeError
+LayoutTests/fast/dom/HTMLImageElement/image-natural-width-height_t01: Timeout
+LayoutTests/fast/dom/HTMLImageElement/parse-src_t01: RuntimeError
+LayoutTests/fast/dom/HTMLInputElement/input-image-alt-text_t01: RuntimeError
+LayoutTests/fast/dom/HTMLLabelElement/click-label_t01: RuntimeError
+LayoutTests/fast/dom/HTMLLabelElement/form/test1_t01: RuntimeError
+LayoutTests/fast/dom/HTMLLinkElement/link-and-subresource-test_t01: Timeout
+LayoutTests/fast/dom/HTMLLinkElement/link-beforeload-recursive_t01: Timeout
+LayoutTests/fast/dom/HTMLLinkElement/link-onerror-stylesheet-with-non-existent-import_t01: RuntimeError
+LayoutTests/fast/dom/HTMLLinkElement/link-onload-before-page-load_t01: RuntimeError
+LayoutTests/fast/dom/HTMLLinkElement/link-onload-stylesheet-with-import_t01: RuntimeError
+LayoutTests/fast/dom/HTMLLinkElement/link-onload2_t01: RuntimeError
+LayoutTests/fast/dom/HTMLLinkElement/prefetch-onload_t01: Timeout
+LayoutTests/fast/dom/HTMLLinkElement/prefetch_t01: Timeout
+LayoutTests/fast/dom/HTMLMeterElement/set-meter-properties_t01: RuntimeError
+LayoutTests/fast/dom/HTMLObjectElement/beforeload-set-text-crash_t01: Timeout
+LayoutTests/fast/dom/HTMLOptionElement/collection-setter-getter_t01: RuntimeError
+LayoutTests/fast/dom/HTMLOutputElement/htmloutputelement-validity_t01: RuntimeError
+LayoutTests/fast/dom/HTMLProgressElement/indeterminate-progress-002_t01: RuntimeError
+LayoutTests/fast/dom/HTMLProgressElement/set-progress-properties_t01: RuntimeError
+LayoutTests/fast/dom/HTMLScriptElement/async-false-inside-async-false-load_t01: Timeout
+LayoutTests/fast/dom/HTMLScriptElement/async-onbeforeload_t01: Timeout
+LayoutTests/fast/dom/HTMLScriptElement/defer-inline-script_t01: RuntimeError
+LayoutTests/fast/dom/HTMLScriptElement/defer-onbeforeload_t01: Timeout
+LayoutTests/fast/dom/HTMLScriptElement/defer-script-invalid-url_t01: Timeout
+LayoutTests/fast/dom/HTMLScriptElement/dont-load-unknown-type_t01: Timeout
+LayoutTests/fast/dom/HTMLScriptElement/remove-in-beforeload_t01: Timeout
+LayoutTests/fast/dom/HTMLScriptElement/remove-source_t01: Timeout
+LayoutTests/fast/dom/HTMLScriptElement/script-for-attribute-unexpected-execution_t01: Timeout
+LayoutTests/fast/dom/HTMLScriptElement/script-reexecution_t01: Timeout
+LayoutTests/fast/dom/HTMLScriptElement/script-set-src_t01: Timeout
+LayoutTests/fast/dom/HTMLStyleElement/style-onerror-with-existent-and-non-existent-import_t01: RuntimeError
+LayoutTests/fast/dom/HTMLTableElement/cellpadding-attribute_t01: RuntimeError
+LayoutTests/fast/dom/HTMLTableElement/insert-row_t01: RuntimeError
+LayoutTests/fast/dom/HTMLTableSectionElement/rows_t01: RuntimeError
+LayoutTests/fast/dom/HTMLTemplateElement/cycles-in-shadow_t01: RuntimeError
+LayoutTests/fast/dom/HTMLTemplateElement/innerHTML-inert_t01: Timeout
+LayoutTests/fast/dom/HTMLTemplateElement/xhtml-parsing-and-serialization_t01: RuntimeError
+LayoutTests/fast/dom/MutationObserver/added-out-of-order_t01: RuntimeError
+LayoutTests/fast/dom/MutationObserver/removed-out-of-order_t01: RuntimeError
+LayoutTests/fast/dom/MutationObserver/weak-callback-gc-crash_t01: RuntimeError
+LayoutTests/fast/dom/Range/bug-19527_t01: RuntimeError
+LayoutTests/fast/dom/Range/getClientRects-character_t01: RuntimeError
+LayoutTests/fast/dom/Range/range-created-during-remove-children_t01: RuntimeError
+LayoutTests/fast/dom/Range/range-detached-exceptions_t01: RuntimeError
+LayoutTests/fast/dom/Range/range-insertNode-assertion_t01: RuntimeError
+LayoutTests/fast/dom/Range/range-insertNode-splittext_t01: RuntimeError
+LayoutTests/fast/dom/StyleSheet/detached-shadow-style_t01: RuntimeError
+LayoutTests/fast/dom/StyleSheet/detached-style_t01: RuntimeError
+LayoutTests/fast/dom/StyleSheet/empty-shadow-style_t01: RuntimeError
+LayoutTests/fast/dom/anchor-origin_t01: RuntimeError
+LayoutTests/fast/dom/characterdata-api-arguments_t01: RuntimeError
+LayoutTests/fast/dom/containerNode_t01: Timeout
+LayoutTests/fast/dom/css-cached-import-rule_t01: RuntimeError
+LayoutTests/fast/dom/css-delete-doc_t01: RuntimeError
+LayoutTests/fast/dom/css-innerHTML_t01: RuntimeError
+LayoutTests/fast/dom/css-insert-import-rule-twice_t01: RuntimeError
+LayoutTests/fast/dom/css-insert-import-rule_t01: RuntimeError
+LayoutTests/fast/dom/css-mediarule-functions_t01: RuntimeError
+LayoutTests/fast/dom/css-selectorText_t01: RuntimeError, Pass
+LayoutTests/fast/dom/css-shorthand-common-value_t01: RuntimeError
+LayoutTests/fast/dom/cssTarget-crash_t01: RuntimeError, Pass
+LayoutTests/fast/dom/custom/attribute-changed-callback_t01: RuntimeError
+LayoutTests/fast/dom/custom/created-callback_t01: RuntimeError
+LayoutTests/fast/dom/custom/invalid-type-extension-crash_t01: RuntimeError
+LayoutTests/fast/dom/custom/lifecycle-created-createElement-recursion_t01: RuntimeError
+LayoutTests/fast/dom/custom/unresolved-pseudoclass_t01: RuntimeError
+LayoutTests/fast/dom/custom/upgrade-candidate-remove-crash_t01: RuntimeError
+LayoutTests/fast/dom/dom-parse-serialize-xmldecl_t01: RuntimeError
+LayoutTests/fast/dom/domparser-parsefromstring-mimetype-support_t01: RuntimeError
+LayoutTests/fast/dom/empty-hash-and-search_t01: RuntimeError
+LayoutTests/fast/dom/focus-contenteditable_t01: RuntimeError, Pass
+LayoutTests/fast/dom/gc-image-element-2_t01: Timeout
+LayoutTests/fast/dom/gc-image-element_t01: Timeout
+LayoutTests/fast/dom/getElementsByClassName/010_t01: RuntimeError
+LayoutTests/fast/dom/getElementsByClassName/011_t01: RuntimeError
+LayoutTests/fast/dom/horizontal-scrollbar-in-rtl-doesnt-fire-onscroll_t01: RuntimeError
+LayoutTests/fast/dom/horizontal-scrollbar-in-rtl_t01: RuntimeError
+LayoutTests/fast/dom/horizontal-scrollbar-when-dir-change_t01: RuntimeError
+LayoutTests/fast/dom/image-object_t01: Timeout
+LayoutTests/fast/dom/javascript-backslash_t01: RuntimeError
+LayoutTests/fast/dom/length-attribute-mapping_t01: RuntimeError
+LayoutTests/fast/dom/location-hash_t01: RuntimeError
+LayoutTests/fast/dom/navigator-userAgent_t01: RuntimeError
+LayoutTests/fast/dom/non-styled-element-id-crash_t01: RuntimeError
+LayoutTests/fast/dom/partial-layout-overlay-scrollbars_t01: RuntimeError
+LayoutTests/fast/dom/remove-body-during-body-replacement_t01: Timeout
+LayoutTests/fast/dom/set-innerHTML_t01: RuntimeError
+LayoutTests/fast/dom/shadow/access-document-of-detached-stylesheetlist-crash_t01: RuntimeError
+LayoutTests/fast/dom/shadow/base-in-shadow-tree_t01: RuntimeError
+LayoutTests/fast/dom/shadow/content-element-includer_t01: RuntimeError
+LayoutTests/fast/dom/shadow/content-pseudo-element-dynamic-attribute-change_t01: RuntimeError
+LayoutTests/fast/dom/shadow/content-pseudo-element-relative-selector-css-text_t01: RuntimeError
+LayoutTests/fast/dom/shadow/content-pseudo-element-with-host-pseudo-class_t01: RuntimeError
+LayoutTests/fast/dom/shadow/distribution-for-event-path_t01: RuntimeError
+LayoutTests/fast/dom/shadow/elementfrompoint_t01: RuntimeError
+LayoutTests/fast/dom/shadow/elements-in-frameless-document_t01: RuntimeError
+LayoutTests/fast/dom/shadow/getComputedStyle-composed-parent-dirty_t01: RuntimeError
+LayoutTests/fast/dom/shadow/getelementbyid-in-orphan_t01: RuntimeError
+LayoutTests/fast/dom/shadow/insertion-point-shadow-crash_t01: RuntimeError
+LayoutTests/fast/dom/shadow/insertion-point-video-crash_t01: RuntimeError
+LayoutTests/fast/dom/shadow/link-in-shadow-tree_t01: RuntimeError
+LayoutTests/fast/dom/shadow/offsetWidth-host-style-change_t01: RuntimeError
+LayoutTests/fast/dom/shadow/olderShadowRoot_t01: RuntimeError
+LayoutTests/fast/dom/shadow/pseudoclass-update-checked-option_t01: RuntimeError
+LayoutTests/fast/dom/shadow/pseudoclass-update-disabled-optgroup_t01: RuntimeError
+LayoutTests/fast/dom/shadow/pseudoclass-update-disabled-option_t01: RuntimeError
+LayoutTests/fast/dom/shadow/shadow-content-crash_t01: RuntimeError
+LayoutTests/fast/dom/shadow/shadow-disable_t01: RuntimeError
+LayoutTests/fast/dom/shadow/shadow-hierarchy-exception_t01: RuntimeError
+LayoutTests/fast/dom/shadow/shadow-removechild-and-blur-event_t01: RuntimeError
+LayoutTests/fast/dom/shadow/shadow-root-node-list_t01: RuntimeError
+LayoutTests/fast/dom/shadow/shadow-root-text-child_t01: RuntimeError
+LayoutTests/fast/dom/shadow/shadow-ul-li_t01: RuntimeError
+LayoutTests/fast/dom/shadow/shadowdom-for-input-type-change_t01: RuntimeError
+LayoutTests/fast/dom/shadow/shadowroot-host_t01: RuntimeError
+LayoutTests/fast/dom/shadow/sibling-rules-dynamic-changes_t01: RuntimeError
+LayoutTests/fast/dom/shadow/stale-distribution-after-shadow-removal_t01: RuntimeError
+LayoutTests/fast/dynamic/checkbox-selection-crash_t01: RuntimeError
+LayoutTests/fast/dynamic/crash-generated-counter_t01: RuntimeError
+LayoutTests/fast/dynamic/crash-generated-image_t01: RuntimeError
+LayoutTests/fast/dynamic/crash-generated-text_t01: RuntimeError
+LayoutTests/fast/events/change-overflow-on-overflow-change_t01: Timeout
+LayoutTests/fast/events/clipboard-clearData_t01: Timeout
+LayoutTests/fast/events/clipboard-dataTransferItemList_t01: Timeout
+LayoutTests/fast/events/event-creation_t01: RuntimeError
+LayoutTests/fast/events/event-listener-html-non-html-confusion_t01: RuntimeError
+LayoutTests/fast/events/event-on-xhr-document_t01: RuntimeError
+LayoutTests/fast/events/fire-scroll-event_t01: RuntimeError, Timeout
+LayoutTests/fast/events/init-message-event_t01: RuntimeError
+LayoutTests/fast/events/input-focus-no-duplicate-events_t01: RuntimeError, Pass
+LayoutTests/fast/events/invalid-002_t01: RuntimeError
+LayoutTests/fast/events/invalid-003_t01: RuntimeError
+LayoutTests/fast/events/mutation-during-replace-child_t01: RuntimeError
+LayoutTests/fast/events/nested-event-remove-node-crash_t01: Timeout
+LayoutTests/fast/events/overflowchanged-event-raf-timing_t01: RuntimeError
+LayoutTests/fast/events/scoped/editing-commands_t01: RuntimeError
+LayoutTests/fast/events/scroll-event-phase_t01: Timeout, Pass
+LayoutTests/fast/events/selectstart-on-selectall_t01: RuntimeError
+LayoutTests/fast/events/tabindex-removal-from-focused-element_t01: RuntimeError
+LayoutTests/fast/exclusions/parsing/parsing-wrap-through_t01: RuntimeError
+LayoutTests/fast/files/blob-close-read_t01: RuntimeError
+LayoutTests/fast/files/blob-constructor_t01: RuntimeError
+LayoutTests/fast/files/read-blob-as-array-buffer_t01: RuntimeError
+LayoutTests/fast/filesystem/async-operations_t01: RuntimeError
+LayoutTests/fast/filesystem/directory-entry-to-uri_t01: RuntimeError
+LayoutTests/fast/filesystem/file-after-reload-crash_t01: RuntimeError
+LayoutTests/fast/filesystem/file-entry-to-uri_t01: RuntimeError
+LayoutTests/fast/filesystem/file-metadata-after-write_t01: RuntimeError
+LayoutTests/fast/filesystem/file-writer-abort-continue_t01: RuntimeError
+LayoutTests/fast/filesystem/file-writer-events_t01: RuntimeError
+LayoutTests/fast/filesystem/file-writer-truncate-extend_t01: RuntimeError
+LayoutTests/fast/filesystem/file-writer-write-overlapped_t01: RuntimeError
+LayoutTests/fast/filesystem/filesystem-unserializable_t01: RuntimeError
+LayoutTests/fast/filesystem/filesystem-uri-origin_t01: RuntimeError
+LayoutTests/fast/filesystem/op-copy_t01: RuntimeError
+LayoutTests/fast/filesystem/op-get-metadata_t01: RuntimeError
+LayoutTests/fast/filesystem/op-get-parent_t01: RuntimeError
+LayoutTests/fast/filesystem/op-read-directory_t01: RuntimeError
+LayoutTests/fast/filesystem/op-restricted-chars_t01: RuntimeError
+LayoutTests/fast/filesystem/op-restricted-names_t01: RuntimeError
+LayoutTests/fast/filesystem/read-directory_t01: RuntimeError
+LayoutTests/fast/filesystem/simple-readonly-file-object_t01: RuntimeError
+LayoutTests/fast/filesystem/simple-temporary_t01: RuntimeError
+LayoutTests/fast/filesystem/snapshot-file-with-gc_t01: RuntimeError
+LayoutTests/fast/forms/ValidityState-customError_t01: RuntimeError
+LayoutTests/fast/forms/ValidityState-tooLong-textarea_t01: RuntimeError
+LayoutTests/fast/forms/ValidityState-typeMismatch-email_t01: RuntimeError
+LayoutTests/fast/forms/ValidityState-typeMismatch-url_t01: RuntimeError
+LayoutTests/fast/forms/ValidityState-valueMissing-004_t01: RuntimeError
+LayoutTests/fast/forms/autocomplete_t01: RuntimeError
+LayoutTests/fast/forms/autofocus-focus-only-once_t01: Timeout
+LayoutTests/fast/forms/autofocus-input-css-style-change_t01: Timeout
+LayoutTests/fast/forms/autofocus-opera-004_t01: RuntimeError
+LayoutTests/fast/forms/autofocus-opera-007_t01: Timeout
+LayoutTests/fast/forms/autofocus-readonly-attribute_t01: Timeout
+LayoutTests/fast/forms/button/button-disabled-blur_t01: RuntimeError
+LayoutTests/fast/forms/date-multiple-fields/date-multiple-fields-onblur-setvalue-onfocusremoved_t01: RuntimeError, Pass
+LayoutTests/fast/forms/date/ValidityState-typeMismatch-date_t01: RuntimeError
+LayoutTests/fast/forms/date/date-interactive-validation-required_t01: RuntimeError, Pass
+LayoutTests/fast/forms/date/date-pseudo-classes_t01: RuntimeError
+LayoutTests/fast/forms/date/input-date-validation-message_t01: RuntimeError
+LayoutTests/fast/forms/datetimelocal/datetimelocal-input-type_t01: RuntimeError
+LayoutTests/fast/forms/datetimelocal/input-valueasdate-datetimelocal_t01: RuntimeError
+LayoutTests/fast/forms/datetimelocal/input-valueasnumber-datetimelocal_t01: RuntimeError
+LayoutTests/fast/forms/fieldset/fieldset-disabled_t01: RuntimeError
+LayoutTests/fast/forms/focus-style-pending_t01: Timeout, Pass
+LayoutTests/fast/forms/focus_t01: RuntimeError
+LayoutTests/fast/forms/form-attribute-nonexistence-form-id_t01: RuntimeError
+LayoutTests/fast/forms/formmethod-attribute-button-html_t01: RuntimeError, Pass
+LayoutTests/fast/forms/formmethod-attribute-input-2_t01: RuntimeError, Pass
+LayoutTests/fast/forms/incremental-dom-property_t01: RuntimeError
+LayoutTests/fast/forms/input-appearance-elementFromPoint_t01: RuntimeError
+LayoutTests/fast/forms/input-appearance-maxlength_t01: RuntimeError
+LayoutTests/fast/forms/input-changing-value_t01: RuntimeError
+LayoutTests/fast/forms/input-file-set-value_t01: RuntimeError
+LayoutTests/fast/forms/input-implicit-length-limit_t01: RuntimeError
+LayoutTests/fast/forms/input-inputmode_t01: RuntimeError
+LayoutTests/fast/forms/input-maxlength-unsupported_t01: RuntimeError
+LayoutTests/fast/forms/input-type-change_t01: RuntimeError
+LayoutTests/fast/forms/input-value-sanitization_t01: RuntimeError
+LayoutTests/fast/forms/input-width-height-attributes_t01: RuntimeError
+LayoutTests/fast/forms/listbox-select-all_t01: RuntimeError
+LayoutTests/fast/forms/listbox-selection-2_t01: RuntimeError
+LayoutTests/fast/forms/missing-action_t01: RuntimeError, Pass
+LayoutTests/fast/forms/onchange-change-type_t01: RuntimeError
+LayoutTests/fast/forms/option-change-single-selected_t01: RuntimeError
+LayoutTests/fast/forms/option-strip-unicode-spaces_t01: RuntimeError
+LayoutTests/fast/forms/parser-associated-form-removal_t01: RuntimeError
+LayoutTests/fast/forms/paste-into-textarea_t01: RuntimeError
+LayoutTests/fast/forms/plaintext-mode-1_t01: RuntimeError
+LayoutTests/fast/forms/select-change-popup-to-listbox-in-event-handler_t01: Timeout
+LayoutTests/fast/forms/select-clientheight-large-size_t01: RuntimeError
+LayoutTests/fast/forms/selection-direction_t01: RuntimeError
+LayoutTests/fast/forms/selection-wrongtype_t01: RuntimeError
+LayoutTests/fast/forms/shadow-tree-exposure_t01: RuntimeError
+LayoutTests/fast/forms/submit-form-with-dirname-attribute-with-ancestor-dir-attribute_t01: RuntimeError, Pass
+LayoutTests/fast/forms/submit-form-with-dirname-attribute_t01: RuntimeError, Pass
+LayoutTests/fast/forms/textarea-paste-newline_t01: RuntimeError
+LayoutTests/fast/forms/textarea-set-defaultvalue-after-value_t01: RuntimeError
+LayoutTests/fast/forms/textarea-submit-crash_t01: RuntimeError, Pass
+LayoutTests/fast/forms/textarea-trailing-newline_t01: RuntimeError
+LayoutTests/fast/forms/textfield-focus-out_t01: Timeout, Pass
+LayoutTests/fast/forms/validationMessage_t01: RuntimeError
+LayoutTests/fast/forms/willvalidate_t01: RuntimeError
+LayoutTests/fast/html/adjacent-html-context-element_t01: RuntimeError
+LayoutTests/fast/html/article-element_t01: RuntimeError
+LayoutTests/fast/html/details-add-child-2_t01: RuntimeError
+LayoutTests/fast/html/details-add-details-child-1_t01: RuntimeError
+LayoutTests/fast/html/details-add-details-child-2_t01: RuntimeError
+LayoutTests/fast/html/details-click-controls_t01: RuntimeError
+LayoutTests/fast/html/figure-element_t01: RuntimeError
+LayoutTests/fast/html/header-element_t01: RuntimeError
+LayoutTests/fast/html/hgroup-element_t01: RuntimeError
+LayoutTests/fast/html/hidden-attr_t01: RuntimeError
+LayoutTests/fast/html/imports/import-element-removed-flag_t01: Timeout
+LayoutTests/fast/html/main-element_t01: RuntimeError
+LayoutTests/fast/html/select-dropdown-consistent-background-color_t01: RuntimeError
+LayoutTests/fast/inline/boundingBox-with-continuation_t01: RuntimeError
+LayoutTests/fast/inline/inline-position-top-align_t01: RuntimeError
+LayoutTests/fast/inline/parent-inline-element-padding-contributes-width_t01: RuntimeError
+LayoutTests/fast/inline/positioned-element-padding-contributes-width_t01: RuntimeError
+LayoutTests/fast/innerHTML/javascript-url_t01: RuntimeError
+LayoutTests/fast/lists/marker-preferred-margins_t01: RuntimeError
+LayoutTests/fast/loader/about-blank-hash-change_t01: RuntimeError
+LayoutTests/fast/loader/about-blank-hash-kept_t01: RuntimeError
+LayoutTests/fast/loader/local-css-allowed-in-strict-mode_t01: RuntimeError
+LayoutTests/fast/loader/onhashchange-attribute-listeners_t01: Timeout
+LayoutTests/fast/loader/scroll-position-restored-on-back_t01: Timeout
+LayoutTests/fast/masking/parsing-clip-path-shape_t01: RuntimeError
+LayoutTests/fast/masking/parsing-mask_t01: RuntimeError
+LayoutTests/fast/media/invalid-lengths_t01: RuntimeError
+LayoutTests/fast/media/matchmedium-query-api_t01: RuntimeError
+LayoutTests/fast/media/media-query-list-syntax_t01: RuntimeError
+LayoutTests/fast/media/mq-append-delete_t01: RuntimeError
+LayoutTests/fast/mediastream/RTCPeerConnection-AddRemoveStream_t01: RuntimeError
+LayoutTests/fast/mediastream/RTCPeerConnection_t01: RuntimeError
+LayoutTests/fast/multicol/break-after-always-bottom-margin_t01: RuntimeError
+LayoutTests/fast/multicol/cssom-view_t01: RuntimeError
+LayoutTests/fast/multicol/float-truncation_t01: RuntimeError
+LayoutTests/fast/multicol/gap-non-negative_t01: RuntimeError
+LayoutTests/fast/multicol/hit-test-end-of-column_t01: RuntimeError
+LayoutTests/fast/multicol/hit-test-float_t01: RuntimeError
+LayoutTests/fast/multicol/hit-test-gap-between-pages-flipped_t01: RuntimeError
+LayoutTests/fast/multicol/image-inside-nested-blocks-with-border_t01: RuntimeError
+LayoutTests/fast/multicol/inline-getclientrects_t01: RuntimeError
+LayoutTests/fast/multicol/vertical-lr/float-truncation_t01: RuntimeError
+LayoutTests/fast/multicol/vertical-rl/float-truncation_t01: RuntimeError
+LayoutTests/fast/multicol/widows_t01: RuntimeError
+LayoutTests/fast/multicol/zeroColumnCount_t01: RuntimeError
+LayoutTests/fast/overflow/scrollbar-restored_t01: RuntimeError
+LayoutTests/fast/parser/fragment-parser-doctype_t01: RuntimeError
+LayoutTests/fast/parser/stray-param_t01: RuntimeError
+LayoutTests/fast/parser/strict-img-in-map_t01: RuntimeError
+LayoutTests/fast/replaced/available-height-for-content_t01: RuntimeError
+LayoutTests/fast/replaced/container-width-zero_t01: RuntimeError
+LayoutTests/fast/replaced/table-percent-height_t01: RuntimeError
+LayoutTests/fast/replaced/table-percent-width_t01: RuntimeError
+LayoutTests/fast/ruby/ruby-line-height_t01: RuntimeError
+LayoutTests/fast/scrolling/scroll-element-into-view_t01: RuntimeError
+LayoutTests/fast/shapes/parsing/parsing-shape-margin_t01: RuntimeError, Pass
+LayoutTests/fast/shapes/parsing/parsing-shape-outside-none_t01: RuntimeError, Pass
+LayoutTests/fast/shapes/shape-outside-floats/shape-outside-floats-inset-rounded-different-writing-modes-left_t01: RuntimeError
+LayoutTests/fast/shapes/shape-outside-floats/shape-outside-rounded-boxes_t01: RuntimeError
+LayoutTests/fast/shapes/shape-outside-floats/shape-outside-rounded-boxes_t02: RuntimeError
+LayoutTests/fast/speechsynthesis/speech-synthesis-boundary-events_t01: Timeout
+LayoutTests/fast/speechsynthesis/speech-synthesis-cancel_t01: Timeout, RuntimeError
+LayoutTests/fast/speechsynthesis/speech-synthesis-pause-resume_t01: Timeout
+LayoutTests/fast/speechsynthesis/speech-synthesis-speak_t01: Timeout
+LayoutTests/fast/storage/storage-disallowed-in-data-url_t01: RuntimeError
+LayoutTests/fast/svg/whitespace-angle_t01: RuntimeError
+LayoutTests/fast/svg/whitespace-length_t01: RuntimeError
+LayoutTests/fast/svg/whitespace-number_t01: RuntimeError
+LayoutTests/fast/table/incorrect-colgroup-span-values_t01: RuntimeError
+LayoutTests/fast/table/min-width-css-block-table_t01: RuntimeError
+LayoutTests/fast/table/table-size-integer-overflow_t01: RuntimeError
+LayoutTests/fast/table/td-bordercolor-attribute_t01: RuntimeError
+LayoutTests/fast/text/find-kana_t01: RuntimeError
+LayoutTests/fast/text/find-russian_t01: RuntimeError
+LayoutTests/fast/text/find-soft-hyphen_t01: RuntimeError
+LayoutTests/fast/text/international/iso-8859-8_t01: RuntimeError
+LayoutTests/fast/text/line-break-after-empty-inline-hebrew_t01: RuntimeError
+LayoutTests/fast/text/line-break-after-inline-latin1_t01: RuntimeError
+LayoutTests/fast/text/multiglyph-characters_t01: RuntimeError
+LayoutTests/fast/text/offsetForPosition-cluster-at-zero_t01: RuntimeError
+LayoutTests/fast/text/sub-pixel/text-scaling-ltr_t01: RuntimeError
+LayoutTests/fast/text/sub-pixel/text-scaling-vertical_t01: RuntimeError
+LayoutTests/fast/text/sub-pixel/text-scaling-webfont_t01: RuntimeError
+LayoutTests/fast/text/window-find_t01: RuntimeError
+LayoutTests/fast/text/zero-width-characters-complex-script_t01: RuntimeError
+LayoutTests/fast/url/anchor_t01: RuntimeError
+LayoutTests/fast/url/file-http-base_t01: RuntimeError
+LayoutTests/fast/url/file_t01: RuntimeError
+LayoutTests/fast/url/host-lowercase-per-scheme_t01: RuntimeError
+LayoutTests/fast/url/idna2003_t01: RuntimeError
+LayoutTests/fast/url/idna2008_t01: RuntimeError
+LayoutTests/fast/url/invalid-urls-utf8_t01: RuntimeError
+LayoutTests/fast/url/ipv4_t01: RuntimeError
+LayoutTests/fast/url/ipv6_t01: RuntimeError
+LayoutTests/fast/url/mailto_t01: RuntimeError, Pass
+LayoutTests/fast/url/path_t01: RuntimeError
+LayoutTests/fast/url/query_t01: RuntimeError
+LayoutTests/fast/url/relative-win_t01: RuntimeError
+LayoutTests/fast/url/relative_t01: RuntimeError
+LayoutTests/fast/url/segments_t01: RuntimeError
+LayoutTests/fast/url/standard-url_t01: RuntimeError
+LayoutTests/fast/writing-mode/flipped-blocks-hit-test-overflow_t01: RuntimeError
+LayoutTests/fast/writing-mode/flipped-blocks-text-map-local-to-container_t01: RuntimeError
+LayoutTests/fast/writing-mode/positionForPoint_t01: RuntimeError
+LayoutTests/fast/writing-mode/table-hit-test_t01: RuntimeError
+LayoutTests/fast/writing-mode/vertical-inline-block-hittest_t01: RuntimeError
+LayoutTests/fast/xmlhttprequest/xmlhttprequest-responseXML-html-document-responsetype-quirks_t01: RuntimeError
+LayoutTests/fast/xmlhttprequest/xmlhttprequest-responseXML-xml-text-responsetype_t01: RuntimeError
+LayoutTests/fast/xpath/4XPath/Borrowed/od_20000608_t01: RuntimeError
+LayoutTests/fast/xpath/4XPath/Core/test_node_test_t02: RuntimeError
+LayoutTests/fast/xpath/4XPath/Core/test_parser_t01: RuntimeError
+LayoutTests/fast/xpath/ambiguous-operators_t01: RuntimeError
+LayoutTests/fast/xpath/ensure-null-namespace_t01: RuntimeError
+LayoutTests/fast/xpath/implicit-node-args_t01: RuntimeError
+LayoutTests/fast/xpath/node-name-case-sensitivity_t02: RuntimeError
+LayoutTests/fast/xpath/py-dom-xpath/expressions_t01: RuntimeError
+LayoutTests/fast/xsl/default-html_t01: RuntimeError
+LibTest/async/Future/asStream_A01_t02: RuntimeError
+LibTest/async/Stream/Stream.fromFutures_A04_t01: RuntimeError
+LibTest/async/Stream/Stream.fromFutures_A04_t02: RuntimeError
+LibTest/async/Stream/Stream.fromIterable_A02_t01: RuntimeError
+LibTest/async/Stream/Stream.fromIterable_A03_t01: RuntimeError, Timeout, Pass
+LibTest/async/Stream/Stream.fromIterable_A03_t02: RuntimeError
+LibTest/async/Stream/Stream.periodic_A04_t02: RuntimeError
+LibTest/async/Stream/Stream.periodic_A04_t03: RuntimeError
+LibTest/async/StreamController/StreamController.broadcast_A03_t02: RuntimeError
+LibTest/async/StreamController/StreamController.broadcast_A09_t01: Timeout, Pass
+LibTest/async/StreamController/StreamController.broadcast_A09_t02: RuntimeError
+LibTest/async/StreamController/StreamController.broadcast_A09_t03: RuntimeError
+LibTest/async/StreamController/StreamController.broadcast_A10_t02: RuntimeError
+LibTest/async/StreamController/StreamController.broadcast_A10_t03: RuntimeError
+LibTest/async/StreamController/addStream_A03_t01: RuntimeError
+LibTest/async/StreamController/stream_A02_t01: Timeout, Pass
+LibTest/async/StreamController/stream_A02_t03: RuntimeError
+LibTest/async/StreamController/stream_A03_t01: Timeout, Pass
+LibTest/async/StreamController/stream_A03_t02: RuntimeError
+LibTest/async/StreamSink/addStream_A01_t02: RuntimeError
+LibTest/async/StreamTransformer/StreamTransformer.fromHandlers_A01_t03: RuntimeError
+LibTest/async/Zone/registerBinaryCallback_A01_t01: RuntimeError
+LibTest/collection/DoubleLinkedQueue/fold_A01_t01: RuntimeError
+LibTest/collection/DoubleLinkedQueue/removeWhere_A02_t03: RuntimeError
+LibTest/collection/DoubleLinkedQueue/retainWhere_A02_t02: RuntimeError
+LibTest/collection/HashSet/HashSet_A04_t01: RuntimeError
+LibTest/collection/HashSet/HashSet_class_A01_t01: RuntimeError
+LibTest/collection/IterableBase/IterableBase_class_A01_t02: RuntimeError
+LibTest/collection/IterableMixin/contains_A02_t01: RuntimeError
+LibTest/collection/IterableMixin/every_A01_t02: RuntimeError
+LibTest/collection/IterableMixin/expand_A01_t01: RuntimeError
+LibTest/collection/IterableMixin/expand_A02_t01: RuntimeError
+LibTest/collection/IterableMixin/fold_A01_t01: RuntimeError
+LibTest/collection/LinkedList/addAll_A01_t02: RuntimeError
+LibTest/collection/LinkedList/join_A01_t01: RuntimeError
+LibTest/collection/LinkedList/toString_A03_t01: RuntimeError
+LibTest/collection/LinkedListEntry/LinkedListEntry_class_A03_t01: RuntimeError
+LibTest/collection/LinkedListEntry/insertAfter_A02_t02: RuntimeError
+LibTest/collection/LinkedListEntry/insertBefore_A01_t01: RuntimeError
+LibTest/collection/LinkedListEntry/insertBefore_A01_t02: RuntimeError
+LibTest/collection/LinkedListEntry/list_A01_t01: RuntimeError
+LibTest/collection/LinkedListEntry/next_A01_t02: RuntimeError
+LibTest/collection/LinkedListEntry/next_A01_t03: RuntimeError
+LibTest/collection/LinkedListEntry/previous_A01_t02: RuntimeError
+LibTest/collection/LinkedListEntry/previous_A01_t03: RuntimeError
+LibTest/collection/LinkedListEntry/unlink_A01_t01: RuntimeError
+LibTest/collection/LinkedListEntry/unlink_A02_t02: RuntimeError
+LibTest/collection/ListMixin/ListMixin_class_A01_t01: RuntimeError
+LibTest/collection/ListQueue/ListQueue.from_A01_t01: RuntimeError
+LibTest/convert/LineSplitter/fuse_A01_t01: RuntimeError
+LibTest/core/AssertionError/AssertionError_A01_t01: RuntimeError
+LibTest/core/AssertionError/message_A01_t01: RuntimeError
+LibTest/core/CyclicInitializationError/CyclicInitializationError.class_A01_t01: RuntimeError
+LibTest/core/CyclicInitializationError/variableName_A01_t01: RuntimeError
+LibTest/core/DateTime/DateTime.fromMicrosecondsSinceEpoch_A01_t01: RuntimeError
+LibTest/core/DateTime/microsecond_A01_t01: RuntimeError
+LibTest/core/DateTime/microsecondsSinceEpoch_A01_t01: RuntimeError
+LibTest/core/DateTime/parse_A01_t03: RuntimeError
+LibTest/core/DateTime/to8601String_A01_t01: RuntimeError
+LibTest/core/DateTime/to8601String_A01_t02: RuntimeError
+LibTest/core/Duration/Duration_A01_t01: CompileTimeError
+LibTest/core/Duration/Duration_A02_t01: CompileTimeError
+LibTest/core/Duration/inDays_A01_t01: CompileTimeError
+LibTest/core/Duration/inHours_A01_t01: CompileTimeError
+LibTest/core/Duration/inMicroseconds_A01_t01: CompileTimeError
+LibTest/core/Duration/inMilliseconds_A01_t01: CompileTimeError
+LibTest/core/Duration/inSeconds_A01_t01: CompileTimeError
+LibTest/core/Error/stackTrace_A01_t01: RuntimeError
+LibTest/core/Expando/operator_square_brackets_A01_t01: RuntimeError
+LibTest/core/Expando/operator_square_brackets_A01_t04: RuntimeError
+LibTest/core/Expando/operator_square_brackets_A01_t05: RuntimeError
+LibTest/core/Function/Function_class_A01_t01: RuntimeError
+LibTest/core/IndexError/stackTrace_A01_t01: RuntimeError
+LibTest/core/RegExp/Pattern_semantics/firstMatch_NonEmptyClassRanges_A01_t01: RuntimeError
+LibTest/core/Runes/any_A01_t01: RuntimeError
+LibTest/core/Runes/every_A01_t01: RuntimeError
+LibTest/core/String/padRight_A01_t01: RuntimeError
+LibTest/core/String/replaceFirstMapped_A03_t01: RuntimeError
+LibTest/core/Symbol/Symbol_A01_t04: RuntimeError
+LibTest/core/Uri/Uri.dataFromBytes_A01_t02: RuntimeError
+LibTest/core/Uri/Uri.dataFromBytes_A01_t03: RuntimeError
+LibTest/core/Uri/Uri.dataFromBytes_A01_t04: RuntimeError
+LibTest/core/Uri/Uri.dataFromBytes_A01_t05: RuntimeError
+LibTest/core/Uri/Uri.dataFromString_A01_t01: RuntimeError
+LibTest/core/Uri/Uri.dataFromString_A01_t03: RuntimeError
+LibTest/core/Uri/Uri.dataFromString_A01_t04: RuntimeError
+LibTest/core/Uri/Uri.dataFromString_A02_t03: RuntimeError
+LibTest/core/Uri/Uri.file_A02_t03: RuntimeError
+LibTest/core/Uri/Uri_A06_t03: Timeout, Pass
+LibTest/core/Uri/decodeComponent_A01_t02: Timeout, Pass
+LibTest/core/Uri/encodeQueryComponent_A01_t02: Timeout, Pass
+LibTest/core/Uri/queryParametersAll_A01_t04: RuntimeError
+LibTest/core/Uri/queryParametersAll_A03_t01: RuntimeError
+LibTest/core/UriData/UriData.fromBytes_A01_t03: RuntimeError
+LibTest/core/UriData/charset_A01_t01: RuntimeError
+LibTest/core/UriData/contentText_A01_t01: RuntimeError
+LibTest/core/UriData/parse_A01_t01: RuntimeError
+LibTest/core/double/INFINITY_A01_t04: RuntimeError
+LibTest/core/double/NEGATIVE_INFINITY_A01_t04: RuntimeError
+LibTest/core/double/isInfinite_A01_t03: CompileTimeError
+LibTest/core/double/operator_GE_A01_t02: CompileTimeError
+LibTest/core/double/operator_GT_A01_t02: CompileTimeError
+LibTest/core/double/operator_LT_A01_t02: CompileTimeError
+LibTest/core/double/operator_addition_A01_t08: Crash
+LibTest/core/double/operator_subtraction_A01_t06: RuntimeError
+LibTest/core/double/operator_subtraction_A01_t09: Crash
+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/hashCode_A01_t01: CompileTimeError
+LibTest/core/int/isInfinite_A01_t01: CompileTimeError
+LibTest/core/int/isNegative_A01_t01: CompileTimeError
+LibTest/core/int/isOdd_A01_t01: RuntimeError
+LibTest/core/int/operator_AND_A01_t01: CompileTimeError
+LibTest/core/int/operator_GE_A01_t01: CompileTimeError
+LibTest/core/int/operator_LT_A01_t01: CompileTimeError
+LibTest/core/int/operator_XOR_A01_t01: CompileTimeError
+LibTest/core/int/operator_addition_A01_t01: CompileTimeError
+LibTest/core/int/operator_equality_A01_t01: CompileTimeError
+LibTest/core/int/operator_equality_A03_t01: CompileTimeError
+LibTest/core/int/operator_left_shift_A01_t01: RuntimeError
+LibTest/core/int/operator_remainder_A01_t03: RuntimeError
+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: RuntimeError
+LibTest/core/int/operator_unary_minus_A01_t01: CompileTimeError
+LibTest/core/int/parse_A03_t02: CompileTimeError
+LibTest/core/int/roundToDouble_A01_t01: CompileTimeError
+LibTest/core/int/truncateToDouble_A01_t01: CompileTimeError
+LibTest/html/CanvasRenderingContext2D/addEventListener_A01_t03: Timeout
+LibTest/html/Element/blur_A01_t01: Timeout, Pass
+LibTest/html/Element/focus_A01_t01: Timeout, Pass
+LibTest/html/Element/loadEvent_A01_t01: Timeout
+LibTest/html/Element/mouseEnterEvent_A01_t01: RuntimeError, Pass
+LibTest/html/Element/mouseOverEvent_A01_t01: RuntimeError, Pass
+LibTest/html/Element/mouseWheelEvent_A01_t01: Timeout
+LibTest/html/Element/onLoad_A01_t01: Timeout
+LibTest/html/Element/onMouseWheel_A01_t01: Timeout
+LibTest/html/HttpRequest/responseText_A01_t02: Timeout
+LibTest/html/HttpRequestUpload/onAbort_A01_t01: Timeout
+LibTest/html/HttpRequestUpload/onError_A01_t02: Timeout
+LibTest/html/HttpRequestUpload/onLoadEnd_A01_t01: Timeout
+LibTest/html/HttpRequestUpload/onLoadStart_A01_t01: Timeout
+LibTest/html/HttpRequestUpload/onLoad_A01_t01: Timeout
+LibTest/html/IFrameElement/enteredView_A01_t01: Timeout
+LibTest/html/IFrameElement/focus_A01_t01: Timeout
+LibTest/html/IFrameElement/onMouseWheel_A01_t01: Timeout
+LibTest/typed_data/Int16List/shuffle_A01_t01: RuntimeError, Pass
+Utils/tests/Expect/throws_A01_t04: RuntimeError
+WebPlatformTest/DOMEvents/approved/ProcessingInstruction.DOMCharacterDataModified_t01: Timeout
+WebPlatformTest/DOMEvents/approved/addEventListener.optional.useCapture_t01: RuntimeError
+WebPlatformTest/Utils/test/asyncTestFail_t01: RuntimeError
+WebPlatformTest/Utils/test/asyncTestFail_t02: RuntimeError
+WebPlatformTest/Utils/test/asyncTestTimeout_t01: Timeout
+WebPlatformTest/custom-elements/concepts/type_A04_t01: RuntimeError
+WebPlatformTest/custom-elements/concepts/type_A08_t01: RuntimeError
+WebPlatformTest/custom-elements/instantiating/createElementNS_A03_t01: RuntimeError
+WebPlatformTest/custom-elements/instantiating/createElementNS_A04_t01: RuntimeError
+WebPlatformTest/custom-elements/instantiating/createElementNS_A05_t01: RuntimeError
+WebPlatformTest/custom-elements/instantiating/createElement_A01_t01: RuntimeError
+WebPlatformTest/custom-elements/instantiating/createElement_A02_t01: RuntimeError
+WebPlatformTest/custom-elements/instantiating/createElement_A04_t01: RuntimeError
+WebPlatformTest/custom-elements/instantiating/isAttribute_A01_t02: RuntimeError
+WebPlatformTest/custom-elements/instantiating/isAttribute_A03_t01: RuntimeError
+WebPlatformTest/custom-elements/instantiating/localName_A01_t01: RuntimeError
+WebPlatformTest/dom/events/type_A01_t01: RuntimeError
+WebPlatformTest/dom/nodes/DOMImplementation-createDocument_t01: RuntimeError
+WebPlatformTest/dom/nodes/Document-adoptNode_t01: RuntimeError
+WebPlatformTest/dom/nodes/Node-insertBefore_t01: RuntimeError
+WebPlatformTest/dom/nodes/Node-isEqualNode_t01: Timeout
+WebPlatformTest/dom/nodes/Node-nodeName_t01: RuntimeError
+WebPlatformTest/dom/nodes/attributes/setAttributeNS_A07_t03: RuntimeError
+WebPlatformTest/dom/nodes/attributes/setAttribute_A03_t01: RuntimeError
+WebPlatformTest/html-imports/link-import_t02: RuntimeError
+WebPlatformTest/html-imports/loading-import_t01: RuntimeError
+WebPlatformTest/html-templates/innerhtml-on-templates/innerhtml_t01: RuntimeError
+WebPlatformTest/html-templates/parsing-html-templates/additions-to-the-in-head-insertion-mode/generating-of-implied-end-tags_t01: RuntimeError
+WebPlatformTest/html-templates/parsing-html-templates/clearing-the-stack-back-to-a-given-context/clearing-stack-back-to-a-table-body-context_t01: RuntimeError
+WebPlatformTest/html-templates/template-element/node-document-changes_t01: RuntimeError
+WebPlatformTest/html-templates/template-element/template-as-a-descendant_t01: RuntimeError
+WebPlatformTest/html/browsers/browsing-the-web/read-media/pageload-video_t01: RuntimeError
+WebPlatformTest/html/dom/documents/dom-tree-accessors/document.body-setter_t01: RuntimeError
+WebPlatformTest/html/dom/documents/dom-tree-accessors/document.getElementsByName-namespace_t01: RuntimeError
+WebPlatformTest/html/dom/documents/dom-tree-accessors/document.getElementsByName-newelements_t01: RuntimeError
+WebPlatformTest/html/dom/elements/global-attributes/dataset-get_t01: RuntimeError
+WebPlatformTest/html/semantics/embedded-content/media-elements/error-codes/error_t01: Timeout
+WebPlatformTest/html/semantics/embedded-content/media-elements/interfaces/HTMLElement/HTMLMediaElement/addTextTrack_t01: RuntimeError
+WebPlatformTest/html/semantics/embedded-content/media-elements/interfaces/HTMLElement/HTMLTrackElement/kind_t01: RuntimeError
+WebPlatformTest/html/semantics/embedded-content/media-elements/interfaces/TextTrack/cues_t01: Timeout
+WebPlatformTest/html/semantics/embedded-content/media-elements/interfaces/TextTrack/kind_t01: RuntimeError
+WebPlatformTest/html/semantics/forms/textfieldselection/textfieldselection-setRangeText_t01: RuntimeError
+WebPlatformTest/html/semantics/forms/textfieldselection/textfieldselection-setSelectionRange_t01: RuntimeError
+WebPlatformTest/html/semantics/forms/the-button-element/button-validation_t01: RuntimeError
+WebPlatformTest/html/semantics/forms/the-form-element/form-elements-matches_t01: RuntimeError
+WebPlatformTest/html/semantics/forms/the-form-element/form-nameditem_t01: RuntimeError
+WebPlatformTest/html/semantics/forms/the-input-element/datetime_t02: RuntimeError
+WebPlatformTest/html/semantics/forms/the-input-element/input-type-button_t01: RuntimeError
+WebPlatformTest/html/semantics/forms/the-input-element/mobiles_t01: RuntimeError
+WebPlatformTest/html/semantics/forms/the-input-element/month_t01: RuntimeError
+WebPlatformTest/html/semantics/forms/the-input-element/password_t01: RuntimeError
+WebPlatformTest/html/semantics/forms/the-input-element/range_t01: RuntimeError
+WebPlatformTest/html/semantics/forms/the-input-element/time_t01: RuntimeError
+WebPlatformTest/html/semantics/forms/the-input-element/time_t02: RuntimeError
+WebPlatformTest/html/semantics/forms/the-input-element/type-change-state_t01: RuntimeError
+WebPlatformTest/html/semantics/forms/the-input-element/week_t01: RuntimeError
+WebPlatformTest/html/semantics/forms/the-option-element/option-text-spaces_t01: RuntimeError
+WebPlatformTest/html/semantics/forms/the-textarea-element/textarea-type_t01: RuntimeError
+WebPlatformTest/html/semantics/interactive-elements/the-dialog-element/dialog-close_t01: RuntimeError
+WebPlatformTest/html/semantics/selectors/pseudo-classes/checked_t01: RuntimeError
+WebPlatformTest/html/semantics/selectors/pseudo-classes/focus_t01: RuntimeError, Pass
+WebPlatformTest/html/semantics/selectors/pseudo-classes/indeterminate_t01: RuntimeError
+WebPlatformTest/html/semantics/tabular-data/attributes-common-to-td-and-th-elements/cellIndex_t01: RuntimeError
+WebPlatformTest/html/semantics/tabular-data/the-table-element/table-rows_t01: RuntimeError
+WebPlatformTest/html/webappapis/system-state-and-capabilities/the-navigator-object/protocol_t00: RuntimeError
+WebPlatformTest/shadow-dom/elements-and-dom-objects/extensions-to-element-interface/attributes/test-001_t01: RuntimeError
+WebPlatformTest/shadow-dom/elements-and-dom-objects/extensions-to-element-interface/attributes/test-005_t01: RuntimeError
+WebPlatformTest/shadow-dom/elements-and-dom-objects/extensions-to-element-interface/methods/test-003_t01: RuntimeError
+WebPlatformTest/shadow-dom/elements-and-dom-objects/extensions-to-event-interface/event-path-001_t01: RuntimeError
+WebPlatformTest/shadow-dom/elements-and-dom-objects/shadowroot-object/shadowroot-attributes/test-009_t01: RuntimeError
+WebPlatformTest/shadow-dom/elements-and-dom-objects/shadowroot-object/shadowroot-attributes/test-011_t01: RuntimeError
+WebPlatformTest/shadow-dom/elements-and-dom-objects/shadowroot-object/shadowroot-attributes/test-013_t01: RuntimeError
+WebPlatformTest/shadow-dom/elements-and-dom-objects/shadowroot-object/shadowroot-methods/test-001_t01: RuntimeError
+WebPlatformTest/shadow-dom/elements-and-dom-objects/the-content-html-element/test-003_t01: RuntimeError
+WebPlatformTest/shadow-dom/elements-and-dom-objects/the-content-html-element/test-004_t02: RuntimeError
+WebPlatformTest/shadow-dom/elements-and-dom-objects/the-content-html-element/test-005_t01: RuntimeError
+WebPlatformTest/shadow-dom/elements-and-dom-objects/the-shadow-html-element/test-002_t01: RuntimeError
+WebPlatformTest/shadow-dom/elements-and-dom-objects/the-shadow-html-element/test-003_t01: RuntimeError
+WebPlatformTest/shadow-dom/elements-and-dom-objects/the-shadow-html-element/test-005_t01: RuntimeError
+WebPlatformTest/shadow-dom/events/event-dispatch/test-002_t01: RuntimeError
+WebPlatformTest/shadow-dom/events/event-retargeting/test-001_t01: RuntimeError
+WebPlatformTest/shadow-dom/events/events-that-are-always-stopped/test-001_t01: RuntimeError
+WebPlatformTest/shadow-dom/events/events-that-are-always-stopped/test-003_t01: RuntimeError
+WebPlatformTest/shadow-dom/events/events-that-are-always-stopped/test-005_t01: RuntimeError
+WebPlatformTest/shadow-dom/events/events-that-are-always-stopped/test-007_t01: RuntimeError
+WebPlatformTest/shadow-dom/events/events-that-are-always-stopped/test-008_t01: RuntimeError
+WebPlatformTest/shadow-dom/events/retargeting-focus-events/test-001_t04: RuntimeError
+WebPlatformTest/shadow-dom/events/retargeting-focus-events/test-001_t06: RuntimeError
+WebPlatformTest/shadow-dom/events/retargeting-relatedtarget/test-001_t01: RuntimeError
+WebPlatformTest/shadow-dom/html-elements-and-their-shadow-trees/test-001_t01: RuntimeError
+WebPlatformTest/shadow-dom/html-elements-and-their-shadow-trees/test-003_t01: RuntimeError
+WebPlatformTest/shadow-dom/html-elements-and-their-shadow-trees/test-004_t01: RuntimeError
+WebPlatformTest/shadow-dom/html-elements-in-shadow-trees/html-forms/test-001_t01: RuntimeError
+WebPlatformTest/shadow-dom/html-elements-in-shadow-trees/html-forms/test-002_t01: RuntimeError
+WebPlatformTest/shadow-dom/shadow-trees/custom-pseudo-elements/test-001_t01: RuntimeError
+WebPlatformTest/shadow-dom/shadow-trees/distributed-pseudo-element/test-002_t01: RuntimeError
+WebPlatformTest/shadow-dom/shadow-trees/hosting-multiple-shadow-trees/test-003_t01: RuntimeError
+WebPlatformTest/shadow-dom/shadow-trees/lower-boundary-encapsulation/distribution-003_t01: RuntimeError
+WebPlatformTest/shadow-dom/shadow-trees/lower-boundary-encapsulation/test-005_t01: RuntimeError
+WebPlatformTest/shadow-dom/shadow-trees/nested-shadow-trees/test-001_t01: RuntimeError
+WebPlatformTest/shadow-dom/shadow-trees/reprojection/test-001_t01: RuntimeError
+WebPlatformTest/shadow-dom/shadow-trees/satisfying-matching-criteria/test-006_t01: RuntimeError
+WebPlatformTest/shadow-dom/shadow-trees/upper-boundary-encapsulation/ownerdocument-002_t01: RuntimeError
+WebPlatformTest/shadow-dom/shadow-trees/upper-boundary-encapsulation/test-005_t01: RuntimeError
+WebPlatformTest/shadow-dom/shadow-trees/upper-boundary-encapsulation/test-011_t01: RuntimeError
+WebPlatformTest/webstorage/event_constructor_t02: RuntimeError
+WebPlatformTest/webstorage/event_local_key_t01: Timeout
+WebPlatformTest/webstorage/event_local_newvalue_t01: Timeout
+WebPlatformTest/webstorage/event_local_oldvalue_t01: Timeout
+WebPlatformTest/webstorage/event_local_storagearea_t01: Timeout
+WebPlatformTest/webstorage/event_local_url_t01: Timeout
+WebPlatformTest/webstorage/event_session_key_t01: Timeout
+WebPlatformTest/webstorage/event_session_newvalue_t01: Timeout
+WebPlatformTest/webstorage/event_session_oldvalue_t01: Timeout
+WebPlatformTest/webstorage/event_session_storagearea_t01: Timeout
+WebPlatformTest/webstorage/event_session_url_t01: Timeout
+WebPlatformTest/webstorage/storage_local_setitem_quotaexceedederr_t01: RuntimeError
+
+[ $compiler == dart2js && $runtime == ff && $system == windows ]
+LayoutTests/fast/css/font-face-multiple-ranges-for-unicode-range_t01: RuntimeError
+LayoutTests/fast/svg/getbbox_t01: RuntimeError
+LibTest/html/Window/close_A01_t01: RuntimeError, Pass
+LibTest/math/cos_A01_t01: RuntimeError
+LibTest/typed_data/Float32List/shuffle_A01_t01: RuntimeError, Pass
+
+[ $compiler == dart2js && $runtime == ff && $fast_startup ]
+Language/Expressions/Additive_Expressions/syntax_t01: RuntimeError
+Language/Expressions/Await_Expressions/evaluation_throws_t04: RuntimeError
+Language/Expressions/Await_Expressions/evaluation_throws_t06: RuntimeError
+Language/Expressions/Await_Expressions/evaluation_throws_t07: RuntimeError
+Language/Expressions/Constants/depending_on_itself_t03: Crash
+Language/Expressions/Constants/exception_t02/01: CompileTimeError
+Language/Expressions/Constants/integer_size_t03: CompileTimeError
+Language/Expressions/Constants/integer_size_t04: CompileTimeError
+Language/Expressions/Function_Invocation/async_generator_invokation_t08: Timeout
+Language/Expressions/Function_Invocation/async_generator_invokation_t10: Timeout
+Language/Expressions/Identifier_Reference/evaluation_variable_or_parameter_t02: RuntimeError
+Language/Expressions/If_null_Expressions/static_type_t01: RuntimeError
+Language/Expressions/Lists/identical_t02: RuntimeError
+Language/Expressions/Maps/identical_t02: RuntimeError
+Language/Expressions/Null/instance_of_class_null_t01: RuntimeError
+Language/Expressions/Numbers/syntax_t06: CompileTimeError
+Language/Expressions/Numbers/syntax_t09: CompileTimeError
+Language/Expressions/Object_Identity/double_t02: RuntimeError
+Language/Expressions/Shift/integer_t02: CompileTimeError
+Language/Expressions/Type_Cast/syntax_t01: RuntimeError
+Language/Expressions/Unary_Expressions/variable_negative_t03: RuntimeError
+Language/Libraries_and_Scripts/Scripts/top_level_main_t01: CompileTimeError
+Language/Libraries_and_Scripts/top_level_syntax_t01: CompileTimeError
+Language/Metadata/before_ctor_t02: RuntimeError
+Language/Metadata/before_function_t01: RuntimeError
+Language/Metadata/before_function_t02: RuntimeError
+Language/Metadata/before_function_t03: RuntimeError
+Language/Metadata/before_function_t04: RuntimeError
+Language/Metadata/before_function_t07: RuntimeError
+Language/Metadata/before_import_t01: RuntimeError
+Language/Metadata/before_param_t03: RuntimeError
+Language/Metadata/before_param_t05: RuntimeError
+Language/Metadata/before_param_t07: RuntimeError
+Language/Metadata/before_param_t09: RuntimeError
+Language/Metadata/before_variable_t02: RuntimeError
+Language/Mixins/Mixin_Application/syntax_t23: RuntimeError
+Language/Mixins/Mixin_Application/syntax_t25: RuntimeError
+Language/Overview/Privacy/private_and_public_t18: RuntimeError
+Language/Reference/Operator_Precedence/precedence_15_unary_prefix_t08: RuntimeError
+Language/Statements/Assert/execution_t09: RuntimeError
+Language/Types/Function_Types/call_t01: RuntimeError
+Language/Types/Function_Types/subtype_named_args_t02: RuntimeError
+Language/Types/Function_Types/subtype_named_args_t03: RuntimeError
+Language/Types/Function_Types/subtype_named_args_t11: RuntimeError
+Language/Types/Function_Types/subtype_optional_args_t01: RuntimeError
+Language/Types/Function_Types/subtype_optional_args_t02: RuntimeError
+Language/Types/Function_Types/subtype_optional_args_t04: RuntimeError
+Language/Types/Interface_Types/subtype_t06: RuntimeError
+Language/Types/Interface_Types/subtype_t21: RuntimeError
+Language/Types/Interface_Types/subtype_t23: RuntimeError
+Language/Variables/constant_variable_t09: RuntimeError
+LanguageFeatures/Instantiate-to-bound/check_types/typedef_param_t02: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/interface_compositionality_class_member_A02_t03: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/interface_compositionality_local_variable_A02_t01: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/interface_compositionality_return_value_A02_t01: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A51_t01: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A51_t02: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A53_t01: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A51_t02: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A51_t03: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A53_t01: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A53_t02: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A53_t03: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_global_variable_fail_A51_t01: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_global_variable_fail_A52_t01: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_local_variable_fail_A51_t01: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_local_variable_fail_A52_t01: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_local_variable_fail_A53_t01: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_return_value_fail_A53_t01: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/positional_function_types_fail_arguments_binding_fail_A31_t01: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/positional_function_types_fail_arguments_binding_fail_A31_t02: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/positional_function_types_fail_arguments_binding_fail_A32_t01: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/positional_function_types_fail_arguments_binding_fail_A32_t02: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/positional_function_types_fail_class_member_fail_A31_t01: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/positional_function_types_fail_class_member_fail_A31_t03: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/positional_function_types_fail_class_member_fail_A32_t02: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/positional_function_types_fail_class_member_fail_A32_t03: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/positional_function_types_fail_local_variable_fail_A31_t01: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/positional_function_types_fail_local_variable_fail_A32_t01: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/positional_function_types_fail_return_value_fail_A32_t01: RuntimeError
+LanguageFeatures/Subtyping/static/generated/interface_compositionality_arguments_binding_A02_t01: RuntimeError
+LanguageFeatures/Subtyping/static/generated/interface_compositionality_class_member_A02_t01: RuntimeError
+LanguageFeatures/Subtyping/static/generated/interface_compositionality_class_member_A02_t02: RuntimeError
+LanguageFeatures/Subtyping/static/generated/interface_compositionality_class_member_A02_t03: RuntimeError
+LayoutTests/fast/animation/request-animation-frame-prefix_t01: Timeout, Pass
+LayoutTests/fast/backgrounds/background-position-parsing-2_t01: RuntimeError
+LayoutTests/fast/backgrounds/background-shorthand-with-backgroundSize-style_t01: RuntimeError
+LayoutTests/fast/backgrounds/repeat/parsing-background-repeat_t01: RuntimeError
+LayoutTests/fast/borders/border-image-width-numbers-computed-style_t01: RuntimeError
+LayoutTests/fast/borders/border-width-percent_t01: RuntimeError
+LayoutTests/fast/canvas/2d.composite.globalAlpha.fillPath_t01: RuntimeError
+LayoutTests/fast/canvas/2d.fillText.gradient_t01: RuntimeError
+LayoutTests/fast/canvas/2d.text.draw.fill.maxWidth.negative_t01: RuntimeError
+LayoutTests/fast/canvas/DrawImageSinglePixelStretch_t01: Timeout
+LayoutTests/fast/canvas/canvas-blend-solid_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-blending-color-over-color_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-blending-global-alpha_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-blending-gradient-over-color_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-blending-gradient-over-gradient_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-blending-gradient-over-pattern_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-blending-image-over-color_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-blending-image-over-gradient_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-blending-pattern-over-image_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-blending-text_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-blending-transforms_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-composite-text-alpha_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-fillRect-zeroSizeGradient_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-fillText-zeroSizeGradient_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-font-ex-units-crash_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-getImageData-invalid_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-getImageData-rounding_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-imageSmoothingEnabled-repaint_t01: Timeout, Pass
+LayoutTests/fast/canvas/canvas-lose-restore-googol-size_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-lose-restore-max-int-size_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-putImageData_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-scale-fillPath-shadow_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-scale-shadowBlur_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-stroke-zeroSizeGradient_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-strokePath-gradient-shadow_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-strokeRect-alpha-shadow_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-strokeRect-gradient-shadow_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-toDataURL-crash_t01: RuntimeError
+LayoutTests/fast/canvas/drawImage-with-valid-image_t01: Timeout
+LayoutTests/fast/canvas/getPutImageDataPairTest_t01: RuntimeError
+LayoutTests/fast/canvas/gradient-addColorStop-with-invalid-color_t01: RuntimeError
+LayoutTests/fast/canvas/rgba-parsing_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/WebGLContextEvent_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/draw-elements-out-of-bounds_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/framebuffer-bindings-unaffected-on-resize_t01: Timeout, Pass
+LayoutTests/fast/canvas/webgl/get-active-test_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/gl-object-get-calls_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/gl-teximage_t01: Timeout
+LayoutTests/fast/canvas/webgl/glsl-conformance_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/incorrect-context-object-behaviour_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/index-validation-copies-indices_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/index-validation-with-resized-buffer_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/oes-element-index-uint_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/oes-vertex-array-object_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-array-buffer-view_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-image-rgba4444_t01: Timeout
+LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-image-rgba5551_t01: Timeout
+LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-image_t01: Timeout
+LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-video-rgb565_t01: Timeout
+LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-video-rgba4444_t01: Timeout
+LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-video-rgba5551_t01: Timeout
+LayoutTests/fast/canvas/webgl/texture-active-bind_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/texture-color-profile_t01: Timeout
+LayoutTests/fast/canvas/webgl/texture-complete_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/texture-transparent-pixels-initialized_t01: Timeout
+LayoutTests/fast/canvas/webgl/webgl-layer-update_t01: Timeout, Pass
+LayoutTests/fast/canvas/webgl/webgl-specific_t01: RuntimeError
+LayoutTests/fast/css-generated-content/bug91547_t01: RuntimeError
+LayoutTests/fast/css-generated-content/details-before-after-content_t01: RuntimeError
+LayoutTests/fast/css-generated-content/malformed-url_t01: RuntimeError
+LayoutTests/fast/css-generated-content/pseudo-animation_t01: RuntimeError, Pass
+LayoutTests/fast/css-generated-content/pseudo-element-events_t01: Timeout
+LayoutTests/fast/css-generated-content/pseudo-transition-event_t01: Timeout
+LayoutTests/fast/css-grid-layout/breadth-size-resolution-grid_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/calc-resolution-grid-item_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/flex-content-resolution-columns_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/flex-content-resolution-rows_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/grid-auto-flow-get-set_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/grid-auto-flow-update_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/grid-element-border-grid-item_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/grid-element-border-padding-grid-item_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/grid-element-padding-margin_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/grid-item-area-get-set_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/grid-item-bad-named-area-auto-placement_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/grid-item-change-order-auto-flow_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/grid-item-margin-auto-columns-rows-horiz-bt_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/grid-item-margin-auto-columns-rows-vert-rl_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/grid-item-margin-auto-columns-rows_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/grid-item-margin-resolution_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/grid-item-order-auto-flow-resolution_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/justify-self-cell_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/minmax-fixed-logical-height-only_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/percent-grid-item-in-percent-grid-track-in-percent-grid_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/percent-grid-item-in-percent-grid-track-update_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/percent-grid-item-in-percent-grid-track_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/percent-padding-margin-resolution-grid-item-update_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/place-cell-by-index_t01: RuntimeError
+LayoutTests/fast/css-intrinsic-dimensions/intrinsic-sized-blocks_t01: RuntimeError
+LayoutTests/fast/css-intrinsic-dimensions/intrinsic-sized-column-flex-items_t01: RuntimeError
+LayoutTests/fast/css-intrinsic-dimensions/intrinsic-sized-flex-items_t01: RuntimeError
+LayoutTests/fast/css-intrinsic-dimensions/intrinsic-sized-replaced-absolutes_t01: RuntimeError
+LayoutTests/fast/css-intrinsic-dimensions/width-shrinks-avoid-floats_t01: RuntimeError
+LayoutTests/fast/css/aspect-ratio-inheritance_t01: RuntimeError
+LayoutTests/fast/css/auto-min-size_t01: RuntimeError
+LayoutTests/fast/css/background-serialize_t01: RuntimeError
+LayoutTests/fast/css/border-image-null-image-crash_t01: RuntimeError
+LayoutTests/fast/css/border-image-style-length_t01: RuntimeError
+LayoutTests/fast/css/border-shorthand-initialize-longhands_t01: RuntimeError
+LayoutTests/fast/css/border-start-end_t01: RuntimeError
+LayoutTests/fast/css/box-sizing-border-box-dynamic-padding-border-update_t01: RuntimeError
+LayoutTests/fast/css/content/content-none_t01: RuntimeError
+LayoutTests/fast/css/counters/complex-before_t01: RuntimeError
+LayoutTests/fast/css/cursor-parsing-image-set_t01: RuntimeError
+LayoutTests/fast/css/cursor-parsing_t01: RuntimeError
+LayoutTests/fast/css/deprecated-flex-box-zero-width-intrinsic-max-width_t01: RuntimeError
+LayoutTests/fast/css/device-aspect-ratio_t01: RuntimeError
+LayoutTests/fast/css/draggable-region-parser_t01: RuntimeError
+LayoutTests/fast/css/fixed-width-intrinsic-width-excludes-scrollbars_t01: RuntimeError
+LayoutTests/fast/css/focus-display-block-inline_t01: RuntimeError
+LayoutTests/fast/css/font-face-insert-link_t01: RuntimeError
+LayoutTests/fast/css/font-face-unicode-range-load_t01: RuntimeError
+LayoutTests/fast/css/font-face-unicode-range-overlap-load_t01: RuntimeError
+LayoutTests/fast/css/font-property-priority_t01: RuntimeError
+LayoutTests/fast/css/fontface-properties_t01: RuntimeError
+LayoutTests/fast/css/fontfaceset-events_t01: RuntimeError
+LayoutTests/fast/css/getComputedStyle/computed-style-border-image_t01: RuntimeError
+LayoutTests/fast/css/getComputedStyle/computed-style-cross-fade_t01: RuntimeError
+LayoutTests/fast/css/getComputedStyle/font-family-fallback-reset_t01: RuntimeError
+LayoutTests/fast/css/getComputedStyle/getComputedStyle-border-style-shorthand_t01: RuntimeError
+LayoutTests/fast/css/getComputedStyle/getComputedStyle-borderRadius-2_t01: RuntimeError
+LayoutTests/fast/css/getComputedStyle/getComputedStyle-length-unit_t01: RuntimeError
+LayoutTests/fast/css/getComputedStyle/getComputedStyle-zIndex-auto_t01: RuntimeError
+LayoutTests/fast/css/getPropertyValue-column-rule_t01: RuntimeError
+LayoutTests/fast/css/getPropertyValue-webkit-margin-collapse_t01: RuntimeError
+LayoutTests/fast/css/html-attr-case-sensitivity_t01: RuntimeError
+LayoutTests/fast/css/image-set-setting_t01: RuntimeError
+LayoutTests/fast/css/inherited-properties-rare-text_t01: RuntimeError
+LayoutTests/fast/css/insertRule-media_t01: RuntimeError
+LayoutTests/fast/css/invalid-predefined-color_t01: RuntimeError
+LayoutTests/fast/css/invalidation/dynamic-selector-list-pseudo_t01: RuntimeError
+LayoutTests/fast/css/invalidation/targeted-class-host-pseudo_t01: RuntimeError
+LayoutTests/fast/css/invalidation/toggle-style-inside-shadow-root_t01: RuntimeError
+LayoutTests/fast/css/link-alternate-stylesheet-1_t01: RuntimeError
+LayoutTests/fast/css/media-query-recovery_t01: RuntimeError
+LayoutTests/fast/css/modify-ua-rules-from-javascript_t01: RuntimeError
+LayoutTests/fast/css/nested-at-rules_t01: RuntimeError
+LayoutTests/fast/css/overflow-property_t01: RuntimeError
+LayoutTests/fast/css/padding-start-end_t01: RuntimeError
+LayoutTests/fast/css/parsing-page-rule_t01: RuntimeError
+LayoutTests/fast/css/percent-min-width-img-src-change_t01: Timeout
+LayoutTests/fast/css/pseudo-required-optional-004_t01: RuntimeError
+LayoutTests/fast/css/pseudo-required-optional-005_t01: RuntimeError
+LayoutTests/fast/css/pseudo-required-optional-unapplied_t01: RuntimeError
+LayoutTests/fast/css/pseudo-target-indirect-sibling-001_t01: Timeout
+LayoutTests/fast/css/pseudo-target-indirect-sibling-002_t01: Timeout
+LayoutTests/fast/css/readonly-pseudoclass-opera-003_t01: RuntimeError
+LayoutTests/fast/css/readonly-pseudoclass-opera-004_t01: RuntimeError
+LayoutTests/fast/css/readonly-pseudoclass-opera-005_t01: RuntimeError
+LayoutTests/fast/css/sheet-collection-link_t01: RuntimeError
+LayoutTests/fast/css/shorthand-setProperty-important_t01: RuntimeError
+LayoutTests/fast/css/space-before-charset-external_t01: RuntimeError
+LayoutTests/fast/css/style-element-process-crash_t01: Timeout
+LayoutTests/fast/css/style-scoped/style-scoped-scoping-nodes-different-order_t01: RuntimeError
+LayoutTests/fast/css/style-scoped/style-scoped-shadow-crash_t01: RuntimeError
+LayoutTests/fast/css/style-scoped/style-scoped-with-dom-operation_t01: RuntimeError
+LayoutTests/fast/css/style-scoped/style-scoped-with-important-rule_t01: RuntimeError
+LayoutTests/fast/css/stylesheet-enable-first-alternate-link_t01: RuntimeError
+LayoutTests/fast/css/stylesheet-enable-first-alternate-on-load-sheet_t01: RuntimeError
+LayoutTests/fast/css/text-align-webkit-match-parent_t01: RuntimeError
+LayoutTests/fast/css/unicode-bidi-computed-value_t01: RuntimeError
+LayoutTests/fast/css/webkit-color-adjust_t01: RuntimeError
+LayoutTests/fast/css/word-break-user-modify-allowed-values_t01: RuntimeError
+LayoutTests/fast/css/zoom-property-parsing_t01: RuntimeError
+LayoutTests/fast/css3-text/css3-text-decoration/getComputedStyle/getComputedStyle-text-decoration-line_t01: RuntimeError
+LayoutTests/fast/css3-text/css3-text-decoration/getComputedStyle/getComputedStyle-text-underline-position_t01: RuntimeError
+LayoutTests/fast/css3-text/css3-text-indent/getComputedStyle/getComputedStyle-text-indent-inherited_t01: RuntimeError
+LayoutTests/fast/dom/DOMImplementation/createDocument-namespace-err_t01: RuntimeError
+LayoutTests/fast/dom/Document/CaretRangeFromPoint/caretRangeFromPoint-in-strict-mode-wtih-checkbox_t01: RuntimeError
+LayoutTests/fast/dom/Document/CaretRangeFromPoint/caretRangeFromPoint-in-user-select-none_t01: RuntimeError
+LayoutTests/fast/dom/Document/CaretRangeFromPoint/caretRangeFromPoint-in-zoom-and-scroll_t01: RuntimeError
+LayoutTests/fast/dom/Document/CaretRangeFromPoint/caretRangeFromPoint-with-first-letter-style_t01: RuntimeError
+LayoutTests/fast/dom/Document/createElement-valid-names_t01: RuntimeError
+LayoutTests/fast/dom/Element/attribute-uppercase_t01: RuntimeError
+LayoutTests/fast/dom/Element/client-rect-list-argument_t01: RuntimeError
+LayoutTests/fast/dom/Element/getClientRects_t01: RuntimeError
+LayoutTests/fast/dom/Element/id-in-insert-hr_t01: RuntimeError
+LayoutTests/fast/dom/Element/offsetTop-table-cell_t01: RuntimeError
+LayoutTests/fast/dom/Element/scrollWidth_t01: RuntimeError
+LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-host_t01: RuntimeError
+LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-pathname_t01: RuntimeError
+LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-port_t01: RuntimeError
+LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-protocol_t01: RuntimeError
+LayoutTests/fast/dom/HTMLBaseElement/href-attribute-resolves-with-respect-to-document_t01: RuntimeError
+LayoutTests/fast/dom/HTMLButtonElement/value/getset_t01: RuntimeError
+LayoutTests/fast/dom/HTMLDialogElement/dialog-close-event_t01: RuntimeError
+LayoutTests/fast/dom/HTMLDialogElement/dialog-open_t01: RuntimeError
+LayoutTests/fast/dom/HTMLDialogElement/dialog-return-value_t01: RuntimeError
+LayoutTests/fast/dom/HTMLDialogElement/dialog-scrolled-viewport_t01: RuntimeError
+LayoutTests/fast/dom/HTMLDialogElement/inert-node-is-unselectable_t01: RuntimeError
+LayoutTests/fast/dom/HTMLDialogElement/multiple-centered-dialogs_t01: RuntimeError
+LayoutTests/fast/dom/HTMLDialogElement/submit-dialog-close-event_t01: RuntimeError
+LayoutTests/fast/dom/HTMLDialogElement/synthetic-click-inert_t01: RuntimeError
+LayoutTests/fast/dom/HTMLDialogElement/top-layer-position-relative_t01: RuntimeError
+LayoutTests/fast/dom/HTMLDialogElement/top-layer-position-static_t01: RuntimeError
+LayoutTests/fast/dom/HTMLDocument/active-element-gets-unforcusable_t01: RuntimeError
+LayoutTests/fast/dom/HTMLDocument/set-focus-on-valid-element_t01: Timeout
+LayoutTests/fast/dom/HTMLElement/attr-dir-auto-change-before-text-node_t01: RuntimeError
+LayoutTests/fast/dom/HTMLElement/attr-dir-auto-change-child-node_t01: RuntimeError
+LayoutTests/fast/dom/HTMLElement/attr-dir-auto-change-text-form-control_t01: RuntimeError
+LayoutTests/fast/dom/HTMLElement/attr-dir-auto-change-text_t01: RuntimeError
+LayoutTests/fast/dom/HTMLElement/attr-dir-auto-children_t01: RuntimeError
+LayoutTests/fast/dom/HTMLElement/attr-dir-auto-remove-add-children_t01: RuntimeError
+LayoutTests/fast/dom/HTMLElement/attr-dir-auto_t01: RuntimeError
+LayoutTests/fast/dom/HTMLElement/attr-empty-string_t01: RuntimeError
+LayoutTests/fast/dom/HTMLElement/attr-false-string_t01: RuntimeError
+LayoutTests/fast/dom/HTMLElement/attr-missing-ancestor-true_t01: RuntimeError
+LayoutTests/fast/dom/HTMLElement/attr-missing-parent-ancestor-missing_t01: RuntimeError
+LayoutTests/fast/dom/HTMLElement/attr-missing-parent-false_t01: RuntimeError
+LayoutTests/fast/dom/HTMLElement/attr-missing-parent-true_t01: RuntimeError
+LayoutTests/fast/dom/HTMLElement/set-inherit-parent-false_t01: RuntimeError
+LayoutTests/fast/dom/HTMLElement/set-inherit-parent-true_t01: RuntimeError
+LayoutTests/fast/dom/HTMLElement/set-invalid-value_t01: RuntimeError
+LayoutTests/fast/dom/HTMLElement/set-true_t01: RuntimeError
+LayoutTests/fast/dom/HTMLElement/translate_t01: RuntimeError
+LayoutTests/fast/dom/HTMLImageElement/image-alt-text_t01: RuntimeError
+LayoutTests/fast/dom/HTMLImageElement/image-natural-width-height_t01: Timeout
+LayoutTests/fast/dom/HTMLImageElement/parse-src_t01: RuntimeError
+LayoutTests/fast/dom/HTMLInputElement/input-image-alt-text_t01: RuntimeError
+LayoutTests/fast/dom/HTMLLabelElement/click-label_t01: RuntimeError
+LayoutTests/fast/dom/HTMLLabelElement/form/test1_t01: RuntimeError
+LayoutTests/fast/dom/HTMLLinkElement/link-and-subresource-test_t01: Timeout
+LayoutTests/fast/dom/HTMLLinkElement/link-beforeload-recursive_t01: Timeout
+LayoutTests/fast/dom/HTMLLinkElement/link-onerror-stylesheet-with-non-existent-import_t01: RuntimeError
+LayoutTests/fast/dom/HTMLLinkElement/link-onload-before-page-load_t01: RuntimeError
+LayoutTests/fast/dom/HTMLLinkElement/link-onload-stylesheet-with-import_t01: RuntimeError
+LayoutTests/fast/dom/HTMLLinkElement/link-onload2_t01: RuntimeError
+LayoutTests/fast/dom/HTMLLinkElement/prefetch-onload_t01: Timeout
+LayoutTests/fast/dom/HTMLLinkElement/prefetch_t01: Timeout
+LayoutTests/fast/dom/HTMLMeterElement/set-meter-properties_t01: RuntimeError
+LayoutTests/fast/dom/HTMLObjectElement/beforeload-set-text-crash_t01: Timeout
+LayoutTests/fast/dom/HTMLOptionElement/collection-setter-getter_t01: RuntimeError
+LayoutTests/fast/dom/HTMLOutputElement/htmloutputelement-validity_t01: RuntimeError
+LayoutTests/fast/dom/HTMLProgressElement/indeterminate-progress-002_t01: RuntimeError
+LayoutTests/fast/dom/HTMLProgressElement/set-progress-properties_t01: RuntimeError
+LayoutTests/fast/dom/HTMLScriptElement/async-false-inside-async-false-load_t01: Timeout
+LayoutTests/fast/dom/HTMLScriptElement/async-onbeforeload_t01: Timeout
+LayoutTests/fast/dom/HTMLScriptElement/defer-inline-script_t01: RuntimeError
+LayoutTests/fast/dom/HTMLScriptElement/defer-onbeforeload_t01: Timeout
+LayoutTests/fast/dom/HTMLScriptElement/defer-script-invalid-url_t01: Timeout
+LayoutTests/fast/dom/HTMLScriptElement/dont-load-unknown-type_t01: Timeout
+LayoutTests/fast/dom/HTMLScriptElement/remove-in-beforeload_t01: Timeout
+LayoutTests/fast/dom/HTMLScriptElement/remove-source_t01: Timeout
+LayoutTests/fast/dom/HTMLScriptElement/script-for-attribute-unexpected-execution_t01: Timeout
+LayoutTests/fast/dom/HTMLScriptElement/script-reexecution_t01: Timeout
+LayoutTests/fast/dom/HTMLScriptElement/script-set-src_t01: Timeout
+LayoutTests/fast/dom/HTMLStyleElement/style-onerror-with-existent-and-non-existent-import_t01: RuntimeError
+LayoutTests/fast/dom/HTMLTableElement/cellpadding-attribute_t01: RuntimeError
+LayoutTests/fast/dom/HTMLTableElement/insert-row_t01: RuntimeError
+LayoutTests/fast/dom/HTMLTableSectionElement/rows_t01: RuntimeError
+LayoutTests/fast/dom/HTMLTemplateElement/cycles-in-shadow_t01: RuntimeError
+LayoutTests/fast/dom/HTMLTemplateElement/innerHTML-inert_t01: Timeout
+LayoutTests/fast/dom/HTMLTemplateElement/xhtml-parsing-and-serialization_t01: RuntimeError
+LayoutTests/fast/dom/MutationObserver/added-out-of-order_t01: RuntimeError
+LayoutTests/fast/dom/MutationObserver/removed-out-of-order_t01: RuntimeError
+LayoutTests/fast/dom/MutationObserver/weak-callback-gc-crash_t01: RuntimeError
+LayoutTests/fast/dom/Range/bug-19527_t01: RuntimeError
+LayoutTests/fast/dom/Range/getClientRects-character_t01: RuntimeError
+LayoutTests/fast/dom/Range/range-created-during-remove-children_t01: RuntimeError
+LayoutTests/fast/dom/Range/range-detached-exceptions_t01: RuntimeError
+LayoutTests/fast/dom/Range/range-insertNode-assertion_t01: RuntimeError
+LayoutTests/fast/dom/Range/range-insertNode-splittext_t01: RuntimeError
+LayoutTests/fast/dom/StyleSheet/detached-shadow-style_t01: RuntimeError
+LayoutTests/fast/dom/StyleSheet/detached-style_t01: RuntimeError
+LayoutTests/fast/dom/StyleSheet/empty-shadow-style_t01: RuntimeError
+LayoutTests/fast/dom/anchor-origin_t01: RuntimeError
+LayoutTests/fast/dom/characterdata-api-arguments_t01: RuntimeError
+LayoutTests/fast/dom/containerNode_t01: Timeout
+LayoutTests/fast/dom/css-cached-import-rule_t01: RuntimeError
+LayoutTests/fast/dom/css-delete-doc_t01: RuntimeError
+LayoutTests/fast/dom/css-innerHTML_t01: RuntimeError
+LayoutTests/fast/dom/css-insert-import-rule-twice_t01: RuntimeError
+LayoutTests/fast/dom/css-insert-import-rule_t01: RuntimeError
+LayoutTests/fast/dom/css-mediarule-functions_t01: RuntimeError
+LayoutTests/fast/dom/css-selectorText_t01: RuntimeError
+LayoutTests/fast/dom/css-shorthand-common-value_t01: RuntimeError
+LayoutTests/fast/dom/cssTarget-crash_t01: RuntimeError
+LayoutTests/fast/dom/custom/attribute-changed-callback_t01: RuntimeError
+LayoutTests/fast/dom/custom/created-callback_t01: RuntimeError
+LayoutTests/fast/dom/custom/invalid-type-extension-crash_t01: RuntimeError
+LayoutTests/fast/dom/custom/lifecycle-created-createElement-recursion_t01: RuntimeError
+LayoutTests/fast/dom/custom/unresolved-pseudoclass_t01: RuntimeError
+LayoutTests/fast/dom/custom/upgrade-candidate-remove-crash_t01: RuntimeError
+LayoutTests/fast/dom/dom-parse-serialize-xmldecl_t01: RuntimeError
+LayoutTests/fast/dom/domparser-parsefromstring-mimetype-support_t01: RuntimeError
+LayoutTests/fast/dom/empty-hash-and-search_t01: RuntimeError
+LayoutTests/fast/dom/gc-image-element-2_t01: Timeout
+LayoutTests/fast/dom/gc-image-element_t01: Timeout
+LayoutTests/fast/dom/getElementsByClassName/010_t01: RuntimeError
+LayoutTests/fast/dom/getElementsByClassName/011_t01: RuntimeError
+LayoutTests/fast/dom/horizontal-scrollbar-in-rtl-doesnt-fire-onscroll_t01: RuntimeError
+LayoutTests/fast/dom/horizontal-scrollbar-in-rtl_t01: RuntimeError
+LayoutTests/fast/dom/horizontal-scrollbar-when-dir-change_t01: RuntimeError
+LayoutTests/fast/dom/image-object_t01: Timeout
+LayoutTests/fast/dom/javascript-backslash_t01: RuntimeError
+LayoutTests/fast/dom/length-attribute-mapping_t01: RuntimeError
+LayoutTests/fast/dom/location-hash_t01: RuntimeError
+LayoutTests/fast/dom/navigator-userAgent_t01: RuntimeError
+LayoutTests/fast/dom/non-styled-element-id-crash_t01: RuntimeError
+LayoutTests/fast/dom/partial-layout-overlay-scrollbars_t01: RuntimeError
+LayoutTests/fast/dom/remove-body-during-body-replacement_t01: Timeout
+LayoutTests/fast/dom/set-innerHTML_t01: RuntimeError
+LayoutTests/fast/dom/shadow/access-document-of-detached-stylesheetlist-crash_t01: RuntimeError
+LayoutTests/fast/dom/shadow/base-in-shadow-tree_t01: RuntimeError
+LayoutTests/fast/dom/shadow/content-element-includer_t01: RuntimeError
+LayoutTests/fast/dom/shadow/content-pseudo-element-dynamic-attribute-change_t01: RuntimeError
+LayoutTests/fast/dom/shadow/content-pseudo-element-relative-selector-css-text_t01: RuntimeError
+LayoutTests/fast/dom/shadow/content-pseudo-element-with-host-pseudo-class_t01: RuntimeError
+LayoutTests/fast/dom/shadow/distribution-for-event-path_t01: RuntimeError
+LayoutTests/fast/dom/shadow/elementfrompoint_t01: RuntimeError
+LayoutTests/fast/dom/shadow/elements-in-frameless-document_t01: RuntimeError
+LayoutTests/fast/dom/shadow/getComputedStyle-composed-parent-dirty_t01: RuntimeError
+LayoutTests/fast/dom/shadow/getelementbyid-in-orphan_t01: RuntimeError
+LayoutTests/fast/dom/shadow/insertion-point-shadow-crash_t01: RuntimeError
+LayoutTests/fast/dom/shadow/insertion-point-video-crash_t01: RuntimeError
+LayoutTests/fast/dom/shadow/link-in-shadow-tree_t01: RuntimeError
+LayoutTests/fast/dom/shadow/offsetWidth-host-style-change_t01: RuntimeError
+LayoutTests/fast/dom/shadow/olderShadowRoot_t01: RuntimeError
+LayoutTests/fast/dom/shadow/pseudoclass-update-checked-option_t01: RuntimeError
+LayoutTests/fast/dom/shadow/pseudoclass-update-disabled-optgroup_t01: RuntimeError
+LayoutTests/fast/dom/shadow/pseudoclass-update-disabled-option_t01: RuntimeError
+LayoutTests/fast/dom/shadow/shadow-content-crash_t01: RuntimeError
+LayoutTests/fast/dom/shadow/shadow-disable_t01: RuntimeError
+LayoutTests/fast/dom/shadow/shadow-hierarchy-exception_t01: RuntimeError
+LayoutTests/fast/dom/shadow/shadow-removechild-and-blur-event_t01: RuntimeError
+LayoutTests/fast/dom/shadow/shadow-root-node-list_t01: RuntimeError
+LayoutTests/fast/dom/shadow/shadow-root-text-child_t01: RuntimeError
+LayoutTests/fast/dom/shadow/shadow-ul-li_t01: RuntimeError
+LayoutTests/fast/dom/shadow/shadowdom-for-input-type-change_t01: RuntimeError
+LayoutTests/fast/dom/shadow/shadowroot-host_t01: RuntimeError
+LayoutTests/fast/dom/shadow/sibling-rules-dynamic-changes_t01: RuntimeError
+LayoutTests/fast/dom/shadow/stale-distribution-after-shadow-removal_t01: RuntimeError
+LayoutTests/fast/dynamic/checkbox-selection-crash_t01: RuntimeError
+LayoutTests/fast/dynamic/crash-generated-counter_t01: RuntimeError
+LayoutTests/fast/dynamic/crash-generated-image_t01: RuntimeError
+LayoutTests/fast/dynamic/crash-generated-text_t01: RuntimeError
+LayoutTests/fast/events/change-overflow-on-overflow-change_t01: Timeout
+LayoutTests/fast/events/clipboard-clearData_t01: Timeout
+LayoutTests/fast/events/clipboard-dataTransferItemList_t01: Timeout
+LayoutTests/fast/events/event-creation_t01: RuntimeError
+LayoutTests/fast/events/event-listener-html-non-html-confusion_t01: RuntimeError
+LayoutTests/fast/events/event-on-xhr-document_t01: RuntimeError
+LayoutTests/fast/events/fire-scroll-event_t01: RuntimeError
+LayoutTests/fast/events/init-message-event_t01: RuntimeError
+LayoutTests/fast/events/input-focus-no-duplicate-events_t01: RuntimeError, Pass
+LayoutTests/fast/events/invalid-002_t01: RuntimeError
+LayoutTests/fast/events/invalid-003_t01: RuntimeError
+LayoutTests/fast/events/mutation-during-replace-child_t01: RuntimeError
+LayoutTests/fast/events/nested-event-remove-node-crash_t01: Timeout
+LayoutTests/fast/events/overflowchanged-event-raf-timing_t01: RuntimeError
+LayoutTests/fast/events/scoped/editing-commands_t01: RuntimeError
+LayoutTests/fast/events/selectstart-on-selectall_t01: RuntimeError
+LayoutTests/fast/events/tabindex-removal-from-focused-element_t01: RuntimeError, Pass
+LayoutTests/fast/exclusions/parsing/parsing-wrap-through_t01: RuntimeError
+LayoutTests/fast/files/blob-close-read_t01: RuntimeError
+LayoutTests/fast/files/blob-constructor_t01: RuntimeError
+LayoutTests/fast/files/read-blob-as-array-buffer_t01: RuntimeError
+LayoutTests/fast/filesystem/async-operations_t01: RuntimeError
+LayoutTests/fast/filesystem/directory-entry-to-uri_t01: RuntimeError
+LayoutTests/fast/filesystem/file-after-reload-crash_t01: RuntimeError
+LayoutTests/fast/filesystem/file-entry-to-uri_t01: RuntimeError
+LayoutTests/fast/filesystem/file-metadata-after-write_t01: RuntimeError
+LayoutTests/fast/filesystem/file-writer-abort-continue_t01: RuntimeError
+LayoutTests/fast/filesystem/file-writer-events_t01: RuntimeError
+LayoutTests/fast/filesystem/file-writer-truncate-extend_t01: RuntimeError
+LayoutTests/fast/filesystem/file-writer-write-overlapped_t01: RuntimeError
+LayoutTests/fast/filesystem/filesystem-unserializable_t01: RuntimeError
+LayoutTests/fast/filesystem/filesystem-uri-origin_t01: RuntimeError
+LayoutTests/fast/filesystem/op-copy_t01: RuntimeError
+LayoutTests/fast/filesystem/op-get-metadata_t01: RuntimeError
+LayoutTests/fast/filesystem/op-get-parent_t01: RuntimeError
+LayoutTests/fast/filesystem/op-read-directory_t01: RuntimeError
+LayoutTests/fast/filesystem/op-restricted-chars_t01: RuntimeError
+LayoutTests/fast/filesystem/op-restricted-names_t01: RuntimeError
+LayoutTests/fast/filesystem/read-directory_t01: RuntimeError
+LayoutTests/fast/filesystem/simple-readonly-file-object_t01: RuntimeError
+LayoutTests/fast/filesystem/simple-temporary_t01: RuntimeError
+LayoutTests/fast/filesystem/snapshot-file-with-gc_t01: RuntimeError
+LayoutTests/fast/forms/ValidityState-customError_t01: RuntimeError
+LayoutTests/fast/forms/ValidityState-tooLong-textarea_t01: RuntimeError
+LayoutTests/fast/forms/ValidityState-typeMismatch-email_t01: RuntimeError
+LayoutTests/fast/forms/ValidityState-typeMismatch-url_t01: RuntimeError
+LayoutTests/fast/forms/ValidityState-valueMissing-004_t01: RuntimeError
+LayoutTests/fast/forms/autocomplete_t01: RuntimeError
+LayoutTests/fast/forms/autofocus-focus-only-once_t01: Timeout
+LayoutTests/fast/forms/autofocus-input-css-style-change_t01: Timeout
+LayoutTests/fast/forms/autofocus-opera-004_t01: RuntimeError
+LayoutTests/fast/forms/autofocus-opera-007_t01: Timeout
+LayoutTests/fast/forms/autofocus-readonly-attribute_t01: Timeout
+LayoutTests/fast/forms/button/button-disabled-blur_t01: RuntimeError
+LayoutTests/fast/forms/date-multiple-fields/date-multiple-fields-onblur-setvalue-onfocusremoved_t01: RuntimeError
+LayoutTests/fast/forms/date/ValidityState-typeMismatch-date_t01: RuntimeError
+LayoutTests/fast/forms/date/date-interactive-validation-required_t01: RuntimeError, Pass
+LayoutTests/fast/forms/date/date-pseudo-classes_t01: RuntimeError
+LayoutTests/fast/forms/date/input-date-validation-message_t01: RuntimeError
+LayoutTests/fast/forms/datetimelocal/datetimelocal-input-type_t01: RuntimeError
+LayoutTests/fast/forms/datetimelocal/input-valueasdate-datetimelocal_t01: RuntimeError
+LayoutTests/fast/forms/datetimelocal/input-valueasnumber-datetimelocal_t01: RuntimeError
+LayoutTests/fast/forms/fieldset/fieldset-disabled_t01: RuntimeError
+LayoutTests/fast/forms/focus-style-pending_t01: Timeout
+LayoutTests/fast/forms/focus_t01: RuntimeError
+LayoutTests/fast/forms/form-attribute-nonexistence-form-id_t01: RuntimeError
+LayoutTests/fast/forms/formmethod-attribute-input-2_t01: RuntimeError, Pass
+LayoutTests/fast/forms/formmethod-attribute-input-html_t01: RuntimeError, Pass
+LayoutTests/fast/forms/incremental-dom-property_t01: RuntimeError
+LayoutTests/fast/forms/input-appearance-elementFromPoint_t01: RuntimeError
+LayoutTests/fast/forms/input-appearance-maxlength_t01: RuntimeError
+LayoutTests/fast/forms/input-changing-value_t01: RuntimeError
+LayoutTests/fast/forms/input-file-set-value_t01: RuntimeError
+LayoutTests/fast/forms/input-implicit-length-limit_t01: RuntimeError
+LayoutTests/fast/forms/input-inputmode_t01: RuntimeError
+LayoutTests/fast/forms/input-maxlength-unsupported_t01: RuntimeError
+LayoutTests/fast/forms/input-type-change_t01: RuntimeError
+LayoutTests/fast/forms/input-value-sanitization_t01: RuntimeError
+LayoutTests/fast/forms/input-width-height-attributes_t01: RuntimeError
+LayoutTests/fast/forms/listbox-select-all_t01: RuntimeError
+LayoutTests/fast/forms/listbox-selection-2_t01: RuntimeError
+LayoutTests/fast/forms/missing-action_t01: RuntimeError, Pass
+LayoutTests/fast/forms/onchange-change-type_t01: RuntimeError
+LayoutTests/fast/forms/option-change-single-selected_t01: RuntimeError
+LayoutTests/fast/forms/option-strip-unicode-spaces_t01: RuntimeError
+LayoutTests/fast/forms/parser-associated-form-removal_t01: RuntimeError
+LayoutTests/fast/forms/paste-into-textarea_t01: RuntimeError
+LayoutTests/fast/forms/plaintext-mode-1_t01: RuntimeError
+LayoutTests/fast/forms/select-change-popup-to-listbox-in-event-handler_t01: Timeout
+LayoutTests/fast/forms/select-clientheight-large-size_t01: RuntimeError
+LayoutTests/fast/forms/selection-direction_t01: RuntimeError
+LayoutTests/fast/forms/selection-wrongtype_t01: RuntimeError
+LayoutTests/fast/forms/shadow-tree-exposure_t01: RuntimeError
+LayoutTests/fast/forms/submit-form-with-dirname-attribute-with-ancestor-dir-attribute_t01: RuntimeError, Pass
+LayoutTests/fast/forms/textarea-paste-newline_t01: RuntimeError
+LayoutTests/fast/forms/textarea-set-defaultvalue-after-value_t01: RuntimeError
+LayoutTests/fast/forms/textarea-trailing-newline_t01: RuntimeError
+LayoutTests/fast/forms/textfield-focus-out_t01: Timeout
+LayoutTests/fast/forms/validationMessage_t01: RuntimeError
+LayoutTests/fast/forms/willvalidate_t01: RuntimeError
+LayoutTests/fast/html/adjacent-html-context-element_t01: RuntimeError
+LayoutTests/fast/html/article-element_t01: RuntimeError
+LayoutTests/fast/html/details-add-child-2_t01: RuntimeError
+LayoutTests/fast/html/details-add-details-child-1_t01: RuntimeError
+LayoutTests/fast/html/details-add-details-child-2_t01: RuntimeError
+LayoutTests/fast/html/details-click-controls_t01: RuntimeError
+LayoutTests/fast/html/figure-element_t01: RuntimeError
+LayoutTests/fast/html/header-element_t01: RuntimeError
+LayoutTests/fast/html/hgroup-element_t01: RuntimeError
+LayoutTests/fast/html/hidden-attr_t01: RuntimeError
+LayoutTests/fast/html/imports/import-element-removed-flag_t01: Timeout
+LayoutTests/fast/html/main-element_t01: RuntimeError
+LayoutTests/fast/html/select-dropdown-consistent-background-color_t01: RuntimeError
+LayoutTests/fast/inline/boundingBox-with-continuation_t01: RuntimeError
+LayoutTests/fast/inline/inline-position-top-align_t01: RuntimeError
+LayoutTests/fast/inline/parent-inline-element-padding-contributes-width_t01: RuntimeError
+LayoutTests/fast/inline/positioned-element-padding-contributes-width_t01: RuntimeError
+LayoutTests/fast/innerHTML/javascript-url_t01: RuntimeError
+LayoutTests/fast/lists/marker-preferred-margins_t01: RuntimeError
+LayoutTests/fast/loader/about-blank-hash-change_t01: RuntimeError
+LayoutTests/fast/loader/about-blank-hash-kept_t01: RuntimeError
+LayoutTests/fast/loader/local-css-allowed-in-strict-mode_t01: RuntimeError
+LayoutTests/fast/loader/onhashchange-attribute-listeners_t01: Timeout
+LayoutTests/fast/loader/scroll-position-restored-on-back_t01: Timeout
+LayoutTests/fast/masking/parsing-clip-path-shape_t01: RuntimeError
+LayoutTests/fast/masking/parsing-mask_t01: RuntimeError
+LayoutTests/fast/media/invalid-lengths_t01: RuntimeError
+LayoutTests/fast/media/matchmedium-query-api_t01: RuntimeError
+LayoutTests/fast/media/media-query-list-syntax_t01: RuntimeError
+LayoutTests/fast/media/mq-append-delete_t01: RuntimeError
+LayoutTests/fast/mediastream/RTCPeerConnection-AddRemoveStream_t01: RuntimeError
+LayoutTests/fast/mediastream/RTCPeerConnection_t01: RuntimeError
+LayoutTests/fast/multicol/break-after-always-bottom-margin_t01: RuntimeError
+LayoutTests/fast/multicol/cssom-view_t01: RuntimeError
+LayoutTests/fast/multicol/float-truncation_t01: RuntimeError
+LayoutTests/fast/multicol/gap-non-negative_t01: RuntimeError
+LayoutTests/fast/multicol/hit-test-end-of-column_t01: RuntimeError
+LayoutTests/fast/multicol/hit-test-float_t01: RuntimeError
+LayoutTests/fast/multicol/hit-test-gap-between-pages-flipped_t01: RuntimeError
+LayoutTests/fast/multicol/image-inside-nested-blocks-with-border_t01: RuntimeError
+LayoutTests/fast/multicol/inline-getclientrects_t01: RuntimeError
+LayoutTests/fast/multicol/vertical-lr/float-truncation_t01: RuntimeError
+LayoutTests/fast/multicol/vertical-rl/float-truncation_t01: RuntimeError
+LayoutTests/fast/multicol/widows_t01: RuntimeError
+LayoutTests/fast/multicol/zeroColumnCount_t01: RuntimeError
+LayoutTests/fast/overflow/scrollbar-restored_t01: RuntimeError
+LayoutTests/fast/parser/fragment-parser-doctype_t01: RuntimeError
+LayoutTests/fast/parser/stray-param_t01: RuntimeError
+LayoutTests/fast/parser/strict-img-in-map_t01: RuntimeError
+LayoutTests/fast/replaced/available-height-for-content_t01: RuntimeError
+LayoutTests/fast/replaced/container-width-zero_t01: RuntimeError
+LayoutTests/fast/replaced/table-percent-height_t01: RuntimeError
+LayoutTests/fast/replaced/table-percent-width_t01: RuntimeError
+LayoutTests/fast/ruby/ruby-line-height_t01: RuntimeError
+LayoutTests/fast/scrolling/scroll-element-into-view_t01: RuntimeError
+LayoutTests/fast/shapes/parsing/parsing-shape-margin_t01: RuntimeError
+LayoutTests/fast/shapes/parsing/parsing-shape-outside-none_t01: RuntimeError
+LayoutTests/fast/shapes/shape-outside-floats/shape-outside-floats-inset-rounded-different-writing-modes-left_t01: RuntimeError
+LayoutTests/fast/shapes/shape-outside-floats/shape-outside-rounded-boxes_t01: RuntimeError
+LayoutTests/fast/shapes/shape-outside-floats/shape-outside-rounded-boxes_t02: RuntimeError
+LayoutTests/fast/speechsynthesis/speech-synthesis-boundary-events_t01: Timeout, RuntimeError, Pass
+LayoutTests/fast/speechsynthesis/speech-synthesis-cancel_t01: Timeout
+LayoutTests/fast/speechsynthesis/speech-synthesis-pause-resume_t01: Timeout
+LayoutTests/fast/speechsynthesis/speech-synthesis-speak_t01: Timeout
+LayoutTests/fast/storage/storage-disallowed-in-data-url_t01: RuntimeError
+LayoutTests/fast/svg/whitespace-angle_t01: RuntimeError
+LayoutTests/fast/svg/whitespace-length_t01: RuntimeError
+LayoutTests/fast/svg/whitespace-number_t01: RuntimeError
+LayoutTests/fast/table/incorrect-colgroup-span-values_t01: RuntimeError
+LayoutTests/fast/table/min-width-css-block-table_t01: RuntimeError
+LayoutTests/fast/table/table-size-integer-overflow_t01: RuntimeError
+LayoutTests/fast/table/td-bordercolor-attribute_t01: RuntimeError
+LayoutTests/fast/text/find-kana_t01: RuntimeError
+LayoutTests/fast/text/find-russian_t01: RuntimeError
+LayoutTests/fast/text/find-soft-hyphen_t01: RuntimeError
+LayoutTests/fast/text/international/iso-8859-8_t01: RuntimeError
+LayoutTests/fast/text/line-break-after-empty-inline-hebrew_t01: RuntimeError
+LayoutTests/fast/text/line-break-after-inline-latin1_t01: RuntimeError
+LayoutTests/fast/text/multiglyph-characters_t01: RuntimeError
+LayoutTests/fast/text/offsetForPosition-cluster-at-zero_t01: RuntimeError
+LayoutTests/fast/text/sub-pixel/text-scaling-ltr_t01: RuntimeError
+LayoutTests/fast/text/sub-pixel/text-scaling-vertical_t01: RuntimeError
+LayoutTests/fast/text/sub-pixel/text-scaling-webfont_t01: RuntimeError
+LayoutTests/fast/text/window-find_t01: RuntimeError
+LayoutTests/fast/text/zero-width-characters-complex-script_t01: RuntimeError
+LayoutTests/fast/url/anchor_t01: RuntimeError
+LayoutTests/fast/url/file-http-base_t01: RuntimeError
+LayoutTests/fast/url/file_t01: RuntimeError
+LayoutTests/fast/url/host-lowercase-per-scheme_t01: RuntimeError
+LayoutTests/fast/url/idna2003_t01: RuntimeError
+LayoutTests/fast/url/idna2008_t01: RuntimeError
+LayoutTests/fast/url/invalid-urls-utf8_t01: RuntimeError
+LayoutTests/fast/url/ipv4_t01: RuntimeError
+LayoutTests/fast/url/ipv6_t01: RuntimeError
+LayoutTests/fast/url/mailto_t01: RuntimeError
+LayoutTests/fast/url/path_t01: RuntimeError
+LayoutTests/fast/url/query_t01: RuntimeError
+LayoutTests/fast/url/relative-win_t01: RuntimeError
+LayoutTests/fast/url/relative_t01: RuntimeError
+LayoutTests/fast/url/segments_t01: RuntimeError
+LayoutTests/fast/url/standard-url_t01: RuntimeError
+LayoutTests/fast/writing-mode/flipped-blocks-hit-test-overflow_t01: RuntimeError
+LayoutTests/fast/writing-mode/flipped-blocks-text-map-local-to-container_t01: RuntimeError
+LayoutTests/fast/writing-mode/positionForPoint_t01: RuntimeError
+LayoutTests/fast/writing-mode/table-hit-test_t01: RuntimeError
+LayoutTests/fast/writing-mode/vertical-inline-block-hittest_t01: RuntimeError
+LayoutTests/fast/xmlhttprequest/xmlhttprequest-responseXML-html-document-responsetype-quirks_t01: RuntimeError
+LayoutTests/fast/xmlhttprequest/xmlhttprequest-responseXML-xml-text-responsetype_t01: RuntimeError
+LayoutTests/fast/xpath/4XPath/Borrowed/od_20000608_t01: RuntimeError
+LayoutTests/fast/xpath/4XPath/Core/test_node_test_t02: RuntimeError
+LayoutTests/fast/xpath/4XPath/Core/test_parser_t01: RuntimeError
+LayoutTests/fast/xpath/ambiguous-operators_t01: RuntimeError
+LayoutTests/fast/xpath/ensure-null-namespace_t01: RuntimeError
+LayoutTests/fast/xpath/implicit-node-args_t01: RuntimeError
+LayoutTests/fast/xpath/node-name-case-sensitivity_t02: RuntimeError
+LayoutTests/fast/xpath/py-dom-xpath/expressions_t01: RuntimeError
+LayoutTests/fast/xsl/default-html_t01: RuntimeError
+LibTest/async/Future/Future.delayed_A01_t02: RuntimeError, Pass
+LibTest/async/Future/asStream_A01_t02: RuntimeError
+LibTest/async/Stream/Stream.fromFutures_A04_t01: RuntimeError
+LibTest/async/Stream/Stream.fromFutures_A04_t02: RuntimeError
+LibTest/async/Stream/Stream.fromIterable_A02_t01: RuntimeError
+LibTest/async/Stream/Stream.fromIterable_A03_t01: Timeout, Pass
+LibTest/async/Stream/Stream.fromIterable_A03_t02: RuntimeError
+LibTest/async/Stream/Stream.periodic_A04_t02: RuntimeError
+LibTest/async/Stream/Stream.periodic_A04_t03: RuntimeError
+LibTest/async/StreamController/StreamController.broadcast_A03_t02: RuntimeError
+LibTest/async/StreamController/StreamController.broadcast_A09_t01: Timeout, Pass
+LibTest/async/StreamController/StreamController.broadcast_A09_t02: RuntimeError
+LibTest/async/StreamController/StreamController.broadcast_A09_t03: RuntimeError
+LibTest/async/StreamController/StreamController.broadcast_A10_t02: RuntimeError
+LibTest/async/StreamController/StreamController.broadcast_A10_t03: RuntimeError
+LibTest/async/StreamController/addStream_A03_t01: RuntimeError
+LibTest/async/StreamController/stream_A02_t01: Timeout, Pass
+LibTest/async/StreamController/stream_A02_t03: RuntimeError
+LibTest/async/StreamController/stream_A03_t01: Timeout, Pass
+LibTest/async/StreamController/stream_A03_t02: RuntimeError
+LibTest/async/StreamSink/addStream_A01_t02: RuntimeError
+LibTest/async/StreamTransformer/StreamTransformer.fromHandlers_A01_t03: RuntimeError
+LibTest/async/Zone/registerBinaryCallback_A01_t01: RuntimeError
+LibTest/collection/DoubleLinkedQueue/fold_A01_t01: RuntimeError
+LibTest/collection/DoubleLinkedQueue/removeWhere_A02_t03: RuntimeError
+LibTest/collection/DoubleLinkedQueue/retainWhere_A02_t02: RuntimeError
+LibTest/collection/HashSet/HashSet_A04_t01: RuntimeError
+LibTest/collection/HashSet/HashSet_class_A01_t01: RuntimeError
+LibTest/collection/IterableBase/IterableBase_class_A01_t02: RuntimeError
+LibTest/collection/IterableMixin/contains_A02_t01: RuntimeError
+LibTest/collection/IterableMixin/every_A01_t02: RuntimeError
+LibTest/collection/IterableMixin/expand_A01_t01: RuntimeError
+LibTest/collection/IterableMixin/expand_A02_t01: RuntimeError
+LibTest/collection/IterableMixin/fold_A01_t01: RuntimeError
+LibTest/collection/LinkedList/addAll_A01_t02: RuntimeError
+LibTest/collection/LinkedList/join_A01_t01: RuntimeError
+LibTest/collection/LinkedList/toString_A03_t01: RuntimeError
+LibTest/collection/LinkedListEntry/LinkedListEntry_class_A03_t01: RuntimeError
+LibTest/collection/LinkedListEntry/insertAfter_A02_t02: RuntimeError
+LibTest/collection/LinkedListEntry/insertBefore_A01_t01: RuntimeError
+LibTest/collection/LinkedListEntry/insertBefore_A01_t02: RuntimeError
+LibTest/collection/LinkedListEntry/list_A01_t01: RuntimeError
+LibTest/collection/LinkedListEntry/next_A01_t02: RuntimeError
+LibTest/collection/LinkedListEntry/next_A01_t03: RuntimeError
+LibTest/collection/LinkedListEntry/previous_A01_t02: RuntimeError
+LibTest/collection/LinkedListEntry/previous_A01_t03: RuntimeError
+LibTest/collection/LinkedListEntry/unlink_A01_t01: RuntimeError
+LibTest/collection/LinkedListEntry/unlink_A02_t02: RuntimeError
+LibTest/collection/ListMixin/ListMixin_class_A01_t01: RuntimeError
+LibTest/collection/ListQueue/ListQueue.from_A01_t01: RuntimeError
+LibTest/convert/LineSplitter/fuse_A01_t01: RuntimeError
+LibTest/core/AssertionError/AssertionError_A01_t01: RuntimeError
+LibTest/core/AssertionError/message_A01_t01: RuntimeError
+LibTest/core/CyclicInitializationError/CyclicInitializationError.class_A01_t01: RuntimeError
+LibTest/core/CyclicInitializationError/variableName_A01_t01: RuntimeError
+LibTest/core/DateTime/DateTime.fromMicrosecondsSinceEpoch_A01_t01: RuntimeError
+LibTest/core/DateTime/microsecond_A01_t01: RuntimeError
+LibTest/core/DateTime/microsecondsSinceEpoch_A01_t01: RuntimeError
+LibTest/core/DateTime/parse_A01_t03: RuntimeError
+LibTest/core/DateTime/to8601String_A01_t01: RuntimeError
+LibTest/core/DateTime/to8601String_A01_t02: RuntimeError
+LibTest/core/Duration/Duration_A01_t01: CompileTimeError
+LibTest/core/Duration/Duration_A02_t01: CompileTimeError
+LibTest/core/Duration/inDays_A01_t01: CompileTimeError
+LibTest/core/Duration/inHours_A01_t01: CompileTimeError
+LibTest/core/Duration/inMicroseconds_A01_t01: CompileTimeError
+LibTest/core/Duration/inMilliseconds_A01_t01: CompileTimeError
+LibTest/core/Duration/inSeconds_A01_t01: CompileTimeError
+LibTest/core/Error/stackTrace_A01_t01: RuntimeError
+LibTest/core/Expando/operator_square_brackets_A01_t01: RuntimeError
+LibTest/core/Expando/operator_square_brackets_A01_t04: RuntimeError
+LibTest/core/Expando/operator_square_brackets_A01_t05: RuntimeError
+LibTest/core/Function/Function_class_A01_t01: RuntimeError
+LibTest/core/IndexError/stackTrace_A01_t01: RuntimeError
+LibTest/core/RegExp/Pattern_semantics/firstMatch_NonEmptyClassRanges_A01_t01: RuntimeError
+LibTest/core/Runes/any_A01_t01: RuntimeError
+LibTest/core/Runes/every_A01_t01: RuntimeError
+LibTest/core/String/padRight_A01_t01: RuntimeError
+LibTest/core/String/replaceFirstMapped_A03_t01: RuntimeError
+LibTest/core/Symbol/Symbol_A01_t04: RuntimeError
+LibTest/core/Uri/Uri.dataFromBytes_A01_t02: RuntimeError
+LibTest/core/Uri/Uri.dataFromBytes_A01_t03: RuntimeError
+LibTest/core/Uri/Uri.dataFromBytes_A01_t04: RuntimeError
+LibTest/core/Uri/Uri.dataFromBytes_A01_t05: RuntimeError
+LibTest/core/Uri/Uri.dataFromString_A01_t01: RuntimeError
+LibTest/core/Uri/Uri.dataFromString_A01_t03: RuntimeError
+LibTest/core/Uri/Uri.dataFromString_A01_t04: RuntimeError
+LibTest/core/Uri/Uri.dataFromString_A02_t03: RuntimeError
+LibTest/core/Uri/Uri.file_A02_t03: RuntimeError
+LibTest/core/Uri/decodeComponent_A01_t02: Timeout, Pass
+LibTest/core/Uri/encodeQueryComponent_A01_t02: Timeout
+LibTest/core/Uri/queryParametersAll_A01_t04: RuntimeError
+LibTest/core/Uri/queryParametersAll_A03_t01: RuntimeError
+LibTest/core/UriData/UriData.fromBytes_A01_t03: RuntimeError
+LibTest/core/UriData/charset_A01_t01: RuntimeError
+LibTest/core/UriData/contentText_A01_t01: RuntimeError
+LibTest/core/UriData/parse_A01_t01: RuntimeError
+LibTest/core/double/INFINITY_A01_t04: RuntimeError
+LibTest/core/double/NEGATIVE_INFINITY_A01_t04: RuntimeError
+LibTest/core/double/isInfinite_A01_t03: CompileTimeError
+LibTest/core/double/operator_GE_A01_t02: CompileTimeError
+LibTest/core/double/operator_GT_A01_t02: CompileTimeError
+LibTest/core/double/operator_LT_A01_t02: CompileTimeError
+LibTest/core/double/operator_addition_A01_t08: Crash
+LibTest/core/double/operator_subtraction_A01_t06: RuntimeError
+LibTest/core/double/operator_subtraction_A01_t09: Crash
+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/hashCode_A01_t01: CompileTimeError
+LibTest/core/int/isInfinite_A01_t01: CompileTimeError
+LibTest/core/int/isNegative_A01_t01: CompileTimeError
+LibTest/core/int/isOdd_A01_t01: RuntimeError
+LibTest/core/int/operator_AND_A01_t01: CompileTimeError
+LibTest/core/int/operator_GE_A01_t01: CompileTimeError
+LibTest/core/int/operator_LT_A01_t01: CompileTimeError
+LibTest/core/int/operator_XOR_A01_t01: CompileTimeError
+LibTest/core/int/operator_addition_A01_t01: CompileTimeError
+LibTest/core/int/operator_equality_A01_t01: CompileTimeError
+LibTest/core/int/operator_equality_A03_t01: CompileTimeError
+LibTest/core/int/operator_left_shift_A01_t01: RuntimeError
+LibTest/core/int/operator_remainder_A01_t03: RuntimeError
+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: RuntimeError
+LibTest/core/int/operator_unary_minus_A01_t01: CompileTimeError
+LibTest/core/int/parse_A03_t02: CompileTimeError
+LibTest/core/int/roundToDouble_A01_t01: CompileTimeError
+LibTest/core/int/truncateToDouble_A01_t01: CompileTimeError
+LibTest/html/CanvasRenderingContext2D/addEventListener_A01_t03: Timeout
+LibTest/html/Element/blur_A01_t01: Timeout
+LibTest/html/Element/focus_A01_t01: Timeout
+LibTest/html/Element/loadEvent_A01_t01: Timeout
+LibTest/html/Element/mouseEnterEvent_A01_t01: RuntimeError
+LibTest/html/Element/mouseWheelEvent_A01_t01: Timeout
+LibTest/html/Element/onLoad_A01_t01: Timeout
+LibTest/html/Element/onMouseWheel_A01_t01: Timeout
+LibTest/html/HttpRequest/responseText_A01_t02: Timeout
+LibTest/html/HttpRequestUpload/onAbort_A01_t01: Timeout
+LibTest/html/HttpRequestUpload/onError_A01_t02: Timeout
+LibTest/html/HttpRequestUpload/onLoadEnd_A01_t01: Timeout
+LibTest/html/HttpRequestUpload/onLoadStart_A01_t01: Timeout
+LibTest/html/HttpRequestUpload/onLoad_A01_t01: Timeout
+LibTest/html/IFrameElement/enteredView_A01_t01: Timeout
+LibTest/html/IFrameElement/focus_A01_t01: Timeout
+LibTest/html/IFrameElement/onMouseWheel_A01_t01: Timeout
+Utils/tests/Expect/throws_A01_t04: RuntimeError
+WebPlatformTest/DOMEvents/approved/ProcessingInstruction.DOMCharacterDataModified_t01: Timeout
+WebPlatformTest/DOMEvents/approved/addEventListener.optional.useCapture_t01: RuntimeError
+WebPlatformTest/Utils/test/asyncTestFail_t01: RuntimeError
+WebPlatformTest/Utils/test/asyncTestFail_t02: RuntimeError
+WebPlatformTest/Utils/test/asyncTestTimeout_t01: Timeout
+WebPlatformTest/custom-elements/concepts/type_A04_t01: RuntimeError
+WebPlatformTest/custom-elements/concepts/type_A08_t01: RuntimeError
+WebPlatformTest/custom-elements/instantiating/createElementNS_A03_t01: RuntimeError
+WebPlatformTest/custom-elements/instantiating/createElementNS_A04_t01: RuntimeError
+WebPlatformTest/custom-elements/instantiating/createElementNS_A05_t01: RuntimeError
+WebPlatformTest/custom-elements/instantiating/createElement_A01_t01: RuntimeError
+WebPlatformTest/custom-elements/instantiating/createElement_A02_t01: RuntimeError
+WebPlatformTest/custom-elements/instantiating/createElement_A04_t01: RuntimeError
+WebPlatformTest/custom-elements/instantiating/isAttribute_A01_t02: RuntimeError
+WebPlatformTest/custom-elements/instantiating/isAttribute_A03_t01: RuntimeError
+WebPlatformTest/custom-elements/instantiating/localName_A01_t01: RuntimeError
+WebPlatformTest/dom/events/type_A01_t01: RuntimeError
+WebPlatformTest/dom/nodes/DOMImplementation-createDocument_t01: RuntimeError
+WebPlatformTest/dom/nodes/Document-adoptNode_t01: RuntimeError
+WebPlatformTest/dom/nodes/Node-insertBefore_t01: RuntimeError
+WebPlatformTest/dom/nodes/Node-isEqualNode_t01: Timeout
+WebPlatformTest/dom/nodes/Node-nodeName_t01: RuntimeError
+WebPlatformTest/dom/nodes/attributes/setAttributeNS_A07_t03: RuntimeError
+WebPlatformTest/dom/nodes/attributes/setAttribute_A03_t01: RuntimeError
+WebPlatformTest/html-imports/link-import_t02: RuntimeError
+WebPlatformTest/html-imports/loading-import_t01: RuntimeError
+WebPlatformTest/html-templates/innerhtml-on-templates/innerhtml_t01: RuntimeError
+WebPlatformTest/html-templates/parsing-html-templates/additions-to-the-in-head-insertion-mode/generating-of-implied-end-tags_t01: RuntimeError
+WebPlatformTest/html-templates/parsing-html-templates/clearing-the-stack-back-to-a-given-context/clearing-stack-back-to-a-table-body-context_t01: RuntimeError
+WebPlatformTest/html-templates/template-element/node-document-changes_t01: RuntimeError
+WebPlatformTest/html-templates/template-element/template-as-a-descendant_t01: RuntimeError
+WebPlatformTest/html/browsers/browsing-the-web/read-media/pageload-video_t01: RuntimeError
+WebPlatformTest/html/dom/documents/dom-tree-accessors/document.body-setter_t01: RuntimeError
+WebPlatformTest/html/dom/documents/dom-tree-accessors/document.getElementsByName-namespace_t01: RuntimeError
+WebPlatformTest/html/dom/documents/dom-tree-accessors/document.getElementsByName-newelements_t01: RuntimeError
+WebPlatformTest/html/dom/elements/global-attributes/dataset-get_t01: RuntimeError
+WebPlatformTest/html/semantics/embedded-content/media-elements/error-codes/error_t01: Timeout
+WebPlatformTest/html/semantics/embedded-content/media-elements/interfaces/HTMLElement/HTMLMediaElement/addTextTrack_t01: RuntimeError
+WebPlatformTest/html/semantics/embedded-content/media-elements/interfaces/HTMLElement/HTMLTrackElement/kind_t01: RuntimeError
+WebPlatformTest/html/semantics/embedded-content/media-elements/interfaces/TextTrack/cues_t01: Timeout
+WebPlatformTest/html/semantics/embedded-content/media-elements/interfaces/TextTrack/kind_t01: RuntimeError
+WebPlatformTest/html/semantics/forms/textfieldselection/textfieldselection-setRangeText_t01: RuntimeError
+WebPlatformTest/html/semantics/forms/textfieldselection/textfieldselection-setSelectionRange_t01: RuntimeError
+WebPlatformTest/html/semantics/forms/the-button-element/button-validation_t01: RuntimeError
+WebPlatformTest/html/semantics/forms/the-form-element/form-elements-matches_t01: RuntimeError
+WebPlatformTest/html/semantics/forms/the-form-element/form-nameditem_t01: RuntimeError
+WebPlatformTest/html/semantics/forms/the-input-element/datetime_t02: RuntimeError
+WebPlatformTest/html/semantics/forms/the-input-element/input-type-button_t01: RuntimeError
+WebPlatformTest/html/semantics/forms/the-input-element/mobiles_t01: RuntimeError
+WebPlatformTest/html/semantics/forms/the-input-element/month_t01: RuntimeError
+WebPlatformTest/html/semantics/forms/the-input-element/password_t01: RuntimeError
+WebPlatformTest/html/semantics/forms/the-input-element/range_t01: RuntimeError
+WebPlatformTest/html/semantics/forms/the-input-element/time_t01: RuntimeError
+WebPlatformTest/html/semantics/forms/the-input-element/time_t02: RuntimeError
+WebPlatformTest/html/semantics/forms/the-input-element/type-change-state_t01: RuntimeError
+WebPlatformTest/html/semantics/forms/the-input-element/week_t01: RuntimeError
+WebPlatformTest/html/semantics/forms/the-option-element/option-text-spaces_t01: RuntimeError
+WebPlatformTest/html/semantics/forms/the-textarea-element/textarea-type_t01: RuntimeError
+WebPlatformTest/html/semantics/interactive-elements/the-dialog-element/dialog-close_t01: RuntimeError
+WebPlatformTest/html/semantics/selectors/pseudo-classes/checked_t01: RuntimeError
+WebPlatformTest/html/semantics/selectors/pseudo-classes/indeterminate_t01: RuntimeError
+WebPlatformTest/html/semantics/tabular-data/attributes-common-to-td-and-th-elements/cellIndex_t01: RuntimeError
+WebPlatformTest/html/semantics/tabular-data/the-table-element/table-rows_t01: RuntimeError
+WebPlatformTest/html/webappapis/system-state-and-capabilities/the-navigator-object/protocol_t00: RuntimeError
+WebPlatformTest/shadow-dom/elements-and-dom-objects/extensions-to-element-interface/attributes/test-001_t01: RuntimeError
+WebPlatformTest/shadow-dom/elements-and-dom-objects/extensions-to-element-interface/attributes/test-005_t01: RuntimeError
+WebPlatformTest/shadow-dom/elements-and-dom-objects/extensions-to-element-interface/methods/test-003_t01: RuntimeError
+WebPlatformTest/shadow-dom/elements-and-dom-objects/extensions-to-event-interface/event-path-001_t01: RuntimeError
+WebPlatformTest/shadow-dom/elements-and-dom-objects/shadowroot-object/shadowroot-attributes/test-009_t01: RuntimeError
+WebPlatformTest/shadow-dom/elements-and-dom-objects/shadowroot-object/shadowroot-attributes/test-011_t01: RuntimeError
+WebPlatformTest/shadow-dom/elements-and-dom-objects/shadowroot-object/shadowroot-attributes/test-013_t01: RuntimeError
+WebPlatformTest/shadow-dom/elements-and-dom-objects/shadowroot-object/shadowroot-methods/test-001_t01: RuntimeError
+WebPlatformTest/shadow-dom/elements-and-dom-objects/the-content-html-element/test-003_t01: RuntimeError
+WebPlatformTest/shadow-dom/elements-and-dom-objects/the-content-html-element/test-004_t02: RuntimeError
+WebPlatformTest/shadow-dom/elements-and-dom-objects/the-content-html-element/test-005_t01: RuntimeError
+WebPlatformTest/shadow-dom/elements-and-dom-objects/the-shadow-html-element/test-002_t01: RuntimeError
+WebPlatformTest/shadow-dom/elements-and-dom-objects/the-shadow-html-element/test-003_t01: RuntimeError
+WebPlatformTest/shadow-dom/elements-and-dom-objects/the-shadow-html-element/test-005_t01: RuntimeError
+WebPlatformTest/shadow-dom/events/event-dispatch/test-002_t01: RuntimeError
+WebPlatformTest/shadow-dom/events/event-retargeting/test-001_t01: RuntimeError
+WebPlatformTest/shadow-dom/events/events-that-are-always-stopped/test-001_t01: RuntimeError
+WebPlatformTest/shadow-dom/events/events-that-are-always-stopped/test-003_t01: RuntimeError
+WebPlatformTest/shadow-dom/events/events-that-are-always-stopped/test-005_t01: RuntimeError
+WebPlatformTest/shadow-dom/events/events-that-are-always-stopped/test-007_t01: RuntimeError
+WebPlatformTest/shadow-dom/events/events-that-are-always-stopped/test-008_t01: RuntimeError
+WebPlatformTest/shadow-dom/events/retargeting-focus-events/test-001_t04: RuntimeError
+WebPlatformTest/shadow-dom/events/retargeting-focus-events/test-001_t06: RuntimeError
+WebPlatformTest/shadow-dom/events/retargeting-relatedtarget/test-001_t01: RuntimeError
+WebPlatformTest/shadow-dom/html-elements-and-their-shadow-trees/test-001_t01: RuntimeError
+WebPlatformTest/shadow-dom/html-elements-and-their-shadow-trees/test-003_t01: RuntimeError
+WebPlatformTest/shadow-dom/html-elements-and-their-shadow-trees/test-004_t01: RuntimeError
+WebPlatformTest/shadow-dom/html-elements-in-shadow-trees/html-forms/test-001_t01: RuntimeError
+WebPlatformTest/shadow-dom/html-elements-in-shadow-trees/html-forms/test-002_t01: RuntimeError
+WebPlatformTest/shadow-dom/shadow-trees/custom-pseudo-elements/test-001_t01: RuntimeError
+WebPlatformTest/shadow-dom/shadow-trees/distributed-pseudo-element/test-002_t01: RuntimeError
+WebPlatformTest/shadow-dom/shadow-trees/hosting-multiple-shadow-trees/test-003_t01: RuntimeError
+WebPlatformTest/shadow-dom/shadow-trees/lower-boundary-encapsulation/distribution-003_t01: RuntimeError
+WebPlatformTest/shadow-dom/shadow-trees/lower-boundary-encapsulation/test-005_t01: RuntimeError
+WebPlatformTest/shadow-dom/shadow-trees/nested-shadow-trees/test-001_t01: RuntimeError
+WebPlatformTest/shadow-dom/shadow-trees/reprojection/test-001_t01: RuntimeError
+WebPlatformTest/shadow-dom/shadow-trees/satisfying-matching-criteria/test-006_t01: RuntimeError
+WebPlatformTest/shadow-dom/shadow-trees/upper-boundary-encapsulation/ownerdocument-002_t01: RuntimeError
+WebPlatformTest/shadow-dom/shadow-trees/upper-boundary-encapsulation/test-005_t01: RuntimeError
+WebPlatformTest/shadow-dom/shadow-trees/upper-boundary-encapsulation/test-011_t01: RuntimeError
+WebPlatformTest/webstorage/event_constructor_t02: RuntimeError
+WebPlatformTest/webstorage/event_local_key_t01: Timeout
+WebPlatformTest/webstorage/event_local_newvalue_t01: Timeout
+WebPlatformTest/webstorage/event_local_oldvalue_t01: Timeout
+WebPlatformTest/webstorage/event_local_storagearea_t01: Timeout
+WebPlatformTest/webstorage/event_local_url_t01: Timeout
+WebPlatformTest/webstorage/event_session_key_t01: Timeout
+WebPlatformTest/webstorage/event_session_newvalue_t01: Timeout
+WebPlatformTest/webstorage/event_session_oldvalue_t01: Timeout
+WebPlatformTest/webstorage/event_session_storagearea_t01: Timeout
+WebPlatformTest/webstorage/event_session_url_t01: Timeout
+WebPlatformTest/webstorage/storage_local_setitem_quotaexceedederr_t01: RuntimeError
+
+[ $compiler == dart2js && $runtime != ff && $system != macos && !$fast_startup ]
+LayoutTests/fast/canvas/webgl/tex-input-validation_t01: RuntimeError
+LayoutTests/fast/dom/vertical-scrollbar-in-rtl-doesnt-fire-onscroll_t01: RuntimeError, Pass
+LayoutTests/fast/shapes/shape-outside-floats/shape-outside-floats-image-margin_t02: RuntimeError
+
+[ $compiler == dart2js && $runtime != ff && !$fast_startup ]
+LayoutTests/fast/css/cssText-shorthand_t01: RuntimeError
+LayoutTests/fast/dom/DOMException/XPathException_t01: RuntimeError
+LayoutTests/fast/replaced/iframe-with-percentage-height-within-table-with-anonymous-table-cell_t01: RuntimeError
+LayoutTests/fast/table/css-table-max-height_t01: RuntimeError
+LayoutTests/fast/table/css-table-width-with-border-padding_t01: RuntimeError
+LayoutTests/fast/table/hittest-tablecell-right-edge_t01: RuntimeError
+LayoutTests/fast/table/hittest-tablecell-with-borders-right-edge_t01: RuntimeError
+LayoutTests/fast/table/margins-perpendicular-containing-block_t01: RuntimeError
+LayoutTests/fast/table/min-max-width-preferred-size_t01: RuntimeError
+LayoutTests/fast/table/table-all-rowspans-height-distribution-in-rows-except-overlapped_t01: RuntimeError
+LayoutTests/fast/table/table-width-exceeding-max-width_t01: RuntimeError
+LayoutTests/fast/text-autosizing/vertical-writing-mode_t01: RuntimeError
+LayoutTests/fast/text/find-spaces_t01: RuntimeError
+LayoutTests/fast/text/international/cjk-segmentation_t01: RuntimeError
+LayoutTests/fast/text/international/combining-marks-position_t01: RuntimeError, Pass
+LayoutTests/fast/transforms/bounding-rect-zoom_t01: RuntimeError
+LayoutTests/fast/transforms/hit-test-large-scale_t01: RuntimeError
+LibTest/math/cos_A01_t01: RuntimeError
+WebPlatformTest/html/semantics/scripting-1/the-script-element/async_t11: RuntimeError
+
+[ $compiler == dart2js && $runtime == safari ]
+Language/Expressions/Additive_Expressions/syntax_t01: RuntimeError
+Language/Expressions/Await_Expressions/evaluation_throws_t04: RuntimeError
+Language/Expressions/Await_Expressions/evaluation_throws_t06: RuntimeError
+Language/Expressions/Await_Expressions/evaluation_throws_t07: RuntimeError
+Language/Expressions/Constants/depending_on_itself_t03: Crash
+Language/Expressions/Constants/exception_t02/01: CompileTimeError
+Language/Expressions/Constants/integer_size_t03: CompileTimeError
+Language/Expressions/Constants/integer_size_t04: CompileTimeError
+Language/Expressions/Function_Invocation/async_generator_invokation_t08: Timeout
+Language/Expressions/Function_Invocation/async_generator_invokation_t10: Timeout
+Language/Expressions/Identifier_Reference/evaluation_variable_or_parameter_t02: RuntimeError
+Language/Expressions/If_null_Expressions/static_type_t01: RuntimeError
+Language/Expressions/Lists/identical_t02: RuntimeError
+Language/Expressions/Maps/identical_t02: RuntimeError
+Language/Expressions/Null/instance_of_class_null_t01: RuntimeError
+Language/Expressions/Numbers/syntax_t06: CompileTimeError
+Language/Expressions/Numbers/syntax_t09: CompileTimeError
+Language/Expressions/Object_Identity/double_t02: RuntimeError
+Language/Expressions/Shift/integer_t02: CompileTimeError
+Language/Expressions/Type_Cast/syntax_t01: RuntimeError
+Language/Expressions/Unary_Expressions/variable_negative_t03: RuntimeError
+Language/Libraries_and_Scripts/Scripts/top_level_main_t01: CompileTimeError
+Language/Libraries_and_Scripts/top_level_syntax_t01: CompileTimeError
+Language/Metadata/before_ctor_t02: RuntimeError
+Language/Metadata/before_function_t01: RuntimeError
+Language/Metadata/before_function_t02: RuntimeError
+Language/Metadata/before_function_t03: RuntimeError
+Language/Metadata/before_function_t04: RuntimeError
+Language/Metadata/before_function_t07: RuntimeError
+Language/Metadata/before_import_t01: RuntimeError
+Language/Metadata/before_param_t03: RuntimeError
+Language/Metadata/before_param_t05: RuntimeError
+Language/Metadata/before_param_t07: RuntimeError
+Language/Metadata/before_param_t09: RuntimeError
+Language/Metadata/before_variable_t02: RuntimeError
+Language/Mixins/Mixin_Application/syntax_t23: RuntimeError
+Language/Mixins/Mixin_Application/syntax_t25: RuntimeError
+Language/Overview/Privacy/private_and_public_t18: RuntimeError
+Language/Reference/Operator_Precedence/precedence_15_unary_prefix_t08: RuntimeError
+Language/Statements/Assert/execution_t09: RuntimeError
+Language/Types/Function_Types/call_t01: RuntimeError
+Language/Types/Function_Types/subtype_named_args_t02: RuntimeError
+Language/Types/Function_Types/subtype_named_args_t03: RuntimeError
+Language/Types/Function_Types/subtype_named_args_t11: RuntimeError
+Language/Types/Function_Types/subtype_optional_args_t01: RuntimeError
+Language/Types/Function_Types/subtype_optional_args_t02: RuntimeError
+Language/Types/Function_Types/subtype_optional_args_t04: RuntimeError
+Language/Types/Interface_Types/subtype_t06: RuntimeError
+Language/Types/Interface_Types/subtype_t21: RuntimeError
+Language/Types/Interface_Types/subtype_t23: RuntimeError
+Language/Variables/constant_variable_t09: RuntimeError
+LanguageFeatures/Instantiate-to-bound/check_types/typedef_param_t02: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/interface_compositionality_class_member_A02_t03: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/interface_compositionality_local_variable_A02_t01: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/interface_compositionality_return_value_A02_t01: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A51_t01: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A51_t02: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A53_t01: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A51_t02: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A51_t03: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A53_t01: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A53_t02: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A53_t03: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_global_variable_fail_A51_t01: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_global_variable_fail_A52_t01: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_local_variable_fail_A51_t01: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_local_variable_fail_A52_t01: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_local_variable_fail_A53_t01: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_return_value_fail_A53_t01: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/positional_function_types_fail_arguments_binding_fail_A31_t01: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/positional_function_types_fail_arguments_binding_fail_A31_t02: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/positional_function_types_fail_arguments_binding_fail_A32_t01: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/positional_function_types_fail_arguments_binding_fail_A32_t02: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/positional_function_types_fail_class_member_fail_A31_t01: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/positional_function_types_fail_class_member_fail_A31_t03: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/positional_function_types_fail_class_member_fail_A32_t02: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/positional_function_types_fail_class_member_fail_A32_t03: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/positional_function_types_fail_local_variable_fail_A31_t01: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/positional_function_types_fail_local_variable_fail_A32_t01: RuntimeError
+LanguageFeatures/Subtyping/dynamic/generated/positional_function_types_fail_return_value_fail_A32_t01: RuntimeError
+LanguageFeatures/Subtyping/static/generated/interface_compositionality_arguments_binding_A02_t01: RuntimeError
+LanguageFeatures/Subtyping/static/generated/interface_compositionality_class_member_A02_t01: RuntimeError
+LanguageFeatures/Subtyping/static/generated/interface_compositionality_class_member_A02_t02: RuntimeError
+LanguageFeatures/Subtyping/static/generated/interface_compositionality_class_member_A02_t03: RuntimeError
+LayoutTests/fast/backgrounds/background-position-parsing-2_t01: RuntimeError
+LayoutTests/fast/backgrounds/background-shorthand-with-backgroundSize-style_t01: RuntimeError
+LayoutTests/fast/backgrounds/repeat/parsing-background-repeat_t01: RuntimeError
+LayoutTests/fast/borders/border-image-width-numbers-computed-style_t01: RuntimeError
+LayoutTests/fast/canvas/2d.composite.globalAlpha.fillPath_t01: RuntimeError
+LayoutTests/fast/canvas/2d.fillText.gradient_t01: RuntimeError
+LayoutTests/fast/canvas/2d.text.draw.fill.maxWidth.gradient_t01: Timeout
+LayoutTests/fast/canvas/2d.text.draw.fill.maxWidth.negative_t01: RuntimeError
+LayoutTests/fast/canvas/DrawImageSinglePixelStretch_t01: Timeout
+LayoutTests/fast/canvas/canvas-blend-solid_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-blending-color-over-color_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-blending-global-alpha_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-blending-gradient-over-color_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-blending-gradient-over-gradient_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-blending-gradient-over-pattern_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-blending-image-over-color_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-blending-image-over-gradient_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-blending-pattern-over-image_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-blending-text_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-blending-transforms_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-composite-canvas_t01: RuntimeError, Pass
+LayoutTests/fast/canvas/canvas-composite-stroke-alpha_t01: RuntimeError, Pass
+LayoutTests/fast/canvas/canvas-composite-text-alpha_t01: RuntimeError, Pass
+LayoutTests/fast/canvas/canvas-drawImage-scaled-copy-to-self_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-fillRect_t01: RuntimeError, Pass
+LayoutTests/fast/canvas/canvas-fillStyle-no-quirks-parsing_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-font-consistency_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-getImageData-invalid_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-getImageData-rounding_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-lose-restore-googol-size_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-lose-restore-max-int-size_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-modify-emptyPath_t01: RuntimeError, Pass
+LayoutTests/fast/canvas/canvas-putImageData_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-quadratic-same-endpoint_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-scale-shadowBlur_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-state-intact-after-putImageData_t01: RuntimeError, Pass
+LayoutTests/fast/canvas/canvas-strokePath-alpha-shadow_t01: RuntimeError, Pass
+LayoutTests/fast/canvas/canvas-strokePath-gradient-shadow_t01: RuntimeError, Pass
+LayoutTests/fast/canvas/canvas-strokePath-shadow_t01: RuntimeError, Pass
+LayoutTests/fast/canvas/canvas-strokeRect-gradient-shadow_t01: RuntimeError, Pass
+LayoutTests/fast/canvas/drawImage-with-broken-image_t01: RuntimeError
+LayoutTests/fast/canvas/drawImage-with-valid-image_t01: Timeout
+LayoutTests/fast/canvas/getPutImageDataPairTest_t01: RuntimeError
+LayoutTests/fast/canvas/set-colors_t01: RuntimeError, Pass
+LayoutTests/fast/canvas/webgl/WebGLContextEvent_t01: Timeout, Pass
+LayoutTests/fast/canvas/webgl/context-lost_t01: RuntimeError, Pass
+LayoutTests/fast/canvas/webgl/copy-tex-image-and-sub-image-2d_t01: RuntimeError, Pass
+LayoutTests/fast/canvas/webgl/draw-elements-out-of-bounds_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/get-active-test_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/gl-object-get-calls_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/gl-teximage_t01: Timeout
+LayoutTests/fast/canvas/webgl/glsl-conformance_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/incorrect-context-object-behaviour_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/index-validation-copies-indices_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/index-validation-with-resized-buffer_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/oes-element-index-uint_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-array-buffer-view_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-image-rgba4444_t01: Timeout
+LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-image-rgba5551_t01: Timeout
+LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-image_t01: Timeout
+LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-video-rgb565_t01: Timeout
+LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-video-rgba4444_t01: Timeout
+LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-video-rgba5551_t01: Timeout
+LayoutTests/fast/canvas/webgl/texImageTest_t01: RuntimeError, Pass
+LayoutTests/fast/canvas/webgl/texture-active-bind_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/texture-color-profile_t01: Timeout
+LayoutTests/fast/canvas/webgl/texture-complete_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/texture-transparent-pixels-initialized_t01: Timeout
+LayoutTests/fast/canvas/webgl/viewport-unchanged-upon-resize_t01: RuntimeError, Pass
+LayoutTests/fast/canvas/webgl/webgl-specific_t01: RuntimeError
+LayoutTests/fast/css-generated-content/bug91547_t01: RuntimeError
+LayoutTests/fast/css-generated-content/malformed-url_t01: RuntimeError
+LayoutTests/fast/css-generated-content/pseudo-element-events_t01: Timeout
+LayoutTests/fast/css-generated-content/pseudo-transition-event_t01: Timeout
+LayoutTests/fast/css-grid-layout/breadth-size-resolution-grid_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/calc-resolution-grid-item_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/flex-content-resolution-columns_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/flex-content-resolution-rows_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/grid-auto-flow-get-set_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/grid-auto-flow-update_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/grid-element-border-grid-item_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/grid-element-border-padding-grid-item_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/grid-element-padding-margin_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/grid-item-area-get-set_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/grid-item-bad-named-area-auto-placement_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/grid-item-change-order-auto-flow_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/grid-item-margin-auto-columns-rows-horiz-bt_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/grid-item-margin-auto-columns-rows-vert-rl_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/grid-item-margin-auto-columns-rows_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/grid-item-margin-resolution_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/grid-item-order-auto-flow-resolution_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/justify-self-cell_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/minmax-fixed-logical-height-only_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/percent-grid-item-in-percent-grid-track-in-percent-grid_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/percent-grid-item-in-percent-grid-track-update_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/percent-grid-item-in-percent-grid-track_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/percent-padding-margin-resolution-grid-item-update_t01: RuntimeError
+LayoutTests/fast/css-grid-layout/place-cell-by-index_t01: RuntimeError
+LayoutTests/fast/css-intrinsic-dimensions/intrinsic-sized-blocks_t01: RuntimeError
+LayoutTests/fast/css-intrinsic-dimensions/intrinsic-sized-column-flex-items_t01: RuntimeError
+LayoutTests/fast/css-intrinsic-dimensions/intrinsic-sized-flex-items_t01: RuntimeError
+LayoutTests/fast/css-intrinsic-dimensions/intrinsic-sized-replaced-absolutes_t01: RuntimeError
+LayoutTests/fast/css-intrinsic-dimensions/width-shrinks-avoid-floats_t01: RuntimeError
+LayoutTests/fast/css/MarqueeLayoutTest_t01: RuntimeError
+LayoutTests/fast/css/aspect-ratio-inheritance_t01: RuntimeError
+LayoutTests/fast/css/auto-min-size_t01: RuntimeError
+LayoutTests/fast/css/background-serialize_t01: RuntimeError
+LayoutTests/fast/css/border-image-style-length_t01: RuntimeError
+LayoutTests/fast/css/box-sizing-border-box-dynamic-padding-border-update_t01: RuntimeError
+LayoutTests/fast/css/content/content-none_t01: RuntimeError
+LayoutTests/fast/css/content/content-quotes-05_t01: RuntimeError
+LayoutTests/fast/css/cursor-parsing-image-set_t01: RuntimeError
+LayoutTests/fast/css/deprecated-flex-box-zero-width-intrinsic-max-width_t01: RuntimeError
+LayoutTests/fast/css/device-aspect-ratio_t01: RuntimeError
+LayoutTests/fast/css/draggable-region-parser_t01: RuntimeError
+LayoutTests/fast/css/dynamic-class-pseudo-elements_t01: RuntimeError
+LayoutTests/fast/css/fixed-width-intrinsic-width-excludes-scrollbars_t01: RuntimeError
+LayoutTests/fast/css/font-face-cache-bug_t01: RuntimeError
+LayoutTests/fast/css/font-face-insert-link_t01: RuntimeError
+LayoutTests/fast/css/font-face-unicode-range-load_t01: Timeout
+LayoutTests/fast/css/font-face-unicode-range-overlap-load_t01: Timeout
+LayoutTests/fast/css/font-shorthand-from-longhands_t01: RuntimeError
+LayoutTests/fast/css/fontface-properties_t01: RuntimeError
+LayoutTests/fast/css/fontfaceset-events_t01: RuntimeError
+LayoutTests/fast/css/getComputedStyle/computed-style-border-image_t01: RuntimeError
+LayoutTests/fast/css/getComputedStyle/computed-style-cross-fade_t01: RuntimeError
+LayoutTests/fast/css/getComputedStyle/counterIncrement-without-counter_t01: RuntimeError, Pass
+LayoutTests/fast/css/getComputedStyle/font-family-fallback-reset_t01: RuntimeError, Pass
+LayoutTests/fast/css/getComputedStyle/getComputedStyle-zoom-and-background-size_t01: RuntimeError, Pass
+LayoutTests/fast/css/html-attr-case-sensitivity_t01: RuntimeError
+LayoutTests/fast/css/image-set-setting_t01: RuntimeError
+LayoutTests/fast/css/inherited-properties-rare-text_t01: RuntimeError
+LayoutTests/fast/css/invalid-predefined-color_t01: RuntimeError
+LayoutTests/fast/css/invalidation/targeted-class-host-pseudo_t01: RuntimeError
+LayoutTests/fast/css/invalidation/toggle-style-inside-shadow-root_t01: RuntimeError
+LayoutTests/fast/css/link-alternate-stylesheet-1_t01: RuntimeError
+LayoutTests/fast/css/media-query-recovery_t01: RuntimeError
+LayoutTests/fast/css/parsing-css-nth-child_t01: RuntimeError
+LayoutTests/fast/css/parsing-page-rule_t01: RuntimeError
+LayoutTests/fast/css/parsing-unexpected-eof_t01: RuntimeError
+LayoutTests/fast/css/percent-min-width-img-src-change_t01: Timeout
+LayoutTests/fast/css/pseudo-target-indirect-sibling-001_t01: Timeout
+LayoutTests/fast/css/pseudo-target-indirect-sibling-002_t01: Timeout
+LayoutTests/fast/css/readonly-pseudoclass-opera-003_t01: RuntimeError
+LayoutTests/fast/css/readonly-pseudoclass-opera-004_t01: RuntimeError
+LayoutTests/fast/css/readonly-pseudoclass-opera-005_t01: RuntimeError
+LayoutTests/fast/css/sheet-collection-link_t01: RuntimeError
+LayoutTests/fast/css/space-before-charset-external_t01: RuntimeError
+LayoutTests/fast/css/style-scoped/style-scoped-scoping-nodes-different-order_t01: RuntimeError
+LayoutTests/fast/css/style-scoped/style-scoped-shadow-crash_t01: RuntimeError
+LayoutTests/fast/css/style-scoped/style-scoped-with-dom-operation_t01: RuntimeError
+LayoutTests/fast/css/style-scoped/style-scoped-with-important-rule_t01: RuntimeError
+LayoutTests/fast/css/stylesheet-enable-first-alternate-link_t01: RuntimeError
+LayoutTests/fast/css/stylesheet-enable-first-alternate-on-load-sheet_t01: RuntimeError
+LayoutTests/fast/css/unicode-bidi-computed-value_t01: RuntimeError, Pass
+LayoutTests/fast/css3-text/css3-text-decoration/getComputedStyle/getComputedStyle-text-decoration-line_t01: RuntimeError
+LayoutTests/fast/css3-text/css3-text-decoration/getComputedStyle/getComputedStyle-text-decoration-style_t01: RuntimeError
+LayoutTests/fast/css3-text/css3-text-decoration/getComputedStyle/getComputedStyle-text-underline-position_t01: RuntimeError
+LayoutTests/fast/css3-text/css3-text-indent/getComputedStyle/getComputedStyle-text-indent-inherited_t01: RuntimeError
+LayoutTests/fast/dom/DOMImplementation/createDocument-namespace-err_t01: RuntimeError
+LayoutTests/fast/dom/DOMImplementation/createDocumentType-err_t01: RuntimeError, Pass
+LayoutTests/fast/dom/Document/CaretRangeFromPoint/caretRangeFromPoint-in-strict-mode-wtih-checkbox_t01: RuntimeError
+LayoutTests/fast/dom/Document/CaretRangeFromPoint/caretRangeFromPoint-in-user-select-none_t01: RuntimeError
+LayoutTests/fast/dom/Document/CaretRangeFromPoint/caretRangeFromPoint-in-zoom-and-scroll_t01: RuntimeError
+LayoutTests/fast/dom/Document/CaretRangeFromPoint/caretRangeFromPoint-with-first-letter-style_t01: RuntimeError
+LayoutTests/fast/dom/Element/attribute-uppercase_t01: RuntimeError
+LayoutTests/fast/dom/Element/client-rect-list-argument_t01: RuntimeError
+LayoutTests/fast/dom/Element/getClientRects_t01: RuntimeError
+LayoutTests/fast/dom/Element/offsetTop-table-cell_t01: RuntimeError
+LayoutTests/fast/dom/HTMLAnchorElement/remove-href-from-focused-anchor_t01: Timeout
+LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-host_t01: RuntimeError
+LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-pathname_t01: RuntimeError
+LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-protocol_t01: RuntimeError
+LayoutTests/fast/dom/HTMLButtonElement/value/getset_t01: RuntimeError
+LayoutTests/fast/dom/HTMLDialogElement/dialog-close-event_t01: RuntimeError
+LayoutTests/fast/dom/HTMLDialogElement/dialog-open_t01: RuntimeError
+LayoutTests/fast/dom/HTMLDialogElement/dialog-return-value_t01: RuntimeError
+LayoutTests/fast/dom/HTMLDialogElement/dialog-scrolled-viewport_t01: RuntimeError
+LayoutTests/fast/dom/HTMLDialogElement/inert-node-is-unselectable_t01: RuntimeError
+LayoutTests/fast/dom/HTMLDialogElement/multiple-centered-dialogs_t01: RuntimeError
+LayoutTests/fast/dom/HTMLDialogElement/submit-dialog-close-event_t01: RuntimeError
+LayoutTests/fast/dom/HTMLDialogElement/synthetic-click-inert_t01: RuntimeError
+LayoutTests/fast/dom/HTMLDialogElement/top-layer-position-relative_t01: RuntimeError
+LayoutTests/fast/dom/HTMLDialogElement/top-layer-position-static_t01: RuntimeError
+LayoutTests/fast/dom/HTMLDocument/active-element-gets-unforcusable_t01: Timeout
+LayoutTests/fast/dom/HTMLDocument/set-focus-on-valid-element_t01: Timeout
+LayoutTests/fast/dom/HTMLImageElement/image-alt-text_t01: RuntimeError
+LayoutTests/fast/dom/HTMLImageElement/image-natural-width-height_t01: Timeout
+LayoutTests/fast/dom/HTMLImageElement/parse-src_t01: RuntimeError
+LayoutTests/fast/dom/HTMLInputElement/input-image-alt-text_t01: RuntimeError
+LayoutTests/fast/dom/HTMLLabelElement/form/test1_t01: RuntimeError
+LayoutTests/fast/dom/HTMLLinkElement/link-and-subresource-test-nonexistent_t01: Timeout
+LayoutTests/fast/dom/HTMLLinkElement/link-and-subresource-test_t01: Timeout
+LayoutTests/fast/dom/HTMLLinkElement/link-onerror-stylesheet-with-non-existent-import_t01: RuntimeError
+LayoutTests/fast/dom/HTMLLinkElement/link-onload-before-page-load_t01: RuntimeError
+LayoutTests/fast/dom/HTMLLinkElement/link-onload-stylesheet-with-import_t01: RuntimeError
+LayoutTests/fast/dom/HTMLLinkElement/link-onload2_t01: RuntimeError
+LayoutTests/fast/dom/HTMLLinkElement/prefetch-onerror_t01: Timeout
+LayoutTests/fast/dom/HTMLLinkElement/prefetch-onload_t01: Timeout
+LayoutTests/fast/dom/HTMLLinkElement/prefetch_t01: Timeout
+LayoutTests/fast/dom/HTMLOptionElement/collection-setter-getter_t01: RuntimeError
+LayoutTests/fast/dom/HTMLProgressElement/indeterminate-progress-002_t01: RuntimeError
+LayoutTests/fast/dom/HTMLScriptElement/async-false-inside-async-false-load_t01: Timeout
+LayoutTests/fast/dom/HTMLScriptElement/async-onbeforeload_t01: Timeout
+LayoutTests/fast/dom/HTMLScriptElement/defer-inline-script_t01: RuntimeError
+LayoutTests/fast/dom/HTMLScriptElement/defer-onbeforeload_t01: Timeout
+LayoutTests/fast/dom/HTMLScriptElement/defer-script-invalid-url_t01: Timeout
+LayoutTests/fast/dom/HTMLScriptElement/dont-load-unknown-type_t01: Timeout
+LayoutTests/fast/dom/HTMLScriptElement/remove-in-beforeload_t01: Timeout
+LayoutTests/fast/dom/HTMLScriptElement/remove-source_t01: Timeout
+LayoutTests/fast/dom/HTMLScriptElement/script-for-attribute-unexpected-execution_t01: Timeout
+LayoutTests/fast/dom/HTMLScriptElement/script-reexecution_t01: Timeout
+LayoutTests/fast/dom/HTMLScriptElement/script-set-src_t01: Timeout
+LayoutTests/fast/dom/HTMLStyleElement/style-onerror-with-existent-and-non-existent-import_t01: RuntimeError
+LayoutTests/fast/dom/HTMLTableElement/insert-row_t01: RuntimeError
+LayoutTests/fast/dom/HTMLTableSectionElement/rows_t01: RuntimeError
+LayoutTests/fast/dom/HTMLTemplateElement/cycles-in-shadow_t01: RuntimeError
+LayoutTests/fast/dom/HTMLTemplateElement/innerHTML-inert_t01: Timeout
+LayoutTests/fast/dom/MutationObserver/observe-options-character-data_t01: RuntimeError
+LayoutTests/fast/dom/MutationObserver/weak-callback-gc-crash_t01: RuntimeError
+LayoutTests/fast/dom/Range/bug-19527_t01: RuntimeError
+LayoutTests/fast/dom/Range/getClientRects-character_t01: RuntimeError
+LayoutTests/fast/dom/Range/range-created-during-remove-children_t01: RuntimeError
+LayoutTests/fast/dom/Range/range-detached-exceptions_t01: RuntimeError
+LayoutTests/fast/dom/Range/range-insertNode-splittext_t01: RuntimeError
+LayoutTests/fast/dom/StyleSheet/detached-shadow-style_t01: RuntimeError
+LayoutTests/fast/dom/StyleSheet/detached-style_t01: RuntimeError
+LayoutTests/fast/dom/StyleSheet/empty-shadow-style_t01: RuntimeError
+LayoutTests/fast/dom/XMLSerializer-double-xmlns_t01: RuntimeError
+LayoutTests/fast/dom/characterdata-api-arguments_t01: RuntimeError
+LayoutTests/fast/dom/css-cached-import-rule_t01: RuntimeError
+LayoutTests/fast/dom/css-innerHTML_t01: RuntimeError
+LayoutTests/fast/dom/css-insert-import-rule-twice_t01: RuntimeError
+LayoutTests/fast/dom/css-insert-import-rule_t01: RuntimeError
+LayoutTests/fast/dom/css-selectorText_t01: RuntimeError
+LayoutTests/fast/dom/cssTarget-crash_t01: RuntimeError, Pass
+LayoutTests/fast/dom/custom/attribute-changed-callback_t01: RuntimeError
+LayoutTests/fast/dom/custom/created-callback_t01: RuntimeError
+LayoutTests/fast/dom/custom/lifecycle-created-createElement-recursion_t01: RuntimeError
+LayoutTests/fast/dom/custom/unresolved-pseudoclass_t01: RuntimeError
+LayoutTests/fast/dom/custom/upgrade-candidate-remove-crash_t01: RuntimeError
+LayoutTests/fast/dom/domparser-parsefromstring-mimetype-support_t01: RuntimeError
+LayoutTests/fast/dom/empty-hash-and-search_t01: RuntimeError
+LayoutTests/fast/dom/gc-image-element-2_t01: Timeout
+LayoutTests/fast/dom/gc-image-element_t01: Timeout
+LayoutTests/fast/dom/getElementsByClassName/010_t01: RuntimeError
+LayoutTests/fast/dom/getElementsByClassName/011_t01: RuntimeError
+LayoutTests/fast/dom/horizontal-scrollbar-in-rtl-doesnt-fire-onscroll_t01: RuntimeError
+LayoutTests/fast/dom/horizontal-scrollbar-in-rtl_t01: RuntimeError
+LayoutTests/fast/dom/horizontal-scrollbar-when-dir-change_t01: RuntimeError
+LayoutTests/fast/dom/image-object_t01: Timeout
+LayoutTests/fast/dom/non-styled-element-id-crash_t01: RuntimeError
+LayoutTests/fast/dom/partial-layout-overlay-scrollbars_t01: RuntimeError
+LayoutTests/fast/dom/set-innerHTML_t01: RuntimeError
+LayoutTests/fast/dom/shadow/access-document-of-detached-stylesheetlist-crash_t01: RuntimeError
+LayoutTests/fast/dom/shadow/base-in-shadow-tree_t01: RuntimeError
+LayoutTests/fast/dom/shadow/content-element-includer_t01: RuntimeError
+LayoutTests/fast/dom/shadow/content-pseudo-element-dynamic-attribute-change_t01: RuntimeError
+LayoutTests/fast/dom/shadow/content-pseudo-element-relative-selector-css-text_t01: RuntimeError
+LayoutTests/fast/dom/shadow/content-pseudo-element-with-host-pseudo-class_t01: RuntimeError
+LayoutTests/fast/dom/shadow/distribution-for-event-path_t01: RuntimeError
+LayoutTests/fast/dom/shadow/elementfrompoint_t01: RuntimeError
+LayoutTests/fast/dom/shadow/elements-in-frameless-document_t01: RuntimeError
+LayoutTests/fast/dom/shadow/getComputedStyle-composed-parent-dirty_t01: RuntimeError
+LayoutTests/fast/dom/shadow/getelementbyid-in-orphan_t01: RuntimeError
+LayoutTests/fast/dom/shadow/insertion-point-shadow-crash_t01: RuntimeError
+LayoutTests/fast/dom/shadow/insertion-point-video-crash_t01: RuntimeError
+LayoutTests/fast/dom/shadow/link-in-shadow-tree_t01: RuntimeError
+LayoutTests/fast/dom/shadow/offsetWidth-host-style-change_t01: RuntimeError
+LayoutTests/fast/dom/shadow/olderShadowRoot_t01: RuntimeError
+LayoutTests/fast/dom/shadow/pseudoclass-update-checked-option_t01: RuntimeError
+LayoutTests/fast/dom/shadow/pseudoclass-update-disabled-optgroup_t01: RuntimeError
+LayoutTests/fast/dom/shadow/pseudoclass-update-disabled-option_t01: RuntimeError
+LayoutTests/fast/dom/shadow/shadow-content-crash_t01: RuntimeError
+LayoutTests/fast/dom/shadow/shadow-disable_t01: RuntimeError
+LayoutTests/fast/dom/shadow/shadow-hierarchy-exception_t01: RuntimeError
+LayoutTests/fast/dom/shadow/shadow-removechild-and-blur-event_t01: RuntimeError
+LayoutTests/fast/dom/shadow/shadow-root-node-list_t01: RuntimeError
+LayoutTests/fast/dom/shadow/shadow-root-text-child_t01: RuntimeError
+LayoutTests/fast/dom/shadow/shadow-ul-li_t01: RuntimeError
+LayoutTests/fast/dom/shadow/shadowdom-for-input-type-change_t01: RuntimeError
+LayoutTests/fast/dom/shadow/shadowroot-host_t01: RuntimeError
+LayoutTests/fast/dom/shadow/sibling-rules-dynamic-changes_t01: RuntimeError
+LayoutTests/fast/dom/shadow/stale-distribution-after-shadow-removal_t01: RuntimeError
+LayoutTests/fast/dynamic/crash-generated-counter_t01: RuntimeError
+LayoutTests/fast/dynamic/crash-generated-image_t01: RuntimeError
+LayoutTests/fast/dynamic/crash-generated-text_t01: RuntimeError
+LayoutTests/fast/events/clipboard-clearData_t01: Timeout
+LayoutTests/fast/events/clipboard-dataTransferItemList_t01: Timeout
+LayoutTests/fast/events/event-creation_t01: RuntimeError
+LayoutTests/fast/events/event-listener-html-non-html-confusion_t01: RuntimeError
+LayoutTests/fast/events/event-on-xhr-document_t01: RuntimeError
+LayoutTests/fast/events/init-message-event_t01: RuntimeError
+LayoutTests/fast/events/invalid-002_t01: RuntimeError
+LayoutTests/fast/events/invalid-003_t01: RuntimeError
+LayoutTests/fast/events/mutation-during-replace-child_t01: RuntimeError
+LayoutTests/fast/events/nested-event-remove-node-crash_t01: Timeout
+LayoutTests/fast/events/tabindex-removal-from-focused-element_t01: RuntimeError
+LayoutTests/fast/exclusions/parsing/parsing-wrap-through_t01: RuntimeError
+LayoutTests/fast/files/blob-close-read_t01: RuntimeError
+LayoutTests/fast/files/blob-constructor_t01: RuntimeError
+LayoutTests/fast/files/file-reader-abort-in-last-progress_t01: RuntimeError
+LayoutTests/fast/files/file-reader-done-reading-abort_t01: RuntimeError, Pass
+LayoutTests/fast/files/read-blob-as-array-buffer_t01: RuntimeError
+LayoutTests/fast/filesystem/async-operations_t01: RuntimeError
+LayoutTests/fast/filesystem/directory-entry-to-uri_t01: RuntimeError
+LayoutTests/fast/filesystem/file-after-reload-crash_t01: RuntimeError
+LayoutTests/fast/filesystem/file-entry-to-uri_t01: RuntimeError
+LayoutTests/fast/filesystem/file-metadata-after-write_t01: RuntimeError
+LayoutTests/fast/filesystem/file-writer-abort-continue_t01: RuntimeError
+LayoutTests/fast/filesystem/file-writer-events_t01: RuntimeError
+LayoutTests/fast/filesystem/file-writer-truncate-extend_t01: RuntimeError
+LayoutTests/fast/filesystem/file-writer-write-overlapped_t01: RuntimeError
+LayoutTests/fast/filesystem/filesystem-unserializable_t01: RuntimeError
+LayoutTests/fast/filesystem/filesystem-uri-origin_t01: RuntimeError
+LayoutTests/fast/filesystem/op-copy_t01: RuntimeError
+LayoutTests/fast/filesystem/op-get-metadata_t01: RuntimeError
+LayoutTests/fast/filesystem/op-get-parent_t01: RuntimeError
+LayoutTests/fast/filesystem/op-read-directory_t01: RuntimeError
+LayoutTests/fast/filesystem/op-restricted-chars_t01: RuntimeError
+LayoutTests/fast/filesystem/op-restricted-names_t01: RuntimeError
+LayoutTests/fast/filesystem/read-directory_t01: RuntimeError
+LayoutTests/fast/filesystem/simple-readonly-file-object_t01: RuntimeError
+LayoutTests/fast/filesystem/simple-temporary_t01: RuntimeError
+LayoutTests/fast/filesystem/snapshot-file-with-gc_t01: RuntimeError
+LayoutTests/fast/forms/ValidityState-customError_t01: RuntimeError
+LayoutTests/fast/forms/ValidityState-typeMismatch-url_t01: RuntimeError
+LayoutTests/fast/forms/ValidityState-valueMissing-004_t01: RuntimeError
+LayoutTests/fast/forms/autocomplete_t01: RuntimeError
+LayoutTests/fast/forms/button/button-disabled-blur_t01: RuntimeError
+LayoutTests/fast/forms/color/color-setrangetext_t01: RuntimeError
+LayoutTests/fast/forms/color/input-value-sanitization-color_t01: RuntimeError
+LayoutTests/fast/forms/date-multiple-fields/date-multiple-fields-onblur-setvalue-onfocusremoved_t01: RuntimeError, Pass
+LayoutTests/fast/forms/date/ValidityState-typeMismatch-date_t01: RuntimeError
+LayoutTests/fast/forms/date/date-pseudo-classes_t01: RuntimeError
+LayoutTests/fast/forms/date/date-setrangetext_t01: RuntimeError
+LayoutTests/fast/forms/date/input-date-validation-message_t01: RuntimeError
+LayoutTests/fast/forms/datetimelocal/datetimelocal-input-type_t01: RuntimeError
+LayoutTests/fast/forms/datetimelocal/datetimelocal-setrangetext_t01: RuntimeError
+LayoutTests/fast/forms/datetimelocal/input-valueasdate-datetimelocal_t01: RuntimeError
+LayoutTests/fast/forms/datetimelocal/input-valueasnumber-datetimelocal_t01: RuntimeError
+LayoutTests/fast/forms/form-attribute-nonexistence-form-id_t01: RuntimeError
+LayoutTests/fast/forms/input-appearance-elementFromPoint_t01: RuntimeError
+LayoutTests/fast/forms/input-inputmode_t01: RuntimeError
+LayoutTests/fast/forms/input-value-sanitization_t01: RuntimeError
+LayoutTests/fast/forms/menulist-submit-without-selection_t01: RuntimeError, Pass
+LayoutTests/fast/forms/option-change-single-selected_t01: RuntimeError
+LayoutTests/fast/forms/option-strip-unicode-spaces_t01: RuntimeError
+LayoutTests/fast/forms/parser-associated-form-removal_t01: RuntimeError
+LayoutTests/fast/forms/plaintext-mode-1_t01: RuntimeError
+LayoutTests/fast/forms/selection-wrongtype_t01: RuntimeError
+LayoutTests/fast/forms/textarea-paste-newline_t01: RuntimeError
+LayoutTests/fast/forms/textarea-selection-preservation_t01: RuntimeError
+LayoutTests/fast/html/adjacent-html-context-element_t01: RuntimeError
+LayoutTests/fast/html/hidden-attr_t01: RuntimeError
+LayoutTests/fast/html/imports/import-element-removed-flag_t01: Timeout
+LayoutTests/fast/html/select-dropdown-consistent-background-color_t01: RuntimeError
+LayoutTests/fast/inline/boundingBox-with-continuation_t01: RuntimeError
+LayoutTests/fast/inline/inline-position-top-align_t01: RuntimeError
+LayoutTests/fast/inline/parent-inline-element-padding-contributes-width_t01: RuntimeError
+LayoutTests/fast/inline/positioned-element-padding-contributes-width_t01: RuntimeError
+LayoutTests/fast/innerHTML/innerHTML-svg-write_t01: RuntimeError
+LayoutTests/fast/innerHTML/javascript-url_t01: RuntimeError
+LayoutTests/fast/lists/marker-preferred-margins_t01: RuntimeError
+LayoutTests/fast/loader/about-blank-hash-change_t01: Timeout
+LayoutTests/fast/loader/about-blank-hash-kept_t01: Timeout
+LayoutTests/fast/loader/loadInProgress_t01: RuntimeError, Pass
+LayoutTests/fast/loader/local-css-allowed-in-strict-mode_t01: RuntimeError
+LayoutTests/fast/loader/onhashchange-attribute-listeners_t01: Timeout
+LayoutTests/fast/loader/scroll-position-restored-on-back_t01: Timeout
+LayoutTests/fast/masking/parsing-clip-path-shape_t01: RuntimeError
+LayoutTests/fast/masking/parsing-mask_t01: RuntimeError
+LayoutTests/fast/media/matchmedium-query-api_t01: RuntimeError
+LayoutTests/fast/media/media-query-list-syntax_t01: RuntimeError
+LayoutTests/fast/mediastream/RTCIceCandidate_t01: RuntimeError
+LayoutTests/fast/mediastream/RTCPeerConnection-AddRemoveStream_t01: Timeout, Pass
+LayoutTests/fast/mediastream/RTCPeerConnection_t01: RuntimeError
+LayoutTests/fast/mediastream/constructors_t01: RuntimeError
+LayoutTests/fast/multicol/balance-unbreakable_t01: RuntimeError
+LayoutTests/fast/multicol/break-after-always-bottom-margin_t01: RuntimeError
+LayoutTests/fast/multicol/cssom-view_t01: RuntimeError
+LayoutTests/fast/multicol/float-truncation_t01: RuntimeError
+LayoutTests/fast/multicol/hit-test-end-of-column_t01: RuntimeError
+LayoutTests/fast/multicol/hit-test-float_t01: RuntimeError
+LayoutTests/fast/multicol/inline-getclientrects_t01: RuntimeError
+LayoutTests/fast/multicol/newmulticol/balance-images_t01: RuntimeError
+LayoutTests/fast/multicol/newmulticol/balance-maxheight_t01: RuntimeError
+LayoutTests/fast/multicol/vertical-lr/float-truncation_t01: RuntimeError
+LayoutTests/fast/multicol/vertical-rl/float-truncation_t01: RuntimeError
+LayoutTests/fast/overflow/replaced-child-100percent-height-inside-fixed-container-with-overflow-auto_t01: RuntimeError
+LayoutTests/fast/overflow/scrollbar-restored_t01: RuntimeError
+LayoutTests/fast/parser/fragment-parser-doctype_t01: RuntimeError
+LayoutTests/fast/replaced/available-height-for-content_t01: RuntimeError
+LayoutTests/fast/replaced/container-width-zero_t01: RuntimeError
+LayoutTests/fast/replaced/iframe-with-percentage-height-within-table-with-table-cell-ignore-height_t01: RuntimeError
+LayoutTests/fast/replaced/table-percent-height_t01: RuntimeError
+LayoutTests/fast/replaced/table-percent-width_t01: RuntimeError
+LayoutTests/fast/ruby/ruby-line-height_t01: RuntimeError
+LayoutTests/fast/scrolling/scroll-element-into-view_t01: RuntimeError
+LayoutTests/fast/shapes/parsing/parsing-shape-margin_t01: RuntimeError
+LayoutTests/fast/shapes/shape-outside-floats/shape-outside-floats-image-margin_t01: RuntimeError, Pass
+LayoutTests/fast/shapes/shape-outside-floats/shape-outside-floats-inset-rounded-different-writing-modes-left_t01: RuntimeError
+LayoutTests/fast/shapes/shape-outside-floats/shape-outside-rounded-boxes_t01: RuntimeError
+LayoutTests/fast/shapes/shape-outside-floats/shape-outside-rounded-boxes_t02: RuntimeError
+LayoutTests/fast/speechsynthesis/speech-synthesis-boundary-events_t01: Timeout, Pass
+LayoutTests/fast/speechsynthesis/speech-synthesis-cancel_t01: RuntimeError
+LayoutTests/fast/speechsynthesis/speech-synthesis-pause-resume_t01: Timeout, Pass
+LayoutTests/fast/speechsynthesis/speech-synthesis-speak_t01: Timeout, Pass
+LayoutTests/fast/speechsynthesis/speech-synthesis-utterance-uses-voice_t01: Timeout
+LayoutTests/fast/storage/storage-disallowed-in-data-url_t01: RuntimeError
+LayoutTests/fast/sub-pixel/shadows-computed-style_t01: RuntimeError
+LayoutTests/fast/svg/whitespace-angle_t01: RuntimeError
+LayoutTests/fast/svg/whitespace-length_t01: RuntimeError
+LayoutTests/fast/svg/whitespace-number_t01: RuntimeError
+LayoutTests/fast/table/fixed-table-layout-width-change_t01: RuntimeError
+LayoutTests/fast/table/hittest-tablecell-bottom-edge_t01: RuntimeError
+LayoutTests/fast/table/hittest-tablecell-with-borders-bottom-edge_t01: RuntimeError
+LayoutTests/fast/table/html-table-width-max-width-constrained_t01: RuntimeError
+LayoutTests/fast/table/incorrect-colgroup-span-values_t01: RuntimeError, Pass
+LayoutTests/fast/table/margins-flipped-text-direction_t01: RuntimeError
+LayoutTests/fast/table/min-width-css-block-table_t01: RuntimeError
+LayoutTests/fast/table/nested-tables-with-div-offset_t01: RuntimeError
+LayoutTests/fast/table/switch-table-layout-multiple-section_t01: RuntimeError
+LayoutTests/fast/table/switch-table-layout_t01: RuntimeError
+LayoutTests/fast/table/table-all-rowspans-height-distribution-in-rows_t01: RuntimeError
+LayoutTests/fast/table/table-colgroup-present-after-table-row_t01: RuntimeError
+LayoutTests/fast/table/table-rowspan-cell-with-empty-cell_t01: RuntimeError
+LayoutTests/fast/table/table-rowspan-height-distribution-in-rows_t01: RuntimeError
+LayoutTests/fast/table/table-rowspan-height-distribution-in-rows_t02: RuntimeError
+LayoutTests/fast/table/table-with-content-width-exceeding-max-width_t01: RuntimeError
+LayoutTests/fast/text/find-case-folding_t01: RuntimeError
+LayoutTests/fast/text/find-russian_t01: RuntimeError
+LayoutTests/fast/text/find-soft-hyphen_t01: RuntimeError
+LayoutTests/fast/text/glyph-reordering_t01: RuntimeError
+LayoutTests/fast/text/international/iso-8859-8_t01: RuntimeError
+LayoutTests/fast/text/line-break-after-empty-inline-hebrew_t01: RuntimeError
+LayoutTests/fast/text/line-break-after-inline-latin1_t01: RuntimeError
+LayoutTests/fast/text/multiglyph-characters_t01: RuntimeError
+LayoutTests/fast/text/offsetForPosition-cluster-at-zero_t01: RuntimeError
+LayoutTests/fast/text/sub-pixel/text-scaling-ltr_t01: RuntimeError
+LayoutTests/fast/text/sub-pixel/text-scaling-vertical_t01: RuntimeError
+LayoutTests/fast/text/sub-pixel/text-scaling-webfont_t01: RuntimeError
+LayoutTests/fast/url/anchor_t01: RuntimeError
+LayoutTests/fast/url/file-http-base_t01: RuntimeError
+LayoutTests/fast/url/file_t01: RuntimeError
+LayoutTests/fast/url/idna2003_t01: RuntimeError
+LayoutTests/fast/url/idna2008_t01: RuntimeError
+LayoutTests/fast/url/invalid-urls-utf8_t01: RuntimeError
+LayoutTests/fast/url/ipv4_t01: RuntimeError
+LayoutTests/fast/url/ipv6_t01: RuntimeError
+LayoutTests/fast/url/path_t01: RuntimeError
+LayoutTests/fast/url/query_t01: RuntimeError
+LayoutTests/fast/url/relative-win_t01: RuntimeError
+LayoutTests/fast/url/relative_t01: RuntimeError
+LayoutTests/fast/url/segments_t01: RuntimeError
+LayoutTests/fast/url/standard-url_t01: RuntimeError
+LayoutTests/fast/writing-mode/flipped-blocks-text-map-local-to-container_t01: RuntimeError
+LayoutTests/fast/xmlhttprequest/xmlhttprequest-responseXML-html-document-responsetype-quirks_t01: RuntimeError
+LayoutTests/fast/xmlhttprequest/xmlhttprequest-responseXML-xml-text-responsetype_t01: RuntimeError
+LayoutTests/fast/xmlhttprequest/xmlhttprequest-responsetype-before-open-sync-request_t01: RuntimeError
+LayoutTests/fast/xpath/4XPath/Borrowed/od_20000608_t01: RuntimeError
+LayoutTests/fast/xpath/4XPath/Core/test_node_test_t02: RuntimeError
+LayoutTests/fast/xpath/4XPath/Core/test_parser_t01: RuntimeError
+LayoutTests/fast/xpath/ambiguous-operators_t01: RuntimeError
+LayoutTests/fast/xpath/ensure-null-namespace_t01: RuntimeError
+LayoutTests/fast/xpath/implicit-node-args_t01: RuntimeError
+LayoutTests/fast/xpath/node-name-case-sensitivity_t02: RuntimeError
+LayoutTests/fast/xpath/py-dom-xpath/expressions_t01: RuntimeError
+LayoutTests/fast/xsl/default-html_t01: RuntimeError
+LibTest/async/Future/asStream_A01_t02: RuntimeError
+LibTest/async/Stream/Stream.fromFutures_A04_t01: RuntimeError
+LibTest/async/Stream/Stream.fromFutures_A04_t02: RuntimeError
+LibTest/async/Stream/Stream.fromIterable_A02_t01: RuntimeError
+LibTest/async/Stream/Stream.fromIterable_A03_t02: RuntimeError
+LibTest/async/Stream/Stream.periodic_A04_t02: RuntimeError
+LibTest/async/Stream/Stream.periodic_A04_t03: RuntimeError
+LibTest/async/StreamController/StreamController.broadcast_A03_t02: RuntimeError
+LibTest/async/StreamController/StreamController.broadcast_A09_t02: RuntimeError
+LibTest/async/StreamController/StreamController.broadcast_A09_t03: RuntimeError
+LibTest/async/StreamController/StreamController.broadcast_A10_t02: RuntimeError
+LibTest/async/StreamController/StreamController.broadcast_A10_t03: RuntimeError
+LibTest/async/StreamController/addStream_A03_t01: RuntimeError
+LibTest/async/StreamController/stream_A02_t03: RuntimeError
+LibTest/async/StreamController/stream_A03_t02: RuntimeError
+LibTest/async/StreamSink/addStream_A01_t02: RuntimeError
+LibTest/async/StreamTransformer/StreamTransformer.fromHandlers_A01_t03: RuntimeError
+LibTest/async/Zone/registerBinaryCallback_A01_t01: RuntimeError
+LibTest/collection/DoubleLinkedQueue/fold_A01_t01: RuntimeError
+LibTest/collection/DoubleLinkedQueue/removeWhere_A02_t03: RuntimeError
+LibTest/collection/DoubleLinkedQueue/retainWhere_A02_t02: RuntimeError
+LibTest/collection/HashSet/HashSet_A04_t01: RuntimeError
+LibTest/collection/HashSet/HashSet_class_A01_t01: RuntimeError
+LibTest/collection/IterableBase/IterableBase_class_A01_t02: RuntimeError
+LibTest/collection/IterableMixin/contains_A02_t01: RuntimeError
+LibTest/collection/IterableMixin/every_A01_t02: RuntimeError
+LibTest/collection/IterableMixin/expand_A01_t01: RuntimeError
+LibTest/collection/IterableMixin/expand_A02_t01: RuntimeError
+LibTest/collection/IterableMixin/fold_A01_t01: RuntimeError
+LibTest/collection/LinkedList/addAll_A01_t02: RuntimeError
+LibTest/collection/LinkedList/join_A01_t01: RuntimeError
+LibTest/collection/LinkedList/toString_A03_t01: RuntimeError
+LibTest/collection/LinkedListEntry/LinkedListEntry_class_A03_t01: RuntimeError
+LibTest/collection/LinkedListEntry/insertAfter_A02_t02: RuntimeError
+LibTest/collection/LinkedListEntry/insertBefore_A01_t01: RuntimeError
+LibTest/collection/LinkedListEntry/insertBefore_A01_t02: RuntimeError
+LibTest/collection/LinkedListEntry/list_A01_t01: RuntimeError
+LibTest/collection/LinkedListEntry/next_A01_t02: RuntimeError
+LibTest/collection/LinkedListEntry/next_A01_t03: RuntimeError
+LibTest/collection/LinkedListEntry/previous_A01_t02: RuntimeError
+LibTest/collection/LinkedListEntry/previous_A01_t03: RuntimeError
+LibTest/collection/LinkedListEntry/unlink_A01_t01: RuntimeError
+LibTest/collection/LinkedListEntry/unlink_A02_t02: RuntimeError
+LibTest/collection/ListMixin/ListMixin_class_A01_t01: RuntimeError
+LibTest/collection/ListQueue/ListQueue.from_A01_t01: RuntimeError
+LibTest/convert/LineSplitter/fuse_A01_t01: RuntimeError
+LibTest/core/AssertionError/AssertionError_A01_t01: RuntimeError
+LibTest/core/AssertionError/message_A01_t01: RuntimeError
+LibTest/core/CyclicInitializationError/CyclicInitializationError.class_A01_t01: RuntimeError
+LibTest/core/CyclicInitializationError/variableName_A01_t01: RuntimeError
+LibTest/core/DateTime/DateTime.fromMicrosecondsSinceEpoch_A01_t01: RuntimeError
+LibTest/core/DateTime/microsecond_A01_t01: RuntimeError
+LibTest/core/DateTime/microsecondsSinceEpoch_A01_t01: RuntimeError
+LibTest/core/DateTime/parse_A01_t03: RuntimeError
+LibTest/core/DateTime/to8601String_A01_t01: RuntimeError
+LibTest/core/DateTime/to8601String_A01_t02: RuntimeError
+LibTest/core/Duration/Duration_A01_t01: CompileTimeError
+LibTest/core/Duration/Duration_A02_t01: CompileTimeError
+LibTest/core/Duration/inDays_A01_t01: CompileTimeError
+LibTest/core/Duration/inHours_A01_t01: CompileTimeError
+LibTest/core/Duration/inMicroseconds_A01_t01: CompileTimeError
+LibTest/core/Duration/inMilliseconds_A01_t01: CompileTimeError
+LibTest/core/Duration/inSeconds_A01_t01: CompileTimeError
+LibTest/core/Error/stackTrace_A01_t01: RuntimeError
+LibTest/core/Expando/operator_square_brackets_A01_t01: RuntimeError
+LibTest/core/Expando/operator_square_brackets_A01_t04: RuntimeError
+LibTest/core/Expando/operator_square_brackets_A01_t05: RuntimeError
+LibTest/core/Function/Function_class_A01_t01: RuntimeError
+LibTest/core/IndexError/stackTrace_A01_t01: RuntimeError
+LibTest/core/RegExp/Pattern_semantics/firstMatch_CharacterClassEscape_A03_t01: RuntimeError
+LibTest/core/RegExp/Pattern_semantics/firstMatch_NonEmptyClassRanges_A01_t01: RuntimeError
+LibTest/core/RegExp/Pattern_semantics/splitQueryString_A02_t01: RuntimeError
+LibTest/core/Runes/any_A01_t01: RuntimeError
+LibTest/core/Runes/every_A01_t01: RuntimeError
+LibTest/core/String/padRight_A01_t01: RuntimeError
+LibTest/core/String/replaceFirstMapped_A03_t01: RuntimeError
+LibTest/core/Symbol/Symbol_A01_t04: RuntimeError
+LibTest/core/Uri/Uri.dataFromBytes_A01_t02: RuntimeError
+LibTest/core/Uri/Uri.dataFromBytes_A01_t03: RuntimeError
+LibTest/core/Uri/Uri.dataFromBytes_A01_t04: RuntimeError
+LibTest/core/Uri/Uri.dataFromBytes_A01_t05: RuntimeError
+LibTest/core/Uri/Uri.dataFromString_A01_t01: RuntimeError
+LibTest/core/Uri/Uri.dataFromString_A01_t03: RuntimeError
+LibTest/core/Uri/Uri.dataFromString_A01_t04: RuntimeError
+LibTest/core/Uri/Uri.dataFromString_A02_t03: RuntimeError
+LibTest/core/Uri/Uri.file_A02_t03: RuntimeError
+LibTest/core/Uri/queryParametersAll_A01_t04: RuntimeError
+LibTest/core/Uri/queryParametersAll_A03_t01: RuntimeError
+LibTest/core/UriData/UriData.fromBytes_A01_t03: RuntimeError
+LibTest/core/UriData/charset_A01_t01: RuntimeError
+LibTest/core/UriData/contentText_A01_t01: RuntimeError
+LibTest/core/UriData/parse_A01_t01: RuntimeError
+LibTest/core/double/INFINITY_A01_t04: RuntimeError
+LibTest/core/double/NEGATIVE_INFINITY_A01_t04: RuntimeError
+LibTest/core/double/isInfinite_A01_t03: CompileTimeError
+LibTest/core/double/operator_GE_A01_t02: CompileTimeError
+LibTest/core/double/operator_GT_A01_t02: CompileTimeError
+LibTest/core/double/operator_LT_A01_t02: CompileTimeError
+LibTest/core/double/operator_addition_A01_t08: Crash
+LibTest/core/double/operator_subtraction_A01_t06: RuntimeError
+LibTest/core/double/operator_subtraction_A01_t09: Crash
+LibTest/core/double/roundToDouble_A01_t01: RuntimeError
+LibTest/core/double/round_A01_t01: RuntimeError
+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/hashCode_A01_t01: CompileTimeError
+LibTest/core/int/isInfinite_A01_t01: CompileTimeError
+LibTest/core/int/isNegative_A01_t01: CompileTimeError
+LibTest/core/int/isOdd_A01_t01: RuntimeError
+LibTest/core/int/operator_AND_A01_t01: CompileTimeError
+LibTest/core/int/operator_GE_A01_t01: CompileTimeError
+LibTest/core/int/operator_LT_A01_t01: CompileTimeError
+LibTest/core/int/operator_XOR_A01_t01: CompileTimeError
+LibTest/core/int/operator_addition_A01_t01: CompileTimeError
+LibTest/core/int/operator_equality_A01_t01: CompileTimeError
+LibTest/core/int/operator_equality_A03_t01: CompileTimeError
+LibTest/core/int/operator_left_shift_A01_t01: RuntimeError
+LibTest/core/int/operator_remainder_A01_t03: RuntimeError
+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: RuntimeError
+LibTest/core/int/operator_unary_minus_A01_t01: CompileTimeError
+LibTest/core/int/parse_A03_t02: CompileTimeError
+LibTest/core/int/roundToDouble_A01_t01: CompileTimeError
+LibTest/core/int/truncateToDouble_A01_t01: CompileTimeError
+LibTest/html/CanvasRenderingContext2D/addEventListener_A01_t03: Timeout
+LibTest/html/Element/getClientRects_A01_t02: RuntimeError, Pass
+LibTest/html/Element/isContentEditable_A01_t01: RuntimeError, Pass
+LibTest/html/Element/loadEvent_A01_t01: Timeout
+LibTest/html/Element/mouseWheelEvent_A01_t01: Timeout
+LibTest/html/Element/onLoad_A01_t01: Timeout
+LibTest/html/Element/onMouseWheel_A01_t01: Timeout
+LibTest/html/Element/transitionEndEvent_A01_t01: Timeout
+LibTest/html/HttpRequest/responseText_A01_t02: Timeout
+LibTest/html/HttpRequestUpload/onError_A01_t02: Timeout
+LibTest/html/HttpRequestUpload/onLoadEnd_A01_t01: Timeout
+LibTest/html/HttpRequestUpload/onLoadStart_A01_t01: Timeout
+LibTest/html/HttpRequestUpload/onLoad_A01_t01: Timeout
+LibTest/html/IFrameElement/enteredView_A01_t01: Timeout
+LibTest/html/IFrameElement/getClientRects_A01_t02: RuntimeError, Pass
+LibTest/html/IFrameElement/onMouseWheel_A01_t01: Timeout
+LibTest/html/IFrameElement/onTransitionEnd_A01_t01: Timeout, Pass
+LibTest/math/atan_A01_t01: RuntimeError
+Utils/tests/Expect/throws_A01_t04: RuntimeError
+WebPlatformTest/DOMEvents/approved/ProcessingInstruction.DOMCharacterDataModified_t01: Timeout
+WebPlatformTest/DOMEvents/approved/addEventListener.optional.useCapture_t01: RuntimeError
+WebPlatformTest/Utils/test/asyncTestFail_t01: RuntimeError
+WebPlatformTest/Utils/test/asyncTestFail_t02: RuntimeError
+WebPlatformTest/Utils/test/asyncTestTimeout_t01: Timeout
+WebPlatformTest/custom-elements/concepts/type_A04_t01: RuntimeError
+WebPlatformTest/custom-elements/concepts/type_A08_t01: RuntimeError
+WebPlatformTest/custom-elements/instantiating/createElementNS_A03_t01: RuntimeError
+WebPlatformTest/custom-elements/instantiating/createElementNS_A04_t01: RuntimeError
+WebPlatformTest/custom-elements/instantiating/createElementNS_A05_t01: RuntimeError
+WebPlatformTest/custom-elements/instantiating/createElement_A01_t01: RuntimeError
+WebPlatformTest/custom-elements/instantiating/createElement_A02_t01: RuntimeError
+WebPlatformTest/custom-elements/instantiating/createElement_A04_t01: RuntimeError
+WebPlatformTest/custom-elements/instantiating/isAttribute_A01_t02: RuntimeError
+WebPlatformTest/custom-elements/instantiating/isAttribute_A03_t01: RuntimeError
+WebPlatformTest/custom-elements/instantiating/localName_A01_t01: RuntimeError
+WebPlatformTest/dom/events/type_A01_t01: RuntimeError
+WebPlatformTest/dom/nodes/DOMImplementation-createDocumentType_t01: RuntimeError, Pass
+WebPlatformTest/dom/nodes/DOMImplementation-createDocument_t01: RuntimeError
+WebPlatformTest/dom/nodes/Document-adoptNode_t01: RuntimeError
+WebPlatformTest/dom/nodes/Node-insertBefore_t01: RuntimeError
+WebPlatformTest/dom/nodes/Node-isEqualNode_t01: Timeout
+WebPlatformTest/dom/nodes/Node-nodeName_t01: RuntimeError
+WebPlatformTest/dom/nodes/attributes/setAttributeNS_A02_t01: RuntimeError, Pass
+WebPlatformTest/dom/nodes/attributes/setAttributeNS_A07_t03: RuntimeError
+WebPlatformTest/dom/nodes/attributes/setAttribute_A03_t01: RuntimeError
+WebPlatformTest/html-imports/link-import_t02: RuntimeError
+WebPlatformTest/html-imports/loading-import_t01: RuntimeError
+WebPlatformTest/html-templates/innerhtml-on-templates/innerhtml_t01: RuntimeError
+WebPlatformTest/html-templates/parsing-html-templates/additions-to-the-in-head-insertion-mode/generating-of-implied-end-tags_t01: RuntimeError
+WebPlatformTest/html-templates/parsing-html-templates/clearing-the-stack-back-to-a-given-context/clearing-stack-back-to-a-table-body-context_t01: RuntimeError
+WebPlatformTest/html-templates/template-element/template-as-a-descendant_t01: RuntimeError
+WebPlatformTest/html/browsers/browsing-the-web/read-media/pageload-video_t01: Timeout
+WebPlatformTest/html/dom/documents/dom-tree-accessors/document.body-setter_t01: RuntimeError
+WebPlatformTest/html/dom/documents/dom-tree-accessors/document.getElementsByName-namespace_t01: RuntimeError
+WebPlatformTest/html/dom/elements/global-attributes/dataset-get_t01: RuntimeError
+WebPlatformTest/html/semantics/embedded-content/media-elements/error-codes/error_t01: Timeout
+WebPlatformTest/html/semantics/embedded-content/media-elements/interfaces/HTMLElement/HTMLMediaElement/addTextTrack_t01: RuntimeError
+WebPlatformTest/html/semantics/embedded-content/media-elements/interfaces/HTMLElement/HTMLTrackElement/kind_t01: RuntimeError
+WebPlatformTest/html/semantics/embedded-content/media-elements/interfaces/TextTrack/cues_t01: Timeout
+WebPlatformTest/html/semantics/embedded-content/media-elements/interfaces/TextTrack/kind_t01: RuntimeError
+WebPlatformTest/html/semantics/forms/textfieldselection/selection_t01: RuntimeError
+WebPlatformTest/html/semantics/forms/textfieldselection/textfieldselection-setRangeText_t01: RuntimeError
+WebPlatformTest/html/semantics/forms/the-button-element/button-validation_t01: RuntimeError
+WebPlatformTest/html/semantics/forms/the-datalist-element/datalistelement_t01: RuntimeError
+WebPlatformTest/html/semantics/forms/the-form-element/form-elements-matches_t01: RuntimeError
+WebPlatformTest/html/semantics/forms/the-form-element/form-nameditem_t01: RuntimeError
+WebPlatformTest/html/semantics/forms/the-input-element/color_t01: RuntimeError
+WebPlatformTest/html/semantics/forms/the-input-element/datetime_t02: RuntimeError
+WebPlatformTest/html/semantics/forms/the-input-element/input-type-button_t01: RuntimeError
+WebPlatformTest/html/semantics/forms/the-input-element/mobiles_t01: RuntimeError
+WebPlatformTest/html/semantics/forms/the-input-element/month_t01: RuntimeError
+WebPlatformTest/html/semantics/forms/the-input-element/password_t01: RuntimeError
+WebPlatformTest/html/semantics/forms/the-input-element/range_t01: RuntimeError
+WebPlatformTest/html/semantics/forms/the-input-element/time_t01: RuntimeError
+WebPlatformTest/html/semantics/forms/the-input-element/time_t02: RuntimeError
+WebPlatformTest/html/semantics/forms/the-input-element/type-change-state_t01: RuntimeError
+WebPlatformTest/html/semantics/forms/the-input-element/week_t01: RuntimeError
+WebPlatformTest/html/semantics/forms/the-option-element/option-text-spaces_t01: RuntimeError
+WebPlatformTest/html/semantics/forms/the-textarea-element/textarea-type_t01: RuntimeError
+WebPlatformTest/html/semantics/interactive-elements/the-dialog-element/dialog-close_t01: RuntimeError
+WebPlatformTest/html/semantics/selectors/pseudo-classes/checked_t01: RuntimeError
+WebPlatformTest/html/semantics/selectors/pseudo-classes/focus_t01: RuntimeError, Pass
+WebPlatformTest/html/semantics/selectors/pseudo-classes/indeterminate_t01: RuntimeError
+WebPlatformTest/html/semantics/tabular-data/attributes-common-to-td-and-th-elements/cellIndex_t01: RuntimeError
+WebPlatformTest/html/semantics/tabular-data/the-table-element/table-rows_t01: RuntimeError
+WebPlatformTest/html/webappapis/system-state-and-capabilities/the-navigator-object/protocol_t00: RuntimeError
+WebPlatformTest/shadow-dom/elements-and-dom-objects/extensions-to-element-interface/attributes/test-001_t01: RuntimeError
+WebPlatformTest/shadow-dom/elements-and-dom-objects/extensions-to-element-interface/attributes/test-005_t01: RuntimeError
+WebPlatformTest/shadow-dom/elements-and-dom-objects/extensions-to-element-interface/methods/test-003_t01: RuntimeError
+WebPlatformTest/shadow-dom/elements-and-dom-objects/extensions-to-event-interface/event-path-001_t01: RuntimeError
+WebPlatformTest/shadow-dom/elements-and-dom-objects/shadowroot-object/shadowroot-attributes/test-009_t01: RuntimeError
+WebPlatformTest/shadow-dom/elements-and-dom-objects/shadowroot-object/shadowroot-attributes/test-011_t01: RuntimeError
+WebPlatformTest/shadow-dom/elements-and-dom-objects/shadowroot-object/shadowroot-attributes/test-013_t01: RuntimeError
+WebPlatformTest/shadow-dom/elements-and-dom-objects/shadowroot-object/shadowroot-methods/test-001_t01: RuntimeError
+WebPlatformTest/shadow-dom/elements-and-dom-objects/the-content-html-element/test-003_t01: RuntimeError
+WebPlatformTest/shadow-dom/elements-and-dom-objects/the-content-html-element/test-004_t02: RuntimeError
+WebPlatformTest/shadow-dom/elements-and-dom-objects/the-content-html-element/test-005_t01: RuntimeError
+WebPlatformTest/shadow-dom/elements-and-dom-objects/the-shadow-html-element/test-002_t01: RuntimeError
+WebPlatformTest/shadow-dom/elements-and-dom-objects/the-shadow-html-element/test-003_t01: RuntimeError
+WebPlatformTest/shadow-dom/elements-and-dom-objects/the-shadow-html-element/test-005_t01: RuntimeError
+WebPlatformTest/shadow-dom/events/event-dispatch/test-002_t01: RuntimeError
+WebPlatformTest/shadow-dom/events/event-retargeting/test-001_t01: RuntimeError
+WebPlatformTest/shadow-dom/events/events-that-are-always-stopped/test-001_t01: RuntimeError
+WebPlatformTest/shadow-dom/events/events-that-are-always-stopped/test-003_t01: RuntimeError
+WebPlatformTest/shadow-dom/events/events-that-are-always-stopped/test-005_t01: RuntimeError
+WebPlatformTest/shadow-dom/events/events-that-are-always-stopped/test-007_t01: RuntimeError
+WebPlatformTest/shadow-dom/events/events-that-are-always-stopped/test-008_t01: RuntimeError
+WebPlatformTest/shadow-dom/events/retargeting-focus-events/test-001_t04: RuntimeError
+WebPlatformTest/shadow-dom/events/retargeting-focus-events/test-001_t06: RuntimeError
+WebPlatformTest/shadow-dom/events/retargeting-relatedtarget/test-001_t01: RuntimeError
+WebPlatformTest/shadow-dom/html-elements-and-their-shadow-trees/test-001_t01: RuntimeError
+WebPlatformTest/shadow-dom/html-elements-and-their-shadow-trees/test-003_t01: RuntimeError
+WebPlatformTest/shadow-dom/html-elements-and-their-shadow-trees/test-004_t01: RuntimeError
+WebPlatformTest/shadow-dom/html-elements-in-shadow-trees/html-forms/test-001_t01: RuntimeError
+WebPlatformTest/shadow-dom/html-elements-in-shadow-trees/html-forms/test-002_t01: RuntimeError
+WebPlatformTest/shadow-dom/shadow-trees/custom-pseudo-elements/test-001_t01: RuntimeError
+WebPlatformTest/shadow-dom/shadow-trees/distributed-pseudo-element/test-002_t01: RuntimeError
+WebPlatformTest/shadow-dom/shadow-trees/hosting-multiple-shadow-trees/test-003_t01: RuntimeError
+WebPlatformTest/shadow-dom/shadow-trees/lower-boundary-encapsulation/distribution-003_t01: RuntimeError
+WebPlatformTest/shadow-dom/shadow-trees/lower-boundary-encapsulation/test-005_t01: RuntimeError
+WebPlatformTest/shadow-dom/shadow-trees/nested-shadow-trees/test-001_t01: RuntimeError
+WebPlatformTest/shadow-dom/shadow-trees/reprojection/test-001_t01: RuntimeError
+WebPlatformTest/shadow-dom/shadow-trees/satisfying-matching-criteria/test-006_t01: RuntimeError
+WebPlatformTest/shadow-dom/shadow-trees/upper-boundary-encapsulation/ownerdocument-002_t01: RuntimeError
+WebPlatformTest/shadow-dom/shadow-trees/upper-boundary-encapsulation/test-005_t01: RuntimeError
+WebPlatformTest/shadow-dom/shadow-trees/upper-boundary-encapsulation/test-011_t01: RuntimeError
+WebPlatformTest/webstorage/event_constructor_t02: RuntimeError
+WebPlatformTest/webstorage/event_local_key_t01: Timeout
+WebPlatformTest/webstorage/event_local_newvalue_t01: Timeout
+WebPlatformTest/webstorage/event_local_oldvalue_t01: Timeout
+WebPlatformTest/webstorage/event_local_storagearea_t01: Timeout
+WebPlatformTest/webstorage/event_local_url_t01: Timeout
+WebPlatformTest/webstorage/event_session_key_t01: Timeout
+WebPlatformTest/webstorage/event_session_newvalue_t01: Timeout
+WebPlatformTest/webstorage/event_session_oldvalue_t01: Timeout
+WebPlatformTest/webstorage/event_session_storagearea_t01: Timeout
+WebPlatformTest/webstorage/event_session_url_t01: Timeout
+WebPlatformTest/webstorage/storage_session_setitem_quotaexceedederr_t01: Timeout
+
+[ $compiler == dart2js && $runtime == safari && $fast_startup ]
+LayoutTests/fast/canvas/canvas-alphaImageData-behavior_t01: RuntimeError, Pass
+LayoutTests/fast/canvas/canvas-blend-image_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-composite-alpha_t01: RuntimeError, Pass
+LayoutTests/fast/canvas/canvas-composite-canvas_t01: RuntimeError, Pass
+LayoutTests/fast/canvas/canvas-composite-image_t01: RuntimeError, Pass
+LayoutTests/fast/canvas/canvas-drawImage-scaled-copy-to-self_t01: RuntimeError
+LayoutTests/fast/canvas/canvas-lineDash_t01: RuntimeError, Pass
+LayoutTests/fast/canvas/canvas-lineWidth-intact-after-strokeRect_t01: RuntimeError, Pass
+LayoutTests/fast/canvas/canvas-scale-drawImage-shadow_t01: RuntimeError, Pass
+LayoutTests/fast/canvas/canvas-scale-fillPath-shadow_t01: RuntimeError, Pass
+LayoutTests/fast/canvas/canvas-scale-fillRect-shadow_t01: RuntimeError, Pass
+LayoutTests/fast/canvas/canvas-strokePath-alpha-shadow_t01: RuntimeError, Pass
+LayoutTests/fast/canvas/canvas-strokePath-shadow_t01: RuntimeError, Pass
+LayoutTests/fast/canvas/canvas-strokeRect-alpha-shadow_t01: RuntimeError, Pass
+LayoutTests/fast/canvas/canvas-strokeRect-gradient-shadow_t01: RuntimeError, Pass
+LayoutTests/fast/canvas/canvas-style-intact-after-text_t01: RuntimeError, Pass
+LayoutTests/fast/canvas/canvas-transforms-fillRect-shadow_t01: RuntimeError, Pass
+LayoutTests/fast/canvas/fillText-shadow_t01: RuntimeError, Pass
+LayoutTests/fast/canvas/text-globalAlpha_t01: RuntimeError, Pass
+LayoutTests/fast/canvas/webgl/canvas-test_t01: RuntimeError, Pass
+LayoutTests/fast/canvas/webgl/context-lost_t01: RuntimeError, Pass
+LayoutTests/fast/css/computed-offset-with-zoom_t01: RuntimeError
+LayoutTests/fast/css/counters/counter-cssText_t01: RuntimeError
+LayoutTests/fast/css/cssText-shorthand_t01: RuntimeError
+LayoutTests/fast/css/font-face-unicode-range-monospace_t01: RuntimeError
+LayoutTests/fast/css/getPropertyValue-columns_t01: RuntimeError
+LayoutTests/fast/css/invalid-not-with-simple-selector-sequence_t01: RuntimeError
+LayoutTests/fast/css/parsing-object-position_t01: RuntimeError
+LayoutTests/fast/css/pseudo-any_t01: RuntimeError, Pass
+LayoutTests/fast/css/shadow-current-color_t01: RuntimeError
+LayoutTests/fast/css/sticky/parsing-position-sticky_t01: RuntimeError
+LayoutTests/fast/css3-text/css3-text-align-last/getComputedStyle/getComputedStyle-text-align-last-inherited_t01: RuntimeError
+LayoutTests/fast/css3-text/css3-text-align-last/getComputedStyle/getComputedStyle-text-align-last_t01: RuntimeError
+LayoutTests/fast/dom/Attr/direction-attribute-set-and-cleared_t01: RuntimeError
+LayoutTests/fast/dom/DOMException/XPathException_t01: RuntimeError
+LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-search_t01: RuntimeError, Pass
+LayoutTests/fast/dom/HTMLSelectElement/selected-index-preserved-when-option-text-changes_t01: RuntimeError
+LayoutTests/fast/dom/MutationObserver/observe-options-attributes_t01: RuntimeError
+LayoutTests/fast/files/file-reader-readystate_t01: RuntimeError
+LayoutTests/fast/filesystem/input-access-entries_t01: RuntimeError
+LayoutTests/fast/forms/date-multiple-fields/date-multiple-fields-change-layout-by-value_t01: RuntimeError
+LayoutTests/fast/forms/date/date-input-type_t01: RuntimeError
+LayoutTests/fast/forms/date/input-valueasnumber-date_t01: RuntimeError
+LayoutTests/fast/forms/menulist-submit-without-selection_t01: RuntimeError, Pass
+LayoutTests/fast/inline/continuation-inlines-inserted-in-reverse-after-block_t01: RuntimeError
+LayoutTests/fast/innerHTML/innerHTML-uri-resolution_t01: RuntimeError
+LayoutTests/fast/media/media-query-list_t01: RuntimeError
+LayoutTests/fast/mediastream/getusermedia_t01: RuntimeError, Pass
+LayoutTests/fast/multicol/balance-short-trailing-empty-block_t01: RuntimeError
+LayoutTests/fast/multicol/balance-trailing-border_t01: RuntimeError
+LayoutTests/fast/multicol/balance-trailing-border_t02: RuntimeError
+LayoutTests/fast/multicol/columns-shorthand-parsing_t02: RuntimeError
+LayoutTests/fast/replaced/iframe-with-percentage-height-within-table-with-anonymous-table-cell_t01: RuntimeError
+LayoutTests/fast/replaced/preferred-widths_t01: RuntimeError, Pass
+LayoutTests/fast/shapes/shape-outside-floats/shape-outside-floats-image-margin_t02: RuntimeError, Pass
+LayoutTests/fast/sub-pixel/table-rows-have-stable-height_t01: RuntimeError
+LayoutTests/fast/table/absolute-table-percent-lengths_t01: RuntimeError
+LayoutTests/fast/table/css-table-max-height_t01: RuntimeError
+LayoutTests/fast/table/css-table-width-with-border-padding_t01: RuntimeError
+LayoutTests/fast/table/hittest-tablecell-right-edge_t01: RuntimeError
+LayoutTests/fast/table/hittest-tablecell-with-borders-right-edge_t01: RuntimeError
+LayoutTests/fast/table/margins-perpendicular-containing-block_t01: RuntimeError
+LayoutTests/fast/table/min-max-width-preferred-size_t01: RuntimeError
+LayoutTests/fast/table/switch-table-layout-dynamic-cells_t01: RuntimeError
+LayoutTests/fast/table/table-all-rowspans-height-distribution-in-rows-except-overlapped_t01: RuntimeError
+LayoutTests/fast/table/table-width-exceeding-max-width_t01: RuntimeError
+LayoutTests/fast/text-autosizing/vertical-writing-mode_t01: RuntimeError
+LayoutTests/fast/text/find-spaces_t01: RuntimeError
+LayoutTests/fast/text/font-ligatures-linebreak-word_t01: RuntimeError
+LayoutTests/fast/text/font-ligatures-linebreak_t01: RuntimeError
+LayoutTests/fast/text/international/cjk-segmentation_t01: RuntimeError
+LayoutTests/fast/text/selection-exceptions_t01: RuntimeError
+LayoutTests/fast/transforms/bounding-rect-zoom_t01: RuntimeError
+LayoutTests/fast/transforms/hit-test-large-scale_t01: RuntimeError
+LayoutTests/fast/writing-mode/vertical-font-vmtx-units-per-em_t01: RuntimeError
+LayoutTests/fast/xmlhttprequest/xmlhttprequest-responsetype-sync-request_t01: RuntimeError
+LibTest/html/Element/isContentEditable_A02_t01: RuntimeError
+LibTest/html/IFrameElement/getClientRects_A01_t02: RuntimeError, Pass
+LibTest/html/IFrameElement/isContentEditable_A01_t01: RuntimeError
+LibTest/html/Window/close_A01_t01: RuntimeError
+LibTest/math/cos_A01_t01: RuntimeError
+WebPlatformTest/dom/nodes/DOMImplementation-createDocumentType_t01: RuntimeError, Pass
+WebPlatformTest/dom/nodes/Document-createElementNS_t01: RuntimeError, Pass
+WebPlatformTest/dom/nodes/attributes/setAttributeNS_A02_t01: RuntimeError, Pass
+WebPlatformTest/html/semantics/scripting-1/the-script-element/async_t11: RuntimeError
+
+[ $compiler == dart2js && $runtime == safari && !$fast_startup ]
+LayoutTests/fast/canvas/canvas-alphaImageData-behavior_t01: RuntimeError, Pass
+LayoutTests/fast/canvas/canvas-composite-alpha_t01: RuntimeError, Pass
+LayoutTests/fast/canvas/canvas-composite-image_t01: RuntimeError, Pass
+LayoutTests/fast/canvas/canvas-getImageData_t01: RuntimeError, Pass
+LayoutTests/fast/canvas/canvas-lineDash_t01: RuntimeError, Pass
+LayoutTests/fast/canvas/canvas-lineWidth-intact-after-strokeRect_t01: RuntimeError, Pass
+LayoutTests/fast/canvas/canvas-scale-drawImage-shadow_t01: RuntimeError, Pass
+LayoutTests/fast/canvas/canvas-scale-fillPath-shadow_t01: RuntimeError, Pass
+LayoutTests/fast/canvas/canvas-scale-fillRect-shadow_t01: RuntimeError, Pass
+LayoutTests/fast/canvas/canvas-strokeRect-alpha-shadow_t01: RuntimeError, Pass
+LayoutTests/fast/canvas/canvas-style-intact-after-text_t01: RuntimeError, Pass
+LayoutTests/fast/canvas/canvas-transforms-fillRect-shadow_t01: RuntimeError, Pass
+LayoutTests/fast/canvas/fillText-shadow_t01: RuntimeError, Pass
+LayoutTests/fast/canvas/text-globalAlpha_t01: RuntimeError, Pass
+LayoutTests/fast/canvas/webgl/canvas-test_t01: RuntimeError, Pass
+LayoutTests/fast/css/focus-display-block-inline_t01: RuntimeError, Pass
+LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-search_t01: RuntimeError, Pass
+LayoutTests/fast/forms/autofocus-input-css-style-change_t01: RuntimeError, Pass
+LayoutTests/fast/mediastream/getusermedia_t01: RuntimeError, Pass
+LayoutTests/fast/shapes/shape-outside-floats/shape-outside-floats-image-margin_t02: RuntimeError, Pass
+WebPlatformTest/dom/nodes/Document-createElementNS_t01: RuntimeError, Pass
+
+[ $compiler == dart2js && $runtime != safari ]
+LayoutTests/fast/canvas/canvas-lineDash_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/buffer-data-array-buffer_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/context-lost_t01: RuntimeError
+LayoutTests/fast/canvas/webgl/uninitialized-test_t01: RuntimeError
+LayoutTests/fast/css/background-clip-text_t01: RuntimeError
+LayoutTests/fast/css/border-radius-property-value_t01: RuntimeError
+LayoutTests/fast/css/child-selector-implicit-tbody_t01: RuntimeError
+LayoutTests/fast/css/getPropertyValue-border_t01: RuntimeError
+LayoutTests/fast/css/url-with-multi-byte-unicode-escape_t01: RuntimeError
+LayoutTests/fast/dom/DOMImplementation/createDocumentType-err_t01: RuntimeError
+LayoutTests/fast/dom/Document/CaretRangeFromPoint/replace-element_t01: RuntimeError
+LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-search_t01: RuntimeError
+LayoutTests/fast/dom/HTMLSelectElement/change-multiple-preserve-selection_t01: RuntimeError
+LayoutTests/fast/dom/StyleSheet/detached-parent-rule-without-wrapper_t01: RuntimeError
+LayoutTests/fast/dom/StyleSheet/removed-media-rule-deleted-parent-crash_t01: RuntimeError
+LayoutTests/fast/dom/StyleSheet/removed-stylesheet-rule-deleted-parent-crash_t01: RuntimeError
+LayoutTests/fast/dom/offset-position-writing-modes_t01: RuntimeError
+LayoutTests/fast/events/document-elementFromPoint_t01: RuntimeError
+LayoutTests/fast/eventsource/eventsource-constructor_t01: RuntimeError
+LayoutTests/fast/forms/ValidityState-tooLong-input_t01: RuntimeError
+LayoutTests/fast/forms/fieldset/fieldset-elements_t01: RuntimeError
+LayoutTests/fast/forms/menulist-submit-without-selection_t01: RuntimeError, Pass
+LayoutTests/fast/forms/select-change-popup-to-listbox-in-event-handler_t01: RuntimeError
+LayoutTests/fast/forms/select-clientheight-with-multiple-attr_t01: RuntimeError
+LayoutTests/fast/forms/select-list-box-mouse-focus_t01: RuntimeError
+LayoutTests/fast/forms/selection-start-end-readonly_t01: RuntimeError
+LayoutTests/fast/html/aside-element_t01: RuntimeError
+LayoutTests/fast/html/details-add-child-1_t01: RuntimeError
+LayoutTests/fast/html/figcaption-element_t01: RuntimeError
+LayoutTests/fast/html/footer-element_t01: RuntimeError
+LayoutTests/fast/html/mark-element_t01: RuntimeError
+LayoutTests/fast/html/section-element_t01: RuntimeError
+LayoutTests/fast/masking/parsing-mask-source-type_t01: RuntimeError
+LayoutTests/fast/mediastream/getusermedia_t01: RuntimeError
+LayoutTests/fast/multicol/flipped-blocks-hit-test_t01: RuntimeError
+LayoutTests/fast/text/pre-wrap-trailing-tab_t01: RuntimeError
+LibTest/html/Element/blur_A01_t01: RuntimeError
+LibTest/html/HttpRequest/overrideMimeType_A01_t01: RuntimeError
+LibTest/html/IFrameElement/focus_A01_t01: RuntimeError
+LibTest/math/log_A01_t01: RuntimeError
+WebPlatformTest/dom/nodes/DOMImplementation-createDocumentType_t01: RuntimeError
+WebPlatformTest/dom/nodes/Document-createElementNS_t01: RuntimeError
+WebPlatformTest/dom/nodes/attributes/setAttributeNS_A02_t01: RuntimeError
+WebPlatformTest/html/semantics/grouping-content/the-ol-element/ol.start-reflection_t02: RuntimeError
+
+[ $compiler == dart2js && $system != macos ]
+LayoutTests/fast/text/zero-width-characters_t01: RuntimeError
diff --git a/tests/co19_2/co19_2-kernel.status b/tests/co19_2/co19_2-kernel.status
index 3e28235..a1c4e33 100644
--- a/tests/co19_2/co19_2-kernel.status
+++ b/tests/co19_2/co19_2-kernel.status
@@ -13,16 +13,8 @@
Language/Classes/Abstract_Instance_Members/same_name_static_method_in_superclass_t04: MissingCompileTimeError # Legal, see #33235
Language/Classes/Abstract_Instance_Members/same_name_static_method_in_superclass_t05: MissingCompileTimeError # Legal, see #33235
Language/Classes/Abstract_Instance_Members/same_name_static_method_in_superclass_t06: MissingCompileTimeError # Legal, see #33235
-Language/Classes/Constructors/Constant_Constructors/initializer_not_a_constant_t01: MissingCompileTimeError # Issue 34191
-Language/Classes/Constructors/Constant_Constructors/initializer_not_a_constant_t02: MissingCompileTimeError # Issue 34191
-Language/Classes/Constructors/Constant_Constructors/initializer_not_a_constant_t03: MissingCompileTimeError # Issue 34191
-Language/Classes/Constructors/Constant_Constructors/invalid_constant_initializer_t02: MissingCompileTimeError # Issue 34192
Language/Classes/Constructors/Constant_Constructors/potentially_constant_expression_t01: MissingCompileTimeError # Issue 34192
Language/Classes/Constructors/Factories/arguments_type_t01: MissingCompileTimeError # Issue 33308
-Language/Classes/Constructors/Factories/const_modifier_t01: MissingCompileTimeError # Issue 34161
-Language/Classes/Constructors/Factories/const_modifier_t02: MissingCompileTimeError # Issue 34161
-Language/Classes/Constructors/Factories/default_value_t01: MissingCompileTimeError # Issue 34160
-Language/Classes/Constructors/Factories/default_value_t02: MissingCompileTimeError # Issue 34160
Language/Classes/Constructors/Factories/function_type_t01: MissingCompileTimeError # Issue 31590
Language/Classes/Constructors/Factories/function_type_t02: MissingCompileTimeError # Issue 31590
Language/Classes/Constructors/Generative_Constructors/final_variables_t01: CompileTimeError # Expects a warning, but this is an error in Dart 2
@@ -47,7 +39,6 @@
Language/Classes/Instance_Methods/same_name_static_member_in_superclass_t06: MissingCompileTimeError # Legal, see #33235
Language/Classes/Instance_Methods/same_name_static_member_in_superclass_t07: MissingCompileTimeError # Legal, see #33235
Language/Classes/Instance_Methods/same_name_static_member_in_superclass_t09: MissingCompileTimeError # Legal, see #33235
-Language/Classes/Instance_Variables/constant_t01: MissingCompileTimeError # Issue 32326
Language/Classes/Setters/instance_setter_t01: MissingCompileTimeError # Legal, see #33235
Language/Classes/Setters/instance_setter_t02: MissingCompileTimeError # Legal, see #33235
Language/Classes/Setters/instance_setter_t03: MissingCompileTimeError # Legal, see #33235
@@ -76,12 +67,6 @@
Language/Expressions/Constants/constant_map_t02: MissingCompileTimeError # Legal because of implicit const
Language/Expressions/Constants/depending_on_itself_t03: MissingCompileTimeError # Issue 34189
Language/Expressions/Constants/equals_expression_t03: MissingCompileTimeError # Issue 34192
-Language/Expressions/Constants/exception_t01: MissingCompileTimeError # Issue 31936
-Language/Expressions/Constants/exception_t03: MissingCompileTimeError # Issue 31936
-Language/Expressions/Constants/exception_t04: MissingCompileTimeError # Issue 31936
-Language/Expressions/Constants/literal_string_t02: MissingCompileTimeError # Issue 34192
-Language/Expressions/Constants/no_other_constant_expressions_t11: MissingCompileTimeError # Issue 34192
-Language/Expressions/Constants/ternary_operator_t02: MissingCompileTimeError # Issue 34192
Language/Expressions/Equality/syntax_t01: CompileTimeError
Language/Expressions/Function_Expressions/syntax_t05: CompileTimeError
Language/Expressions/Function_Invocation/async_cleanup_t01: CompileTimeError
@@ -93,15 +78,11 @@
Language/Expressions/Function_Invocation/async_cleanup_t07: CompileTimeError
Language/Expressions/Function_Invocation/async_cleanup_t08: CompileTimeError
Language/Expressions/Instance_Creation/Const/arguments_t03: MissingCompileTimeError # Legal because of implicit const
-Language/Expressions/Instance_Creation/Const/exception_t01: MissingCompileTimeError # Issue 31936
Language/Expressions/Instance_Creation/Const/parameterized_type_t01: CompileTimeError
Language/Expressions/Instance_Creation/Const/parameterized_type_t02: CompileTimeError
Language/Expressions/Instance_Creation/New/evaluation_t16: MissingCompileTimeError # Issue 33308
Language/Expressions/Instance_Creation/New/evaluation_t17: MissingCompileTimeError # Issue 33308
Language/Expressions/Instance_Creation/New/evaluation_t18: MissingCompileTimeError # Issue 33308
-Language/Expressions/Instance_Creation/New/generic_type_t01: MissingCompileTimeError # Issue 32972
-Language/Expressions/Instance_Creation/New/generic_type_t02: MissingCompileTimeError # Issue 32972
-Language/Expressions/Instance_Creation/New/generic_type_t03: MissingCompileTimeError # Issue 32972
Language/Expressions/Instance_Creation/New/redirecting_factory_constructor_t02: MissingCompileTimeError # Issue 33308
Language/Expressions/Instance_Creation/New/syntax_t04: MissingCompileTimeError # Legal because of implicit new
Language/Expressions/Instance_Creation/New/type_argument_t01: MissingCompileTimeError # Issue 33308
@@ -112,7 +93,6 @@
Language/Expressions/Maps/equal_keys_t01: MissingCompileTimeError
Language/Expressions/Maps/key_value_equals_operator_t01: MissingCompileTimeError # Issue 32557
Language/Expressions/Method_Invocation/Ordinary_Invocation/accessible_instance_member_t04: CompileTimeError
-Language/Expressions/Method_Invocation/Ordinary_Invocation/function_type_t01: MissingCompileTimeError # Issue 32975
Language/Expressions/Method_Invocation/Super_Invocation/getter_lookup_failed_t02: CompileTimeError
Language/Expressions/Multiplicative_Expressions/syntax_t01: CompileTimeError
Language/Expressions/Postfix_Expressions/syntax_t01: CompileTimeError
@@ -137,8 +117,6 @@
Language/Generics/upper_bound_t01: MissingCompileTimeError # Issue 33308
Language/Libraries_and_Scripts/Exports/reexport_t01: MissingCompileTimeError # Issue 12916
Language/Libraries_and_Scripts/Exports/same_name_t01: MissingCompileTimeError # Issue 12916
-Language/Libraries_and_Scripts/Imports/invalid_uri_t01: MissingCompileTimeError # Issue 33650
-Language/Metadata/compilation_t03: MissingCompileTimeError # Issue 34205
Language/Mixins/Mixin_Application/deferred_t01: MissingCompileTimeError # Issue 30273
Language/Mixins/Mixin_Application/static_warning_t01: MissingCompileTimeError # Mixin super equirement
Language/Mixins/Mixin_Application/syntax_t21: CompileTimeError # The test even says in the comment it should be a compile time error
@@ -160,18 +138,9 @@
Language/Statements/Continue/label_t07: MissingCompileTimeError # Issue 34206
Language/Statements/Switch/equal_operator_t01: MissingCompileTimeError # Issue 32557
Language/Statements/Switch/equal_operator_t02: MissingCompileTimeError # Issue 32557
-Language/Statements/Switch/execution_t01: MissingCompileTimeError # Issue 34207
-Language/Statements/Switch/expressions_t01: MissingCompileTimeError # Issue 34207
-Language/Statements/Switch/expressions_t02: MissingCompileTimeError # Issue 34207
-Language/Statements/Switch/expressions_t04: MissingCompileTimeError # Issue 34207
-Language/Statements/Switch/type_t01: MissingCompileTimeError # Issue 34207
-Language/Statements/Switch/type_t02: MissingCompileTimeError # Issue 34207
Language/Statements/Try/catch_scope_t01: CompileTimeError
Language/Types/Dynamic_Type_System/malbounded_type_error_t01: MissingCompileTimeError # Issue 33308
Language/Types/Interface_Types/subtype_t30: CompileTimeError
-Language/Types/Parameterized_Types/arity_mismatch_t01: MissingCompileTimeError # Issue 32972
-Language/Types/Parameterized_Types/arity_mismatch_t05: MissingCompileTimeError # Issue 32972
-Language/Types/Parameterized_Types/arity_mismatch_t07: MissingCompileTimeError # Issue 32972
Language/Types/Parameterized_Types/malbounded_t01: MissingCompileTimeError # Issue 33308
Language/Types/Parameterized_Types/malbounded_t02: MissingCompileTimeError # Issue 33308
Language/Types/Parameterized_Types/malbounded_t03: MissingCompileTimeError # Issue 33308
@@ -181,32 +150,63 @@
Language/Types/Static_Types/malformed_type_t01/04: MissingCompileTimeError # Issue 33308
Language/Types/Static_Types/malformed_type_t01/05: MissingCompileTimeError # Issue 33308
Language/Types/Static_Types/malformed_type_t01/06: MissingCompileTimeError # Issue 33308
-Language/Types/Type_Void/returning_t03: MissingCompileTimeError # Issue 30470
-Language/Types/Type_Void/returning_t04: MissingCompileTimeError # Issue 30470
-Language/Types/Type_Void/returning_t05: MissingCompileTimeError # Issue 30470
Language/Types/Type_Void/syntax_t08: MissingCompileTimeError # Issue 33308
-Language/Types/Type_Void/using_t01: MissingCompileTimeError # Issue 30470
-LanguageFeatures/Instantiate-to-bound/Callable/Callable_ret_extends_neg_assign_l1_t01: MissingCompileTimeError
-LanguageFeatures/Instantiate-to-bound/Callable/Callable_ret_extends_neg_assign_l1_t03: MissingCompileTimeError
-LanguageFeatures/Instantiate-to-bound/Callable/Callable_ret_extends_neg_assign_l1_t04: MissingCompileTimeError
-LanguageFeatures/Instantiate-to-bound/Callable/Callable_ret_extends_neg_assign_l1_t05: MissingCompileTimeError
-LanguageFeatures/Instantiate-to-bound/Callable/Callable_ret_extends_neg_assign_l1_t06: MissingCompileTimeError
-LanguageFeatures/Instantiate-to-bound/Callable/Callable_ret_extends_neg_assign_l1_t07: MissingCompileTimeError
-LanguageFeatures/Instantiate-to-bound/Callable/Callable_ret_extends_neg_assign_l1_t08: MissingCompileTimeError
-LanguageFeatures/Instantiate-to-bound/Callable/Callable_ret_extends_neg_assign_l1_t09: MissingCompileTimeError
-LanguageFeatures/Instantiate-to-bound/Callable/Callable_ret_extends_neg_assign_l1_t10: MissingCompileTimeError
-LanguageFeatures/Instantiate-to-bound/Callable/Callable_ret_extends_neg_assign_l1_t12: MissingCompileTimeError
-LanguageFeatures/Instantiate-to-bound/Callable/Callable_ret_extends_neg_assign_l1_t13: MissingCompileTimeError
-LanguageFeatures/Instantiate-to-bound/Callable/Callable_ret_extends_neg_assign_l1_t14: MissingCompileTimeError
-LanguageFeatures/Instantiate-to-bound/Callable/Callable_ret_extends_neg_assign_l1_t15: MissingCompileTimeError
-LanguageFeatures/Instantiate-to-bound/Callable/Callable_ret_extends_neg_assign_l1_t17: MissingCompileTimeError
-LanguageFeatures/Instantiate-to-bound/Callable/Callable_ret_extends_neg_assign_l1_t18: MissingCompileTimeError
-LanguageFeatures/Instantiate-to-bound/Callable/Callable_ret_extends_neg_assign_l1_t20: MissingCompileTimeError
-LanguageFeatures/Instantiate-to-bound/Callable/Callable_ret_extends_neg_assign_l1_t21: MissingCompileTimeError
-LanguageFeatures/Instantiate-to-bound/class/custom_extends_neg_l1_t01: MissingCompileTimeError
+Language/Types/Type_Void/syntax_t09: CompileTimeError # Test contains a compile-time error
+Language/Types/Type_Void/using_t02: CompileTimeError # Test contains a compile-time error
+LanguageFeatures/Instantiate-to-bound/Callable/Callable_named_extends_neg_assign_l1_t01: MissingCompileTimeError # Please triage this failure
+LanguageFeatures/Instantiate-to-bound/Callable/Callable_named_extends_neg_assign_l1_t03: MissingCompileTimeError # Issue 34087
+LanguageFeatures/Instantiate-to-bound/Callable/Callable_named_extends_neg_assign_l1_t04: MissingCompileTimeError # Issue 34087
+LanguageFeatures/Instantiate-to-bound/Callable/Callable_named_extends_neg_assign_l1_t05: MissingCompileTimeError # Issue 34087
+LanguageFeatures/Instantiate-to-bound/Callable/Callable_named_extends_neg_assign_l1_t06: MissingCompileTimeError # Issue 34087
+LanguageFeatures/Instantiate-to-bound/Callable/Callable_named_extends_neg_assign_l1_t07: MissingCompileTimeError # Issue 34087
+LanguageFeatures/Instantiate-to-bound/Callable/Callable_named_extends_neg_assign_l1_t08: MissingCompileTimeError # Issue 34087
+LanguageFeatures/Instantiate-to-bound/Callable/Callable_named_extends_neg_assign_l1_t09: MissingCompileTimeError # Issue 34087
+LanguageFeatures/Instantiate-to-bound/Callable/Callable_named_extends_neg_assign_l1_t10: MissingCompileTimeError # Issue 34087
+LanguageFeatures/Instantiate-to-bound/Callable/Callable_named_extends_neg_assign_l1_t11: MissingCompileTimeError # Issue 34087
+LanguageFeatures/Instantiate-to-bound/Callable/Callable_named_extends_neg_assign_l1_t12: MissingCompileTimeError # Issue 34087
+LanguageFeatures/Instantiate-to-bound/Callable/Callable_optparam_extends_neg_assign_l1_t01: MissingCompileTimeError # Please triage this failure
+LanguageFeatures/Instantiate-to-bound/Callable/Callable_optparam_extends_neg_assign_l1_t03: MissingCompileTimeError # Issue 34087
+LanguageFeatures/Instantiate-to-bound/Callable/Callable_optparam_extends_neg_assign_l1_t04: MissingCompileTimeError # Issue 34087
+LanguageFeatures/Instantiate-to-bound/Callable/Callable_optparam_extends_neg_assign_l1_t05: MissingCompileTimeError # Issue 34087
+LanguageFeatures/Instantiate-to-bound/Callable/Callable_optparam_extends_neg_assign_l1_t06: MissingCompileTimeError # Issue 34087
+LanguageFeatures/Instantiate-to-bound/Callable/Callable_optparam_extends_neg_assign_l1_t07: MissingCompileTimeError # Issue 34087
+LanguageFeatures/Instantiate-to-bound/Callable/Callable_optparam_extends_neg_assign_l1_t08: MissingCompileTimeError # Issue 34087
+LanguageFeatures/Instantiate-to-bound/Callable/Callable_optparam_extends_neg_assign_l1_t09: MissingCompileTimeError # Issue 34087
+LanguageFeatures/Instantiate-to-bound/Callable/Callable_optparam_extends_neg_assign_l1_t10: MissingCompileTimeError # Issue 34087
+LanguageFeatures/Instantiate-to-bound/Callable/Callable_optparam_extends_neg_assign_l1_t11: MissingCompileTimeError # Issue 34087
+LanguageFeatures/Instantiate-to-bound/Callable/Callable_optparam_extends_neg_assign_l1_t12: MissingCompileTimeError # Issue 34087
+LanguageFeatures/Instantiate-to-bound/Callable/Callable_param_extends_neg_assign_l1_t01: MissingCompileTimeError # Please triage this failure
+LanguageFeatures/Instantiate-to-bound/Callable/Callable_param_extends_neg_assign_l1_t03: MissingCompileTimeError # Issue 34087
+LanguageFeatures/Instantiate-to-bound/Callable/Callable_param_extends_neg_assign_l1_t04: MissingCompileTimeError # Issue 34087
+LanguageFeatures/Instantiate-to-bound/Callable/Callable_param_extends_neg_assign_l1_t05: MissingCompileTimeError # Issue 34087
+LanguageFeatures/Instantiate-to-bound/Callable/Callable_param_extends_neg_assign_l1_t06: MissingCompileTimeError # Issue 34087
+LanguageFeatures/Instantiate-to-bound/Callable/Callable_param_extends_neg_assign_l1_t07: MissingCompileTimeError # Issue 34087
+LanguageFeatures/Instantiate-to-bound/Callable/Callable_param_extends_neg_assign_l1_t08: MissingCompileTimeError # Issue 34087
+LanguageFeatures/Instantiate-to-bound/Callable/Callable_param_extends_neg_assign_l1_t09: MissingCompileTimeError # Issue 34087
+LanguageFeatures/Instantiate-to-bound/Callable/Callable_param_extends_neg_assign_l1_t10: MissingCompileTimeError # Issue 34087
+LanguageFeatures/Instantiate-to-bound/Callable/Callable_param_extends_neg_assign_l1_t11: MissingCompileTimeError # Issue 34087
+LanguageFeatures/Instantiate-to-bound/Callable/Callable_param_extends_neg_assign_l1_t12: MissingCompileTimeError # Issue 34087
+LanguageFeatures/Instantiate-to-bound/Callable/Callable_ret_extends_neg_assign_l1_t01: MissingCompileTimeError # Issue 33308
+LanguageFeatures/Instantiate-to-bound/Callable/Callable_ret_extends_neg_assign_l1_t03: MissingCompileTimeError # Issue 33805
+LanguageFeatures/Instantiate-to-bound/Callable/Callable_ret_extends_neg_assign_l1_t04: MissingCompileTimeError # Issue 33805
+LanguageFeatures/Instantiate-to-bound/Callable/Callable_ret_extends_neg_assign_l1_t05: MissingCompileTimeError # Issue 33805
+LanguageFeatures/Instantiate-to-bound/Callable/Callable_ret_extends_neg_assign_l1_t06: MissingCompileTimeError # Issue 33597
+LanguageFeatures/Instantiate-to-bound/Callable/Callable_ret_extends_neg_assign_l1_t07: MissingCompileTimeError # Issue 33597
+LanguageFeatures/Instantiate-to-bound/Callable/Callable_ret_extends_neg_assign_l1_t08: MissingCompileTimeError # Issue 33597
+LanguageFeatures/Instantiate-to-bound/Callable/Callable_ret_extends_neg_assign_l1_t09: MissingCompileTimeError # Issue 33597
+LanguageFeatures/Instantiate-to-bound/Callable/Callable_ret_extends_neg_assign_l1_t10: MissingCompileTimeError # Issue 33597
+LanguageFeatures/Instantiate-to-bound/Callable/Callable_ret_extends_neg_assign_l1_t12: MissingCompileTimeError # Issue 34087
+LanguageFeatures/Instantiate-to-bound/Callable/Callable_ret_extends_neg_assign_l1_t13: MissingCompileTimeError # Issue 34087
+LanguageFeatures/Instantiate-to-bound/Callable/Callable_ret_extends_neg_assign_l1_t14: MissingCompileTimeError # Issue 34087
+LanguageFeatures/Instantiate-to-bound/Callable/Callable_ret_extends_neg_assign_l1_t15: MissingCompileTimeError # Issue 34087
+LanguageFeatures/Instantiate-to-bound/Callable/Callable_ret_extends_neg_assign_l1_t16: MissingCompileTimeError # Issue 34087
+LanguageFeatures/Instantiate-to-bound/Callable/Callable_ret_extends_neg_assign_l1_t17: MissingCompileTimeError # Issue 34087
+LanguageFeatures/Instantiate-to-bound/Callable/Callable_ret_extends_neg_assign_l1_t18: MissingCompileTimeError # Issue 34087
+LanguageFeatures/Instantiate-to-bound/Callable/Callable_ret_extends_neg_assign_l1_t19: MissingCompileTimeError # Issue 34087
+LanguageFeatures/Instantiate-to-bound/Callable/Callable_ret_extends_neg_assign_l1_t20: MissingCompileTimeError # Issue 34087
+LanguageFeatures/Instantiate-to-bound/Callable/Callable_ret_extends_neg_assign_l1_t21: MissingCompileTimeError # Issue 34087
LanguageFeatures/Instantiate-to-bound/class/custom_extends_neg_l1_t04: MissingCompileTimeError
LanguageFeatures/Instantiate-to-bound/class/custom_extends_neg_l1_t05: MissingCompileTimeError
-LanguageFeatures/Instantiate-to-bound/class/custom_extends_neg_l2_t01: MissingCompileTimeError
LanguageFeatures/Instantiate-to-bound/function/function_named_extends_neg_assign_l1_t01: MissingCompileTimeError
LanguageFeatures/Instantiate-to-bound/function/function_named_extends_neg_assign_l1_t03: MissingCompileTimeError
LanguageFeatures/Instantiate-to-bound/function/function_named_extends_neg_assign_l1_t04: MissingCompileTimeError
@@ -270,13 +270,46 @@
LanguageFeatures/Instantiate-to-bound/typedef/typedef_ret_extends_neg_l1_t04: MissingCompileTimeError
LanguageFeatures/Instantiate-to-bound/typedef/typedef_ret_extends_neg_l1_t05: MissingCompileTimeError
LanguageFeatures/Instantiate-to-bound/typedef/typedef_ret_extends_neg_l2_t02: MissingCompileTimeError
-LibTest/collection/Maps/forEach_A01_t01: CompileTimeError
+LanguageFeatures/int-to-double/arguments_binding_t01: CompileTimeError # Please triage this failure
+LanguageFeatures/int-to-double/arguments_binding_t02: CompileTimeError # Please triage this failure
+LanguageFeatures/int-to-double/assignment_class_member_t01: CompileTimeError # Please triage this failure
+LanguageFeatures/int-to-double/assignment_class_member_t02: CompileTimeError # Please triage this failure
+LanguageFeatures/int-to-double/assignment_global_variable_t01: CompileTimeError # Please triage this failure
+LanguageFeatures/int-to-double/assignment_global_variable_t02: CompileTimeError # Please triage this failure
+LanguageFeatures/int-to-double/assignment_local_variable_t01: CompileTimeError # Please triage this failure
+LanguageFeatures/int-to-double/assignment_local_variable_t02: CompileTimeError # Please triage this failure
+LanguageFeatures/int-to-double/assignment_super_t01: CompileTimeError # Please triage this failure
+LanguageFeatures/int-to-double/assignment_super_t02: CompileTimeError # Please triage this failure
+LanguageFeatures/int-to-double/assignment_this_t01: CompileTimeError # Please triage this failure
+LanguageFeatures/int-to-double/assignment_this_t02: CompileTimeError # Please triage this failure
+LanguageFeatures/int-to-double/max_acceptable_value_t01: CompileTimeError # Please triage this failure
+LanguageFeatures/int-to-double/min_acceptable_values_t01: CompileTimeError # Please triage this failure
+LanguageFeatures/int-to-double/representation_t01: CompileTimeError # Please triage this failure
+LanguageFeatures/int-to-double/representation_t02: CompileTimeError # Please triage this failure
+LanguageFeatures/int-to-double/representation_t03: CompileTimeError # Please triage this failure
+LanguageFeatures/int-to-double/representation_t04: CompileTimeError # Please triage this failure
+LanguageFeatures/int-to-double/return_value_t01: CompileTimeError # Please triage this failure
+LanguageFeatures/int-to-double/return_value_t02: CompileTimeError # Please triage this failureLibTest/collection/Maps/forEach_A01_t01: CompileTimeError
LibTest/collection/Maps/forEach_A01_t03: CompileTimeError
LibTest/collection/Maps/forEach_A01_t04: CompileTimeError
LibTest/collection/Maps/forEach_A01_t05: CompileTimeError
LibTest/collection/Maps/forEach_A01_t06: CompileTimeError
LibTest/collection/Maps/forEach_A02_t01: CompileTimeError
+[ $compiler != dart2js && $fasta ]
+Language/Classes/Constructors/Constant_Constructors/initializer_not_a_constant_t01: MissingCompileTimeError # Issue 34191
+Language/Classes/Constructors/Constant_Constructors/initializer_not_a_constant_t02: MissingCompileTimeError # Issue 34191
+Language/Classes/Constructors/Constant_Constructors/initializer_not_a_constant_t03: MissingCompileTimeError # Issue 34191
+Language/Classes/Constructors/Constant_Constructors/invalid_constant_initializer_t02: MissingCompileTimeError # Issue 34192
+Language/Expressions/Constants/exception_t01: MissingCompileTimeError # Issue 31936
+Language/Expressions/Constants/exception_t03: MissingCompileTimeError # Issue 31936
+Language/Expressions/Constants/exception_t04: MissingCompileTimeError # Issue 31936
+Language/Expressions/Constants/literal_string_t02: MissingCompileTimeError # Issue 34192
+Language/Expressions/Constants/no_other_constant_expressions_t11: MissingCompileTimeError # Issue 34192
+Language/Expressions/Constants/ternary_operator_t02: MissingCompileTimeError # Issue 34192
+Language/Expressions/Instance_Creation/Const/exception_t01: MissingCompileTimeError # Issue 31936
+Language/Metadata/compilation_t03: MissingCompileTimeError # Issue 34205
+
[ $strong && ($compiler == dartk || $compiler == dartkb) ]
Language/Classes/Constructors/Constant_Constructors/potentially_constant_expression_t01: Crash
Language/Expressions/Additive_Expressions/syntax_t01: RuntimeError
diff --git a/tests/co19_2/co19_2-runtime.status b/tests/co19_2/co19_2-runtime.status
index 6033fda..7e3177d 100644
--- a/tests/co19_2/co19_2-runtime.status
+++ b/tests/co19_2/co19_2-runtime.status
@@ -2,7 +2,7 @@
# for details. All rights reserved. Use of this source code is governed by a
# BSD-style license that can be found in the LICENSE file.
-[ $runtime != none && !$checked ]
+[ $compiler != dart2js && $runtime != none && !$checked ]
LibTest/async/Future/catchError_A03_t05: RuntimeError
[ $compiler == fasta || $runtime == dart_precompiled || $runtime == flutter || $runtime == vm ]
diff --git a/tests/compiler/dart2js/analysis_options.yaml b/tests/compiler/dart2js/analysis_options.yaml
index 1bdb858..40dc4a9 100644
--- a/tests/compiler/dart2js/analysis_options.yaml
+++ b/tests/compiler/dart2js/analysis_options.yaml
@@ -3,8 +3,6 @@
# BSD-style license that can be found in the LICENSE file.
analyzer:
- strong-mode: true
-
language:
enableSuperMixins: false
diff --git a/tests/compiler/dart2js/analyze_dart_test.dart b/tests/compiler/dart2js/analyze_dart_test.dart
deleted file mode 100644
index 6d3f559..0000000
--- a/tests/compiler/dart2js/analyze_dart_test.dart
+++ /dev/null
@@ -1,15 +0,0 @@
-// 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:testing/src/run_tests.dart" as testing show main;
-
-main() {
- // This method is async, but keeps a port open to prevent the VM from exiting
- // prematurely.
- return testing.main(<String>[
- "--config=pkg/compiler/testing_dart.json",
- "--verbose",
- "analyze"
- ]);
-}
diff --git a/tests/compiler/dart2js/closure/data/instantiation1.dart b/tests/compiler/dart2js/closure/data/instantiation1.dart
index 9e86e11..22e5276 100644
--- a/tests/compiler/dart2js/closure/data/instantiation1.dart
+++ b/tests/compiler/dart2js/closure/data/instantiation1.dart
@@ -11,7 +11,6 @@
/*element: B.method:hasThis*/
method() {
return
- /*kernel.hasThis*/
/*strong.fields=[this],free=[this],hasThis*/
/*omit.hasThis*/
() {
diff --git a/tests/compiler/dart2js/closure/data/instantiation2.dart b/tests/compiler/dart2js/closure/data/instantiation2.dart
index dc0c408..c1f6335 100644
--- a/tests/compiler/dart2js/closure/data/instantiation2.dart
+++ b/tests/compiler/dart2js/closure/data/instantiation2.dart
@@ -11,7 +11,6 @@
/*element: B.method:hasThis*/
method() {
return
- /*kernel.hasThis*/
/*strong.fields=[this],free=[this],hasThis*/
/*omit.fields=[this],free=[this],hasThis*/
() {
diff --git a/tests/compiler/dart2js/closure/data/list_literal_untested_strong_trust.dart b/tests/compiler/dart2js/closure/data/list_literal_untested_strong_trust.dart
index 5d3b976..e6a6e1a 100644
--- a/tests/compiler/dart2js/closure/data/list_literal_untested_strong_trust.dart
+++ b/tests/compiler/dart2js/closure/data/list_literal_untested_strong_trust.dart
@@ -6,7 +6,6 @@
@NoInline()
method<T>() {
- /*kernel.*/
/*omit.*/
/*strong.fields=[T],free=[T]*/
dynamic local() => <T>[];
diff --git a/tests/compiler/dart2js/closure/data/list_literal_untested_trust.dart b/tests/compiler/dart2js/closure/data/list_literal_untested_trust.dart
index a89aa0e..e394d32 100644
--- a/tests/compiler/dart2js/closure/data/list_literal_untested_trust.dart
+++ b/tests/compiler/dart2js/closure/data/list_literal_untested_trust.dart
@@ -9,7 +9,6 @@
/*element: A.method:hasThis*/
@NoInline()
method() {
- /*kernel.hasThis*/
/*omit.hasThis*/
/*strong.fields=[this],free=[this],hasThis*/
dynamic local() => <T>[];
diff --git a/tests/compiler/dart2js/closure/data/map_literal_untested_strong_trust.dart b/tests/compiler/dart2js/closure/data/map_literal_untested_strong_trust.dart
index db1a485..d6c830b 100644
--- a/tests/compiler/dart2js/closure/data/map_literal_untested_strong_trust.dart
+++ b/tests/compiler/dart2js/closure/data/map_literal_untested_strong_trust.dart
@@ -6,7 +6,6 @@
@NoInline()
method<T>() {
- /*kernel.*/
/*omit.*/
/*strong.fields=[T],free=[T]*/
dynamic local() => <T, int>{};
diff --git a/tests/compiler/dart2js/closure/data/map_literal_untested_trust.dart b/tests/compiler/dart2js/closure/data/map_literal_untested_trust.dart
index dfc0fa5..fe4e3ae 100644
--- a/tests/compiler/dart2js/closure/data/map_literal_untested_trust.dart
+++ b/tests/compiler/dart2js/closure/data/map_literal_untested_trust.dart
@@ -9,7 +9,6 @@
/*element: A.method:hasThis*/
@NoInline()
method() {
- /*kernel.hasThis*/
/*omit.hasThis*/
/*strong.fields=[this],free=[this],hasThis*/
dynamic local() => <T, int>{};
diff --git a/tests/compiler/dart2js/closure/data/test_type.dart b/tests/compiler/dart2js/closure/data/test_type.dart
index 63cd76b..afa2f5b 100644
--- a/tests/compiler/dart2js/closure/data/test_type.dart
+++ b/tests/compiler/dart2js/closure/data/test_type.dart
@@ -38,7 +38,6 @@
class Class3<T> {
/*element: Class3.method3:hasThis*/
method3(dynamic o) {
- /*kernel.fields=[o],free=[o],hasThis*/
/*omit.fields=[o],free=[o],hasThis*/
/*strong.fields=[o,this],free=[o,this],hasThis*/
T local() => o;
diff --git a/tests/compiler/dart2js/closure/data/type_annotations.dart b/tests/compiler/dart2js/closure/data/type_annotations.dart
index cf9d582..84a8a53 100644
--- a/tests/compiler/dart2js/closure/data/type_annotations.dart
+++ b/tests/compiler/dart2js/closure/data/type_annotations.dart
@@ -48,7 +48,6 @@
class Class2<T> {
/*element: Class2.method2:hasThis*/
method2() {
- /*kernel.hasThis*/
/*omit.hasThis*/
/*strong.fields=[this],free=[this],hasThis*/
dynamic local(T t) => t;
@@ -64,7 +63,6 @@
class Class3<T> {
/*element: Class3.method3:hasThis*/
method3(dynamic o) {
- /*kernel.fields=[o],free=[o],hasThis*/
/*omit.fields=[o],free=[o],hasThis*/
/*strong.fields=[o,this],free=[o,this],hasThis*/
T local() => o;
@@ -108,7 +106,6 @@
class Class6<T> {
/*element: Class6.method6:hasThis*/
method6() {
- /*kernel.hasThis*/
/*omit.hasThis*/
/*strong.fields=[this],free=[this],hasThis*/
dynamic local(T t) {
@@ -129,7 +126,6 @@
class Class7<T> {
/*element: Class7.method7:hasThis*/
method7(dynamic o) {
- /*kernel.fields=[o],free=[o],hasThis*/
/*omit.fields=[o],free=[o],hasThis*/
/*strong.fields=[o,this],free=[o,this],hasThis*/
T local() {
diff --git a/tests/compiler/dart2js/codegen/expect_annotations_test.dart b/tests/compiler/dart2js/codegen/expect_annotations_test.dart
index d23eb44..93f0714 100644
--- a/tests/compiler/dart2js/codegen/expect_annotations_test.dart
+++ b/tests/compiler/dart2js/codegen/expect_annotations_test.dart
@@ -68,15 +68,15 @@
'AssumeDynamicClass is unresolved.');
void testTypeMatch(FunctionEntity function, TypeMask expectedParameterType,
- TypeMask expectedReturnType, TypesInferrer inferrer) {
+ TypeMask expectedReturnType, GlobalTypeInferenceResults results) {
compiler.codegenWorldBuilder.forEachParameterAsLocal(function,
(Local parameter) {
- TypeMask type = inferrer.getTypeOfParameter(parameter);
+ TypeMask type = results.resultOfParameter(parameter);
Expect.equals(
expectedParameterType, simplify(type, closedWorld), "$parameter");
});
if (expectedReturnType != null) {
- TypeMask type = inferrer.getReturnTypeOfMember(function);
+ TypeMask type = results.resultOfMember(function).returnType;
Expect.equals(
expectedReturnType, simplify(type, closedWorld), "$function");
}
@@ -107,13 +107,13 @@
optimizerHints.assumeDynamic(
closedWorld.elementEnvironment, closedWorld.commonElements, method),
"Unexpected annotation of @AssumeDynamic on '$method'.");
- TypesInferrer inferrer = compiler.globalInference.typesInferrerInternal;
+ GlobalTypeInferenceResults results =
+ compiler.globalInference.resultsForTesting;
if (expectTrustTypeAnnotations && expectedParameterType != null) {
- testTypeMatch(
- method, expectedParameterType, expectedReturnType, inferrer);
+ testTypeMatch(method, expectedParameterType, expectedReturnType, results);
} else if (expectAssumeDynamic) {
testTypeMatch(
- method, closedWorld.abstractValueDomain.dynamicType, null, inferrer);
+ method, closedWorld.abstractValueDomain.dynamicType, null, results);
}
}
diff --git a/tests/compiler/dart2js/codegen/trust_type_annotations_test.dart b/tests/compiler/dart2js/codegen/trust_type_annotations_test.dart
index 900a628..f7feed2 100644
--- a/tests/compiler/dart2js/codegen/trust_type_annotations_test.dart
+++ b/tests/compiler/dart2js/codegen/trust_type_annotations_test.dart
@@ -55,8 +55,8 @@
var result = await runCompiler(
memorySourceFiles: {'main.dart': TEST}, options: options);
var compiler = result.compiler;
- var typesInferrer = compiler.globalInference.typesInferrerInternal;
- var closedWorld = typesInferrer.closedWorld;
+ var results = compiler.globalInference.resultsForTesting;
+ var closedWorld = results.closedWorld;
var elementEnvironment = closedWorld.elementEnvironment;
ClassEntity classA =
@@ -64,14 +64,14 @@
checkReturn(String name, TypeMask type) {
MemberEntity element = elementEnvironment.lookupClassMember(classA, name);
- var mask = typesInferrer.getReturnTypeOfMember(element);
+ var mask = results.resultOfMember(element).returnType;
Expect.isTrue(type.containsMask(mask, closedWorld));
}
checkType(String name, type) {
MemberEntity element = elementEnvironment.lookupClassMember(classA, name);
- Expect.isTrue(type.containsMask(
- typesInferrer.getTypeOfMember(element), closedWorld));
+ Expect.isTrue(
+ type.containsMask(results.resultOfMember(element).type, closedWorld));
}
var intMask =
diff --git a/tests/compiler/dart2js/codegen/type_inference8_test.dart b/tests/compiler/dart2js/codegen/type_inference8_test.dart
index 1b14a0b..b3d232e 100644
--- a/tests/compiler/dart2js/codegen/type_inference8_test.dart
+++ b/tests/compiler/dart2js/codegen/type_inference8_test.dart
@@ -37,13 +37,13 @@
memorySourceFiles: {'main.dart': TEST1},
options: [Flags.disableInlining]);
var compiler = result.compiler;
- var typesInferrer = compiler.globalInference.typesInferrerInternal;
- var closedWorld = typesInferrer.closedWorld;
+ var results = compiler.globalInference.resultsForTesting;
+ var closedWorld = results.closedWorld;
var elementEnvironment = closedWorld.elementEnvironment;
var commonMasks = closedWorld.abstractValueDomain;
var element = elementEnvironment.lookupLibraryMember(
elementEnvironment.mainLibrary, 'foo');
- var mask = typesInferrer.getReturnTypeOfMember(element);
+ var mask = results.resultOfMember(element).returnType;
var falseType =
new ValueTypeMask(commonMasks.boolType, new FalseConstantValue());
// 'foo' should always return false
@@ -52,7 +52,7 @@
dynamic bar = elementEnvironment.lookupLibraryMember(
elementEnvironment.mainLibrary, 'bar');
compiler.codegenWorldBuilder.forEachParameterAsLocal(bar, (barArg) {
- var barArgMask = typesInferrer.getTypeOfParameter(barArg);
+ var barArgMask = results.resultOfParameter(barArg);
Expect.equals(falseType, barArgMask);
});
var barCode = compiler.backend.getGeneratedCode(bar);
@@ -85,19 +85,19 @@
memorySourceFiles: {'main.dart': TEST2},
options: [Flags.disableInlining]);
var compiler = result.compiler;
- var typesInferrer = compiler.globalInference.typesInferrerInternal;
- var commonMasks = typesInferrer.closedWorld.abstractValueDomain;
- var closedWorld = typesInferrer.closedWorld;
+ var results = compiler.globalInference.resultsForTesting;
+ var closedWorld = results.closedWorld;
+ var commonMasks = closedWorld.abstractValueDomain;
var elementEnvironment = closedWorld.elementEnvironment;
var element = elementEnvironment.lookupLibraryMember(
elementEnvironment.mainLibrary, 'foo');
- var mask = typesInferrer.getReturnTypeOfMember(element);
+ var mask = results.resultOfMember(element).returnType;
// Can't infer value for foo's return type, it could be either true or false
Expect.identical(commonMasks.boolType, mask);
dynamic bar = elementEnvironment.lookupLibraryMember(
elementEnvironment.mainLibrary, 'bar');
compiler.codegenWorldBuilder.forEachParameterAsLocal(bar, (barArg) {
- var barArgMask = typesInferrer.getTypeOfParameter(barArg);
+ var barArgMask = results.resultOfParameter(barArg);
// The argument to bar should have the same type as the return type of foo
Expect.identical(commonMasks.boolType, barArgMask);
});
diff --git a/tests/compiler/dart2js/dart2js.status b/tests/compiler/dart2js/dart2js.status
index 2c3682a..f6d4117 100644
--- a/tests/compiler/dart2js/dart2js.status
+++ b/tests/compiler/dart2js/dart2js.status
@@ -2,7 +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.
-analyze_dart_test: Slow, Pass
analyze_test: Slow, Pass
async_await_syntax_test: Pass # DON'T CHANGE THIS LINE -- Don't mark these tests as failing. Instead, fix the errors/warnings that they report or update the whitelist in the test-files to temporarily allow digression.
boolified_operator_test: Fail # Issue 8001
@@ -15,6 +14,7 @@
codegen/simple_function_subtype_test: Fail # simple_function_subtype_test is temporarily(?) disabled due to new method for building function type tests.
codegen/string_escapes_test: Fail # Issue 33060
deferred_loading/deferred_loading_test: Slow, Pass
+end_to_end/dump_info_test: Slow, Pass
equivalence/id_equivalence1_test: Pass, Slow
equivalence/id_equivalence2_test: Pass, Slow
generate_code_with_compile_time_errors_test: RuntimeError # not supported yet with the new FE.
diff --git a/tests/compiler/dart2js/deferred_loading/libs/type_argument_dependency_lib2.dart b/tests/compiler/dart2js/deferred_loading/libs/type_argument_dependency_lib2.dart
index a5a50fd..81e799e 100644
--- a/tests/compiler/dart2js/deferred_loading/libs/type_argument_dependency_lib2.dart
+++ b/tests/compiler/dart2js/deferred_loading/libs/type_argument_dependency_lib2.dart
@@ -2,7 +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.
-/*kernel.class: A:OutputUnit(1, {c})*/
/*strong.class: A:OutputUnit(main, {})*/
/*omit.class: A:OutputUnit(main, {})*/
class A {
diff --git a/tests/compiler/dart2js/equivalence/id_equivalence_helper.dart b/tests/compiler/dart2js/equivalence/id_equivalence_helper.dart
index 6cb57c2..1bda357 100644
--- a/tests/compiler/dart2js/equivalence/id_equivalence_helper.dart
+++ b/tests/compiler/dart2js/equivalence/id_equivalence_helper.dart
@@ -559,7 +559,6 @@
new AnnotatedCode.fromText(annotatedCode, commentStart, commentEnd)
};
Map<String, MemberAnnotations<IdValue>> expectedMaps = {
- kernelMarker: new MemberAnnotations<IdValue>(),
strongMarker: new MemberAnnotations<IdValue>(),
omitMarker: new MemberAnnotations<IdValue>(),
};
@@ -800,7 +799,6 @@
throw new UnsupportedError('Unsupported id $id.');
}
-const String kernelMarker = 'kernel.';
const String strongMarker = 'strong.';
const String omitMarker = 'omit.';
@@ -819,7 +817,7 @@
/// annotations without prefixes.
void computeExpectedMap(Uri sourceUri, AnnotatedCode code,
Map<String, MemberAnnotations<IdValue>> maps) {
- List<String> mapKeys = [kernelMarker, strongMarker, omitMarker];
+ List<String> mapKeys = [strongMarker, omitMarker];
Map<String, AnnotatedCode> split = splitByPrefixes(code, mapKeys);
split.forEach((String marker, AnnotatedCode code) {
diff --git a/tests/compiler/dart2js/impact/data/async.dart b/tests/compiler/dart2js/impact/data/async.dart
index 8f67a76..7098aef 100644
--- a/tests/compiler/dart2js/impact/data/async.dart
+++ b/tests/compiler/dart2js/impact/data/async.dart
@@ -61,15 +61,6 @@
_wrapJsFunctionForAsync]*/
testAsyncStar() async* {}
-/*kernel.element: testLocalSyncStar:
- static=[
- _IterationMarker.endOfIteration,
- _IterationMarker.uncaughtError,
- _IterationMarker.yieldStar,
- _makeSyncStarIterable<dynamic>(1),
- def:local],
- type=[inst:Function]
-*/
/*strong.element: testLocalSyncStar:
static=[
_IterationMarker.endOfIteration,
@@ -94,18 +85,6 @@
return local;
}
-/*kernel.element: testLocalAsync:
- static=[
- StreamIterator.,
- _asyncAwait,
- _asyncRethrow,
- _asyncReturn,
- _asyncStartSync,
- _makeAsyncAwaitCompleter<dynamic>(0),
- _wrapJsFunctionForAsync,
- def:local],
- type=[inst:Function]
-*/
/*strong.element: testLocalAsync:
static=[
StreamIterator.,
@@ -133,18 +112,6 @@
return local;
}
-/*kernel.element: testLocalAsyncStar:
- static=[
- StreamIterator.,
- _IterationMarker.yieldSingle,
- _IterationMarker.yieldStar,
- _asyncStarHelper,
- _makeAsyncStarStreamController<dynamic>(1),
- _streamOfController,
- _wrapJsFunctionForAsync,
- def:local],
- type=[inst:Function]
-*/
/*strong.element: testLocalAsyncStar:
static=[
StreamIterator.,
@@ -172,17 +139,6 @@
return local;
}
-/*kernel.element: testAnonymousSyncStar:
- static=[
- _IterationMarker.endOfIteration,
- _IterationMarker.uncaughtError,
- _IterationMarker.yieldStar,
- _makeSyncStarIterable<dynamic>(1),
- def:<anonymous>],
- type=[
- check:Iterable<dynamic>,
- inst:Function]
-*/
/*strong.element: testAnonymousSyncStar:
static=[
_IterationMarker.endOfIteration,
@@ -206,20 +162,6 @@
return () sync* {};
}
-/*kernel.element: testAnonymousAsync:
- static=[
- StreamIterator.,
- _asyncAwait,
- _asyncRethrow,
- _asyncReturn,
- _asyncStartSync,
- _makeAsyncAwaitCompleter<dynamic>(0),
- _wrapJsFunctionForAsync,
- def:<anonymous>],
- type=[
- check:Future<dynamic>,
- inst:Function]
-*/
/*strong.element: testAnonymousAsync:
static=[
StreamIterator.,
@@ -246,20 +188,6 @@
return () async {};
}
-/*kernel.element: testAnonymousAsyncStar:
- static=[
- StreamIterator.,
- _IterationMarker.yieldSingle,
- _IterationMarker.yieldStar,
- _asyncStarHelper,
- _makeAsyncStarStreamController<dynamic>(1),
- _streamOfController,
- _wrapJsFunctionForAsync,
- def:<anonymous>],
- type=[
- check:Stream<dynamic>,
- inst:Function]
-*/
/*strong.element: testAnonymousAsyncStar:
static=[
StreamIterator.,
@@ -286,23 +214,6 @@
return () async* {};
}
-/*kernel.element: testAsyncForIn:
- dynamic=[
- cancel(0),
- current,
- moveNext(0)],
- static=[
- StreamIterator.,
- _asyncAwait,
- _asyncRethrow,
- _asyncReturn,
- _asyncStartSync,
- _makeAsyncAwaitCompleter<dynamic>(0),
- _wrapJsFunctionForAsync],
- type=[
- inst:JSNull,
- inst:Null]
-*/
/*strong.element: testAsyncForIn:
dynamic=[
cancel(0),
@@ -327,24 +238,6 @@
await for (var e in o) {}
}
-/*kernel.element: testAsyncForInTyped:
- dynamic=[
- cancel(0),
- current,
- moveNext(0)],
- static=[
- StreamIterator.,
- _asyncAwait,
- _asyncRethrow,
- _asyncReturn,
- _asyncStartSync,
- _makeAsyncAwaitCompleter<dynamic>(0),
- _wrapJsFunctionForAsync],
- type=[
- check:int,
- inst:JSNull,
- inst:Null]
-*/
/*strong.element: testAsyncForInTyped:
dynamic=[
cancel(0),
diff --git a/tests/compiler/dart2js/impact/data/classes.dart b/tests/compiler/dart2js/impact/data/classes.dart
index 3085091..20267d2 100644
--- a/tests/compiler/dart2js/impact/data/classes.dart
+++ b/tests/compiler/dart2js/impact/data/classes.dart
@@ -137,10 +137,6 @@
testForwardingConstructor() => new ForwardingConstructorClass(null);
class ForwardingConstructorTypedSuperClass {
- /*kernel.element: ForwardingConstructorTypedSuperClass.:
- static=[Object.(0)],
- type=[check:int]
- */
/*strong.element: ForwardingConstructorTypedSuperClass.:
static=[Object.(0)],
type=[inst:JSBool,param:int]
@@ -158,10 +154,6 @@
testForwardingConstructorTyped() => new ForwardingConstructorTypedClass(null);
class ForwardingConstructorGenericSuperClass<T> {
- /*kernel.element: ForwardingConstructorGenericSuperClass.:
- static=[Object.(0)],
- type=[check:ForwardingConstructorGenericSuperClass.T]
- */
/*strong.element: ForwardingConstructorGenericSuperClass.:
static=[
Object.(0),
@@ -199,17 +191,6 @@
}
enum Enum {
- /*kernel.element: Enum.A:static=[Enum.(2)],
- type=[
- check:Enum,
- inst:JSDouble,
- inst:JSInt,
- inst:JSNumber,
- inst:JSPositiveInt,
- inst:JSString,
- inst:JSUInt31,
- inst:JSUInt32]
- */
/*strong.element: Enum.A:static=[Enum.(2)],
type=[
inst:JSBool,
@@ -228,12 +209,6 @@
/*element: testEnum:static=[Enum.A]*/
testEnum() => Enum.A;
-/*kernel.element: staticGenericMethod:
- type=[
- check:List<staticGenericMethod.T>,
- check:staticGenericMethod.T,
- inst:List<dynamic>]
- */
/*strong.element: staticGenericMethod:
static=[
checkSubtype,
@@ -256,10 +231,6 @@
*/
List<T> staticGenericMethod<T>(T arg) => [arg];
-/*kernel.element: testStaticGenericMethod:
- static=[staticGenericMethod(1)],
- type=[inst:JSBool]
-*/
/*strong.element: testStaticGenericMethod:
static=[staticGenericMethod<bool>(1)],
type=[inst:JSBool]
@@ -268,14 +239,6 @@
staticGenericMethod<bool>(true);
}
-/*kernel.element: testInstanceGenericMethod:
- dynamic=[call(1),genericMethod(1)],
- static=[
- GenericClass.generative(0),
- assertIsSubtype,
- throwTypeError],
- type=[inst:JSBool]
-*/
/*strong.element: testInstanceGenericMethod:
dynamic=[genericMethod<bool>(1)],
static=[
@@ -292,7 +255,6 @@
// ignore: UNUSED_FIELD
final _field;
- /*kernel.element: AbstractClass.:type=[check:AbstractClass,inst:JSNull]*/
/*strong.element: AbstractClass.:type=[inst:JSNull]*/
factory AbstractClass() => null;
}
@@ -330,13 +292,6 @@
class GenericClass<X, Y> {
const GenericClass.generative();
- /*kernel.element: GenericClass.genericMethod:
- type=[
- check:Map<GenericClass.X,genericMethod.T>,
- check:genericMethod.T,
- inst:JSNull,
- inst:Map<dynamic,dynamic>]
- */
/*strong.element: GenericClass.genericMethod:
static=[
checkSubtype,
diff --git a/tests/compiler/dart2js/impact/data/constructors.dart b/tests/compiler/dart2js/impact/data/constructors.dart
index 440aded..ab690a7 100644
--- a/tests/compiler/dart2js/impact/data/constructors.dart
+++ b/tests/compiler/dart2js/impact/data/constructors.dart
@@ -131,7 +131,6 @@
testImplicitConstructor() => new ClassImplicitConstructor();
class ClassFactoryConstructor {
- /*kernel.element: ClassFactoryConstructor.:type=[check:ClassFactoryConstructor,inst:JSNull]*/
/*strong.element: ClassFactoryConstructor.:type=[inst:JSNull]*/
factory ClassFactoryConstructor() => null;
}
@@ -143,7 +142,6 @@
/*element: Class.generative:static=[Object.(0)]*/
const Class.generative();
- /*kernel.element: Class.fact:type=[check:Class,inst:JSNull]*/
/*strong.element: Class.fact:type=[inst:JSNull]*/
factory Class.fact() => null;
@@ -154,7 +152,6 @@
/*element: GenericClass.generative:static=[Object.(0)]*/
const GenericClass.generative();
- /*kernel.element: GenericClass.fact:type=[check:GenericClass<GenericClass.X,GenericClass.Y>,inst:JSNull]*/
/*strong.element: GenericClass.fact:type=[inst:JSBool,inst:JSNull,param:Object]*/
factory GenericClass.fact() => null;
diff --git a/tests/compiler/dart2js/impact/data/fallthrough.dart b/tests/compiler/dart2js/impact/data/fallthrough.dart
deleted file mode 100644
index a49177a..0000000
--- a/tests/compiler/dart2js/impact/data/fallthrough.dart
+++ /dev/null
@@ -1,38 +0,0 @@
-// 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.
-
-/*element: main:
- static=[testSwitchWithFallthrough(1)],
- type=[inst:JSNull]
-*/
-main() {
- testSwitchWithFallthrough(null);
-}
-
-/*element: testSwitchWithFallthrough:
- static=[
- FallThroughError._create(2),
- throwExpression,
- wrapException],
- type=[inst:JSDouble,
- inst:JSInt,
- inst:JSNumber,
- inst:JSPositiveInt,
- inst:JSString,
- inst:JSUInt31,
- inst:JSUInt32]
-*/
-testSwitchWithFallthrough(o) {
- switch (o) {
- case 0:
- // ignore: CASE_BLOCK_NOT_TERMINATED
- case 1:
- o = 2;
- case 2:
- o = 3;
- return;
- case 3:
- default:
- }
-}
diff --git a/tests/compiler/dart2js/impact/data/initializers.dart b/tests/compiler/dart2js/impact/data/initializers.dart
index a262272..0155408 100644
--- a/tests/compiler/dart2js/impact/data/initializers.dart
+++ b/tests/compiler/dart2js/impact/data/initializers.dart
@@ -28,11 +28,9 @@
testGenericClass();
}
-/*kernel.element: testDefaultValuesPositional:type=[check:bool,inst:JSBool]*/
/*strong.element: testDefaultValuesPositional:type=[inst:JSBool,param:bool]*/
testDefaultValuesPositional([bool value = false]) {}
-/*kernel.element: testDefaultValuesNamed:type=[check:bool,inst:JSBool]*/
/*strong.element: testDefaultValuesNamed:type=[inst:JSBool,param:bool]*/
testDefaultValuesNamed({bool value: false}) {}
@@ -86,7 +84,6 @@
/*element: ClassInstanceFieldWithInitializer.:static=[Object.(0)]*/
class ClassInstanceFieldWithInitializer {
- /*kernel.element: ClassInstanceFieldWithInitializer.field:type=[inst:JSBool]*/
/*strong.element: ClassInstanceFieldWithInitializer.field:type=[inst:JSBool,param:bool]*/
var field = false;
}
@@ -96,7 +93,6 @@
/*element: ClassInstanceFieldTyped.:static=[Object.(0)]*/
class ClassInstanceFieldTyped {
- /*kernel.element: ClassInstanceFieldTyped.field:type=[check:int,inst:JSNull]*/
/*strong.element: ClassInstanceFieldTyped.field:type=[inst:JSBool,inst:JSNull,param:int]*/
int field;
}
@@ -124,7 +120,6 @@
testSuperInitializer() => new ClassSuperInitializer();
class ClassGeneric<T> {
- /*kernel.element: ClassGeneric.:static=[Object.(0)],type=[check:ClassGeneric.T]*/
/*strong.element: ClassGeneric.:
static=[
Object.(0),
diff --git a/tests/compiler/dart2js/impact/data/invokes.dart b/tests/compiler/dart2js/impact/data/invokes.dart
index 1633c30..ae0262a 100644
--- a/tests/compiler/dart2js/impact/data/invokes.dart
+++ b/tests/compiler/dart2js/impact/data/invokes.dart
@@ -115,18 +115,9 @@
topLevelFunction3(15, c: 16, b: 17);
}
-/*kernel.element: topLevelFunction1Typed:type=[check:int,check:void]*/
/*strong.element: topLevelFunction1Typed:type=[inst:JSBool,param:int]*/
void topLevelFunction1Typed(int a) {}
-/*kernel.element: topLevelFunction2Typed:
- type=[
- check:String,
- check:double,
- check:int,
- check:num,
- inst:JSNull]
-*/
/*strong.element: topLevelFunction2Typed:
type=[
inst:JSBool,
@@ -137,14 +128,6 @@
*/
int topLevelFunction2Typed(String a, [num b, double c]) => null;
-/*kernel.element: topLevelFunction3Typed:
- type=[
- check:List<int>,
- check:Map<String,bool>,
- check:bool,
- check:double,
- inst:JSNull]
-*/
/*strong.element: topLevelFunction3Typed:
static=[
checkSubtype,
@@ -169,30 +152,6 @@
return null;
}
-/*kernel.element: testTopLevelInvokeTyped:
- static=[
- topLevelFunction1Typed(1),
- topLevelFunction2Typed(1),
- topLevelFunction2Typed(2),
- topLevelFunction2Typed(3),
- topLevelFunction3Typed(1),
- topLevelFunction3Typed(1,b),
- topLevelFunction3Typed(1,b,c),
- topLevelFunction3Typed(1,b,c),
- topLevelFunction3Typed(1,c)],
- type=[
- inst:JSBool,
- inst:JSDouble,
- inst:JSInt,
- inst:JSNull,
- inst:JSNumber,
- inst:JSPositiveInt,
- inst:JSString,
- inst:JSUInt31,
- inst:JSUInt32,
- inst:List<dynamic>,
- inst:Map<dynamic,dynamic>]
-*/
/*strong.element: testTopLevelInvokeTyped:
static=[
topLevelFunction1Typed(1),
@@ -229,7 +188,6 @@
topLevelFunction3Typed(false, c: {'16': false}, b: [17]);
}
-/*kernel.element: topLevelFunctionTyped1:type=[check:void Function(num)]*/
/*strong.element: topLevelFunctionTyped1:
static=[
checkSubtype,
@@ -249,7 +207,6 @@
*/
topLevelFunctionTyped1(void a(num b)) {}
-/*kernel.element: topLevelFunctionTyped2:type=[check:void Function(num,[String])]*/
/*strong.element: topLevelFunctionTyped2:
static=[
checkSubtype,
@@ -269,9 +226,6 @@
*/
topLevelFunctionTyped2(void a(num b, [String c])) {}
-/*kernel.element: topLevelFunctionTyped3:
- type=[check:void Function(num,{String c,int d})]
-*/
/*strong.element: topLevelFunctionTyped3:
static=[
checkSubtype,
@@ -291,9 +245,6 @@
*/
topLevelFunctionTyped3(void a(num b, {String c, int d})) {}
-/*kernel.element: topLevelFunctionTyped4:
- type=[check:void Function(num,{int c,String d})]
-*/
/*strong.element: topLevelFunctionTyped4:
static=[
checkSubtype,
@@ -337,7 +288,6 @@
/*element: testTopLevelGetterGet:static=[topLevelGetter]*/
testTopLevelGetterGet() => topLevelGetter;
-/*kernel.element: topLevelGetterTyped:type=[check:int,inst:JSNull]*/
/*strong.element: topLevelGetterTyped:type=[inst:JSNull]*/
int get topLevelGetterTyped => null;
@@ -350,7 +300,6 @@
/*element: testTopLevelSetterSet:static=[set:topLevelSetter],type=[inst:JSNull]*/
testTopLevelSetterSet() => topLevelSetter = null;
-/*kernel.element: topLevelSetterTyped=:type=[check:int,check:void]*/
/*strong.element: topLevelSetterTyped=:type=[inst:JSBool,param:int]*/
void set topLevelSetterTyped(int value) {}
@@ -381,28 +330,24 @@
/*element: testTopLevelFieldFinal:static=[topLevelFieldFinal]*/
testTopLevelFieldFinal() => topLevelFieldFinal;
-/*kernel.element: topLevelFieldTyped:type=[check:int,inst:JSNull]*/
/*strong.element: topLevelFieldTyped:type=[inst:JSBool,inst:JSNull,param:int]*/
int topLevelFieldTyped;
/*element: testTopLevelFieldTyped:static=[topLevelFieldTyped]*/
testTopLevelFieldTyped() => topLevelFieldTyped;
-/*kernel.element: topLevelFieldGeneric1:type=[check:GenericClass<dynamic,dynamic>,inst:JSNull]*/
/*strong.element: topLevelFieldGeneric1:type=[inst:JSBool,inst:JSNull,param:GenericClass<dynamic,dynamic>]*/
GenericClass topLevelFieldGeneric1;
/*element: testTopLevelFieldGeneric1:static=[topLevelFieldGeneric1]*/
testTopLevelFieldGeneric1() => topLevelFieldGeneric1;
-/*kernel.element: topLevelFieldGeneric2:type=[check:GenericClass<dynamic,dynamic>,inst:JSNull]*/
/*strong.element: topLevelFieldGeneric2:type=[inst:JSBool,inst:JSNull,param:GenericClass<dynamic,dynamic>]*/
GenericClass<dynamic, dynamic> topLevelFieldGeneric2;
/*element: testTopLevelFieldGeneric2:static=[topLevelFieldGeneric2]*/
testTopLevelFieldGeneric2() => topLevelFieldGeneric2;
-/*kernel.element: topLevelFieldGeneric3:type=[check:GenericClass<int,String>,inst:JSNull]*/
/*strong.element: topLevelFieldGeneric3:
static=[
checkSubtype,
@@ -511,16 +456,6 @@
var l = 42;
}
-/*kernel.element: testLocalWithInitializerTyped:
- type=[
- check:int,
- inst:JSDouble,
- inst:JSInt,
- inst:JSNumber,
- inst:JSPositiveInt,
- inst:JSUInt31,
- inst:JSUInt32]
-*/
/*strong.element: testLocalWithInitializerTyped:
type=[
inst:JSDouble,
@@ -535,7 +470,6 @@
int l = 42;
}
-/*kernel.element: testLocalFunction:static=[def:localFunction],type=[inst:Function]*/
/*strong.element: testLocalFunction:
static=[
computeSignature,
@@ -556,10 +490,6 @@
localFunction() {}
}
-/*kernel.element: testLocalFunctionTyped:
- static=[def:localFunction],
- type=[check:String,check:int,inst:Function,inst:JSNull]
-*/
/*strong.element: testLocalFunctionTyped:
static=[
computeSignature,
@@ -581,9 +511,9 @@
int localFunction(String a) => null;
}
-/*kernel.element: testLocalFunctionInvoke:static=[def:localFunction],
- type=[inst:Function]*/
-/*strong.element: testLocalFunctionInvoke:static=[computeSignature,
+/*strong.element: testLocalFunctionInvoke:
+ dynamic=[call(0)],
+ static=[computeSignature,
def:localFunction,
getRuntimeTypeArguments,
getRuntimeTypeInfo,
@@ -600,8 +530,6 @@
localFunction();
}
-/*kernel.element: testLocalFunctionGet:static=[def:localFunction],
- type=[inst:Function]*/
/*strong.element: testLocalFunctionGet:static=[computeSignature,
def:localFunction,
getRuntimeTypeArguments,
@@ -618,8 +546,6 @@
localFunction;
}
-/*kernel.element: testClosure:static=[def:<anonymous>],
- type=[inst:Function]*/
/*strong.element: testClosure:static=[computeSignature,
def:<anonymous>,
getRuntimeTypeArguments,
@@ -635,11 +561,6 @@
() {};
}
-/*kernel.element: testClosureInvoke:
- dynamic=[call(0)],
- static=[def:<anonymous>],
- type=[inst:Function]
-*/
/*strong.element: testClosureInvoke:
dynamic=[call(0)],
static=[computeSignature,
diff --git a/tests/compiler/dart2js/impact/data/jsinterop.dart b/tests/compiler/dart2js/impact/data/jsinterop.dart
index 053d722..1687434 100644
--- a/tests/compiler/dart2js/impact/data/jsinterop.dart
+++ b/tests/compiler/dart2js/impact/data/jsinterop.dart
@@ -14,7 +14,6 @@
testJsInteropClass();
}
-/*kernel.element: testJsInteropMethod:type=[check:int]*/
/*strong.element: testJsInteropMethod:*/
@JS()
external int testJsInteropMethod();
@@ -24,23 +23,6 @@
/*element: JsInteropClass.:static=[JavaScriptObject.(0)]*/
external JsInteropClass();
- /*kernel.element: JsInteropClass.method:
- type=[
- check:double,
- native:ApplicationCacheErrorEvent,
- native:DomError,
- native:DomException,
- native:ErrorEvent,
- native:GenericClass<dynamic>,
- native:JsInteropClass,
- native:MediaError,
- native:NavigatorUserMediaError,
- native:OverconstrainedError,
- native:PositionError,
- native:SensorErrorEvent,
- native:SpeechRecognitionError,
- native:SqlError]
- */
/*strong.element: JsInteropClass.method:
type=[
native:ApplicationCacheErrorEvent,
@@ -61,10 +43,6 @@
external double method();
}
-/*kernel.element: testJsInteropClass:
- dynamic=[call(0),method(0)],
- static=[JsInteropClass.(0)]
-*/
/*strong.element: testJsInteropClass:
dynamic=[method(0)],
static=[JsInteropClass.(0)]
@@ -76,12 +54,6 @@
/*element: GenericClass.:static=[JavaScriptObject.(0)]*/
@JS()
class GenericClass<T> {
- /*kernel.element: GenericClass.method:
- type=[
- check:GenericClass<dynamic>,
- check:void Function(GenericClass.T),
- inst:JSNull]
- */
/*strong.element: GenericClass.method:
static=[
checkSubtype,
@@ -103,10 +75,6 @@
external GenericClass method([Callback<T> callback]);
}
-/*kernel.element: testOptionalGenericFunctionTypeArgument:
- dynamic=[call(0),method(0)],
- static=[GenericClass.(0)]
-*/
/*strong.element: testOptionalGenericFunctionTypeArgument:
dynamic=[method(0)],
static=[GenericClass.(0)]
diff --git a/tests/compiler/dart2js/impact/data/literals.dart b/tests/compiler/dart2js/impact/data/literals.dart
index 65a8ea5..a23b41b 100644
--- a/tests/compiler/dart2js/impact/data/literals.dart
+++ b/tests/compiler/dart2js/impact/data/literals.dart
@@ -98,49 +98,15 @@
/*element: testConstSymbol:static=[Symbol.,Symbol.(1),Symbol.validated],type=[inst:JSString,inst:Symbol]*/
testConstSymbol() => const Symbol('main');
-/*kernel.element: complexSymbolField1:
- dynamic=[==,length],
- type=[inst:JSDouble,inst:JSInt,inst:JSNumber,inst:JSPositiveInt,inst:JSString,inst:JSUInt31,inst:JSUInt32]
-*/
/*strong.element: complexSymbolField1:
dynamic=[==,length],
type=[inst:JSBool,inst:JSDouble,inst:JSInt,inst:JSNumber,inst:JSPositiveInt,inst:JSString,inst:JSUInt31,inst:JSUInt32,param:bool]
*/
const complexSymbolField1 = "true".length == 4;
-/*kernel.element: complexSymbolField2:dynamic=[toString(0)],static=[S],type=[inst:JSBool,inst:JSNull,inst:JSString]*/
/*strong.element: complexSymbolField2:dynamic=[toString(0)],static=[S],type=[inst:JSBool,inst:JSNull,inst:JSString,param:String]*/
const complexSymbolField2 = "true" "false" "${true}${null}";
-/*kernel.element: complexSymbolField3:
-dynamic=[+,unary-],
-static=[
- GenericClass.generative(0),
- String.fromEnvironment(1),
- Symbol.,assertIsSubtype,
- bool.fromEnvironment(1,defaultValue),
- identical(2),
- int.fromEnvironment(1,defaultValue),
- override,
- testComplexConstSymbol,
- throwTypeError],
-type=[
- check:int,
- inst:ConstantMap<dynamic,dynamic>,
- inst:ConstantProtoMap<dynamic,dynamic>,
- inst:ConstantStringMap<dynamic,dynamic>,
- inst:GeneralConstantMap<dynamic,dynamic>,
- inst:JSBool,
- inst:JSDouble,
- inst:JSInt,
- inst:JSNumber,
- inst:JSPositiveInt,
- inst:JSString,
- inst:JSUInt31,
- inst:JSUInt32,
- inst:List<int>,
- inst:Symbol]
-*/
/*strong.element: complexSymbolField3:dynamic=[+,unary-],static=[GenericClass.generative(0),String.fromEnvironment(1),Symbol.,assertIsSubtype,bool.fromEnvironment(1,defaultValue),checkSubtype,getRuntimeTypeArgument,getRuntimeTypeArgumentIntercepted,getRuntimeTypeInfo,getTypeArgumentByIndex,identical(2),int.fromEnvironment(1,defaultValue),override,setRuntimeTypeInfo,testComplexConstSymbol,throwTypeError],type=[inst:ConstantMap<dynamic,dynamic>,inst:ConstantProtoMap<dynamic,dynamic>,inst:ConstantStringMap<dynamic,dynamic>,inst:GeneralConstantMap<dynamic,dynamic>,inst:JSArray<dynamic>,inst:JSBool,inst:JSDouble,inst:JSExtendableArray<dynamic>,inst:JSFixedArray<dynamic>,inst:JSInt,inst:JSMutableArray<dynamic>,inst:JSNumber,inst:JSPositiveInt,inst:JSString,inst:JSUInt31,inst:JSUInt32,inst:JSUnmodifiableArray<dynamic>,inst:List<int>,inst:Symbol,param:Map<Object,Object>]*/
const complexSymbolField3 = const {
0: const bool.fromEnvironment('a', defaultValue: true),
@@ -153,12 +119,10 @@
override: const GenericClass<int, String>.generative(),
};
-/*kernel.element: complexSymbolField:static=[complexSymbolField1,complexSymbolField2,complexSymbolField3]*/
/*strong.element: complexSymbolField:static=[complexSymbolField1,complexSymbolField2,complexSymbolField3],type=[inst:JSBool,param:Object]*/
const complexSymbolField =
complexSymbolField1 ? complexSymbolField2 : complexSymbolField3;
-/*kernel.element: testComplexConstSymbol:static=[Symbol.,Symbol.(1),Symbol.validated,complexSymbolField],type=[inst:Symbol]*/
/*strong.element: testComplexConstSymbol:static=[Symbol.,Symbol.(1),Symbol.validated,complexSymbolField],type=[impl:String,inst:JSBool,inst:Symbol]*/
testComplexConstSymbol() => const Symbol(complexSymbolField);
@@ -177,14 +141,12 @@
/*element: testEmptyListLiteralDynamic:type=[inst:List<dynamic>]*/
testEmptyListLiteralDynamic() => <dynamic>[];
-/*kernel.element: testEmptyListLiteralTyped:type=[check:String,inst:List<String>]*/
/*strong.element: testEmptyListLiteralTyped:type=[inst:List<String>]*/
testEmptyListLiteralTyped() => <String>[];
/*element: testEmptyListLiteralConstant:type=[inst:List<dynamic>]*/
testEmptyListLiteralConstant() => const [];
-/*kernel.element: testNonEmptyListLiteral:type=[inst:JSBool,inst:List<dynamic>]*/
/*strong.element: testNonEmptyListLiteral:type=[inst:JSBool,inst:List<bool>]*/
testNonEmptyListLiteral() => [true];
@@ -194,7 +156,6 @@
/*element: testEmptyMapLiteralDynamic:type=[inst:Map<dynamic,dynamic>]*/
testEmptyMapLiteralDynamic() => <dynamic, dynamic>{};
-/*kernel.element: testEmptyMapLiteralTyped:type=[check:String,check:int,inst:Map<String,int>]*/
/*strong.element: testEmptyMapLiteralTyped:type=[inst:Map<String,int>]*/
testEmptyMapLiteralTyped() => <String, int>{};
@@ -206,7 +167,6 @@
inst:GeneralConstantMap<dynamic,dynamic>]*/
testEmptyMapLiteralConstant() => const {};
-/*kernel.element: testNonEmptyMapLiteral:type=[inst:JSBool,inst:JSNull,inst:Map<dynamic,dynamic>]*/
/*strong.element: testNonEmptyMapLiteral:type=[inst:JSBool,inst:JSNull,inst:Map<Null,bool>]*/
testNonEmptyMapLiteral() => {null: true};
diff --git a/tests/compiler/dart2js/impact/data/native.dart b/tests/compiler/dart2js/impact/data/native.dart
index f396310a..d147208 100644
--- a/tests/compiler/dart2js/impact/data/native.dart
+++ b/tests/compiler/dart2js/impact/data/native.dart
@@ -22,10 +22,6 @@
testNativeMethodReturns();
}
-/*kernel.element: testJSCall:
- static=[JS(3)],
- type=[inst:JSNull,inst:JSString,native:bool,native:int]
-*/
/*strong.element: testJSCall:
static=[JS<dynamic>(3)],
type=[inst:JSNull,inst:JSString,native:bool,native:int]
@@ -60,17 +56,6 @@
@Native("NativeClass")
class NativeClass {
- /*kernel.element: NativeClass.field:
- type=[
- check:Object,
- inst:JSNull,
- native:JSExtendableArray<JSExtendableArray.E>,
- native:Object,
- native:String,
- native:bool,
- native:double,
- native:int]
- */
/*strong.element: NativeClass.field:
type=[
inst:JSBool,
@@ -91,10 +76,6 @@
}
}
-/*kernel.element: testNativeField:
- dynamic=[field],
- type=[check:NativeClass]
-*/
/*strong.element: testNativeField:
dynamic=[field],
static=[defineProperty],
diff --git a/tests/compiler/dart2js/impact/data/statements.dart b/tests/compiler/dart2js/impact/data/statements.dart
index 9ab5130..d7b466f 100644
--- a/tests/compiler/dart2js/impact/data/statements.dart
+++ b/tests/compiler/dart2js/impact/data/statements.dart
@@ -65,17 +65,6 @@
return 1;
}
-/*kernel.element: testForIn:
- dynamic=[
- current,
- iterator,
- moveNext(0)],
- static=[
- checkConcurrentModificationError],
- type=[
- inst:JSNull,
- inst:Null]
-*/
/*strong.element: testForIn:
dynamic=[
current,
@@ -93,18 +82,6 @@
for (var e in o) {}
}
-/*kernel.element: testForInTyped:
- dynamic=[
- current,
- iterator,
- moveNext(0)],
- static=[
- checkConcurrentModificationError],
- type=[
- check:int,
- inst:JSNull,
- inst:Null]
-*/
/*strong.element: testForInTyped:
dynamic=[
current,
diff --git a/tests/compiler/dart2js/impact/impact_test.dart b/tests/compiler/dart2js/impact/impact_test.dart
index 76a1b43..6f1a653 100644
--- a/tests/compiler/dart2js/impact/impact_test.dart
+++ b/tests/compiler/dart2js/impact/impact_test.dart
@@ -20,7 +20,7 @@
asyncTest(() async {
Directory dataDir = new Directory.fromUri(Platform.script.resolve('data'));
await checkTests(dataDir, const ImpactDataComputer(),
- args: args, skipForStrong: ['fallthrough.dart'], testFrontend: true);
+ args: args, testFrontend: true);
});
}
diff --git a/tests/compiler/dart2js/inference/data/await.dart b/tests/compiler/dart2js/inference/data/await.dart
index 07c562b..0461584 100644
--- a/tests/compiler/dart2js/inference/data/await.dart
+++ b/tests/compiler/dart2js/inference/data/await.dart
@@ -17,7 +17,7 @@
/*element: _method1:[null]*/
_method1(
- /*kernel.[null|subclass=Object]*/
+
/*strong.[null|subclass=JSInt]*/
o) {}
@@ -34,7 +34,7 @@
/*element: _method2:[null]*/
_method2(
- /*kernel.[null|subclass=Object]*/
+
/*strong.[null|subclass=JSInt]*/
o) {}
@@ -54,7 +54,7 @@
/*element: _method4:[null]*/
_method4(
- /*kernel.[null|subclass=Object]*/
+
/*strong.[null|subclass=JSInt]*/
o) {}
diff --git a/tests/compiler/dart2js/inference/data/call_in_loop.dart b/tests/compiler/dart2js/inference/data/call_in_loop.dart
index 6296d5f..5c1a6eb 100644
--- a/tests/compiler/dart2js/inference/data/call_in_loop.dart
+++ b/tests/compiler/dart2js/inference/data/call_in_loop.dart
@@ -12,14 +12,10 @@
/*current: [exact=ArrayIterator]*/
/*moveNext: [exact=ArrayIterator]*/
for (var a in []) {
- // ignore: invocation_of_non_function_expression
- (T) /*invoke: [exact=TypeImpl]*/ (a);
- // ignore: invocation_of_non_function_expression
- (Object) /*invoke: [exact=TypeImpl]*/ ();
- // ignore: invocation_of_non_function_expression
- (this) /*invoke: [exact=Class]*/ ();
- // ignore: invocation_of_non_function_expression
- (1) /*invoke: [exact=JSUInt31]*/ ();
+ (T as dynamic) /*invoke: [exact=TypeImpl]*/ (a);
+ (Object as dynamic) /*invoke: [exact=TypeImpl]*/ ();
+ (this as dynamic) /*invoke: [exact=Class]*/ ();
+ (1 as dynamic) /*invoke: [exact=JSUInt31]*/ ();
}
}
}
diff --git a/tests/compiler/dart2js/inference/data/call_method_function_typed_value.dart b/tests/compiler/dart2js/inference/data/call_method_function_typed_value.dart
index 5d5c0f4..64aa174 100644
--- a/tests/compiler/dart2js/inference/data/call_method_function_typed_value.dart
+++ b/tests/compiler/dart2js/inference/data/call_method_function_typed_value.dart
@@ -6,7 +6,6 @@
import "package:expect/expect.dart";
-/*kernel.element: f:[subclass=JSNumber]*/
/*strong.element: f:[subclass=JSInt]*/
int f(int /*[null|subclass=Object]*/ i) => 2 /*invoke: [exact=JSUInt31]*/ * i;
diff --git a/tests/compiler/dart2js/inference/data/closure_tracer_28919.dart b/tests/compiler/dart2js/inference/data/closure_tracer_28919.dart
index eb8b96c..f948462 100644
--- a/tests/compiler/dart2js/inference/data/closure_tracer_28919.dart
+++ b/tests/compiler/dart2js/inference/data/closure_tracer_28919.dart
@@ -64,10 +64,9 @@
probe2methods(methods);
}
-/*kernel.element: probe2res:[null|subclass=Object]*/
/*strong.element: probe2res:[null|subclass=JSInt]*/
probe2res(
- /*kernel.[null|subclass=Object]*/
+
/*strong.[null|subclass=JSInt]*/
x) =>
x;
diff --git a/tests/compiler/dart2js/inference/data/closurization_instance_call.dart b/tests/compiler/dart2js/inference/data/closurization_instance_call.dart
index d42efcd..43e20c2 100644
--- a/tests/compiler/dart2js/inference/data/closurization_instance_call.dart
+++ b/tests/compiler/dart2js/inference/data/closurization_instance_call.dart
@@ -28,19 +28,19 @@
var local = c. /*[exact=Class]*/ method;
local
.
- /*kernel.invoke: [subtype=Function]*/
+
/*strong.invoke: [subclass=Closure]*/
toString();
local();
local
.
- /*kernel.invoke: [subtype=Function]*/
+
/*strong.invoke: [subclass=Closure]*/
toString();
local.call();
return local
.
- /*kernel.invoke: [subtype=Function]*/
+
/*strong.invoke: [subclass=Closure]*/
toString();
}
diff --git a/tests/compiler/dart2js/inference/data/closurization_local_call.dart b/tests/compiler/dart2js/inference/data/closurization_local_call.dart
index c14d3c4..9de0340 100644
--- a/tests/compiler/dart2js/inference/data/closurization_local_call.dart
+++ b/tests/compiler/dart2js/inference/data/closurization_local_call.dart
@@ -25,19 +25,19 @@
var local = /*[exact=JSUInt31]*/ () => 42;
local
.
- /*kernel.invoke: [subtype=Function]*/
+
/*strong.invoke: [subclass=Closure]*/
toString();
local();
local
.
- /*kernel.invoke: [subtype=Function]*/
+
/*strong.invoke: [subclass=Closure]*/
toString();
local.call();
return local
.
- /*kernel.invoke: [subtype=Function]*/
+
/*strong.invoke: [subclass=Closure]*/
toString();
}
diff --git a/tests/compiler/dart2js/inference/data/closurization_static_call.dart b/tests/compiler/dart2js/inference/data/closurization_static_call.dart
index 7881009..4f5ac7d 100644
--- a/tests/compiler/dart2js/inference/data/closurization_static_call.dart
+++ b/tests/compiler/dart2js/inference/data/closurization_static_call.dart
@@ -28,19 +28,19 @@
var local = method;
local
.
- /*kernel.invoke: [subtype=Function]*/
+
/*strong.invoke: [subclass=Closure]*/
toString();
local();
local
.
- /*kernel.invoke: [subtype=Function]*/
+
/*strong.invoke: [subclass=Closure]*/
toString();
local.call();
return local
.
- /*kernel.invoke: [subtype=Function]*/
+
/*strong.invoke: [subclass=Closure]*/
toString();
}
diff --git a/tests/compiler/dart2js/inference/data/deferred_load_get.dart b/tests/compiler/dart2js/inference/data/deferred_load_get.dart
index a4b0fb6..cbe93e3 100644
--- a/tests/compiler/dart2js/inference/data/deferred_load_get.dart
+++ b/tests/compiler/dart2js/inference/data/deferred_load_get.dart
@@ -5,7 +5,7 @@
import 'package:expect/expect.dart' deferred as expect;
// Synthetic getter added by kernel.
-/*kernel.element: __loadLibrary_expect:[null|subclass=Object]*/
+
/*strong.element: __loadLibrary_expect:[null|exact=_Future]*/
/*element: main:[null]*/
diff --git a/tests/compiler/dart2js/inference/data/erroneous_super_get.dart b/tests/compiler/dart2js/inference/data/erroneous_super_get.dart
deleted file mode 100644
index 4850cab..0000000
--- a/tests/compiler/dart2js/inference/data/erroneous_super_get.dart
+++ /dev/null
@@ -1,27 +0,0 @@
-// 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.
-
-/*element: main:[null]*/
-main() {
- missingSuperFieldAccess();
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// Access of missing super field.
-////////////////////////////////////////////////////////////////////////////////
-
-/*element: Super4.:[exact=Super4]*/
-class Super4 {}
-
-/*element: Sub4.:[exact=Sub4]*/
-class Sub4 extends Super4 {
- /*element: Sub4.method:[empty]*/
- // ignore: UNDEFINED_SUPER_GETTER
- method() => super.field;
-}
-
-/*element: missingSuperFieldAccess:[null]*/
-missingSuperFieldAccess() {
- new Sub4(). /*invoke: [exact=Sub4]*/ method();
-}
diff --git a/tests/compiler/dart2js/inference/data/erroneous_super_invoke.dart b/tests/compiler/dart2js/inference/data/erroneous_super_invoke.dart
deleted file mode 100644
index 19cf31c..0000000
--- a/tests/compiler/dart2js/inference/data/erroneous_super_invoke.dart
+++ /dev/null
@@ -1,160 +0,0 @@
-// 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.
-
-/*element: main:[null]*/
-main() {
- missingSuperMethodInvoke();
- superMethodInvokeMissingArgument();
- superMethodInvokeExtraArgument();
- superMethodInvokeExtraNamedArgument();
- missingSuperMethodInvokeNoSuchMethod();
- abstractSuperMethodInvokeNoSuchMethod();
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// Invocation of missing super method.
-////////////////////////////////////////////////////////////////////////////////
-
-/*element: Super4.:[exact=Super4]*/
-class Super4 {}
-
-/*element: Sub4.:[exact=Sub4]*/
-class Sub4 extends Super4 {
- /*element: Sub4.method:[empty]*/
- method() {
- // ignore: UNDEFINED_SUPER_METHOD
- var a = super.method();
- return a. /*invoke: [empty]*/ abs();
- }
-}
-
-/*element: missingSuperMethodInvoke:[null]*/
-missingSuperMethodInvoke() {
- new Sub4(). /*invoke: [exact=Sub4]*/ method();
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// Invocation of super method with missing argument.
-////////////////////////////////////////////////////////////////////////////////
-
-/*element: Super5.:[exact=Super5]*/
-class Super5 {
- /*element: Super5.method1:[exact=JSUInt31]*/
- method1(/*[exact=JSUInt31]*/ x) => 42;
-}
-
-/*element: Sub5.:[exact=Sub5]*/
-class Sub5 extends Super5 {
- /*element: Sub5.method2:[empty]*/
- method2() {
- super.method1(0);
- // ignore: NOT_ENOUGH_REQUIRED_ARGUMENTS
- var a = super.method1();
- return a. /*invoke: [empty]*/ abs();
- }
-}
-
-/*element: superMethodInvokeMissingArgument:[null]*/
-superMethodInvokeMissingArgument() {
- new Sub5(). /*invoke: [exact=Sub5]*/ method2();
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// Invocation of super method with extra argument.
-////////////////////////////////////////////////////////////////////////////////
-
-/*element: Super6.:[exact=Super6]*/
-class Super6 {
- /*element: Super6.method:[exact=JSUInt31]*/
- method() => 42;
-}
-
-/*element: Sub6.:[exact=Sub6]*/
-class Sub6 extends Super6 {
- /*element: Sub6.method:[empty]*/
- method() {
- // ignore: EXTRA_POSITIONAL_ARGUMENTS
- var a = super.method(0);
- return a. /*invoke: [empty]*/ abs();
- }
-}
-
-/*element: superMethodInvokeExtraArgument:[null]*/
-superMethodInvokeExtraArgument() {
- new Sub6(). /*invoke: [exact=Sub6]*/ method();
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// Invocation of super method with extra named argument.
-////////////////////////////////////////////////////////////////////////////////
-
-/*element: Super7.:[exact=Super7]*/
-class Super7 {
- /*element: Super7.method:[exact=JSUInt31]*/
- method() => 42;
-}
-
-/*element: Sub7.:[exact=Sub7]*/
-class Sub7 extends Super7 {
- /*element: Sub7.method:[empty]*/
- method() {
- // ignore: UNDEFINED_NAMED_PARAMETER
- var a = super.method(a: 0);
- return a. /*invoke: [empty]*/ abs();
- }
-}
-
-/*element: superMethodInvokeExtraNamedArgument:[null]*/
-superMethodInvokeExtraNamedArgument() {
- new Sub7(). /*invoke: [exact=Sub7]*/ method();
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// Invocation of super method caught by noSuchMethod.
-////////////////////////////////////////////////////////////////////////////////
-
-/*element: Super8.:[exact=Super8]*/
-class Super8 {
- /*element: Super8.noSuchMethod:[exact=JSUInt31]*/
- noSuchMethod(/*[null|subclass=Object]*/ _) => 42;
-}
-
-/*element: Sub8.:[exact=Sub8]*/
-class Sub8 extends Super8 {
- /*element: Sub8.method:[subclass=JSPositiveInt]*/
- method() {
- // ignore: UNDEFINED_SUPER_METHOD
- var a = super.method();
- return a. /*invoke: [exact=JSUInt31]*/ abs();
- }
-}
-
-/*element: missingSuperMethodInvokeNoSuchMethod:[null]*/
-missingSuperMethodInvokeNoSuchMethod() {
- new Sub8(). /*invoke: [exact=Sub8]*/ method();
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// Invocation of abstract super method caught by noSuchMethod.
-////////////////////////////////////////////////////////////////////////////////
-
-/*element: Super9.:[exact=Super9]*/
-class Super9 {
- method();
-
- /*element: Super9.noSuchMethod:[exact=JSUInt31]*/
- noSuchMethod(/*[null|subclass=Object]*/ im) => 42;
-}
-
-/*element: Sub9.:[exact=Sub9]*/
-class Sub9 extends Super9 {
- /*element: Sub9.method:[exact=JSUInt31]*/
- // ignore: abstract_super_member_reference
- method() => super.method();
-}
-
-/*element: abstractSuperMethodInvokeNoSuchMethod:[null]*/
-abstractSuperMethodInvokeNoSuchMethod() {
- new Sub9(). /*invoke: [exact=Sub9]*/ method();
-}
diff --git a/tests/compiler/dart2js/inference/data/erroneous_super_set.dart b/tests/compiler/dart2js/inference/data/erroneous_super_set.dart
deleted file mode 100644
index d100a00..0000000
--- a/tests/compiler/dart2js/inference/data/erroneous_super_set.dart
+++ /dev/null
@@ -1,30 +0,0 @@
-// 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.
-
-/*element: main:[null]*/
-main() {
- missingSuperFieldUpdate();
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// Update of missing super field.
-////////////////////////////////////////////////////////////////////////////////
-
-/*element: Super4.:[exact=Super4]*/
-class Super4 {}
-
-/*element: Sub4.:[exact=Sub4]*/
-class Sub4 extends Super4 {
- /*element: Sub4.method:[empty]*/
- method() {
- // ignore: UNDEFINED_SUPER_SETTER
- var a = super.field = new Sub4();
- return a. /*[empty]*/ method;
- }
-}
-
-/*element: missingSuperFieldUpdate:[null]*/
-missingSuperFieldUpdate() {
- new Sub4(). /*invoke: [exact=Sub4]*/ method();
-}
diff --git a/tests/compiler/dart2js/inference/data/field_type.dart b/tests/compiler/dart2js/inference/data/field_type.dart
index da7880c..ed69820 100644
--- a/tests/compiler/dart2js/inference/data/field_type.dart
+++ b/tests/compiler/dart2js/inference/data/field_type.dart
@@ -351,7 +351,7 @@
class A16 {
// TODO(johnniwinther): Investigate why these include `null`. The ast version
// didn't.
- /*kernel.element: A16.f16:Union([exact=JSString], [null|exact=JSUInt31])*/
+
/*strong.element: A16.f16:Union([exact=JSString], [null|exact=JSUInt31])*/
var f16;
@@ -470,8 +470,7 @@
/*iterator: [exact=A20]*/
/*current: [exact=A20]*/
/*moveNext: [exact=A20]*/
- for (/*kernel.update: [exact=A20]*/ /*strong.update: [exact=A20]*/ f20
- in a) {}
+ for (/*update: [exact=A20]*/ f20 in a) {}
}
/*element: A20.iterator:[exact=A20]*/
@@ -610,7 +609,7 @@
/*element: A24.+:Value([exact=JSString], value: "foo")*/
operator +(
- /*kernel.[exact=JSUInt31]*/
+
/*strong.[empty]*/
other) =>
'foo';
diff --git a/tests/compiler/dart2js/inference/data/for_in.dart b/tests/compiler/dart2js/inference/data/for_in.dart
index 562897a..9db65d4 100644
--- a/tests/compiler/dart2js/inference/data/for_in.dart
+++ b/tests/compiler/dart2js/inference/data/for_in.dart
@@ -32,7 +32,6 @@
// Return element from a for-in loop on a list literal.
////////////////////////////////////////////////////////////////////////////////
-/*kernel.element: forInReturn:[null|subclass=Object]*/
/*strong.element: forInReturn:[null|subclass=JSInt]*/
forInReturn() {
/*iterator: Container([exact=JSExtendableArray], element: [exact=JSUInt31], length: 3)*/
diff --git a/tests/compiler/dart2js/inference/data/general.dart b/tests/compiler/dart2js/inference/data/general.dart
index 1b2d806..2b7f50d 100644
--- a/tests/compiler/dart2js/inference/data/general.dart
+++ b/tests/compiler/dart2js/inference/data/general.dart
@@ -593,7 +593,7 @@
var a = topLevelGetter();
// Make [a] a captured variable. This should disable receiver
// specialization on [a].
- (/*kernel.[null|subclass=Object]*/
+ (
/*strong.[null|exact=JSString]*/
() => a.toString())();
a - 42;
@@ -674,7 +674,6 @@
/*element: A.generative:[exact=A]*/
A.generative();
- /*kernel.element: A.==:Union([exact=JSBool], [exact=JSUInt31])*/
/*strong.element: A.==:[exact=JSBool]*/
operator ==(/*Union([exact=JSString], [exact=JSUInt31])*/ other) =>
42 as dynamic;
diff --git a/tests/compiler/dart2js/inference/data/js_interop.dart b/tests/compiler/dart2js/inference/data/js_interop.dart
index c20543d..34767e1 100644
--- a/tests/compiler/dart2js/inference/data/js_interop.dart
+++ b/tests/compiler/dart2js/inference/data/js_interop.dart
@@ -10,6 +10,7 @@
/*element: main:[null]*/
main() {
anonymousClass();
+ jsInteropClass();
}
@JS()
@@ -20,6 +21,30 @@
{/*[exact=JSUInt31]*/ a, /*Value([exact=JSString], value: "")*/ b});
}
-/*kernel.element: anonymousClass:[null|subclass=Object]*/
/*strong.element: anonymousClass:[null|subclass=JavaScriptObject]*/
anonymousClass() => new Class1(a: 1, b: '');
+
+@JS()
+class JsInteropClass {
+ /*element: JsInteropClass.:[null|subclass=Object]*/
+ external JsInteropClass();
+
+ /*element: JsInteropClass.getter:[null|subclass=Object]*/
+ external int get getter;
+
+ external void set setter(int /*[subclass=JSInt]*/ value);
+
+ /*element: JsInteropClass.method:[null|subclass=Object]*/
+ external int method(int /*[exact=JSUInt31]*/ a);
+}
+
+/*element: jsInteropClass:[subclass=JSInt]*/
+jsInteropClass() {
+ JsInteropClass cls = new JsInteropClass();
+ return cls. /*update: [null|subclass=JavaScriptObject]*/ setter =
+ cls. /*[null|subclass=JavaScriptObject]*/ getter
+ /*invoke: [null|subclass=JSInt]*/ +
+ cls. /*invoke: [subclass=JavaScriptObject]*/ method(0)
+ /*invoke: [subclass=JSInt]*/ +
+ 10;
+}
diff --git a/tests/compiler/dart2js/inference/data/map_tracer_const.dart b/tests/compiler/dart2js/inference/data/map_tracer_const.dart
index 4da5254..b434740 100644
--- a/tests/compiler/dart2js/inference/data/map_tracer_const.dart
+++ b/tests/compiler/dart2js/inference/data/map_tracer_const.dart
@@ -2,7 +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.
-/*kernel.element: closure:Union([exact=JSDouble], [exact=JSUInt31])*/
/*strong.element: closure:[exact=JSUInt31]*/
int closure(int /*Union([exact=JSDouble], [exact=JSUInt31])*/ x) {
return x;
diff --git a/tests/compiler/dart2js/inference/data/optimizer_hints.dart b/tests/compiler/dart2js/inference/data/optimizer_hints.dart
index 57ea72c..85c19bd 100644
--- a/tests/compiler/dart2js/inference/data/optimizer_hints.dart
+++ b/tests/compiler/dart2js/inference/data/optimizer_hints.dart
@@ -57,7 +57,6 @@
// As above but without the annotation.
////////////////////////////////////////////////////////////////////////////////
-/*kernel.element: notTrustReturnTypeString:[null|subclass=Object]*/
/*strong.element: notTrustReturnTypeString:[null|exact=JSString]*/
String notTrustReturnTypeString() {
return _assumeDynamic(0);
@@ -83,7 +82,7 @@
/*element: _notTrustParameterTypeString:[null]*/
_notTrustParameterTypeString(
String
- /*kernel.[null|subclass=Object]*/
+
/*strong.[null|exact=JSString]*/
o) {}
diff --git a/tests/compiler/dart2js/inference/data/parameters_notrust.dart b/tests/compiler/dart2js/inference/data/parameters_notrust.dart
index d031544..861df2d 100644
--- a/tests/compiler/dart2js/inference/data/parameters_notrust.dart
+++ b/tests/compiler/dart2js/inference/data/parameters_notrust.dart
@@ -20,7 +20,6 @@
// within the method and therefore infer the return type to be an int.
////////////////////////////////////////////////////////////////////////////////
-/*kernel.element: _dontTrustParameters:Union([exact=JSString], [exact=JSUInt31])*/
/*strong.element: _dontTrustParameters:[exact=JSUInt31]*/
_dontTrustParameters(int /*Union([exact=JSString], [exact=JSUInt31])*/ i) {
return i;
diff --git a/tests/compiler/dart2js/inference/data/switch3.dart b/tests/compiler/dart2js/inference/data/switch3.dart
deleted file mode 100644
index 1ebcd71..0000000
--- a/tests/compiler/dart2js/inference/data/switch3.dart
+++ /dev/null
@@ -1,23 +0,0 @@
-// 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.
-
-/*element: foo:[null|exact=JSUInt31]*/
-foo(int /*[subclass=JSInt]*/ x) {
- var a;
- switch (x) {
- // ignore: case_block_not_terminated
- case 1:
- a = 1;
- case 2: // illegal fall through
- a = 2;
- break;
- }
-
- return a;
-}
-
-/*element: main:[null]*/
-main() {
- foo(new DateTime.now(). /*[exact=DateTime]*/ millisecondsSinceEpoch);
-}
diff --git a/tests/compiler/dart2js/inference/data/switch4.dart b/tests/compiler/dart2js/inference/data/switch4.dart
deleted file mode 100644
index 579bab4..0000000
--- a/tests/compiler/dart2js/inference/data/switch4.dart
+++ /dev/null
@@ -1,25 +0,0 @@
-// 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.
-
-/*element: foo:[exact=JSUInt31]*/
-foo(int /*[subclass=JSInt]*/ x) {
- var a;
- switch (x) {
- // ignore: case_block_not_terminated
- case 1:
- a = 1;
- case 2: // illegal fall through
- a = 2;
- break;
- default:
- a = 0;
- }
-
- return a;
-}
-
-/*element: main:[null]*/
-main() {
- foo(new DateTime.now(). /*[exact=DateTime]*/ millisecondsSinceEpoch);
-}
diff --git a/tests/compiler/dart2js/inference/data/type_literal.dart b/tests/compiler/dart2js/inference/data/type_literal.dart
index b0d8246..f90ee3c 100644
--- a/tests/compiler/dart2js/inference/data/type_literal.dart
+++ b/tests/compiler/dart2js/inference/data/type_literal.dart
@@ -12,7 +12,6 @@
/*element: typeLiteral:[exact=TypeImpl]*/
typeLiteral() => Object;
-/*kernel.element: typeLiteralToString:[null|subclass=Object]*/
/*strong.element: typeLiteralToString:[exact=JSString]*/
typeLiteralToString() => (Object). /*invoke: [exact=TypeImpl]*/ toString();
diff --git a/tests/compiler/dart2js/inference/data/use_static_types.dart b/tests/compiler/dart2js/inference/data/use_static_types.dart
index 7e40669..9906d25 100644
--- a/tests/compiler/dart2js/inference/data/use_static_types.dart
+++ b/tests/compiler/dart2js/inference/data/use_static_types.dart
@@ -18,19 +18,16 @@
invokeGenericMethods();
}
-/*kernel.element: invokeFunction1:[null|subclass=Object]*/
/*strong.element: invokeFunction1:[null|subclass=A]*/
invokeFunction1(A Function() /*[subclass=Closure]*/ f) {
return f();
}
-/*kernel.element: invokeFunction2:[null|subclass=Object]*/
/*strong.element: invokeFunction2:[null|exact=B]*/
invokeFunction2(B Function() /*[subclass=Closure]*/ f) {
return f();
}
-/*kernel.element: invokeFunction3:[null|subclass=Object]*/
/*strong.element: invokeFunction3:[null|exact=C]*/
invokeFunction3(C Function() /*[subclass=Closure]*/ f) {
return f();
@@ -39,25 +36,21 @@
/*element: genericFunction:[null|subclass=Object]*/
T genericFunction<T>(T Function() /*[subclass=Closure]*/ f) => f();
-/*kernel.element: invokeGenericFunction1:[null|subclass=Object]*/
/*strong.element: invokeGenericFunction1:[null|subclass=A]*/
invokeGenericFunction1() {
return genericFunction<A>(/*[exact=A]*/ () => new A());
}
-/*kernel.element: invokeGenericFunction2:[null|subclass=Object]*/
/*strong.element: invokeGenericFunction2:[null|exact=B]*/
invokeGenericFunction2() {
return genericFunction<B>(/*[exact=B]*/ () => new B());
}
-/*kernel.element: invokeGenericFunction3:[null|subclass=Object]*/
/*strong.element: invokeGenericFunction3:[null|exact=C]*/
invokeGenericFunction3() {
return genericFunction<C>(/*[exact=C]*/ () => new C());
}
-/*kernel.element: invokeGenericLocalFunction1:[null|subclass=Object]*/
/*strong.element: invokeGenericLocalFunction1:[null|subclass=A]*/
invokeGenericLocalFunction1() {
/*[null|subclass=Object]*/
@@ -65,7 +58,6 @@
return local<A>(/*[exact=A]*/ () => new A());
}
-/*kernel.element: invokeGenericLocalFunction2:[null|subclass=Object]*/
/*strong.element: invokeGenericLocalFunction2:[null|exact=B]*/
invokeGenericLocalFunction2() {
/*[null|subclass=Object]*/
@@ -73,7 +65,6 @@
return local<B>(/*[exact=B]*/ () => new B());
}
-/*kernel.element: invokeGenericLocalFunction3:[null|subclass=Object]*/
/*strong.element: invokeGenericLocalFunction3:[null|exact=C]*/
invokeGenericLocalFunction3() {
/*[null|subclass=Object]*/
@@ -143,47 +134,38 @@
superMethodInvoke() => super.functionTypedMethod()();
}
-/*kernel.element: invokeInstanceMethod1:Union([exact=C], [subclass=A])*/
/*strong.element: invokeInstanceMethod1:[subclass=A]*/
invokeInstanceMethod1(GenericClass<A> /*[exact=GenericClass]*/ c) =>
c. /*invoke: [exact=GenericClass]*/ method();
-/*kernel.element: invokeInstanceMethod2:Union([exact=C], [subclass=A])*/
/*strong.element: invokeInstanceMethod2:[exact=B]*/
invokeInstanceMethod2(GenericClass<B> /*[exact=GenericClass]*/ c) =>
c. /*invoke: [exact=GenericClass]*/ method();
-/*kernel.element: invokeInstanceMethod3:Union([exact=C], [subclass=A])*/
/*strong.element: invokeInstanceMethod3:[exact=C]*/
invokeInstanceMethod3(GenericClass<C> /*[exact=GenericClass]*/ c) =>
c. /*invoke: [exact=GenericClass]*/ method();
-/*kernel.element: invokeInstanceGetter1:Union([exact=C], [subclass=A])*/
/*strong.element: invokeInstanceGetter1:[subclass=A]*/
invokeInstanceGetter1(GenericClass<A> /*[exact=GenericClass]*/ c) =>
c. /*[exact=GenericClass]*/ getter;
-/*kernel.element: invokeInstanceGetter2:Union([exact=C], [subclass=A])*/
/*strong.element: invokeInstanceGetter2:[exact=B]*/
invokeInstanceGetter2(GenericClass<B> /*[exact=GenericClass]*/ c) =>
c. /*[exact=GenericClass]*/ getter;
-/*kernel.element: invokeInstanceGetter3:Union([exact=C], [subclass=A])*/
/*strong.element: invokeInstanceGetter3:[exact=C]*/
invokeInstanceGetter3(GenericClass<C> /*[exact=GenericClass]*/ c) =>
c. /*[exact=GenericClass]*/ getter;
-/*kernel.element: accessInstanceField1:Union([exact=C], [subclass=A])*/
/*strong.element: accessInstanceField1:[subclass=A]*/
accessInstanceField1(GenericClass<A> /*[exact=GenericClass]*/ c) =>
c. /*[exact=GenericClass]*/ field;
-/*kernel.element: accessInstanceField2:Union([exact=C], [subclass=A])*/
/*strong.element: accessInstanceField2:[exact=B]*/
accessInstanceField2(GenericClass<B> /*[exact=GenericClass]*/ c) =>
c. /*[exact=GenericClass]*/ field;
-/*kernel.element: accessInstanceField3:Union([exact=C], [subclass=A])*/
/*strong.element: accessInstanceField3:[exact=C]*/
accessInstanceField3(GenericClass<C> /*[exact=GenericClass]*/ c) =>
c. /*[exact=GenericClass]*/ field;
@@ -224,53 +206,44 @@
accessSuperField3(GenericSubclass<C> /*[exact=GenericSubclass]*/ c) =>
c. /*invoke: [exact=GenericSubclass]*/ superField();
-/*kernel.element: invokeFunctionTypedInstanceMethod1:[null|subclass=Object]*/
/*strong.element: invokeFunctionTypedInstanceMethod1:[null|subclass=A]*/
invokeFunctionTypedInstanceMethod1(
GenericClass<A> /*[exact=GenericClass]*/ c) =>
c. /*invoke: [exact=GenericClass]*/ functionTypedMethod()();
-/*kernel.element: invokeFunctionTypedInstanceMethod2:[null|subclass=Object]*/
/*strong.element: invokeFunctionTypedInstanceMethod2:[null|exact=B]*/
invokeFunctionTypedInstanceMethod2(
GenericClass<B> /*[exact=GenericClass]*/ c) =>
c. /*invoke: [exact=GenericClass]*/ functionTypedMethod()();
-/*kernel.element: invokeFunctionTypedInstanceMethod3:[null|subclass=Object]*/
/*strong.element: invokeFunctionTypedInstanceMethod3:[null|exact=C]*/
invokeFunctionTypedInstanceMethod3(
GenericClass<C> /*[exact=GenericClass]*/ c) =>
c. /*invoke: [exact=GenericClass]*/ functionTypedMethod()();
-/*kernel.element: invokeFunctionTypedInstanceGetter1:[null|subclass=Object]*/
/*strong.element: invokeFunctionTypedInstanceGetter1:[null|subclass=A]*/
invokeFunctionTypedInstanceGetter1(
GenericClass<A> /*[exact=GenericClass]*/ c) =>
c. /*invoke: [exact=GenericClass]*/ functionTypedGetter();
-/*kernel.element: invokeFunctionTypedInstanceGetter2:[null|subclass=Object]*/
/*strong.element: invokeFunctionTypedInstanceGetter2:[null|exact=B]*/
invokeFunctionTypedInstanceGetter2(
GenericClass<B> /*[exact=GenericClass]*/ c) =>
c. /*invoke: [exact=GenericClass]*/ functionTypedGetter();
-/*kernel.element: invokeFunctionTypedInstanceGetter3:[null|subclass=Object]*/
/*strong.element: invokeFunctionTypedInstanceGetter3:[null|exact=C]*/
invokeFunctionTypedInstanceGetter3(
GenericClass<C> /*[exact=GenericClass]*/ c) =>
c. /*invoke: [exact=GenericClass]*/ functionTypedGetter();
-/*kernel.element: invokeFunctionTypedInstanceField1:[null|subclass=Object]*/
/*strong.element: invokeFunctionTypedInstanceField1:[null|subclass=A]*/
invokeFunctionTypedInstanceField1(GenericClass<A> /*[exact=GenericClass]*/ c) =>
c. /*invoke: [exact=GenericClass]*/ functionTypedField();
-/*kernel.element: invokeFunctionTypedInstanceField2:[null|subclass=Object]*/
/*strong.element: invokeFunctionTypedInstanceField2:[null|exact=B]*/
invokeFunctionTypedInstanceField2(GenericClass<B> /*[exact=GenericClass]*/ c) =>
c. /*invoke: [exact=GenericClass]*/ functionTypedField();
-/*kernel.element: invokeFunctionTypedInstanceField3:[null|subclass=Object]*/
/*strong.element: invokeFunctionTypedInstanceField3:[null|exact=C]*/
invokeFunctionTypedInstanceField3(GenericClass<C> /*[exact=GenericClass]*/ c) =>
c. /*invoke: [exact=GenericClass]*/ functionTypedField();
@@ -384,126 +357,102 @@
/*element: Subclass.:[exact=Subclass]*/
class Subclass extends Class {
- /*kernel.element: Subclass.superMethod1:Union([exact=C], [subclass=A])*/
/*strong.element: Subclass.superMethod1:[subclass=A]*/
superMethod1() {
return super.genericMethod<A>(new A());
}
- /*kernel.element: Subclass.superMethod2:Union([exact=C], [subclass=A])*/
/*strong.element: Subclass.superMethod2:[exact=B]*/
superMethod2() {
return super.genericMethod<B>(new B());
}
- /*kernel.element: Subclass.superMethod3:Union([exact=C], [subclass=A])*/
/*strong.element: Subclass.superMethod3:[exact=C]*/
superMethod3() {
return super.genericMethod<C>(new C());
}
- /*kernel.element: Subclass.functionTypedSuperMethod1:[null|subclass=Object]*/
/*strong.element: Subclass.functionTypedSuperMethod1:[null|subclass=A]*/
functionTypedSuperMethod1() {
return super.functionTypedGenericMethod<A>(new A())();
}
- /*kernel.element: Subclass.functionTypedSuperMethod2:[null|subclass=Object]*/
/*strong.element: Subclass.functionTypedSuperMethod2:[null|exact=B]*/
functionTypedSuperMethod2() {
return super.functionTypedGenericMethod<B>(new B())();
}
- /*kernel.element: Subclass.functionTypedSuperMethod3:[null|subclass=Object]*/
/*strong.element: Subclass.functionTypedSuperMethod3:[null|exact=C]*/
functionTypedSuperMethod3() {
return super.functionTypedGenericMethod<C>(new C())();
}
}
-/*kernel.element: invokeGenericMethod1:Union([exact=C], [subclass=A])*/
/*strong.element: invokeGenericMethod1:[subclass=A]*/
invokeGenericMethod1(A /*[exact=A]*/ a) => genericMethod<A>(a);
-/*kernel.element: invokeGenericMethod2:Union([exact=C], [subclass=A])*/
/*strong.element: invokeGenericMethod2:[exact=B]*/
invokeGenericMethod2(B /*[exact=B]*/ b) => genericMethod<B>(b);
-/*kernel.element: invokeGenericMethod3:Union([exact=C], [subclass=A])*/
/*strong.element: invokeGenericMethod3:[exact=C]*/
invokeGenericMethod3(C /*[exact=C]*/ c) => genericMethod<C>(c);
-/*kernel.element: invokeGenericInstanceMethod1:Union([exact=C], [subclass=A])*/
/*strong.element: invokeGenericInstanceMethod1:[subclass=A]*/
invokeGenericInstanceMethod1() =>
new Class(). /*invoke: [exact=Class]*/ genericMethod<A>(new A());
-/*kernel.element: invokeGenericInstanceMethod2:Union([exact=C], [subclass=A])*/
/*strong.element: invokeGenericInstanceMethod2:[exact=B]*/
invokeGenericInstanceMethod2() =>
new Class(). /*invoke: [exact=Class]*/ genericMethod<B>(new B());
-/*kernel.element: invokeGenericInstanceMethod3:Union([exact=C], [subclass=A])*/
/*strong.element: invokeGenericInstanceMethod3:[exact=C]*/
invokeGenericInstanceMethod3() =>
new Class(). /*invoke: [exact=Class]*/ genericMethod<C>(new C());
-/*kernel.element: invokeGenericSuperMethod1:Union([exact=C], [subclass=A])*/
/*strong.element: invokeGenericSuperMethod1:[subclass=A]*/
invokeGenericSuperMethod1() =>
new Subclass(). /*invoke: [exact=Subclass]*/ superMethod1();
-/*kernel.element: invokeGenericSuperMethod2:Union([exact=C], [subclass=A])*/
/*strong.element: invokeGenericSuperMethod2:[exact=B]*/
invokeGenericSuperMethod2() =>
new Subclass(). /*invoke: [exact=Subclass]*/ superMethod2();
-/*kernel.element: invokeGenericSuperMethod3:Union([exact=C], [subclass=A])*/
/*strong.element: invokeGenericSuperMethod3:[exact=C]*/
invokeGenericSuperMethod3() =>
new Subclass(). /*invoke: [exact=Subclass]*/ superMethod3();
-/*kernel.element: invokeFunctionTypedGenericMethod1:[null|subclass=Object]*/
/*strong.element: invokeFunctionTypedGenericMethod1:[null|subclass=A]*/
invokeFunctionTypedGenericMethod1(A /*[exact=A]*/ a) =>
functionTypedGenericMethod<A>(a)();
-/*kernel.element: invokeFunctionTypedGenericMethod2:[null|subclass=Object]*/
/*strong.element: invokeFunctionTypedGenericMethod2:[null|exact=B]*/
invokeFunctionTypedGenericMethod2(B /*[exact=B]*/ b) =>
functionTypedGenericMethod<B>(b)();
-/*kernel.element: invokeFunctionTypedGenericMethod3:[null|subclass=Object]*/
/*strong.element: invokeFunctionTypedGenericMethod3:[null|exact=C]*/
invokeFunctionTypedGenericMethod3(C /*[exact=C]*/ c) =>
functionTypedGenericMethod<C>(c)();
-/*kernel.element: invokeFunctionTypedGenericInstanceMethod1:[null|subclass=Object]*/
/*strong.element: invokeFunctionTypedGenericInstanceMethod1:[null|subclass=A]*/
invokeFunctionTypedGenericInstanceMethod1() => new Class()
. /*invoke: [exact=Class]*/ functionTypedGenericMethod<A>(new A())();
-/*kernel.element: invokeFunctionTypedGenericInstanceMethod2:[null|subclass=Object]*/
/*strong.element: invokeFunctionTypedGenericInstanceMethod2:[null|exact=B]*/
invokeFunctionTypedGenericInstanceMethod2() => new Class()
. /*invoke: [exact=Class]*/ functionTypedGenericMethod<B>(new B())();
-/*kernel.element: invokeFunctionTypedGenericInstanceMethod3:[null|subclass=Object]*/
/*strong.element: invokeFunctionTypedGenericInstanceMethod3:[null|exact=C]*/
invokeFunctionTypedGenericInstanceMethod3() => new Class()
. /*invoke: [exact=Class]*/ functionTypedGenericMethod<C>(new C())();
-/*kernel.element: invokeFunctionTypedGenericSuperMethod1:[null|subclass=Object]*/
/*strong.element: invokeFunctionTypedGenericSuperMethod1:[null|subclass=A]*/
invokeFunctionTypedGenericSuperMethod1() =>
new Subclass(). /*invoke: [exact=Subclass]*/ functionTypedSuperMethod1();
-/*kernel.element: invokeFunctionTypedGenericSuperMethod2:[null|subclass=Object]*/
/*strong.element: invokeFunctionTypedGenericSuperMethod2:[null|exact=B]*/
invokeFunctionTypedGenericSuperMethod2() =>
new Subclass(). /*invoke: [exact=Subclass]*/ functionTypedSuperMethod2();
-/*kernel.element: invokeFunctionTypedGenericSuperMethod3:[null|subclass=Object]*/
/*strong.element: invokeFunctionTypedGenericSuperMethod3:[null|exact=C]*/
invokeFunctionTypedGenericSuperMethod3() =>
new Subclass(). /*invoke: [exact=Subclass]*/ functionTypedSuperMethod3();
diff --git a/tests/compiler/dart2js/inference/inference_test_helper.dart b/tests/compiler/dart2js/inference/inference_test_helper.dart
index 736f033..293e0d5 100644
--- a/tests/compiler/dart2js/inference/inference_test_helper.dart
+++ b/tests/compiler/dart2js/inference/inference_test_helper.dart
@@ -22,14 +22,6 @@
const List<String> skipForStrong = const <String>[
// TODO(johnniwinther): Remove this when issue 31767 is fixed.
'mixin_constructor_default_parameter_values.dart',
- // These contain compile-time errors:
- 'erroneous_super_get.dart',
- 'erroneous_super_invoke.dart',
- 'erroneous_super_set.dart',
- 'switch3.dart',
- 'switch4.dart',
- // TODO(johnniwinther): Make a strong mode clean version of this?
- 'call_in_loop.dart',
];
main(List<String> args) {
@@ -81,7 +73,7 @@
/// IR visitor for computing inference data for a member.
class TypeMaskIrComputer extends IrDataExtractor {
final GlobalTypeInferenceResults results;
- GlobalTypeInferenceElementResult result;
+ GlobalTypeInferenceMemberResult result;
final KernelToElementMapForBuilding _elementMap;
final KernelToLocalsMap _localsMap;
final ClosureDataLookup _closureDataLookup;
@@ -114,9 +106,7 @@
}
String getParameterValue(Local parameter) {
- GlobalTypeInferenceParameterResult elementResult =
- results.resultOfParameter(parameter);
- return getTypeMaskValue(elementResult.type);
+ return getTypeMaskValue(results.resultOfParameter(parameter));
}
String getTypeMaskValue(TypeMask typeMask) {
diff --git a/tests/compiler/dart2js/inference/list_tracer_test.dart b/tests/compiler/dart2js/inference/list_tracer_test.dart
index d474b9d..e475be6 100644
--- a/tests/compiler/dart2js/inference/list_tracer_test.dart
+++ b/tests/compiler/dart2js/inference/list_tracer_test.dart
@@ -210,13 +210,13 @@
var result = await runCompiler(memorySourceFiles: {'main.dart': source});
Expect.isTrue(result.isSuccess);
var compiler = result.compiler;
- var typesInferrer = compiler.globalInference.typesInferrerInternal;
- var closedWorld = typesInferrer.closedWorld;
+ var results = compiler.globalInference.resultsForTesting;
+ var closedWorld = results.closedWorld;
var commonMasks = closedWorld.abstractValueDomain;
checkType(String name, type) {
var element = findMember(closedWorld, name);
- ContainerTypeMask mask = typesInferrer.getTypeOfMember(element);
+ ContainerTypeMask mask = results.resultOfMember(element).type;
if (nullify) type = type.nullable();
Expect.equals(type, simplify(mask.elementType, closedWorld), name);
}
diff --git a/tests/compiler/dart2js/inference/load_deferred_library_test.dart b/tests/compiler/dart2js/inference/load_deferred_library_test.dart
index a6d709c..c9e89ff 100644
--- a/tests/compiler/dart2js/inference/load_deferred_library_test.dart
+++ b/tests/compiler/dart2js/inference/load_deferred_library_test.dart
@@ -56,10 +56,9 @@
MemberDefinition definition =
backendStrategy.elementMap.getMemberDefinition(loadDeferredLibrary);
ir.Procedure procedure = definition.node;
- typeMask = compiler.globalInference.resultsForTesting
- .resultOfParameter(localsMap
- .getLocalVariable(procedure.function.positionalParameters.first))
- .type;
+ typeMask = compiler.globalInference.resultsForTesting.resultOfParameter(
+ localsMap
+ .getLocalVariable(procedure.function.positionalParameters.first));
if (trust) {
Expect.equals(
diff --git a/tests/compiler/dart2js/inference/map_tracer_test.dart b/tests/compiler/dart2js/inference/map_tracer_test.dart
index 44426e8..aa7e497 100644
--- a/tests/compiler/dart2js/inference/map_tracer_test.dart
+++ b/tests/compiler/dart2js/inference/map_tracer_test.dart
@@ -5,7 +5,6 @@
import 'package:async_helper/async_helper.dart';
import 'package:compiler/src/compiler.dart';
import 'package:compiler/src/elements/entities.dart';
-import 'package:compiler/src/inferrer/type_graph_inferrer.dart';
import 'package:compiler/src/inferrer/typemasks/masks.dart';
import 'package:compiler/src/types/abstract_value_domain.dart';
import 'package:compiler/src/world.dart';
@@ -230,27 +229,27 @@
Expect.isTrue(result.isSuccess);
Compiler compiler = result.compiler;
TypeMask keyType, valueType;
- TypeGraphInferrer typesInferrer =
- compiler.globalInference.typesInferrerInternal;
- JClosedWorld closedWorld = typesInferrer.closedWorld;
+ GlobalTypeInferenceResults results =
+ compiler.globalInference.resultsForTesting;
+ JClosedWorld closedWorld = results.closedWorld;
AbstractValueDomain commonMasks = closedWorld.abstractValueDomain;
TypeMask emptyType = new TypeMask.nonNullEmpty();
MemberEntity aKey = findMember(closedWorld, 'aKey');
- TypeMask aKeyType = typesInferrer.getTypeOfMember(aKey);
+ TypeMask aKeyType = results.resultOfMember(aKey).type;
if (keyElementName != null) {
MemberEntity keyElement = findMember(closedWorld, keyElementName);
- keyType = typesInferrer.getTypeOfMember(keyElement);
+ keyType = results.resultOfMember(keyElement).type;
}
if (valueElementName != null) {
MemberEntity valueElement = findMember(closedWorld, valueElementName);
- valueType = typesInferrer.getTypeOfMember(valueElement);
+ valueType = results.resultOfMember(valueElement).type;
}
if (keyType == null) keyType = emptyType;
if (valueType == null) valueType = emptyType;
checkType(String name, keyType, valueType) {
MemberEntity element = findMember(closedWorld, name);
- MapTypeMask mask = typesInferrer.getTypeOfMember(element);
+ MapTypeMask mask = results.resultOfMember(element).type;
Expect.equals(keyType, simplify(mask.keyType, closedWorld), name);
Expect.equals(valueType, simplify(mask.valueType, closedWorld), name);
}
diff --git a/tests/compiler/dart2js/inference/side_effects/closure_call.dart b/tests/compiler/dart2js/inference/side_effects/closure_call.dart
deleted file mode 100644
index 7aaf687..0000000
--- a/tests/compiler/dart2js/inference/side_effects/closure_call.dart
+++ /dev/null
@@ -1,41 +0,0 @@
-// 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.
-
-/*element: method:SideEffects(reads nothing; writes nothing)*/
-method() {}
-
-/*element: callExpression:SideEffects(reads anything; writes anything)*/
-callExpression() => (method)();
-
-/*element: Super.:SideEffects(reads nothing; writes nothing)*/
-class Super {
- var field;
-
- /*element: Super.getter:SideEffects(reads nothing; writes nothing)*/
- get getter => null;
-}
-
-/*element: Class.:SideEffects(reads nothing; writes nothing)*/
-class Class extends Super {
- /*element: Class.callSuperField:SideEffects(reads anything; writes anything)*/
- callSuperField() => field();
-
- /*element: Class.callSuperGetter:SideEffects(reads anything; writes anything)*/
- callSuperGetter() => getter();
-
- /*element: Class.call:SideEffects(reads nothing; writes nothing)*/
- call() {}
-}
-
-/*element: callCall:SideEffects(reads anything; writes anything)*/
-callCall(c) => c.call();
-
-/*element: main:SideEffects(reads anything; writes anything)*/
-main() {
- var c = new Class();
- callExpression();
- c.callSuperField();
- c.callSuperGetter();
- callCall(c);
-}
diff --git a/tests/compiler/dart2js/inference/side_effects_test.dart b/tests/compiler/dart2js/inference/side_effects_test.dart
index d97b477..4908291 100644
--- a/tests/compiler/dart2js/inference/side_effects_test.dart
+++ b/tests/compiler/dart2js/inference/side_effects_test.dart
@@ -22,9 +22,7 @@
Directory dataDir =
new Directory.fromUri(Platform.script.resolve('side_effects'));
await checkTests(dataDir, const SideEffectsDataComputer(),
- args: args,
- options: [stopAfterTypeInference],
- skipForStrong: ['closure_call.dart']);
+ args: args, options: [stopAfterTypeInference]);
});
}
diff --git a/tests/compiler/dart2js/rti/data/async_foreach.dart b/tests/compiler/dart2js/rti/data/async_foreach.dart
index 775cdbe..b847743 100644
--- a/tests/compiler/dart2js/rti/data/async_foreach.dart
+++ b/tests/compiler/dart2js/rti/data/async_foreach.dart
@@ -2,7 +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.
-/*kernel.class: Class:*/
/*strong.class: Class:direct,explicit=[Class.T],implicit=[Class.T],needsArgs*/
/*omit.class: Class:needsArgs*/
class Class<T> {
diff --git a/tests/compiler/dart2js/rti/data/async_foreach_nonasync.dart b/tests/compiler/dart2js/rti/data/async_foreach_nonasync.dart
index 2e390bf..4afe488 100644
--- a/tests/compiler/dart2js/rti/data/async_foreach_nonasync.dart
+++ b/tests/compiler/dart2js/rti/data/async_foreach_nonasync.dart
@@ -2,7 +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.
-/*kernel.class: Class:*/
/*strong.class: Class:direct,explicit=[Class.T],implicit=[Class.T],needsArgs*/
/*omit.class: Class:*/
class Class<T> {
diff --git a/tests/compiler/dart2js/rti/data/async_local.dart b/tests/compiler/dart2js/rti/data/async_local.dart
index 45f0a91..10f865a 100644
--- a/tests/compiler/dart2js/rti/data/async_local.dart
+++ b/tests/compiler/dart2js/rti/data/async_local.dart
@@ -9,7 +9,7 @@
//
// This happens because the closure is thought as possibly going to the
// async.errorHandler callback.
- /*kernel.*/
+
/*strong.needsSignature*/
/*omit.needsSignature*/
local(object, stacktrace) => null;
diff --git a/tests/compiler/dart2js/rti/data/async_local_nonasync.dart b/tests/compiler/dart2js/rti/data/async_local_nonasync.dart
index 4651639..b18d28a 100644
--- a/tests/compiler/dart2js/rti/data/async_local_nonasync.dart
+++ b/tests/compiler/dart2js/rti/data/async_local_nonasync.dart
@@ -5,7 +5,7 @@
main() {
// If any method was `async`, this would have triggered the need for the
// signature on this closure. See the 'async_local.dart' test.
- /*kernel.*/
+
/*strong.*/
/*omit.*/
local(object, stacktrace) => null;
diff --git a/tests/compiler/dart2js/rti/data/async_local_typed.dart b/tests/compiler/dart2js/rti/data/async_local_typed.dart
index 40de910..5d4c863 100644
--- a/tests/compiler/dart2js/rti/data/async_local_typed.dart
+++ b/tests/compiler/dart2js/rti/data/async_local_typed.dart
@@ -2,7 +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.
-/*kernel.class: Class:*/
/*strong.class: Class:explicit=[Class<int>],needsArgs*/
/*omit.class: Class:*/
class Class<T> {}
@@ -12,7 +11,7 @@
// implementation the closure, with type
// `dynamic Function(dynamic, Class<int>)`, is not a potential subtype and
// therefore doesn't need its signature.
- /*kernel.*/
+
/*strong.needsSignature*/
/*omit.*/
local(object, Class<int> stacktrace) => null;
diff --git a/tests/compiler/dart2js/rti/data/call_typed_generic.dart b/tests/compiler/dart2js/rti/data/call_typed_generic.dart
index 69a082c1..7509783 100644
--- a/tests/compiler/dart2js/rti/data/call_typed_generic.dart
+++ b/tests/compiler/dart2js/rti/data/call_typed_generic.dart
@@ -5,11 +5,9 @@
import 'package:expect/expect.dart';
import 'package:meta/dart2js.dart';
-/*kernel.class: A:needsArgs*/
/*strong.class: A:direct,explicit=[A.T],needsArgs*/
/*omit.class: A:*/
class A<T> {
- /*kernel.element: A.call:needsSignature*/
/*strong.element: A.call:*/
/*omit.element: A.call:*/
call(T t) {}
diff --git a/tests/compiler/dart2js/rti/data/call_typed_generic_strong.dart b/tests/compiler/dart2js/rti/data/call_typed_generic_strong.dart
index cb5b8c4..fd20af7 100644
--- a/tests/compiler/dart2js/rti/data/call_typed_generic_strong.dart
+++ b/tests/compiler/dart2js/rti/data/call_typed_generic_strong.dart
@@ -5,11 +5,9 @@
import 'package:expect/expect.dart';
import 'package:meta/dart2js.dart';
-/*kernel.class: A:needsArgs*/
/*strong.class: A:direct,explicit=[A.T],needsArgs*/
/*omit.class: A:*/
class A<T> {
- /*kernel.element: A.call:needsSignature*/
/*strong.element: A.call:*/
/*omit.element: A.call:*/
call(T t) {}
diff --git a/tests/compiler/dart2js/rti/data/closure.dart b/tests/compiler/dart2js/rti/data/closure.dart
index eb55472..a77b268 100644
--- a/tests/compiler/dart2js/rti/data/closure.dart
+++ b/tests/compiler/dart2js/rti/data/closure.dart
@@ -2,7 +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.
-/*kernel.class: A:needsArgs*/
/*omit.class: A:needsArgs*/
/*strong.class: A:direct,explicit=[A.T],needsArgs*/
class A<T> {
@@ -14,7 +13,7 @@
f() {
// TODO(johnniwinther): Optimize local function type signature need.
return
- /*kernel.*/
+
/*strong.needsSignature*/
/*omit.needsSignature*/
(int t) {};
diff --git a/tests/compiler/dart2js/rti/data/closure_generic_unneeded_strong.dart b/tests/compiler/dart2js/rti/data/closure_generic_unneeded_strong.dart
index f14aa06..1e461ee 100644
--- a/tests/compiler/dart2js/rti/data/closure_generic_unneeded_strong.dart
+++ b/tests/compiler/dart2js/rti/data/closure_generic_unneeded_strong.dart
@@ -4,7 +4,6 @@
import 'package:expect/expect.dart';
-/*kernel.class: A:*/
/*omit.class: A:*/
/*strong.class: A:direct,explicit=[A.T],needsArgs*/
class A<T> {
diff --git a/tests/compiler/dart2js/rti/data/closure_unneeded.dart b/tests/compiler/dart2js/rti/data/closure_unneeded.dart
index f14aa06..1e461ee 100644
--- a/tests/compiler/dart2js/rti/data/closure_unneeded.dart
+++ b/tests/compiler/dart2js/rti/data/closure_unneeded.dart
@@ -4,7 +4,6 @@
import 'package:expect/expect.dart';
-/*kernel.class: A:*/
/*omit.class: A:*/
/*strong.class: A:direct,explicit=[A.T],needsArgs*/
class A<T> {
diff --git a/tests/compiler/dart2js/rti/data/dynamic_is2_strong.dart b/tests/compiler/dart2js/rti/data/dynamic_is2_strong.dart
index aed8273..d9574d0 100644
--- a/tests/compiler/dart2js/rti/data/dynamic_is2_strong.dart
+++ b/tests/compiler/dart2js/rti/data/dynamic_is2_strong.dart
@@ -2,7 +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.
-/*kernel.class: A:*/
/*omit.class: A:*/
/*strong.class: A:explicit=[A]*/
class A {
diff --git a/tests/compiler/dart2js/rti/data/dynamic_tear_off3_strong.dart b/tests/compiler/dart2js/rti/data/dynamic_tear_off3_strong.dart
index 7dffcff..f620594 100644
--- a/tests/compiler/dart2js/rti/data/dynamic_tear_off3_strong.dart
+++ b/tests/compiler/dart2js/rti/data/dynamic_tear_off3_strong.dart
@@ -2,7 +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.
-/*kernel.class: A:*/
/*omit.class: A:*/
/*strong.class: A:explicit=[A]*/
class A {
diff --git a/tests/compiler/dart2js/rti/data/function_subtype_local5.dart b/tests/compiler/dart2js/rti/data/function_subtype_local5.dart
index 7119670..3d1b80c 100644
--- a/tests/compiler/dart2js/rti/data/function_subtype_local5.dart
+++ b/tests/compiler/dart2js/rti/data/function_subtype_local5.dart
@@ -18,11 +18,11 @@
class C<T> {
void test(String nameOfT, bool expectedResult) {
// TODO(johnniwinther): Optimize local function type signature need.
- /*kernel.*/
+
/*strong.needsSignature*/
/*omit.needsSignature*/
int foo(bool a, [String b]) => null;
- /*kernel.*/
+
/*strong.needsSignature*/
/*omit.needsSignature*/
int baz(bool a, {String b}) => null;
diff --git a/tests/compiler/dart2js/rti/data/generic_class_is2.dart b/tests/compiler/dart2js/rti/data/generic_class_is2.dart
index acef47b..8f6cc6c 100644
--- a/tests/compiler/dart2js/rti/data/generic_class_is2.dart
+++ b/tests/compiler/dart2js/rti/data/generic_class_is2.dart
@@ -8,7 +8,6 @@
/*class: A:implicit=[List<A<C2>>,List<A<C>>]*/
class A<T> {}
-/*kernel.class: A1:*/
/*omit.class: A1:*/
/*strong.class: A1:implicit=[A1]*/
class A1 implements A<C1> {}
diff --git a/tests/compiler/dart2js/rti/data/generic_creation.dart b/tests/compiler/dart2js/rti/data/generic_creation.dart
index 25b4a20..cdae93c 100644
--- a/tests/compiler/dart2js/rti/data/generic_creation.dart
+++ b/tests/compiler/dart2js/rti/data/generic_creation.dart
@@ -5,49 +5,43 @@
import "package:expect/expect.dart";
/*class: A:needsArgs*/
-/*kernel.element: A.:needsSignature*/
+
/*strong.element: A.:*/
/*omit.element: A.:*/
class A<X, Y, Z> {
- /*kernel.element: A.shift:needsSignature*/
/*strong.element: A.shift:*/
/*omit.element: A.shift:*/
shift() => new A<Z, X, Y>();
- /*kernel.element: A.swap:needsSignature*/
/*strong.element: A.swap:*/
/*omit.element: A.swap:*/
swap() => new A<Z, Y, X>();
- /*kernel.element: A.first:needsSignature*/
/*strong.element: A.first:*/
/*omit.element: A.first:*/
first() => new A<X, X, X>();
- /*kernel.element: A.last:needsSignature*/
/*strong.element: A.last:*/
/*omit.element: A.last:*/
last() => new A<Z, Z, Z>();
- /*kernel.element: A.wrap:needsSignature*/
/*strong.element: A.wrap:*/
/*omit.element: A.wrap:*/
wrap() => new A<A<X, X, X>, A<Y, Y, Y>, A<Z, Z, Z>>();
}
-/*kernel.element: B.:needsSignature*/
/*strong.element: B.:*/
/*omit.element: B.:*/
class B extends A<U, V, W> {}
/*class: C:needsArgs*/
-/*kernel.element: C.:needsSignature*/
+
/*strong.element: C.:*/
/*omit.element: C.:*/
class C<T> extends A<U, T, W> {}
/*class: D:needsArgs*/
-/*kernel.element: D.:needsSignature*/
+
/*strong.element: D.:*/
/*omit.element: D.:*/
class D<X, Y, Z> extends A<Y, Z, X> {}
@@ -58,12 +52,10 @@
class W {}
-/*kernel.element: sameType:needsSignature*/
/*strong.element: sameType:*/
/*omit.element: sameType:*/
sameType(a, b) => Expect.equals(a.runtimeType, b.runtimeType);
-/*kernel.element: main:needsSignature*/
/*strong.element: main:*/
/*omit.element: main:*/
main() {
diff --git a/tests/compiler/dart2js/rti/data/generic_method_instantiate.dart b/tests/compiler/dart2js/rti/data/generic_method_instantiate.dart
index 2d0d2ce..04ef2e4 100644
--- a/tests/compiler/dart2js/rti/data/generic_method_instantiate.dart
+++ b/tests/compiler/dart2js/rti/data/generic_method_instantiate.dart
@@ -8,7 +8,6 @@
/*class: B:deps=[method],explicit=[B<A>],needsArgs*/
class B<T> {}
-/*kernel.element: method:*/
/*strong.element: method:needsArgs*/
/*omit.element: method:needsArgs*/
method<T>() => new B<T>();
diff --git a/tests/compiler/dart2js/rti/data/generic_method_is.dart b/tests/compiler/dart2js/rti/data/generic_method_is.dart
index 6339de6..972f756 100644
--- a/tests/compiler/dart2js/rti/data/generic_method_is.dart
+++ b/tests/compiler/dart2js/rti/data/generic_method_is.dart
@@ -2,7 +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.
-/*kernel.element: method:direct,explicit=[method.T]*/
/*strong.element: method:direct,explicit=[method.T],needsArgs*/
/*omit.element: method:direct,explicit=[method.T],needsArgs*/
method<T>(T t) => t is T;
diff --git a/tests/compiler/dart2js/rti/data/generic_methods_dynamic_05_strong.dart b/tests/compiler/dart2js/rti/data/generic_methods_dynamic_05_strong.dart
index 957e2cd..522514b 100644
--- a/tests/compiler/dart2js/rti/data/generic_methods_dynamic_05_strong.dart
+++ b/tests/compiler/dart2js/rti/data/generic_methods_dynamic_05_strong.dart
@@ -4,11 +4,9 @@
// Test derived from language_2/generic_methods_dynamic_test/05
-/*kernel.class: global#JSArray:deps=[EmptyIterable,List,ListIterable,SubListIterable],explicit=[JSArray],needsArgs*/
/*omit.class: global#JSArray:deps=[EmptyIterable,List,ListIterable,SubListIterable],explicit=[JSArray],needsArgs*/
/*strong.class: global#JSArray:deps=[ArrayIterator,EmptyIterable,List,ListIterable,SubListIterable],direct,explicit=[Iterable<JSArray.E>,JSArray,JSArray.E,JSArray<ArrayIterator.E>,List<JSArray.E>],implicit=[JSArray.E],needsArgs*/
-/*kernel.class: global#List:deps=[C.bar,EmptyIterable,Iterable,JSArray,ListIterable],explicit=[List,List<B>],needsArgs*/
/*omit.class: global#List:deps=[C.bar,EmptyIterable,Iterable,JSArray,ListIterable],explicit=[List,List<B>],needsArgs*/
/*strong.class: global#List:deps=[C.bar,EmptyIterable,Iterable,JSArray,ListIterable,makeListFixedLength],direct,explicit=[List,List.E,List<B>,List<JSArray.E>,List<String>,List<makeListFixedLength.T>],implicit=[List.E],needsArgs*/
@@ -16,13 +14,11 @@
class A {}
-/*kernel.class: B:explicit=[List<B>]*/
/*omit.class: B:explicit=[List<B>]*/
/*strong.class: B:explicit=[List<B>],implicit=[B]*/
class B {}
class C {
- /*kernel.element: C.bar:needsArgs,selectors=[Selector(call, bar, arity=1, types=1)]*/
/*omit.element: C.bar:needsArgs,selectors=[Selector(call, bar, arity=1, types=1)]*/
/*strong.element: C.bar:direct,explicit=[Iterable<bar.T>],implicit=[bar.T],needsArgs,selectors=[Selector(call, bar, arity=1, types=1)]*/
List<T> bar<T>(Iterable<T> t) => <T>[t.first];
diff --git a/tests/compiler/dart2js/rti/data/generic_methods_dynamic_05a_strong.dart b/tests/compiler/dart2js/rti/data/generic_methods_dynamic_05a_strong.dart
index c6a1e97..2959bc1 100644
--- a/tests/compiler/dart2js/rti/data/generic_methods_dynamic_05a_strong.dart
+++ b/tests/compiler/dart2js/rti/data/generic_methods_dynamic_05a_strong.dart
@@ -6,7 +6,6 @@
import "package:expect/expect.dart";
-/*kernel.class: A:deps=[C.bar],explicit=[A<B>],needsArgs*/
/*omit.class: A:deps=[C.bar],explicit=[A<B>],needsArgs*/
/*strong.class: A:deps=[C.bar],direct,explicit=[A.T,A<B>,A<bar.T>],needsArgs*/
class A<T> {
@@ -15,13 +14,11 @@
A(this.field);
}
-/*kernel.class: B:explicit=[A<B>]*/
/*omit.class: B:explicit=[A<B>]*/
/*strong.class: B:explicit=[A<B>],implicit=[B]*/
class B {}
class C {
- /*kernel.element: C.bar:needsArgs,selectors=[Selector(call, bar, arity=1, types=1)]*/
/*omit.element: C.bar:needsArgs,selectors=[Selector(call, bar, arity=1, types=1)]*/
/*strong.element: C.bar:explicit=[A<bar.T>],implicit=[bar.T],indirect,needsArgs,selectors=[Selector(call, bar, arity=1, types=1)]*/
A<T> bar<T>(A<T> t) => new A<T>(t.field);
diff --git a/tests/compiler/dart2js/rti/data/indirect_through_static.dart b/tests/compiler/dart2js/rti/data/indirect_through_static.dart
index f8c9344..e548a31 100644
--- a/tests/compiler/dart2js/rti/data/indirect_through_static.dart
+++ b/tests/compiler/dart2js/rti/data/indirect_through_static.dart
@@ -2,17 +2,12 @@
// 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.
-/*kernel.class: A:*/
/*strong.class: A:implicit=[A]*/
/*omit.class: A:implicit=[A]*/
abstract class A {}
class B implements A {}
-/*kernel.class: C:
- deps=[lookup],
- explicit=[C<lookup.T>]
-*/
/*strong.class: C:
deps=[lookup],
explicit=[C<lookup.T>,Map<String,C>],
@@ -31,7 +26,6 @@
map['x'] = new C<B>();
}
-/*kernel.element: lookup:direct,explicit=[C<lookup.T>]*/
/*strong.element: lookup:direct,explicit=[C<lookup.T>],needsArgs*/
/*omit.element: lookup:direct,explicit=[C<lookup.T>],needsArgs*/
C<T> lookup<T>(String key) {
diff --git a/tests/compiler/dart2js/rti/data/instantiation2.dart b/tests/compiler/dart2js/rti/data/instantiation2.dart
index 5fc92bb..48c7b6c 100644
--- a/tests/compiler/dart2js/rti/data/instantiation2.dart
+++ b/tests/compiler/dart2js/rti/data/instantiation2.dart
@@ -2,7 +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.
-/*kernel.element: f:direct,explicit=[f.T]*/
/*strong.element: f:deps=[B],direct,explicit=[f.T],needsArgs,needsInst=[<B.S>]*/
/*omit.element: f:deps=[B],direct,explicit=[f.T],needsArgs,needsInst=[<B.S>]*/
bool f<T>(T a) => a is T;
diff --git a/tests/compiler/dart2js/rti/data/instantiation4.dart b/tests/compiler/dart2js/rti/data/instantiation4.dart
index 35f00d4..1fcdac2 100644
--- a/tests/compiler/dart2js/rti/data/instantiation4.dart
+++ b/tests/compiler/dart2js/rti/data/instantiation4.dart
@@ -2,7 +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.
-/*kernel.element: f:direct,explicit=[f.T]*/
/*strong.element: f:deps=[B],direct,explicit=[f.T],needsArgs,needsInst=[<B.S>]*/
/*omit.element: f:deps=[B],direct,explicit=[f.T],needsArgs,needsInst=[<B.S>]*/
bool f<T>(T a) => a is T;
diff --git a/tests/compiler/dart2js/rti/data/instantiation6.dart b/tests/compiler/dart2js/rti/data/instantiation6.dart
index 86b3684..672e987 100644
--- a/tests/compiler/dart2js/rti/data/instantiation6.dart
+++ b/tests/compiler/dart2js/rti/data/instantiation6.dart
@@ -2,7 +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.
-/*kernel.element: f:direct,explicit=[f.T]*/
/*strong.element: f:deps=[method],direct,explicit=[f.T],needsArgs,needsInst=[<method.S>]*/
/*omit.element: f:deps=[method],direct,explicit=[f.T],needsArgs,needsInst=[<method.S>]*/
bool f<T>(T a) => a is T;
diff --git a/tests/compiler/dart2js/rti/data/list_to_set.dart b/tests/compiler/dart2js/rti/data/list_to_set.dart
index 427ecc9..60c98f7 100644
--- a/tests/compiler/dart2js/rti/data/list_to_set.dart
+++ b/tests/compiler/dart2js/rti/data/list_to_set.dart
@@ -2,11 +2,9 @@
// 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.
-/*kernel.class: global#List:deps=[Class,EmptyIterable,Iterable,JSArray,ListIterable,SetMixin],explicit=[List],implicit=[List.E],indirect,needsArgs*/
/*strong.class: global#List:deps=[Class,EmptyIterable,Iterable,JSArray,ListIterable,SetMixin,makeListFixedLength],direct,explicit=[List,List.E,List<JSArray.E>,List<String>,List<makeListFixedLength.T>],implicit=[List.E],needsArgs*/
/*omit.class: global#List:deps=[Class,EmptyIterable,Iterable,JSArray,ListIterable,SetMixin],explicit=[List],implicit=[List.E],indirect,needsArgs*/
-/*kernel.class: global#JSArray:deps=[EmptyIterable,List,ListIterable,SetMixin,SubListIterable],explicit=[JSArray],implicit=[JSArray.E],indirect,needsArgs*/
/*strong.class: global#JSArray:deps=[ArrayIterator,EmptyIterable,List,ListIterable,SetMixin,SubListIterable],explicit=[Iterable<JSArray.E>,JSArray,JSArray.E,JSArray<ArrayIterator.E>,List<JSArray.E>],implicit=[JSArray.E],indirect,needsArgs*/
/*omit.class: global#JSArray:deps=[EmptyIterable,List,ListIterable,SetMixin,SubListIterable],explicit=[JSArray],implicit=[JSArray.E],indirect,needsArgs*/
diff --git a/tests/compiler/dart2js/rti/data/local_function_signatures.dart b/tests/compiler/dart2js/rti/data/local_function_signatures.dart
index 1704785..27ed472 100644
--- a/tests/compiler/dart2js/rti/data/local_function_signatures.dart
+++ b/tests/compiler/dart2js/rti/data/local_function_signatures.dart
@@ -6,7 +6,6 @@
class Class1 {
method1() {
- /*kernel.*/
/*strong.needsSignature*/
/*omit.needsSignature*/
num local(num n) => null;
@@ -24,7 +23,6 @@
}
}
-/*kernel.class: Class2:needsArgs*/
/*omit.class: Class2:needsArgs*/
/*strong.class: Class2:direct,explicit=[Class2.T],needsArgs*/
class Class2<T> {
@@ -44,7 +42,6 @@
}
}
-/*kernel.class: Class4:*/
/*omit.class: Class4:*/
/*strong.class: Class4:direct,explicit=[Class4.T],needsArgs*/
class Class4<T> {
diff --git a/tests/compiler/dart2js/rti/data/map_literal.dart b/tests/compiler/dart2js/rti/data/map_literal.dart
index 1bda5e6..2c7349d 100644
--- a/tests/compiler/dart2js/rti/data/map_literal.dart
+++ b/tests/compiler/dart2js/rti/data/map_literal.dart
@@ -2,19 +2,15 @@
// 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.
-/*kernel.class: global#Map:*/
/*omit.class: global#Map:*/
/*strong.class: global#Map:explicit=[Map],indirect,needsArgs*/
-/*kernel.class: global#LinkedHashMap:deps=[Map]*/
/*omit.class: global#LinkedHashMap:deps=[Map]*/
/*strong.class: global#LinkedHashMap:deps=[Map],direct,explicit=[LinkedHashMap<LinkedHashMap.K,LinkedHashMap.V>],implicit=[LinkedHashMap.K,LinkedHashMap.V],needsArgs*/
-/*kernel.class: global#JsLinkedHashMap:deps=[LinkedHashMap]*/
/*omit.class: global#JsLinkedHashMap:deps=[LinkedHashMap]*/
/*strong.class: global#JsLinkedHashMap:deps=[LinkedHashMap],direct,explicit=[JsLinkedHashMap.K,JsLinkedHashMap.V,void Function(JsLinkedHashMap.K,JsLinkedHashMap.V)],implicit=[JsLinkedHashMap.K,JsLinkedHashMap.V],needsArgs*/
-/*kernel.class: global#double:explicit=[double]*/
/*omit.class: global#double:explicit=[double]*/
/*strong.class: global#double:explicit=[double],implicit=[double]*/
diff --git a/tests/compiler/dart2js/rti/data/map_literal_checked.dart b/tests/compiler/dart2js/rti/data/map_literal_checked.dart
deleted file mode 100644
index d48447a..0000000
--- a/tests/compiler/dart2js/rti/data/map_literal_checked.dart
+++ /dev/null
@@ -1,13 +0,0 @@
-// 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.
-
-/*class: global#Map:explicit=[Map],indirect,needsArgs*/
-/*class: global#LinkedHashMap:deps=[Map],direct,explicit=[LinkedHashMap<LinkedHashMap.K,LinkedHashMap.V>],implicit=[LinkedHashMap.K,LinkedHashMap.V],needsArgs*/
-/*class: global#JsLinkedHashMap: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:explicit=[double],implicit=[double]*/
-/*class: global#JSDouble:*/
-
-main() {
- <int, double>{}[0] = 0.5;
-}
diff --git a/tests/compiler/dart2js/rti/data/map_to_set.dart b/tests/compiler/dart2js/rti/data/map_to_set.dart
index b883fe0..80569bd 100644
--- a/tests/compiler/dart2js/rti/data/map_to_set.dart
+++ b/tests/compiler/dart2js/rti/data/map_to_set.dart
@@ -2,19 +2,15 @@
// 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.
-/*kernel.class: global#Map:deps=[Class],needsArgs*/
/*omit.class: global#Map:deps=[Class],needsArgs*/
/*strong.class: global#Map:deps=[Class,JsLinkedHashMap,MapMixin],explicit=[Map,Map<JsLinkedHashMap.K,JsLinkedHashMap.V>,Map<MapMixin.K,MapMixin.V>],indirect,needsArgs*/
-/*kernel.class: global#LinkedHashMap:deps=[Map],needsArgs*/
/*omit.class: global#LinkedHashMap:deps=[Map],needsArgs*/
/*strong.class: global#LinkedHashMap:deps=[Map],direct,explicit=[LinkedHashMap<LinkedHashMap.K,LinkedHashMap.V>],implicit=[LinkedHashMap.K,LinkedHashMap.V],needsArgs*/
-/*kernel.class: global#JsLinkedHashMap:deps=[LinkedHashMap],implicit=[JsLinkedHashMap.K],needsArgs*/
/*omit.class: global#JsLinkedHashMap:deps=[LinkedHashMap],implicit=[JsLinkedHashMap.K],needsArgs*/
/*strong.class: global#JsLinkedHashMap:deps=[LinkedHashMap],explicit=[JsLinkedHashMap.K,JsLinkedHashMap.V,Map<JsLinkedHashMap.K,JsLinkedHashMap.V>,void Function(JsLinkedHashMap.K,JsLinkedHashMap.V)],implicit=[JsLinkedHashMap.K,JsLinkedHashMap.V],indirect,needsArgs*/
-/*kernel.class: global#double:explicit=[double]*/
/*omit.class: global#double:explicit=[double]*/
/*strong.class: global#double:explicit=[double],implicit=[double]*/
@@ -27,7 +23,6 @@
set is Set<String>;
}
-/*kernel.class: Class:needsArgs*/
/*omit.class: Class:needsArgs*/
/*strong.class: Class:implicit=[Class.S,Class.T],indirect,needsArgs*/
class Class<T, S> {
diff --git a/tests/compiler/dart2js/rti/data/method_signatures.dart b/tests/compiler/dart2js/rti/data/method_signatures.dart
index b76455a..83bca5c 100644
--- a/tests/compiler/dart2js/rti/data/method_signatures.dart
+++ b/tests/compiler/dart2js/rti/data/method_signatures.dart
@@ -15,11 +15,9 @@
Object method3(num n) => null;
}
-/*kernel.class: Class2:needsArgs*/
/*strong.class: Class2:direct,explicit=[Class2.T],needsArgs*/
/*omit.class: Class2:*/
class Class2<T> {
- /*kernel.element: Class2.method4:needsSignature*/
/*strong.element: Class2.method4:*/
/*omit.element: Class2.method4:*/
num method4(T n) => null;
@@ -31,7 +29,6 @@
T method5(num n) => null;
}
-/*kernel.class: Class4:*/
/*omit.class: Class4:*/
/*strong.class: Class4:direct,explicit=[Class4.T],needsArgs*/
class Class4<T> {
diff --git a/tests/compiler/dart2js/rti/data/runtime_type_closure_equals1.dart b/tests/compiler/dart2js/rti/data/runtime_type_closure_equals1.dart
index 3fb3610..69a3f14 100644
--- a/tests/compiler/dart2js/rti/data/runtime_type_closure_equals1.dart
+++ b/tests/compiler/dart2js/rti/data/runtime_type_closure_equals1.dart
@@ -4,17 +4,14 @@
import 'package:expect/expect.dart';
-/*kernel.class: Class:needsArgs*/
/*strong.class: Class:*/
/*omit.class: Class:*/
class Class<T> {
- /*kernel.element: Class.:needsSignature*/
/*strong.element: Class.:*/
/*omit.element: Class.:*/
Class();
}
-/*kernel.element: main:needsSignature*/
/*strong.element: main:*/
/*omit.element: main:*/
main() {
diff --git a/tests/compiler/dart2js/rti/data/runtime_type_closure_equals2.dart b/tests/compiler/dart2js/rti/data/runtime_type_closure_equals2.dart
index a573e8b..2757f5a 100644
--- a/tests/compiler/dart2js/rti/data/runtime_type_closure_equals2.dart
+++ b/tests/compiler/dart2js/rti/data/runtime_type_closure_equals2.dart
@@ -4,31 +4,25 @@
import 'package:expect/expect.dart';
-/*kernel.class: Class:needsArgs*/
/*strong.class: Class:*/
/*omit.class: Class:*/
class Class<T> {
- /*kernel.element: Class.:needsSignature*/
/*strong.element: Class.:*/
/*omit.element: Class.:*/
Class();
}
-/*kernel.element: main:needsSignature*/
/*strong.element: main:*/
/*omit.element: main:*/
main() {
- /*kernel.needsSignature*/
/*strong.needsArgs,needsSignature*/
/*omit.needsArgs,needsSignature*/
T local1a<T>() => null;
- /*kernel.needsSignature*/
/*strong.needsArgs,needsSignature*/
/*omit.needsArgs,needsSignature*/
T local1b<T>() => null;
- /*kernel.needsSignature*/
/*strong.direct,explicit=[local2.T],needsArgs,needsSignature*/
/*omit.needsArgs,needsSignature*/
T local2<T>(T t, String s) => t;
diff --git a/tests/compiler/dart2js/rti/data/runtime_type_closure_equals3.dart b/tests/compiler/dart2js/rti/data/runtime_type_closure_equals3.dart
index c32e678..d650fb6 100644
--- a/tests/compiler/dart2js/rti/data/runtime_type_closure_equals3.dart
+++ b/tests/compiler/dart2js/rti/data/runtime_type_closure_equals3.dart
@@ -6,16 +6,13 @@
String method() => null;
-/*kernel.class: Class1:needsArgs*/
/*omit.class: Class1:needsArgs*/
/*strong.class: Class1:direct,explicit=[Class1.T],needsArgs*/
class Class1<T> {
- /*kernel.element: Class1.:needsSignature*/
/*strong.element: Class1.:*/
/*omit.element: Class1.:*/
Class1();
- /*kernel.element: Class1.method:needsSignature*/
/*strong.element: Class1.method:*/
/*omit.element: Class1.method:*/
method() {
@@ -34,17 +31,14 @@
}
}
-/*kernel.class: Class2:needsArgs*/
/*strong.class: Class2:*/
/*omit.class: Class2:*/
class Class2<T> {
- /*kernel.element: Class2.:needsSignature*/
/*strong.element: Class2.:*/
/*omit.element: Class2.:*/
Class2();
}
-/*kernel.element: main:needsSignature*/
/*strong.element: main:*/
/*omit.element: main:*/
main() {
diff --git a/tests/compiler/dart2js/rti/data/runtime_type_closure_equals4.dart b/tests/compiler/dart2js/rti/data/runtime_type_closure_equals4.dart
index 91267c0..33973ff 100644
--- a/tests/compiler/dart2js/rti/data/runtime_type_closure_equals4.dart
+++ b/tests/compiler/dart2js/rti/data/runtime_type_closure_equals4.dart
@@ -4,11 +4,9 @@
import 'package:expect/expect.dart';
-/*kernel.class: Class1:needsArgs*/
/*strong.class: Class1:*/
/*omit.class: Class1:*/
class Class1<T> {
- /*kernel.element: Class1.:needsSignature*/
/*strong.element: Class1.:*/
/*omit.element: Class1.:*/
Class1();
@@ -16,33 +14,28 @@
// TODO(johnniwinther): Currently only methods that use class type variables
// in their signature are marked as 'needs signature'. Change this to mark
// all methods that need to support access to their function type at runtime.
- /*kernel.element: Class1.method1a:needsSignature*/
+
/*strong.element: Class1.method1a:*/
/*omit.element: Class1.method1a:*/
method1a() => null;
- /*kernel.element: Class1.method1b:needsSignature*/
/*strong.element: Class1.method1b:*/
/*omit.element: Class1.method1b:*/
method1b() => null;
- /*kernel.element: Class1.method2:needsSignature*/
/*strong.element: Class1.method2:*/
/*omit.element: Class1.method2:*/
method2(t, s) => t;
}
-/*kernel.class: Class2:needsArgs*/
/*strong.class: Class2:*/
/*omit.class: Class2:*/
class Class2<T> {
- /*kernel.element: Class2.:needsSignature*/
/*strong.element: Class2.:*/
/*omit.element: Class2.:*/
Class2();
}
-/*kernel.element: main:needsSignature*/
/*strong.element: main:*/
/*omit.element: main:*/
main() {
diff --git a/tests/compiler/dart2js/rti/data/runtime_type_closure_equals5.dart b/tests/compiler/dart2js/rti/data/runtime_type_closure_equals5.dart
index e2aa421..82ed29c 100644
--- a/tests/compiler/dart2js/rti/data/runtime_type_closure_equals5.dart
+++ b/tests/compiler/dart2js/rti/data/runtime_type_closure_equals5.dart
@@ -4,42 +4,34 @@
import 'package:expect/expect.dart';
-/*kernel.class: Class1:needsArgs*/
/*omit.class: Class1:needsArgs*/
/*strong.class: Class1:direct,explicit=[Class1.T],needsArgs*/
class Class1<T> {
- /*kernel.element: Class1.:needsSignature*/
/*strong.element: Class1.:*/
/*omit.element: Class1.:*/
Class1();
- /*kernel.element: Class1.method1a:needsSignature*/
/*strong.element: Class1.method1a:needsSignature*/
/*omit.element: Class1.method1a:needsSignature*/
T method1a() => null;
- /*kernel.element: Class1.method1b:needsSignature*/
/*strong.element: Class1.method1b:needsSignature*/
/*omit.element: Class1.method1b:needsSignature*/
T method1b() => null;
- /*kernel.element: Class1.method2:needsSignature*/
/*strong.element: Class1.method2:needsSignature*/
/*omit.element: Class1.method2:needsSignature*/
T method2(T t, String s) => t;
}
-/*kernel.class: Class2:needsArgs*/
/*strong.class: Class2:*/
/*omit.class: Class2:*/
class Class2<T> {
- /*kernel.element: Class2.:needsSignature*/
/*strong.element: Class2.:*/
/*omit.element: Class2.:*/
Class2();
}
-/*kernel.element: main:needsSignature*/
/*strong.element: main:*/
/*omit.element: main:*/
main() {
diff --git a/tests/compiler/dart2js/rti/data/runtime_type_closure_equals6.dart b/tests/compiler/dart2js/rti/data/runtime_type_closure_equals6.dart
index af2cce5..219ee28 100644
--- a/tests/compiler/dart2js/rti/data/runtime_type_closure_equals6.dart
+++ b/tests/compiler/dart2js/rti/data/runtime_type_closure_equals6.dart
@@ -4,32 +4,26 @@
import 'package:expect/expect.dart';
-/*kernel.element: method1a:needsSignature*/
/*strong.element: method1a:*/
/*omit.element: method1a:*/
method1a() => null;
-/*kernel.element: method1b:needsSignature*/
/*strong.element: method1b:*/
/*omit.element: method1b:*/
method1b() => null;
-/*kernel.element: method2:needsSignature*/
/*strong.element: method2:*/
/*omit.element: method2:*/
method2(t, s) => t;
-/*kernel.class: Class:needsArgs*/
/*strong.class: Class:*/
/*omit.class: Class:*/
class Class<T> {
- /*kernel.element: Class.:needsSignature*/
/*strong.element: Class.:*/
/*omit.element: Class.:*/
Class();
}
-/*kernel.element: main:needsSignature*/
/*strong.element: main:*/
/*omit.element: main:*/
main() {
diff --git a/tests/compiler/dart2js/rti/data/runtime_type_closure_equals7.dart b/tests/compiler/dart2js/rti/data/runtime_type_closure_equals7.dart
index 23d1a3b..4d501bb 100644
--- a/tests/compiler/dart2js/rti/data/runtime_type_closure_equals7.dart
+++ b/tests/compiler/dart2js/rti/data/runtime_type_closure_equals7.dart
@@ -4,32 +4,26 @@
import 'package:expect/expect.dart';
-/*kernel.element: method1a:needsSignature*/
/*strong.element: method1a:needsArgs*/
/*omit.element: method1a:needsArgs*/
T method1a<T>() => null;
-/*kernel.element: method1b:needsSignature*/
/*strong.element: method1b:needsArgs*/
/*omit.element: method1b:needsArgs*/
T method1b<T>() => null;
-/*kernel.element: method2:needsSignature*/
/*strong.element: method2:direct,explicit=[method2.T],needsArgs*/
/*omit.element: method2:needsArgs*/
T method2<T>(T t, String s) => t;
-/*kernel.class: Class:needsArgs*/
/*strong.class: Class:*/
/*omit.class: Class:*/
class Class<T> {
- /*kernel.element: Class.:needsSignature*/
/*strong.element: Class.:*/
/*omit.element: Class.:*/
Class();
}
-/*kernel.element: main:needsSignature*/
/*strong.element: main:*/
/*omit.element: main:*/
main() {
diff --git a/tests/compiler/dart2js/rti/data/runtime_type_closure_equals8.dart b/tests/compiler/dart2js/rti/data/runtime_type_closure_equals8.dart
index 4f871d6..2735441 100644
--- a/tests/compiler/dart2js/rti/data/runtime_type_closure_equals8.dart
+++ b/tests/compiler/dart2js/rti/data/runtime_type_closure_equals8.dart
@@ -4,42 +4,34 @@
import 'package:expect/expect.dart';
-/*kernel.class: Class1:needsArgs*/
/*strong.class: Class1:*/
/*omit.class: Class1:*/
class Class1<S> {
- /*kernel.element: Class1.:needsSignature*/
/*strong.element: Class1.:*/
/*omit.element: Class1.:*/
Class1();
- /*kernel.element: Class1.method1a:needsSignature*/
/*strong.element: Class1.method1a:needsArgs*/
/*omit.element: Class1.method1a:needsArgs*/
T method1a<T>() => null;
- /*kernel.element: Class1.method1b:needsSignature*/
/*strong.element: Class1.method1b:needsArgs*/
/*omit.element: Class1.method1b:needsArgs*/
T method1b<T>() => null;
- /*kernel.element: Class1.method2:needsSignature*/
/*strong.element: Class1.method2:direct,explicit=[method2.T],needsArgs*/
/*omit.element: Class1.method2:needsArgs*/
T method2<T>(T t, String s) => t;
}
-/*kernel.class: Class2:needsArgs*/
/*strong.class: Class2:*/
/*omit.class: Class2:*/
class Class2<T> {
- /*kernel.element: Class2.:needsSignature*/
/*strong.element: Class2.:*/
/*omit.element: Class2.:*/
Class2();
}
-/*kernel.element: main:needsSignature*/
/*strong.element: main:*/
/*omit.element: main:*/
main() {
diff --git a/tests/compiler/dart2js/rti/data/runtime_type_closure_to_string1.dart b/tests/compiler/dart2js/rti/data/runtime_type_closure_to_string1.dart
index 4eb0481..53f3285 100644
--- a/tests/compiler/dart2js/rti/data/runtime_type_closure_to_string1.dart
+++ b/tests/compiler/dart2js/rti/data/runtime_type_closure_to_string1.dart
@@ -2,26 +2,21 @@
// 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.
-/*kernel.class: Class:needsArgs*/
/*strong.class: Class:*/
/*omit.class: Class:*/
class Class<T> {
- /*kernel.element: Class.:needsSignature*/
/*strong.element: Class.:*/
/*omit.element: Class.:*/
Class();
}
-/*kernel.element: main:needsSignature*/
/*strong.element: main:*/
/*omit.element: main:*/
main() {
- /*kernel.needsSignature*/
/*strong.needsSignature*/
/*omit.*/
local1() {}
- /*kernel.needsSignature*/
/*strong.needsSignature*/
/*omit.*/
local2(int i, String s) => i;
diff --git a/tests/compiler/dart2js/rti/data/runtime_type_closure_to_string2.dart b/tests/compiler/dart2js/rti/data/runtime_type_closure_to_string2.dart
index c2d9ef4..209cf08 100644
--- a/tests/compiler/dart2js/rti/data/runtime_type_closure_to_string2.dart
+++ b/tests/compiler/dart2js/rti/data/runtime_type_closure_to_string2.dart
@@ -2,26 +2,21 @@
// 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.
-/*kernel.class: Class:needsArgs*/
/*strong.class: Class:*/
/*omit.class: Class:*/
class Class<T> {
- /*kernel.element: Class.:needsSignature*/
/*strong.element: Class.:*/
/*omit.element: Class.:*/
Class();
}
-/*kernel.element: main:needsSignature*/
/*strong.element: main:*/
/*omit.element: main:*/
main() {
- /*kernel.needsSignature*/
/*strong.needsArgs,needsSignature*/
/*omit.*/
local1<T>() {}
- /*kernel.needsSignature*/
/*strong.needsArgs,needsSignature,selectors=[Selector(call, call, arity=2, types=1)]*/
/*omit.*/
local2<T>(t, s) => t;
diff --git a/tests/compiler/dart2js/rti/data/runtime_type_closure_to_string3.dart b/tests/compiler/dart2js/rti/data/runtime_type_closure_to_string3.dart
index fbc1805..0496521 100644
--- a/tests/compiler/dart2js/rti/data/runtime_type_closure_to_string3.dart
+++ b/tests/compiler/dart2js/rti/data/runtime_type_closure_to_string3.dart
@@ -2,32 +2,26 @@
// 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.
-/*kernel.class: Class1:needsArgs*/
/*strong.class: Class1:needsArgs*/
/*omit.class: Class1:*/
class Class1<T> {
- /*kernel.element: Class1.:needsSignature*/
/*strong.element: Class1.:*/
/*omit.element: Class1.:*/
Class1();
- /*kernel.element: Class1.method:needsSignature*/
/*strong.element: Class1.method:needsSignature*/
/*omit.element: Class1.method:*/
T method() => null;
}
-/*kernel.class: Class2:needsArgs*/
/*strong.class: Class2:*/
/*omit.class: Class2:*/
class Class2<T> {
- /*kernel.element: Class2.:needsSignature*/
/*strong.element: Class2.:*/
/*omit.element: Class2.:*/
Class2();
}
-/*kernel.element: main:needsSignature*/
/*strong.element: main:*/
/*omit.element: main:*/
main() {
diff --git a/tests/compiler/dart2js/rti/data/runtime_type_closure_to_string4.dart b/tests/compiler/dart2js/rti/data/runtime_type_closure_to_string4.dart
index 72d9834..318d8e8 100644
--- a/tests/compiler/dart2js/rti/data/runtime_type_closure_to_string4.dart
+++ b/tests/compiler/dart2js/rti/data/runtime_type_closure_to_string4.dart
@@ -4,28 +4,23 @@
/*class: Class1:*/
class Class1 {
- /*kernel.element: Class1.:needsSignature*/
/*strong.element: Class1.:*/
/*omit.element: Class1.:*/
Class1();
- /*kernel.element: Class1.method:needsSignature*/
/*strong.element: Class1.method:needsArgs*/
/*omit.element: Class1.method:*/
T method<T>() => null;
}
-/*kernel.class: Class2:needsArgs*/
/*strong.class: Class2:*/
/*omit.class: Class2:*/
class Class2<T> {
- /*kernel.element: Class2.:needsSignature*/
/*strong.element: Class2.:*/
/*omit.element: Class2.:*/
Class2();
}
-/*kernel.element: main:needsSignature*/
/*strong.element: main:*/
/*omit.element: main:*/
main() {
diff --git a/tests/compiler/dart2js/rti/data/runtime_type_closure_to_string5.dart b/tests/compiler/dart2js/rti/data/runtime_type_closure_to_string5.dart
index 86081c3..810ca7a 100644
--- a/tests/compiler/dart2js/rti/data/runtime_type_closure_to_string5.dart
+++ b/tests/compiler/dart2js/rti/data/runtime_type_closure_to_string5.dart
@@ -2,27 +2,22 @@
// 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.
-/*kernel.class: Class:needsArgs*/
/*strong.class: Class:*/
/*omit.class: Class:*/
class Class<T> {
- /*kernel.element: Class.:needsSignature*/
/*strong.element: Class.:*/
/*omit.element: Class.:*/
Class();
}
-/*kernel.element: method1:needsSignature*/
/*strong.element: method1:*/
/*omit.element: method1:*/
method1() {}
-/*kernel.element: method2:needsSignature*/
/*strong.element: method2:*/
/*omit.element: method2:*/
method2(int i, String s) => i;
-/*kernel.element: main:needsSignature*/
/*strong.element: main:*/
/*omit.element: main:*/
main() {
diff --git a/tests/compiler/dart2js/rti/data/runtime_type_closure_to_string6.dart b/tests/compiler/dart2js/rti/data/runtime_type_closure_to_string6.dart
index f64f35f..1fcaa30 100644
--- a/tests/compiler/dart2js/rti/data/runtime_type_closure_to_string6.dart
+++ b/tests/compiler/dart2js/rti/data/runtime_type_closure_to_string6.dart
@@ -2,27 +2,22 @@
// 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.
-/*kernel.class: Class:needsArgs*/
/*strong.class: Class:*/
/*omit.class: Class:*/
class Class<T> {
- /*kernel.element: Class.:needsSignature*/
/*strong.element: Class.:*/
/*omit.element: Class.:*/
Class();
}
-/*kernel.element: method1:needsSignature*/
/*strong.element: method1:needsArgs*/
/*omit.element: method1:*/
method1<T>() {}
-/*kernel.element: method2:needsSignature*/
/*strong.element: method2:needsArgs*/
/*omit.element: method2:*/
method2<T>(t, s) => t;
-/*kernel.element: main:needsSignature*/
/*strong.element: main:*/
/*omit.element: main:*/
main() {
diff --git a/tests/compiler/dart2js/rti/data/runtime_type_equals1.dart b/tests/compiler/dart2js/rti/data/runtime_type_equals1.dart
index 3c7aed7..0f6cce7 100644
--- a/tests/compiler/dart2js/rti/data/runtime_type_equals1.dart
+++ b/tests/compiler/dart2js/rti/data/runtime_type_equals1.dart
@@ -6,12 +6,10 @@
/*class: Class1a:needsArgs*/
class Class1a<T> {
- /*kernel.element: Class1a.:needsSignature*/
/*strong.element: Class1a.:*/
/*omit.element: Class1a.:*/
Class1a();
- /*kernel.element: Class1a.==:needsSignature*/
/*strong.element: Class1a.==:*/
/*omit.element: Class1a.==:*/
bool operator ==(other) {
@@ -22,7 +20,6 @@
/*class: Class1b:needsArgs*/
class Class1b<T> extends Class1a<T> {
- /*kernel.element: Class1b.:needsSignature*/
/*strong.element: Class1b.:*/
/*omit.element: Class1b.:*/
Class1b();
@@ -32,23 +29,19 @@
// this class.
/*class: Class1c:needsArgs*/
class Class1c<T> implements Class1a<T> {
- /*kernel.element: Class1c.:needsSignature*/
/*strong.element: Class1c.:*/
/*omit.element: Class1c.:*/
Class1c();
}
-/*kernel.class: Class2:needsArgs*/
/*strong.class: Class2:*/
/*omit.class: Class2:*/
class Class2<T> {
- /*kernel.element: Class2.:needsSignature*/
/*strong.element: Class2.:*/
/*omit.element: Class2.:*/
Class2();
}
-/*kernel.element: main:needsSignature*/
/*strong.element: main:*/
/*omit.element: main:*/
main() {
diff --git a/tests/compiler/dart2js/rti/data/runtime_type_equals2.dart b/tests/compiler/dart2js/rti/data/runtime_type_equals2.dart
index 72fb155..eb04620 100644
--- a/tests/compiler/dart2js/rti/data/runtime_type_equals2.dart
+++ b/tests/compiler/dart2js/rti/data/runtime_type_equals2.dart
@@ -6,12 +6,10 @@
/*class: Class1a:needsArgs*/
class Class1a<T> {
- /*kernel.element: Class1a.:needsSignature*/
/*strong.element: Class1a.:*/
/*omit.element: Class1a.:*/
Class1a();
- /*kernel.element: Class1a.==:needsSignature*/
/*strong.element: Class1a.==:*/
/*omit.element: Class1a.==:*/
bool operator ==(other) {
@@ -22,7 +20,6 @@
/*class: Class1b:needsArgs*/
class Class1b<T> extends Class1a<T> {
- /*kernel.element: Class1b.:needsSignature*/
/*strong.element: Class1b.:*/
/*omit.element: Class1b.:*/
Class1b();
@@ -32,23 +29,19 @@
// this class.
/*class: Class1c:needsArgs*/
class Class1c<T> implements Class1a<T> {
- /*kernel.element: Class1c.:needsSignature*/
/*strong.element: Class1c.:*/
/*omit.element: Class1c.:*/
Class1c();
}
-/*kernel.class: Class2:needsArgs*/
/*strong.class: Class2:*/
/*omit.class: Class2:*/
class Class2<T> {
- /*kernel.element: Class2.:needsSignature*/
/*strong.element: Class2.:*/
/*omit.element: Class2.:*/
Class2();
}
-/*kernel.element: main:needsSignature*/
/*strong.element: main:*/
/*omit.element: main:*/
main() {
diff --git a/tests/compiler/dart2js/rti/data/runtime_type_equals3.dart b/tests/compiler/dart2js/rti/data/runtime_type_equals3.dart
index 4994e58..e83b5cf 100644
--- a/tests/compiler/dart2js/rti/data/runtime_type_equals3.dart
+++ b/tests/compiler/dart2js/rti/data/runtime_type_equals3.dart
@@ -6,12 +6,10 @@
/*class: Class1a:needsArgs*/
class Class1a<T> {
- /*kernel.element: Class1a.:needsSignature*/
/*strong.element: Class1a.:*/
/*omit.element: Class1a.:*/
Class1a();
- /*kernel.element: Class1a.==:needsSignature*/
/*strong.element: Class1a.==:*/
/*omit.element: Class1a.==:*/
bool operator ==(other) {
@@ -22,7 +20,6 @@
/*class: Class1b:needsArgs*/
class Class1b<T> extends Class1a<T> {
- /*kernel.element: Class1b.:needsSignature*/
/*strong.element: Class1b.:*/
/*omit.element: Class1b.:*/
Class1b();
@@ -32,23 +29,19 @@
// this class.
/*class: Class1c:needsArgs*/
class Class1c<T> implements Class1a<T> {
- /*kernel.element: Class1c.:needsSignature*/
/*strong.element: Class1c.:*/
/*omit.element: Class1c.:*/
Class1c();
}
-/*kernel.class: Class2:needsArgs*/
/*strong.class: Class2:*/
/*omit.class: Class2:*/
class Class2<T> {
- /*kernel.element: Class2.:needsSignature*/
/*strong.element: Class2.:*/
/*omit.element: Class2.:*/
Class2();
}
-/*kernel.element: main:needsSignature*/
/*strong.element: main:*/
/*omit.element: main:*/
main() {
diff --git a/tests/compiler/dart2js/rti/data/runtime_type_equals4.dart b/tests/compiler/dart2js/rti/data/runtime_type_equals4.dart
index 3eb953a..f3f3b67 100644
--- a/tests/compiler/dart2js/rti/data/runtime_type_equals4.dart
+++ b/tests/compiler/dart2js/rti/data/runtime_type_equals4.dart
@@ -6,12 +6,10 @@
/*class: Class1a:needsArgs*/
class Class1a<T> {
- /*kernel.element: Class1a.:needsSignature*/
/*strong.element: Class1a.:*/
/*omit.element: Class1a.:*/
Class1a();
- /*kernel.element: Class1a.==:needsSignature*/
/*strong.element: Class1a.==:*/
/*omit.element: Class1a.==:*/
bool operator ==(other) {
@@ -22,7 +20,6 @@
/*class: Class1b:needsArgs*/
class Class1b<T> extends Class1a<T> {
- /*kernel.element: Class1b.:needsSignature*/
/*strong.element: Class1b.:*/
/*omit.element: Class1b.:*/
Class1b();
@@ -32,23 +29,19 @@
// this class.
/*class: Class1c:needsArgs*/
class Class1c<T> implements Class1a<T> {
- /*kernel.element: Class1c.:needsSignature*/
/*strong.element: Class1c.:*/
/*omit.element: Class1c.:*/
Class1c();
}
-/*kernel.class: Class2:needsArgs*/
/*strong.class: Class2:*/
/*omit.class: Class2:*/
class Class2<T> {
- /*kernel.element: Class2.:needsSignature*/
/*strong.element: Class2.:*/
/*omit.element: Class2.:*/
Class2();
}
-/*kernel.element: main:needsSignature*/
/*strong.element: main:*/
/*omit.element: main:*/
main() {
diff --git a/tests/compiler/dart2js/rti/data/runtime_type_equals5.dart b/tests/compiler/dart2js/rti/data/runtime_type_equals5.dart
index d93f282..56285d2 100644
--- a/tests/compiler/dart2js/rti/data/runtime_type_equals5.dart
+++ b/tests/compiler/dart2js/rti/data/runtime_type_equals5.dart
@@ -6,42 +6,33 @@
/*strong.class: Class1a:explicit=[Class1a]*/
class Class1a {
- /*kernel.element: Class1a.:needsSignature*/
Class1a();
}
-/*kernel.class: Class1b:needsArgs*/
/*strong.class: Class1b:needsArgs*/
/*omit.class: Class1b:needsArgs*/
class Class1b<T> extends Class1a {
- /*kernel.element: Class1b.:needsSignature*/
Class1b();
}
-/*kernel.class: Class1c:needsArgs*/
/*strong.class: Class1c:needsArgs*/
/*omit.class: Class1c:needsArgs*/
class Class1c<T> extends Class1a {
- /*kernel.element: Class1c.:needsSignature*/
Class1c();
}
-/*kernel.class: Class2:needsArgs*/
/*strong.class: Class2:*/
/*omit.class: Class2:*/
class Class2<T> {
- /*kernel.element: Class2.:needsSignature*/
Class2();
}
-/*kernel.element: test:needsSignature*/
/*strong.element: test:*/
/*omit.element: test:*/
test(Class1a c, Type type) {
return c.runtimeType == type;
}
-/*kernel.element: main:needsSignature*/
/*strong.element: main:*/
/*omit.element: main:*/
main() {
diff --git a/tests/compiler/dart2js/rti/data/runtime_type_equals6.dart b/tests/compiler/dart2js/rti/data/runtime_type_equals6.dart
index 36cb66d..2aff7c1 100644
--- a/tests/compiler/dart2js/rti/data/runtime_type_equals6.dart
+++ b/tests/compiler/dart2js/rti/data/runtime_type_equals6.dart
@@ -4,46 +4,36 @@
import 'package:expect/expect.dart';
-/*kernel.class: Class1a:needsArgs*/
/*strong.class: Class1a:explicit=[Class1a],needsArgs*/
/*omit.class: Class1a:needsArgs*/
class Class1a<T> {
- /*kernel.element: Class1a.:needsSignature*/
Class1a();
}
-/*kernel.class: Class1b:needsArgs*/
/*strong.class: Class1b:needsArgs*/
/*omit.class: Class1b:needsArgs*/
class Class1b<T> extends Class1a<T> {
- /*kernel.element: Class1b.:needsSignature*/
Class1b();
}
-/*kernel.class: Class1c:needsArgs*/
/*strong.class: Class1c:needsArgs*/
/*omit.class: Class1c:needsArgs*/
class Class1c<T> extends Class1a<T> {
- /*kernel.element: Class1c.:needsSignature*/
Class1c();
}
-/*kernel.class: Class2:needsArgs*/
/*strong.class: Class2:*/
/*omit.class: Class2:*/
class Class2<T> {
- /*kernel.element: Class2.:needsSignature*/
Class2();
}
-/*kernel.element: test:needsSignature*/
/*strong.element: test:*/
/*omit.element: test:*/
test(Class1a c, Type type) {
return c.runtimeType == type;
}
-/*kernel.element: main:needsSignature*/
/*strong.element: main:*/
/*omit.element: main:*/
main() {
diff --git a/tests/compiler/dart2js/rti/data/runtime_type_equals7.dart b/tests/compiler/dart2js/rti/data/runtime_type_equals7.dart
index 5cf6134..a1748f4 100644
--- a/tests/compiler/dart2js/rti/data/runtime_type_equals7.dart
+++ b/tests/compiler/dart2js/rti/data/runtime_type_equals7.dart
@@ -6,52 +6,41 @@
/*strong.class: Class1a:explicit=[Class1a]*/
class Class1a {
- /*kernel.element: Class1a.:needsSignature*/
Class1a();
}
-/*kernel.class: Class1b:needsArgs*/
/*strong.class: Class1b:needsArgs*/
/*omit.class: Class1b:needsArgs*/
class Class1b<T> extends Class1a {
- /*kernel.element: Class1b.:needsSignature*/
Class1b();
}
-/*kernel.class: Class1c:needsArgs*/
/*strong.class: Class1c:needsArgs*/
/*omit.class: Class1c:needsArgs*/
class Class1c<T> extends Class1a {
- /*kernel.element: Class1c.:needsSignature*/
Class1c();
}
-/*kernel.class: Class2:needsArgs*/
/*strong.class: Class2:*/
/*omit.class: Class2:*/
class Class2<T> {
- /*kernel.element: Class2.:needsSignature*/
Class2();
}
-/*kernel.class: Class3:needsArgs*/
/*strong.class: Class3:explicit=[Class3]*/
/*omit.class: Class3:*/
class Class3<T> {
final Class1a field;
- /*kernel.element: Class3.:needsSignature*/
Class3(this.field);
}
-/*kernel.element: test:needsSignature*/
/*strong.element: test:*/
/*omit.element: test:*/
test(Class3 c, Type type) {
return c.field.runtimeType == type;
}
-/*kernel.element: main:needsSignature*/
/*strong.element: main:*/
/*omit.element: main:*/
main() {
diff --git a/tests/compiler/dart2js/rti/data/runtime_type_to_string1.dart b/tests/compiler/dart2js/rti/data/runtime_type_to_string1.dart
index 5275254..ae67754 100644
--- a/tests/compiler/dart2js/rti/data/runtime_type_to_string1.dart
+++ b/tests/compiler/dart2js/rti/data/runtime_type_to_string1.dart
@@ -2,37 +2,30 @@
// 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.
-/*kernel.class: Class1:*/
/*strong.class: Class1:*/
/*omit.class: Class1:*/
class Class1 {
- /*kernel.element: Class1.:needsSignature*/
/*strong.element: Class1.:*/
/*omit.element: Class1.:*/
Class1();
}
-/*kernel.class: Class2:needsArgs*/
/*strong.class: Class2:*/
/*omit.class: Class2:*/
class Class2<T> {
- /*kernel.element: Class2.:needsSignature*/
/*strong.element: Class2.:*/
/*omit.element: Class2.:*/
Class2();
}
-/*kernel.class: Class3:needsArgs*/
/*strong.class: Class3:needsArgs*/
/*omit.class: Class3:*/
class Class3<T> implements Class1 {
- /*kernel.element: Class3.:needsSignature*/
/*strong.element: Class3.:*/
/*omit.element: Class3.:*/
Class3();
}
-/*kernel.element: main:needsSignature*/
/*strong.element: main:*/
/*omit.element: main:*/
main() {
diff --git a/tests/compiler/dart2js/rti/data/runtime_type_to_string2.dart b/tests/compiler/dart2js/rti/data/runtime_type_to_string2.dart
index 6124657..3c36e34 100644
--- a/tests/compiler/dart2js/rti/data/runtime_type_to_string2.dart
+++ b/tests/compiler/dart2js/rti/data/runtime_type_to_string2.dart
@@ -2,27 +2,22 @@
// 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.
-/*kernel.class: Class1:needsArgs*/
/*strong.class: Class1:needsArgs*/
/*omit.class: Class1:*/
class Class1<T> {
- /*kernel.element: Class1.:needsSignature*/
/*strong.element: Class1.:*/
/*omit.element: Class1.:*/
Class1();
}
-/*kernel.class: Class2:needsArgs*/
/*strong.class: Class2:*/
/*omit.class: Class2:*/
class Class2<T> {
- /*kernel.element: Class2.:needsSignature*/
/*strong.element: Class2.:*/
/*omit.element: Class2.:*/
Class2();
}
-/*kernel.element: main:needsSignature*/
/*strong.element: main:*/
/*omit.element: main:*/
main() {
diff --git a/tests/compiler/dart2js/rti/data/runtime_type_to_string3.dart b/tests/compiler/dart2js/rti/data/runtime_type_to_string3.dart
index fdff124..91058ce 100644
--- a/tests/compiler/dart2js/rti/data/runtime_type_to_string3.dart
+++ b/tests/compiler/dart2js/rti/data/runtime_type_to_string3.dart
@@ -2,27 +2,22 @@
// 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.
-/*kernel.class: Class1:needsArgs*/
/*strong.class: Class1:needsArgs*/
/*omit.class: Class1:*/
class Class1<T> {
- /*kernel.element: Class1.:needsSignature*/
/*strong.element: Class1.:*/
/*omit.element: Class1.:*/
Class1();
}
-/*kernel.class: Class2:needsArgs*/
/*strong.class: Class2:*/
/*omit.class: Class2:*/
class Class2<T> {
- /*kernel.element: Class2.:needsSignature*/
/*strong.element: Class2.:*/
/*omit.element: Class2.:*/
Class2();
}
-/*kernel.element: main:needsSignature*/
/*strong.element: main:*/
/*omit.element: main:*/
main() {
diff --git a/tests/compiler/dart2js/rti/data/runtime_type_to_string4.dart b/tests/compiler/dart2js/rti/data/runtime_type_to_string4.dart
index ba06a77..2b9902a 100644
--- a/tests/compiler/dart2js/rti/data/runtime_type_to_string4.dart
+++ b/tests/compiler/dart2js/rti/data/runtime_type_to_string4.dart
@@ -2,27 +2,22 @@
// 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.
-/*kernel.class: Class1:needsArgs*/
/*strong.class: Class1:needsArgs*/
/*omit.class: Class1:*/
class Class1<T> {
- /*kernel.element: Class1.:needsSignature*/
/*strong.element: Class1.:*/
/*omit.element: Class1.:*/
Class1();
}
-/*kernel.class: Class2:needsArgs*/
/*strong.class: Class2:*/
/*omit.class: Class2:*/
class Class2<T> {
- /*kernel.element: Class2.:needsSignature*/
/*strong.element: Class2.:*/
/*omit.element: Class2.:*/
Class2();
}
-/*kernel.element: main:needsSignature*/
/*strong.element: main:*/
/*omit.element: main:*/
main() {
diff --git a/tests/compiler/dart2js/rti/data/runtime_type_to_string5.dart b/tests/compiler/dart2js/rti/data/runtime_type_to_string5.dart
index 79f159b..22f8349 100644
--- a/tests/compiler/dart2js/rti/data/runtime_type_to_string5.dart
+++ b/tests/compiler/dart2js/rti/data/runtime_type_to_string5.dart
@@ -2,27 +2,22 @@
// 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.
-/*kernel.class: Class1:needsArgs*/
/*strong.class: Class1:needsArgs*/
/*omit.class: Class1:*/
class Class1<T> {
- /*kernel.element: Class1.:needsSignature*/
/*strong.element: Class1.:*/
/*omit.element: Class1.:*/
Class1();
}
-/*kernel.class: Class2:needsArgs*/
/*strong.class: Class2:*/
/*omit.class: Class2:*/
class Class2<T> {
- /*kernel.element: Class2.:needsSignature*/
/*strong.element: Class2.:*/
/*omit.element: Class2.:*/
Class2();
}
-/*kernel.element: main:needsSignature*/
/*strong.element: main:*/
/*omit.element: main:*/
main() {
diff --git a/tests/compiler/dart2js/rti/data/runtime_type_to_string6.dart b/tests/compiler/dart2js/rti/data/runtime_type_to_string6.dart
index 5d18fbe..fb64484 100644
--- a/tests/compiler/dart2js/rti/data/runtime_type_to_string6.dart
+++ b/tests/compiler/dart2js/rti/data/runtime_type_to_string6.dart
@@ -2,27 +2,22 @@
// 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.
-/*kernel.class: Class1:needsArgs*/
/*strong.class: Class1:needsArgs*/
/*omit.class: Class1:*/
class Class1<T> {
- /*kernel.element: Class1.:needsSignature*/
/*strong.element: Class1.:*/
/*omit.element: Class1.:*/
Class1();
}
-/*kernel.class: Class2:needsArgs*/
/*strong.class: Class2:needsArgs*/
/*omit.class: Class2:*/
class Class2<T> {
- /*kernel.element: Class2.:needsSignature*/
/*strong.element: Class2.:*/
/*omit.element: Class2.:*/
Class2();
}
-/*kernel.element: main:needsSignature*/
/*strong.element: main:*/
/*omit.element: main:*/
main() {
diff --git a/tests/compiler/dart2js/rti/data/runtime_type_to_string7.dart b/tests/compiler/dart2js/rti/data/runtime_type_to_string7.dart
index 5275254..ae67754 100644
--- a/tests/compiler/dart2js/rti/data/runtime_type_to_string7.dart
+++ b/tests/compiler/dart2js/rti/data/runtime_type_to_string7.dart
@@ -2,37 +2,30 @@
// 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.
-/*kernel.class: Class1:*/
/*strong.class: Class1:*/
/*omit.class: Class1:*/
class Class1 {
- /*kernel.element: Class1.:needsSignature*/
/*strong.element: Class1.:*/
/*omit.element: Class1.:*/
Class1();
}
-/*kernel.class: Class2:needsArgs*/
/*strong.class: Class2:*/
/*omit.class: Class2:*/
class Class2<T> {
- /*kernel.element: Class2.:needsSignature*/
/*strong.element: Class2.:*/
/*omit.element: Class2.:*/
Class2();
}
-/*kernel.class: Class3:needsArgs*/
/*strong.class: Class3:needsArgs*/
/*omit.class: Class3:*/
class Class3<T> implements Class1 {
- /*kernel.element: Class3.:needsSignature*/
/*strong.element: Class3.:*/
/*omit.element: Class3.:*/
Class3();
}
-/*kernel.element: main:needsSignature*/
/*strong.element: main:*/
/*omit.element: main:*/
main() {
diff --git a/tests/compiler/dart2js/rti/data/subtype_named_args.dart b/tests/compiler/dart2js/rti/data/subtype_named_args.dart
index f4fad6e3..5e6bbe2 100644
--- a/tests/compiler/dart2js/rti/data/subtype_named_args.dart
+++ b/tests/compiler/dart2js/rti/data/subtype_named_args.dart
@@ -6,23 +6,100 @@
import 'package:expect/expect.dart';
-/*class: A:explicit=[dynamic Function({a:A,b:B,c:C,d:D}),dynamic Function({f1:dynamic Function({a:A,b:B,c:C,d:D}),f2:dynamic Function({g:G<A,B,C,D>,l:List<List<B>>,m:Map<num,int>}),f3:dynamic Function({v:dynamic,x:dynamic,y:dynamic,z:dynamic})}),dynamic Function({g:G<A,B,C,D>,l:List<List<B>>,m:Map<num,int>})]*/
+/*strong.class: A:
+ explicit=[
+ A,G<A,A1,A1,A1>,
+ dynamic Function({a:A,b:A1,c:A1,d:A1}),
+ dynamic Function({a:A,b:B,c:C,d:D}),
+ dynamic Function({b:B,f:dynamic Function({f1:dynamic Function({a:A,b:B,c:C,d:D}),f2:dynamic Function({g:G<A,B,C,D>,l:List<List<B>>,m:Map<num,int>}),f3:dynamic Function({v:dynamic,x:dynamic,y:dynamic,z:dynamic})}),g:G<A,B,C,D>,x:dynamic}),
+ dynamic Function({f1:dynamic Function({a:A,b:B,c:C,d:D}),f2:dynamic Function({g:G<A,B,C,D>,l:List<List<B>>,m:Map<num,int>}),f3:dynamic Function({v:dynamic,x:dynamic,y:dynamic,z:dynamic})}),
+ dynamic Function({g:G<A,A1,A1,A1>,l:List<List<A1>>,m:Map<num,num>}),
+ dynamic Function({g:G<A,B,C,D>,l:List<List<B>>,m:Map<num,int>}),
+ dynamic Function({v:dynamic Function({a:A,b:B,c:C,d:D}),x:int,y:bool,z:List<Map>}),
+ dynamic Function({v:dynamic,x:A,y:G,z:dynamic Function({b:B,f:dynamic Function({f1:dynamic Function({a:A,b:B,c:C,d:D}),f2:dynamic Function({g:G<A,B,C,D>,l:List<List<B>>,m:Map<num,int>}),f3:dynamic Function({v:dynamic,x:dynamic,y:dynamic,z:dynamic})}),g:G<A,B,C,D>,x:dynamic})})]
+*/
+/*omit.class: A:
+ explicit=[
+ dynamic Function({a:A,b:B,c:C,d:D}),
+ dynamic Function({f1:dynamic Function({a:A,b:B,c:C,d:D}),f2:dynamic Function({g:G<A,B,C,D>,l:List<List<B>>,m:Map<num,int>}),f3:dynamic Function({v:dynamic,x:dynamic,y:dynamic,z:dynamic})}),
+ dynamic Function({g:G<A,B,C,D>,l:List<List<B>>,m:Map<num,int>})]
+*/
class A {}
+/*strong.class: A1:explicit=[A1,G<A,A1,A1,A1>,List<List<A1>>,dynamic Function({a:A,b:A1,c:A1,d:A1}),dynamic Function({g:G<A,A1,A1,A1>,l:List<List<A1>>,m:Map<num,num>})]*/
class A1 {}
+/*strong.class: A2:explicit=[A2]*/
class A2 {}
-/*class: B:explicit=[dynamic Function({a:A,b:B,c:C,d:D}),dynamic Function({f1:dynamic Function({a:A,b:B,c:C,d:D}),f2:dynamic Function({g:G<A,B,C,D>,l:List<List<B>>,m:Map<num,int>}),f3:dynamic Function({v:dynamic,x:dynamic,y:dynamic,z:dynamic})}),dynamic Function({g:G<A,B,C,D>,l:List<List<B>>,m:Map<num,int>})]*/
+/*strong.class: B:
+ explicit=[
+ B,
+ dynamic Function({a:A,b:B,c:C,d:D}),
+ dynamic Function({b:B,f:dynamic Function({f1:dynamic Function({a:A,b:B,c:C,d:D}),f2:dynamic Function({g:G<A,B,C,D>,l:List<List<B>>,m:Map<num,int>}),f3:dynamic Function({v:dynamic,x:dynamic,y:dynamic,z:dynamic})}),g:G<A,B,C,D>,x:dynamic}),
+ dynamic Function({f1:dynamic Function({a:A,b:B,c:C,d:D}),f2:dynamic Function({g:G<A,B,C,D>,l:List<List<B>>,m:Map<num,int>}),f3:dynamic Function({v:dynamic,x:dynamic,y:dynamic,z:dynamic})}),
+ dynamic Function({g:G<A,B,C,D>,l:List<List<B>>,m:Map<num,int>}),
+ dynamic Function({v:dynamic Function({a:A,b:B,c:C,d:D}),x:int,y:bool,z:List<Map>}),
+ dynamic Function({v:dynamic,x:A,y:G,z:dynamic Function({b:B,f:dynamic Function({f1:dynamic Function({a:A,b:B,c:C,d:D}),f2:dynamic Function({g:G<A,B,C,D>,l:List<List<B>>,m:Map<num,int>}),f3:dynamic Function({v:dynamic,x:dynamic,y:dynamic,z:dynamic})}),g:G<A,B,C,D>,x:dynamic})})]
+*/
+/*omit.class: B:
+ explicit=[
+ dynamic Function({a:A,b:B,c:C,d:D}),
+ dynamic Function({f1:dynamic Function({a:A,b:B,c:C,d:D}),f2:dynamic Function({g:G<A,B,C,D>,l:List<List<B>>,m:Map<num,int>}),f3:dynamic Function({v:dynamic,x:dynamic,y:dynamic,z:dynamic})}),
+ dynamic Function({g:G<A,B,C,D>,l:List<List<B>>,m:Map<num,int>})]
+*/
class B implements A, A1, A2 {}
-/*class: C:explicit=[dynamic Function({a:A,b:B,c:C,d:D}),dynamic Function({f1:dynamic Function({a:A,b:B,c:C,d:D}),f2:dynamic Function({g:G<A,B,C,D>,l:List<List<B>>,m:Map<num,int>}),f3:dynamic Function({v:dynamic,x:dynamic,y:dynamic,z:dynamic})}),dynamic Function({g:G<A,B,C,D>,l:List<List<B>>,m:Map<num,int>})]*/
+/*strong.class: C:
+ explicit=[
+ C,
+ dynamic Function({a:A,b:B,c:C,d:D}),
+ dynamic Function({b:B,f:dynamic Function({f1:dynamic Function({a:A,b:B,c:C,d:D}),f2:dynamic Function({g:G<A,B,C,D>,l:List<List<B>>,m:Map<num,int>}),f3:dynamic Function({v:dynamic,x:dynamic,y:dynamic,z:dynamic})}),g:G<A,B,C,D>,x:dynamic}),
+ dynamic Function({f1:dynamic Function({a:A,b:B,c:C,d:D}),f2:dynamic Function({g:G<A,B,C,D>,l:List<List<B>>,m:Map<num,int>}),f3:dynamic Function({v:dynamic,x:dynamic,y:dynamic,z:dynamic})}),
+ dynamic Function({g:G<A,B,C,D>,l:List<List<B>>,m:Map<num,int>}),dynamic Function({v:dynamic Function({a:A,b:B,c:C,d:D}),x:int,y:bool,z:List<Map>}),
+ dynamic Function({v:dynamic,x:A,y:G,z:dynamic Function({b:B,f:dynamic Function({f1:dynamic Function({a:A,b:B,c:C,d:D}),f2:dynamic Function({g:G<A,B,C,D>,l:List<List<B>>,m:Map<num,int>}),f3:dynamic Function({v:dynamic,x:dynamic,y:dynamic,z:dynamic})}),g:G<A,B,C,D>,x:dynamic})})]
+*/
+/*omit.class: C:
+ explicit=[
+ dynamic Function({a:A,b:B,c:C,d:D}),
+ dynamic Function({f1:dynamic Function({a:A,b:B,c:C,d:D}),f2:dynamic Function({g:G<A,B,C,D>,l:List<List<B>>,m:Map<num,int>}),f3:dynamic Function({v:dynamic,x:dynamic,y:dynamic,z:dynamic})}),
+ dynamic Function({g:G<A,B,C,D>,l:List<List<B>>,m:Map<num,int>})]
+*/
class C implements B {}
-/*class: D:explicit=[dynamic Function({a:A,b:B,c:C,d:D}),dynamic Function({f1:dynamic Function({a:A,b:B,c:C,d:D}),f2:dynamic Function({g:G<A,B,C,D>,l:List<List<B>>,m:Map<num,int>}),f3:dynamic Function({v:dynamic,x:dynamic,y:dynamic,z:dynamic})}),dynamic Function({g:G<A,B,C,D>,l:List<List<B>>,m:Map<num,int>})]*/
+/*strong.class: D:
+ explicit=[
+ D,G<D,D,D,D>,List<List<D>>,
+ dynamic Function({a:A,b:B,c:C,d:D}),
+ dynamic Function({a:D,b:D,c:D,d:D}),
+ dynamic Function({b:B,f:dynamic Function({f1:dynamic Function({a:A,b:B,c:C,d:D}),f2:dynamic Function({g:G<A,B,C,D>,l:List<List<B>>,m:Map<num,int>}),f3:dynamic Function({v:dynamic,x:dynamic,y:dynamic,z:dynamic})}),g:G<A,B,C,D>,x:dynamic}),
+ dynamic Function({f1:dynamic Function({a:A,b:B,c:C,d:D}),f2:dynamic Function({g:G<A,B,C,D>,l:List<List<B>>,m:Map<num,int>}),f3:dynamic Function({v:dynamic,x:dynamic,y:dynamic,z:dynamic})}),dynamic Function({g:G<A,B,C,D>,l:List<List<B>>,m:Map<num,int>}),dynamic Function({g:G<D,D,D,D>,l:List<List<D>>,m:Map<int,int>}),
+ dynamic Function({v:dynamic Function({a:A,b:B,c:C,d:D}),x:int,y:bool,z:List<Map>}),dynamic Function({v:dynamic,x:A,y:G,z:dynamic Function({b:B,f:dynamic Function({f1:dynamic Function({a:A,b:B,c:C,d:D}),f2:dynamic Function({g:G<A,B,C,D>,l:List<List<B>>,m:Map<num,int>}),f3:dynamic Function({v:dynamic,x:dynamic,y:dynamic,z:dynamic})}),g:G<A,B,C,D>,x:dynamic})})]
+*/
+/*omit.class: D:
+ explicit=[
+ dynamic Function({a:A,b:B,c:C,d:D}),
+ dynamic Function({f1:dynamic Function({a:A,b:B,c:C,d:D}),f2:dynamic Function({g:G<A,B,C,D>,l:List<List<B>>,m:Map<num,int>}),f3:dynamic Function({v:dynamic,x:dynamic,y:dynamic,z:dynamic})}),
+ dynamic Function({g:G<A,B,C,D>,l:List<List<B>>,m:Map<num,int>})]
+*/
class D implements C {}
-/*class: G:explicit=[dynamic Function({f1:dynamic Function({a:A,b:B,c:C,d:D}),f2:dynamic Function({g:G<A,B,C,D>,l:List<List<B>>,m:Map<num,int>}),f3:dynamic Function({v:dynamic,x:dynamic,y:dynamic,z:dynamic})}),dynamic Function({g:G<A,B,C,D>,l:List<List<B>>,m:Map<num,int>})]*/
+/*strong.class: G:
+ explicit=[
+ G,G<A,A1,A1,A1>,G<D,D,D,D>,
+ dynamic Function({b:B,f:dynamic Function({f1:dynamic Function({a:A,b:B,c:C,d:D}),f2:dynamic Function({g:G<A,B,C,D>,l:List<List<B>>,m:Map<num,int>}),f3:dynamic Function({v:dynamic,x:dynamic,y:dynamic,z:dynamic})}),g:G<A,B,C,D>,x:dynamic}),
+ dynamic Function({f1:dynamic Function({a:A,b:B,c:C,d:D}),f2:dynamic Function({g:G<A,B,C,D>,l:List<List<B>>,m:Map<num,int>}),f3:dynamic Function({v:dynamic,x:dynamic,y:dynamic,z:dynamic})}),
+ dynamic Function({g:G<A,A1,A1,A1>,l:List<List<A1>>,m:Map<num,num>}),
+ dynamic Function({g:G<A,B,C,D>,l:List<List<B>>,m:Map<num,int>}),
+ dynamic Function({g:G<D,D,D,D>,l:List<List<D>>,m:Map<int,int>}),
+ dynamic Function({v:dynamic,x:A,y:G,z:dynamic Function({b:B,f:dynamic Function({f1:dynamic Function({a:A,b:B,c:C,d:D}),f2:dynamic Function({g:G<A,B,C,D>,l:List<List<B>>,m:Map<num,int>}),f3:dynamic Function({v:dynamic,x:dynamic,y:dynamic,z:dynamic})}),g:G<A,B,C,D>,x:dynamic})})],
+ needsArgs
+*/
+/*omit.class: G:
+ explicit=[
+ dynamic Function({f1:dynamic Function({a:A,b:B,c:C,d:D}),f2:dynamic Function({g:G<A,B,C,D>,l:List<List<B>>,m:Map<num,int>}),f3:dynamic Function({v:dynamic,x:dynamic,y:dynamic,z:dynamic})}),
+ dynamic Function({g:G<A,B,C,D>,l:List<List<B>>,m:Map<num,int>})]
+*/
class G<T, S, U, W> {}
typedef classesFunc({A a, B b, C c, D d});
@@ -43,31 +120,57 @@
typedef okWithDynamicFunc_2({int x, bool y, List<Map> z, classesFunc v});
main() {
- Expect.isTrue(({D a, B b, C c, A d}) {} is classesFunc);
- Expect.isTrue(({A a, A b, A c, A d}) {} is classesFunc);
- Expect.isTrue(({D a, A1 b, A1 c, A1 d}) {} is classesFunc);
- Expect.isTrue(({D a, A2 b, A2 c, A2 d}) {} is classesFunc);
- Expect.isTrue(({D a, D b, D c, D d}) {} is classesFunc);
- Expect.isTrue(({var a, var b, var c, var d}) {} is classesFunc);
- Expect.isTrue(({Object a, Object b, Object c, Object d}) {} is classesFunc);
-
- Expect.isTrue(({Map<num, num> m, List<List<A1>> l, G<A, A1, A1, A1> g}) {}
- is genericsFunc);
Expect.isTrue(
+ /*strong.needsSignature*/
+ ({D a, B b, C c, A d}) {} is classesFunc);
+ Expect.isTrue(
+ /*needsSignature*/
+ ({A a, A b, A c, A d}) {} is classesFunc);
+ Expect.isTrue(
+ /*strong.needsSignature*/
+ ({D a, A1 b, A1 c, A1 d}) {} is classesFunc);
+ Expect.isTrue(
+ /*strong.needsSignature*/
+ ({D a, A2 b, A2 c, A2 d}) {} is classesFunc);
+ Expect.isTrue(
+ /*strong.needsSignature*/
+ ({D a, D b, D c, D d}) {} is classesFunc);
+ Expect.isTrue(
+ /*needsSignature*/
+ ({var a, var b, var c, var d}) {} is classesFunc);
+ Expect.isTrue(
+ /*needsSignature*/
+ ({Object a, Object b, Object c, Object d}) {} is classesFunc);
+
+ Expect.isTrue(
+ /*needsSignature*/
+ ({Map<num, num> m, List<List<A1>> l, G<A, A1, A1, A1> g}) {}
+ is genericsFunc);
+ Expect.isTrue(
+ /*strong.needsSignature*/
({Map<int, int> m, List<List<D>> l, G<D, D, D, D> g}) {} is genericsFunc);
- Expect.isTrue(({var m, var l, var g}) {} is genericsFunc);
- Expect.isTrue(({Object m, Object l, Object g}) {} is genericsFunc);
-
- Expect.isTrue(({A x, G y, mixFunc z, var v}) {} is dynamicFunc);
Expect.isTrue(
+ /*needsSignature*/
+ ({var m, var l, var g}) {} is genericsFunc);
+ Expect.isTrue(
+ /*needsSignature*/
+ ({Object m, Object l, Object g}) {} is genericsFunc);
+
+ Expect.isTrue(
+ /*strong.needsSignature*/
+ ({A x, G y, mixFunc z, var v}) {} is dynamicFunc);
+ Expect.isTrue(
+ /*strong.needsSignature*/
({int x, bool y, List<Map> z, classesFunc v}) {} is dynamicFunc);
Expect.isTrue((
{okWithClassesFunc_1 f1,
okWithGenericsFunc_1 f2,
okWithDynamicFunc_1 f3}) {} is funcFunc);
- Expect.isTrue((
- {okWithClassesFunc_2 f1,
- okWithGenericsFunc_2 f2,
- okWithDynamicFunc_2 f3}) {} is funcFunc);
+ Expect.isTrue(
+ /*needsSignature*/
+ (
+ {okWithClassesFunc_2 f1,
+ okWithGenericsFunc_2 f2,
+ okWithDynamicFunc_2 f3}) {} is funcFunc);
}
diff --git a/tests/compiler/dart2js/rti/data/subtype_named_args1.dart b/tests/compiler/dart2js/rti/data/subtype_named_args1.dart
index 8d5cf9c..5af335e 100644
--- a/tests/compiler/dart2js/rti/data/subtype_named_args1.dart
+++ b/tests/compiler/dart2js/rti/data/subtype_named_args1.dart
@@ -6,14 +6,18 @@
import "package:expect/expect.dart";
+/*strong.class: A:explicit=[A,dynamic Function({a:A})]*/
class A {}
-/*class: B:explicit=[dynamic Function({a:B}),dynamic Function({f:dynamic Function({a:B})})]*/
+/*strong.class: B:explicit=[B,dynamic Function({a:B}),dynamic Function({f:dynamic Function({a:B})})]*/
+/*omit.class: B:explicit=[dynamic Function({a:B}),dynamic Function({f:dynamic Function({a:B})})]*/
class B implements A {}
-/*class: C:explicit=[dynamic Function({c:C})]*/
+/*strong.class: C:explicit=[C,dynamic Function({a:C}),dynamic Function({c:C})]*/
+/*omit.class: C:explicit=[dynamic Function({c:C})]*/
class C implements B {}
+/*strong.class: D:explicit=[D,dynamic Function({a:D})]*/
class D implements C {}
typedef t1({B a});
@@ -31,31 +35,31 @@
typedef okWithT1_4({D a});
main() {
- Expect.isTrue(({A a}) {} is t1);
- Expect.isTrue(({B a}) {} is t1);
- Expect.isTrue(({C a}) {} is t1);
- Expect.isTrue(({D a}) {} is t1);
- Expect.isTrue(({Object a}) {} is t1);
- Expect.isTrue(({var a}) {} is t1);
+ Expect.isTrue(/*needsSignature*/ ({A a}) {} is t1);
+ Expect.isTrue(/*needsSignature*/ ({B a}) {} is t1);
+ Expect.isTrue(/*strong.needsSignature*/ ({C a}) {} is t1);
+ Expect.isTrue(/*strong.needsSignature*/ ({D a}) {} is t1);
+ Expect.isTrue(/*needsSignature*/ ({Object a}) {} is t1);
+ Expect.isTrue(/*needsSignature*/ ({var a}) {} is t1);
- Expect.isTrue(({A c}) {} is t2);
- Expect.isTrue(({B c}) {} is t2);
- Expect.isTrue(({C c}) {} is t2);
+ Expect.isTrue(/*needsSignature*/ ({A c}) {} is t2);
+ Expect.isTrue(/*needsSignature*/ ({B c}) {} is t2);
+ Expect.isTrue(/*needsSignature*/ ({C c}) {} is t2);
Expect.isTrue(({D c}) {} is t2);
- Expect.isTrue(({Object c}) {} is t2);
- Expect.isTrue(({var c}) {} is t2);
+ Expect.isTrue(/*needsSignature*/ ({Object c}) {} is t2);
+ Expect.isTrue(/*needsSignature*/ ({var c}) {} is t2);
- Expect.isTrue(({num i}) {} is t3);
- Expect.isTrue(({int i}) {} is t3);
- Expect.isTrue(({Object i}) {} is t3);
- Expect.isTrue(({var i}) {} is t3);
+ Expect.isTrue(/*needsSignature*/ ({num i}) {} is t3);
+ Expect.isTrue(/*needsSignature*/ ({int i}) {} is t3);
+ Expect.isTrue(/*needsSignature*/ ({Object i}) {} is t3);
+ Expect.isTrue(/*needsSignature*/ ({var i}) {} is t3);
Expect.isTrue(({A v}) {} is t4);
Expect.isTrue(({B v}) {} is t4);
Expect.isTrue(({C v}) {} is t4);
Expect.isTrue(({D v}) {} is t4);
- Expect.isTrue(({Object v}) {} is t4);
- Expect.isTrue(({var v}) {} is t4);
+ Expect.isTrue(/*needsSignature*/ ({Object v}) {} is t4);
+ Expect.isTrue(/*needsSignature*/ ({var v}) {} is t4);
Expect.isTrue(({num v}) {} is t4);
Expect.isTrue(({int v}) {} is t4);
Expect.isTrue(({Map v}) {} is t4);
@@ -64,30 +68,30 @@
Expect.isTrue(({t8 v}) {} is t4);
Expect.isTrue(({t7 v}) {} is t4);
- Expect.isTrue(({Map m}) {} is t5);
+ Expect.isTrue(/*needsSignature*/ ({Map m}) {} is t5);
Expect.isTrue(({Map<List, t8> m}) {} is t5);
- Expect.isTrue(({Object m}) {} is t5);
- Expect.isTrue(({var m}) {} is t5);
+ Expect.isTrue(/*needsSignature*/ ({Object m}) {} is t5);
+ Expect.isTrue(/*needsSignature*/ ({var m}) {} is t5);
Expect.isTrue(({Map<List, List> m}) {} is t5);
Expect.isTrue(({Map<int, t8> m}) {} is t5);
- Expect.isTrue(({Map<num, num> m}) {} is t6);
+ Expect.isTrue(/*needsSignature*/ ({Map<num, num> m}) {} is t6);
Expect.isTrue(({Map<int, int> m}) {} is t6);
- Expect.isTrue(({Map m}) {} is t6);
- Expect.isTrue(({Object m}) {} is t6);
- Expect.isTrue(({var m}) {} is t6);
+ Expect.isTrue(/*needsSignature*/ ({Map m}) {} is t6);
+ Expect.isTrue(/*needsSignature*/ ({Object m}) {} is t6);
+ Expect.isTrue(/*needsSignature*/ ({var m}) {} is t6);
Expect.isTrue(({okWithT1_1 f}) {} is t7);
- Expect.isTrue(({okWithT1_2 f}) {} is t7);
- Expect.isTrue(({okWithT1_3 f}) {} is t7);
- Expect.isTrue(({okWithT1_4 f}) {} is t7);
+ Expect.isTrue(/*needsSignature*/ ({okWithT1_2 f}) {} is t7);
+ Expect.isTrue(/*needsSignature*/ ({okWithT1_3 f}) {} is t7);
+ Expect.isTrue(/*needsSignature*/ ({okWithT1_4 f}) {} is t7);
- Expect.isTrue(({A a}) {} is t8);
- Expect.isTrue(({B a}) {} is t8);
- Expect.isTrue(({C a}) {} is t8);
- Expect.isTrue(({D a}) {} is t8);
- Expect.isTrue(({Object a}) {} is t8);
- Expect.isTrue(({var a}) {} is t8);
+ Expect.isTrue(/*needsSignature*/ ({A a}) {} is t8);
+ Expect.isTrue(/*needsSignature*/ ({B a}) {} is t8);
+ Expect.isTrue(/*strong.needsSignature*/ ({C a}) {} is t8);
+ Expect.isTrue(/*strong.needsSignature*/ ({D a}) {} is t8);
+ Expect.isTrue(/*needsSignature*/ ({Object a}) {} is t8);
+ Expect.isTrue(/*needsSignature*/ ({var a}) {} is t8);
Expect.isTrue(({num a}) {} is t8);
Expect.isTrue(({int a}) {} is t8);
Expect.isTrue(({Map a}) {} is t8);
diff --git a/tests/compiler/dart2js/rti/data/tear_off_generic.dart b/tests/compiler/dart2js/rti/data/tear_off_generic.dart
index c8263c4..24cc2ee 100644
--- a/tests/compiler/dart2js/rti/data/tear_off_generic.dart
+++ b/tests/compiler/dart2js/rti/data/tear_off_generic.dart
@@ -2,11 +2,9 @@
// 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.
-/*kernel.class: A:needsArgs*/
/*strong.class: A:direct,explicit=[A.T],needsArgs*/
/*omit.class: A:*/
class A<T> {
- /*kernel.element: A.m:needsSignature*/
/*strong.element: A.m:*/
/*omit.element: A.m:*/
void m(T t) {}
diff --git a/tests/compiler/dart2js/rti/data/tear_off_generic_strong.dart b/tests/compiler/dart2js/rti/data/tear_off_generic_strong.dart
index 7437085..24cc2ee 100644
--- a/tests/compiler/dart2js/rti/data/tear_off_generic_strong.dart
+++ b/tests/compiler/dart2js/rti/data/tear_off_generic_strong.dart
@@ -5,7 +5,6 @@
/*strong.class: A:direct,explicit=[A.T],needsArgs*/
/*omit.class: A:*/
class A<T> {
- /*kernel.element: A.m:needsSignature*/
/*strong.element: A.m:*/
/*omit.element: A.m:*/
void m(T t) {}
diff --git a/tests/compiler/dart2js/rti/disable_rti_test.dart b/tests/compiler/dart2js/rti/disable_rti_test.dart
index c5ff693..0c52e5e 100644
--- a/tests/compiler/dart2js/rti/disable_rti_test.dart
+++ b/tests/compiler/dart2js/rti/disable_rti_test.dart
@@ -73,14 +73,7 @@
runTest() async {
CompilationResult result = await runCompiler(
memorySourceFiles: {'main.dart': code},
- // TODO(johnniwinther): This test fails if inlining is disabled. This
- // is because the selector for calling `local1` matches `H.call` which
- // is not considered live be resolution. We need to mark function-call
- // selectors separately from dynamic calls and class-calls as to not
- // mix these in codegen. Currently this test works without
- // --disable-inlining, but the option should be re-enabled to ensure
- // the intended coverage.
- options: [Flags.disableRtiOptimization /*, Flags.disableInlining*/]);
+ options: [Flags.disableRtiOptimization, Flags.disableInlining]);
Expect.isTrue(result.isSuccess);
Compiler compiler = result.compiler;
JClosedWorld closedWorld = compiler.backendClosedWorldForTesting;
diff --git a/tests/compiler/dart2js/rti/emission/call_typed.dart b/tests/compiler/dart2js/rti/emission/call_typed.dart
deleted file mode 100644
index 6cb2e55..0000000
--- a/tests/compiler/dart2js/rti/emission/call_typed.dart
+++ /dev/null
@@ -1,19 +0,0 @@
-// 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';
-import 'package:meta/dart2js.dart';
-
-/*class: A:checks=[],functionType,instance*/
-class A {
- call(int i) {}
-}
-
-@noInline
-test(o) => o is Function(int);
-
-main() {
- Expect.isTrue(test(new A()));
- Expect.isFalse(test(null));
-}
diff --git a/tests/compiler/dart2js/rti/emission/call_typed_generic.dart b/tests/compiler/dart2js/rti/emission/call_typed_generic.dart
deleted file mode 100644
index b4173d9..0000000
--- a/tests/compiler/dart2js/rti/emission/call_typed_generic.dart
+++ /dev/null
@@ -1,19 +0,0 @@
-// 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';
-import 'package:meta/dart2js.dart';
-
-/*class: A:checks=[$signature],instance*/
-class A<T> {
- call(T t) {}
-}
-
-@noInline
-test(o) => o is Function(int);
-
-main() {
- Expect.isTrue(test(new A<int>()));
- Expect.isFalse(test(new A<String>()));
-}
diff --git a/tests/compiler/dart2js/rti/emission/closure_function.dart b/tests/compiler/dart2js/rti/emission/closure_function.dart
index 1874f1a..b09023f 100644
--- a/tests/compiler/dart2js/rti/emission/closure_function.dart
+++ b/tests/compiler/dart2js/rti/emission/closure_function.dart
@@ -9,7 +9,7 @@
main() {
test(
- /*kernel.checks=[],functionType,instance*/
+
/*strong.checks=[],instance*/
/*omit.checks=[],instance*/
() {});
diff --git a/tests/compiler/dart2js/rti/emission/closure_function_type.dart b/tests/compiler/dart2js/rti/emission/closure_function_type.dart
index b37395b..56d1d56 100644
--- a/tests/compiler/dart2js/rti/emission/closure_function_type.dart
+++ b/tests/compiler/dart2js/rti/emission/closure_function_type.dart
@@ -10,7 +10,7 @@
main() {
test(/*checks=[],functionType,instance*/ () {});
test(
- /*kernel.checks=[],functionType,instance*/
+
/*strong.checks=[],instance*/
/*omit.checks=[],instance*/
(a) {});
diff --git a/tests/compiler/dart2js/rti/emission/closure_signature_unneeded.dart b/tests/compiler/dart2js/rti/emission/closure_signature_unneeded.dart
index 52b2ec9..df19f23 100644
--- a/tests/compiler/dart2js/rti/emission/closure_signature_unneeded.dart
+++ b/tests/compiler/dart2js/rti/emission/closure_signature_unneeded.dart
@@ -11,7 +11,7 @@
// TODO(johnniwinther): The signature is not needed since the type isn't a
// potential subtype of the checked function types.
return
- /*kernel.checks=[$signature],instance*/
+
/*strong.checks=[],instance*/
/*omit.checks=[],instance*/
(T t, String s) {};
diff --git a/tests/compiler/dart2js/rti/emission/event_callback.dart b/tests/compiler/dart2js/rti/emission/event_callback.dart
index bb6068f..0c11ed5 100644
--- a/tests/compiler/dart2js/rti/emission/event_callback.dart
+++ b/tests/compiler/dart2js/rti/emission/event_callback.dart
@@ -4,14 +4,11 @@
import 'dart:html';
-/*kernel.class: global#Event:checkedTypeArgument,checks=[$isEvent],instance,typeArgument*/
/*strong.class: global#Event:checkedInstance,checkedTypeArgument,checks=[$isEvent],instance,typeArgument*/
-/*kernel.class: global#MouseEvent:checks=[$isMouseEvent],instance,typeArgument*/
/*strong.class: global#MouseEvent:checks=[$isMouseEvent],instance,typeArgument*/
/*omit.class: global#MouseEvent:instance*/
-/*kernel.class: global#KeyboardEvent:checks=[$isKeyboardEvent],instance,typeArgument*/
/*strong.class: global#KeyboardEvent:checks=[$isKeyboardEvent],instance,typeArgument*/
/*omit.class: global#KeyboardEvent:instance*/
diff --git a/tests/compiler/dart2js/rti/emission/function_subtype_call2.dart b/tests/compiler/dart2js/rti/emission/function_subtype_call2.dart
deleted file mode 100644
index d26680e..0000000
--- a/tests/compiler/dart2js/rti/emission/function_subtype_call2.dart
+++ /dev/null
@@ -1,64 +0,0 @@
-// 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.
-// Dart test program for constructors and initializers.
-
-// Based on tests/language/function_subtype_call2_test.dart
-
-import 'package:expect/expect.dart';
-
-typedef void Foo(bool a, [String b]);
-typedef void Bar(bool a, [String b]);
-typedef void Baz(bool a, {String b});
-typedef void Boz(bool a);
-
-/*class: C1:checks=[$signature]*/
-class C1<T> {
- void call(T a, [String b]) {}
-}
-
-/*class: D1:checks=[$asC1],instance*/
-class D1<S, T> extends C1<T> {}
-
-/*class: C2:checks=[$signature]*/
-class C2<T> {
- void call(T a, {String b}) {}
-}
-
-/*class: D2:checks=[$asC2],instance*/
-class D2<S, T> extends C2<T> {}
-
-main() {
- Expect.isTrue(new D1<String, bool>() is Foo, 'new D1<String, bool>() is Foo');
- Expect.isTrue(new D1<String, bool>() is Bar, 'new D1<String, bool>() is Bar');
- Expect.isFalse(
- new D1<String, bool>() is Baz, 'new D1<String, bool>() is Baz');
- Expect.isTrue(new D1<String, bool>() is Boz, 'new D1<String, bool>() is Boz');
-
- Expect.isFalse(new D1<bool, int>() is Foo, 'new D1<bool, int>() is Foo');
- Expect.isFalse(new D1<bool, int>() is Bar, 'new D1<bool, int>() is Bar');
- Expect.isFalse(new D1<bool, int>() is Baz, 'new D1<bool, int>() is Baz');
- Expect.isFalse(new D1<bool, int>() is Boz, 'new D1<bool, int>() is Boz');
-
- Expect.isTrue(new D1() is Foo, 'new D1() is Foo');
- Expect.isTrue(new D1() is Bar, 'new D1() is Bar');
- Expect.isFalse(new D1() is Baz, 'new D1() is Baz');
- Expect.isTrue(new D1() is Boz, 'new D1() is Boz');
-
- Expect.isFalse(
- new D2<String, bool>() is Foo, 'new D2<String, bool>() is Foo');
- Expect.isFalse(
- new D2<String, bool>() is Bar, 'new D2<String, bool>() is Bar');
- Expect.isTrue(new D2<String, bool>() is Baz, 'new D2<String, bool>() is Baz');
- Expect.isTrue(new D2<String, bool>() is Boz, 'new D2<String, bool>() is Boz');
-
- Expect.isFalse(new D2<bool, int>() is Foo, 'new D2<bool, int>() is Foo');
- Expect.isFalse(new D2<bool, int>() is Bar, 'new D2<bool, int>() is Bar');
- Expect.isFalse(new D2<bool, int>() is Baz, 'new D2<bool, int>() is Baz');
- Expect.isFalse(new D2<bool, int>() is Boz, 'new D2<bool, int>() is Boz');
-
- Expect.isFalse(new D2() is Foo, 'new D2() is Foo');
- Expect.isFalse(new D2() is Bar, 'new D2() is Bar');
- Expect.isTrue(new D2() is Baz, 'new D2() is Baz');
- Expect.isTrue(new D2() is Boz, 'new D2() is Boz');
-}
diff --git a/tests/compiler/dart2js/rti/emission/function_type_argument.dart b/tests/compiler/dart2js/rti/emission/function_type_argument.dart
deleted file mode 100644
index 97ce3ce..0000000
--- a/tests/compiler/dart2js/rti/emission/function_type_argument.dart
+++ /dev/null
@@ -1,29 +0,0 @@
-// 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';
-import 'package:meta/dart2js.dart';
-
-/*class: C:checks=[],functionType,instance,typeArgument*/
-class C {
- call(int i) {}
-}
-
-/*class: D:checks=[],functionType,instance,typeArgument*/
-class D {
- call(double i) {}
-}
-
-@noInline
-test1(o) => o is Function(int);
-
-@noInline
-test2(o) => o is List<Function(int)>;
-
-main() {
- Expect.isTrue(test1(new C()));
- Expect.isFalse(test1(new D()));
- Expect.isTrue(test2(<C>[]));
- Expect.isFalse(test2(<D>[]));
-}
diff --git a/tests/compiler/dart2js/rti/emission/indirect_through_static.dart b/tests/compiler/dart2js/rti/emission/indirect_through_static.dart
index 2813753..3571daa 100644
--- a/tests/compiler/dart2js/rti/emission/indirect_through_static.dart
+++ b/tests/compiler/dart2js/rti/emission/indirect_through_static.dart
@@ -2,17 +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.
-/*kernel.class: A:*/
/*strong.class: A:checkedInstance,checks=[],typeArgument*/
/*omit.class: A:checkedInstance,checks=[],typeArgument*/
abstract class A {}
-/*kernel.class: B:checks=[],typeArgument*/
/*strong.class: B:checks=[$isA],typeArgument*/
/*omit.class: B:checks=[$isA],typeArgument*/
class B implements A {}
-/*kernel.class: C:checks=[],instance*/
/*strong.class: C:checkedInstance,checks=[],instance,typeArgument*/
/*omit.class: C:checkedInstance,checks=[],instance,typeArgument*/
class C<T> {}
diff --git a/tests/compiler/dart2js/rti/emission/jsinterop_generic_factory_args.dart b/tests/compiler/dart2js/rti/emission/jsinterop_generic_factory_args.dart
index 963c073..49c64c3 100644
--- a/tests/compiler/dart2js/rti/emission/jsinterop_generic_factory_args.dart
+++ b/tests/compiler/dart2js/rti/emission/jsinterop_generic_factory_args.dart
@@ -12,7 +12,6 @@
import 'package:expect/expect.dart';
import 'package:js/js.dart';
-/*kernel.class: A:checkedTypeArgument,checks=[],typeArgument*/
/*strong.class: A:checkedInstance,checkedTypeArgument,checks=[],typeArgument*/
/*omit.class: A:checkedTypeArgument,checks=[],typeArgument*/
@JS()
diff --git a/tests/compiler/dart2js/rti/emission/list.dart b/tests/compiler/dart2js/rti/emission/list.dart
index 0c8d312..fa99c20 100644
--- a/tests/compiler/dart2js/rti/emission/list.dart
+++ b/tests/compiler/dart2js/rti/emission/list.dart
@@ -4,18 +4,15 @@
import 'package:meta/dart2js.dart';
-/*kernel.class: global#JSArray:checkedInstance,checks=[$isIterable],instance*/
/*strong.class: global#JSArray:checkedInstance,checks=[$isIterable,$isList],instance*/
/*omit.class: global#JSArray:checkedInstance,checks=[$isIterable],instance*/
/*class: global#Iterable:checkedInstance*/
-/*kernel.class: A:checkedTypeArgument,checks=[],typeArgument*/
/*strong.class: A:checkedInstance,checkedTypeArgument,checks=[],typeArgument*/
/*omit.class: A:checkedTypeArgument,checks=[],typeArgument*/
class A {}
-/*kernel.class: B:checks=[],typeArgument*/
/*strong.class: B:checkedInstance,checks=[],typeArgument*/
/*omit.class: B:checks=[],typeArgument*/
class B {}
diff --git a/tests/compiler/dart2js/rti/emission/map_literal.dart b/tests/compiler/dart2js/rti/emission/map_literal.dart
index f9eb53b..acb2eb3 100644
--- a/tests/compiler/dart2js/rti/emission/map_literal.dart
+++ b/tests/compiler/dart2js/rti/emission/map_literal.dart
@@ -2,13 +2,11 @@
// 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.
-/*kernel.class: global#Map:instance*/
/*strong.class: global#Map:checkedInstance,instance*/
/*class: global#LinkedHashMap:*/
/*class: global#JsLinkedHashMap:checks=[],instance*/
-/*kernel.class: global#double:checks=[],instance,typeArgument*/
/*strong.class: global#double:checkedInstance,checks=[],instance,typeArgument*/
/*class: global#JSDouble:checks=[],instance*/
diff --git a/tests/compiler/dart2js/rti/emission/map_literal_checked.dart b/tests/compiler/dart2js/rti/emission/map_literal_checked.dart
deleted file mode 100644
index a54e67f..0000000
--- a/tests/compiler/dart2js/rti/emission/map_literal_checked.dart
+++ /dev/null
@@ -1,14 +0,0 @@
-// 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.
-
-/*class: global#Map:checkedInstance,instance*/
-/*class: global#LinkedHashMap:checkedInstance*/
-/*class: global#JsLinkedHashMap:checkedInstance,checks=[$isLinkedHashMap],instance*/
-/*class: global#double:checkedInstance,checks=[],instance,typeArgument*/
-/*class: global#JSNumber:checks=[$isdouble,$isnum],instance*/
-/*class: global#JSDouble:checks=[],instance*/
-
-main() {
- <int, double>{}[0] = 0.5;
-}
diff --git a/tests/compiler/dart2js/rti/emission/subtype_named_args.dart b/tests/compiler/dart2js/rti/emission/subtype_named_args.dart
index c10ef59..759210b 100644
--- a/tests/compiler/dart2js/rti/emission/subtype_named_args.dart
+++ b/tests/compiler/dart2js/rti/emission/subtype_named_args.dart
@@ -6,25 +6,32 @@
import 'package:expect/expect.dart';
-/*class: A:checkedTypeArgument,checks=[],typeArgument*/
+/*strong.class: A:checkedInstance,checkedTypeArgument,checks=[],typeArgument*/
+/*omit.class: A:checkedTypeArgument,checks=[],typeArgument*/
class A {}
-/*class: A1:checkedTypeArgument,checks=[],typeArgument*/
+/*strong.class: A1:checkedInstance,checkedTypeArgument,checks=[],typeArgument*/
+/*omit.class: A1:checkedTypeArgument,checks=[],typeArgument*/
class A1 {}
-/*class: A2:checkedTypeArgument,checks=[],typeArgument*/
+/*strong.class: A2:checkedInstance,checkedTypeArgument,checks=[],typeArgument*/
+/*omit.class: A2:checkedTypeArgument,checks=[],typeArgument*/
class A2 {}
-/*class: B:checkedTypeArgument,checks=[$isA,$isA1,$isA2],typeArgument*/
+/*strong.class: B:checkedInstance,checkedTypeArgument,checks=[$isA,$isA1,$isA2],typeArgument*/
+/*omit.class: B:checkedTypeArgument,checks=[$isA,$isA1,$isA2],typeArgument*/
class B implements A, A1, A2 {}
-/*class: C:checkedTypeArgument,checks=[$isA,$isA1,$isA2,$isB],typeArgument*/
+/*strong.class: C:checkedInstance,checkedTypeArgument,checks=[$isA,$isA1,$isA2,$isB],typeArgument*/
+/*omit.class: C:checkedTypeArgument,checks=[$isA,$isA1,$isA2,$isB],typeArgument*/
class C implements B {}
-/*class: D:checkedTypeArgument,checks=[$isA,$isA1,$isA2,$isB,$isC],typeArgument*/
+/*strong.class: D:checkedInstance,checkedTypeArgument,checks=[$isA,$isA1,$isA2,$isB,$isC],typeArgument*/
+/*omit.class: D:checkedTypeArgument,checks=[$isA,$isA1,$isA2,$isB,$isC],typeArgument*/
class D implements C {}
-/*class: G:checkedTypeArgument,checks=[],typeArgument*/
+/*strong.class: G:checkedInstance,checkedTypeArgument,checks=[],typeArgument*/
+/*omit.class: G:checkedTypeArgument,checks=[],typeArgument*/
class G<T, S, U, W> {}
typedef classesFunc({A a, B b, C c, D d});
@@ -45,52 +52,63 @@
typedef okWithDynamicFunc_2({int x, bool y, List<Map> z, classesFunc v});
main() {
- Expect.isTrue(/*checks=[],functionType,instance*/ ({D a, B b, C c, A d}) {}
- is classesFunc);
- Expect.isTrue(/*checks=[],functionType,instance*/ ({A a, A b, A c, A d}) {}
- is classesFunc);
Expect.isTrue(
- /*checks=[],functionType,instance*/ ({D a, A1 b, A1 c, A1 d}) {}
- is classesFunc);
+ /*strong.checks=[],functionType,instance*/
+ /*omit.checks=[],instance*/
+ ({D a, B b, C c, A d}) {} is classesFunc);
Expect.isTrue(
- /*checks=[],functionType,instance*/ ({D a, A2 b, A2 c, A2 d}) {}
- is classesFunc);
- Expect.isTrue(/*checks=[],functionType,instance*/ ({D a, D b, D c, D d}) {}
- is classesFunc);
+ /*checks=[],functionType,instance*/
+ ({A a, A b, A c, A d}) {} is classesFunc);
Expect.isTrue(
- /*checks=[],functionType,instance*/ ({var a, var b, var c, var d}) {}
- is classesFunc);
- Expect.isTrue(/*checks=[],functionType,instance*/ (
- {Object a, Object b, Object c, Object d}) {} is classesFunc);
+ /*strong.checks=[],functionType,instance*/
+ /*omit.checks=[],instance*/
+ ({D a, A1 b, A1 c, A1 d}) {} is classesFunc);
+ Expect.isTrue(
+ /*strong.checks=[],functionType,instance*/
+ /*omit.checks=[],instance*/
+ ({D a, A2 b, A2 c, A2 d}) {} is classesFunc);
+ Expect.isTrue(
+ /*strong.checks=[],functionType,instance*/
+ /*omit.checks=[],instance*/
+ ({D a, D b, D c, D d}) {} is classesFunc);
+ Expect.isTrue(
+ /*checks=[],functionType,instance*/
+ ({var a, var b, var c, var d}) {} is classesFunc);
+ Expect.isTrue(/*checks=[],functionType,instance*/
+ ({Object a, Object b, Object c, Object d}) {} is classesFunc);
- Expect.isTrue(/*checks=[],functionType,instance*/ (
- {Map<num, num> m,
- List<List<A1>> l,
- G<A, A1, A1, A1> g}) {} is genericsFunc);
- Expect.isTrue(
- /*checks=[],functionType,instance*/ (
- {Map<int, int> m,
- List<List<D>> l,
- G<D, D, D, D> g}) {} is genericsFunc);
- Expect.isTrue(
- /*checks=[],functionType,instance*/ ({var m, var l, var g}) {}
+ Expect.isTrue(/*checks=[],functionType,instance*/
+ ({Map<num, num> m, List<List<A1>> l, G<A, A1, A1, A1> g}) {}
is genericsFunc);
Expect.isTrue(
- /*checks=[],functionType,instance*/ ({Object m, Object l, Object g}) {}
- is genericsFunc);
+ /*strong.checks=[],functionType,instance*/
+ /*omit.checks=[],instance*/
+ ({Map<int, int> m, List<List<D>> l, G<D, D, D, D> g}) {} is genericsFunc);
+ Expect.isTrue(
+ /*checks=[],functionType,instance*/
+ ({var m, var l, var g}) {} is genericsFunc);
+ Expect.isTrue(
+ /*checks=[],functionType,instance*/
+ ({Object m, Object l, Object g}) {} is genericsFunc);
Expect.isTrue(
- /*checks=[],functionType,instance*/ ({A x, G y, mixFunc z, var v}) {}
- is dynamicFunc);
- Expect.isTrue(/*checks=[],functionType,instance*/ (
- {int x, bool y, List<Map> z, classesFunc v}) {} is dynamicFunc);
+ /*strong.checks=[],functionType,instance*/
+ /*omit.checks=[],instance*/
+ ({A x, G y, mixFunc z, var v}) {} is dynamicFunc);
+ Expect.isTrue(
+ /*strong.checks=[],functionType,instance*/
+ /*omit.checks=[],instance*/
+ ({int x, bool y, List<Map> z, classesFunc v}) {} is dynamicFunc);
- Expect.isTrue(/*checks=[],functionType,instance*/ (
- {okWithClassesFunc_1 f1,
- okWithGenericsFunc_1 f2,
- okWithDynamicFunc_1 f3}) {} is funcFunc);
- Expect.isTrue(/*checks=[],functionType,instance*/ (
- {okWithClassesFunc_2 f1,
- okWithGenericsFunc_2 f2,
- okWithDynamicFunc_2 f3}) {} is funcFunc);
+ Expect.isTrue(
+ /*checks=[],instance*/
+ (
+ {okWithClassesFunc_1 f1,
+ okWithGenericsFunc_1 f2,
+ okWithDynamicFunc_1 f3}) {} is funcFunc);
+ Expect.isTrue(/*checks=[],functionType,instance*/
+ (
+ {okWithClassesFunc_2 f1,
+ okWithGenericsFunc_2 f2,
+ okWithDynamicFunc_2 f3}) {} is funcFunc);
}
diff --git a/tests/compiler/dart2js/rti/rti_emission_test.dart b/tests/compiler/dart2js/rti/rti_emission_test.dart
index 9659eb6..b925439 100644
--- a/tests/compiler/dart2js/rti/rti_emission_test.dart
+++ b/tests/compiler/dart2js/rti/rti_emission_test.dart
@@ -23,29 +23,8 @@
cacheRtiDataForTesting = true;
Directory dataDir =
new Directory.fromUri(Platform.script.resolve('emission'));
- await checkTests(
- dataDir,
- const RtiEmissionDataComputer(),
- args: args,
- testOmit: true,
- skipForStrong: [
- // Dart 1 semantics:
- 'call.dart',
- 'call_typed.dart',
- 'call_typed_generic.dart',
- 'function_subtype_call2.dart',
- 'function_type_argument.dart',
- 'map_literal_checked.dart',
- // TODO(johnniwinther): Optimize local function type signature need.
- 'subtype_named_args.dart',
-
- // TODO(johnniwinther): Fix crash.
- 'call_strong.dart',
-
- // TODO(34095):
- 'list.dart',
- ],
- );
+ await checkTests(dataDir, const RtiEmissionDataComputer(),
+ args: args, testOmit: true);
});
}
diff --git a/tests/compiler/dart2js/rti/rti_need_test_helper.dart b/tests/compiler/dart2js/rti/rti_need_test_helper.dart
index dc94ae7..b90042e 100644
--- a/tests/compiler/dart2js/rti/rti_need_test_helper.dart
+++ b/tests/compiler/dart2js/rti/rti_need_test_helper.dart
@@ -33,12 +33,6 @@
Directory dataDir = new Directory.fromUri(Platform.script.resolve('data'));
await checkTests(dataDir, const RtiNeedDataComputer(),
options: [],
- skipForStrong: [
- 'map_literal_checked.dart',
- // TODO(johnniwinther): Optimize local function type signature need.
- 'subtype_named_args.dart',
- 'subtype_named_args1.dart',
- ],
args: args,
testOmit: true,
shardIndex: shardIndex ?? 0,
diff --git a/tests/compiler/dart2js/rti/emission/call.dart b/tests/compiler/dart2js_extra/call_is_function_test.dart
similarity index 81%
rename from tests/compiler/dart2js/rti/emission/call.dart
rename to tests/compiler/dart2js_extra/call_is_function_test.dart
index 82ebfee..8bafb85 100644
--- a/tests/compiler/dart2js/rti/emission/call.dart
+++ b/tests/compiler/dart2js_extra/call_is_function_test.dart
@@ -5,7 +5,6 @@
import 'package:expect/expect.dart';
import 'package:meta/dart2js.dart';
-/*class: A:checks=[$isFunction],functionType,instance*/
class A {
call() {}
}
@@ -14,6 +13,6 @@
test(o) => o is Function;
main() {
- Expect.isTrue(test(new A()));
+ Expect.isFalse(test(new A()));
Expect.isFalse(test(null));
}
diff --git a/tests/compiler/dart2js_extra/call_uninlined_test.dart b/tests/compiler/dart2js_extra/call_uninlined_test.dart
new file mode 100644
index 0000000..ab0e750
--- /dev/null
+++ b/tests/compiler/dart2js_extra/call_uninlined_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 'package:expect/expect.dart';
+
+class H {
+ call() {}
+}
+
+main() {
+ print(new H());
+ method();
+}
+
+method() {
+ local1() {}
+
+ local1(); // This call wrongfully triggers enqueueing of H.call in codegen.
+}
diff --git a/tests/compiler/dart2js_extra/dart2js_extra.status b/tests/compiler/dart2js_extra/dart2js_extra.status
index 13e682f..4e25eef 100644
--- a/tests/compiler/dart2js_extra/dart2js_extra.status
+++ b/tests/compiler/dart2js_extra/dart2js_extra.status
@@ -3,10 +3,15 @@
# BSD-style license that can be found in the LICENSE file.
[ $compiler == dart2js ]
+23264_test: RuntimeError
bounds_check4a_test: RuntimeError # Issue 32741
bounds_check4b_test: RuntimeError # Issue 32741
class_test: Fail
+closure_capture2_test: RuntimeError
constant_javascript_semantics4_test: Fail, OK
+constant_javascript_semantics_test/03: CompileTimeError
+constant_javascript_semantics_test/04: CompileTimeError
+constant_javascript_semantics_test/none: CompileTimeError
generic_class_is_test: Fail # Issue 32004
jsinterop_test/01: MissingCompileTimeError # Issue 34174
jsinterop_test/02: MissingCompileTimeError # Issue 34174
@@ -34,7 +39,16 @@
non_jsinterop_test/42: MissingCompileTimeError # Issue 34174
non_jsinterop_test/46: MissingCompileTimeError # Issue 34174
non_jsinterop_test/51: MissingCompileTimeError # Issue 34174
+private_symbol_literal_test/01: MissingCompileTimeError
+private_symbol_literal_test/02: MissingCompileTimeError
+private_symbol_literal_test/03: MissingCompileTimeError
+private_symbol_literal_test/04: MissingCompileTimeError
+private_symbol_literal_test/05: MissingCompileTimeError
+private_symbol_literal_test/06: MissingCompileTimeError
+regress/4562_test/none: CompileTimeError
+round_constant_folding_test: CompileTimeError
statements_test: Fail
+type_constant_switch_test/01: MissingCompileTimeError
typed_locals_test: Pass, Fail
[ $compiler != dart2js ]
@@ -63,7 +77,7 @@
[ $compiler == dart2js && $runtime == chrome && $csp ]
deferred/load_in_correct_order_test: SkipByDesign # Purposely uses `eval`
-[ $compiler == dart2js && $runtime == d8 && $fasta ]
+[ $compiler == dart2js && $runtime == d8 ]
deferred_fail_and_retry_test: RuntimeError # Uses XHR in dart:html
deferred_with_csp_nonce_test: RuntimeError # Uses dart:html
unconditional_dartio_import_test: RuntimeError # Uses dart:io
@@ -74,7 +88,7 @@
[ $compiler == dart2js && $runtime == none ]
*: Fail, Pass # TODO(ahe): Triage these tests.
-[ $compiler == dart2js && $checked && $fasta ]
+[ $compiler == dart2js && $checked ]
dummy_compiler_test: Crash
local_signature_test: Crash
minus_zero_test/01: MissingCompileTimeError
@@ -85,39 +99,15 @@
js_interop_optional_arg_test: RuntimeError # Issue 31082
js_interop_test: RuntimeError # Issue 31082
-[ $compiler == dart2js && $fasta ]
-23264_test: RuntimeError
-closure_capture2_test: RuntimeError
-constant_javascript_semantics_test/03: CompileTimeError
-constant_javascript_semantics_test/04: CompileTimeError
-constant_javascript_semantics_test/none: CompileTimeError
-private_symbol_literal_test/01: MissingCompileTimeError
-private_symbol_literal_test/02: MissingCompileTimeError
-private_symbol_literal_test/03: MissingCompileTimeError
-private_symbol_literal_test/04: MissingCompileTimeError
-private_symbol_literal_test/05: MissingCompileTimeError
-private_symbol_literal_test/06: MissingCompileTimeError
-regress/4562_test/none: CompileTimeError
-round_constant_folding_test: CompileTimeError
-type_constant_switch_test/01: MissingCompileTimeError
-
-[ $compiler == dart2js && $fasta && $minified ]
-closure_capture2_test: Pass # Passes for the wrong reason
-deferred/reflect_multiple_annotations_test: Crash # NoSuchMethodError: The getter 'closureClassEntity' was called on null.
-deferred/reflect_multiple_default_arg_test: Crash # NoSuchMethodError: The getter 'closureClassEntity' was called on null.
-
-[ $compiler == dart2js && !$fasta ]
-expose_this1_test: RuntimeError # Issue 31254
-expose_this2_test: RuntimeError # Issue 31254
-string_interpolation_dynamic_test: Fail # CRLF handling clarified, see Issue 23562
-string_interpolation_test: Fail # CRLF handling clarified, see Issue 23562
-
[ $compiler == dart2js && !$host_checked ]
dummy_compiler_test: RuntimeError, Slow # Issue 32439. self-hosting doesn't work with CFE yet.
[ $compiler == dart2js && $minified ]
+closure_capture2_test: Pass # Passes for the wrong reason
code_motion_exception_test: Skip # Requires unminified operator names.
+deferred/reflect_multiple_annotations_test: Crash # NoSuchMethodError: The getter 'closureClassEntity' was called on null.
deferred/reflect_multiple_annotations_test: Fail
+deferred/reflect_multiple_default_arg_test: Crash # NoSuchMethodError: The getter 'closureClassEntity' was called on null.
deferred/reflect_multiple_default_arg_test: Fail
mirrors_used_warning_test/minif: Fail, OK # Tests warning that minified code will be broken.
runtime_type_test: Fail, OK # Tests extected output of Type.toString().
diff --git a/tests/compiler/dart2js_native/dart2js_native.status b/tests/compiler/dart2js_native/dart2js_native.status
index cc56706..0d9594f 100644
--- a/tests/compiler/dart2js_native/dart2js_native.status
+++ b/tests/compiler/dart2js_native/dart2js_native.status
@@ -5,11 +5,6 @@
[ $compiler == dart2js ]
bound_closure_super_test: RuntimeError
fake_thing_test: RuntimeError # Issue 13010
-
-[ $browser ]
-*: Skip
-
-[ $compiler == dart2js && $fasta ]
field_type2_test: CompileTimeError # Issue 33762
field_type_test: CompileTimeError # Issue 33762
native_exceptions1_frog_test: CompileTimeError # Issue 33762
@@ -23,5 +18,8 @@
subclassing_super_field_1_test: RuntimeError
subclassing_super_field_2_test: RuntimeError
+[ $browser ]
+*: Skip
+
[ $compiler == dart2js && $minified ]
optimization_hints_test: RuntimeError, OK # Test relies on unminified names.
diff --git a/tests/corelib/corelib.status b/tests/corelib/corelib.status
index 5e33b55..f41c498 100644
--- a/tests/corelib/corelib.status
+++ b/tests/corelib/corelib.status
@@ -8,8 +8,61 @@
*: Skip
[ $compiler == dart2js ]
+apply3_test: RuntimeError # mirrors not supported
+big_integer_arith_vm_test/add: CompileTimeError #Large integer literal. Not representable in JS.
+big_integer_arith_vm_test/div: CompileTimeError #Large integer literal. Not representable in JS.
+big_integer_arith_vm_test/gcd: CompileTimeError # Large integer literal. Not representable in JS.
+big_integer_arith_vm_test/mod: CompileTimeError #Large integer literal. Not representable in JS.
+big_integer_arith_vm_test/modInv: CompileTimeError #Large integer literal. Not representable in JS.
+big_integer_arith_vm_test/modPow: CompileTimeError #Large integer literal. Not representable in JS.
+big_integer_arith_vm_test/mul: CompileTimeError #Large integer literal. Not representable in JS.
+big_integer_arith_vm_test/negate: CompileTimeError #Large integer literal. Not representable in JS.
+big_integer_arith_vm_test/none: CompileTimeError #Large integer literal. Not representable in JS.
+big_integer_arith_vm_test/overflow: CompileTimeError #Large integer literal. Not representable in JS.
+big_integer_arith_vm_test/shift: CompileTimeError # Large integer literal. Not representable in JS.
+big_integer_arith_vm_test/sub: CompileTimeError #Large integer literal. Not representable in JS.
+big_integer_arith_vm_test/trunDiv: CompileTimeError #Large integer literal. Not representable in JS.
+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: CompileTimeError #Large integer literal. Not representable in JS.
+bit_twiddling_test: CompileTimeError # Large integer literal. Not representable in JS.
+compare_to2_test: RuntimeError
+date_time_test: CompileTimeError, OK # Error if web int literal cannot be represented exactly, see http://dartbug.com/33351
+double_ceil_test: CompileTimeError # Large integer literal. Not representable in JS.
+double_floor_test: CompileTimeError # Large integer literal. Not representable in JS.
+double_parse_test/01: RuntimeError
+double_round_test: CompileTimeError # Large integer literal. Not representable in JS.
+double_truncate_test: CompileTimeError # Large integer literal. Not representable in JS.
error_stack_trace1_test: RuntimeError # Issue 12399
+growable_list_test: CompileTimeError, OK # Error if web int literal cannot be represented exactly, see http://dartbug.com/33351
+hash_set_test/01: RuntimeError
+int_ceil_test: CompileTimeError # Large integer literal. Not representable in JS.
+int_ceil_to_double_test: CompileTimeError # Large integer literal. Not representable in JS.
+int_floor_test: CompileTimeError #Large integer literal. Not representable in JS.
+int_floor_to_double_test: CompileTimeError # Large integer literal. Not representable in JS.
+int_from_environment_test: CompileTimeError # Large integer literal. Not representable in JS.
+int_modulo_arith_test/bignum: CompileTimeError # Large integer literal. Not representable in JS.
+int_modulo_arith_test/modPow: CompileTimeError # Large integer literal. Not representable in JS.
+int_modulo_arith_test/none: CompileTimeError # Large integer literal. Not representable in JS.
+int_parse_radix_test/01: RuntimeError
+int_parse_radix_test/02: CompileTimeError
+int_round_test: CompileTimeError # Large integer literal. Not representable in JS.
+int_round_to_double_test: CompileTimeError # Large integer literal. Not representable in JS.
+int_to_int_test: CompileTimeError # Large integer literal. Not representable in JS.
+int_truncate_test: CompileTimeError # Large integer literal. Not representable in JS.
+int_truncate_to_double_test: CompileTimeError # Large integer literal. Not representable in JS.
+integer_to_radix_string_test: CompileTimeError # Large integer literal. Not representable in JS.
+integer_to_string_test/01: CompileTimeError # Large integer literal. Not representable in JS.
+iterable_return_type_test/02: RuntimeError
+nan_infinity_test/01: RuntimeError
+num_parse_test/01: CompileTimeError # Large integer literal. Not representable in JS.
+num_parse_test/none: CompileTimeError # Large integer literal. Not representable in JS.
+num_sign_test: CompileTimeError # Large integer literal. Not representable in JS.
regexp/pcre_test: Pass, Slow # Issue 21593
+regress_r21715_test: CompileTimeError # Large integer literal. Not representable in JS.
+string_base_vm_test: RuntimeError
+symbol_reserved_word_test/03: RuntimeError
[ $compiler == precompiler ]
apply3_test: SkipByDesign # Imports dart:mirrors
@@ -139,7 +192,7 @@
[ $compiler == dart2js && !$browser ]
package_resource_test: RuntimeError # Issue 26842
-[ $compiler == dart2js && $checked && $fasta ]
+[ $compiler == dart2js && $checked ]
big_integer_arith_vm_test/add: CompileTimeError
big_integer_arith_vm_test/div: CompileTimeError
big_integer_arith_vm_test/gcd: CompileTimeError
@@ -201,62 +254,7 @@
[ $compiler == dart2js && $fast_startup ]
apply3_test: Fail # mirrors not supported
-[ $compiler == dart2js && $fasta ]
-apply3_test: RuntimeError # mirrors not supported
-big_integer_arith_vm_test/add: CompileTimeError #Large integer literal. Not representable in JS.
-big_integer_arith_vm_test/div: CompileTimeError #Large integer literal. Not representable in JS.
-big_integer_arith_vm_test/gcd: CompileTimeError # Large integer literal. Not representable in JS.
-big_integer_arith_vm_test/mod: CompileTimeError #Large integer literal. Not representable in JS.
-big_integer_arith_vm_test/modInv: CompileTimeError #Large integer literal. Not representable in JS.
-big_integer_arith_vm_test/modPow: CompileTimeError #Large integer literal. Not representable in JS.
-big_integer_arith_vm_test/mul: CompileTimeError #Large integer literal. Not representable in JS.
-big_integer_arith_vm_test/negate: CompileTimeError #Large integer literal. Not representable in JS.
-big_integer_arith_vm_test/none: CompileTimeError #Large integer literal. Not representable in JS.
-big_integer_arith_vm_test/overflow: CompileTimeError #Large integer literal. Not representable in JS.
-big_integer_arith_vm_test/shift: CompileTimeError # Large integer literal. Not representable in JS.
-big_integer_arith_vm_test/sub: CompileTimeError #Large integer literal. Not representable in JS.
-big_integer_arith_vm_test/trunDiv: CompileTimeError #Large integer literal. Not representable in JS.
-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: CompileTimeError #Large integer literal. Not representable in JS.
-bit_twiddling_test: CompileTimeError # Large integer literal. Not representable in JS.
-compare_to2_test: RuntimeError
-date_time_test: CompileTimeError, OK # Error if web int literal cannot be represented exactly, see http://dartbug.com/33351
-double_ceil_test: CompileTimeError # Large integer literal. Not representable in JS.
-double_floor_test: CompileTimeError # Large integer literal. Not representable in JS.
-double_parse_test/01: RuntimeError
-double_round_test: CompileTimeError # Large integer literal. Not representable in JS.
-double_truncate_test: CompileTimeError # Large integer literal. Not representable in JS.
-growable_list_test: CompileTimeError, OK # Error if web int literal cannot be represented exactly, see http://dartbug.com/33351
-hash_set_test/01: RuntimeError
-int_ceil_test: CompileTimeError # Large integer literal. Not representable in JS.
-int_ceil_to_double_test: CompileTimeError # Large integer literal. Not representable in JS.
-int_floor_test: CompileTimeError #Large integer literal. Not representable in JS.
-int_floor_to_double_test: CompileTimeError # Large integer literal. Not representable in JS.
-int_from_environment_test: CompileTimeError # Large integer literal. Not representable in JS.
-int_modulo_arith_test/bignum: CompileTimeError # Large integer literal. Not representable in JS.
-int_modulo_arith_test/modPow: CompileTimeError # Large integer literal. Not representable in JS.
-int_modulo_arith_test/none: CompileTimeError # Large integer literal. Not representable in JS.
-int_parse_radix_test/01: RuntimeError
-int_parse_radix_test/02: CompileTimeError
-int_round_test: CompileTimeError # Large integer literal. Not representable in JS.
-int_round_to_double_test: CompileTimeError # Large integer literal. Not representable in JS.
-int_to_int_test: CompileTimeError # Large integer literal. Not representable in JS.
-int_truncate_test: CompileTimeError # Large integer literal. Not representable in JS.
-int_truncate_to_double_test: CompileTimeError # Large integer literal. Not representable in JS.
-integer_to_radix_string_test: CompileTimeError # Large integer literal. Not representable in JS.
-integer_to_string_test/01: CompileTimeError # Large integer literal. Not representable in JS.
-iterable_return_type_test/02: RuntimeError
-nan_infinity_test/01: RuntimeError
-num_parse_test/01: CompileTimeError # Large integer literal. Not representable in JS.
-num_parse_test/none: CompileTimeError # Large integer literal. Not representable in JS.
-num_sign_test: CompileTimeError # Large integer literal. Not representable in JS.
-regress_r21715_test: CompileTimeError # Large integer literal. Not representable in JS.
-string_base_vm_test: RuntimeError
-symbol_reserved_word_test/03: RuntimeError
-
-[ $compiler == dart2js && $fasta && $host_checked ]
+[ $compiler == dart2js && $host_checked ]
apply3_test: RuntimeError
big_integer_arith_vm_test/add: CompileTimeError
big_integer_arith_vm_test/div: CompileTimeError
@@ -298,7 +296,7 @@
num_sign_test: CompileTimeError
regress_r21715_test: CompileTimeError
-[ $compiler == dart2js && $fasta && $minified ]
+[ $compiler == dart2js && $minified ]
apply3_test: RuntimeError
big_integer_arith_vm_test/add: CompileTimeError
big_integer_arith_vm_test/div: CompileTimeError
@@ -342,30 +340,6 @@
symbol_operator_test/03: RuntimeError # Issue 27394
symbol_operator_test/none: RuntimeError
-[ $compiler == dart2js && !$fasta ]
-big_integer_*: Skip # VM specific test.
-bit_twiddling_bigint_test: RuntimeError # Requires bigint support.
-compare_to2_test: RuntimeError, OK # Requires bigint support.
-double_parse_test/01: Pass, Fail # JS implementations disagree on U+0085 being whitespace.
-hash_set_test/01: RuntimeError # Issue 11551
-int_modulo_arith_test/bignum: RuntimeError # No bigints.
-int_modulo_arith_test/modPow: RuntimeError # No bigints.
-int_parse_radix_test/01: Pass, Fail # JS implementations disagree on U+0085 being whitespace.
-int_parse_radix_test/02: Fail # No bigints.
-integer_to_radix_string_test: RuntimeError # issue 22045
-integer_to_string_test/01: RuntimeError # Issue 1533
-iterable_return_type_test/02: RuntimeError # Dart2js does not support Uint64*.
-list_unmodifiable_test: Pass, RuntimeError # Issue 28712
-nan_infinity_test/01: Fail # Issue 11551
-regress_r21715_test: RuntimeError # Requires bigint support.
-string_base_vm_test: RuntimeError, OK # VM specific test.
-symbol_reserved_word_test/02: CompileTimeError # bug 20191
-symbol_reserved_word_test/03: RuntimeError # bug 19972, new Symbol('void') should be allowed.
-symbol_reserved_word_test/04: MissingCompileTimeError
-symbol_reserved_word_test/05: Crash # bug 20191
-symbol_reserved_word_test/07: MissingCompileTimeError
-symbol_reserved_word_test/10: MissingCompileTimeError
-
[ $compiler != dart2js && $fasta ]
big_integer_arith_vm_test/add: CompileTimeError
big_integer_arith_vm_test/div: CompileTimeError
diff --git a/tests/corelib_2/corelib_2.status b/tests/corelib_2/corelib_2.status
index dda114e..9c87583 100644
--- a/tests/corelib_2/corelib_2.status
+++ b/tests/corelib_2/corelib_2.status
@@ -12,14 +12,42 @@
unicode_test: RuntimeError
[ $compiler == dart2analyzer ]
-int_parse_radix_bad_handler_test: MissingCompileTimeError
iterable_element_at_test/static: Pass
num_sign_test: Crash, Pass # Issue 31768
[ $compiler == dart2js ]
bigint_from_test: RuntimeError # Issue 32589
+bigint_test: CompileTimeError, OK # Error if web int literal cannot be represented exactly, see http://dartbug.com/33351
+bit_twiddling_test/int64: CompileTimeError, OK # Error if web int literal cannot be represented exactly, see http://dartbug.com/33351
+compare_to2_test: CompileTimeError, OK # Error if web int literal cannot be represented exactly, see http://dartbug.com/33351
date_time11_test: RuntimeError, Pass # Fails when US is on winter time, issue 31285.
+date_time_test: CompileTimeError, OK # Error if web int literal cannot be represented exactly, see http://dartbug.com/33351
+double_ceil_test/int64: CompileTimeError, OK # Error if web int literal cannot be represented exactly, see http://dartbug.com/33351
+double_floor_test/int64: CompileTimeError, OK # Error if web int literal cannot be represented exactly, see http://dartbug.com/33351
+double_round_test/int64: CompileTimeError, OK # Error if web int literal cannot be represented exactly, see http://dartbug.com/33351
+double_truncate_test/int64: CompileTimeError, OK # Error if web int literal cannot be represented exactly, see http://dartbug.com/33351
+growable_list_test: CompileTimeError, OK # Error if web int literal cannot be represented exactly, see http://dartbug.com/33351
+int_ceil_test: CompileTimeError, OK # Error if web int literal cannot be represented exactly, see http://dartbug.com/33351
+int_ceil_to_double_test: CompileTimeError, OK # Error if web int literal cannot be represented exactly, see http://dartbug.com/33351
+int_floor_test: CompileTimeError, OK # Error if web int literal cannot be represented exactly, see http://dartbug.com/33351
+int_floor_to_double_test: CompileTimeError, OK # Error if web int literal cannot be represented exactly, see http://dartbug.com/33351
+int_from_environment_int64_test: CompileTimeError, OK # Error if web int literal cannot be represented exactly, see http://dartbug.com/33351
+int_parse_radix_int64_test/01: CompileTimeError, OK # Error if web int literal cannot be represented exactly, see http://dartbug.com/33351
+int_parse_radix_int64_test/02: CompileTimeError, OK # Error if web int literal cannot be represented exactly, see http://dartbug.com/33351
+int_parse_radix_int64_test/none: CompileTimeError, OK # Error if web int literal cannot be represented exactly, see http://dartbug.com/33351
+int_parse_radix_test/01: RuntimeError
+int_round_test: CompileTimeError, OK # Error if web int literal cannot be represented exactly, see http://dartbug.com/33351
+int_round_to_double_test: CompileTimeError, OK # Error if web int literal cannot be represented exactly, see http://dartbug.com/33351
+int_to_int_test: CompileTimeError, OK # Error if web int literal cannot be represented exactly, see http://dartbug.com/33351
+int_truncate_test: CompileTimeError, OK # Error if web int literal cannot be represented exactly, see http://dartbug.com/33351
+int_truncate_to_double_test: CompileTimeError, OK # Error if web int literal cannot be represented exactly, see http://dartbug.com/33351
+integer_arith_vm_test/modPow: CompileTimeError, OK # Error if web int literal cannot be represented exactly, see http://dartbug.com/33351
+integer_arith_vm_test/none: CompileTimeError, OK # Error if web int literal cannot be represented exactly, see http://dartbug.com/33351
+integer_to_string_test/01: CompileTimeError, OK # Error if web int literal cannot be represented exactly, see http://dartbug.com/33351
list_unmodifiable_test: Pass, RuntimeError # Issue 28712
+num_parse_test/01: CompileTimeError, OK # Error if web int literal cannot be represented exactly, see http://dartbug.com/33351
+num_parse_test/none: CompileTimeError, OK # Error if web int literal cannot be represented exactly, see http://dartbug.com/33351
+num_sign_test: CompileTimeError, OK # Error if web int literal cannot be represented exactly, see http://dartbug.com/33351
[ $compiler != dartdevc ]
error_stack_trace_test/static: MissingCompileTimeError
@@ -89,6 +117,7 @@
[ !$strong ]
cast_test: SkipByDesign # Uses generic method parameters.
iterable_where_type_test: SkipByDesign
+map_test: SkipByDesign
regress_33166_test: SkipByDesign # Not a Dart 1 test
[ $arch == simarmv5te && ($runtime == dart_precompiled || $runtime == vm) ]
@@ -99,7 +128,7 @@
stopwatch_test: Skip # Flaky test due to expected performance behaviour.
# All static_tests have expected compile-time errors.
-[ $compiler != app_jitk && $compiler != dart2analyzer && $compiler != dart2js && $compiler != dartdevc && $compiler != dartdevk && $compiler != dartk && $compiler != dartkp && $compiler != fasta && $strong ]
+[ $compiler != app_jitk && $compiler != dart2analyzer && $compiler != dart2js && $compiler != dartdevc && $compiler != dartdevk && $compiler != dartk && $compiler != dartkb && $compiler != dartkp && $compiler != fasta && $strong ]
core_runtime_types_static_test: MissingCompileTimeError
splay_tree_test/01: MissingCompileTimeError
splay_tree_test/02: MissingCompileTimeError
@@ -107,18 +136,15 @@
string_replace_static_test: MissingCompileTimeError
string_static_test: MissingCompileTimeError
-[ $compiler != app_jitk && $compiler != dart2js && $compiler != dartdevc && $compiler != dartdevk && $compiler != dartk && $compiler != dartkp && $compiler != fasta ]
+[ $compiler != app_jitk && $compiler != dart2js && $compiler != dartdevc && $compiler != dartdevk && $compiler != dartk && $compiler != dartkb && $compiler != dartkp && $compiler != fasta ]
iterable_element_at_test/static: MissingCompileTimeError
-[ $compiler != app_jitk && $compiler != dart2js && $compiler != dartdevc && $compiler != dartdevk && $compiler != dartk && $compiler != dartkp && $compiler != fasta && ($compiler != dart2analyzer || !$strong) ]
+[ $compiler != app_jitk && $compiler != dart2js && $compiler != dartdevc && $compiler != dartdevk && $compiler != dartk && $compiler != dartkb && $compiler != dartkp && $compiler != fasta && ($compiler != dart2analyzer || !$strong) ]
iterable_mapping_test/01: MissingCompileTimeError
-[ $compiler != app_jitk && $compiler != dart2js && $compiler != dartdevc && $compiler != dartdevk && $compiler != dartk && $compiler != dartkp && $runtime != none ]
+[ $compiler != app_jitk && $compiler != dart2js && $compiler != dartdevc && $compiler != dartdevk && $compiler != dartk && $compiler != dartkb && $compiler != dartkp && $runtime != none ]
map_keys2_test: RuntimeError # needs Dart 2 is checks
-[ $compiler == dart2analyzer && $strong ]
-int_parse_radix_bad_handler_test: Pass
-
[ $compiler != dart2analyzer && $compiler != dart2js && $compiler != dartdevc && $compiler != dartdevk ]
bigint_js_test: SkipByDesign # JavaScript-specific test
@@ -147,7 +173,7 @@
[ $compiler == dart2js && !$browser ]
package_resource_test: RuntimeError # Issue 26842
-[ $compiler == dart2js && $checked && $fasta && $strong ]
+[ $compiler == dart2js && $checked && $strong ]
apply3_test: RuntimeError
collection_of_test: RuntimeError
error_stack_trace1_test: RuntimeError # Issue 12399
@@ -179,7 +205,7 @@
map_test: Crash # tests/corelib_2/map_test.dart:903:7: Internal problem: Unhandled Null in installDefaultConstructor.
symbol_reserved_word_test/03: RuntimeError # Issue 19972, new Symbol('void') should be allowed.
-[ $compiler == dart2js && $fast_startup && $fasta && $strong ]
+[ $compiler == dart2js && $fast_startup && $strong ]
error_stack_trace1_test: RuntimeError
growable_list_test: RuntimeError
integer_to_radix_string_test/01: RuntimeError
@@ -192,38 +218,7 @@
nan_infinity_test/01: RuntimeError
symbol_reserved_word_test/03: RuntimeError # Issue 19972, new Symbol('void') should be allowed.
-[ $compiler == dart2js && $fasta ]
-bigint_test: CompileTimeError, OK # Error if web int literal cannot be represented exactly, see http://dartbug.com/33351
-bit_twiddling_test/int64: CompileTimeError, OK # Error if web int literal cannot be represented exactly, see http://dartbug.com/33351
-compare_to2_test: CompileTimeError, OK # Error if web int literal cannot be represented exactly, see http://dartbug.com/33351
-date_time_test: CompileTimeError, OK # Error if web int literal cannot be represented exactly, see http://dartbug.com/33351
-double_ceil_test/int64: CompileTimeError, OK # Error if web int literal cannot be represented exactly, see http://dartbug.com/33351
-double_floor_test/int64: CompileTimeError, OK # Error if web int literal cannot be represented exactly, see http://dartbug.com/33351
-double_round_test/int64: CompileTimeError, OK # Error if web int literal cannot be represented exactly, see http://dartbug.com/33351
-double_truncate_test/int64: CompileTimeError, OK # Error if web int literal cannot be represented exactly, see http://dartbug.com/33351
-growable_list_test: CompileTimeError, OK # Error if web int literal cannot be represented exactly, see http://dartbug.com/33351
-int_ceil_test: CompileTimeError, OK # Error if web int literal cannot be represented exactly, see http://dartbug.com/33351
-int_ceil_to_double_test: CompileTimeError, OK # Error if web int literal cannot be represented exactly, see http://dartbug.com/33351
-int_floor_test: CompileTimeError, OK # Error if web int literal cannot be represented exactly, see http://dartbug.com/33351
-int_floor_to_double_test: CompileTimeError, OK # Error if web int literal cannot be represented exactly, see http://dartbug.com/33351
-int_from_environment_int64_test: CompileTimeError, OK # Error if web int literal cannot be represented exactly, see http://dartbug.com/33351
-int_parse_radix_int64_test/01: CompileTimeError, OK # Error if web int literal cannot be represented exactly, see http://dartbug.com/33351
-int_parse_radix_int64_test/02: CompileTimeError, OK # Error if web int literal cannot be represented exactly, see http://dartbug.com/33351
-int_parse_radix_int64_test/none: CompileTimeError, OK # Error if web int literal cannot be represented exactly, see http://dartbug.com/33351
-int_parse_radix_test/01: RuntimeError
-int_round_test: CompileTimeError, OK # Error if web int literal cannot be represented exactly, see http://dartbug.com/33351
-int_round_to_double_test: CompileTimeError, OK # Error if web int literal cannot be represented exactly, see http://dartbug.com/33351
-int_to_int_test: CompileTimeError, OK # Error if web int literal cannot be represented exactly, see http://dartbug.com/33351
-int_truncate_test: CompileTimeError, OK # Error if web int literal cannot be represented exactly, see http://dartbug.com/33351
-int_truncate_to_double_test: CompileTimeError, OK # Error if web int literal cannot be represented exactly, see http://dartbug.com/33351
-integer_arith_vm_test/modPow: CompileTimeError, OK # Error if web int literal cannot be represented exactly, see http://dartbug.com/33351
-integer_arith_vm_test/none: CompileTimeError, OK # Error if web int literal cannot be represented exactly, see http://dartbug.com/33351
-integer_to_string_test/01: CompileTimeError, OK # Error if web int literal cannot be represented exactly, see http://dartbug.com/33351
-num_parse_test/01: CompileTimeError, OK # Error if web int literal cannot be represented exactly, see http://dartbug.com/33351
-num_parse_test/none: CompileTimeError, OK # Error if web int literal cannot be represented exactly, see http://dartbug.com/33351
-num_sign_test: CompileTimeError, OK # Error if web int literal cannot be represented exactly, see http://dartbug.com/33351
-
-[ $compiler == dart2js && $fasta && $minified && $strong ]
+[ $compiler == dart2js && $minified && $strong ]
dynamic_nosuchmethod_test: RuntimeError
error_stack_trace1_test: RuntimeError # Issue 12399
growable_list_test: RuntimeError # Concurrent modifications test always runs
@@ -243,12 +238,6 @@
symbol_operator_test/none: RuntimeError
symbol_reserved_word_test/03: RuntimeError # Issue 19972, new Symbol('void') should be allowed.
-[ $compiler == dart2js && $fasta && !$strong ]
-*: SkipByDesign
-
-[ $compiler == dart2js && !$fasta ]
-*: SkipByDesign
-
[ $compiler == dart2js && $strong ]
error_stack_trace1_test: RuntimeError # Issue 12399
growable_list_test: RuntimeError # Concurrent modifications test always runs
@@ -264,6 +253,9 @@
regexp/pcre_test: RuntimeError
symbol_reserved_word_test/03: RuntimeError # Issue 19972, new Symbol('void') should be allowed.
+[ $compiler == dart2js && !$strong ]
+*: SkipByDesign
+
[ $compiler != dart2js && $fasta ]
bool_from_environment2_test/03: MissingCompileTimeError
string_from_environment3_test/03: MissingCompileTimeError
@@ -305,27 +297,6 @@
from_environment_const_type_undefined_test/16: MissingCompileTimeError
string_base_vm_static_test: MissingCompileTimeError
-[ $compiler == none && $runtime == vm && !$checked && !$fasta ]
-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
-iterable_generate_test/01: RuntimeError
-
[ $compiler == none && ($runtime == flutter || $runtime == vm) ]
iterable_to_set_test: RuntimeError # is-checks do not implement strong mode type system
@@ -340,10 +311,6 @@
apply_test: Skip # Uses new Symbol via symbolMapToStringMap helper
error_stack_trace1_test: Skip # Expects unobfuscated stack trace
-[ $compiler == app_jit || $compiler == none || $compiler == precompiler ]
-symbol_test/02: MissingCompileTimeError # Issue 11669
-symbol_test/03: MissingCompileTimeError # Issue 11669
-
[ $runtime != none && ($compiler == dart2js || $compiler == dartdevc || $compiler == dartdevk) ]
bit_twiddling_test/int64: RuntimeError, OK # Requires fixed-size int64 support.
compare_to2_test: RuntimeError, OK # Requires fixed-size int64 support.
@@ -461,6 +428,8 @@
symbol_reserved_word_test/10: MissingCompileTimeError # Issue 11669, 19972, With the exception of 'void', const Symbol() should not accept reserved words.
symbol_reserved_word_test/12: RuntimeError # Issue 11669, With the exception of 'void', new Symbol() should not accept reserved words.
symbol_test/01: Fail, Pass # Issue 11669
+symbol_test/02: MissingCompileTimeError # Issue 11669
+symbol_test/03: MissingCompileTimeError # Issue 11669
symbol_test/none: Fail # Issue 11669
unicode_test: Fail # Issue 6706
@@ -585,8 +554,8 @@
symbol_reserved_word_test/12: RuntimeError # Issue 29921
symbol_test/none: RuntimeError # Issue 29921
typed_data_with_limited_ints_test: Skip # Requires fixed-size int64 support.
-uri_test: Pass, Slow
uri_parse_test: Pass, Slow
+uri_test: Pass, Slow
[ $compiler == precompiler || $runtime == vm && !$checked && !$strong ]
int_parse_radix_test/badTypes: RuntimeError # wrong exception returned
@@ -607,6 +576,6 @@
regexp/UC16_test: RuntimeError
[ $hot_reload || $hot_reload_rollback ]
-bigint_parse_radix_test: Pass, Timeout # Issue 31659
+bigint_parse_radix_test: Pass, Timeout, Crash # Issue 31659. Issue 34361.
bigint_test: Pass, Timeout # Issue 31659
integer_parsed_mul_div_vm_test: Pass, Slow # Slow
diff --git a/tests/corelib_2/map_test.dart b/tests/corelib_2/map_test.dart
index 275b5e6..5c9e9a4 100644
--- a/tests/corelib_2/map_test.dart
+++ b/tests/corelib_2/map_test.dart
@@ -27,6 +27,7 @@
testMapLiteral();
testNullValue();
testTypes();
+ testUnmodifiableMaps();
testWeirdStringKeys(new Map());
testWeirdStringKeys(new Map<String, String>());
@@ -703,8 +704,7 @@
int id;
Equalizer(this.id);
int get hashCode => id;
- bool operator ==(Object other) =>
- other is Equalizer && id == (other as Equalizer).id;
+ bool operator ==(Object other) => other is Equalizer && id == other.id;
}
/**
@@ -721,7 +721,7 @@
// The double-fang operator falsely claims that a vampire is equal to
// any of its sire's generation.
bool operator ==(Object other) =>
- other is Vampire && generation - 1 == (other as Vampire).generation;
+ other is Vampire && generation - 1 == other.generation;
}
void testCustomMap<K, V>(Map<K, V> typedMap) {
@@ -1026,3 +1026,21 @@
Expect.equals(103, map.remove(0x20000000000000));
testLength(1, map);
}
+
+void testUnmodifiableMaps() {
+ void checkUnmodifiable(Map<int, int> map) {
+ Expect.throws(() => map[0] = 0);
+ Expect.throws(() => map.addAll({0: 0}));
+ Expect.throws(() => map.addEntries({0: 0}.entries));
+ Expect.throws(() => map.clear());
+ Expect.throws(() => map.putIfAbsent(0, () => 0));
+ Expect.throws(() => map.remove(0));
+ Expect.throws(() => map.removeWhere((k, v) => true));
+ Expect.throws(() => map.update(0, (v) => v, ifAbsent: () => 0));
+ Expect.throws(() => map.updateAll((k, v) => v));
+ }
+
+ checkUnmodifiable(const {1: 1});
+ checkUnmodifiable(Map.unmodifiable({1: 1}));
+ checkUnmodifiable(UnmodifiableMapView({1: 1}));
+}
diff --git a/tests/html/deferred_multi_app.dart b/tests/html/deferred_multi_app.dart
deleted file mode 100644
index b1fd7c5..0000000
--- a/tests/html/deferred_multi_app.dart
+++ /dev/null
@@ -1,28 +0,0 @@
-// Copyright (c) 2015, 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 "deferred_multi_app_lib.dart" deferred as lib;
-import "dart:async";
-import "dart:html";
-import "package:expect/expect.dart";
-
-main() {
- Element state = querySelector("#state");
- if (state.text == "1") {
- lib.loadLibrary().then((_) {
- var a = lib.one();
- Expect.equals("one", a);
- window.postMessage(a, '*');
- });
- state.text = "2";
- } else {
- new Timer(new Duration(milliseconds: 100), () {
- lib.loadLibrary().then((_) {
- var a = lib.two();
- Expect.equals("two", a);
- window.postMessage(a, '*');
- });
- });
- }
-}
diff --git a/tests/html/deferred_multi_app_htmltest.html b/tests/html/deferred_multi_app_htmltest.html
deleted file mode 100644
index 554adf8..0000000
--- a/tests/html/deferred_multi_app_htmltest.html
+++ /dev/null
@@ -1,23 +0,0 @@
-<!--
-Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
-for details. All rights reserved. Use of this source code is governed by a
-BSD-style license that can be found in the LICENSE file.
-
-Test that two instances of a script does not interfere when loading the same
-deferred library.
-
-START_HTML_DART_TEST
-{
- "scripts": ["deferred_multi_app.dart", "deferred_multi_app_lib.dart"],
- "expectedMessages": ["one", "two"]
-}
-END_HTML_DART_TEST
--->
-<html>
- <body>
- <div id="state">1</div>
- <script>window.parent.dispatchEvent(new Event('detect_errors'));</script>
- <script src="deferred_multi_app.dart" type="application/dart"></script>
- <script src="deferred_multi_app.dart" type="application/dart"></script>
- </body>
-</html>
diff --git a/tests/html/deferred_multi_app_lib.dart b/tests/html/deferred_multi_app_lib.dart
deleted file mode 100644
index de4e651..0000000
--- a/tests/html/deferred_multi_app_lib.dart
+++ /dev/null
@@ -1,11 +0,0 @@
-// Copyright (c) 2015, 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.
-
-one() {
- return "one";
-}
-
-two() {
- return "two";
-}
diff --git a/tests/html/html.status b/tests/html/html.status
index 1a02eae..c05e1b0 100644
--- a/tests/html/html.status
+++ b/tests/html/html.status
@@ -30,21 +30,30 @@
custom/document_register_type_extensions_test/construction: Pass, Timeout # Roll 50 failure
custom/document_register_type_extensions_test/registration: Pass, Timeout # Roll 50 failure
custom/entered_left_view_test/shadow_dom: Pass, Timeout # Roll 50 failure
+custom/mirrors_2_test: RuntimeError
+custom/mirrors_test: RuntimeError
fileapi_test/directoryReader: Pass, Timeout # Roll 50 failure
fileapi_test/entry: Pass, Timeout # Roll 50 failure
+fileapi_test/entry: RuntimeError
fileapi_test/fileEntry: Pass, Timeout # Roll 50 failure
fileapi_test/getDirectory: Pass, Timeout # Roll 50 failure
fileapi_test/getFile: Pass, Timeout # Roll 50 failure
indexeddb_1_test/functional: Pass, Timeout # Roll 50 failure
+indexeddb_1_test/functional: RuntimeError
indexeddb_2_test: Pass, Timeout # Roll 50 failure
indexeddb_3_test: Pass, Timeout # Roll 50 failure
+indexeddb_3_test: RuntimeError
indexeddb_4_test: Pass, Timeout # Roll 50 failure
indexeddb_5_test: Pass, Timeout # Roll 50 failure
+indexeddb_5_test: RuntimeError
input_element_test/attributes: Fail # Issue 21555
isolates_test: SkipByDesign
js_typed_interop_default_arg_test/default_value: MissingCompileTimeError # Issue #25759
+js_typed_interop_default_arg_test/explicit_argument: RuntimeError
js_typed_interop_side_cast_exp_test: Pass, RuntimeError # Roll 50 failure
+js_typed_interop_test/static_method_tearoff_1: RuntimeError
mirrors_js_typed_interop_test: Pass, Slow
+mirrors_js_typed_interop_test: SkipByDesign
svgelement_test/PathElement: Pass, RuntimeError # Roll 50 failure
worker_api_test: SkipByDesign
wrapping_collections_test: SkipByDesign # Testing an issue that is only relevant to Dartium
@@ -62,7 +71,6 @@
crypto_test/supported: Fail # IE11 Feature support statuses - These results not yet noted in platform support annotations. All changes should be accompanied by platform support annotation changes.
css_test/supportsPointConversions: Fail # IE11 Feature support statuses - These results not yet noted in platform support annotations. All changes should be accompanied by platform support annotation changes.
custom/document_register_type_extensions_test/single-parameter: Fail # Issue 13193.
-deferred_multi_app_htmltest: Skip # Times out on IE. Issue 21537
element_animate_test: Fail # Element.animate not supported on these browsers.
element_test/click: Fail # IE does not support firing this event.
element_types_test/supported_content: Fail # IE11 Feature support statuses - These results not yet noted in platform support annotations. All changes should be accompanied by platform support annotation changes.
@@ -90,12 +98,10 @@
media_stream_test/supported_media: Fail # IE11 Feature support statuses - These results not yet noted in platform support annotations. All changes should be accompanied by platform support annotation changes.
mediasource_test/functional: Pass, Fail # Fails on Windows 8
mediasource_test/supported: Pass, Fail # Should pass on Windows 8
-no_linked_scripts_htmltest: Skip # Times out on IE. Issue 21537
notification_test/supported_notification: Fail # Notification not supported on IE
postmessage_structured_test/more_primitives: Fail # Does not support the MessageEvent constructor.
request_animation_frame_test: Skip # Times out. Issue 22167
rtc_test/supported: Fail # IE11 Feature support statuses - These results not yet noted in platform support annotations. All changes should be accompanied by platform support annotation changes.
-scripts_htmltest: Skip # Times out on IE. Issue 21537
serialized_script_value_test: Fail
shadow_dom_test/supported: Fail # IE11 Feature support statuses - These results not yet noted in platform support annotations. All changes should be accompanied by platform support annotation changes.
speechrecognition_test/supported: Fail # IE11 Feature support statuses - These results not yet noted in platform support annotations. All changes should be accompanied by platform support annotation changes.
@@ -110,7 +116,6 @@
touchevent_test/supported: Fail # IE does not support TouchEvents
transferables_test: Pass, Fail # Issues 20659.
transition_event_test/functional: Skip # Times out. Issue 22167
-two_scripts_htmltest: Skip # Times out on IE. Issue 21537
webgl_1_test/functional: Fail # IE11 Feature support statuses - These results not yet noted in platform support annotations. All changes should be accompanied by platform support annotation changes.
websocket_test/websocket: Fail # Issue 7875. Closed with "working as intended".
websql_test: Fail # IE11 Feature support statuses - These results not yet noted in platform support annotations. All changes should be accompanied by platform support annotation changes.
@@ -192,7 +197,7 @@
speechrecognition_test/types: Fail # TODO(dart2js-team): Please triage this failure.
xhr_test/json: Fail # TODO(dart2js-team): Please triage this failure.
-[ $compiler == dart2js && $runtime == d8 && $fasta ]
+[ $compiler == dart2js && $runtime == d8 ]
async_spawnuri_test: RuntimeError
audiobuffersourcenode_test: RuntimeError
audiocontext_test: RuntimeError
@@ -362,7 +367,7 @@
xhr_test: RuntimeError
xsltprocessor_test: RuntimeError
-[ $compiler == dart2js && $runtime == d8 && $fasta && $minified ]
+[ $compiler == dart2js && $runtime == d8 && $minified ]
fontface_loaded_test: RuntimeError
streams_test: RuntimeError
@@ -402,9 +407,6 @@
custom/js_custom_test: Fail # Issue 14643
[ $compiler == dart2js && $checked ]
-js_function_getter_trust_types_test: Skip # --trust-type-annotations incompatible with --checked
-
-[ $compiler == dart2js && $checked && $fasta ]
canvasrenderingcontext2d_test/drawImage_image_element: Timeout
canvasrenderingcontext2d_test/drawImage_video_element: Timeout
canvasrenderingcontext2d_test/drawImage_video_element_dataUrl: Timeout
@@ -440,6 +442,7 @@
indexeddb_1_test/functional: RuntimeError
indexeddb_2_test: RuntimeError
indexeddb_4_test: RuntimeError
+js_function_getter_trust_types_test: Skip # --trust-type-annotations incompatible with --checked
js_test/JsObject.fromBrowserObject(): RuntimeError
js_test/JsObject.jsify(): RuntimeError
js_util_test/js_util.jsify(): RuntimeError
@@ -486,19 +489,7 @@
custom/mirrors_test: Fail # mirrors not supported
mirrors_js_typed_interop_test: Fail # mirrors not supported
-[ $compiler == dart2js && $fasta ]
-custom/mirrors_2_test: RuntimeError
-custom/mirrors_test: RuntimeError
-deferred_multi_app_htmltest: CompileTimeError
-fileapi_test/entry: RuntimeError
-indexeddb_1_test/functional: RuntimeError
-indexeddb_3_test: RuntimeError
-indexeddb_5_test: RuntimeError
-js_typed_interop_default_arg_test/explicit_argument: RuntimeError
-js_typed_interop_test/static_method_tearoff_1: RuntimeError
-mirrors_js_typed_interop_test: SkipByDesign
-
-[ $compiler == dart2js && $fasta && $host_checked ]
+[ $compiler == dart2js && $host_checked ]
fontface_loaded_test: RuntimeError
streams_test: RuntimeError
@@ -524,10 +515,6 @@
transition_event_test/functional: Skip # Times out. Issue 22167
[ $runtime == chrome && $csp ]
-deferred_multi_app_htmltest: SkipByDesign # uses inline script
-no_linked_scripts_htmltest: SkipByDesign # uses inline script
-scripts_htmltest: SkipByDesign # uses inline script
-two_scripts_htmltest: SkipByDesign # uses inline script
worker_test/functional: SkipByDesign # starts worker with inline script
[ $runtime == chrome || $runtime == chromeOnAndroid ]
diff --git a/tests/html/no_linked_scripts_htmltest.html b/tests/html/no_linked_scripts_htmltest.html
deleted file mode 100644
index 3ec0861..0000000
--- a/tests/html/no_linked_scripts_htmltest.html
+++ /dev/null
@@ -1,33 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
-for details. All rights reserved. Use of this source code is governed by a
-BSD-style license that can be found in the LICENSE file.
--->
-<!--
-START_HTML_DART_TEST
-{
- "scripts": [ ],
- "expectedMessages": ["hest", "fisk"]
-}
-END_HTML_DART_TEST
--->
-<html>
-<head>
- <script>window.parent.dispatchEvent(new Event('detect_errors'));</script>
- <title>No Linked Scripts HTML test</title>
-</head><body>
- <h1>No Linked Scripts HTML test</h1>
- <script>
- window.postMessage('fisk', '*');
- window.postMessage('ged', '*');
- window.postMessage('fisk', '*');
-
- function delayed() {
- parent.postMessage('ko', '*');
- window.postMessage('hest', '*');
- }
- setTimeout(delayed, 500);
- </script>
-</body>
-</html>
diff --git a/tests/html/scripts_htmltest.html b/tests/html/scripts_htmltest.html
deleted file mode 100644
index 1819595..0000000
--- a/tests/html/scripts_htmltest.html
+++ /dev/null
@@ -1,24 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
-for details. All rights reserved. Use of this source code is governed by a
-BSD-style license that can be found in the LICENSE file.
--->
-<!--
-START_HTML_DART_TEST
-{
- "scripts": ["scripts_test_dart.dart", "scripts_test_js.js"],
- "expectedMessages": ["crab", "fish", "squid", "sea urchin"]
-}
-END_HTML_DART_TEST
--->
-<html>
-<head>
- <script>window.parent.dispatchEvent(new Event('detect_errors'));</script>
- <title>Scripts HTML test</title>
-</head><body>
- <h1>Scripts HTML test</h1>
- <script src="scripts_test_dart.dart" type="application/dart"></script>
- <script src="scripts_test_js.js"></script>
-</body>
-</html>
diff --git a/tests/html/scripts_test_dart.dart b/tests/html/scripts_test_dart.dart
deleted file mode 100644
index cd7bc5a..0000000
--- a/tests/html/scripts_test_dart.dart
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library ScriptsTestDart;
-
-import 'dart:html';
-import 'dart:async';
-
-main() {
- window.postMessage('squid', '*');
- window.postMessage('tiger', '*'); // Unexpected message OK.
- new Timer(new Duration(seconds: 1), () {
- window.postMessage('squid', '*'); // Duplicate message OK.
- window.postMessage('sea urchin', '*');
- });
-}
diff --git a/tests/html/scripts_test_js.js b/tests/html/scripts_test_js.js
deleted file mode 100644
index 552d418..0000000
--- a/tests/html/scripts_test_js.js
+++ /dev/null
@@ -1,12 +0,0 @@
-// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-window.postMessage('fish', '*');
-
-function delayed() {
- window.postMessage('cow', '*'); // Unexpected message OK.
- parent.postMessage('weasel', '*'); // Message to parent OK.
- window.postMessage('crab', '*');
-}
-setTimeout(delayed, 500);
diff --git a/tests/html/two_scripts_htmltest.html b/tests/html/two_scripts_htmltest.html
deleted file mode 100644
index 1a244ca..0000000
--- a/tests/html/two_scripts_htmltest.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
-for details. All rights reserved. Use of this source code is governed by a
-BSD-style license that can be found in the LICENSE file.
--->
-<!--
-START_HTML_DART_TEST
-{
- "scripts": ["two_scripts_test_first.dart", "two_scripts_test_second.dart"],
- "expectedMessages":
- ["first_local", "first_global", "second_local", "second_global"]
-}
-END_HTML_DART_TEST
--->
-<html>
-<head>
- <script>window.parent.dispatchEvent(new Event('detect_errors'));</script>
- <title>Two Scripts HTML test</title>
-</head><body>
- <h1>Two Scripts HTML test</h1>
- <script src="two_scripts_test_first.dart" type="application/dart"></script>
- <script src="two_scripts_test_second.dart" type="application/dart"></script>
-</body>
-</html>
diff --git a/tests/html/two_scripts_test_first.dart b/tests/html/two_scripts_test_first.dart
deleted file mode 100644
index 6a1f1d1..0000000
--- a/tests/html/two_scripts_test_first.dart
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library TwoScriptsTestFirst;
-
-import 'dart:html';
-
-aGlobalFunction() {
- window.postMessage('first_global', '*');
-}
-
-main() {
- window.postMessage('first_local', '*');
- aGlobalFunction();
-}
diff --git a/tests/html/two_scripts_test_second.dart b/tests/html/two_scripts_test_second.dart
deleted file mode 100644
index b959396..0000000
--- a/tests/html/two_scripts_test_second.dart
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library TwoScriptsTestSecond;
-
-import 'dart:html';
-
-aGlobalFunction() {
- window.postMessage('second_global', '*');
-}
-
-main() {
- window.postMessage('second_local', '*');
- aGlobalFunction();
-}
diff --git a/tests/kernel/kernel.status b/tests/kernel/kernel.status
index f00e5df..82cce18 100644
--- a/tests/kernel/kernel.status
+++ b/tests/kernel/kernel.status
@@ -6,6 +6,8 @@
unsorted/invocation_errors_test: Pass
unsorted/nsm_dispatcher_test: Skip # The test uses Symbol without MirrorsUsed
unsorted/simple_literal_test/01: Skip # The test expects error for large integer literal.
+unsorted/super_mixin_test: RuntimeError
+unsorted/try_finally_test: Crash
[ !$fasta ]
unsorted/loop_test: Skip # This test uses optional new/const.
@@ -16,16 +18,9 @@
[ $compiler == dart2analyzer && $runtime == none ]
unsorted/super_mixin_test: CompileTimeError
-[ $compiler == dart2js && $fasta ]
-unsorted/super_mixin_test: RuntimeError
-unsorted/try_finally_test: Crash
-
-[ $compiler == dart2js && $fasta && $host_checked ]
+[ $compiler == dart2js && $host_checked ]
unsorted/super_mixin_test: Crash
-[ $compiler == dart2js && !$fasta ]
-unsorted/super_mixin_test: CompileTimeError
-
[ $compiler == dart2js && !$strong ]
unsorted/types_test: RuntimeError
diff --git a/tests/language/language.status b/tests/language/language.status
index b5fd39b0..a655de2 100644
--- a/tests/language/language.status
+++ b/tests/language/language.status
@@ -330,7 +330,6 @@
large_class_declaration_test: SkipSlow # Uses too much memory.
[ $arch == ia32 && $compiler == none && $runtime == vm && $system == windows ]
-disassemble_test: Pass, Crash # Issue 34030
vm/optimized_stacktrace_test: Pass, Crash # Issue 28276
[ $arch == ia32 && $mode == release && $runtime == vm ]
diff --git a/tests/language/language_dart2js.status b/tests/language/language_dart2js.status
index bac34af..a7b9138 100644
--- a/tests/language/language_dart2js.status
+++ b/tests/language/language_dart2js.status
@@ -6,283 +6,12 @@
switch_case_warn_test: Skip # Analyzer only, see language_analyzer2.status
[ $compiler == dart2js ]
+arithmetic_test: CompileTimeError # Int larger than 64 bits
async_await_test: RuntimeError # sync-async is on by default
+async_star_cancel_while_paused_test: RuntimeError
asyncstar_throw_in_catch_test: RuntimeError # sync-async is on by default
await_nonfuture_test: RuntimeError # sync-async is on by default
await_not_started_immediately_test: RuntimeError # sync-async is on by default
-full_stacktrace1_test: Pass, RuntimeError # Issue 12698
-full_stacktrace2_test: Pass, RuntimeError # Issue 12698
-full_stacktrace3_test: Pass, RuntimeError # Issue 12698
-issue23244_test: RuntimeError # 23244
-library_env_test/has_no_html_support: RuntimeError, OK
-main_test/03: MissingRuntimeError # dart:isolate not supported
-vm/*: Skip # Issue 12699
-
-[ $arch == ia32 && $compiler == dart2js && $runtime == d8 ]
-new_expression2_negative_test: Pass, Crash # Flaky, issue 31131
-
-[ $builder_tag == win7 && $compiler == dart2js && $fasta ]
-deep_nesting2_negative_test: Crash
-illegal_declaration_test/01: Crash
-issue1578_negative_test: Crash
-regress_23051_test/01: Crash
-
-[ $compiler == dart2js && $runtime == chrome && $system == macos ]
-await_future_test: Pass, Timeout # Issue 26735
-
-[ $compiler == dart2js && $runtime == chromeOnAndroid ]
-override_field_test/02: Pass, Slow # TODO(kasperl): Please triage.
-
-[ $compiler == dart2js && $runtime == d8 && $fasta ]
-int_round_to_double_test: RuntimeError # Large integer literal. Not valid in dart2.
-regress_23408_test: RuntimeError
-
-[ $compiler == dart2js && $runtime == ff ]
-round_test: Pass, Fail, OK # Fixed in ff 35. Common JavaScript engine Math.round bug.
-
-[ $compiler == dart2js && $runtime != ff && $fasta ]
-stacktrace_test: RuntimeError # Issue 12698
-
-[ $compiler == dart2js && $runtime == jsshell && !$fasta ]
-async_star_no_cancel2_test: RuntimeError # Need triage
-async_star_no_cancel_test: RuntimeError # Need triage
-async_star_test: RuntimeError # Jsshell does not provide non-zero timers, Issue 7728
-await_for_test: Skip # Jsshell does not provide periodic timers, Issue 7728
-regress_23996_test: RuntimeError # Jsshell does not provide non-zero timers, Issue 7728
-
-[ $compiler == dart2js && $runtime == none ]
-*: Fail, Pass # TODO(ahe): Triage these tests.
-
-[ $compiler == dart2js && $runtime == none && $fasta ]
-*: Fail, Pass, Crash # TODO(sigmund): we should have no crashes when migration completes
-
-[ $compiler == dart2js && $runtime == safari ]
-round_test: Fail, OK # Common JavaScript engine Math.round bug.
-
-[ $compiler == dart2js && $runtime == safari && $fasta ]
-call_nonexistent_constructor_test/02: RuntimeError
-named_parameters2_test: RuntimeError
-named_parameters3_test: RuntimeError
-named_parameters4_test: RuntimeError
-
-[ $compiler == dart2js && $system == windows && $fasta ]
-deep_nesting2_negative_test: Pass, Crash
-illegal_declaration_test/01: Pass, Crash
-issue1578_negative_test: Pass, Crash
-regress_23051_test/01: Pass, Crash
-
-[ $compiler == dart2js && $system == windows && !$fasta && ($runtime == chrome || $runtime == ff) ]
-string_literals_test: RuntimeError # Issue 27533
-
-[ $compiler == dart2js && $browser ]
-config_import_test: RuntimeError # Test flag is not passed to the compiler.
-library_env_test/has_io_support: RuntimeError, OK # dart2js doesn't support io when using '--categories=Client'.
-
-[ $compiler == dart2js && !$browser ]
-library_env_test/has_no_io_support: RuntimeError, OK # dart2js supports io when using '--categories=all'.
-
-[ $compiler == dart2js && !$browser && $fasta ]
-config_import_corelib_test: RuntimeError, OK # all dart:* are supported when using '--categories=all'.
-
-[ $compiler == dart2js && $checked && $fasta ]
-arithmetic_test: CompileTimeError
-assertion_initializer_const_function_test/01: RuntimeError
-assertion_initializer_test: RuntimeError
-assign_static_type_test/01: Fail
-assign_static_type_test/02: MissingCompileTimeError
-async_return_types_test/nestedFuture: Fail # Issue 26429
-async_return_types_test/wrongTypeParameter: Fail # Issue 26429
-closure_type_test/01: RuntimeError # Issue 12745
-closure_type_test/none: RuntimeError # Issue 12745
-compile_time_constant_checked2_test/01: MissingCompileTimeError
-compile_time_constant_checked2_test/02: MissingCompileTimeError
-compile_time_constant_checked2_test/03: MissingCompileTimeError
-compile_time_constant_checked2_test/04: MissingCompileTimeError
-compile_time_constant_checked2_test/05: MissingCompileTimeError
-compile_time_constant_checked2_test/06: MissingCompileTimeError
-compile_time_constant_checked3_test/01: MissingCompileTimeError
-compile_time_constant_checked3_test/02: MissingCompileTimeError
-compile_time_constant_checked3_test/03: MissingCompileTimeError
-compile_time_constant_checked3_test/04: MissingCompileTimeError
-compile_time_constant_checked3_test/05: MissingCompileTimeError
-compile_time_constant_checked3_test/06: MissingCompileTimeError
-compile_time_constant_checked4_test/01: MissingCompileTimeError
-compile_time_constant_checked4_test/02: MissingCompileTimeError
-compile_time_constant_checked4_test/03: MissingCompileTimeError
-compile_time_constant_checked5_test/03: MissingCompileTimeError
-compile_time_constant_checked5_test/04: MissingCompileTimeError
-compile_time_constant_checked5_test/08: MissingCompileTimeError
-compile_time_constant_checked5_test/09: MissingCompileTimeError
-compile_time_constant_checked5_test/13: MissingCompileTimeError
-compile_time_constant_checked5_test/14: MissingCompileTimeError
-compile_time_constant_checked5_test/18: MissingCompileTimeError
-compile_time_constant_checked5_test/19: MissingCompileTimeError
-compile_time_constant_checked_test/01: Fail
-compile_time_constant_checked_test/02: MissingCompileTimeError
-compile_time_constant_checked_test/03: Fail
-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/20: MissingCompileTimeError
-const_constructor2_test/22: MissingCompileTimeError
-const_constructor2_test/24: MissingCompileTimeError
-const_constructor3_test/02: MissingCompileTimeError
-const_constructor3_test/04: MissingCompileTimeError
-const_init2_test/02: MissingCompileTimeError
-deferred_constraints_constants_test/none: Crash # Unsupported operation: KernelDeferredLoadTask.addMirrorElementsForLibrary
-deferred_constraints_constants_test/reference_after_load: Crash # Unsupported operation: KernelDeferredLoadTask.addMirrorElementsForLibrary
-deferred_constraints_type_annotation_test/type_annotation1: Fail # Missing dynamic type error
-deferred_constraints_type_annotation_test/type_annotation_generic1: Fail # Missing dynamic type error
-deferred_constraints_type_annotation_test/type_annotation_generic4: Fail # Missing dynamic type error
-deopt_inlined_function_lazy_test: CompileTimeError
-factory_redirection_test/08: Fail
-factory_redirection_test/09: Fail
-factory_redirection_test/10: Fail
-factory_redirection_test/12: Fail
-factory_redirection_test/13: Fail
-factory_redirection_test/14: Fail
-generalized_void_syntax_test: RuntimeError
-generic_functions_test: RuntimeError
-generic_methods_test: RuntimeError
-guess_cid_test: CompileTimeError
-int2_test: CompileTimeError
-internal_library_test/02: Crash # NoSuchMethodError: Class 'DillLibraryBuilder' has no instance getter 'mixinApplicationClasses'.
-list_literal1_test/01: MissingCompileTimeError
-malbounded_instantiation_test/01: RuntimeError # Issue 12702
-malbounded_redirecting_factory2_test/02: Fail
-malbounded_redirecting_factory2_test/03: Fail
-malbounded_redirecting_factory2_test/04: Fail
-malbounded_type_cast2_test: RuntimeError # Issue 14121
-malbounded_type_cast_test: RuntimeError # Issue 14121
-malbounded_type_test2_test: RuntimeError # Issue 14121
-malbounded_type_test_test/03: Fail # Issue 14121
-malbounded_type_test_test/04: Fail # Issue 14121
-malformed2_test/00: RuntimeError
-malformed2_test/01: MissingCompileTimeError
-map_literal1_test/01: MissingCompileTimeError
-mint_compares_test: CompileTimeError
-number_identity_test: CompileTimeError
-redirecting_factory_infinite_steps_test/01: Fail
-redirecting_factory_malbounded_test/01: Fail
-regress_26133_test: RuntimeError # Issue 26429
-regress_29405_test: RuntimeError # Issue 29422
-stacktrace_demangle_ctors_test: RuntimeError
-stacktrace_test: RuntimeError
-super_call4_test: Crash # NoSuchMethodError: The getter 'thisLocal' was called on null.
-type_check_const_function_typedef2_test/00: MissingCompileTimeError
-type_parameter_test/01: Crash # Internal Error: Unexpected type variable in static context.
-type_parameter_test/02: Crash # Internal Error: Unexpected type variable in static context.
-type_parameter_test/03: Crash # Internal Error: Unexpected type variable in static context.
-type_parameter_test/04: Crash # Internal Error: Unexpected type variable in static context.
-type_parameter_test/05: Crash # Internal Error: Unexpected type variable in static context.
-type_parameter_test/06: Crash # Internal Error: Unexpected type variable in static context.
-type_parameter_test/none: Crash # Internal Error: Unexpected type variable in static context.
-type_variable_bounds2_test/01: RuntimeError # Issue 12702
-type_variable_bounds2_test/04: RuntimeError # Issue 12702
-type_variable_bounds3_test/00: Fail # Issue 12702
-type_variable_bounds_test/02: Fail # Issue 12702
-type_variable_scope_test/03: Crash # Internal Error: Unexpected type variable in static context.
-
-[ $compiler == dart2js && $checked && $fasta && $host_checked ]
-generic_functions_test: Crash
-generic_methods_test: Crash
-
-[ $compiler == dart2js && $checked && !$fasta ]
-async_return_types_test/nestedFuture: Fail # Issue 26429
-async_return_types_test/wrongTypeParameter: Fail # Issue 26429
-closure_type_test: Fail # Issue 12745
-default_factory2_test/01: Fail # Issue 14121
-malbounded_instantiation_test/01: Fail # Issue 12702
-malbounded_redirecting_factory2_test/02: Fail # Issue 12825
-malbounded_redirecting_factory2_test/03: Fail # Issue 12825
-malbounded_redirecting_factory_test/02: Fail # Issue 12825
-malbounded_redirecting_factory_test/03: Fail # Issue 12825
-malbounded_type_cast2_test: Fail # Issue 14121
-malbounded_type_cast_test: Fail # Issue 14121
-malbounded_type_test2_test: Fail # Issue 14121
-malbounded_type_test_test/03: Fail # Issue 14121
-malbounded_type_test_test/04: Fail # Issue 14121
-regress_26133_test: RuntimeError # Issue 26429
-regress_29405_test: Fail # Issue 29422
-type_variable_bounds2_test/01: Fail # Issue 12702
-type_variable_bounds2_test/04: Fail # Issue 12702
-type_variable_bounds2_test/06: Pass # Issue 12702 (pass for the wrong reasons).
-type_variable_bounds3_test/00: Fail # Issue 12702
-type_variable_bounds_test/02: Fail # Issue 12702
-
-[ $compiler == dart2js && !$checked ]
-assertion_test: RuntimeError
-generic_test: RuntimeError, OK
-issue13474_test: RuntimeError, OK
-map_literal4_test: RuntimeError, OK # Checked mode required.
-named_parameters_type_test/01: MissingRuntimeError, OK
-named_parameters_type_test/02: MissingRuntimeError, OK
-named_parameters_type_test/03: MissingRuntimeError, OK
-positional_parameters_type_test/01: MissingRuntimeError, OK
-positional_parameters_type_test/02: MissingRuntimeError, OK
-type_checks_in_factory_method_test: RuntimeError # Issue 12746
-
-[ $compiler == dart2js && !$checked && $enable_asserts ]
-bool_check_test: RuntimeError # Issue 29647
-
-[ $compiler == dart2js && !$checked && $enable_asserts && !$fasta ]
-assertion_test: RuntimeError # Issue 12748
-
-[ $compiler == dart2js && !$checked && $fasta ]
-assertion_initializer_const_function_error_test/01: MissingCompileTimeError
-
-[ $compiler == dart2js && !$checked && $fasta && $minified ]
-f_bounded_quantification5_test: RuntimeError
-
-[ $compiler == dart2js && !$checked && !$fasta && $minified ]
-f_bounded_quantification5_test: Fail, OK # Issue 12605
-
-[ $compiler == dart2js && $fast_startup && $fasta ]
-deferred_constraints_constants_test/none: Crash # Unsupported operation: KernelDeferredLoadTask.addMirrorElementsForLibrary
-deferred_constraints_constants_test/reference_after_load: Crash # Unsupported operation: KernelDeferredLoadTask.addMirrorElementsForLibrary
-internal_library_test/02: Crash # NoSuchMethodError: Class 'DillLibraryBuilder' has no instance getter 'mixinApplicationClasses'.
-stacktrace_demangle_ctors_test: RuntimeError
-super_call4_test: Crash # NoSuchMethodError: The getter 'thisLocal' was called on null.
-
-[ $compiler == dart2js && $fast_startup && !$fasta ]
-assertion_initializer_const_error2_test/*: Crash
-assertion_initializer_const_error2_test/cc10: CompileTimeError # Issue #31321
-assertion_initializer_const_error2_test/cc11: CompileTimeError # Issue #31321
-assertion_initializer_const_error2_test/none: Pass
-assertion_initializer_const_function_error_test/01: Crash
-assertion_initializer_const_function_test/01: CompileTimeError
-const_evaluation_test/*: Fail # mirrors not supported
-deferred_constraints_constants_test: Pass # mirrors not supported, passes for the wrong reason
-deferred_constraints_constants_test/none: Fail # mirrors not supported
-deferred_constraints_constants_test/reference_after_load: Fail # mirrors not supported
-enum_mirror_test: Fail # mirrors not supported
-field_increment_bailout_test: Fail # mirrors not supported
-instance_creation_in_function_annotation_test: Fail # mirrors not supported
-invocation_mirror2_test: Fail # mirrors not supported
-invocation_mirror_invoke_on2_test: Fail # mirrors not supported
-invocation_mirror_invoke_on_test: Fail # mirrors not supported
-issue21079_test: Fail # mirrors not supported
-library_env_test/has_mirror_support: Fail # mirrors not supported
-library_env_test/has_no_mirror_support: Pass # fails for the wrong reason.
-many_overridden_no_such_method_test: Fail # mirrors not supported
-no_such_method_test: Fail # mirrors not supported
-null_test/0*: Pass # mirrors not supported, fails for the wrong reason
-null_test/none: Fail # mirrors not supported
-overridden_no_such_method_test: Fail # mirrors not supported
-redirecting_factory_reflection_test: Fail # mirrors not supported
-regress_13462_0_test: Fail # mirrors not supported
-regress_13462_1_test: Fail # mirrors not supported
-regress_18535_test: Fail # mirrors not supported
-regress_28255_test: Fail # mirrors not supported
-super_call4_test: Fail # mirrors not supported
-super_getter_setter_test: Fail # mirrors not supported
-vm/reflect_core_vm_test: Fail # mirrors not supported
-
-[ $compiler == dart2js && $fasta ]
-arithmetic_test: CompileTimeError # Int larger than 64 bits
-async_star_cancel_while_paused_test: RuntimeError
bad_override_test/03: MissingCompileTimeError
bad_override_test/04: MissingCompileTimeError
bad_override_test/05: MissingCompileTimeError
@@ -353,6 +82,9 @@
final_attempt_reinitialization_test/01: MissingCompileTimeError
final_attempt_reinitialization_test/02: MissingCompileTimeError
final_field_initialization_order_test: RuntimeError
+full_stacktrace1_test: Pass, RuntimeError # Issue 12698
+full_stacktrace2_test: Pass, RuntimeError # Issue 12698
+full_stacktrace3_test: Pass, RuntimeError # Issue 12698
generic_methods_type_expression_test/01: RuntimeError
generic_methods_type_expression_test/03: RuntimeError
generic_methods_type_expression_test/none: RuntimeError
@@ -375,11 +107,14 @@
invocation_mirror_invoke_on_test: RuntimeError # mirrors not supported
invocation_mirror_test: RuntimeError # mirrors not supported
issue21079_test: RuntimeError
+issue23244_test: RuntimeError # 23244
left_shift_test: RuntimeError
library_env_test/has_mirror_support: RuntimeError, OK
+library_env_test/has_no_html_support: RuntimeError, OK
list_literal4_test: RuntimeError
list_test: CompileTimeError, OK # Error if web int literal cannot be represented exactly, see http://dartbug.com/33351
main_not_a_function_test/01: CompileTimeError
+main_test/03: MissingRuntimeError # dart:isolate not supported
many_overridden_no_such_method_test: RuntimeError
method_override5_test: RuntimeError
method_override7_test/00: MissingCompileTimeError
@@ -550,8 +285,189 @@
truncdiv_test: RuntimeError
type_literal_prefix_call_test/00: RuntimeError
type_variable_conflict2_test/02: MissingCompileTimeError
+vm/*: Skip # Issue 12699
-[ $compiler == dart2js && $fasta && $host_checked ]
+[ $arch == ia32 && $compiler == dart2js && $runtime == d8 ]
+new_expression2_negative_test: Pass, Crash # Flaky, issue 31131
+
+[ $builder_tag == win7 && $compiler == dart2js ]
+deep_nesting2_negative_test: Crash
+illegal_declaration_test/01: Crash
+issue1578_negative_test: Crash
+regress_23051_test/01: Crash
+
+[ $compiler == dart2js && $runtime == chrome && $system == macos ]
+await_future_test: Pass, Timeout # Issue 26735
+
+[ $compiler == dart2js && $runtime == chromeOnAndroid ]
+override_field_test/02: Pass, Slow # TODO(kasperl): Please triage.
+
+[ $compiler == dart2js && $runtime == d8 ]
+int_round_to_double_test: RuntimeError # Large integer literal. Not valid in dart2.
+regress_23408_test: RuntimeError
+
+[ $compiler == dart2js && $runtime == ff ]
+round_test: Pass, Fail, OK # Fixed in ff 35. Common JavaScript engine Math.round bug.
+
+[ $compiler == dart2js && $runtime != ff ]
+stacktrace_test: RuntimeError # Issue 12698
+
+[ $compiler == dart2js && $runtime == none ]
+*: Fail, Pass # TODO(ahe): Triage these tests.
+
+[ $compiler == dart2js && $runtime == safari ]
+call_nonexistent_constructor_test/02: RuntimeError
+named_parameters2_test: RuntimeError
+named_parameters3_test: RuntimeError
+named_parameters4_test: RuntimeError
+round_test: Fail, OK # Common JavaScript engine Math.round bug.
+
+[ $compiler == dart2js && $system == windows ]
+deep_nesting2_negative_test: Pass, Crash
+illegal_declaration_test/01: Pass, Crash
+issue1578_negative_test: Pass, Crash
+regress_23051_test/01: Pass, Crash
+
+[ $compiler == dart2js && $browser ]
+config_import_test: RuntimeError # Test flag is not passed to the compiler.
+library_env_test/has_io_support: RuntimeError, OK # dart2js doesn't support io when using '--categories=Client'.
+
+[ $compiler == dart2js && !$browser ]
+config_import_corelib_test: RuntimeError, OK # all dart:* are supported when using '--categories=all'.
+library_env_test/has_no_io_support: RuntimeError, OK # dart2js supports io when using '--categories=all'.
+
+[ $compiler == dart2js && $checked ]
+arithmetic_test: CompileTimeError
+assertion_initializer_const_function_test/01: RuntimeError
+assertion_initializer_test: RuntimeError
+assign_static_type_test/01: Fail
+assign_static_type_test/02: MissingCompileTimeError
+async_return_types_test/nestedFuture: Fail # Issue 26429
+async_return_types_test/wrongTypeParameter: Fail # Issue 26429
+closure_type_test/01: RuntimeError # Issue 12745
+closure_type_test/none: RuntimeError # Issue 12745
+compile_time_constant_checked2_test/01: MissingCompileTimeError
+compile_time_constant_checked2_test/02: MissingCompileTimeError
+compile_time_constant_checked2_test/03: MissingCompileTimeError
+compile_time_constant_checked2_test/04: MissingCompileTimeError
+compile_time_constant_checked2_test/05: MissingCompileTimeError
+compile_time_constant_checked2_test/06: MissingCompileTimeError
+compile_time_constant_checked3_test/01: MissingCompileTimeError
+compile_time_constant_checked3_test/02: MissingCompileTimeError
+compile_time_constant_checked3_test/03: MissingCompileTimeError
+compile_time_constant_checked3_test/04: MissingCompileTimeError
+compile_time_constant_checked3_test/05: MissingCompileTimeError
+compile_time_constant_checked3_test/06: MissingCompileTimeError
+compile_time_constant_checked4_test/01: MissingCompileTimeError
+compile_time_constant_checked4_test/02: MissingCompileTimeError
+compile_time_constant_checked4_test/03: MissingCompileTimeError
+compile_time_constant_checked5_test/03: MissingCompileTimeError
+compile_time_constant_checked5_test/04: MissingCompileTimeError
+compile_time_constant_checked5_test/08: MissingCompileTimeError
+compile_time_constant_checked5_test/09: MissingCompileTimeError
+compile_time_constant_checked5_test/13: MissingCompileTimeError
+compile_time_constant_checked5_test/14: MissingCompileTimeError
+compile_time_constant_checked5_test/18: MissingCompileTimeError
+compile_time_constant_checked5_test/19: MissingCompileTimeError
+compile_time_constant_checked_test/01: Fail
+compile_time_constant_checked_test/02: MissingCompileTimeError
+compile_time_constant_checked_test/03: Fail
+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/20: MissingCompileTimeError
+const_constructor2_test/22: MissingCompileTimeError
+const_constructor2_test/24: MissingCompileTimeError
+const_constructor3_test/02: MissingCompileTimeError
+const_constructor3_test/04: MissingCompileTimeError
+const_init2_test/02: MissingCompileTimeError
+deferred_constraints_constants_test/none: Crash # Unsupported operation: KernelDeferredLoadTask.addMirrorElementsForLibrary
+deferred_constraints_constants_test/reference_after_load: Crash # Unsupported operation: KernelDeferredLoadTask.addMirrorElementsForLibrary
+deferred_constraints_type_annotation_test/type_annotation1: Fail # Missing dynamic type error
+deferred_constraints_type_annotation_test/type_annotation_generic1: Fail # Missing dynamic type error
+deferred_constraints_type_annotation_test/type_annotation_generic4: Fail # Missing dynamic type error
+deopt_inlined_function_lazy_test: CompileTimeError
+factory_redirection_test/08: Fail
+factory_redirection_test/09: Fail
+factory_redirection_test/10: Fail
+factory_redirection_test/12: Fail
+factory_redirection_test/13: Fail
+factory_redirection_test/14: Fail
+generalized_void_syntax_test: RuntimeError
+generic_functions_test: RuntimeError
+generic_methods_test: RuntimeError
+guess_cid_test: CompileTimeError
+int2_test: CompileTimeError
+internal_library_test/02: Crash # NoSuchMethodError: Class 'DillLibraryBuilder' has no instance getter 'mixinApplicationClasses'.
+list_literal1_test/01: MissingCompileTimeError
+malbounded_instantiation_test/01: RuntimeError # Issue 12702
+malbounded_redirecting_factory2_test/02: Fail
+malbounded_redirecting_factory2_test/03: Fail
+malbounded_redirecting_factory2_test/04: Fail
+malbounded_type_cast2_test: RuntimeError # Issue 14121
+malbounded_type_cast_test: RuntimeError # Issue 14121
+malbounded_type_test2_test: RuntimeError # Issue 14121
+malbounded_type_test_test/03: Fail # Issue 14121
+malbounded_type_test_test/04: Fail # Issue 14121
+malformed2_test/00: RuntimeError
+malformed2_test/01: MissingCompileTimeError
+map_literal1_test/01: MissingCompileTimeError
+mint_compares_test: CompileTimeError
+number_identity_test: CompileTimeError
+redirecting_factory_infinite_steps_test/01: Fail
+redirecting_factory_malbounded_test/01: Fail
+regress_26133_test: RuntimeError # Issue 26429
+regress_29405_test: RuntimeError # Issue 29422
+stacktrace_demangle_ctors_test: RuntimeError
+stacktrace_test: RuntimeError
+super_call4_test: Crash # NoSuchMethodError: The getter 'thisLocal' was called on null.
+type_check_const_function_typedef2_test/00: MissingCompileTimeError
+type_parameter_test/01: Crash # Internal Error: Unexpected type variable in static context.
+type_parameter_test/02: Crash # Internal Error: Unexpected type variable in static context.
+type_parameter_test/03: Crash # Internal Error: Unexpected type variable in static context.
+type_parameter_test/04: Crash # Internal Error: Unexpected type variable in static context.
+type_parameter_test/05: Crash # Internal Error: Unexpected type variable in static context.
+type_parameter_test/06: Crash # Internal Error: Unexpected type variable in static context.
+type_parameter_test/none: Crash # Internal Error: Unexpected type variable in static context.
+type_variable_bounds2_test/01: RuntimeError # Issue 12702
+type_variable_bounds2_test/04: RuntimeError # Issue 12702
+type_variable_bounds3_test/00: Fail # Issue 12702
+type_variable_bounds_test/02: Fail # Issue 12702
+type_variable_scope_test/03: Crash # Internal Error: Unexpected type variable in static context.
+
+[ $compiler == dart2js && $checked && $host_checked ]
+generic_functions_test: Crash
+generic_methods_test: Crash
+
+[ $compiler == dart2js && !$checked ]
+assertion_initializer_const_function_error_test/01: MissingCompileTimeError
+assertion_test: RuntimeError
+generic_test: RuntimeError, OK
+issue13474_test: RuntimeError, OK
+map_literal4_test: RuntimeError, OK # Checked mode required.
+named_parameters_type_test/01: MissingRuntimeError, OK
+named_parameters_type_test/02: MissingRuntimeError, OK
+named_parameters_type_test/03: MissingRuntimeError, OK
+positional_parameters_type_test/01: MissingRuntimeError, OK
+positional_parameters_type_test/02: MissingRuntimeError, OK
+type_checks_in_factory_method_test: RuntimeError # Issue 12746
+
+[ $compiler == dart2js && !$checked && $enable_asserts ]
+bool_check_test: RuntimeError # Issue 29647
+
+[ $compiler == dart2js && !$checked && $minified ]
+f_bounded_quantification5_test: RuntimeError
+
+[ $compiler == dart2js && $fast_startup ]
+deferred_constraints_constants_test/none: Crash # Unsupported operation: KernelDeferredLoadTask.addMirrorElementsForLibrary
+deferred_constraints_constants_test/reference_after_load: Crash # Unsupported operation: KernelDeferredLoadTask.addMirrorElementsForLibrary
+internal_library_test/02: Crash # NoSuchMethodError: Class 'DillLibraryBuilder' has no instance getter 'mixinApplicationClasses'.
+stacktrace_demangle_ctors_test: RuntimeError
+super_call4_test: Crash # NoSuchMethodError: The getter 'thisLocal' was called on null.
+
+[ $compiler == dart2js && $host_checked ]
arithmetic_test: CompileTimeError
async_test/setter1: Crash # 'file:*/pkg/compiler/lib/src/kernel/element_map_impl.dart': Failed assertion: line 939 pos 18: 'asyncMarker == AsyncMarker.SYNC': is not true.
closure_self_reference_test: Crash # 'file:*/pkg/compiler/lib/src/ssa/nodes.dart': Failed assertion: line 641 pos 12: 'isClosed()': is not true.
@@ -567,169 +483,19 @@
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.
-[ $compiler == dart2js && $fasta && $minified ]
+[ $compiler == dart2js && $minified ]
arithmetic_test: CompileTimeError
+cyclic_type2_test: RuntimeError, OK # Issue 31054: runtimeType.toString not preserved in minified code.
+cyclic_type_test/0*: RuntimeError, OK # Issue 31054: runtimeType.toString not preserved in minified code.
deferred_load_library_wrong_args_test/01: Crash # NoSuchMethodError: The getter 'closureClassEntity' was called on null.
deferred_redirecting_factory_test: Crash # NoSuchMethodError: The getter 'closureClassEntity' was called on null.
deopt_inlined_function_lazy_test: CompileTimeError
+f_bounded_quantification4_test: RuntimeError, OK # Issue 31054: runtimeType.toString not preserved in minified code.
+generic_closure_test: RuntimeError, OK # Issue 31054: runtimeType.toString not preserved in minified code.
guess_cid_test: CompileTimeError
int2_test: CompileTimeError
internal_library_test/02: Crash # NoSuchMethodError: Class 'DillLibraryBuilder' has no instance getter 'mixinApplicationClasses'.
mint_compares_test: CompileTimeError
-number_identity_test: CompileTimeError
-stacktrace_rethrow_error_test/none: RuntimeError # Issue 12698
-stacktrace_rethrow_error_test/withtraceparameter: RuntimeError # Issue 12698
-stacktrace_rethrow_nonerror_test: RuntimeError # Issue 12698
-symbol_conflict_test: RuntimeError
-
-[ $compiler == dart2js && !$fasta ]
-accessor_conflict_export2_test: Crash # Issue 25626
-accessor_conflict_export_test: Crash # Issue 25626
-accessor_conflict_import2_test: RuntimeError # Issue 25626
-accessor_conflict_import_prefixed2_test: RuntimeError # Issue 25626
-accessor_conflict_import_prefixed_test: RuntimeError # Issue 25626
-accessor_conflict_import_test: RuntimeError # Issue 25626
-assertion_initializer_const_error2_test/*: Crash
-assertion_initializer_const_error2_test/none: Pass
-assertion_initializer_const_function_error_test/01: Crash
-assertion_initializer_const_function_test/01: CompileTimeError
-assertion_initializer_test: Crash
-async_star_cancel_while_paused_test: RuntimeError # Issue 22853
-bad_constructor_test/05: CompileTimeError # Issue 13639
-bad_typedef_test/00: Crash # Issue 28214
-bit_operations_test: RuntimeError, OK # Issue 1533
-branch_canonicalization_test: RuntimeError # Issue 638.
-call_function_apply_test: RuntimeError # Issue 23873
-canonical_const2_test: RuntimeError, OK # Issue 1533
-closure_in_field_test/01: RuntimeError # Issue 30467
-closure_in_field_test/02: RuntimeError # Issue 30467
-const_dynamic_type_literal_test/02: CompileTimeError # Issue 23009
-const_dynamic_type_literal_test/03: CompileTimeError # Issue 23009
-const_switch_test/02: RuntimeError # Issue 17960
-const_switch_test/04: RuntimeError # Issue 17960
-constructor_duplicate_final_test/01: Fail # Issue 13363
-constructor_duplicate_final_test/02: Fail # Issue 13363
-constructor_named_arguments_test/01: CompileTimeError # Issue 25225
-deferred_not_loaded_check_test: Fail # Issue 27577
-double_int_to_string_test: RuntimeError # Issue 1533
-duplicate_part_test/01: MissingCompileTimeError # Issue 27517
-enum_test: Fail # Issue 28340
-expect_test: RuntimeError, OK # Issue 13080
-external_test/10: CompileTimeError # Issue 12887
-external_test/13: CompileTimeError # Issue 12887
-external_test/20: CompileTimeError # Issue 12887
-final_attempt_reinitialization_test.dart: Skip # Issue 29659
-generalized_void_syntax_test: CompileTimeError
-generic_field_mixin4_test: Crash # Issue 18651
-generic_field_mixin5_test: Crash # Issue 18651
-generic_function_typedef2_test/00: Crash # Issue 28214
-generic_function_typedef2_test/01: Crash # Issue 28214
-generic_function_typedef2_test/02: Crash # Issue 28214
-generic_function_typedef2_test/03: Crash # Issue 28214
-generic_function_typedef2_test/05: Crash # Issue 28214
-generic_function_typedef2_test/06: Crash # Issue 28214
-getter_setter_in_lib_test: Fail # Issue 23288
-identical_closure2_test: RuntimeError # Issue 1533, Issue 12596
-if_null_assignment_behavior_test/13: Crash # Issue 23491
-if_null_assignment_behavior_test/14: Crash # Issue 23491
-infinity_test: RuntimeError # Issue 4984
-integer_division_by_zero_test: RuntimeError # Issue 8301
-invocation_mirror2_test: RuntimeError # Issue 6490 (wrong retval).
-invocation_mirror_empty_arguments_test: Fail # Issue 24331
-left_shift_test: RuntimeError # Issue 1533
-library_env_test/has_no_mirror_support: RuntimeError, OK
-list_literal4_test: RuntimeError # Issue 12890
-malformed_test/none: Fail # Expect failure in lib/_internal/js_runtime/lib/preambles/d8.js
-method_override5_test: RuntimeError # Issue 12809
-mint_arithmetic_test: RuntimeError # Issue 1533
-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_of_mixin_test: CompileTimeError # Issue 23773
-mixin_super_2_test: CompileTimeError # Issue 23773
-mixin_super_bound2_test: CompileTimeError # Issue 23773
-mixin_super_constructor_named_test/01: Fail # Issue 15101
-mixin_super_constructor_positionals_test/01: Fail # Issue 15101
-mixin_super_test: CompileTimeError # Issue 23773
-mixin_super_use_test: CompileTimeError # Issue 23773
-mixin_superclass_test: CompileTimeError # Issue 23773
-mixin_supertype_subclass2_test: CompileTimeError # Issue 23773
-mixin_supertype_subclass3_test: CompileTimeError # Issue 23773
-mixin_supertype_subclass4_test: CompileTimeError # Issue 23773
-mixin_supertype_subclass_test: CompileTimeError # Issue 23773
-modulo_test: RuntimeError # Issue 15246
-multiline_newline_test/01: CompileTimeError # Issue 23888
-multiline_newline_test/01r: CompileTimeError # Issue 23888
-multiline_newline_test/02: CompileTimeError # Issue 23888
-multiline_newline_test/02r: CompileTimeError # Issue 23888
-multiline_newline_test/03: CompileTimeError # Issue 23888
-multiline_newline_test/03r: CompileTimeError # Issue 23888
-multiline_newline_test/none: RuntimeError # Issue 23888
-nan_identical_test: Fail # Issue 11551
-not_enough_positional_arguments_test/01: CompileTimeError # Issue 12838
-not_enough_positional_arguments_test/02: CompileTimeError # Issue 12838
-not_enough_positional_arguments_test/05: CompileTimeError # Issue 12838
-number_identity2_test: RuntimeError # Issue 12596
-numbers_test: RuntimeError, OK # Issue 1533
-override_inheritance_mixed_test/08: Fail # Issue 18124
-override_inheritance_mixed_test/09: Fail # Issue 18124
-ref_before_declaration_test/00: MissingCompileTimeError
-ref_before_declaration_test/01: MissingCompileTimeError
-ref_before_declaration_test/02: MissingCompileTimeError
-ref_before_declaration_test/03: MissingCompileTimeError
-ref_before_declaration_test/04: MissingCompileTimeError
-ref_before_declaration_test/05: MissingCompileTimeError
-ref_before_declaration_test/06: MissingCompileTimeError
-regress_22976_test: CompileTimeError # Issue 23132
-regress_24283_test: RuntimeError # Issue 1533
-regress_28341_test: Fail # Issue 28340
-regress_29481_test: Crash # Issue 29754
-scope_variable_test/01: MissingCompileTimeError # Issue 13016
-setter4_test: CompileTimeError # issue 13639
-stacktrace_demangle_ctors_test: Fail # dart2js stack traces are not always compliant, issue 12698
-stacktrace_rethrow_error_test: Pass, RuntimeError # Issue 12698
-stacktrace_rethrow_nonerror_test: Pass, RuntimeError # Issue 12698
-stacktrace_test: Pass, RuntimeError # # Issue 12698
-symbol_literal_test/*: Fail # Issue 21825
-syntax_test/none: CompileTimeError # Issue #30176.
-truncdiv_test: RuntimeError # Issue 15246
-try_catch_on_syntax_test/10: Fail # Issue 19823
-try_catch_on_syntax_test/11: Fail # Issue 19823
-type_variable_conflict_test/01: Fail # Issue 13702
-type_variable_conflict_test/02: Fail # Issue 13702
-type_variable_conflict_test/03: Fail # Issue 13702
-type_variable_conflict_test/04: Fail # Issue 13702
-type_variable_conflict_test/05: Fail # Issue 13702
-type_variable_conflict_test/06: Fail # Issue 13702
-
-[ $compiler == dart2js && !$fasta && $host_checked ]
-assertion_initializer_const_error2_test/cc01: Crash
-assertion_initializer_const_error2_test/cc02: Crash
-assertion_initializer_const_error2_test/cc03: Crash
-assertion_initializer_const_error2_test/cc04: Crash
-assertion_initializer_const_error2_test/cc05: Crash
-assertion_initializer_const_error2_test/cc06: Crash
-assertion_initializer_const_error2_test/cc07: Crash
-assertion_initializer_const_error2_test/cc08: Crash
-assertion_initializer_const_error2_test/cc09: Crash
-assertion_initializer_const_error2_test/cc10: Crash
-assertion_initializer_const_error2_test/cc11: Crash
-assertion_initializer_const_function_error_test/01: Crash
-assertion_initializer_const_function_test/01: Crash
-assertion_initializer_test: Crash
-regress_26855_test/1: Crash # Issue 26867
-regress_26855_test/2: Crash # Issue 26867
-regress_26855_test/3: Crash # Issue 26867
-regress_26855_test/4: Crash # Issue 26867
-
-[ $compiler == dart2js && !$fasta && $minified ]
-symbol_conflict_test: RuntimeError # Issue 23857
-
-[ $compiler == dart2js && $minified ]
-cyclic_type2_test: RuntimeError, OK # Issue 31054: runtimeType.toString not preserved in minified code.
-cyclic_type_test/0*: RuntimeError, OK # Issue 31054: runtimeType.toString not preserved in minified code.
-f_bounded_quantification4_test: RuntimeError, OK # Issue 31054: runtimeType.toString not preserved in minified code.
-generic_closure_test: RuntimeError, OK # Issue 31054: runtimeType.toString not preserved in minified code.
mixin_generic_test: RuntimeError, OK # Issue 31054: runtimeType.toString not preserved in minified code.
mixin_mixin2_test: RuntimeError, OK # Issue 31054: runtimeType.toString not preserved in minified code.
mixin_mixin3_test: RuntimeError, OK # Issue 31054: runtimeType.toString not preserved in minified code.
@@ -739,5 +505,10 @@
mixin_mixin_bound2_test: RuntimeError, OK # Issue 31054: runtimeType.toString not preserved in minified code.
mixin_mixin_bound_test: RuntimeError, OK # Issue 31054: runtimeType.toString not preserved in minified code.
mixin_mixin_type_arguments_test: RuntimeError, OK # Issue 31054: runtimeType.toString not preserved in minified code.
+number_identity_test: CompileTimeError
regress_21795_test: RuntimeError, OK # Issue 31054: runtimeType.toString not preserved in minified code.
stack_trace_test: RuntimeError, OK # Stack trace not preserved in minified code.
+stacktrace_rethrow_error_test/none: RuntimeError # Issue 12698
+stacktrace_rethrow_error_test/withtraceparameter: RuntimeError # Issue 12698
+stacktrace_rethrow_nonerror_test: RuntimeError # Issue 12698
+symbol_conflict_test: RuntimeError
diff --git a/tests/language_2/abstract_getter2_test.dart b/tests/language_2/abstract_getter2_test.dart
index 50a6caf..19c97db 100644
--- a/tests/language_2/abstract_getter2_test.dart
+++ b/tests/language_2/abstract_getter2_test.dart
@@ -21,9 +21,46 @@
int get x => super.x;
}
+class GetterConcrete {
+ var _foo;
+
+ get foo => _foo;
+ set foo(x) => _foo = x;
+
+ var _bar;
+
+ get bar => _bar;
+ set bar(x) => _bar = x;
+}
+
+class AbstractGetterOverride1 extends GetterConcrete {
+ get foo;
+ set bar(x);
+}
+
+class AbstractGetterOverride2 extends Object with GetterConcrete {
+ get foo;
+ set bar(x);
+}
+
void main() {
B b = new C();
b.x = 42;
Expect.equals(b._x, 42);
Expect.equals(b.x, 100);
+
+ /// Tests that overriding either the getter or setter with an abstract member
+ /// has no effect.
+ /// Regression test for https://github.com/dart-lang/sdk/issues/29914
+ var c1 = AbstractGetterOverride1()
+ ..foo = 123
+ ..bar = 456;
+ Expect.equals(c1.foo, 123);
+ Expect.equals(c1.bar, 456);
+
+ var c2 = AbstractGetterOverride2()
+ ..foo = 123
+ ..bar = 456;
+ Expect.equals(c2.foo, 123);
+ Expect.equals(c2.bar, 456);
}
diff --git a/tests/language_2/closure_type_arguments_test.dart b/tests/language_2/closure_type_arguments_test.dart
new file mode 100644
index 0000000..4478ed7
--- /dev/null
+++ b/tests/language_2/closure_type_arguments_test.dart
@@ -0,0 +1,42 @@
+// 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";
+
+typedef MapFunc<S1, S2> = void Function(Map<S1, S2> arg);
+
+class A<P> {
+ final List barTypeArguments = [];
+
+ void foo<Q, Q1 extends P, Q2 extends Q, Q3 extends P, Q4 extends Q>() {
+ void bar<T1 extends P, T2 extends Q>(Map<T1, T2> arg) {
+ barTypeArguments..add(T1)..add(T2);
+ }
+
+ // Call with explicit type arguments.
+ bar<Q1, Q2>(null);
+
+ // No explicit type arguments - should be instantiated to bounds.
+ bar(null);
+
+ // Partial tear-off instantiation.
+ MapFunc<Q3, Q4> instantiated = bar;
+ instantiated(null);
+ }
+}
+
+abstract class MyIterable implements Iterable {}
+
+main() {
+ final a = new A<num>();
+ a.foo<Iterable, int, List, double, MyIterable>();
+ Expect.listEquals(
+ [int, List, num, Iterable, double, MyIterable], a.barTypeArguments);
+
+ // Test instantiation to bounds in the enclosing method.
+ dynamic b = new A<int>();
+ b.foo();
+ Expect.listEquals(
+ [int, dynamic, int, dynamic, int, dynamic], b.barTypeArguments);
+}
diff --git a/tests/language_2/constructor_reference_test.dart b/tests/language_2/constructor_reference_test.dart
new file mode 100644
index 0000000..1dae4a2
--- /dev/null
+++ b/tests/language_2/constructor_reference_test.dart
@@ -0,0 +1,41 @@
+// 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.
+
+class Foo<X> {
+ const Foo();
+ const Foo.bar();
+ const Foo.baz();
+}
+
+main() {
+ new Foo(); //# 01: ok
+ new Foo.bar(); //# 02: ok
+ new Foo.bar.baz(); //# 03: compile-time error
+ new Foo<int>(); //# 04: ok
+ new Foo<int>.bar(); //# 05: ok
+ new Foo<int>.bar.baz(); //# 06: compile-time error
+ new Foo.bar<int>(); //# 07: compile-time error
+ new Foo.bar<int>.baz(); //# 08: compile-time error
+ new Foo.bar.baz<int>(); //# 09: compile-time error
+
+ const Foo(); //# 11: ok
+ const Foo.bar(); //# 12: ok
+ const Foo.bar.baz(); //# 13: compile-time error
+ const Foo<int>(); //# 14: ok
+ const Foo<int>.bar(); //# 15: ok
+ const Foo<int>.bar.baz(); //# 16: compile-time error
+ const Foo.bar<int>(); //# 17: compile-time error
+ const Foo.bar<int>.baz(); //# 18: compile-time error
+ const Foo.bar.baz<int>(); //# 19: compile-time error
+
+ Foo(); //# 21: ok
+ Foo.bar(); //# 22: ok
+ Foo.bar.baz(); //# 23: compile-time error
+ Foo<int>(); //# 24: ok
+ Foo<int>.bar(); //# 25: ok
+ Foo<int>.bar.baz(); //# 26: compile-time error
+ Foo.bar<int>(); //# 27: compile-time error
+ Foo.bar<int>.baz(); //# 28: compile-time error
+ Foo.bar.baz<int>(); //# 29: compile-time error
+}
diff --git a/tests/language_2/double_literals/double_literal_coercion_error_test.dart b/tests/language_2/double_literals/double_literal_coercion_error_test.dart
new file mode 100644
index 0000000..89d873f
--- /dev/null
+++ b/tests/language_2/double_literals/double_literal_coercion_error_test.dart
@@ -0,0 +1,295 @@
+// 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.
+
+// Introduces a context with double as type.
+void notDouble([double value]) {
+ if (value != null) throw "unreachable";
+}
+
+main() {
+ notDouble(
+ // Large decimal numbers which are not representable as doubles.
+ 9007199254740993, // 2^53+2^0 //# 001: compile-time error
+ 18014398509481983, // 2^54-2^0 //# 002: compile-time error
+ 18014398509481985, // 2^54+2^0 //# 003: compile-time error
+ 18014398509481986, // 2^54+2^1 //# 004: compile-time error
+ 4611686018427387903, // 2^62-2^0 //# 005: compile-time error
+ 4611686018427387902, // 2^62-2^1 //# 006: compile-time error
+ 4611686018427387900, // 2^62-2^2 //# 007: compile-time error
+ 4611686018427387896, // 2^62-2^3 //# 008: compile-time error
+ 4611686018427387888, // 2^62-2^4 //# 009: compile-time error
+ 4611686018427387872, // 2^62-2^5 //# 010: compile-time error
+ 4611686018427387840, // 2^62-2^6 //# 011: compile-time error
+ 4611686018427387776, // 2^62-2^7 //# 012: compile-time error
+ 4611686018427387648, // 2^62-2^8 //# 013: compile-time error
+ 4611686018427387905, // 2^62+2^0 //# 014: compile-time error
+ 4611686018427387906, // 2^62+2^1 //# 015: compile-time error
+ 4611686018427387908, // 2^62+2^2 //# 016: compile-time error
+ 4611686018427387912, // 2^62+2^3 //# 017: compile-time error
+ 4611686018427387920, // 2^62+2^4 //# 018: compile-time error
+ 4611686018427387936, // 2^62+2^5 //# 019: compile-time error
+ 4611686018427387968, // 2^62+2^6 //# 020: compile-time error
+ 4611686018427388032, // 2^62+2^7 //# 021: compile-time error
+ 4611686018427388160, // 2^62+2^8 //# 022: compile-time error
+ 4611686018427388416, // 2^62+2^9 //# 023: compile-time error
+ 9223372036854775807, // 2^63-2^0 //# 024: compile-time error
+ 9223372036854775806, // 2^63-2^1 //# 025: compile-time error
+ 9223372036854775804, // 2^63-2^2 //# 026: compile-time error
+ 9223372036854775800, // 2^63-2^3 //# 027: compile-time error
+ 9223372036854775792, // 2^63-2^4 //# 028: compile-time error
+ 9223372036854775776, // 2^63-2^5 //# 029: compile-time error
+ 9223372036854775744, // 2^63-2^6 //# 030: compile-time error
+ 9223372036854775680, // 2^63-2^7 //# 031: compile-time error
+ 9223372036854775552, // 2^63-2^8 //# 032: compile-time error
+ 9223372036854775296, // 2^63-2^9 //# 033: compile-time error
+ 9223372036854775809, // 2^63+2^0 //# 034: compile-time error
+ 9223372036854775810, // 2^63+2^1 //# 035: compile-time error
+ 9223372036854775812, // 2^63+2^2 //# 036: compile-time error
+ 9223372036854775816, // 2^63+2^3 //# 037: compile-time error
+ 9223372036854775824, // 2^63+2^4 //# 038: compile-time error
+ 9223372036854775840, // 2^63+2^5 //# 039: compile-time error
+ 9223372036854775872, // 2^63+2^6 //# 040: compile-time error
+ 9223372036854775936, // 2^63+2^7 //# 041: compile-time error
+ 9223372036854776064, // 2^63+2^8 //# 042: compile-time error
+ 9223372036854776320, // 2^63+2^9 //# 043: compile-time error
+ 9223372036854776832, // 2^63+2^10 //# 044: compile-time error
+ 18446744073709551615, // 2^64-2^0 //# 045: compile-time error
+ 18446744073709551614, // 2^64-2^1 //# 046: compile-time error
+ 18446744073709551612, // 2^64-2^2 //# 047: compile-time error
+ 18446744073709551608, // 2^64-2^3 //# 048: compile-time error
+ 18446744073709551600, // 2^64-2^4 //# 049: compile-time error
+ 18446744073709551584, // 2^64-2^5 //# 050: compile-time error
+ 18446744073709551552, // 2^64-2^6 //# 051: compile-time error
+ 18446744073709551488, // 2^64-2^7 //# 052: compile-time error
+ 18446744073709551360, // 2^64-2^8 //# 053: compile-time error
+ 18446744073709551104, // 2^64-2^9 //# 054: compile-time error
+ 18446744073709550592, // 2^64-2^10 //# 055: compile-time error
+ 18446744073709551617, // 2^64+2^0 //# 056: compile-time error
+ 18446744073709551618, // 2^64+2^1 //# 057: compile-time error
+ 18446744073709551620, // 2^64+2^2 //# 058: compile-time error
+ 18446744073709551624, // 2^64+2^3 //# 059: compile-time error
+ 18446744073709551632, // 2^64+2^4 //# 060: compile-time error
+ 18446744073709551648, // 2^64+2^5 //# 061: compile-time error
+ 18446744073709551680, // 2^64+2^6 //# 062: compile-time error
+ 18446744073709551744, // 2^64+2^7 //# 063: compile-time error
+ 18446744073709551872, // 2^64+2^8 //# 064: compile-time error
+ 18446744073709552128, // 2^64+2^9 //# 065: compile-time error
+ 18446744073709552640, // 2^64+2^10 //# 066: compile-time error
+ 18446744073709553664, // 2^64+2^11 //# 067: compile-time error
+ 179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858367, // maxValue - 1 //# 068 : compile-time error
+ 179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858369, // maxValue + 1 //# 069 : compile-time error
+
+ // Negative numbers too.
+ -9007199254740993, // -(2^53+2^0) //# 070: compile-time error
+ -18014398509481983, // -(2^54-2^0) //# 071: compile-time error
+ -18014398509481985, // -(2^54+2^0) //# 072: compile-time error
+ -18014398509481986, // -(2^54+2^1) //# 073: compile-time error
+ -4611686018427387903, // -(2^62-2^0) //# 074: compile-time error
+ -4611686018427387902, // -(2^62-2^1) //# 075: compile-time error
+ -4611686018427387900, // -(2^62-2^2) //# 076: compile-time error
+ -4611686018427387896, // -(2^62-2^3) //# 077: compile-time error
+ -4611686018427387888, // -(2^62-2^4) //# 078: compile-time error
+ -4611686018427387872, // -(2^62-2^5) //# 079: compile-time error
+ -4611686018427387840, // -(2^62-2^6) //# 080: compile-time error
+ -4611686018427387776, // -(2^62-2^7) //# 081: compile-time error
+ -4611686018427387648, // -(2^62-2^8) //# 082: compile-time error
+ -4611686018427387905, // -(2^62+2^0) //# 083: compile-time error
+ -4611686018427387906, // -(2^62+2^1) //# 084: compile-time error
+ -4611686018427387908, // -(2^62+2^2) //# 085: compile-time error
+ -4611686018427387912, // -(2^62+2^3) //# 086: compile-time error
+ -4611686018427387920, // -(2^62+2^4) //# 087: compile-time error
+ -4611686018427387936, // -(2^62+2^5) //# 088: compile-time error
+ -4611686018427387968, // -(2^62+2^6) //# 089: compile-time error
+ -4611686018427388032, // -(2^62+2^7) //# 090: compile-time error
+ -4611686018427388160, // -(2^62+2^8) //# 091: compile-time error
+ -4611686018427388416, // -(2^62+2^9) //# 092: compile-time error
+ -9223372036854775807, // -(2^63-2^0) //# 093: compile-time error
+ -9223372036854775806, // -(2^63-2^1) //# 094: compile-time error
+ -9223372036854775804, // -(2^63-2^2) //# 095: compile-time error
+ -9223372036854775800, // -(2^63-2^3) //# 096: compile-time error
+ -9223372036854775792, // -(2^63-2^4) //# 097: compile-time error
+ -9223372036854775776, // -(2^63-2^5) //# 098: compile-time error
+ -9223372036854775744, // -(2^63-2^6) //# 099: compile-time error
+ -9223372036854775680, // -(2^63-2^7) //# 100: compile-time error
+ -9223372036854775552, // -(2^63-2^8) //# 101: compile-time error
+ -9223372036854775296, // -(2^63-2^9) //# 102: compile-time error
+ -9223372036854775809, // -(2^63+2^0) //# 103: compile-time error
+ -9223372036854775810, // -(2^63+2^1) //# 104: compile-time error
+ -9223372036854775812, // -(2^63+2^2) //# 105: compile-time error
+ -9223372036854775816, // -(2^63+2^3) //# 106: compile-time error
+ -9223372036854775824, // -(2^63+2^4) //# 107: compile-time error
+ -9223372036854775840, // -(2^63+2^5) //# 108: compile-time error
+ -9223372036854775872, // -(2^63+2^6) //# 109: compile-time error
+ -9223372036854775936, // -(2^63+2^7) //# 110: compile-time error
+ -9223372036854776064, // -(2^63+2^8) //# 111: compile-time error
+ -9223372036854776320, // -(2^63+2^9) //# 112: compile-time error
+ -9223372036854776832, // -(2^63+2^10) //# 113: compile-time error
+ -18446744073709551615, // -(2^64-2^0) //# 114: compile-time error
+ -18446744073709551614, // -(2^64-2^1) //# 115: compile-time error
+ -18446744073709551612, // -(2^64-2^2) //# 116: compile-time error
+ -18446744073709551608, // -(2^64-2^3) //# 117: compile-time error
+ -18446744073709551600, // -(2^64-2^4) //# 118: compile-time error
+ -18446744073709551584, // -(2^64-2^5) //# 119: compile-time error
+ -18446744073709551552, // -(2^64-2^6) //# 120: compile-time error
+ -18446744073709551488, // -(2^64-2^7) //# 121: compile-time error
+ -18446744073709551360, // -(2^64-2^8) //# 122: compile-time error
+ -18446744073709551104, // -(2^64-2^9) //# 123: compile-time error
+ -18446744073709550592, // -(2^64-2^10) //# 124: compile-time error
+ -18446744073709551617, // -(2^64+2^0) //# 125: compile-time error
+ -18446744073709551618, // -(2^64+2^1) //# 126: compile-time error
+ -18446744073709551620, // -(2^64+2^2) //# 127: compile-time error
+ -18446744073709551624, // -(2^64+2^3) //# 128: compile-time error
+ -18446744073709551632, // -(2^64+2^4) //# 129: compile-time error
+ -18446744073709551648, // -(2^64+2^5) //# 130: compile-time error
+ -18446744073709551680, // -(2^64+2^6) //# 131: compile-time error
+ -18446744073709551744, // -(2^64+2^7) //# 132: compile-time error
+ -18446744073709551872, // -(2^64+2^8) //# 133: compile-time error
+ -18446744073709552128, // -(2^64+2^9) //# 134: compile-time error
+ -18446744073709552640, // -(2^64+2^10) //# 135: compile-time error
+ -18446744073709553664, // -(2^64+2^11) //# 136: compile-time error
+ -179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858367, // -(maxValue - 1) //# 137 : compile-time error
+ -179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858369, // -(maxValue + 1) //# 138 : compile-time error
+
+ // Same numbers as hexadecimal literals.
+ 0x20000000000001, // 2^53+2^0 //# 139: compile-time error
+ 0x3fffffffffffff, // 2^54-2^0 //# 140: compile-time error
+ 0x40000000000001, // 2^54+2^0 //# 141: compile-time error
+ 0x40000000000002, // 2^54+2^1 //# 142: compile-time error
+ 0x3fffffffffffffff, // 2^62-2^0 //# 143: compile-time error
+ 0x3ffffffffffffffe, // 2^62-2^1 //# 144: compile-time error
+ 0x3ffffffffffffffc, // 2^62-2^2 //# 145: compile-time error
+ 0x3ffffffffffffff8, // 2^62-2^3 //# 146: compile-time error
+ 0x3ffffffffffffff0, // 2^62-2^4 //# 147: compile-time error
+ 0x3fffffffffffffe0, // 2^62-2^5 //# 148: compile-time error
+ 0x3fffffffffffffc0, // 2^62-2^6 //# 149: compile-time error
+ 0x3fffffffffffff80, // 2^62-2^7 //# 150: compile-time error
+ 0x3fffffffffffff00, // 2^62-2^8 //# 151: compile-time error
+ 0x4000000000000001, // 2^62+2^0 //# 152: compile-time error
+ 0x4000000000000002, // 2^62+2^1 //# 153: compile-time error
+ 0x4000000000000004, // 2^62+2^2 //# 154: compile-time error
+ 0x4000000000000008, // 2^62+2^3 //# 155: compile-time error
+ 0x4000000000000010, // 2^62+2^4 //# 156: compile-time error
+ 0x4000000000000020, // 2^62+2^5 //# 157: compile-time error
+ 0x4000000000000040, // 2^62+2^6 //# 158: compile-time error
+ 0x4000000000000080, // 2^62+2^7 //# 159: compile-time error
+ 0x4000000000000100, // 2^62+2^8 //# 160: compile-time error
+ 0x4000000000000200, // 2^62+2^9 //# 161: compile-time error
+ 0x7fffffffffffffff, // 2^63-2^0 //# 162: compile-time error
+ 0x7ffffffffffffffe, // 2^63-2^1 //# 163: compile-time error
+ 0x7ffffffffffffffc, // 2^63-2^2 //# 164: compile-time error
+ 0x7ffffffffffffff8, // 2^63-2^3 //# 165: compile-time error
+ 0x7ffffffffffffff0, // 2^63-2^4 //# 166: compile-time error
+ 0x7fffffffffffffe0, // 2^63-2^5 //# 167: compile-time error
+ 0x7fffffffffffffc0, // 2^63-2^6 //# 168: compile-time error
+ 0x7fffffffffffff80, // 2^63-2^7 //# 169: compile-time error
+ 0x7fffffffffffff00, // 2^63-2^8 //# 170: compile-time error
+ 0x7ffffffffffffe00, // 2^63-2^9 //# 171: compile-time error
+ 0x8000000000000001, // 2^63+2^0 //# 172: compile-time error
+ 0x8000000000000002, // 2^63+2^1 //# 173: compile-time error
+ 0x8000000000000004, // 2^63+2^2 //# 174: compile-time error
+ 0x8000000000000008, // 2^63+2^3 //# 175: compile-time error
+ 0x8000000000000010, // 2^63+2^4 //# 176: compile-time error
+ 0x8000000000000020, // 2^63+2^5 //# 177: compile-time error
+ 0x8000000000000040, // 2^63+2^6 //# 178: compile-time error
+ 0x8000000000000080, // 2^63+2^7 //# 179: compile-time error
+ 0x8000000000000100, // 2^63+2^8 //# 180: compile-time error
+ 0x8000000000000200, // 2^63+2^9 //# 181: compile-time error
+ 0x8000000000000400, // 2^63+2^10 //# 182: compile-time error
+ 0xffffffffffffffff, // 2^64-2^0 //# 183: compile-time error
+ 0xfffffffffffffffe, // 2^64-2^1 //# 184: compile-time error
+ 0xfffffffffffffffc, // 2^64-2^2 //# 185: compile-time error
+ 0xfffffffffffffff8, // 2^64-2^3 //# 186: compile-time error
+ 0xfffffffffffffff0, // 2^64-2^4 //# 187: compile-time error
+ 0xffffffffffffffe0, // 2^64-2^5 //# 188: compile-time error
+ 0xffffffffffffffc0, // 2^64-2^6 //# 189: compile-time error
+ 0xffffffffffffff80, // 2^64-2^7 //# 190: compile-time error
+ 0xffffffffffffff00, // 2^64-2^8 //# 191: compile-time error
+ 0xfffffffffffffe00, // 2^64-2^9 //# 192: compile-time error
+ 0xfffffffffffffc00, // 2^64-2^10 //# 193: compile-time error
+ 0x10000000000000001, // 2^64+2^0 //# 194: compile-time error
+ 0x10000000000000002, // 2^64+2^1 //# 195: compile-time error
+ 0x10000000000000004, // 2^64+2^2 //# 196: compile-time error
+ 0x10000000000000008, // 2^64+2^3 //# 197: compile-time error
+ 0x10000000000000010, // 2^64+2^4 //# 198: compile-time error
+ 0x10000000000000020, // 2^64+2^5 //# 199: compile-time error
+ 0x10000000000000040, // 2^64+2^6 //# 200: compile-time error
+ 0x10000000000000080, // 2^64+2^7 //# 201: compile-time error
+ 0x10000000000000100, // 2^64+2^8 //# 202: compile-time error
+ 0x10000000000000200, // 2^64+2^9 //# 203: compile-time error
+ 0x10000000000000400, // 2^64+2^10 //# 204: compile-time error
+ 0x10000000000000800, // 2^64+2^11 //# 205: compile-time error
+ 0xfffffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff, // maxValue - 1 //# 206 : compile-time error
+ 0xfffffffffffff800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001, // maxValue + 1 //# 207 : compile-time error
+
+ -0x20000000000001, // -(2^53+2^0) //# 208: compile-time error
+ -0x3fffffffffffff, // -(2^54-2^0) //# 209: compile-time error
+ -0x40000000000001, // -(2^54+2^0) //# 210: compile-time error
+ -0x40000000000002, // -(2^54+2^1) //# 211: compile-time error
+ -0x3fffffffffffffff, // -(2^62-2^0) //# 212: compile-time error
+ -0x3ffffffffffffffe, // -(2^62-2^1) //# 213: compile-time error
+ -0x3ffffffffffffffc, // -(2^62-2^2) //# 214: compile-time error
+ -0x3ffffffffffffff8, // -(2^62-2^3) //# 215: compile-time error
+ -0x3ffffffffffffff0, // -(2^62-2^4) //# 216: compile-time error
+ -0x3fffffffffffffe0, // -(2^62-2^5) //# 217: compile-time error
+ -0x3fffffffffffffc0, // -(2^62-2^6) //# 218: compile-time error
+ -0x3fffffffffffff80, // -(2^62-2^7) //# 219: compile-time error
+ -0x3fffffffffffff00, // -(2^62-2^8) //# 220: compile-time error
+ -0x4000000000000001, // -(2^62+2^0) //# 221: compile-time error
+ -0x4000000000000002, // -(2^62+2^1) //# 222: compile-time error
+ -0x4000000000000004, // -(2^62+2^2) //# 223: compile-time error
+ -0x4000000000000008, // -(2^62+2^3) //# 224: compile-time error
+ -0x4000000000000010, // -(2^62+2^4) //# 225: compile-time error
+ -0x4000000000000020, // -(2^62+2^5) //# 226: compile-time error
+ -0x4000000000000040, // -(2^62+2^6) //# 227: compile-time error
+ -0x4000000000000080, // -(2^62+2^7) //# 228: compile-time error
+ -0x4000000000000100, // -(2^62+2^8) //# 229: compile-time error
+ -0x4000000000000200, // -(2^62+2^9) //# 230: compile-time error
+ -0x7fffffffffffffff, // -(2^63-2^0) //# 231: compile-time error
+ -0x7ffffffffffffffe, // -(2^63-2^1) //# 232: compile-time error
+ -0x7ffffffffffffffc, // -(2^63-2^2) //# 233: compile-time error
+ -0x7ffffffffffffff8, // -(2^63-2^3) //# 234: compile-time error
+ -0x7ffffffffffffff0, // -(2^63-2^4) //# 235: compile-time error
+ -0x7fffffffffffffe0, // -(2^63-2^5) //# 236: compile-time error
+ -0x7fffffffffffffc0, // -(2^63-2^6) //# 237: compile-time error
+ -0x7fffffffffffff80, // -(2^63-2^7) //# 238: compile-time error
+ -0x7fffffffffffff00, // -(2^63-2^8) //# 239: compile-time error
+ -0x7ffffffffffffe00, // -(2^63-2^9) //# 240: compile-time error
+ -0x8000000000000001, // -(2^63+2^0) //# 241: compile-time error
+ -0x8000000000000002, // -(2^63+2^1) //# 242: compile-time error
+ -0x8000000000000004, // -(2^63+2^2) //# 243: compile-time error
+ -0x8000000000000008, // -(2^63+2^3) //# 244: compile-time error
+ -0x8000000000000010, // -(2^63+2^4) //# 245: compile-time error
+ -0x8000000000000020, // -(2^63+2^5) //# 246: compile-time error
+ -0x8000000000000040, // -(2^63+2^6) //# 247: compile-time error
+ -0x8000000000000080, // -(2^63+2^7) //# 248: compile-time error
+ -0x8000000000000100, // -(2^63+2^8) //# 249: compile-time error
+ -0x8000000000000200, // -(2^63+2^9) //# 250: compile-time error
+ -0x8000000000000400, // -(2^63+2^10) //# 251: compile-time error
+ -0xffffffffffffffff, // -(2^64-2^0) //# 252: compile-time error
+ -0xfffffffffffffffe, // -(2^64-2^1) //# 253: compile-time error
+ -0xfffffffffffffffc, // -(2^64-2^2) //# 254: compile-time error
+ -0xfffffffffffffff8, // -(2^64-2^3) //# 255: compile-time error
+ -0xfffffffffffffff0, // -(2^64-2^4) //# 256: compile-time error
+ -0xffffffffffffffe0, // -(2^64-2^5) //# 257: compile-time error
+ -0xffffffffffffffc0, // -(2^64-2^6) //# 258: compile-time error
+ -0xffffffffffffff80, // -(2^64-2^7) //# 259: compile-time error
+ -0xffffffffffffff00, // -(2^64-2^8) //# 260: compile-time error
+ -0xfffffffffffffe00, // -(2^64-2^9) //# 261: compile-time error
+ -0xfffffffffffffc00, // -(2^64-2^10) //# 262: compile-time error
+ -0x10000000000000001, // -(2^64+2^0) //# 263: compile-time error
+ -0x10000000000000002, // -(2^64+2^1) //# 264: compile-time error
+ -0x10000000000000004, // -(2^64+2^2) //# 265: compile-time error
+ -0x10000000000000008, // -(2^64+2^3) //# 266: compile-time error
+ -0x10000000000000010, // -(2^64+2^4) //# 267: compile-time error
+ -0x10000000000000020, // -(2^64+2^5) //# 268: compile-time error
+ -0x10000000000000040, // -(2^64+2^6) //# 269: compile-time error
+ -0x10000000000000080, // -(2^64+2^7) //# 270: compile-time error
+ -0x10000000000000100, // -(2^64+2^8) //# 271: compile-time error
+ -0x10000000000000200, // -(2^64+2^9) //# 272: compile-time error
+ -0x10000000000000400, // -(2^64+2^10) //# 273: compile-time error
+ -0x10000000000000800, // -(2^64+2^11) //# 274: compile-time error
+ -0xfffffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff, // -(maxValue - 1) //# 275 : compile-time error
+ -0xfffffffffffff800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001, // -(maxValue + 1) //# 276 : compile-time error
+ );
+}
diff --git a/tests/language_2/double_literals/double_literal_coercion_test.dart b/tests/language_2/double_literals/double_literal_coercion_test.dart
new file mode 100644
index 0000000..9c2cc91
--- /dev/null
+++ b/tests/language_2/double_literals/double_literal_coercion_test.dart
@@ -0,0 +1,142 @@
+// 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";
+
+// Pass expected value and then decimal literal value in a double context.
+void expectDouble(double expectedValue, double actualValue) {
+ if (expectedValue == null) return;
+ Expect.identical(expectedValue, actualValue);
+}
+
+// Some exact powers of two as double values.
+double p2_8 = 256.0;
+double p2_30 = 1073741824.0;
+double p2_31 = 2147483648.0;
+double p2_32 = 4294967296.0;
+double p2_52 = 4503599627370496.0;
+double p2_53 = 9007199254740992.0;
+double p2_54 = 18014398509481984.0;
+double p2_62 = 4611686018427387904.0;
+double p2_63 = 9223372036854775808.0;
+double p2_64 = 18446744073709551616.0;
+double maxValue = 1.7976931348623157e+308;
+
+main() {
+ expectDouble(0.0, 0);
+ expectDouble(1.0, 1);
+ expectDouble(p2_8 - 1, 255);
+ expectDouble(p2_8, 256);
+ expectDouble(p2_8 + 1, 257);
+ expectDouble(p2_30 - 1, 1073741823);
+ expectDouble(p2_30, 1073741824);
+ expectDouble(p2_30 + 1, 1073741825);
+ expectDouble(p2_31 - 1, 2147483647);
+ expectDouble(p2_31, 2147483648);
+ expectDouble(p2_31 + 1, 2147483649);
+ expectDouble(p2_32 - 1, 4294967295);
+ expectDouble(p2_32, 4294967296);
+ expectDouble(p2_32 + 1, 4294967297);
+ expectDouble(p2_52 - 1, 4503599627370495);
+ expectDouble(p2_52, 4503599627370496);
+ expectDouble(p2_52 + 1, 4503599627370497);
+ expectDouble(p2_53 - 1, 9007199254740991);
+ expectDouble(p2_53, 9007199254740992);
+ expectDouble(p2_53 + 2, 9007199254740994);
+ expectDouble(p2_54 - 2, 18014398509481982);
+ expectDouble(p2_54, 18014398509481984);
+ expectDouble(p2_54 + 4, 18014398509481988);
+ expectDouble(p2_62, 4611686018427387904);
+ expectDouble(p2_63, 9223372036854775808);
+ expectDouble(p2_64, 18446744073709551616);
+ expectDouble(maxValue,
+ 179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368);
+
+ expectDouble(-0.0, -0);
+ expectDouble(-1.0, -1);
+ expectDouble(-(p2_8 - 1), -255);
+ expectDouble(-(p2_8), -256);
+ expectDouble(-(p2_8 + 1), -257);
+ expectDouble(-(p2_30 - 1), -1073741823);
+ expectDouble(-(p2_30), -1073741824);
+ expectDouble(-(p2_30 + 1), -1073741825);
+ expectDouble(-(p2_31 - 1), -2147483647);
+ expectDouble(-(p2_31), -2147483648);
+ expectDouble(-(p2_31 + 1), -2147483649);
+ expectDouble(-(p2_32 - 1), -4294967295);
+ expectDouble(-(p2_32), -4294967296);
+ expectDouble(-(p2_32 + 1), -4294967297);
+ expectDouble(-(p2_52 - 1), -4503599627370495);
+ expectDouble(-(p2_52), -4503599627370496);
+ expectDouble(-(p2_52 + 1), -4503599627370497);
+ expectDouble(-(p2_53 - 1), -9007199254740991);
+ expectDouble(-(p2_53), -9007199254740992);
+ expectDouble(-(p2_53 + 2), -9007199254740994);
+ expectDouble(-(p2_54 - 2), -18014398509481982);
+ expectDouble(-(p2_54), -18014398509481984);
+ expectDouble(-(p2_54 + 4), -18014398509481988);
+ expectDouble(-(p2_62), -4611686018427387904);
+ expectDouble(-(p2_63), -9223372036854775808);
+ expectDouble(-(p2_64), -18446744073709551616);
+ expectDouble(-maxValue,
+ -179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368);
+
+ expectDouble(0.0, 0x0);
+ expectDouble(1.0, 0x1);
+ expectDouble(p2_8 - 1, 0xff);
+ expectDouble(p2_8, 0x100);
+ expectDouble(p2_8 + 1, 0x101);
+ expectDouble(p2_30 - 1, 0x3fffffff);
+ expectDouble(p2_30, 0x40000000);
+ expectDouble(p2_30 + 1, 0x40000001);
+ expectDouble(p2_31 - 1, 0x7fffffff);
+ expectDouble(p2_31, 0x80000000);
+ expectDouble(p2_31 + 1, 0x80000001);
+ expectDouble(p2_32 - 1, 0xffffffff);
+ expectDouble(p2_32, 0x100000000);
+ expectDouble(p2_32 + 1, 0x100000001);
+ expectDouble(p2_52 - 1, 0xfffffffffffff);
+ expectDouble(p2_52, 0x10000000000000);
+ expectDouble(p2_52 + 1, 0x10000000000001);
+ expectDouble(p2_53 - 1, 0x1fffffffffffff);
+ expectDouble(p2_53, 0x20000000000000);
+ expectDouble(p2_53 + 2, 0x20000000000002);
+ expectDouble(p2_54 - 2, 0x3ffffffffffffe);
+ expectDouble(p2_54, 0x40000000000000);
+ expectDouble(p2_54 + 4, 0x40000000000004);
+ expectDouble(p2_62, 0x4000000000000000);
+ expectDouble(p2_63, 0x8000000000000000);
+ expectDouble(p2_64, 0x10000000000000000);
+ expectDouble(maxValue,
+ 0xfffffffffffff80000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000);
+
+ expectDouble(-0.0, -0x0);
+ expectDouble(-1.0, -0x1);
+ expectDouble(-(p2_8 - 1), -0xff);
+ expectDouble(-(p2_8), -0x100);
+ expectDouble(-(p2_8 + 1), -0x101);
+ expectDouble(-(p2_30 - 1), -0x3fffffff);
+ expectDouble(-(p2_30), -0x40000000);
+ expectDouble(-(p2_30 + 1), -0x40000001);
+ expectDouble(-(p2_31 - 1), -0x7fffffff);
+ expectDouble(-(p2_31), -0x80000000);
+ expectDouble(-(p2_31 + 1), -0x80000001);
+ expectDouble(-(p2_32 - 1), -0xffffffff);
+ expectDouble(-(p2_32), -0x100000000);
+ expectDouble(-(p2_32 + 1), -0x100000001);
+ expectDouble(-(p2_52 - 1), -0xfffffffffffff);
+ expectDouble(-(p2_52), -0x10000000000000);
+ expectDouble(-(p2_52 + 1), -0x10000000000001);
+ expectDouble(-(p2_53 - 1), -0x1fffffffffffff);
+ expectDouble(-(p2_53), -0x20000000000000);
+ expectDouble(-(p2_53 + 2), -0x20000000000002);
+ expectDouble(-(p2_54 - 2), -0x3ffffffffffffe);
+ expectDouble(-(p2_54), -0x40000000000000);
+ expectDouble(-(p2_54 + 4), -0x40000000000004);
+ expectDouble(-(p2_62), -0x4000000000000000);
+ expectDouble(-(p2_63), -0x8000000000000000);
+ expectDouble(-(p2_64), -0x10000000000000000);
+ expectDouble(-maxValue,
+ -0xfffffffffffff80000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000);
+}
diff --git a/tests/language_2/invocation_mirror_test.dart b/tests/language_2/invocation_mirror_test.dart
index ef17f7f..dc56efa 100644
--- a/tests/language_2/invocation_mirror_test.dart
+++ b/tests/language_2/invocation_mirror_test.dart
@@ -307,7 +307,6 @@
Expect.throwsNoSuchMethodError(() => o.toString(42));
Expect.throwsNoSuchMethodError(() => o.toString(x: 37));
Expect.throwsNoSuchMethodError(() => o.hashCode = 42);
- Expect.throwsNoSuchMethodError(() => o.hashCode()); // Thrown by int.noSuchMethod.
Expect.throwsNoSuchMethodError(() => (n.flif)()); // Extracted method has no noSuchMethod.
}
diff --git a/tests/language_2/language_2.status b/tests/language_2/language_2.status
index 1b1cc15..f4293613 100644
--- a/tests/language_2/language_2.status
+++ b/tests/language_2/language_2.status
@@ -8,28 +8,28 @@
mixin_constructor_forwarding/optional_named_parameters_test/none: CompileTimeError # Issue 31543
mixin_constructor_forwarding/optional_positional_parameters_test/none: CompileTimeError # Issue 31543
-[ $compiler == dart2analyzer && $fasta ]
-void/*: Skip # https://github.com/dart-lang/sdk/issues/34011
-invalid_returns/*: Skip # https://github.com/dart-lang/sdk/issues/34011
-
-[ $compiler == dart2js ]
-void/*: Skip # https://github.com/dart-lang/sdk/issues/34011
-invalid_returns/*: Skip # https://github.com/dart-lang/sdk/issues/34011
-
-[ $compiler == app_jit || $compiler == none ]
-void/*: Skip # https://github.com/dart-lang/sdk/issues/34013
-invalid_returns/*: Skip # https://github.com/dart-lang/sdk/issues/34013
-
-[ $compiler == spec_parser ]
-void/*: Skip # https://github.com/dart-lang/sdk/issues/34015
-invalid_returns/*: Skip # https://github.com/dart-lang/sdk/issues/34015
-
[ $compiler == app_jit ]
deferred_inheritance_constraints_test/redirecting_constructor: Crash
+[ $compiler == dart2analyzer ]
+double_literals/*: Skip # https://github.com/dart-lang/sdk/issues/34360
+
[ $compiler != dart2analyzer ]
switch_case_warn_test: Skip # Analyzer only, see language_analyzer2.status
+[ $compiler == dart2js ]
+double_literals/*: Skip # https://github.com/dart-lang/sdk/issues/34356
+invalid_returns/*: Skip # https://github.com/dart-lang/sdk/issues/34011
+void/*: Skip # https://github.com/dart-lang/sdk/issues/34011
+
+[ $compiler == fasta ]
+double_literals/*: Skip # https://github.com/dart-lang/sdk/issues/34357
+
+[ $compiler == spec_parser ]
+double_literals/*: Skip # https://github.com/dart-lang/sdk/issues/34355
+invalid_returns/*: Skip # https://github.com/dart-lang/sdk/issues/34015
+void/*: Skip # https://github.com/dart-lang/sdk/issues/34015
+
[ $mode == debug ]
large_class_declaration_test: Slow, Pass
@@ -47,9 +47,12 @@
stacktrace_demangle_ctors_test: SkipByDesign # Names are not scrubbed.
type_checks_in_factory_method_test: SkipByDesign # Requires checked mode.
-[ $compiler != app_jitk && $compiler != dartk && $compiler != dartkp && $compiler != dartkb && $mode == debug && $runtime == vm ]
+[ $compiler != app_jitk && $compiler != dartk && $compiler != dartkb && $compiler != dartkp && $mode == debug && $runtime == vm ]
built_in_identifier_type_annotation_test/set: Crash # Not supported by legacy VM front-end.
+[ $compiler != dart2analyzer && $compiler != dart2js && $compiler != dartdevc && !$fasta && $strong ]
+type_promotion_functions_test: CompileTimeError # Issue 30895: This test requires a complete rewrite for 2.0.
+
# Detection of compile-time errors that are related to constants can't be fully
# done at the front end, because constants are evaluated at back ends. So, some
# errors aren't detected by fasta, but reported by back ends as compile-time
@@ -68,8 +71,8 @@
implicit_creation/implicit_const_not_default_values_test/e6: MissingCompileTimeError
implicit_creation/implicit_const_not_default_values_test/e9: MissingCompileTimeError
-[ $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 != dartdevc && !$checked ]
+function_type/*: Skip # Needs checked mode.
[ $compiler != dart2js && !$fasta && $strong ]
compile_time_constant_static5_test/11: CompileTimeError # Issue 30546
@@ -84,9 +87,6 @@
implicit_creation/implicit_new_prefix_constructor_generic_test: Fail # No support for implicit creation.
implicit_creation/implicit_new_prefix_constructor_test: Fail # No support for implicit creation.
-[ $compiler != dartdevc && $compiler != dart2js && !$checked ]
-function_type/*: Skip # Needs checked mode.
-
[ $compiler != spec_parser && $runtime != none && !$checked && !$strong ]
closure_type_test: RuntimeError
map_literal1_test/01: MissingCompileTimeError
@@ -215,47 +215,16 @@
[ $checked && !$strong ]
type_parameter_test/05: Pass
-[ !$fasta && !$strong ]
-implicit_creation/implicit_const_context_constructor_generic_named_test: Fail # No support for implicit creation.
-implicit_creation/implicit_const_context_constructor_generic_test: Fail # No support for implicit creation.
-implicit_creation/implicit_const_context_constructor_named_test: Fail # No support for implicit creation.
-implicit_creation/implicit_const_context_constructor_test: Fail # No support for implicit creation.
-implicit_creation/implicit_const_context_list_test: Fail # No support for implicit creation.
-implicit_creation/implicit_const_context_map_test: Fail # No support for implicit creation.
-implicit_creation/implicit_const_context_prefix_constructor_generic_named_test: Fail # No support for implicit creation.
-implicit_creation/implicit_const_context_prefix_constructor_generic_test: Fail # No support for implicit creation.
-implicit_creation/implicit_const_context_prefix_constructor_named_test: Fail # No support for implicit creation.
-implicit_creation/implicit_const_context_prefix_constructor_test: Fail # No support for implicit creation.
-implicit_creation/implicit_const_not_default_values_test/o.*: CompileTimeError # No support for implicit creation.
-implicit_creation/implicit_new_constructor_generic_named_test: Fail # No support for implicit creation.
-implicit_creation/implicit_new_constructor_named_test: Fail # No support for implicit creation.
-implicit_creation/implicit_new_or_const_composite_test: Fail # No support for implicit creation.
-implicit_creation/implicit_new_or_const_generic_test: Fail # No support for implicit creation.
-implicit_creation/implicit_new_or_const_test: Fail # No support for implicit creation.
-implicit_creation/implicit_new_prefix_constructor_generic_named_test: Fail # No support for implicit creation.
-implicit_creation/implicit_new_prefix_constructor_named_test: Fail # No support for implicit creation.
-setter_override2_test/02: MissingCompileTimeError # Issue 14736
-void/return_future_future_or_void_async_error0_test: MissingCompileTimeError # https://github.com/dart-lang/sdk/issues/33218
-void/return_future_future_or_void_async_error1_test/none: MissingStaticWarning # https://github.com/dart-lang/sdk/issues/33218
-void/return_future_future_or_void_sync_error0_test: MissingCompileTimeError # https://github.com/dart-lang/sdk/issues/33218
-void/return_future_or_future_or_void_sync_error1_test: MissingCompileTimeError # https://github.com/dart-lang/sdk/issues/33218
-void/return_future_or_future_or_void_sync_error2_test/none: MissingStaticWarning # https://github.com/dart-lang/sdk/issues/33218
-void/return_future_or_void_async_error0_test: MissingCompileTimeError # https://github.com/dart-lang/sdk/issues/33218
-void/return_future_or_void_sync_error3_test: MissingCompileTimeError # https://github.com/dart-lang/sdk/issues/33218
-void/return_future_or_void_sync_error4_test/none: MissingStaticWarning # https://github.com/dart-lang/sdk/issues/33218
-void/return_future_void_async_error2_test: MissingCompileTimeError # https://github.com/dart-lang/sdk/issues/33218
-void/return_void_async_error0_test: MissingCompileTimeError # https://github.com/dart-lang/sdk/issues/33218
-void/return_void_async_error1_test: MissingCompileTimeError # https://github.com/dart-lang/sdk/issues/33218
-void/return_void_async_error2_test: MissingCompileTimeError # https://github.com/dart-lang/sdk/issues/33218
-void/return_void_async_error3_test: MissingCompileTimeError # https://github.com/dart-lang/sdk/issues/33218
-void/return_void_async_error4_test: MissingCompileTimeError # https://github.com/dart-lang/sdk/issues/33218
-void/return_void_async_test: StaticWarning # https://github.com/dart-lang/sdk/issues/33218
-void/return_void_sync_error0_test: MissingCompileTimeError # https://github.com/dart-lang/sdk/issues/33218
-void/return_void_sync_error1_test: MissingCompileTimeError # https://github.com/dart-lang/sdk/issues/33218
-void/return_void_sync_error2_test: MissingCompileTimeError # https://github.com/dart-lang/sdk/issues/33218
+[ $compiler == app_jit || $compiler == app_jitk || $compiler == dartk || $compiler == dartkb || $compiler == dartkp || $compiler == none || $compiler == precompiler ]
+double_literals/*: Skip # https://github.com/dart-lang/sdk/issues/34358
[ $compiler == app_jit || $compiler == none ]
+invalid_returns/*: Skip # https://github.com/dart-lang/sdk/issues/34013
library_env_test/has_no_mirror_support: RuntimeError, OK
+void/*: Skip # https://github.com/dart-lang/sdk/issues/34013
+
+[ $compiler == dartdevc || $compiler == dartdevk ]
+double_literals/*: Skip # https://github.com/dart-lang/sdk/issues/34359
[ $hot_reload || $hot_reload_rollback ]
cha_deopt1_test: Crash # Requires deferred libraries
diff --git a/tests/language_2/language_2_analyzer.status b/tests/language_2/language_2_analyzer.status
index 83f9f80..01ea12e 100644
--- a/tests/language_2/language_2_analyzer.status
+++ b/tests/language_2/language_2_analyzer.status
@@ -5,395 +5,6 @@
# Sections in this file should contain "$compiler == dart2analyzer".
[ $compiler == dart2analyzer ]
-mock_writable_final_private_field_test: CompileTimeError # Issue 30848
-vm/reflect_core_vm_test: CompileTimeError # Issue 30848
-
-[ $compiler == dart2analyzer && $analyzer_use_fasta_parser ]
-multiline_newline_test/01: Pass
-multiline_newline_test/01r: Pass
-multiline_newline_test/02: Pass
-multiline_newline_test/02r: Pass
-multiline_newline_test/04: Pass
-multiline_newline_test/04r: Pass
-multiline_newline_test/05: Pass
-multiline_newline_test/05r: Pass
-regress_29349_test: Pass
-void/generalized_void_syntax_test: Pass
-void/void_type_function_types_test/none: Pass
-
-[ $compiler == dart2analyzer && !$analyzer_use_fasta_parser && !$fasta ]
-constructor_type_parameter_test/00: MissingCompileTimeError # Issue 33110
-constructor_with_type_parameters_test/03: MissingCompileTimeError
-
-[ $compiler == dart2analyzer && $fasta ]
-arg_param_trailing_comma_test/100: Crash # Issue #34043 - Error recovery in outline (extraneous comma before formal parameter)
-arg_param_trailing_comma_test/24: Crash # Issue #34043 - Error recovery in outline (extraneous comma before formal parameter)
-arg_param_trailing_comma_test/25: Crash # Issue #34043 - Error recovery in outline (extraneous comma before formal parameter)
-arg_param_trailing_comma_test/26: Crash # Issue #34043 - Error recovery in outline (extraneous comma before formal parameter)
-arg_param_trailing_comma_test/72: Crash # Issue #34043 - Error recovery in outline (extraneous comma before formal parameter)
-arg_param_trailing_comma_test/73: Crash # Issue #34043 - Error recovery in outline (extraneous comma before formal parameter)
-arg_param_trailing_comma_test/74: Crash # Issue #34043 - Error recovery in outline (extraneous comma before formal parameter)
-arg_param_trailing_comma_test/98: Crash # Issue #34043 - Error recovery in outline (extraneous comma before formal parameter)
-arg_param_trailing_comma_test/99: Crash # Issue #34043 - Error recovery in outline (extraneous comma before formal parameter)
-black_listed_test/02: Crash # Issue 33686 - No core library found
-black_listed_test/04: Crash # Issue 33686 - No core library found
-black_listed_test/06: Crash # Issue 33686 - No core library found
-black_listed_test/08: Crash # Issue 33686 - No core library found
-black_listed_test/10: Crash # Issue 33686 - No core library found
-black_listed_test/12: Crash # Issue 33686 - No core library found
-black_listed_test/14: Crash # Issue 33686 - No core library found
-built_in_identifier_illegal_test/implements: Crash # Issue #34043 - Error recovery in outline (synthetic token used where type expected)
-built_in_identifier_illegal_test/part: Crash # No resolution for a file
-built_in_identifier_illegal_test/typedef: Crash # Issue 33686 - No core library found
-built_in_identifier_type_annotation_test/mixin: Crash # Issue 34164 - mixin support
-built_in_identifier_type_annotation_test/part: Crash # No resolution for a file
-built_in_identifier_type_annotation_test/set: Crash # Issue #34043 - Error recovery in outline
-built_in_identifier_type_annotation_test/set-funret: Crash # Issue #34043 - Error recovery in outline
-call_nonexistent_static_test/10: Crash # Error recovery in method body (attempt to read from setter)
-class_cycle2_test/01: Crash # Issue #34043 - Error recovery in outline (class hierarchy cycle - see also #33756)
-class_cycle2_test/02: Crash # Issue #34043 - Error recovery in outline (class hierarchy cycle - see also #33756)
-class_cycle_test/00: Crash # Issue #34043 - Error recovery in outline (class hierarchy cycle - see also #33756)
-class_cycle_test/01: Crash # Issue #34043 - Error recovery in outline (class hierarchy cycle - see also #33756)
-compile_time_constant_static5_test/11: CompileTimeError # Issue 31537
-compile_time_constant_static5_test/16: CompileTimeError # Issue 31537
-compile_time_constant_static5_test/21: CompileTimeError # Issue 31537
-compile_time_constant_static5_test/23: CompileTimeError # Issue 31402
-config_import_corelib_test: CompileTimeError # Issue 34047
-conflicting_generic_interfaces_hierarchy_loop_infinite_test: Crash # Issue #34043 - Error recovery in outline (class hierarchy cycle - see also #33756)
-conflicting_generic_interfaces_hierarchy_loop_test: Crash # Issue #34043 - Error recovery in outline (class hierarchy cycle - see also #33756)
-const_counter_test/01: Crash # Error recovery in method body (use of non-const closure in a const context)
-const_native_factory_test: Crash # Issue #34043 - Error recovery in outline (native const factory)
-constructor9_test/01: MissingCompileTimeError
-constructor_name_test/02: Crash # Issue #34043 - Error recovery in outline (illegal constructor name)
-constructor_named_arguments_test/01: Crash # Error recovery in method body (argument mismatch in constructor redirect)
-constructor_redirect2_test/04: Crash # Issue 33686 - No core library found
-constructor_redirect_test/01: Crash # Error recovery in method body (reference to non-static method in constructor initializer)
-covariant_override_test: Crash # Improper handling of correct code - override fails to appear in kernel representation
-covariant_subtyping_test: Crash # Improper handling of correct code - problem with function-typed parameters in a generic class
-crash_6725_test/01: Crash # Error recovery in method body (mishandling of improper for-in variable)
-cyclic_class_member_test/01: Crash # Issue #34043 - Error recovery in outline (class hierarchy cycle - see also #33756)
-deep_nesting_statement_test/01: Crash # Error recovery in method body (deep nesting causes method to disappear)
-deferred_load_library_wrong_args_test/01: CompileTimeError # Issue 34047
-duplicate_constructor_test/01: Crash # Issue 33686 - No core library found
-duplicate_field_with_initializer_test/01: Crash # Issue 33686 - No core library found
-dynamic_prefix_core_test/none: CompileTimeError # Issue 34047
-emit_const_fields_test: CompileTimeError # Issue 34047
-enum_syntax_test/02: Crash # Issue #34043 - Error recovery in outline (duplicate enum name)
-enum_syntax_test/03: Crash # Issue #34043 - Error recovery in outline (enum name collision)
-enum_syntax_test/04: Crash # Issue #34043 - Error recovery in outline (enum name collision)
-enum_syntax_test/05: Crash # Issue #34043 - Error recovery in outline (enum name collision)
-enum_syntax_test/06: Crash # Issue #34043 - Error recovery in outline (enum name collision)
-enum_syntax_test/09: Crash # Issue 33686 - No core library found
-enum_syntax_test/10: Crash # Issue 33686 - No core library found
-enum_syntax_test/11: Crash # Issue 33686 - No core library found
-enum_syntax_test/30: Crash # Error recovery in method body (attempt to instantiate an enum)
-export_ambiguous_main_test: MissingCompileTimeError
-external_test/21: CompileTimeError # Issue 34047
-external_test/24: CompileTimeError # Issue 34047
-factory2_test/01: Crash # Issue #34043 - Error recovery in outline (illegal constructor name)
-factory_test/00: Crash # Issue #34043 - Error recovery in outline (illegal constructor name)
-factory_with_type_parameters_test/03: Crash # Issue 33686 - No core library found
-factory_with_type_parameters_test/04: Crash # Issue 33686 - No core library found
-field1_test: Crash # Issue 33686 - No core library found
-field2_test: Crash # Issue 33686 - No core library found
-field3_test/01: MissingCompileTimeError
-field3_test/02: MissingCompileTimeError
-field4_test: Crash # Issue 33686 - No core library found
-field5_test: Crash # Issue 33686 - No core library found
-field6_test/00: Crash # Issue 33686 - No core library found
-field6_test/01: Crash # Issue 33686 - No core library found
-final_syntax_test/01: MissingCompileTimeError
-final_syntax_test/02: MissingCompileTimeError
-final_syntax_test/03: MissingCompileTimeError
-final_syntax_test/04: MissingCompileTimeError
-function_type_parameter2_negative_test: Crash # Error recovery in method body (use of non-const closure in a const context)
-function_type_parameter_negative_test: Crash # Error recovery in method body (use of non-const closure in a const context)
-generic_function_typedef2_test/04: Crash # Issue #34043 - Error recovery in outline (attempt to apply type arguments to a non-generic type)
-generic_local_functions_test: Crash # Problem with generic function-typed parameter
-generic_methods_generic_function_parameter_test: Crash # Problem with generic function-typed parameter
-generic_methods_generic_function_result_test/01: MissingCompileTimeError
-generic_no_such_method_dispatcher_simple_test: CompileTimeError # Issue 34047
-generic_no_such_method_dispatcher_test: CompileTimeError # Issue 34047
-generic_tearoff_test: Crash # Problem with generic function-typed parameter
-generic_test/01: MissingCompileTimeError
-get_set_syntax_test/02: Crash # Issue #34043 - Error recovery in outline (setter with wrong number of parameters - see also #33691)
-get_set_syntax_test/03: Crash # Issue #34043 - Error recovery in outline (setter with wrong number of parameters - see also #33691)
-get_set_syntax_test/06: Crash # Issue #34043 - Error recovery in outline (setter with wrong number of parameters - see also #33691)
-get_set_syntax_test/07: Crash # Issue #34043 - Error recovery in outline (setter with wrong number of parameters - see also #33691)
-get_set_syntax_test/10: Crash # Issue #34043 - Error recovery in outline (setter with wrong number of parameters - see also #33691)
-get_set_syntax_test/11: Crash # Issue #34043 - Error recovery in outline (setter with wrong number of parameters - see also #33691)
-get_set_syntax_test/14: Crash # Issue #34043 - Error recovery in outline (setter with wrong number of parameters - see also #33691)
-get_set_syntax_test/15: Crash # Issue #34043 - Error recovery in outline (setter with wrong number of parameters - see also #33691)
-getters_setters2_test/01: MissingStaticWarning
-getters_setters_type_test/01: MissingStaticWarning
-hidden_import_test/01: MissingStaticWarning
-hidden_import_test/02: MissingStaticWarning
-illegal_initializer_test/02: Crash # Issue #33771 - Error recovery in method body (error in constructor initializer)
-illegal_initializer_test/04: Crash # Issue #33771 - Error recovery in method body (error in constructor initializer)
-implements_futureor_test/01: Crash
-import_nonexisting_dart_uri_test/01: Crash # Issue 33686 - No core library found
-instantiate_tearoff_of_call_test: CompileTimeError # Front end fails to instantiate tear-offs of `call`
-instantiate_type_variable_test/01: Crash # Error recovery in method body (attempt to instantiate type variable)
-interface_cycle_test/01: Crash # Issue #34043 - Error recovery in outline (class hierarchy cycle - see also #33756)
-interface_cycle_test/02: Crash # Issue #34043 - Error recovery in outline (class hierarchy cycle - see also #33756)
-interface_injection1_test/1: Crash # Issue 33686 - No core library found
-interface_injection2_test/1: Crash # Issue 33686 - No core library found
-internal_library_test/02: Crash # Issue #34043 - Error recovery in outline (illegal part file)
-is_not_class2_test/01: Crash # Error recovery in method body (non-type where type expected)
-issue31596_super_test/01: CompileTimeError # Front end fails to skip forwarding stubs when resolving super calls
-issue31596_super_test/03: CompileTimeError # Front end fails to skip forwarding stubs when resolving super calls
-label5_test/01: Crash # Error recovery in method body (illegal jump target)
-label6_test/03: Crash # Error recovery in method body (illegal jump target)
-library_test/01: Crash # Issue 33686 - No core library found
-list_literal_negative_test: Crash # Error recovery in method body (malformed constructor invocation)
-list_literal_syntax_test/06: Crash
-main_not_a_function_test: Crash # Issue 33686 - No core library found
-metadata_test: Crash # Poor handling of annotation inside typedef
-missing_part_of_tag_test/01: Crash # Issue #34043 - Error recovery in outline (part file missing "part of" declaration - see also #33587)
-mixin_cyclic_test/01: Crash # Issue #34043 - Error recovery in outline (class hierarchy cycle - see also #33756)
-mixin_cyclic_test/02: Crash # Issue #34043 - Error recovery in outline (class hierarchy cycle - see also #33756)
-mixin_illegal_cycles_test/01: Crash # Issue #34043 - Error recovery in outline (class hierarchy cycle - see also #33756)
-mixin_illegal_cycles_test/02: Crash # Issue #34043 - Error recovery in outline (class hierarchy cycle - see also #33756)
-mixin_illegal_cycles_test/03: Crash # Issue #34043 - Error recovery in outline (class hierarchy cycle - see also #33756)
-mixin_illegal_cycles_test/04: Crash # Issue #34043 - Error recovery in outline (class hierarchy cycle - see also #33756)
-mixin_illegal_cycles_test/05: Crash # Issue #34043 - Error recovery in outline (class hierarchy cycle - see also #33756)
-mixin_illegal_cycles_test/06: Crash # Issue #34043 - Error recovery in outline (class hierarchy cycle - see also #33756)
-mixin_illegal_super_use_test/01: MissingCompileTimeError
-mixin_illegal_super_use_test/04: MissingCompileTimeError
-mixin_illegal_super_use_test/07: 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/01: Crash # Issue 33686 - No core library found
-mixin_illegal_syntax_test/02: Crash # Issue 33686 - No core library found
-mixin_illegal_syntax_test/03: Crash # Issue 33686 - No core library found
-mixin_illegal_syntax_test/04: Crash # Issue 33686 - No core library found
-mixin_illegal_syntax_test/05: Crash # Issue 33686 - No core library found
-mixin_illegal_syntax_test/06: Crash # Issue #34043 - Error recovery in outline (syntax error in class declaration)
-mixin_illegal_syntax_test/07: Crash # Issue 33686 - No core library found
-mixin_illegal_syntax_test/08: Crash # Issue 33686 - No core library found
-mixin_illegal_syntax_test/09: Crash # Issue 33686 - No core library found
-mixin_illegal_syntax_test/10: Crash # Issue #34043 - Error recovery in outline (syntax error in class declaration)
-mixin_illegal_syntax_test/11: Crash # Issue #34043 - Error recovery in outline (syntax error in class declaration)
-mixin_illegal_syntax_test/12: Crash # Issue #34043 - Error recovery in outline (syntax error in class declaration)
-mixin_illegal_syntax_test/14: Crash # Issue #34043 - Error recovery in outline (syntax error in class declaration)
-mixin_supertype_subclass2_test/02: MissingStaticWarning
-mixin_supertype_subclass2_test/05: MissingStaticWarning
-mixin_supertype_subclass3_test/02: MissingStaticWarning
-mixin_supertype_subclass3_test/05: MissingStaticWarning
-mixin_supertype_subclass4_test/01: MissingStaticWarning
-mixin_supertype_subclass4_test/02: MissingStaticWarning
-mixin_supertype_subclass4_test/03: MissingStaticWarning
-mixin_supertype_subclass4_test/04: MissingStaticWarning
-mixin_supertype_subclass4_test/05: MissingStaticWarning
-named_constructor_test/07: Crash # Error recovery in method body (type arguments in non-grammatical location)
-named_constructor_test/10: Crash # Error recovery in method body (type arguments in non-grammatical location)
-named_parameters_aggregated_test/03: Crash # Error recovery in method body (default value in function-typed parameter declaration)
-nested_generic_closure_test: Crash # Problem with generic function-typed parameter
-new_expression_type_args_test/00: Crash # Error recovery in method body (attempt to instantiate type variable)
-new_expression_type_args_test/01: Crash # Error recovery in method body (attempt to instantiate type variable)
-no_main_test/01: MissingStaticWarning
-not_enough_positional_arguments_test/01: Crash # Error recovery in method body (error in super constructor call)
-not_enough_positional_arguments_test/02: Crash # Error recovery in method body (error in super constructor call)
-not_enough_positional_arguments_test/05: Crash # Error recovery in method body (error in super constructor call)
-null_no_such_method_test: CompileTimeError # Issue 34047
-operator2_negative_test: Crash # Issue #34043 - Error recovery in outline (illegal operator declaration)
-parameter_default_test/01: Crash # Issue #34043 - Error recovery in outline (default value in required parameter)
-parameter_default_test/02: Crash # Issue #34043 - Error recovery in outline (default value in required parameter)
-parameter_default_test/03: Crash # Issue #34043 - Error recovery in outline (default value in required parameter)
-parameter_default_test/04: Crash # Issue #34043 - Error recovery in outline (default value in required parameter)
-parameter_default_test/05: Crash # Issue #34043 - Error recovery in outline (default value in required parameter)
-parameter_default_test/06: Crash # Issue #34043 - Error recovery in outline (default value in required parameter)
-parameter_metadata_test/02: Crash # Poor handling of annotation inside function-typed parameter
-parameter_metadata_test/03: Crash # Poor handling of annotation inside function-typed parameter
-parameter_metadata_test/04: Crash # Poor handling of annotation inside function-typed parameter
-parser_quirks_test: CompileTimeError # Issue 34047
-part_of_multiple_libs_test/01: Crash # Poor handling of part file used by multiple libs
-part_refers_to_core_library_test/01: Crash # Issue 33686 - No core library found
-prefix_shadow_test/01: Crash # Error recovery in method body (attempt to use type variable as prefix)
-prefix_variable_collision_test/01: Crash # Issue 33686 - No core library found
-regress_20394_test/01: Crash # Error recovery in method body (error in super constructor call)
-regress_23408_test: CompileTimeError # Issue 34047
-regress_27617_test/1: Crash # The analyzer doesn't report this error.
-regress_28217_test/01: Crash # Error recovery in method body (error in constructor redirect)
-regress_28217_test/none: Crash # Error recovery in method body (error in constructor redirect)
-regress_29025_test: CompileTimeError # Issue 34047
-regress_29405_test: CompileTimeError # Issue 34047
-regress_30339_test: CompileTimeError # Issue 34047
-regress_33235_04_test/01: Crash # Issue 33686 - No core library found
-regress_33235_05_test/01: Crash # Issue 33686 - No core library found
-regress_33235_06_test/01: Crash # Issue 33686 - No core library found
-regress_33235_08_test/01: Crash # Issue 33686 - No core library found
-regress_33235_09_test/01: Crash # Issue 33686 - No core library found
-regress_33235_14_test/01: Crash # Issue 33686 - No core library found
-regress_33235_15_test/01: Crash # Issue 33686 - No core library found
-script1_negative_test: Crash # Error resovery in outline (imported library has incorrect declaration order)
-script2_negative_test: Crash # Error resovery in outline (part file contains a "library" declaration)
-setter3_test/01: MissingStaticWarning
-setter3_test/02: MissingStaticWarning
-setter_declaration2_negative_test: Crash # Issue #34043 - Error recovery in outline (setter with wrong number of parameters - see also #33691)
-setter_declaration_negative_test: Crash # Issue #34043 - Error recovery in outline (setter with wrong number of parameters - see also #33691)
-setter_no_getter_call_test/01: Crash # Error recovery in method body (attempt to read from setter)
-setter_no_getter_test/01: CompileTimeError # Issue 34047
-static_setter_conflicts_test/09: Crash # Issue 33686 - No core library found
-static_setter_conflicts_test/10: Crash # Issue 33686 - No core library found
-static_setter_get_test/01: Crash # Error recovery in method body (attempt to read from setter)
-string_split_test: CompileTimeError # Issue 34047
-string_supertype_checked_test: CompileTimeError # Issue 34047
-super_bound_closure_test/none: CompileTimeError # Issue 34047
-super_conditional_operator_test/01: Crash # Error recovery in method body (error in constructor redirect)
-super_no_such_method1_test: CompileTimeError # Issue 34047
-super_no_such_method2_test: CompileTimeError # Issue 34047
-super_no_such_method3_test: CompileTimeError # Issue 34047
-super_operator_index5_test: CompileTimeError # Issue 34047
-super_operator_index6_test: CompileTimeError # Issue 34047
-super_operator_index7_test: CompileTimeError # Issue 34047
-super_operator_index8_test: CompileTimeError # Issue 34047
-switch3_negative_test: Crash # Error recovery in method body (illegal jump target)
-switch5_negative_test: Crash # Error recovery in method body (illegal jump target)
-switch7_negative_test: Crash # Error recovery in method body (illegal jump target)
-switch_case_warn_test/15: MissingCompileTimeError
-switch_case_warn_test/17: MissingCompileTimeError
-syntax_test/04: Crash # Issue #34043 - Error recovery in outline (illegal operator declaration)
-syntax_test/05: Crash # Issue #34043 - Error recovery in outline (illegal operator declaration)
-syntax_test/06: Crash # Issue #34043 - Error recovery in outline (illegal operator declaration)
-syntax_test/07: Crash # Issue #34043 - Error recovery in outline (illegal operator declaration)
-syntax_test/08: Crash # Issue #34043 - Error recovery in outline (illegal operator declaration)
-syntax_test/09: Crash # Issue #34043 - Error recovery in outline (illegal operator declaration)
-syntax_test/10: Crash # Issue #34043 - Error recovery in outline (illegal operator declaration)
-syntax_test/11: Crash # Issue #34043 - Error recovery in outline (illegal operator declaration)
-syntax_test/13: Crash # Issue #34043 - Error recovery in outline (illegal operator declaration)
-syntax_test/14: Crash # Issue #34043 - Error recovery in outline (illegal operator declaration)
-syntax_test/15: Crash # Issue #34043 - Error recovery in outline (illegal operator declaration)
-syntax_test/16: Crash # Issue #34043 - Error recovery in outline (illegal operator declaration)
-syntax_test/17: Crash # Issue #34043 - Error recovery in outline (illegal operator declaration)
-syntax_test/18: Crash # Issue #34043 - Error recovery in outline (illegal operator declaration)
-syntax_test/19: Crash # Issue #34043 - Error recovery in outline (illegal operator declaration)
-syntax_test/20: Crash # Issue #34043 - Error recovery in outline (illegal operator declaration)
-syntax_test/21: Crash # Issue #34043 - Error recovery in outline (illegal operator declaration)
-syntax_test/23: Crash # Issue #34043 - Error recovery in outline (illegal operator declaration)
-syntax_test/24: Crash # Issue #34043 - Error recovery in outline (illegal operator declaration)
-syntax_test/25: Crash # Issue #34043 - Error recovery in outline (illegal operator declaration)
-syntax_test/26: Crash # Issue #34043 - Error recovery in outline (illegal operator declaration)
-this_conditional_operator_test/01: Crash # Error recovery in method body (error in constructor redirect)
-this_in_initializer_test/06: Crash # Error recovery in method body (error in constructor initializer)
-this_in_initializer_test/07: Crash # Error recovery in method body (error in constructor initializer)
-this_in_initializer_test/08: Crash # Error recovery in method body (error in constructor initializer)
-this_in_initializer_test/10: Crash # Error recovery in method body (error in constructor initializer)
-this_in_initializer_test/11: Crash # Error recovery in method body (error in constructor initializer)
-this_in_initializer_test/12: Crash # Error recovery in method body (error in constructor initializer)
-this_in_initializer_test/13: Crash # Error recovery in method body (error in constructor initializer)
-this_in_initializer_test/15: Crash # Error recovery in method body (error in constructor initializer)
-this_in_initializer_test/16: Crash # Error recovery in method body (error in constructor initializer)
-this_in_initializer_test/17: Crash # Error recovery in method body (error in constructor initializer)
-this_in_initializer_test/18: Crash # Error recovery in method body (error in constructor initializer)
-this_in_initializer_test/25: Crash # Error recovery in method body (error in constructor initializer)
-this_in_initializer_test/26: Crash # Error recovery in method body (error in constructor initializer)
-this_in_initializer_test/28: Crash # Error recovery in method body (error in constructor initializer)
-this_in_initializer_test/35: Crash # Error recovery in method body (error in constructor initializer)
-this_in_initializer_test/36: Crash # Error recovery in method body (error in constructor initializer)
-this_in_initializer_test/38: Crash # Error recovery in method body (error in constructor initializer)
-this_in_initializer_test/40: Crash # Error recovery in method body (error in constructor initializer)
-this_in_initializer_test/41: Crash # Error recovery in method body (error in constructor initializer)
-this_test/01: Crash # Error recovery in method body (nonsensical use of this)
-this_test/02: Crash # Error recovery in method body (nonsensical use of this)
-this_test/03: Crash # Error recovery in method body (nonsensical use of this)
-this_test/04: Crash # Error recovery in method body (nonsensical use of this)
-this_test/05: Crash # Error recovery in method body (nonsensical use of this)
-this_test/06: Crash # Error recovery in method body (nonsensical use of this)
-this_test/07: Crash # Error recovery in method body (nonsensical use of this)
-this_test/08: Crash # Error recovery in method body (nonsensical use of this)
-toplevel_collision1_test/00: Crash # Issue 33686 - No core library found
-toplevel_collision1_test/02: Crash # Issue 33686 - No core library found
-toplevel_collision2_test/00: Crash # Issue 33686 - No core library found
-toplevel_collision2_test/01: Crash # Issue 33686 - No core library found
-type_parameter_test/04: Crash # Issue #34043 - Error recovery in outline (attempt to use class type parameter in static signature)
-type_parameter_test/05: Crash # Issue #34043 - Error recovery in outline (attempt to use class type parameter in static signature)
-type_parameter_test/06: Crash # Issue #34043 - Error recovery in outline (attempt to use class type parameter in static signature)
-type_parameter_test/08: Crash # Issue #34043 - Error recovery in outline (attempt to use class type parameter in static signature)
-type_parameter_test/09: Crash # Issue #34043 - Error recovery in outline (attempt to use class type parameter in static signature)
-type_promotion_functions_test/02: CompileTimeError # Issue 34047
-type_promotion_functions_test/03: CompileTimeError # Issue 34047
-type_promotion_functions_test/04: CompileTimeError # Issue 34047
-type_promotion_functions_test/09: CompileTimeError # Issue 34047
-type_promotion_functions_test/11: CompileTimeError # Issue 34047
-type_promotion_functions_test/12: CompileTimeError # Issue 34047
-type_promotion_functions_test/13: CompileTimeError # Issue 34047
-type_promotion_functions_test/14: CompileTimeError # Issue 34047
-type_promotion_functions_test/none: CompileTimeError # Issue 34047
-type_promotion_more_specific_test/04: CompileTimeError # Issue 34047
-type_variable_static_context_test: Crash # Error recovery in method body (attempt to instantiate type variable)
-unbalanced_brace_test/01: Crash # Error recovery due to mismatched braces
-unbalanced_brace_test/02: Crash # Error recovery due to mismatched braces
-unsupported_operators_test/01: Crash # Error recovery in method body (attempt to use unsupported operator)
-unsupported_operators_test/02: Crash # Error recovery in method body (attempt to use unsupported operator)
-unsupported_operators_test/03: Crash # Error recovery in method body (attempt to use unsupported operator)
-unsupported_operators_test/04: Crash # Error recovery in method body (attempt to use unsupported operator)
-variable_declaration_metadata_test/13: Crash # Error recovery in method body (annotation in for statement)
-variable_declaration_metadata_test/14: Crash # Error recovery in method body (annotation in for statement)
-variable_declaration_metadata_test/15: Crash # Error recovery in method body (annotation in for statement)
-variable_declaration_metadata_test/16: Crash # Error recovery in method body (annotation in for statement)
-variable_shadow_class_test/01: Crash # Error recovery in method body (attempt to use local variable as prefix)
-vm/debug_break_vm_test/01: Crash # Error recovery in method body (illegal jump target)
-vm/debug_break_vm_test/02: Crash # Error recovery in method body (illegal jump target)
-vm/regress_27201_test: Crash # Issue 33686 - No core library found
-vm/regress_33469_test/01: Crash # Const evaluator fails to detect invalid shift
-vm/regress_33469_test/02: Crash # Const evaluator fails to detect invalid shift
-vm/regress_33469_test/03: MissingCompileTimeError
-web_int_literals_test/01: MissingCompileTimeError
-web_int_literals_test/02: MissingCompileTimeError
-web_int_literals_test/03: MissingCompileTimeError
-web_int_literals_test/10: MissingCompileTimeError
-web_int_literals_test/11: MissingCompileTimeError
-web_int_literals_test/12: MissingCompileTimeError
-web_int_literals_test/13: MissingCompileTimeError
-web_int_literals_test/20: MissingCompileTimeError
-web_int_literals_test/21: MissingCompileTimeError
-web_int_literals_test/22: MissingCompileTimeError
-web_int_literals_test/23: MissingCompileTimeError
-web_int_literals_test/24: MissingCompileTimeError
-web_int_literals_test/25: MissingCompileTimeError
-web_int_literals_test/26: MissingCompileTimeError
-web_int_literals_test/27: MissingCompileTimeError
-web_int_literals_test/28: MissingCompileTimeError
-web_int_literals_test/29: MissingCompileTimeError
-web_int_literals_test/61: MissingCompileTimeError
-web_int_literals_test/62: MissingCompileTimeError
-web_int_literals_test/63: MissingCompileTimeError
-web_int_literals_test/64: MissingCompileTimeError
-web_int_literals_test/65: MissingCompileTimeError
-web_int_literals_test/70: MissingCompileTimeError
-
-[ $compiler == dart2analyzer && !$fasta ]
abstract_override_adds_optional_args_concrete_subclass_test: MissingCompileTimeError # Issue #30568
abstract_override_adds_optional_args_concrete_test: MissingCompileTimeError # Issue #30568
abstract_override_adds_optional_args_supercall_test: MissingCompileTimeError # Issue #30568
@@ -406,27 +17,17 @@
additional_interface_adds_optional_args_test: CompileTimeError # Issue #30568
built_in_identifier_prefix_test: CompileTimeError
cascaded_forwarding_stubs_test: CompileTimeError
-check_member_static_test/01: CompileTimeError
config_import_corelib_test: CompileTimeError
config_import_corelib_test: StaticWarning, OK
conflicting_generic_interfaces_hierarchy_loop_infinite_test: Skip # Crashes or times out
const_cast2_test/01: CompileTimeError
const_cast2_test/none: CompileTimeError
-constructor9_test/01: MissingCompileTimeError # CFE Issue 33022
+constructor_reference_test/27: MissingCompileTimeError # Issue 34270
default_implementation2_test: CompileTimeError # Issue 30855
dynamic_prefix_core_test/01: MissingCompileTimeError
emit_const_fields_test: CompileTimeError
enum_syntax_test/05: Fail # Issue 21649
enum_syntax_test/06: Fail # Issue 21649
-error_stacktrace_test/00: MissingCompileTimeError
-error_stacktrace_test/00: Pass
-field3_test/01: MissingCompileTimeError # CFE Issue 33022
-field3_test/02: MissingCompileTimeError # CFE Issue 33022
-field3a_negative_test: StaticWarning # Issue 28823
-final_syntax_test/01: Fail # Issue 11124
-final_syntax_test/02: Fail # Issue 11124
-final_syntax_test/03: Fail # Issue 11124
-final_syntax_test/04: Fail # Issue 11124
forwarding_stub_tearoff_test: CompileTimeError
generic_local_functions_test: CompileTimeError # Issue 28515
generic_methods_generic_function_parameter_test: CompileTimeError # Issue 28515
@@ -435,15 +36,30 @@
generic_no_such_method_dispatcher_test: CompileTimeError
generic_tearoff_test: CompileTimeError
getter_setter_in_lib_test: Fail # Issue 23286
+getters_setters2_test/01: CompileTimeError
+getters_setters_type_test/01: CompileTimeError
+hidden_import_test/01: MissingStaticWarning # Issue #34302
+hidden_import_test/02: MissingStaticWarning # Issue #34302
implements_futureor_test/01: 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_prefix_constructor_generic_named_test: CompileTimeError
implicit_creation/implicit_const_context_prefix_constructor_generic_test: CompileTimeError
-index_assign_operator_infer_return_type_test: StaticWarning
+index_assign_operator_infer_return_type_test: CompileTimeError
initializing_formal_final_test: MissingCompileTimeError
interceptor6_test: CompileTimeError
interface_test/00: MissingCompileTimeError
+invalid_returns/async_invalid_return_00_test/none: CompileTimeError # issue #34319
+invalid_returns/async_invalid_return_01_test/none: CompileTimeError # issue #34319
+invalid_returns/async_invalid_return_02_test/none: CompileTimeError # issue #34319
+invalid_returns/async_invalid_return_03_test/none: CompileTimeError # issue #34319
+invalid_returns/async_invalid_return_04_test/none: CompileTimeError # issue #34319
+invalid_returns/sync_invalid_return_00_test/none: CompileTimeError # issue #34319
+invalid_returns/sync_invalid_return_01_test/none: CompileTimeError # issue #34319
+invalid_returns/sync_invalid_return_02_test/none: CompileTimeError # issue #34319
+invalid_returns/sync_invalid_return_03_test/none: CompileTimeError # issue #34319
+invalid_returns/sync_invalid_return_04_test/none: CompileTimeError # issue #34319
+invalid_returns/sync_invalid_return_05_test/none: CompileTimeError # issue #34319
issue13673_test: StaticWarning # Issue 31925
issue31596_implement_covariant_test: CompileTimeError
issue31596_override_test/01: CompileTimeError
@@ -462,6 +78,7 @@
mixin_forwarding_constructor4_test/01: CompileTimeError # See issue 15101
mixin_forwarding_constructor4_test/02: CompileTimeError # See issue 15101
mixin_forwarding_constructor4_test/03: CompileTimeError # See issue 15101
+mixin_method_override_test/01: MissingCompileTimeError
mixin_super_2_test/01: MissingCompileTimeError
mixin_super_2_test/03: MissingCompileTimeError
mixin_super_constructor_named_test/01: CompileTimeError # See issue 15101
@@ -479,20 +96,12 @@
mixin_supertype_subclass_test/02: MissingStaticWarning # Issue 25614
mixin_supertype_subclass_test/05: MissingCompileTimeError
mixin_supertype_subclass_test/05: MissingStaticWarning # Issue 25614
-multiline_newline_test/01: CompileTimeError
-multiline_newline_test/01r: CompileTimeError
-multiline_newline_test/02: CompileTimeError
-multiline_newline_test/02r: CompileTimeError
-multiline_newline_test/04: MissingCompileTimeError
-multiline_newline_test/04r: MissingCompileTimeError
-multiline_newline_test/05: MissingCompileTimeError
-multiline_newline_test/05r: MissingCompileTimeError
+mock_writable_final_private_field_test: CompileTimeError # Issue 30848
multiple_interface_inheritance_test: CompileTimeError # Issue 30552
nested_generic_closure_test: CompileTimeError
no_main_test/01: Fail # Issue 20030
no_main_test/01: MissingStaticWarning # Issue 28823
no_such_constructor2_test: StaticWarning
-override_field_test/02: CompileTimeError
override_inheritance_field_test/42: CompileTimeError
parser_quirks_test: CompileTimeError
part_of_multiple_libs_test/01: MissingCompileTimeError # Issue 33227
@@ -504,11 +113,12 @@
regress_23408_test: Skip # don't care about the static warning.
regress_27617_test/1: MissingCompileTimeError
regress_29025_test: CompileTimeError # Issue 29081
-regress_29349_test: CompileTimeError # Issue 29744
regress_29405_test: CompileTimeError # Issue 29421
regress_29784_test/02: MissingCompileTimeError # Issue 29784
regress_30121_test: CompileTimeError # Issue 31087
regress_30339_test: CompileTimeError
+regress_32660_test/01: MissingCompileTimeError # Issue #32660.
+regress_32660_test/04: CompileTimeError
regress_33235_03_test/01: MissingCompileTimeError
regress_33235_07_test/03: MissingCompileTimeError
regress_33235_10_test/01: MissingCompileTimeError
@@ -521,6 +131,8 @@
regress_33235_16_test/03: MissingCompileTimeError
regress_33235_19_test: CompileTimeError
regress_33235_20_test: CompileTimeError
+setter3_test/01: CompileTimeError # Invalid test, see https://github.com/dart-lang/sdk/issues/33837
+setter3_test/02: CompileTimeError # Invalid test, see https://github.com/dart-lang/sdk/issues/33837
setter_override2_test/02: MissingCompileTimeError # Issue 14736
static_setter_conflicts_test/02: MissingCompileTimeError
static_setter_conflicts_test/11: MissingCompileTimeError
@@ -531,30 +143,31 @@
super_call4_test/01: MissingCompileTimeError
super_no_such_method4_test/01: MissingCompileTimeError # Issue 33553
super_no_such_method5_test/01: MissingCompileTimeError # Issue 33553
-super_setter_test: StaticWarning # Issue 28823
+super_setter_test: CompileTimeError # Invalid test, see https://github.com/dart-lang/sdk/issues/33837
switch_case_test/none: CompileTimeError
syntax_test/60: MissingCompileTimeError
syntax_test/61: MissingCompileTimeError
try_catch_on_syntax_test/10: MissingCompileTimeError
try_catch_on_syntax_test/11: MissingCompileTimeError
type_inference_inconsistent_inheritance_test: MissingCompileTimeError
-type_promotion_functions_test/01: Pass
-type_promotion_functions_test/05: Pass
-type_promotion_functions_test/06: Pass
-type_promotion_functions_test/07: Pass
-type_promotion_functions_test/08: Pass
-type_promotion_functions_test/10: Pass
+type_promotion_functions_test/02: CompileTimeError
+type_promotion_functions_test/03: CompileTimeError
+type_promotion_functions_test/04: CompileTimeError
+type_promotion_functions_test/09: CompileTimeError
+type_promotion_functions_test/11: CompileTimeError
+type_promotion_functions_test/12: CompileTimeError
+type_promotion_functions_test/13: CompileTimeError
+type_promotion_functions_test/14: CompileTimeError
+type_promotion_functions_test/none: CompileTimeError
type_variable_scope_test/none: Fail # Issue 11578
+type_variable_static_context_negative_test: Fail # Issue 12161
vm/debug_break_enabled_vm_test: Skip
vm/debug_break_vm_test/*: Skip
-vm/lazy_deopt_with_exception_test: CompileTimeError
-vm/lazy_deopt_with_exception_test: Pass
+vm/reflect_core_vm_test: CompileTimeError # Issue 33994
vm/regress_27201_test: SkipByDesign # Loads bad library, so will always crash.
-vm/regress_33469_test/01: Crash # http://dartbug.com/33481
-vm/regress_33469_test/02: Crash # http://dartbug.com/33481
-vm/regress_33469_test/03: MissingCompileTimeError # http://dartbug.com/33481
-void/generalized_void_syntax_test: CompileTimeError # https://github.com/dart-lang/sdk/issues/30177
-void/void_type_function_types_test/none: CompileTimeError # Issue 30177
+void/return_future_future_or_void_async_error1_test/none: CompileTimeError # issue #34319
+void/return_future_or_future_or_void_sync_error2_test/none: CompileTimeError # issue #34319
+void/return_future_or_void_sync_error4_test/none: CompileTimeError # issue #34319
void/void_type_usage_test/async_use_in_yield: MissingCompileTimeError # https://github.com/dart-lang/sdk/issues/30177
void/void_type_usage_test/async_use_in_yield_star: MissingCompileTimeError # https://github.com/dart-lang/sdk/issues/30177
void/void_type_usage_test/call_boolean_and_right: MissingCompileTimeError # https://github.com/dart-lang/sdk/issues/30177
diff --git a/tests/language_2/language_2_dart2js.status b/tests/language_2/language_2_dart2js.status
index ab0f9c8..25b6963 100644
--- a/tests/language_2/language_2_dart2js.status
+++ b/tests/language_2/language_2_dart2js.status
@@ -67,6 +67,7 @@
mixin_type_parameter_inference_test/16: CompileTimeError
mixin_type_parameter_inference_test/none: CompileTimeError
number_identity_test: CompileTimeError, OK # Error if web int literal cannot be represented exactly, see http://dartbug.com/33351
+partial_instantiation_eager_bounds_check_test: RuntimeError # Issue #34295
partial_tearoff_instantiation_test/05: Pass # for the wrong reason.
partial_tearoff_instantiation_test/06: Pass # for the wrong reason.
partial_tearoff_instantiation_test/07: Pass # for the wrong reason.
@@ -218,7 +219,6 @@
const_init2_test/02: MissingCompileTimeError
const_map2_test/00: MissingCompileTimeError
const_map3_test/00: MissingCompileTimeError
-const_switch2_test/01: MissingCompileTimeError
const_switch_test/02: RuntimeError, OK # constant identity based on JS constants
const_switch_test/04: RuntimeError, OK # constant identity based on JS constants
const_types_test/01: MissingCompileTimeError
@@ -468,8 +468,6 @@
type_literal_prefix_call_test/00: MissingCompileTimeError
type_promotion_logical_and_test/01: MissingCompileTimeError
type_variable_bounds_test/02: Crash # NoSuchMethodError: The method 'accept' was called on null.
-wrong_number_type_arguments_test/01: MissingCompileTimeError
-wrong_number_type_arguments_test/none: Pass
[ $compiler == dart2js && $minified ]
cyclic_type2_test: RuntimeError # Issue 31054
@@ -529,8 +527,6 @@
type_literal_prefix_call_test/00: MissingCompileTimeError
type_promotion_logical_and_test/01: MissingCompileTimeError
type_variable_bounds_test/02: Crash # NoSuchMethodError: The method 'accept' was called on null.
-wrong_number_type_arguments_test/01: MissingCompileTimeError
-wrong_number_type_arguments_test/none: Pass
[ $compiler == dart2js && $strong ]
async_await_test/02: RuntimeError
@@ -540,6 +536,7 @@
bit_operations_test: RuntimeError
branch_canonicalization_test: RuntimeError
canonical_const2_test: RuntimeError, OK # non JS number semantics
+closure_type_arguments_test: Crash # Issue 34272
compile_time_constant_o_test/01: MissingCompileTimeError
compile_time_constant_o_test/02: MissingCompileTimeError
compile_time_constant_static5_test/11: CompileTimeError
@@ -555,7 +552,6 @@
const_map2_test/00: MissingCompileTimeError
const_map3_test/00: MissingCompileTimeError
const_map4_test: RuntimeError
-const_switch2_test/01: MissingCompileTimeError
const_switch_test/02: RuntimeError, OK # constant identity based on JS constants
const_switch_test/04: RuntimeError, OK # constant identity based on JS constants
constructor12_test: RuntimeError
@@ -655,6 +651,7 @@
mixin_illegal_superclass_test/28: MissingCompileTimeError
mixin_illegal_superclass_test/29: MissingCompileTimeError
mixin_illegal_superclass_test/30: MissingCompileTimeError
+mixin_method_override_test/G5: Skip # Issue 34354
mixin_of_mixin_test/none: CompileTimeError
mixin_super_2_test/none: CompileTimeError
mixin_super_test: CompileTimeError
diff --git a/tests/language_2/language_2_dartdevc.status b/tests/language_2/language_2_dartdevc.status
index 3098bb5..d31e225 100644
--- a/tests/language_2/language_2_dartdevc.status
+++ b/tests/language_2/language_2_dartdevc.status
@@ -29,16 +29,13 @@
built_in_identifier_type_annotation_test/dynamic-list: RuntimeError # Issue 28816
cascaded_forwarding_stubs_generic_test: RuntimeError
cascaded_forwarding_stubs_test: CompileTimeError
-check_member_static_test/01: CompileTimeError
conflicting_generic_interfaces_hierarchy_loop_infinite_test: Skip # Crashes or times out
conflicting_generic_interfaces_simple_test: MissingCompileTimeError
const_cast2_test/01: CompileTimeError
const_cast2_test/none: CompileTimeError
const_constructor_mixin3_test/01: MissingCompileTimeError # Issue 33644
const_constructor_mixin_test/01: MissingCompileTimeError # Issue 33644
-constructor9_test/01: MissingCompileTimeError # CFE Issue 33022
-constructor_type_parameter_test/00: MissingCompileTimeError
-constructor_with_type_parameters_test/03: MissingCompileTimeError
+constructor_reference_test/27: MissingCompileTimeError
covariance_field_test/03: RuntimeError
covariant_override/tear_off_type_test: RuntimeError # Issue 28395
default_implementation2_test: CompileTimeError # Issue 30855
@@ -52,13 +49,7 @@
expect_test: RuntimeError # Issue 29920
export_private_test/01: MissingCompileTimeError # Issue 29920
f_bounded_quantification3_test: RuntimeError # Issue 29920
-field3_test/01: MissingCompileTimeError # CFE Issue 33022
-field3_test/02: MissingCompileTimeError # CFE Issue 33022
field_wierd_name_test: Crash
-final_syntax_test/01: MissingCompileTimeError
-final_syntax_test/02: MissingCompileTimeError
-final_syntax_test/03: MissingCompileTimeError
-final_syntax_test/04: MissingCompileTimeError
forwarding_stub_tearoff_generic_test: RuntimeError
forwarding_stub_tearoff_test: CompileTimeError
function_propagation_test: RuntimeError
@@ -69,6 +60,8 @@
generic_no_such_method_dispatcher_test: CompileTimeError
getter_closure_execution_order_test: RuntimeError # Issue 29920
getter_setter_in_lib_test: CompileTimeError
+getters_setters2_test/01: CompileTimeError
+getters_setters_type_test/01: CompileTimeError
implements_futureor_test/01: MissingCompileTimeError
implicit_creation/implicit_const_context_constructor_generic_named_test: CompileTimeError
implicit_creation/implicit_const_context_constructor_generic_test: CompileTimeError
@@ -78,11 +71,23 @@
implicit_downcast_during_indexed_compound_assignment_test: RuntimeError
implicit_downcast_during_indexed_if_null_assignment_test: RuntimeError
import_private_test/01: MissingCompileTimeError # Issue 29920
+index_assign_operator_infer_return_type_test: CompileTimeError
initializing_formal_final_test: MissingCompileTimeError
instantiate_tearoff_after_contravariance_check_test: RuntimeError
instantiate_tearoff_of_call_test: RuntimeError
interface_test/00: MissingCompileTimeError
internal_library_test/01: MissingCompileTimeError # Issue 29920
+invalid_returns/async_invalid_return_00_test/none: CompileTimeError # issue #34319
+invalid_returns/async_invalid_return_01_test/none: CompileTimeError # issue #34319
+invalid_returns/async_invalid_return_02_test/none: CompileTimeError # issue #34319
+invalid_returns/async_invalid_return_03_test/none: CompileTimeError # issue #34319
+invalid_returns/async_invalid_return_04_test/none: CompileTimeError # issue #34319
+invalid_returns/sync_invalid_return_00_test/none: CompileTimeError # issue #34319
+invalid_returns/sync_invalid_return_01_test/none: CompileTimeError # issue #34319
+invalid_returns/sync_invalid_return_02_test/none: CompileTimeError # issue #34319
+invalid_returns/sync_invalid_return_03_test/none: CompileTimeError # issue #34319
+invalid_returns/sync_invalid_return_04_test/none: CompileTimeError # issue #34319
+invalid_returns/sync_invalid_return_05_test/none: CompileTimeError # issue #34319
issue31596_implement_covariant_test: CompileTimeError
issue31596_override_test/01: CompileTimeError
issue31596_override_test/02: CompileTimeError
@@ -102,6 +107,7 @@
mixin_forwarding_constructor4_test/01: CompileTimeError # See issue 15101
mixin_forwarding_constructor4_test/02: CompileTimeError # See issue 15101
mixin_forwarding_constructor4_test/03: CompileTimeError # See issue 15101
+mixin_method_override_test/01: MissingCompileTimeError # Issue 34235
mixin_super_2_test/01: MissingCompileTimeError
mixin_super_2_test/03: MissingCompileTimeError
mixin_super_constructor_named_test/01: CompileTimeError # See issue 15101
@@ -122,16 +128,8 @@
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
-multiline_newline_test/02: CompileTimeError
-multiline_newline_test/02r: CompileTimeError
-multiline_newline_test/03: RuntimeError
-multiline_newline_test/03r: RuntimeError
-multiline_newline_test/none: RuntimeError
multiple_interface_inheritance_test: CompileTimeError # Issue 30552
nested_generic_closure_test: CompileTimeError
-override_field_test/02: CompileTimeError
override_inheritance_field_test/42: CompileTimeError
part_of_multiple_libs_test/01: MissingCompileTimeError
part_refers_to_core_library_test/01: Crash
@@ -141,12 +139,13 @@
regress_24283_test: RuntimeError # Intended to fail, requires 64-bit numbers.
regress_27617_test/1: MissingCompileTimeError
regress_29025_test: CompileTimeError # Issue 29081
-regress_29349_test: CompileTimeError # Issue 31093
regress_29405_test: CompileTimeError # Issue 29421
-regress_29784_test/02: MissingCompileTimeError
regress_29784_test/02: Crash # assert initializers not implemented
+regress_29784_test/02: MissingCompileTimeError
regress_30121_test: CompileTimeError # Issue 31087
regress_30339_test: CompileTimeError # As expected. Should we make this a multi test?
+regress_32660_test/01: MissingCompileTimeError # Issue #32660.
+regress_32660_test/04: CompileTimeError
regress_33235_03_test/01: MissingCompileTimeError
regress_33235_07_test/03: MissingCompileTimeError
regress_33235_10_test/01: MissingCompileTimeError
@@ -159,6 +158,8 @@
regress_33235_16_test/03: MissingCompileTimeError
regress_33235_19_test: CompileTimeError
regress_33235_20_test: CompileTimeError
+setter3_test/01: CompileTimeError # Invalid test, see https://github.com/dart-lang/sdk/issues/33837
+setter3_test/02: CompileTimeError # Invalid test, see https://github.com/dart-lang/sdk/issues/33837
setter_override2_test/02: MissingCompileTimeError # Issue 14736
stacktrace_test: RuntimeError # Issue 29920
static_setter_conflicts_test/02: MissingCompileTimeError
@@ -173,6 +174,7 @@
super_operator_index5_test: RuntimeError # 33470
super_operator_index7_test: RuntimeError # 33470
super_operator_index8_test: RuntimeError # 33470
+super_setter_test: CompileTimeError # Invalid test, see https://github.com/dart-lang/sdk/issues/33837
switch_case_test/none: CompileTimeError
syntax_test/60: MissingCompileTimeError
syntax_test/61: MissingCompileTimeError
@@ -195,8 +197,9 @@
type_promotion_functions_test/14: CompileTimeError # Issue 30895
type_promotion_functions_test/none: CompileTimeError # Issue 30895
type_variable_scope_test/none: CompileTimeError
-void/generalized_void_syntax_test: CompileTimeError # https://github.com/dart-lang/sdk/issues/30177
-void/void_type_function_types_test/none: CompileTimeError # Issue 30177
+void/return_future_future_or_void_async_error1_test/none: CompileTimeError # issue #34319
+void/return_future_or_future_or_void_sync_error2_test/none: CompileTimeError # issue #34319
+void/return_future_or_void_sync_error4_test/none: CompileTimeError # issue #34319
void/void_type_usage_test/async_use_in_yield: MissingCompileTimeError # https://github.com/dart-lang/sdk/issues/30177
void/void_type_usage_test/async_use_in_yield_star: MissingCompileTimeError # https://github.com/dart-lang/sdk/issues/30177
void/void_type_usage_test/call_boolean_and_right: MissingCompileTimeError # https://github.com/dart-lang/sdk/issues/30177
@@ -236,8 +239,6 @@
call_method_implicit_tear_off_implements_function_test/06: RuntimeError # Kernel is missing the implicit `call` tearoff for assignment `Function`
call_method_must_not_be_field_test/06: RuntimeError # Kernel does not distinguish `d()` from `d.call()`
call_method_must_not_be_getter_test/06: RuntimeError # Kernel does not distinguish `d()` from `d.call()`
-call_non_method_field_test/01: MissingCompileTimeError
-call_non_method_field_test/02: MissingCompileTimeError
compile_time_constant_c_test/02: MissingCompileTimeError
compile_time_constant_k_test/01: MissingCompileTimeError
compile_time_constant_k_test/02: MissingCompileTimeError
@@ -263,7 +264,6 @@
const_map2_test/00: MissingCompileTimeError
const_map3_test/00: MissingCompileTimeError
const_optional_args_test/01: MissingCompileTimeError
-const_switch2_test/01: MissingCompileTimeError
const_syntax_test/05: MissingCompileTimeError
constants_test/05: MissingCompileTimeError
covariant_subtyping_test: RuntimeError
@@ -347,6 +347,10 @@
mixin_supertype_subclass_test/02: MissingCompileTimeError
mixin_supertype_subclass_test/05: MissingCompileTimeError
mock_writable_final_private_field_test: RuntimeError
+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
no_such_method_mock_test: RuntimeError # Issue 31426 - Kernel does not introduce nSM for implemented fields.
@@ -386,7 +390,6 @@
type_promotion_functions_test/none: CompileTimeError # Issue 31537
type_promotion_logical_and_test/01: MissingCompileTimeError
type_promotion_more_specific_test/04: CompileTimeError # Issue 31533
-wrong_number_type_arguments_test/01: MissingCompileTimeError
[ $compiler == dartdevk && $checked ]
assertion_initializer_const_error2_test/*: MissingCompileTimeError
@@ -455,8 +458,8 @@
generic_is_check_test: RuntimeError # Issue 29920; Expect.isTrue(false) fails.
generic_tearoff_test: CompileTimeError
guess_cid_test: CompileTimeError, OK # Error if web int literal cannot be represented exactly, see http://dartbug.com/33351
-identical_closure2_test: CompileTimeError, OK # Error if web int literal cannot be represented exactly, see http://dartbug.com/33351
identical_closure2_test: RuntimeError # Issue 29920; Expect.isFalse(true) fails.
+identical_closure2_test: CompileTimeError, OK # Error if web int literal cannot be represented exactly, see http://dartbug.com/33351
infinite_switch_label_test: RuntimeError # Issue 29920; NoSuchMethodError: method not found: '<Unexpected Null Value>'
infinity_test: RuntimeError # Issue 29920; Expect.isFalse(true) fails.
instance_creation_in_function_annotation_test: RuntimeError # Issue 29920; UnimplementedError: JsClosureMirror.function unimplemented
@@ -482,10 +485,6 @@
mint_compares_test: CompileTimeError, OK # Error if web int literal cannot be represented exactly, see http://dartbug.com/33351
mint_identical_test: CompileTimeError, OK # Error if web int literal cannot be represented exactly, see http://dartbug.com/33351
modulo_test: RuntimeError # Ints and doubles are unified.; Expect.throws fails: Did not throw
-multiline_newline_test/04: MissingCompileTimeError
-multiline_newline_test/04r: MissingCompileTimeError
-multiline_newline_test/05: MissingCompileTimeError
-multiline_newline_test/05r: MissingCompileTimeError
named_parameters_default_eq_test/none: RuntimeError # Expect.isTrue(false) fails.
nan_identical_test: RuntimeError # Issue 29920; Unsupported operation: Uint64 accessor not supported by dart2js.
nested_switch_label_test: RuntimeError # Issue 29920; UnimplementedError: node <ShadowContinueSwitchStatement> see https://github.com/dart-lang/sdk/issues/29352 `continue #L1;
@@ -494,6 +493,7 @@
number_identity_test: CompileTimeError, OK # Error if web int literal cannot be represented exactly, see http://dartbug.com/33351
numbers_test: RuntimeError # Issue 29920; Expect.equals(expected: <false>, actual: <true>) fails.
parser_quirks_test: CompileTimeError
+partial_instantiation_eager_bounds_check_test: RuntimeError # Issue 34296
regress_16640_test: RuntimeError # Issue 29920; Uncaught Error: type arguments should not be null: E => {
regress_22443_test: RuntimeError # Uncaught Expect.isTrue(false) fails.
stack_overflow_stacktrace_test: RuntimeError # Issue 29920; RangeError: Maximum call stack size exceeded
diff --git a/tests/language_2/language_2_kernel.status b/tests/language_2/language_2_kernel.status
index 76a6c49..818a556 100644
--- a/tests/language_2/language_2_kernel.status
+++ b/tests/language_2/language_2_kernel.status
@@ -155,6 +155,9 @@
vm/type_cast_vm_test: RuntimeError
web_int_literals_test/*: SkipByDesign # Test applies only to JavaScript targets
+[ $compiler == dartdevk ]
+mixin_method_override_test/G5: Skip # Issue 34354
+
[ $compiler == dartkp ]
covariant_subtyping_test: RuntimeError
generic_methods_generic_function_result_test/01: MissingCompileTimeError
@@ -202,24 +205,14 @@
web_int_literals_test/*: SkipByDesign # Test applies only to JavaScript targets
[ $fasta ]
-abstract_override_adds_optional_args_concrete_subclass_test: MissingCompileTimeError # Issue 32014.
-abstract_override_adds_optional_args_concrete_test: MissingCompileTimeError # Issue 32014.
-additional_interface_adds_optional_args_concrete_subclass_test: MissingCompileTimeError # Issue 32014.
-additional_interface_adds_optional_args_concrete_test: MissingCompileTimeError # Issue 32014.
async_return_types_test/nestedFuture: MissingCompileTimeError # Issue 33068
-call_non_method_field_test/01: MissingCompileTimeError # Issue 32975
-call_non_method_field_test/02: MissingCompileTimeError # Issue 32975
const_cast2_test/01: CompileTimeError # Issue 32517
const_cast2_test/none: CompileTimeError # Issue 32517
const_constructor_mixin3_test: CompileTimeError # Issue 33644.
const_constructor_mixin_test: CompileTimeError # Issue 33644.
-const_instance_field_test/01: MissingCompileTimeError # Fasta bug: Const instance field. Issue 32326.
const_types_test/34: MissingCompileTimeError # Issue 31590
const_types_test/39: MissingCompileTimeError # Issue 31590
-cyclic_type_variable_test/01: MissingCompileTimeError # Issue 32989 (missing cycle check in bounds)
-cyclic_type_variable_test/02: MissingCompileTimeError # Issue 32989 (missing cycle check in bounds)
-cyclic_type_variable_test/03: MissingCompileTimeError # Issue 32989 (missing cycle check in bounds)
-cyclic_type_variable_test/04: MissingCompileTimeError # Issue 32989 (missing cycle check in bounds)
+constructor_reference_test/27: MissingCompileTimeError # Issue 32972 (parsed as method call)
default_factory2_test/01: MissingCompileTimeError # Issue 31590
default_factory_test/01: MissingCompileTimeError # Issue 31590
deferred_inheritance_constraints_test/extends: MissingCompileTimeError # Fasta/KernelVM bug: Deferred loading kernel issue 30273.
@@ -273,18 +266,34 @@
mixin_invalid_bound_test/08: MissingCompileTimeError # Issue 33308
mixin_invalid_bound_test/09: MissingCompileTimeError # Issue 33308
mixin_invalid_bound_test/10: MissingCompileTimeError # Issue 33308
+mixin_method_override_test/C1: MissingCompileTimeError # Issue 34235
+mixin_method_override_test/C2: MissingCompileTimeError # Issue 34235
+mixin_method_override_test/C3: MissingCompileTimeError # Issue 34235
+mixin_method_override_test/C4: MissingCompileTimeError # Issue 34235
+mixin_method_override_test/C7: MissingCompileTimeError # Issue 34235
+mixin_method_override_test/C8: MissingCompileTimeError # Issue 34235
+mixin_method_override_test/G2: MissingCompileTimeError # Issue 34235
+mixin_method_override_test/G3: MissingCompileTimeError # Issue 34235
+mixin_method_override_test/G4: MissingCompileTimeError # Issue 34235
+mixin_method_override_test/G5: Crash # Issue 34354
+mixin_method_override_test/N10: MissingCompileTimeError # Issue 34235
+mixin_method_override_test/N11: MissingCompileTimeError # Issue 34235
+mixin_method_override_test/N12: MissingCompileTimeError # Issue 34235
+mixin_method_override_test/N13: MissingCompileTimeError # Issue 34235
+mixin_method_override_test/N14: MissingCompileTimeError # Issue 34235
+mixin_method_override_test/N3: MissingCompileTimeError # Issue 34235
+mixin_method_override_test/N4: MissingCompileTimeError # Issue 34235
+mixin_method_override_test/N5: MissingCompileTimeError # Issue 34235
+mixin_method_override_test/N6: MissingCompileTimeError # Issue 34235
+mixin_method_override_test/N9: MissingCompileTimeError # Issue 34235
+mixin_method_override_test/O10: MissingCompileTimeError # Issue 34235
+mixin_method_override_test/O13: MissingCompileTimeError # Issue 34235
+mixin_method_override_test/O14: MissingCompileTimeError # Issue 34235
+mixin_method_override_test/O5: MissingCompileTimeError # Issue 34235
+mixin_method_override_test/O6: MissingCompileTimeError # Issue 34235
+mixin_method_override_test/O9: MissingCompileTimeError # Issue 34235
mixin_super_bound_test/01: MissingCompileTimeError # Issue 33308
mixin_super_bound_test/02: MissingCompileTimeError # Issue 33308
-mixin_type_parameters_errors_test/03: MissingCompileTimeError # Issue 32972
-mixin_type_parameters_errors_test/04: MissingCompileTimeError # Issue 32972
-named_constructor_test/01: MissingCompileTimeError # Issue 34159
-named_parameters_default_eq_test/02: MissingCompileTimeError # Issue 34160
-partial_tearoff_instantiation_test/05: MissingCompileTimeError # Issue 32281
-partial_tearoff_instantiation_test/06: MissingCompileTimeError # Issue 32281
-partial_tearoff_instantiation_test/07: MissingCompileTimeError # Issue 32281
-partial_tearoff_instantiation_test/08: MissingCompileTimeError # Issue 32281
-redirecting_factory_default_values_test/01: MissingCompileTimeError # Issue 34160
-redirecting_factory_default_values_test/02: MissingCompileTimeError # Issue 34160
regress_22976_test/*: CompileTimeError # Issue 31935
syntax_test/28: MissingCompileTimeError # Issue 29763 - low priority
syntax_test/29: MissingCompileTimeError # Issue 29763 - low priority
@@ -303,7 +312,6 @@
type_variable_bounds_test/04: MissingCompileTimeError # Issue 33308
type_variable_bounds_test/05: MissingCompileTimeError # Issue 33308
type_variable_bounds_test/06: MissingCompileTimeError # Issue 33308
-type_variable_bounds_test/08: MissingCompileTimeError # Issue 33308
type_variable_bounds_test/11: MissingCompileTimeError # Issue 33308
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.
@@ -358,333 +366,11 @@
[ $compiler != dart2analyzer && $fasta ]
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.
-invalid_returns/async_invalid_return_05_test: MissingCompileTimeError
-invalid_returns/async_invalid_return_06_test: MissingCompileTimeError
-invalid_returns/async_invalid_return_07_test: MissingCompileTimeError
-invalid_returns/async_invalid_return_08_test: MissingCompileTimeError
-invalid_returns/async_invalid_return_09_test: MissingCompileTimeError
-invalid_returns/async_invalid_return_10_test: MissingCompileTimeError
-invalid_returns/async_invalid_return_11_test: MissingCompileTimeError
-invalid_returns/async_invalid_return_12_test: MissingCompileTimeError
-invalid_returns/async_invalid_return_13_test: MissingCompileTimeError
-invalid_returns/async_invalid_return_14_test: MissingCompileTimeError
-invalid_returns/async_invalid_return_15_test: MissingCompileTimeError
-invalid_returns/async_invalid_return_16_test: MissingCompileTimeError
-invalid_returns/async_invalid_return_17_test: MissingCompileTimeError
-invalid_returns/async_invalid_return_18_test: MissingCompileTimeError
-invalid_returns/async_invalid_return_19_test: MissingCompileTimeError
-invalid_returns/async_invalid_return_20_test: MissingCompileTimeError
-invalid_returns/async_invalid_return_21_test: MissingCompileTimeError
-invalid_returns/async_invalid_return_22_test: MissingCompileTimeError
-invalid_returns/async_invalid_return_23_test: MissingCompileTimeError
-invalid_returns/async_invalid_return_24_test: MissingCompileTimeError
-invalid_returns/async_invalid_return_25_test: MissingCompileTimeError
-invalid_returns/async_invalid_return_26_test: MissingCompileTimeError
-invalid_returns/async_invalid_return_27_test: MissingCompileTimeError
-invalid_returns/async_invalid_return_28_test: MissingCompileTimeError
-invalid_returns/async_invalid_return_29_test: MissingCompileTimeError
-invalid_returns/async_invalid_return_30_test: MissingCompileTimeError
-invalid_returns/async_invalid_return_31_test: MissingCompileTimeError
-invalid_returns/async_invalid_return_32_test: MissingCompileTimeError
-invalid_returns/async_invalid_return_33_test: MissingCompileTimeError
-invalid_returns/async_invalid_return_34_test: MissingCompileTimeError
-invalid_returns/async_invalid_return_35_test: MissingCompileTimeError
-invalid_returns/async_invalid_return_36_test: MissingCompileTimeError
-invalid_returns/async_invalid_return_37_test: MissingCompileTimeError
-invalid_returns/sync_invalid_return_06_test: MissingCompileTimeError
-invalid_returns/sync_invalid_return_07_test: MissingCompileTimeError
-invalid_returns/sync_invalid_return_08_test: MissingCompileTimeError
-invalid_returns/sync_invalid_return_09_test: MissingCompileTimeError
-invalid_returns/sync_invalid_return_10_test: MissingCompileTimeError
-invalid_returns/sync_invalid_return_11_test: MissingCompileTimeError
-invalid_returns/sync_invalid_return_12_test: MissingCompileTimeError
-invalid_returns/sync_invalid_return_13_test: MissingCompileTimeError
-invalid_returns/sync_invalid_return_14_test: MissingCompileTimeError
-invalid_returns/sync_invalid_return_15_test: MissingCompileTimeError
-invalid_returns/sync_invalid_return_16_test: MissingCompileTimeError
-invalid_returns/sync_invalid_return_17_test: 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.
-void/return_future_future_or_void_async_error0_test: MissingCompileTimeError
-void/return_future_future_or_void_sync_error0_test: MissingCompileTimeError
-void/return_future_or_future_or_void_sync_error1_test: MissingCompileTimeError
-void/return_future_or_void_sync_error3_test: MissingCompileTimeError
-void/return_void_async_error0_test: MissingCompileTimeError
-void/return_void_async_error1_test: MissingCompileTimeError
-void/return_void_async_error2_test: MissingCompileTimeError
-void/return_void_async_error4_test: MissingCompileTimeError
-void/return_void_sync_error0_test: MissingCompileTimeError
-void/return_void_sync_error1_test: MissingCompileTimeError
-void/return_void_sync_error2_test: MissingCompileTimeError
-void/void_block_return_test/00: MissingCompileTimeError
-void/void_type_callbacks_test/00: MissingCompileTimeError
-void/void_type_callbacks_test/01: MissingCompileTimeError
-void/void_type_usage_test/async_use_in_await_for: MissingCompileTimeError
-void/void_type_usage_test/async_use_in_yield: MissingCompileTimeError
-void/void_type_usage_test/async_use_in_yield_star: MissingCompileTimeError
-void/void_type_usage_test/call_addition: MissingCompileTimeError
-void/void_type_usage_test/call_argument: MissingCompileTimeError
-void/void_type_usage_test/call_boolean_and_left: MissingCompileTimeError
-void/void_type_usage_test/call_boolean_and_right: MissingCompileTimeError
-void/void_type_usage_test/call_boolean_negation: MissingCompileTimeError
-void/void_type_usage_test/call_boolean_or_left: MissingCompileTimeError
-void/void_type_usage_test/call_boolean_or_right: MissingCompileTimeError
-void/void_type_usage_test/call_cascade: MissingCompileTimeError
-void/void_type_usage_test/call_conditional_stmt: MissingCompileTimeError
-void/void_type_usage_test/call_do_while: MissingCompileTimeError
-void/void_type_usage_test/call_dynamic_init: MissingCompileTimeError
-void/void_type_usage_test/call_equals_left: MissingCompileTimeError
-void/void_type_usage_test/call_equals_right: MissingCompileTimeError
-void/void_type_usage_test/call_for_in: MissingCompileTimeError
-void/void_type_usage_test/call_identical: MissingCompileTimeError
-void/void_type_usage_test/call_is: MissingCompileTimeError
-void/void_type_usage_test/call_literal_list_init: MissingCompileTimeError
-void/void_type_usage_test/call_literal_map_key_init2: MissingCompileTimeError
-void/void_type_usage_test/call_literal_map_value_init2: MissingCompileTimeError
-void/void_type_usage_test/call_multiplication: MissingCompileTimeError
-void/void_type_usage_test/call_null_dot: MissingCompileTimeError
-void/void_type_usage_test/call_null_equals1: MissingCompileTimeError
-void/void_type_usage_test/call_return: MissingCompileTimeError # Issue 32804
-void/void_type_usage_test/call_throw: MissingCompileTimeError
-void/void_type_usage_test/call_toString: MissingCompileTimeError
-void/void_type_usage_test/call_use_in_conditional_assignment_right: MissingCompileTimeError
-void/void_type_usage_test/call_use_in_list_subscript: MissingCompileTimeError
-void/void_type_usage_test/call_use_in_map_lookup: MissingCompileTimeError
-void/void_type_usage_test/call_use_in_string_interpolation: MissingCompileTimeError
-void/void_type_usage_test/call_while: MissingCompileTimeError
-void/void_type_usage_test/conditional2_argument: MissingCompileTimeError
-void/void_type_usage_test/conditional2_dynamic_init: MissingCompileTimeError
-void/void_type_usage_test/conditional2_literal_list_init: MissingCompileTimeError
-void/void_type_usage_test/conditional2_literal_map_value_init2: MissingCompileTimeError
-void/void_type_usage_test/conditional2_null_equals1: MissingCompileTimeError
-void/void_type_usage_test/conditional2_return: MissingCompileTimeError # Issue 32804
-void/void_type_usage_test/conditional2_throw: MissingCompileTimeError
-void/void_type_usage_test/conditional2do_while: MissingCompileTimeError
-void/void_type_usage_test/conditional2for_in: MissingCompileTimeError
-void/void_type_usage_test/conditional2while: MissingCompileTimeError
-void/void_type_usage_test/conditional3_argument: MissingCompileTimeError
-void/void_type_usage_test/conditional3_dynamic_init: MissingCompileTimeError
-void/void_type_usage_test/conditional3_literal_list_init: MissingCompileTimeError
-void/void_type_usage_test/conditional3_literal_map_value_init2: MissingCompileTimeError
-void/void_type_usage_test/conditional3_null_equals1: MissingCompileTimeError
-void/void_type_usage_test/conditional3_return: MissingCompileTimeError # Issue 32804
-void/void_type_usage_test/conditional3_throw: MissingCompileTimeError
-void/void_type_usage_test/conditional_argument: MissingCompileTimeError
-void/void_type_usage_test/conditional_do_while: MissingCompileTimeError
-void/void_type_usage_test/conditional_dynamic_init: MissingCompileTimeError
-void/void_type_usage_test/conditional_for_in: MissingCompileTimeError
-void/void_type_usage_test/conditional_literal_list_init: MissingCompileTimeError
-void/void_type_usage_test/conditional_literal_map_value_init2: MissingCompileTimeError
-void/void_type_usage_test/conditional_null_equals1: MissingCompileTimeError
-void/void_type_usage_test/conditional_return: MissingCompileTimeError # Issue 32804
-void/void_type_usage_test/conditional_throw: MissingCompileTimeError
-void/void_type_usage_test/conditional_while: MissingCompileTimeError
-void/void_type_usage_test/final_local_addition: MissingCompileTimeError
-void/void_type_usage_test/final_local_argument: MissingCompileTimeError
-void/void_type_usage_test/final_local_boolean_and_left: MissingCompileTimeError
-void/void_type_usage_test/final_local_boolean_and_right: MissingCompileTimeError
-void/void_type_usage_test/final_local_boolean_negation: MissingCompileTimeError
-void/void_type_usage_test/final_local_boolean_or_left: MissingCompileTimeError
-void/void_type_usage_test/final_local_boolean_or_right: MissingCompileTimeError
-void/void_type_usage_test/final_local_cascade: MissingCompileTimeError
-void/void_type_usage_test/final_local_conditional_stmt: MissingCompileTimeError
-void/void_type_usage_test/final_local_do_while: MissingCompileTimeError
-void/void_type_usage_test/final_local_dynamic_init: MissingCompileTimeError
-void/void_type_usage_test/final_local_equals_left: MissingCompileTimeError
-void/void_type_usage_test/final_local_equals_right: MissingCompileTimeError
-void/void_type_usage_test/final_local_for_in: MissingCompileTimeError
-void/void_type_usage_test/final_local_identical: MissingCompileTimeError
-void/void_type_usage_test/final_local_is: MissingCompileTimeError
-void/void_type_usage_test/final_local_literal_list_init: MissingCompileTimeError
-void/void_type_usage_test/final_local_literal_map_key_init2: MissingCompileTimeError
-void/void_type_usage_test/final_local_literal_map_value_init2: MissingCompileTimeError
-void/void_type_usage_test/final_local_multiplication: MissingCompileTimeError
-void/void_type_usage_test/final_local_null_dot: MissingCompileTimeError
-void/void_type_usage_test/final_local_null_equals1: MissingCompileTimeError
-void/void_type_usage_test/final_local_return: MissingCompileTimeError # Issue 32804
-void/void_type_usage_test/final_local_throw: MissingCompileTimeError
-void/void_type_usage_test/final_local_toString: MissingCompileTimeError
-void/void_type_usage_test/final_local_use_in_conditional_assignment_right: MissingCompileTimeError
-void/void_type_usage_test/final_local_use_in_list_subscript: MissingCompileTimeError
-void/void_type_usage_test/final_local_use_in_map_lookup: MissingCompileTimeError
-void/void_type_usage_test/final_local_use_in_string_interpolation: MissingCompileTimeError
-void/void_type_usage_test/final_local_while: MissingCompileTimeError
-void/void_type_usage_test/global_addition: MissingCompileTimeError
-void/void_type_usage_test/global_argument: MissingCompileTimeError
-void/void_type_usage_test/global_boolean_and_left: MissingCompileTimeError
-void/void_type_usage_test/global_boolean_and_right: MissingCompileTimeError
-void/void_type_usage_test/global_boolean_negation: MissingCompileTimeError
-void/void_type_usage_test/global_boolean_or_left: MissingCompileTimeError
-void/void_type_usage_test/global_boolean_or_right: MissingCompileTimeError
-void/void_type_usage_test/global_cascade: MissingCompileTimeError
-void/void_type_usage_test/global_conditional_stmt: MissingCompileTimeError
-void/void_type_usage_test/global_do_while: MissingCompileTimeError
-void/void_type_usage_test/global_dynamic_init: MissingCompileTimeError
-void/void_type_usage_test/global_equals_left: MissingCompileTimeError
-void/void_type_usage_test/global_equals_right: MissingCompileTimeError
-void/void_type_usage_test/global_for_in: MissingCompileTimeError
-void/void_type_usage_test/global_identical: MissingCompileTimeError
-void/void_type_usage_test/global_is: MissingCompileTimeError
-void/void_type_usage_test/global_literal_list_init: MissingCompileTimeError
-void/void_type_usage_test/global_literal_map_key_init2: MissingCompileTimeError
-void/void_type_usage_test/global_literal_map_value_init2: MissingCompileTimeError
-void/void_type_usage_test/global_multiplication: MissingCompileTimeError
-void/void_type_usage_test/global_null_dot: MissingCompileTimeError
-void/void_type_usage_test/global_null_equals2: MissingCompileTimeError
-void/void_type_usage_test/global_return: MissingCompileTimeError # Issue 32804
-void/void_type_usage_test/global_throw: MissingCompileTimeError
-void/void_type_usage_test/global_toString: MissingCompileTimeError
-void/void_type_usage_test/global_use_in_conditional_assignment_left: MissingCompileTimeError
-void/void_type_usage_test/global_use_in_conditional_assignment_right: MissingCompileTimeError
-void/void_type_usage_test/global_use_in_list_subscript: MissingCompileTimeError
-void/void_type_usage_test/global_use_in_map_lookup: MissingCompileTimeError
-void/void_type_usage_test/global_use_in_string_interpolation: MissingCompileTimeError
-void/void_type_usage_test/global_while: MissingCompileTimeError
-void/void_type_usage_test/instance2_argument: MissingCompileTimeError
-void/void_type_usage_test/instance2_cascade: MissingCompileTimeError
-void/void_type_usage_test/instance2_do_while: MissingCompileTimeError
-void/void_type_usage_test/instance2_dynamic_init: MissingCompileTimeError
-void/void_type_usage_test/instance2_for_in: MissingCompileTimeError
-void/void_type_usage_test/instance2_is: MissingCompileTimeError
-void/void_type_usage_test/instance2_literal_list_init: MissingCompileTimeError
-void/void_type_usage_test/instance2_literal_map_key_init2: MissingCompileTimeError
-void/void_type_usage_test/instance2_literal_map_value_init2: MissingCompileTimeError
-void/void_type_usage_test/instance2_null_dot: MissingCompileTimeError
-void/void_type_usage_test/instance2_null_equals2: MissingCompileTimeError
-void/void_type_usage_test/instance2_return: MissingCompileTimeError # Issue 32804
-void/void_type_usage_test/instance2_throw: MissingCompileTimeError
-void/void_type_usage_test/instance2_toString: MissingCompileTimeError
-void/void_type_usage_test/instance2_while: MissingCompileTimeError
-void/void_type_usage_test/instance3_argument: MissingCompileTimeError
-void/void_type_usage_test/instance3_cascade: MissingCompileTimeError
-void/void_type_usage_test/instance3_do_while: MissingCompileTimeError
-void/void_type_usage_test/instance3_dynamic_init: MissingCompileTimeError
-void/void_type_usage_test/instance3_for_in: MissingCompileTimeError
-void/void_type_usage_test/instance3_is: MissingCompileTimeError
-void/void_type_usage_test/instance3_literal_list_init: MissingCompileTimeError
-void/void_type_usage_test/instance3_literal_map_key_init2: MissingCompileTimeError
-void/void_type_usage_test/instance3_literal_map_value_init2: MissingCompileTimeError
-void/void_type_usage_test/instance3_null_dot: MissingCompileTimeError
-void/void_type_usage_test/instance3_null_equals2: MissingCompileTimeError
-void/void_type_usage_test/instance3_return: MissingCompileTimeError # Issue 32804
-void/void_type_usage_test/instance3_throw: MissingCompileTimeError
-void/void_type_usage_test/instance3_toString: MissingCompileTimeError
-void/void_type_usage_test/instance3_while: MissingCompileTimeError
-void/void_type_usage_test/instance_argument: MissingCompileTimeError
-void/void_type_usage_test/instance_cascade: MissingCompileTimeError
-void/void_type_usage_test/instance_do_while: MissingCompileTimeError
-void/void_type_usage_test/instance_dynamic_init: MissingCompileTimeError
-void/void_type_usage_test/instance_for_in: MissingCompileTimeError
-void/void_type_usage_test/instance_is: MissingCompileTimeError
-void/void_type_usage_test/instance_literal_list_init: MissingCompileTimeError
-void/void_type_usage_test/instance_literal_map_key_init2: MissingCompileTimeError
-void/void_type_usage_test/instance_literal_map_value_init2: MissingCompileTimeError
-void/void_type_usage_test/instance_null_dot: MissingCompileTimeError
-void/void_type_usage_test/instance_null_equals2: MissingCompileTimeError
-void/void_type_usage_test/instance_return: MissingCompileTimeError # Issue 32804
-void/void_type_usage_test/instance_throw: MissingCompileTimeError
-void/void_type_usage_test/instance_toString: MissingCompileTimeError
-void/void_type_usage_test/instance_while: MissingCompileTimeError
-void/void_type_usage_test/local_addition: MissingCompileTimeError
-void/void_type_usage_test/local_argument: MissingCompileTimeError
-void/void_type_usage_test/local_boolean_and_left: MissingCompileTimeError
-void/void_type_usage_test/local_boolean_and_right: MissingCompileTimeError
-void/void_type_usage_test/local_boolean_negation: MissingCompileTimeError
-void/void_type_usage_test/local_boolean_or_left: MissingCompileTimeError
-void/void_type_usage_test/local_boolean_or_right: MissingCompileTimeError
-void/void_type_usage_test/local_cascade: MissingCompileTimeError
-void/void_type_usage_test/local_conditional_stmt: MissingCompileTimeError
-void/void_type_usage_test/local_do_while: MissingCompileTimeError
-void/void_type_usage_test/local_dynamic_init: MissingCompileTimeError
-void/void_type_usage_test/local_equals_left: MissingCompileTimeError
-void/void_type_usage_test/local_equals_right: MissingCompileTimeError
-void/void_type_usage_test/local_for_in: MissingCompileTimeError
-void/void_type_usage_test/local_identical: MissingCompileTimeError
-void/void_type_usage_test/local_is: MissingCompileTimeError
-void/void_type_usage_test/local_literal_list_init: MissingCompileTimeError
-void/void_type_usage_test/local_literal_map_key_init2: MissingCompileTimeError
-void/void_type_usage_test/local_literal_map_value_init2: MissingCompileTimeError
-void/void_type_usage_test/local_multiplication: MissingCompileTimeError
-void/void_type_usage_test/local_null_dot: MissingCompileTimeError
-void/void_type_usage_test/local_null_equals1: MissingCompileTimeError
-void/void_type_usage_test/local_return: MissingCompileTimeError # Issue 32804
-void/void_type_usage_test/local_throw: MissingCompileTimeError
-void/void_type_usage_test/local_toString: MissingCompileTimeError
-void/void_type_usage_test/local_use_in_conditional_assignment_left: MissingCompileTimeError
-void/void_type_usage_test/local_use_in_conditional_assignment_right: MissingCompileTimeError
-void/void_type_usage_test/local_use_in_list_subscript: MissingCompileTimeError
-void/void_type_usage_test/local_use_in_map_lookup: MissingCompileTimeError
-void/void_type_usage_test/local_use_in_string_interpolation: MissingCompileTimeError
-void/void_type_usage_test/local_while: MissingCompileTimeError
-void/void_type_usage_test/param_addition: MissingCompileTimeError
-void/void_type_usage_test/param_argument: MissingCompileTimeError
-void/void_type_usage_test/param_boolean_and_left: MissingCompileTimeError
-void/void_type_usage_test/param_boolean_and_right: MissingCompileTimeError
-void/void_type_usage_test/param_boolean_negation: MissingCompileTimeError
-void/void_type_usage_test/param_boolean_or_left: MissingCompileTimeError
-void/void_type_usage_test/param_boolean_or_right: MissingCompileTimeError
-void/void_type_usage_test/param_cascade: MissingCompileTimeError
-void/void_type_usage_test/param_conditional_stmt: MissingCompileTimeError
-void/void_type_usage_test/param_do_while: MissingCompileTimeError
-void/void_type_usage_test/param_dynamic_init: MissingCompileTimeError
-void/void_type_usage_test/param_equals_left: MissingCompileTimeError
-void/void_type_usage_test/param_equals_right: MissingCompileTimeError
-void/void_type_usage_test/param_for_in: MissingCompileTimeError
-void/void_type_usage_test/param_identical: MissingCompileTimeError
-void/void_type_usage_test/param_is: MissingCompileTimeError
-void/void_type_usage_test/param_literal_list_init: MissingCompileTimeError
-void/void_type_usage_test/param_literal_map_key_init2: MissingCompileTimeError
-void/void_type_usage_test/param_literal_map_value_init2: MissingCompileTimeError
-void/void_type_usage_test/param_multiplication: MissingCompileTimeError
-void/void_type_usage_test/param_null_dot: MissingCompileTimeError
-void/void_type_usage_test/param_null_equals1: MissingCompileTimeError
-void/void_type_usage_test/param_return: MissingCompileTimeError # Issue 32804
-void/void_type_usage_test/param_throw: MissingCompileTimeError
-void/void_type_usage_test/param_toString: MissingCompileTimeError
-void/void_type_usage_test/param_use_in_conditional_assignment_left: MissingCompileTimeError
-void/void_type_usage_test/param_use_in_conditional_assignment_right: MissingCompileTimeError
-void/void_type_usage_test/param_use_in_list_subscript: MissingCompileTimeError
-void/void_type_usage_test/param_use_in_map_lookup: MissingCompileTimeError
-void/void_type_usage_test/param_use_in_string_interpolation: MissingCompileTimeError
-void/void_type_usage_test/param_while: MissingCompileTimeError
-void/void_type_usage_test/paren_addition: MissingCompileTimeError
-void/void_type_usage_test/paren_argument: MissingCompileTimeError
-void/void_type_usage_test/paren_boolean_and_left: MissingCompileTimeError
-void/void_type_usage_test/paren_boolean_and_right: MissingCompileTimeError
-void/void_type_usage_test/paren_boolean_negation: MissingCompileTimeError
-void/void_type_usage_test/paren_boolean_or_left: MissingCompileTimeError
-void/void_type_usage_test/paren_boolean_or_right: MissingCompileTimeError
-void/void_type_usage_test/paren_cascade: MissingCompileTimeError
-void/void_type_usage_test/paren_conditional_stmt: MissingCompileTimeError
-void/void_type_usage_test/paren_do_while: MissingCompileTimeError
-void/void_type_usage_test/paren_dynamic_init: MissingCompileTimeError
-void/void_type_usage_test/paren_equals_left: MissingCompileTimeError
-void/void_type_usage_test/paren_equals_right: MissingCompileTimeError
-void/void_type_usage_test/paren_for_in: MissingCompileTimeError
-void/void_type_usage_test/paren_identical: MissingCompileTimeError
-void/void_type_usage_test/paren_is: MissingCompileTimeError
-void/void_type_usage_test/paren_literal_list_init: MissingCompileTimeError
-void/void_type_usage_test/paren_literal_map_key_init2: MissingCompileTimeError
-void/void_type_usage_test/paren_literal_map_value_init2: MissingCompileTimeError
-void/void_type_usage_test/paren_multiplication: MissingCompileTimeError
-void/void_type_usage_test/paren_null_dot: MissingCompileTimeError
-void/void_type_usage_test/paren_null_equals1: MissingCompileTimeError
-void/void_type_usage_test/paren_return: MissingCompileTimeError # Issue 32804
-void/void_type_usage_test/paren_throw: MissingCompileTimeError
-void/void_type_usage_test/paren_toString: MissingCompileTimeError
-void/void_type_usage_test/paren_use_in_conditional_assignment_right: MissingCompileTimeError
-void/void_type_usage_test/paren_use_in_list_subscript: MissingCompileTimeError
-void/void_type_usage_test/paren_use_in_map_lookup: MissingCompileTimeError
-void/void_type_usage_test/paren_use_in_string_interpolation: MissingCompileTimeError
-void/void_type_usage_test/paren_while: MissingCompileTimeError
-void/void_type_usage_test/sync_use_in_yield: MissingCompileTimeError
-void/void_type_usage_test/sync_use_in_yield_star: MissingCompileTimeError
-void/void_type_usage_test/void_default_parameter_closure: MissingCompileTimeError
-void/void_type_usage_test/void_default_parameter_global: MissingCompileTimeError
[ $compiler != dart2analyzer && $fasta && $strong ]
map_literal3_test/03: MissingCompileTimeError
@@ -724,7 +410,6 @@
vm/regress_28325_test: RuntimeError # No support for line numbers in stacktraces
[ $compiler == dartkp && $mode == debug && $runtime == dart_precompiled && $strong ]
-const_instance_field_test/01: Crash # Issue 32326.
external_test/13: Crash
type_promotion_functions_test/05: Pass
type_promotion_functions_test/06: Pass
@@ -1041,7 +726,6 @@
vm/type_vm_test/30: MissingRuntimeError
vm/type_vm_test/31: MissingRuntimeError
vm/type_vm_test/32: MissingRuntimeError
-wrong_number_type_arguments_test/01: MissingCompileTimeError
[ $compiler == dartkp && $minified ]
no_such_method_native_test: RuntimeError # Compares symbol #foobar with string "foobar" in noSuchMethod
@@ -1377,7 +1061,6 @@
variable_shadow_class_test/01: MissingCompileTimeError
[ $mode == debug && $runtime == vm && $strong && ($compiler == app_jitk || $compiler == dartk || $compiler == dartkb) ]
-const_instance_field_test/01: Crash # Issue 32326.
deopt_inlined_function_lazy_test: Skip
[ $mode == debug && $hot_reload && ($compiler == dartk || $compiler == dartkb) ]
@@ -1407,10 +1090,6 @@
vm/type_vm_test/35: MissingRuntimeError
vm/type_vm_test/36: MissingRuntimeError
-[ $runtime != dart_precompiled && $runtime != vm && $fasta ]
-generic_function_type_as_type_argument_test/01: MissingCompileTimeError # Issue 30931
-generic_function_type_as_type_argument_test/02: MissingCompileTimeError # Issue 30931
-
[ $runtime == vm && $checked && $strong && ($compiler == dartk || $compiler == dartkb) ]
assert_initializer_test/31: MissingCompileTimeError # KernelVM bug: Constant evaluation.
assert_initializer_test/32: MissingCompileTimeError # KernelVM bug: Constant evaluation.
@@ -1540,7 +1219,6 @@
method_override6_test/03: MissingCompileTimeError
mixin_illegal_super_use_test: Skip # Issues 24478 and 23773
mixin_illegal_superclass_test: Skip # Issues 24478 and 23773
-named_constructor_test/01: MissingRuntimeError # Fasta bug: Bad compilation of constructor reference.
named_parameters_default_eq_test/none: RuntimeError
nested_generic_closure_test: RuntimeError
no_main_test/01: Skip
@@ -1578,8 +1256,6 @@
vm/regress_29145_test: Skip # Issue 29145
vm/type_cast_vm_test: RuntimeError
web_int_literals_test/*: SkipByDesign # Test applies only to JavaScript targets
-wrong_number_type_arguments_test/01: MissingCompileTimeError
-wrong_number_type_arguments_test/none: Pass
[ $system == windows && $strong && ($compiler == dartk || $compiler == dartkb) ]
ct_const2_test: Fail
@@ -1601,7 +1277,6 @@
redirecting_factory_infinite_steps_test/01: MissingCompileTimeError
redirecting_factory_malbounded_test/01: MissingCompileTimeError
type_promotion_logical_and_test/01: MissingCompileTimeError
-wrong_number_type_arguments_test/01: MissingCompileTimeError
[ $fasta && !$strong ]
abstract_beats_arguments_test: MissingCompileTimeError
@@ -2393,6 +2068,10 @@
unresolved_top_level_method_test: MissingCompileTimeError
unresolved_top_level_var_test: MissingCompileTimeError
+[ $fasta && ($compiler == dartkb || $runtime != dart_precompiled && $runtime != vm) ]
+generic_function_type_as_type_argument_test/01: MissingCompileTimeError # Issue 30931
+generic_function_type_as_type_argument_test/02: MissingCompileTimeError # Issue 30931
+
[ $hot_reload_rollback && ($compiler == dartk || $compiler == dartkb) ]
symbol_conflict_test: Pass, Slow
diff --git a/tests/language_2/mixin_method_override_test.dart b/tests/language_2/mixin_method_override_test.dart
new file mode 100644
index 0000000..2ea1905
--- /dev/null
+++ b/tests/language_2/mixin_method_override_test.dart
@@ -0,0 +1,159 @@
+// 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.
+
+// Signature conformance test.
+abstract class CII {
+ int id(int x);
+}
+
+class CSI {
+ String id(int x) => "$x";
+}
+
+class CIS {
+ int id(String x) => 0;
+}
+
+class CTT<T> {
+ T id(T x) => x;
+}
+
+// Wrong return type.
+abstract class C1 = CII with CIS; //# C1: compile-time error
+abstract class C2 extends CII with CIS {} //# C2: compile-time error
+// Wrong argument type.
+abstract class C3 = CII with CSI; //# C3: compile-time error
+abstract class C4 extends CII with CSI {} //# C4: compile-time error
+
+// Similar as the above but using an instantiated class instead.
+abstract class C5 = CII with CTT<int>;
+abstract class C6 extends CII with CTT<int> {}
+abstract class C7 = CII with CTT<String>; //# C7: compile-time error
+abstract class C8 extends CII with CTT<String> {} //# C8: compile-time error
+
+// Named parameters
+abstract class NIIx {
+ int id({int x}) => x;
+}
+
+class NIIxy {
+ int id({int x, int y}) => y;
+}
+
+class NIIy {
+ int id({int y}) => y;
+}
+
+class NII {
+ int id(int x) => x;
+}
+
+// It's OK to introduce more named parameters.
+abstract class N1 = NIIx with NIIxy;
+abstract class N2 extends NIIx with NIIxy {}
+// It's NOT OK to rename named parameters.
+abstract class N3 = NIIx with NIIy; //# N3: compile-time error
+abstract class N4 extends NIIx with NIIy {} //# N4: compile-time error
+// It's NOT OK to drop named parameters.
+abstract class N5 = NIIx with NII; //# N5: compile-time error
+abstract class N6 extends NIIx with NII {} //# N6: compile-time error
+
+class NBABxy<A, B> {
+ B id ({A x, B y}) => y;
+}
+
+class NTTy<T> {
+ T id({T y}) => y;
+}
+
+class NTTx<T> {
+ T id(T x) => x;
+}
+
+// Same as above but with generic classes.
+abstract class N7 = NIIx with NBABxy<int, int>;
+abstract class N8 extends NIIx with NBABxy<int, int> {}
+abstract class N9 = NIIx with NBABxy<String, int>; //# N9: compile-time error
+abstract class N10 extends NIIx with NBABxy<String, int> {} //# N10: compile-time error
+abstract class N11 = NIIx with NTTy<int>; //# N11: compile-time error
+abstract class N12 extends NIIx with NTTy<int> {} //# N12: compile-time error
+abstract class N13 = NIIx with NTTx<int>; //# N13: compile-time error
+abstract class N14 extends NIIx with NTTx<int> {} //# N14: compile-time error
+
+// Optional positional parameters
+abstract class OII {
+ int id([int x]) => x;
+}
+
+class OIII {
+ int id([int x, int y]) => y;
+}
+
+class OIIy {
+ int id([int y]) => y;
+}
+
+class PII {
+ int id(int x) => x;
+}
+
+// It's OK to introduce more optional parameters.
+abstract class O1 = OII with OIII;
+abstract class O2 extends OII with OIII {}
+// It's OK to rename optional parameters.
+abstract class O3 = OII with OIIy;
+abstract class O4 extends OII with OIIy {}
+// It's NOT OK to drop optional parameters.
+abstract class O5 = OII with PII; //# O5: compile-time error
+abstract class O6 extends OII with PII {} //# O6: compile-time error
+
+class OBAB<A, B> {
+ B id ([A x, B y]) => y;
+}
+
+class OTTy<T> {
+ T id([T y]) => y;
+}
+
+class PTT<T> {
+ T id(T x) => x;
+}
+
+// Same as above but with generic classes.
+abstract class O7 = OII with OBAB<int, int>;
+abstract class O8 extends OII with OBAB<int, int> {}
+abstract class O9 = OII with OBAB<String, int>; //# O9: compile-time error
+abstract class O10 extends OII with OBAB<String, int> {} //# O10: compile-time error
+abstract class O11 = OII with OTTy<int>;
+abstract class O12 extends OII with OTTy<int> {}
+abstract class O13 = OII with PTT<int>; //# O13: compile-time error
+abstract class O14 extends OII with PTT<int> {} //# O14: compile-time error
+
+// More tests with generic classes.
+abstract class GTTnum {
+ T id<T extends num>(x);
+}
+
+class MTTnum {
+ T id<T extends num>(x) => x;
+}
+
+class MTTint {
+ T id<T extends int>(x) => x;
+}
+
+class MTT {
+ T id<T>(x) => x;
+}
+
+class MTTnumR {
+ T id<T extends num, R>(x) => x;
+}
+class G1 = GTTnum with MTTnum;
+class G2 = GTTnum with MTTint; //# G2: compile-time error
+class G3 = GTTnum with MTT; //# G3: compile-time error
+class G4 = GTTnum with MTTnumR; //# G4: compile-time error
+class G5 = GTTnum with CII; //# G5: compile-time error
+
+void main() {}
diff --git a/tests/language_2/partial_instantiation_eager_bounds_check_test.dart b/tests/language_2/partial_instantiation_eager_bounds_check_test.dart
new file mode 100644
index 0000000..d20a83e
--- /dev/null
+++ b/tests/language_2/partial_instantiation_eager_bounds_check_test.dart
@@ -0,0 +1,21 @@
+// 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.
+//
+// This test checks that necessary type argument bounds checks are performed
+// eagerly during partial instantiation, rather than being delayed until the
+// partially instantiated closure is invoked.
+
+import "package:expect/expect.dart";
+
+class C<T> {
+ void foo<S extends T>(S x) {}
+}
+
+void main() {
+ C<Object> c = C<int>();
+ void Function(String) fn;
+ Expect.throwsTypeError(() {
+ fn = c.foo;
+ });
+}
diff --git a/tests/language_2/redirecting_factory_upcast_test.dart b/tests/language_2/redirecting_factory_upcast_test.dart
new file mode 100644
index 0000000..ff3ad11
--- /dev/null
+++ b/tests/language_2/redirecting_factory_upcast_test.dart
@@ -0,0 +1,16 @@
+// 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.
+
+class A implements B {
+ var x;
+ A(Object this.x);
+}
+
+class B {
+ factory B(String s) = A;
+}
+
+main() {
+ B(42 as dynamic); //# 01: runtime error
+}
diff --git a/tests/language_2/regress_32660_test.dart b/tests/language_2/regress_32660_test.dart
new file mode 100644
index 0000000..eab8d80
--- /dev/null
+++ b/tests/language_2/regress_32660_test.dart
@@ -0,0 +1,78 @@
+// 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.
+
+// noSuchMethod does not overwrite actual implementations, so if an
+// implemetation of a member exists that doesn't fulfill the interface it's
+// an error.
+// On the other hand, if no implementation exists,
+// noSuchMethod will take its place and everything is okay.
+
+class B {
+ foo(int x, // force formatter to not combine these lines.
+ {int y} //# 02: compile-time error
+ ) =>
+ x;
+}
+
+class C extends B {
+ foo(int x, // force formatter to not combine these lines.
+ {int y} //# 01: compile-time error
+ );
+ bar();
+
+ noSuchMethod(i) {
+ print("No such method!");
+ return 42;
+ }
+}
+
+abstract class D {
+ foo(int x, // force formatter to not combine these lines.
+ {int y} //# 03: ok
+ );
+}
+
+abstract class E {
+ foo(int x, // force formatter to not combine these lines.
+ {int y} //# 04: ok
+ );
+}
+
+class F extends D implements E {
+ noSuchMethod(i) {
+ print("No such method!");
+ return 42;
+ }
+}
+
+class G {
+ foo(int x, // force formatter to not combine these lines.
+ {int y} //# 05: ok
+ ) =>
+ x;
+}
+
+class H {
+ foo(int x, // force formatter to not combine these lines.
+ {int y} //# 06: compile-time error
+ ) =>
+ x;
+}
+
+class I extends G implements H {
+ noSuchMethod(i) {
+ print("No such method: $i!");
+ return 42;
+ }
+}
+
+main() {
+ var c = new C();
+ c.foo(123);
+ c.bar();
+ var f = new F();
+ f.foo(42);
+ var i = new I();
+ i.foo(42);
+}
diff --git a/tests/language_2/regress_34225_test.dart b/tests/language_2/regress_34225_test.dart
new file mode 100644
index 0000000..0117672
--- /dev/null
+++ b/tests/language_2/regress_34225_test.dart
@@ -0,0 +1,12 @@
+// 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.
+
+class C {
+ static set C(v) {} //# 01: compile-time error
+ set C(v) {} //# 02: compile-time error
+}
+
+main() {
+ new C();
+}
diff --git a/tests/language_2/tearoff_bounds_instantiation_test.dart b/tests/language_2/tearoff_bounds_instantiation_test.dart
new file mode 100644
index 0000000..b823c64
--- /dev/null
+++ b/tests/language_2/tearoff_bounds_instantiation_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.
+//
+// This test checks that the type parameter bounds on tearoffs from generic
+// classes are properly instantiated in the signature of the tearoff.
+
+import "package:expect/expect.dart";
+
+class C<T> {
+ void foo<S extends T>(S x) {}
+}
+
+void foo<S extends int>(S x) {}
+
+void main() {
+ dynamic c = C<int>();
+ dynamic fn = c.foo;
+ Expect.equals("${fn.runtimeType}", "${foo.runtimeType}");
+}
diff --git a/tests/language_2/this_as_covariant_call_checks_test.dart b/tests/language_2/this_as_covariant_call_checks_test.dart
new file mode 100644
index 0000000..28c79cc
--- /dev/null
+++ b/tests/language_2/this_as_covariant_call_checks_test.dart
@@ -0,0 +1,56 @@
+// 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.
+//
+// VMOptions=--no-background-compilation --enable-inlining-annotations --optimization-counter-threshold=10
+
+import "package:expect/expect.dart";
+
+const NeverInline = "NeverInline";
+
+class A<T> {
+ T field;
+
+ @NeverInline
+ set property(T v) {}
+
+ @NeverInline
+ void method(T x) {}
+
+ @NeverInline
+ void testMethod(bool violateType) {
+ A<dynamic> x = this;
+ x.method(violateType ? 10 : "10");
+ }
+
+ @NeverInline
+ void testSetter(bool violateType) {
+ A<dynamic> x = this;
+ x.property = violateType ? 10 : "10";
+ }
+
+ @NeverInline
+ void testField(bool violateType) {
+ A<dynamic> x = this;
+ x.field = violateType ? 10 : "10";
+ }
+}
+
+@NeverInline
+void loop(A<String> obj, bool violateType) {
+ for (var i = 0; i < 100; i++) {
+ obj.testMethod(violateType);
+ obj.testSetter(violateType);
+ obj.testField(violateType);
+ }
+}
+
+void main() {
+ A<num>().field = 10;
+ final obj = A<String>();
+ loop(obj, false);
+ loop(obj, false);
+ Expect.throwsTypeError(() => obj.testMethod(true));
+ Expect.throwsTypeError(() => obj.testSetter(true));
+ Expect.throwsTypeError(() => obj.testField(true));
+}
diff --git a/tests/language_2/this_as_dynamic_call_checks_test.dart b/tests/language_2/this_as_dynamic_call_checks_test.dart
new file mode 100644
index 0000000..dd215eb
--- /dev/null
+++ b/tests/language_2/this_as_dynamic_call_checks_test.dart
@@ -0,0 +1,55 @@
+// 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.
+//
+// VMOptions=--no-background-compilation --enable-inlining-annotations --optimization-counter-threshold=10
+
+import "package:expect/expect.dart";
+
+const NeverInline = "NeverInline";
+
+class A<T> {
+ T field;
+
+ @NeverInline
+ set property(T v) {}
+
+ @NeverInline
+ void method(T x) {}
+
+ @NeverInline
+ void testMethod({bool violateType: false}) {
+ dynamic x = this;
+ x.method(violateType ? 10 : "10");
+ }
+
+ @NeverInline
+ void testSetter({bool violateType: false}) {
+ dynamic x = this;
+ x.property = violateType ? 10 : "10";
+ }
+
+ @NeverInline
+ void testField({bool violateType: false}) {
+ dynamic x = this;
+ x.field = violateType ? 10 : "10";
+ }
+}
+
+@NeverInline
+void loop(A<String> obj, {bool violateType: false}) {
+ for (var i = 0; i < 100; i++) {
+ obj.testMethod(violateType: violateType);
+ obj.testSetter(violateType: violateType);
+ obj.testField(violateType: violateType);
+ }
+}
+
+void main() {
+ final obj = A<String>();
+ loop(obj, violateType: false);
+ loop(obj, violateType: false);
+ Expect.throwsTypeError(() => obj.testMethod(violateType: true));
+ Expect.throwsTypeError(() => obj.testSetter(violateType: true));
+ Expect.throwsTypeError(() => obj.testField(violateType: true));
+}
diff --git a/tests/language_2/vm/regress_34288_test.dart b/tests/language_2/vm/regress_34288_test.dart
new file mode 100644
index 0000000..a5f8272
--- /dev/null
+++ b/tests/language_2/vm/regress_34288_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.
+
+// Test canonicalization of integer shift operations.
+// This is a regression test for dartbug.com/34288.
+
+// VMOptions=--no_background_compilation --optimization_counter_threshold=10
+
+import "package:expect/expect.dart";
+
+int _shl_63(int x) => x << 63;
+int _shl_64(int x) => x << 64;
+int _shl_65(int x) => x << 65;
+int _shl_m1(int x) => x << -1;
+
+int _shr_63(int x) => x >> 63;
+int _shr_64(int x) => x >> 64;
+int _shr_65(int x) => x >> 65;
+int _shr_m1(int x) => x >> -1;
+
+// Non-constant values.
+int one = 1;
+int minusOne = -1;
+
+doTests() {
+ Expect.equals(0x8000000000000000, _shl_63(one));
+ Expect.equals(0x8000000000000000, _shl_63(minusOne));
+ Expect.equals(0, _shl_64(one));
+ Expect.equals(0, _shl_64(minusOne));
+ Expect.equals(0, _shl_65(one));
+ Expect.equals(0, _shl_65(minusOne));
+
+ Expect.throws<ArgumentError>(() {
+ _shl_m1(one);
+ });
+
+ Expect.equals(0, _shr_63(one));
+ Expect.equals(-1, _shr_63(minusOne));
+ Expect.equals(0, _shr_64(one));
+ Expect.equals(-1, _shr_64(minusOne));
+ Expect.equals(0, _shr_65(one));
+ Expect.equals(-1, _shr_65(minusOne));
+
+ Expect.throws<ArgumentError>(() {
+ _shr_m1(one);
+ });
+}
+
+void main() {
+ for (int i = 0; i < 20; ++i) {
+ doTests();
+ }
+}
diff --git a/tests/lib/lib.status b/tests/lib/lib.status
index 335211e..2af6884 100644
--- a/tests/lib/lib.status
+++ b/tests/lib/lib.status
@@ -24,6 +24,7 @@
developer/timeline_test: Skip # Not supported
math/double_pow_test: RuntimeError
math/low_test: RuntimeError
+mirrors/*: SkipByDesign # mirrors not supported
mirrors/class_declarations_test/none: RuntimeError # Issue 13440
mirrors/class_mirror_location_test: RuntimeError # Issue 6490
mirrors/closurization_equivalence_test: RuntimeError # Issue 6490
@@ -114,6 +115,7 @@
mirrors/variable_is_const_test/none: RuntimeError # Issue 14671
profiler/metrics_num_test: Skip # Because of a int / double type test.
typed_data/int32x4_bigint_test: Pass
+typed_data/int64_list_load_store_test: CompileTimeError, OK # Error if web int literal cannot be represented exactly, see http://dartbug.com/33351
typed_data/int64_list_load_store_test: RuntimeError # Issue 10275
typed_data/typed_data_hierarchy_int64_test: RuntimeError # Issue 10275
@@ -322,10 +324,10 @@
[ $compiler == dart2js && $checked ]
convert/utf85_test: Pass, Slow # Issue 12029.
-[ $compiler == dart2js && $checked && $fast_startup && $fasta && $minified ]
+[ $compiler == dart2js && $checked && $fast_startup && $minified ]
async/stream_listen_zone_test: RuntimeError
-[ $compiler == dart2js && $checked && $fasta && $host_checked ]
+[ $compiler == dart2js && $checked && $host_checked ]
async/stream_listen_zone_test: RuntimeError
[ $compiler == dart2js && $fast_startup ]
@@ -346,14 +348,8 @@
mirrors/syntax_error_test/01: Pass # expects failure, but it fails for the wrong reason
mirrors/variable_is_const_test/01: Pass # expects failure, but it fails for the wrong reason
-[ $compiler == dart2js && $fasta ]
-mirrors/*: SkipByDesign # mirrors not supported
-typed_data/int64_list_load_store_test: CompileTimeError, OK # Error if web int literal cannot be represented exactly, see http://dartbug.com/33351
-
-[ $compiler == dart2js && $fasta && $host_checked ]
-async/stream_controller_async_test: Crash
-
[ $compiler == dart2js && $host_checked ]
+async/stream_controller_async_test: Crash
mirrors/metadata_allowed_values_test/28: Crash # Issue 25911
mirrors/metadata_allowed_values_test/29: Crash # Issue 25911
mirrors/metadata_allowed_values_test/30: Crash # Issue 25911
diff --git a/tests/lib_2/html/deferred_multi_app.dart b/tests/lib_2/html/deferred_multi_app.dart
deleted file mode 100644
index b1fd7c5..0000000
--- a/tests/lib_2/html/deferred_multi_app.dart
+++ /dev/null
@@ -1,28 +0,0 @@
-// Copyright (c) 2015, 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 "deferred_multi_app_lib.dart" deferred as lib;
-import "dart:async";
-import "dart:html";
-import "package:expect/expect.dart";
-
-main() {
- Element state = querySelector("#state");
- if (state.text == "1") {
- lib.loadLibrary().then((_) {
- var a = lib.one();
- Expect.equals("one", a);
- window.postMessage(a, '*');
- });
- state.text = "2";
- } else {
- new Timer(new Duration(milliseconds: 100), () {
- lib.loadLibrary().then((_) {
- var a = lib.two();
- Expect.equals("two", a);
- window.postMessage(a, '*');
- });
- });
- }
-}
diff --git a/tests/lib_2/html/deferred_multi_app_htmltest.html b/tests/lib_2/html/deferred_multi_app_htmltest.html
deleted file mode 100644
index e352e13..0000000
--- a/tests/lib_2/html/deferred_multi_app_htmltest.html
+++ /dev/null
@@ -1,23 +0,0 @@
-<!--
-Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
-for details. All rights reserved. Use of this source code is governed by a
-BSD-style license that can be found in the LICENSE file.
-
-Test that two instances of a script does not interfere when loading the same
-deferred library.
-
-START_HTML_DART_TEST
-{
- "scripts": ["deferred_multi_app.dart", "dispatch_parent_event.js"],
- "expectedMessages": ["one", "two"]
-}
-END_HTML_DART_TEST
--->
-<html>
- <body>
- <div id="state">1</div>
- <script src="dispatch_parent_event.js"></script>
- <script src="deferred_multi_app.dart" type="application/dart"></script>
- <script src="deferred_multi_app.dart" type="application/dart"></script>
- </body>
-</html>
diff --git a/tests/lib_2/html/deferred_multi_app_lib.dart b/tests/lib_2/html/deferred_multi_app_lib.dart
deleted file mode 100644
index de4e651..0000000
--- a/tests/lib_2/html/deferred_multi_app_lib.dart
+++ /dev/null
@@ -1,11 +0,0 @@
-// Copyright (c) 2015, 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.
-
-one() {
- return "one";
-}
-
-two() {
- return "two";
-}
diff --git a/tests/lib_2/html/js_typed_interop_lazy_test.dart b/tests/lib_2/html/js_typed_interop_lazy_test.dart
index 89f5df8..429e135 100644
--- a/tests/lib_2/html/js_typed_interop_lazy_test.dart
+++ b/tests/lib_2/html/js_typed_interop_lazy_test.dart
@@ -23,6 +23,12 @@
external get a;
}
+@JS('baz.foo.NestedLazyClass')
+class NestedLazyClass {
+ external factory NestedLazyClass(a);
+ external get a;
+}
+
@anonymous
@JS('some.bogus.ignored.js.path')
class AnonClass {
@@ -49,15 +55,27 @@
get a => 42;
}
+class Mock1NestedLazyClass implements NestedLazyClass {
+ noSuchMethod(Invocation i) => i.memberName == #a ? 42 : null;
+}
+
+class Mock2NestedLazyClass implements NestedLazyClass {
+ get a => 42;
+}
+
class Other {
noSuchMethod(Invocation i) {}
}
-// This class would cause compile time issues if JS classes are not properly lazy.
+// Test that the lazy JS classes can be used as a generic type argument.
class FooImpl extends Foo<LazyClass> {
LazyClass get obj => new LazyClass(100);
}
+class NestedFooImpl extends Foo<NestedLazyClass> {
+ NestedLazyClass get obj => new NestedLazyClass(100);
+}
+
class ExampleGenericClass<T> {
String add(T foo) {
return foo.toString();
@@ -159,16 +177,109 @@
test('mocks', () {
var mock1 = new Mock1LazyClass();
expect(mock1 is LazyClass, isTrue);
- expect(mock1 as LazyClass, equals(mock1));
+ expect((mock1 as dynamic) as LazyClass, equals(mock1));
expect(mock1.a, equals(42));
var mock2 = new Mock2LazyClass();
expect(mock2 is LazyClass, isTrue);
- expect(mock2 as LazyClass, equals(mock2));
+ expect((mock2 as dynamic) as LazyClass, equals(mock2));
expect(mock2.a, equals(42));
Object other = new Other();
expect(other is LazyClass, isFalse);
});
});
+
+ group('nested lazy class', () {
+ test('type literal', () {
+ // Fine because we can determine the class literals are equal without
+ // having to determine what (non-existant) JS type they correspond to.
+ var x = NestedLazyClass;
+ var y = NestedLazyClass;
+ expect(x == y, isTrue);
+ });
+
+ test('reference in type parameter', () {
+ var o = new NestedFooImpl();
+ expect(o is Foo<NestedLazyClass>, isTrue);
+ });
+
+ test('create instance', () {
+ var anon = new AnonClass(a: 42);
+ // Until NestedLazyClass is defined, fall back to Anon behavior.
+ expect(anon is NestedLazyClass, isTrue); //# 01: ok
+ expect(new Object() is! NestedLazyClass, isTrue);
+
+ document.body.append(new ScriptElement()
+ ..type = 'text/javascript'
+ ..innerHtml = r"""
+window.baz = window.baz || {};
+window.baz.foo = {};
+
+baz.foo.NestedLazyClass = function NestedLazyClass(a) {
+ this.a = a;
+};
+""");
+ var l = new NestedLazyClass(42);
+ expect(l.a, equals(42));
+ expect(l is NestedLazyClass, isTrue);
+ expect(l is AnonClass, isTrue);
+ expect((l as AnonClass) == l, isTrue);
+ expect((l as AnonClass2) == l, isTrue);
+ expect(anon is! NestedLazyClass, isTrue); //# 01: ok
+ expect(anon is AnonClass, isTrue);
+ expect(anon is AnonClass2, isTrue);
+
+ // Sanity check that is and as are not broken.
+ expect(new Object() is! NestedLazyClass, isTrue);
+ expect(new Object() is! AnonClass, isTrue);
+ expect(new Object() is! AnonClass2, isTrue);
+
+ expect(<AnonClass>[] is List<AnonClass>, isTrue);
+ // TODO(jacobr): why doesn't this test pass?
+ // expect(<AnonClass>[] is List<AnonClass2>, isTrue);
+ expect(<int>[] is! List<AnonClass>, isTrue);
+ expect(<AnonClass>[] is! List<NestedLazyClass>, isTrue); //# 01: ok
+ expect(<int>[] is! List<NestedLazyClass>, isTrue);
+ expect(<NestedLazyClass>[] is List<NestedLazyClass>, isTrue);
+
+ var listLazyClass = <NestedLazyClass>[];
+ Object instanceLazyObject = l;
+ expect(() => listLazyClass.add(42 as dynamic), throws); //# 01: ok
+ // Regression test for bug where this call failed.
+ listLazyClass.add(instanceLazyObject);
+ listLazyClass.add(null);
+
+ dynamic listLazyClassDynamic = listLazyClass;
+ expect(() => listLazyClassDynamic.add(42), throws); //# 01: ok
+ // Regression test for bug where this call failed.
+ listLazyClassDynamic.add(instanceLazyObject);
+ listLazyClassDynamic.add(null);
+
+ var genericClass = new ExampleGenericClass<NestedLazyClass>();
+ genericClass.add(instanceLazyObject);
+ expect(() => genericClass.add(42 as dynamic), throws); //# 01: ok
+ genericClass.add(null);
+
+ dynamic genericClassDynamic = genericClass;
+ genericClassDynamic.add(instanceLazyObject);
+ expect(() => genericClassDynamic.add(42), throws); //# 01: ok
+ genericClassDynamic.add(null);
+ });
+
+ test('mocks', () {
+ var mock1 = new Mock1NestedLazyClass();
+ expect(mock1 is NestedLazyClass, isTrue);
+ expect((mock1 as dynamic) as NestedLazyClass, equals(mock1));
+ expect(mock1.a, equals(42));
+
+ var mock2 = new Mock2NestedLazyClass();
+ expect(mock2 is NestedLazyClass, isTrue);
+ expect((mock2 as dynamic) as NestedLazyClass, equals(mock2));
+ expect(mock2.a, equals(42));
+
+ Object other = new Other();
+ expect(other is NestedLazyClass, isFalse);
+ });
+ });
}
diff --git a/tests/lib_2/html/no_linked_scripts_htmltest.html b/tests/lib_2/html/no_linked_scripts_htmltest.html
deleted file mode 100644
index 3a7add2..0000000
--- a/tests/lib_2/html/no_linked_scripts_htmltest.html
+++ /dev/null
@@ -1,33 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
-for details. All rights reserved. Use of this source code is governed by a
-BSD-style license that can be found in the LICENSE file.
--->
-<!--
-START_HTML_DART_TEST
-{
- "scripts": [ "dispatch_parent_event.js" ],
- "expectedMessages": ["hest", "fisk"]
-}
-END_HTML_DART_TEST
--->
-<html>
-<head>
- <script src="dispatch_parent_event.js"></script>
- <title>No Linked Scripts HTML test</title>
-</head><body>
- <h1>No Linked Scripts HTML test</h1>
- <script>
- window.postMessage('fisk', '*');
- window.postMessage('ged', '*');
- window.postMessage('fisk', '*');
-
- function delayed() {
- parent.postMessage('ko', '*');
- window.postMessage('hest', '*');
- }
- setTimeout(delayed, 500);
- </script>
-</body>
-</html>
diff --git a/tests/lib_2/html/scripts_htmltest.html b/tests/lib_2/html/scripts_htmltest.html
deleted file mode 100644
index 63aab06..0000000
--- a/tests/lib_2/html/scripts_htmltest.html
+++ /dev/null
@@ -1,24 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
-for details. All rights reserved. Use of this source code is governed by a
-BSD-style license that can be found in the LICENSE file.
--->
-<!--
-START_HTML_DART_TEST
-{
- "scripts": ["scripts_test_dart.dart", "scripts_test_js.js", "dispatch_parent_event.js"],
- "expectedMessages": ["crab", "fish", "squid", "sea urchin"]
-}
-END_HTML_DART_TEST
--->
-<html>
-<head>
- <script src="dispatch_parent_event.js"></script>
- <title>Scripts HTML test</title>
-</head><body>
- <h1>Scripts HTML test</h1>
- <script src="scripts_test_dart.dart" type="application/dart"></script>
- <script src="scripts_test_js.js"></script>
-</body>
-</html>
diff --git a/tests/lib_2/html/scripts_test_dart.dart b/tests/lib_2/html/scripts_test_dart.dart
deleted file mode 100644
index cd7bc5a..0000000
--- a/tests/lib_2/html/scripts_test_dart.dart
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library ScriptsTestDart;
-
-import 'dart:html';
-import 'dart:async';
-
-main() {
- window.postMessage('squid', '*');
- window.postMessage('tiger', '*'); // Unexpected message OK.
- new Timer(new Duration(seconds: 1), () {
- window.postMessage('squid', '*'); // Duplicate message OK.
- window.postMessage('sea urchin', '*');
- });
-}
diff --git a/tests/lib_2/html/scripts_test_js.js b/tests/lib_2/html/scripts_test_js.js
deleted file mode 100644
index 552d418..0000000
--- a/tests/lib_2/html/scripts_test_js.js
+++ /dev/null
@@ -1,12 +0,0 @@
-// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-window.postMessage('fish', '*');
-
-function delayed() {
- window.postMessage('cow', '*'); // Unexpected message OK.
- parent.postMessage('weasel', '*'); // Message to parent OK.
- window.postMessage('crab', '*');
-}
-setTimeout(delayed, 500);
diff --git a/tests/lib_2/html/two_scripts_htmltest.html b/tests/lib_2/html/two_scripts_htmltest.html
deleted file mode 100644
index 69c39e4..0000000
--- a/tests/lib_2/html/two_scripts_htmltest.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
-for details. All rights reserved. Use of this source code is governed by a
-BSD-style license that can be found in the LICENSE file.
--->
-<!--
-START_HTML_DART_TEST
-{
- "scripts": ["two_scripts_test_first.dart", "two_scripts_test_second.dart", "dispatch_parent_event.js"],
- "expectedMessages":
- ["first_local", "first_global", "second_local", "second_global"]
-}
-END_HTML_DART_TEST
--->
-<html>
-<head>
- <script src="dispatch_parent_event.js"></script>
- <title>Two Scripts HTML test</title>
-</head><body>
- <h1>Two Scripts HTML test</h1>
- <script src="two_scripts_test_first.dart" type="application/dart"></script>
- <script src="two_scripts_test_second.dart" type="application/dart"></script>
-</body>
-</html>
diff --git a/tests/lib_2/html/two_scripts_test_first.dart b/tests/lib_2/html/two_scripts_test_first.dart
deleted file mode 100644
index 6a1f1d1..0000000
--- a/tests/lib_2/html/two_scripts_test_first.dart
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library TwoScriptsTestFirst;
-
-import 'dart:html';
-
-aGlobalFunction() {
- window.postMessage('first_global', '*');
-}
-
-main() {
- window.postMessage('first_local', '*');
- aGlobalFunction();
-}
diff --git a/tests/lib_2/html/two_scripts_test_second.dart b/tests/lib_2/html/two_scripts_test_second.dart
deleted file mode 100644
index b959396..0000000
--- a/tests/lib_2/html/two_scripts_test_second.dart
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library TwoScriptsTestSecond;
-
-import 'dart:html';
-
-aGlobalFunction() {
- window.postMessage('second_global', '*');
-}
-
-main() {
- window.postMessage('second_local', '*');
- aGlobalFunction();
-}
diff --git a/tests/lib_2/lib_2.status b/tests/lib_2/lib_2.status
index f7529d1..ac45d22 100644
--- a/tests/lib_2/lib_2.status
+++ b/tests/lib_2/lib_2.status
@@ -29,7 +29,6 @@
html/crypto_test/supported: Fail
html/css_test/supportsPointConversions: Fail
html/custom/document_register_type_extensions_test/single-parameter: Fail # Issue 13193.
-html/deferred_multi_app_htmltest: Skip # Times out on IE. Issue 21537
html/element_animate_test: Fail # Element.animate not supported on these browsers.
html/element_test/click: Fail # IE does not support firing this event.
html/event_test: RuntimeError # Issue 23437. Only three failures, but hard to break them out.
@@ -47,12 +46,10 @@
html/localstorage_test: Pass, RuntimeError # Issue 22166
html/media_stream_test: Pass, Fail
html/mediasource_test: Pass, Fail # Windows 8: Supported: yes, functional: no
-html/no_linked_scripts_htmltest: Skip # Times out on IE. Issue 21537
html/notification_test: Fail # Notification not supported on IE
html/postmessage_structured_test: Fail # Does not support the MessageEvent constructor.
html/request_animation_frame_test: Skip # Times out. Issue 22167
html/rtc_test: Fail
-html/scripts_htmltest: Skip # Times out on IE. Issue 21537
html/serialized_script_value_test: Fail
html/shadow_dom_test: Fail
html/speechrecognition_test: Fail
@@ -62,7 +59,6 @@
html/touchevent_test: Fail # IE does not support TouchEvents
html/transferables_test: Pass, Fail # Issues 20659.
html/transition_event_test: Skip # Times out. Issue 22167
-html/two_scripts_htmltest: Skip # Times out on IE. Issue 21537
html/webgl_1_test: Fail
html/websocket_test: Fail # Issue 7875. Closed with "working as intended".
html/websql_test: Fail
diff --git a/tests/lib_2/lib_2_analyzer.status b/tests/lib_2/lib_2_analyzer.status
index 72c133b..a521c69 100644
--- a/tests/lib_2/lib_2_analyzer.status
+++ b/tests/lib_2/lib_2_analyzer.status
@@ -7,19 +7,11 @@
html/element_types_keygen_test: CompileTimeError # Chrome 57 keygen removed
html/js_function_getter_trust_types_test: Skip # dart2js specific flags.
html/js_typed_interop_default_arg_test/default_value: MissingCompileTimeError # Issue #25759
-mirrors/deferred_type_test: StaticWarning, OK # Deliberately refers to a deferred type in a declaration.
-mirrors/generic_f_bounded_mixin_application_test: StaticWarning # Test Issue
-mirrors/mirrors_nsm_mismatch_test: StaticWarning, OK
-mirrors/mirrors_nsm_test: StaticWarning, OK
-mirrors/mirrors_nsm_test/dart2js: StaticWarning, OK
-mirrors/redirecting_factory_test/01: StaticWarning # test issue X, The return type 'Class<T2, T1>' of the redirected constructor is not assignable to 'Class<T1, T2>'
-mirrors/redirecting_factory_test/none: StaticWarning # test issue X, The return type 'Class<T2, T1>' of the redirected constructor is not assignable to 'Class<T1, T2>
-mirrors/repeated_private_anon_mixin_app_test: StaticWarning, OK # Intentional library name conflict.
-
-[ $compiler == dart2analyzer && $strong ]
mirrors/deferred_type_test: CompileTimeError, OK # Deliberately refers to a deferred type in a declaration.
mirrors/generic_f_bounded_mixin_application_test: CompileTimeError
mirrors/mirrors_nsm_mismatch_test: CompileTimeError, OK
mirrors/mirrors_nsm_test: CompileTimeError, OK
mirrors/mirrors_nsm_test/dart2js: CompileTimeError, OK
+mirrors/redirecting_factory_test/01: StaticWarning # test issue X, The return type 'Class<T2, T1>' of the redirected constructor is not assignable to 'Class<T1, T2>'
+mirrors/redirecting_factory_test/none: StaticWarning # test issue X, The return type 'Class<T2, T1>' of the redirected constructor is not assignable to 'Class<T1, T2>
mirrors/repeated_private_anon_mixin_app_test: CompileTimeError, OK # Intentional library name conflict.
diff --git a/tests/lib_2/lib_2_dart2js.status b/tests/lib_2/lib_2_dart2js.status
index 13713db..e2eb9a6 100644
--- a/tests/lib_2/lib_2_dart2js.status
+++ b/tests/lib_2/lib_2_dart2js.status
@@ -13,22 +13,30 @@
html/custom/document_register_type_extensions_test/construction: Pass, Timeout # Roll 50 failure
html/custom/document_register_type_extensions_test/registration: Pass, Timeout # Roll 50 failure
html/custom/entered_left_view_test/shadow_dom: Pass, Timeout # Roll 50 failure
+html/custom/mirrors_2_test: RuntimeError
+html/custom/mirrors_test: RuntimeError
html/custom_elements_test: Pass, Timeout # Issue 26789
html/debugger_test: CompileTimeError # Issue 30900
html/indexeddb_1_test/functional: Pass, Timeout # Roll 50 failure
+html/indexeddb_1_test/functional: RuntimeError
html/indexeddb_2_test: Pass, Timeout # Roll 50 failure
html/indexeddb_3_test: Pass, Timeout # Roll 50 failure
+html/indexeddb_3_test: RuntimeError
html/indexeddb_4_test: Pass, Timeout # Roll 50 failure
html/indexeddb_5_test: Pass, Timeout # Roll 50 failure
+html/indexeddb_5_test: RuntimeError
html/isolates_test: SkipByDesign
html/js_typed_interop_default_arg_test/default_value: MissingCompileTimeError # Issue #25759
+html/js_typed_interop_default_arg_test/explicit_argument: RuntimeError
html/js_typed_interop_side_cast_exp_test: Pass, RuntimeError # Roll 50 failure
+html/js_typed_interop_test: RuntimeError
html/mirrors_js_typed_interop_test: Pass, Slow
html/svgelement_test/PathElement: Pass, RuntimeError # Roll 50 failure
html/worker_api_test: SkipByDesign
html/wrapping_collections_test: SkipByDesign # Testing an issue that is only relevant to Dartium
html/xhr_test: Pass, Slow
isolate/*: SkipByDesign # No support for dart:isolate in dart4web (http://dartbug.com/30538)
+math/double_pow_test: CompileTimeError, OK # Error if web int literal cannot be represented exactly, see http://dartbug.com/33351
math/double_pow_test: RuntimeError
math/low_test: RuntimeError
math/random_big_test: RuntimeError # Using bigint seeds for random.
@@ -48,7 +56,10 @@
mirrors/reflected_type_typedefs_test: RuntimeError # Issue 12607
mirrors/reflected_type_typevars_test: RuntimeError # Issue 12607
profiler/metrics_num_test: Skip # Because of an int / double type test.
+typed_data/int32x4_arithmetic_test/int64: CompileTimeError, OK # Error if web int literal cannot be represented exactly, see http://dartbug.com/33351
typed_data/int32x4_arithmetic_test/int64: RuntimeError # Issue 1533
+typed_data/int32x4_arithmetic_test/none: CompileTimeError, OK # Error if web int literal cannot be represented exactly, see http://dartbug.com/33351
+typed_data/int64_list_load_store_test: CompileTimeError, OK # Error if web int literal cannot be represented exactly, see http://dartbug.com/33351
typed_data/int64_list_load_store_test: RuntimeError # Issue 10275
typed_data/typed_data_hierarchy_int64_test: RuntimeError # Issue 10275
typed_data/unmodifiable_typed_data_test: RuntimeError # Issue 10275
@@ -83,7 +94,6 @@
html/js_transferrables_test: RuntimeError
html/js_typed_interop_lazy_test/none: RuntimeError
html/js_typed_interop_rename_static_test: RuntimeError
-html/no_linked_scripts_htmltest: Timeout, Pass # Issue 32262
html/worker_test/functional: RuntimeError # Issue 32261
[ $compiler == dart2js && $runtime == chrome && $strong ]
@@ -106,7 +116,7 @@
typed_data/setRange_2_test: RuntimeError # TODO(dart2js-team): Please triage this failure.
typed_data/setRange_3_test: RuntimeError # TODO(dart2js-team): Please triage this failure.
-[ $compiler == dart2js && $runtime == d8 && $fasta ]
+[ $compiler == dart2js && $runtime == d8 ]
async/dart2js_uncaught_error_test: RuntimeError
html/async_spawnuri_test: RuntimeError
html/async_test: RuntimeError
@@ -338,7 +348,7 @@
js/null_test: RuntimeError
js/prototype_access_test: RuntimeError
-[ $compiler == dart2js && $runtime == d8 && $fasta && $minified ]
+[ $compiler == dart2js && $runtime == d8 && $minified ]
collection/list_test: RuntimeError
[ $compiler == dart2js && $runtime != d8 ]
@@ -514,13 +524,11 @@
html/typed_arrays_range_checks_test: RuntimeError
[ $compiler == dart2js && $checked ]
+async/stream_listen_zone_test: RuntimeError
convert/utf85_test: Pass, Slow # Issue 12029.
html/js_function_getter_trust_types_test: Skip # --trust-type-annotations incompatible with --checked
-[ $compiler == dart2js && $checked && $fasta ]
-async/stream_listen_zone_test: RuntimeError
-
-[ $compiler == dart2js && $csp && $fasta && $minified ]
+[ $compiler == dart2js && $csp && $minified ]
collection/list_test: RuntimeError
[ $compiler == dart2js && $csp && ($runtime == chrome || $runtime == chromeOnAndroid || $runtime == ff || $runtime == safari) ]
@@ -542,7 +550,7 @@
html/mirrors_js_typed_interop_test: SkipByDesign
html/postmessage_structured_test: SkipByDesign
-[ $compiler == dart2js && !$csp && $fasta && $minified ]
+[ $compiler == dart2js && !$csp && $minified ]
html/async_spawnuri_test: RuntimeError
html/async_test: RuntimeError
html/audiobuffersourcenode_test: Crash # NoSuchMethodError: Class 'JMethod' has no instance getter 'implementation'.
@@ -694,29 +702,11 @@
html/custom/mirrors_2_test: Fail # mirrors not supported
html/custom/mirrors_test: Fail # mirrors not supported
html/mirrors_js_typed_interop_test: Fail # mirrors not supported
-mirrors/regress_16321_test/01: Pass # expects failure, but if fails for the wrong reason
-
-[ $compiler == dart2js && $fast_startup && $fasta ]
html/notification_permission_test: RuntimeError
html/xhr_test: RuntimeError
+mirrors/regress_16321_test/01: Pass # expects failure, but if fails for the wrong reason
-[ $compiler == dart2js && $fast_startup && !$fasta ]
-html/custom/constructor_calls_created_synchronously_test: Fail
-
-[ $compiler == dart2js && $fasta ]
-html/custom/mirrors_2_test: RuntimeError
-html/custom/mirrors_test: RuntimeError
-html/indexeddb_1_test/functional: RuntimeError
-html/indexeddb_3_test: RuntimeError
-html/indexeddb_5_test: RuntimeError
-html/js_typed_interop_default_arg_test/explicit_argument: RuntimeError
-html/js_typed_interop_test: RuntimeError
-math/double_pow_test: CompileTimeError, OK # Error if web int literal cannot be represented exactly, see http://dartbug.com/33351
-typed_data/int32x4_arithmetic_test/int64: CompileTimeError, OK # Error if web int literal cannot be represented exactly, see http://dartbug.com/33351
-typed_data/int32x4_arithmetic_test/none: CompileTimeError, OK # Error if web int literal cannot be represented exactly, see http://dartbug.com/33351
-typed_data/int64_list_load_store_test: CompileTimeError, OK # Error if web int literal cannot be represented exactly, see http://dartbug.com/33351
-
-[ $compiler == dart2js && $fasta && $host_checked ]
+[ $compiler == dart2js && $host_checked ]
html/custom/mirrors_2_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true.
html/custom/mirrors_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true.
html/indexeddb_3_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true.
@@ -729,7 +719,14 @@
html/js_typed_interop_side_cast_exp_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true.
html/js_typed_interop_test: CompileTimeError
-[ $compiler == dart2js && $fasta && $minified ]
+[ $compiler == dart2js && $ie ]
+html/fontface_loaded_test: RuntimeError # FontFace polyfill?
+html/fontface_test: Fail # Fontface not supported on ie
+
+[ $compiler == dart2js && $ie && $strong ]
+html/interactive_media_test: RuntimeError
+
+[ $compiler == dart2js && $minified ]
html/audiobuffersourcenode_test/functional: RuntimeError
html/audiobuffersourcenode_test/supported: RuntimeError
html/audiocontext_test/supported: RuntimeError
@@ -740,6 +737,7 @@
html/canvas_pixel_array_type_alias_test/typed_data: RuntimeError
html/canvas_pixel_array_type_alias_test/types1: RuntimeError
html/canvas_pixel_array_type_alias_test/types2: RuntimeError
+html/canvas_pixel_array_type_alias_test/types2_runtimeTypeName: Fail, OK # Issue 12605
html/custom/mirrors_2_test: Crash # NoSuchMethodError: Class 'JMethod' has no instance getter 'implementation'.
html/custom/mirrors_test: Crash # NoSuchMethodError: Class 'JMethod' has no instance getter 'implementation'.
html/custom_elements_test: Crash # NoSuchMethodError: Class 'JMethod' has no instance getter 'implementation'.
@@ -805,19 +803,6 @@
html/typed_arrays_1_test/supported: RuntimeError
html/webgl_1_test: Crash # NoSuchMethodError: Class 'JMethod' has no instance getter 'implementation'.
-[ $compiler == dart2js && !$fasta ]
-async/future_or_bad_type_test: MissingCompileTimeError
-
-[ $compiler == dart2js && $ie ]
-html/fontface_loaded_test: RuntimeError # FontFace polyfill?
-html/fontface_test: Fail # Fontface not supported on ie
-
-[ $compiler == dart2js && $ie && $strong ]
-html/interactive_media_test: RuntimeError
-
-[ $compiler == dart2js && $minified ]
-html/canvas_pixel_array_type_alias_test/types2_runtimeTypeName: Fail, OK # Issue 12605
-
[ $compiler == dart2js && $strong ]
async/future_or_type_test: RuntimeError
async/slow_consumer2_test: RuntimeError
diff --git a/tests/lib_2/lib_2_dartdevc.status b/tests/lib_2/lib_2_dartdevc.status
index 8ad1f08..610f4b9 100644
--- a/tests/lib_2/lib_2_dartdevc.status
+++ b/tests/lib_2/lib_2_dartdevc.status
@@ -72,7 +72,6 @@
html/custom_element_name_clash_test: Skip # Issue 29922
html/custom_elements_23127_test: Skip # Issue 29922
html/custom_elements_test: Skip # Issue 29922
-html/deferred_multi_app_htmltest: Skip # Issue 29919
html/element_classes_test: RuntimeError # Issue 29922
html/isolates_test: RuntimeError # Issue 29922
html/js_typed_interop_default_arg_test/default_value: MissingCompileTimeError # Issue 29922
@@ -81,11 +80,8 @@
html/js_typed_interop_type_test: RuntimeError # Issue 30947
html/js_util_test: RuntimeError # Issue 29922
html/media_stream_test: RuntimeError # Issue 29922
-html/no_linked_scripts_htmltest: Skip # Issue 29919
html/notification_permission_test: Skip # Issue 32002
-html/scripts_htmltest: Skip # Issue 29919
html/transition_event_test: Pass, RuntimeError, Timeout # Issue 29922, this test seems flaky
-html/two_scripts_htmltest: Skip # Issue 29919
html/webgl_extensions_test: RuntimeError # Issue 31017
html/worker_api_test: RuntimeError # Issue 29922
isolate/*: SkipByDesign # No support for dart:isolate in dart4web (http://dartbug.com/30538)
diff --git a/tests/lib_2/lib_2_kernel.status b/tests/lib_2/lib_2_kernel.status
index 44bc1dd..2c1250c 100644
--- a/tests/lib_2/lib_2_kernel.status
+++ b/tests/lib_2/lib_2_kernel.status
@@ -35,11 +35,6 @@
mirrors/generic_interface_test/01: MissingCompileTimeError
mirrors/metadata_allowed_values_test/13: MissingCompileTimeError
mirrors/metadata_allowed_values_test/14: MissingCompileTimeError
-mirrors/reflected_type_classes_test/02: MissingCompileTimeError
-mirrors/reflected_type_classes_test/03: MissingCompileTimeError
-mirrors/reflected_type_test/02: MissingCompileTimeError
-mirrors/reflected_type_test/03: MissingCompileTimeError
-mirrors/variable_is_const_test/01: MissingCompileTimeError
[ $arch == simarm64 && $strong && ($compiler == dartk || $compiler == dartkb) ]
isolate/mint_maker_test: Timeout # Please triage.
@@ -112,9 +107,6 @@
[ $mode == debug && $hot_reload_rollback && ($compiler == dartk || $compiler == dartkb) ]
isolate/message3_test/constList_identical: Skip # Timeout
-[ $mode == debug && $strong && ($compiler == dartk || $compiler == dartkb) ]
-mirrors/variable_is_const_test/01: Crash # Issue 32326
-
[ $runtime == vm && $checked && $strong && ($compiler == dartk || $compiler == dartkb) ]
mirrors/redirecting_factory_different_type_test/01: MissingCompileTimeError # Issue 28424
mirrors/redirecting_factory_different_type_test/none: RuntimeError # Issue 28424
@@ -225,9 +217,6 @@
[ $system == windows && ($compiler == dartk || $compiler == dartkb) ]
isolate/ping_pause_test: Skip # Issues 32137 and 32138
-[ $fasta && $strong ]
-mirrors/top_level_accessors_test/01: MissingCompileTimeError
-
[ $fasta && !$strong ]
isolate/isolate_import_test/01: MissingCompileTimeError
isolate/isolate_stress_test: CompileTimeError
@@ -301,7 +290,6 @@
mirrors/redirecting_factory_different_type_test/02: MissingCompileTimeError
mirrors/redirecting_factory_different_type_test/none: RuntimeError
mirrors/redirecting_factory_reflection_test: RuntimeError
-mirrors/top_level_accessors_test/01: MissingCompileTimeError
# ===== Skip dartk and darkp in !$strong mode ====
[ !$strong && ($compiler == dartk || $compiler == dartkb) ]
diff --git a/tests/standalone_2/standalone_2_analyzer.status b/tests/standalone_2/standalone_2_analyzer.status
index 8bdeaea..6de6cbf 100644
--- a/tests/standalone_2/standalone_2_analyzer.status
+++ b/tests/standalone_2/standalone_2_analyzer.status
@@ -4,36 +4,25 @@
[ $compiler == dart2analyzer ]
deferred_transitive_import_error_test: Skip # Contains intentional errors.
+io/directory_invalid_arguments_test: CompileTimeError
io/http_cookie_date_test: Pass, StaticWarning, CompileTimeError # Issue 28843
io/http_headers_test: Pass, StaticWarning, CompileTimeError # Issue 28843
io/http_parser_test: Pass, StaticWarning, CompileTimeError # Issue 28843
io/process_exit_negative_test: Skip
+io/process_invalid_arguments_test: CompileTimeError
+io/raw_secure_server_socket_argument_test: CompileTimeError
+io/secure_socket_argument_test: CompileTimeError
+io/stdout_bad_argument_test: CompileTimeError
io/web_socket_protocol_processor_test: Pass, StaticWarning, CompileTimeError # Issue 28843
-package/package1_test: StaticWarning
-package/package1_test: CompileTimeError
-package/package_test: StaticWarning
-package/package_test: CompileTimeError
-package/scenarios/both_dir_and_file/prefers_packages_file_test: StaticWarning
+package/package_isolate_test: CompileTimeError
package/scenarios/both_dir_and_file/prefers_packages_file_test: CompileTimeError
package/scenarios/invalid/invalid_package_name_test: Crash, OK # Analyzer exits on invalid package config
package/scenarios/invalid/invalid_utf8_test: Crash, OK # Analyzer exits on invalid package config
package/scenarios/invalid/non_existent_packages_file_test: Crash, OK # Analyzer exits on invalid package config
package/scenarios/invalid/same_package_twice_test: Crash, OK # Analyzer exits on invalid package config
-package/scenarios/packages_dir_only/packages_dir_only_test: StaticWarning
-package/scenarios/packages_dir_only/packages_dir_only_test: CompileTimeError
-package/scenarios/packages_file_in_parent/sub/packages_file_in_parent_test: StaticWarning
package/scenarios/packages_file_in_parent/sub/packages_file_in_parent_test: CompileTimeError
-package/scenarios/packages_file_only/packages_file_only_test: StaticWarning
package/scenarios/packages_file_only/packages_file_only_test: CompileTimeError
[ $compiler == dart2analyzer && $system == windows ]
package/scenarios/empty_packages_file/empty_packages_file_option_test: Crash, Pass # Issue 28645
package/scenarios/packages_file_strange_formatting/empty_package_dir_test: Crash # Issue 28645
-
-[ $compiler == dart2analyzer && $strong ]
-io/directory_invalid_arguments_test: CompileTimeError
-io/process_invalid_arguments_test: CompileTimeError
-io/raw_secure_server_socket_argument_test: CompileTimeError
-io/secure_socket_argument_test: CompileTimeError
-io/stdout_bad_argument_test: CompileTimeError
-package/package_isolate_test: CompileTimeError
diff --git a/tests/standalone_2/standalone_2_kernel.status b/tests/standalone_2/standalone_2_kernel.status
index 4af09aa..347a812 100644
--- a/tests/standalone_2/standalone_2_kernel.status
+++ b/tests/standalone_2/standalone_2_kernel.status
@@ -34,6 +34,9 @@
oom_error_stacktrace_test: RuntimeError
out_of_memory_test: RuntimeError
+[ $compiler == dartkb ]
+no_lazy_dispatchers_test: SkipByDesign # KBC interpreter doesn't support --no_lazy_dispatchers
+
[ $compiler == fasta ]
io/arguments_test: CompileTimeError
@@ -43,7 +46,7 @@
package/package_test: CompileTimeError
package/scenarios/invalid/same_package_twice_test: CompileTimeError
-[ $arch != simarm && $arch != simarm64 && $arch != simdbc64 && $fasta ]
+[ $arch != simarm && $arch != simarm64 && $arch != simdbc64 && $compiler != dartkb && $fasta ]
package/scenarios/invalid/invalid_utf8_test: CompileTimeError # Issue 32085
package/scenarios/invalid/non_existent_packages_file_test: CompileTimeError # Issue 32085
diff --git a/third_party/.gitignore b/third_party/.gitignore
index 5cb79f5..315ad35 100644
--- a/third_party/.gitignore
+++ b/third_party/.gitignore
@@ -6,7 +6,6 @@
!pkg
!pkg_tested
!/tcmalloc
-!drt_resources
!d8
!7zip.tar.gz.sha1
!firefox_jsshell
diff --git a/third_party/drt_resources/.gitignore b/third_party/drt_resources/.gitignore
deleted file mode 100644
index 7912236..0000000
--- a/third_party/drt_resources/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-AHEM____.TTF
diff --git a/third_party/drt_resources/AHEM____.TTF.sha1 b/third_party/drt_resources/AHEM____.TTF.sha1
deleted file mode 100644
index bba0dbc..0000000
--- a/third_party/drt_resources/AHEM____.TTF.sha1
+++ /dev/null
@@ -1 +0,0 @@
-8cdc9e68594fbb6db8c7b4bff643ab2432b51db6
\ No newline at end of file
diff --git a/third_party/drt_resources/README.md b/third_party/drt_resources/README.md
deleted file mode 100644
index c981e5b..0000000
--- a/third_party/drt_resources/README.md
+++ /dev/null
@@ -1,6 +0,0 @@
-# Content-shell resources
-
-The layout tests of content_shell (formerly called DumpRenderTree, drt)
-require a font called AHEM____.TTF on Windows. This resource is downloaded
-from cloud storage, using the hash in AHEM____.TTF.sha1, by a hook
-in the DEPS file, that is run by gclient sync or gclient runhooks.
diff --git a/tools/VERSION b/tools/VERSION
index dedc53a..69aa10a 100644
--- a/tools/VERSION
+++ b/tools/VERSION
@@ -27,5 +27,5 @@
MAJOR 2
MINOR 1
PATCH 0
-PRERELEASE 3
-PRERELEASE_PATCH 1
+PRERELEASE 4
+PRERELEASE_PATCH 0
diff --git a/tools/bots/test_matrix.json b/tools/bots/test_matrix.json
index a82fba1..08fc477 100644
--- a/tools/bots/test_matrix.json
+++ b/tools/bots/test_matrix.json
@@ -23,7 +23,7 @@
"samples/",
"sdk/",
"tests/angular/",
- "tests/co19/",
+ "tests/co19_2/",
"tests/compiler/",
"tests/corelib/",
"tests/corelib_2/",
@@ -61,7 +61,7 @@
"samples/",
"sdk/",
"tests/angular/",
- "tests/co19/",
+ "tests/co19_2/",
"tests/compiler/",
"tests/corelib/",
"tests/corelib_2/",
@@ -364,11 +364,20 @@
"use-blobs": true
}},
"dartkp-linux-(product|release)-x64": { },
+ "dartkp-obsufcate-linux-release-x64": {
+ "options": {
+ "builder-tag": "obfuscated",
+ "vm-options": ["--obfuscate"]
+ }},
"dartkp-linux-debug-x64": {
"options": {
"vm-options": ["--no-enable-malloc-hooks"]
}},
"dartk-(linux|mac)-(debug|release)-x64": { },
+ "dartk-checked-linux-release-x64": {
+ "options": {
+ "checked": true
+ }},
"dartk-win-release-x64": { },
"dartk-linux-(debug|release)-simdbc64": { },
"dartk-linux-release-(simarm|simarm64)": { },
@@ -669,6 +678,32 @@
},
{
"builders": [
+ "vm-kernel-precomp-obfuscate-linux-release-x64"
+ ],
+ "meta": {
+ "description": "This configuration is used by the obfuscated vm kernel precomp builders."
+ },
+ "steps": [
+ {
+ "name": "build dart",
+ "script": "tools/build.py",
+ "arguments": [
+ "runtime_kernel",
+ "dart_precompiled_runtime"
+ ]
+ },
+ {
+ "name": "vm tests",
+ "arguments": [
+ "-ndartkp-obfuscate-${system}-${mode}-${arch}"
+ ],
+ "fileset": "vm-kernel",
+ "shards": 10
+ }
+ ]
+ },
+ {
+ "builders": [
"vm-asan-linux-release-x64"
],
"meta": {
@@ -737,6 +772,28 @@
},
{
"builders": [
+ "vm-kernel-checked-linux-release-x64"
+ ],
+ "meta": {
+ "description": "This configuration is for the kernel builder group in checked mode."
+ },
+ "steps": [
+ {
+ "name": "build dart",
+ "script": "tools/build.py",
+ "arguments": ["runtime_kernel"]
+ },
+ {
+ "name": "vm tests",
+ "arguments": [
+ "-ndartk-checked-linux-release-x64"],
+ "fileset": "vm-kernel",
+ "shards": 10
+ }
+ ]
+ },
+ {
+ "builders": [
"app-linux-debug-x64",
"app-linux-product-x64",
"app-linux-release-x64"
@@ -1154,6 +1211,16 @@
"fileset": "dart2js_hostasserts"
},
{
+ "name": "dart2js co19_2 tests",
+ "arguments": [
+ "-ndart2js-hostasserts-linux-ia32-d8",
+ "--dart2js-batch",
+ "co19_2"
+ ],
+ "shards": 6,
+ "fileset": "dart2js_hostasserts"
+ },
+ {
"name": "dart2js package tests",
"arguments": [
"-ndart2js-hostasserts-linux-ia32-d8",
@@ -1211,6 +1278,17 @@
"fileset": "dart2js"
},
{
+ "name": "dart2js co19_2 tests",
+ "arguments": [
+ "-ndart2js-${system}-${runtime}",
+ "--dart2js-batch",
+ "--reset-browser-configuration",
+ "co19_2"
+ ],
+ "shards": 6,
+ "fileset": "dart2js"
+ },
+ {
"name": "dart2js package tests",
"arguments": [
"-ndart2js-${system}-${runtime}",
@@ -1271,6 +1349,17 @@
"fileset": "dart2js"
},
{
+ "name": "dart2js fast-startup co19_2 tests",
+ "arguments": [
+ "-ndart2js-faststartup-${system}-${runtime}",
+ "--dart2js-batch",
+ "--reset-browser-configuration",
+ "co19_2"
+ ],
+ "shards": 6,
+ "fileset": "dart2js"
+ },
+ {
"name": "dart2js fast-startup package tests",
"arguments": [
"-ndart2js-faststartup-${system}-${runtime}",
@@ -1596,81 +1685,6 @@
"name": "build dart",
"script": "tools/build.py",
"arguments": ["create_sdk"]
- },
- {
- "name": "analyze pkg/analysis_server --use-cfe",
- "script": "out/ReleaseX64/dart-sdk/bin/dart",
- "arguments": [
- "pkg/analyzer_cli/bin/analyzer.dart",
- "--fatal-warnings",
- "--use-cfe",
- "pkg/analysis_server"
- ]
- },
- {
- "name": "analyze pkg/analyzer --use-cfe",
- "script": "out/ReleaseX64/dart-sdk/bin/dart",
- "arguments": [
- "pkg/analyzer_cli/bin/analyzer.dart",
- "--fatal-warnings",
- "--use-cfe",
- "pkg/analyzer"
- ]
- },
- {
- "name": "analyze pkg/analyzer_cli --use-cfe",
- "script": "out/ReleaseX64/dart-sdk/bin/dart",
- "arguments": [
- "pkg/analyzer_cli/bin/analyzer.dart",
- "--fatal-warnings",
- "--use-cfe",
- "pkg/analyzer_cli"
- ]
- },
- {
- "name": "analyze pkg/front_end --use-cfe",
- "script": "out/ReleaseX64/dart-sdk/bin/dart",
- "arguments": [
- "pkg/analyzer_cli/bin/analyzer.dart",
- "--fatal-warnings",
- "--use-cfe",
- "pkg/front_end"
- ]
- },
- {
- "name": "analyze pkg/kernel --use-cfe",
- "script": "out/ReleaseX64/dart-sdk/bin/dart",
- "arguments": [
- "pkg/analyzer_cli/bin/analyzer.dart",
- "--fatal-warnings",
- "--use-cfe",
- "pkg/kernel"
- ]
- },
- {
- "name": "dartanalyzer --batch --use-cfe pkg tests",
- "arguments": [
- "-nanalyzer-cfe-${system}",
- "pkg"
- ]
- },
- {
- "name": "run language2 tests",
- "arguments": [
- "-nanalyzer-cfe-${system}",
- "language_2"
- ]
- },
- {
- "name": "benchmarks analysis-server-cold --use-cfe",
- "script": "out/ReleaseX64/dart-sdk/bin/dart",
- "arguments": [
- "pkg/analysis_server/benchmark/benchmarks.dart",
- "run",
- "--use-cfe",
- "--repeat=1",
- "analysis-server-cold"
- ]
}
]
},
@@ -1857,15 +1871,7 @@
"arguments": ["create_sdk"]
},
{
- "name": "analyze pkg/analysis_server",
- "script": "out/ReleaseX64/dart-sdk/bin/dartanalyzer",
- "arguments": [
- "--use-fasta-parser",
- "pkg/analysis_server"
- ]
- },
- {
- "name": "analyze pkg/analyzer",
+ "name": "analyze pkg/analyzer --use-fasta-parser",
"script": "out/ReleaseX64/dart-sdk/bin/dartanalyzer",
"arguments": [
"--use-fasta-parser",
@@ -1873,7 +1879,15 @@
]
},
{
- "name": "analyze pkg/analyzer_cli",
+ "name": "analyze pkg/analyzer --no-use-fasta-parser",
+ "script": "out/ReleaseX64/dart-sdk/bin/dartanalyzer",
+ "arguments": [
+ "--no-use-fasta-parser",
+ "pkg/analyzer"
+ ]
+ },
+ {
+ "name": "analyze pkg/analyzer_cli --use-fasta-parser",
"script": "out/ReleaseX64/dart-sdk/bin/dartanalyzer",
"arguments": [
"--use-fasta-parser",
@@ -1888,23 +1902,26 @@
]
},
{
- "name": "run analyzer unit tests",
+ "name": "analyze pkg/analyzer_cli --no-use-fasta-parser",
+ "script": "out/ReleaseX64/dart-sdk/bin/dartanalyzer",
"arguments": [
- "-nunittest-analyzer_use_fasta-linux",
- "pkg/analyzer"
+ "--no-use-fasta-parser",
+ "pkg/analyzer_cli"
]
},
{
- "name": "run analysis server plugin tests",
+ "name": "analyze pkg/analysis_server --use-fasta-parser",
+ "script": "out/ReleaseX64/dart-sdk/bin/dartanalyzer",
"arguments": [
- "-nunittest-analyzer_use_fasta-linux",
- "pkg/analyzer_plugin"
+ "--use-fasta-parser",
+ "pkg/analysis_server"
]
},
{
- "name": "run analysis server unit tests",
+ "name": "analyze pkg/analysis_server --no-use-fasta-parser",
+ "script": "out/ReleaseX64/dart-sdk/bin/dartanalyzer",
"arguments": [
- "-nunittest-analyzer_use_fasta-linux",
+ "--no-use-fasta-parser",
"pkg/analysis_server"
]
}
diff --git a/tools/bots/try_benchmarks.sh b/tools/bots/try_benchmarks.sh
index 9e5670f..4dba863 100755
--- a/tools/bots/try_benchmarks.sh
+++ b/tools/bots/try_benchmarks.sh
@@ -219,11 +219,7 @@
out/ReleaseIA32/dart pkg/front_end/tool/perf.dart scan hello.dart
out/ReleaseIA32/dart pkg/front_end/tool/fasta_perf.dart --legacy kernel_gen_e2e hello.dart
out/ReleaseIA32/dart pkg/front_end/tool/fasta_perf.dart kernel_gen_e2e hello.dart
- out/ReleaseIA32/dart pkg/front_end/tool/perf.dart linked_summarize hello.dart
- out/ReleaseIA32/dart pkg/front_end/tool/perf.dart prelinked_summarize hello.dart
out/ReleaseIA32/dart pkg/front_end/tool/fasta_perf.dart scan hello.dart
- out/ReleaseIA32/dart pkg/front_end/tool/perf.dart unlinked_summarize hello.dart
- out/ReleaseIA32/dart pkg/front_end/tool/perf.dart unlinked_summarize_from_sources hello.dart
out/ReleaseIA32/dart --print_metrics pkg/analyzer_cli/bin/analyzer.dart --dart-sdk=sdk hello.dart
cd ..
rm -rf tmp
@@ -399,11 +395,7 @@
out/ReleaseX64/dart pkg/front_end/tool/perf.dart scan hello.dart
out/ReleaseX64/dart pkg/front_end/tool/fasta_perf.dart --legacy kernel_gen_e2e hello.dart
out/ReleaseX64/dart pkg/front_end/tool/fasta_perf.dart kernel_gen_e2e hello.dart
- out/ReleaseX64/dart pkg/front_end/tool/perf.dart linked_summarize hello.dart
- out/ReleaseX64/dart pkg/front_end/tool/perf.dart prelinked_summarize hello.dart
out/ReleaseX64/dart pkg/front_end/tool/fasta_perf.dart scan hello.dart
- out/ReleaseX64/dart pkg/front_end/tool/perf.dart unlinked_summarize hello.dart
- out/ReleaseX64/dart pkg/front_end/tool/perf.dart unlinked_summarize_from_sources hello.dart
out/ReleaseX64/dart pkg/analysis_server/benchmark/benchmarks.dart run --quick --repeat 1 analysis-server-cold
out/ReleaseX64/dart --print_metrics pkg/analyzer_cli/bin/analyzer.dart --dart-sdk=sdk hello.dart
echo '[{"name":"foo","edits":[["pkg/compiler/lib/src/dart2js.dart","2016","2017"],["pkg/compiler/lib/src/options.dart","2016","2017"]]}]' > appjit_train_edits.json
diff --git a/tools/get_archive.py b/tools/get_archive.py
deleted file mode 100755
index fe1ac51..0000000
--- a/tools/get_archive.py
+++ /dev/null
@@ -1,342 +0,0 @@
-#!/usr/bin/env python
-#
-# 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.
-
-# Gets or updates a content shell (a nearly headless build of chrome). This is
-# used for running browser tests of client applications.
-
-import json
-import optparse
-import os
-import platform
-import shutil
-import subprocess
-import sys
-import tempfile
-import zipfile
-
-import utils
-
-def NormJoin(path1, path2):
- return os.path.normpath(os.path.join(path1, path2))
-
-# Change into the dart directory as we want the project to be rooted here.
-dart_src = NormJoin(os.path.dirname(sys.argv[0]), os.pardir)
-os.chdir(dart_src)
-
-GSUTIL_DIR = os.path.join('third_party', 'gsutil')
-GSUTIL = GSUTIL_DIR + '/gsutil'
-
-DRT_DIR = os.path.join('client', 'tests', 'drt')
-DRT_VERSION = os.path.join(DRT_DIR, 'LAST_VERSION')
-DRT_LATEST_PATTERN = (
- 'gs://dartium-archive/latest/drt-%(osname)s-%(bot)s-*.zip')
-DRT_PERMANENT_PATTERN = ('gs://dartium-archive/drt-%(osname)s-%(bot)s/drt-'
- '%(osname)s-%(bot)s-%(num1)s.%(num2)s.zip')
-
-DARTIUM_DIR = os.path.join('client', 'tests', 'dartium')
-DARTIUM_VERSION = os.path.join(DARTIUM_DIR, 'LAST_VERSION')
-DARTIUM_LATEST_PATTERN = (
- 'gs://dartium-archive/latest/dartium-%(osname)s-%(bot)s-*.zip')
-DARTIUM_PERMANENT_PATTERN = ('gs://dartium-archive/dartium-%(osname)s-%(bot)s/'
- 'dartium-%(osname)s-%(bot)s-%(num1)s.%(num2)s.zip')
-
-SDK_DIR = os.path.join(utils.GetBuildRoot(utils.GuessOS(), 'release', 'ia32'),
- 'dart-sdk')
-SDK_VERSION = os.path.join(SDK_DIR, 'LAST_VERSION')
-SDK_LATEST_PATTERN = 'gs://dart-archive/channels/dev/raw/latest/VERSION'
-# TODO(efortuna): Once the x64 VM also is optimized, select the version
-# based on whether we are running on a 32-bit or 64-bit system.
-SDK_PERMANENT = ('gs://dart-archive/channels/dev/raw/%(version_num)s/sdk/' +
- 'dartsdk-%(osname)s-ia32-release.zip')
-
-# Dictionary storing the earliest revision of each download we have stored.
-LAST_VALID = {'dartium': 4285, 'chromedriver': 7823, 'sdk': 9761, 'drt': 5342}
-
-sys.path.append(os.path.join(GSUTIL_DIR, 'third_party', 'boto'))
-import boto
-
-
-def ExecuteCommand(*cmd):
- """Execute a command in a subprocess."""
- pipe = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
- output, error = pipe.communicate()
- return pipe.returncode, output
-
-
-def ExecuteCommandVisible(*cmd):
- """Execute a command in a subprocess, but show stdout/stderr."""
- result = subprocess.call(cmd, stdout=sys.stdout, stderr=sys.stderr,
- stdin=sys.stdin)
- if result != 0:
- raise Exception('Execution of "%s" failed' % ' '.join(cmd))
-
-
-def Gsutil(*cmd):
- return ExecuteCommand('python', GSUTIL, *cmd)
-
-
-def GsutilVisible(*cmd):
- ExecuteCommandVisible('python', GSUTIL, *cmd)
-
-
-def HasBotoConfig():
- """Returns true if boto config exists."""
-
- config_paths = boto.pyami.config.BotoConfigLocations
- if 'AWS_CREDENTIAL_FILE' in os.environ:
- config_paths.append(os.environ['AWS_CREDENTIAL_FILE'])
- for config_path in config_paths:
- if os.path.exists(config_path):
- return True
-
- return False
-
-
-def InRunhooks():
- """True if this script was called by "gclient runhooks" or "gclient sync\""""
- return 'runhooks' in sys.argv
-
-
-def GetDartiumRevision(name, bot, directory, version_file, latest_pattern,
- permanent_prefix, revision_num=None):
- """Get the latest binary that is stored in the dartium archive.
-
- Args:
- name: the name of the desired download.
- directory: target directory (recreated) to install binary
- version_file: name of file with the current version stamp
- latest_pattern: the google store url pattern pointing to the latest binary
- permanent_prefix: stable google store folder used to download versions
- revision_num: The desired revision number to retrieve. If revision_num is
- None, we return the latest revision. If the revision number is specified
- but unavailable, find the nearest older revision and use that instead.
- """
- osdict = {'Darwin':'mac-x64', 'Linux':'linux-x64', 'Windows':'win-ia32'}
-
- def FindPermanentUrl(out, osname, the_revision_num):
- output_lines = out.split()
- latest = output_lines[-1]
- if not the_revision_num:
- latest = (permanent_prefix[:permanent_prefix.rindex('/')] % { 'osname' :
- osname, 'bot' : bot } + latest[latest.rindex('/'):])
- else:
- latest = (permanent_prefix % { 'osname' : osname, 'num1' : the_revision_num,
- 'num2' : the_revision_num, 'bot' : bot })
- foundURL = False
- while not foundURL:
- # Test to ensure this URL exists because the dartium-archive builds can
- # have unusual numbering (a range of CL numbers) sometimes.
- result, out = Gsutil('ls', permanent_prefix % {'osname' : osname,
- 'num1': the_revision_num, 'num2': '*', 'bot': bot })
- if result == 0:
- # First try to find one with the second number the same as the
- # requested number.
- latest = out.split()[0]
- # Now test that the permissions are correct so you can actually
- # download it.
- temp_dir = tempfile.mkdtemp()
- temp_zip = os.path.join(temp_dir, 'foo.zip')
- returncode, out = Gsutil('cp', latest, 'file://' + temp_zip)
- if returncode == 0:
- foundURL = True
- else:
- # Unable to download this item (most likely because something went
- # wrong on the upload and the permissions are bad). Keep looking for
- # a different URL.
- the_revision_num = int(the_revision_num) - 1
- shutil.rmtree(temp_dir)
- else:
- # Now try to find one with a nearby CL num.
- the_revision_num = int(the_revision_num) - 1
- if the_revision_num <= 0:
- TooEarlyError()
- return latest
-
- GetFromGsutil(name, directory, version_file, latest_pattern, osdict,
- FindPermanentUrl, revision_num, bot)
-
-
-def GetSdkRevision(name, directory, version_file, latest_pattern,
- permanent_prefix, revision_num):
- """Get a revision of the SDK from the editor build archive.
-
- Args:
- name: the name of the desired download
- directory: target directory (recreated) to install binary
- version_file: name of file with the current version stamp
- latest_pattern: the google store url pattern pointing to the latest binary
- permanent_prefix: stable google store folder used to download versions
- revision_num: the desired revision number, or None for the most recent
- """
- osdict = {'Darwin':'macos', 'Linux':'linux', 'Windows':'win32'}
- def FindPermanentUrl(out, osname, not_used):
- rev_num = revision_num
- if not rev_num:
- temp_file = tempfile.NamedTemporaryFile(delete=False)
- temp_file.close()
- temp_file_url = 'file://' + temp_file.name
- Gsutil('cp', latest_pattern % {'osname' : osname }, temp_file_url)
- temp_file = open(temp_file.name)
- temp_file.seek(0)
- version_info = temp_file.read()
- temp_file.close()
- os.unlink(temp_file.name)
- if version_info != '':
- rev_num = json.loads(version_info)['revision']
- else:
- print 'Unable to get latest version information.'
- return ''
- latest = (permanent_prefix % { 'osname' : osname, 'version_num': rev_num})
- return latest
-
- GetFromGsutil(name, directory, version_file, latest_pattern, osdict,
- FindPermanentUrl, revision_num)
-
-
-def GetFromGsutil(name, directory, version_file, latest_pattern,
- os_name_dict, get_permanent_url, revision_num = '', bot = None):
- """Download and unzip the desired file from Google Storage.
- Args:
- name: the name of the desired download
- directory: target directory (recreated) to install binary
- version_file: name of file with the current version stamp
- latest_pattern: the google store url pattern pointing to the latest binary
- os_name_dict: a dictionary of operating system names and their corresponding
- strings on the google storage site.
- get_permanent_url: a function that accepts a listing of available files
- and the os name, and returns a permanent URL for downloading.
- revision_num: the desired revision number to get (if not supplied, we get
- the latest revision)
- """
- system = platform.system()
- try:
- osname = os_name_dict[system]
- except KeyError:
- print >>sys.stderr, ('WARNING: platform "%s" does not support'
- '%s.') % (system, name)
- return 0
-
- # Query for the latest version
- pattern = latest_pattern % { 'osname' : osname, 'bot' : bot }
- result, out = Gsutil('ls', pattern)
- if result == 0:
- # use permanent link instead, just in case the latest zip entry gets deleted
- # while we are downloading it.
- latest = get_permanent_url(out, osname, revision_num)
- else: # e.g. no access
- print "Couldn't download %s: %s\n%s" % (name, pattern, out)
- if not os.path.exists(version_file):
- print "Using %s will not work. Please try again later." % name
- return 0
-
- # Check if we need to update the file
- if os.path.exists(version_file):
- v = open(version_file, 'r').read()
- if v == latest:
- if not InRunhooks():
- print name + ' is up to date.\nVersion: ' + latest
- return 0 # up to date
-
- # download the zip file to a temporary path, and unzip to the target location
- temp_dir = tempfile.mkdtemp()
- try:
- temp_zip = os.path.join(temp_dir, 'drt.zip')
- temp_zip_url = 'file://' + temp_zip
- # It's nice to show download progress
- GsutilVisible('cp', latest, temp_zip_url)
-
- if platform.system() != 'Windows':
- # The Python zip utility does not preserve executable permissions, but
- # this does not seem to be a problem for Windows, which does not have a
- # built in zip utility. :-/
- result, out = ExecuteCommand('unzip', temp_zip, '-d', temp_dir)
- if result != 0:
- raise Exception('Execution of "unzip %s -d %s" failed: %s' %
- (temp_zip, temp_dir, str(out)))
- unzipped_dir = temp_dir + '/' + os.path.basename(latest)[:-len('.zip')]
- else:
- z = zipfile.ZipFile(temp_zip)
- z.extractall(temp_dir)
- unzipped_dir = os.path.join(temp_dir,
- os.path.basename(latest)[:-len('.zip')])
- z.close()
- if directory == SDK_DIR:
- unzipped_dir = os.path.join(temp_dir, 'dart-sdk')
- if os.path.exists(directory):
- print 'Removing old %s tree %s' % (name, directory)
- shutil.rmtree(directory)
- if os.path.exists(directory):
- raise Exception(
- 'Removal of directory %s failed. Is the executable running?' %
- directory)
- shutil.move(unzipped_dir, directory)
- finally:
- shutil.rmtree(temp_dir)
-
- # create the version stamp
- v = open(version_file, 'w')
- v.write(latest)
- v.close()
-
- print 'Successfully downloaded to %s' % directory
- return 0
-
-
-def TooEarlyError():
- """Quick shortcutting function, to return early if someone requests a revision
- that is smaller than the earliest stored. This saves us from doing repeated
- requests until we get down to 0."""
- print ('Unable to download requested revision because it is earlier than the '
- 'earliest revision stored.')
- sys.exit(1)
-
-
-def CopyDrtFont(drt_dir):
- if platform.system() != 'Windows':
- return
- shutil.copy('third_party/drt_resources/AHEM____.TTF', drt_dir)
-
-
-def main():
- parser = optparse.OptionParser(usage='usage: %prog [options] download_name')
- parser.add_option('-r', '--revision', dest='revision',
- help='Desired revision number to retrieve for the SDK. If '
- 'unspecified, retrieve the latest SDK build.',
- action='store', default=None)
- parser.add_option('-d', '--debug', dest='debug',
- help='Download a debug archive instead of a release.',
- action='store_true', default=False)
- args, positional = parser.parse_args()
-
- if args.revision and int(args.revision) < LAST_VALID[positional[0]]:
- return TooEarlyError()
-
- # Use the incremental release bot ('dartium-*-inc-be') by default.
- # Issue 13399 Quick fix, update with channel support.
- bot = 'inc-be'
- if args.debug:
- print >>sys.stderr, (
- 'Debug versions of Dartium and content_shell not available')
- return 1
-
- if positional[0] == 'dartium':
- GetDartiumRevision('Dartium', bot, DARTIUM_DIR, DARTIUM_VERSION,
- DARTIUM_LATEST_PATTERN, DARTIUM_PERMANENT_PATTERN,
- args.revision)
- elif positional[0] == 'sdk':
- GetSdkRevision('sdk', SDK_DIR, SDK_VERSION, SDK_LATEST_PATTERN,
- SDK_PERMANENT, args.revision)
- elif positional[0] == 'drt':
- GetDartiumRevision('content_shell', bot, DRT_DIR, DRT_VERSION,
- DRT_LATEST_PATTERN, DRT_PERMANENT_PATTERN,
- args.revision)
- CopyDrtFont(DRT_DIR)
- else:
- print ('Please specify the target you wish to download from Google Storage '
- '("drt", "dartium", "chromedriver", or "sdk")')
-
-if __name__ == '__main__':
- sys.exit(main())
diff --git a/tools/infra/config/cq.cfg b/tools/infra/config/cq.cfg
index 07f7029..758bbb7 100644
--- a/tools/infra/config/cq.cfg
+++ b/tools/infra/config/cq.cfg
@@ -19,7 +19,6 @@
name: "luci.dart.try"
builders { name: "analyzer-analysis-server-linux-try" }
builders { name: "analyzer-linux-release-try" }
- builders { name: "analyzer-use-cfe-linux-try" }
builders { name: "benchmark-linux-try" }
builders { name: "dart-sdk-windows-try" }
builders { name: "dart2js-strong-linux-x64-chrome-try" }
@@ -32,7 +31,7 @@
builders { name: "vm-canary-linux-debug-try" }
builders { name: "vm-kernel-linux-release-simdbc64-try" }
builders { name: "vm-kernel-linux-release-x64-try" }
- builders { name: "vm-kernel-mac-release-x64-try" experiment_percentage: 100 }
+ builders { name: "vm-kernel-mac-release-x64-try" experiment_percentage: 5 }
builders { name: "vm-linux-product-x64-try" }
builders { name: "vm-linux-release-x64-try" }
builders { name: "vm-mac-release-x64-try" }
diff --git a/tools/task_kill.py b/tools/task_kill.py
index c620c5d..0f91b73 100755
--- a/tools/task_kill.py
+++ b/tools/task_kill.py
@@ -25,7 +25,6 @@
EXECUTABLE_NAMES = {
'win32': {
'chrome': 'chrome.exe',
- 'content_shell': 'content_shell.exe',
'dart_bootstrap': 'dart_bootstrap.exe',
'dart': 'dart.exe',
'dart_precompiled_runtime': 'dart_precompiled_runtime.exe',
@@ -38,7 +37,6 @@
},
'linux': {
'chrome': 'chrome',
- 'content_shell': 'content_shell',
'dart_bootstrap': 'dart_bootstrap',
'dart': 'dart',
'dart_precompiled_runtime': 'dart_precompiled_runtime',
@@ -49,7 +47,6 @@
'macos': {
'chrome': 'Chrome',
'chrome_helper': 'Chrome Helper',
- 'content_shell': 'Content Shell',
'dart_bootstrap': 'dart_bootstrap',
'dart': 'dart',
'dart_precompiled_runtime': 'dart_precompiled_runtime',
@@ -221,12 +218,6 @@
status += Kill('chrome_helper')
status += Kill('iexplore')
status += Kill('safari')
- if os_name == "win32":
- # TODO(29599): Let content_shell affect exit code on windows,
- # once issue with zombie renderers is fixed.
- Kill('content_shell')
- else:
- status += Kill('content_shell')
return status
def KillVCSystems():
diff --git a/tools/testing/dart/browser_controller.dart b/tools/testing/dart/browser_controller.dart
index 03ee0a9..faa77d7 100644
--- a/tools/testing/dart/browser_controller.dart
+++ b/tools/testing/dart/browser_controller.dart
@@ -565,71 +565,6 @@
String toString() => "IE";
}
-class AndroidBrowserConfig {
- final String name;
- final String package;
- final String activity;
- final String action;
- AndroidBrowserConfig(this.name, this.package, this.activity, this.action);
-}
-
-final contentShellOnAndroidConfig = new AndroidBrowserConfig(
- 'ContentShellOnAndroid',
- 'org.chromium.content_shell_apk',
- '.ContentShellActivity',
- 'android.intent.action.VIEW');
-
-class AndroidBrowser extends Browser {
- final bool checkedMode;
- AdbDevice _adbDevice;
- AndroidBrowserConfig _config;
-
- AndroidBrowser(
- this._adbDevice, this._config, this.checkedMode, String apkPath) {
- _binary = apkPath;
- }
-
- Future<bool> start(String url) {
- var intent =
- new Intent(_config.action, _config.package, _config.activity, url);
- return _adbDevice.waitForBootCompleted().then((_) {
- return _adbDevice.forceStop(_config.package);
- }).then((_) {
- return _adbDevice.killAll();
- }).then((_) {
- return _adbDevice.adbRoot();
- }).then((_) {
- return _adbDevice.setProp("DART_FORWARDING_PRINT", "1");
- }).then((_) {
- if (checkedMode) {
- return _adbDevice.setProp("DART_FLAGS", "--checked");
- } else {
- return _adbDevice.setProp("DART_FLAGS", "");
- }
- }).then((_) {
- return _adbDevice.installApk(new Path(_binary));
- }).then((_) {
- return _adbDevice.startActivity(intent).then((_) => true);
- });
- }
-
- Future<bool> close() {
- if (_adbDevice != null) {
- return _adbDevice.forceStop(_config.package).then((_) {
- return _adbDevice.killAll().then((_) => true);
- });
- }
- return new Future.value(true);
- }
-
- void logBrowserInfoToTestBrowserOutput() {
- _testBrowserOutput.stdout
- .write('Android device id: ${_adbDevice.deviceId}\n');
- }
-
- String toString() => _config.name;
-}
-
class AndroidChrome extends Browser {
static const String viewAction = 'android.intent.action.VIEW';
static const String mainAction = 'android.intent.action.MAIN';
@@ -801,25 +736,7 @@
id = _idCounter++;
}
- String toJSON() => jsonEncode({'url': url, 'id': id, 'isHtmlTest': false});
-}
-
-/**
- * Describes a test with a custom HTML page to be run in the browser.
- */
-class HtmlTest extends BrowserTest {
- List<String> expectedMessages;
-
- HtmlTest(String url, BrowserDoneCallback doneCallback, int timeout,
- this.expectedMessages)
- : super(url, doneCallback, timeout) {}
-
- String toJSON() => jsonEncode({
- 'url': url,
- 'id': id,
- 'isHtmlTest': true,
- 'expectedMessages': expectedMessages
- });
+ String toJSON() => jsonEncode({'url': url, 'id': id});
}
/* Describes the output of running the test in a browser */
@@ -1489,9 +1406,6 @@
var use_iframe = ${configuration.runtime.requiresIFrame};
var start = new Date();
- // Object that holds the state of an HTML test
- var html_test;
-
function newTaskHandler() {
if (this.readyState == this.DONE) {
if (this.status == 200) {
@@ -1504,20 +1418,6 @@
var nextTask = JSON.parse(this.responseText);
var url = nextTask.url;
next_id = nextTask.id;
- if (nextTask.isHtmlTest) {
- html_test = {
- expected_messages: nextTask.expectedMessages,
- found_message_count: 0,
- double_received_messages: [],
- unexpected_messages: [],
- found_messages: {}
- };
- for (var i = 0; i < html_test.expected_messages.length; ++i) {
- html_test.found_messages[html_test.expected_messages[i]] = 0;
- }
- } else {
- html_test = null;
- }
run(url);
}
} else {
@@ -1562,37 +1462,12 @@
return true;
}
- function setChildHandlers(e) {
- embedded_iframe.contentWindow.addEventListener('message',
- childMessageHandler,
- false);
- embedded_iframe.contentWindow.onerror = childError;
- reportMessage("First message from html test", true, false);
- html_test.handlers_installed = true;
- sendRepeatingStatusUpdate();
- }
-
- function checkChildHandlersInstalled() {
- if (!html_test.handlers_installed) {
- reportMessage("First message from html test", true, false);
- reportMessage(
- 'FAIL: Html test did not call ' +
- 'window.parent.dispatchEvent(new Event("detect_errors")) ' +
- 'as its first action', false, false);
- }
- }
-
function run(url) {
number_of_tests++;
number_div.innerHTML = number_of_tests;
executing_div.innerHTML = url;
if (use_iframe) {
- if (html_test) {
- window.addEventListener('detect_errors', setChildHandlers, false);
- embedded_iframe.onload = checkChildHandlersInstalled;
- } else {
- embedded_iframe.onload = null;
- }
+ embedded_iframe.onload = null;
embedded_iframe_div.removeChild(embedded_iframe);
embedded_iframe = document.createElement('iframe');
embedded_iframe.id = "embedded_iframe";
@@ -1724,13 +1599,6 @@
var dom =
embedded_iframe.contentWindow.document.documentElement.innerHTML;
var message = 'Status:\\n';
- if (html_test != null) {
- message +=
- ' Messages received multiple times:\\n' +
- ' ' + html_test.double_received_messages + '\\n' +
- ' Unexpected messages:\\n' +
- ' ' + html_test.unexpected_messages + '\\n';
- }
message += ' DOM:\\n' +
' ' + dom;
reportMessage(message, false, true);
@@ -1741,35 +1609,8 @@
setTimeout(sendRepeatingStatusUpdate, STATUS_UPDATE_INTERVAL);
}
- // HTML tests post messages to their own window, handled by this handler.
- // This handler is installed on the child window when it sends the
- // 'detect_errors' event. Every HTML test must send 'detect_errors' to
- // its parent window as its first action, so all errors will be caught.
- function childMessageHandler(e) {
- var msg = e.data;
- if (typeof msg != 'string') return;
- if (msg in html_test.found_messages) {
- html_test.found_messages[msg]++;
- if (html_test.found_messages[msg] == 1) {
- html_test.found_message_count++;
- } else {
- html_test.double_received_messages.push(msg);
- sendStatusUpdate();
- }
- } else {
- html_test.unexpected_messages.push(msg);
- sendStatusUpdate();
- }
- if (html_test.found_message_count ==
- html_test.expected_messages.length) {
- reportMessage('Test done: PASS', false, false);
- }
- }
-
- if (!html_test) {
- window.addEventListener('message', messageHandler, false);
- waitForDone = false;
- }
+ window.addEventListener('message', messageHandler, false);
+ waitForDone = false;
getNextTask();
}
</script>
diff --git a/tools/testing/dart/command.dart b/tools/testing/dart/command.dart
index 5b13728..7bb1ae4 100644
--- a/tools/testing/dart/command.dart
+++ b/tools/testing/dart/command.dart
@@ -16,28 +16,11 @@
/// A command executed as a step in a test case.
class Command {
- static Command contentShell(
- String executable,
- String htmlFile,
- List<String> options,
- List<String> dartFlags,
- Map<String, String> environment) {
- return new ContentShellCommand._(
- executable, htmlFile, options, dartFlags, environment);
- }
-
static Command browserTest(String url, TestConfiguration configuration,
{bool retry}) {
return new BrowserTestCommand._(url, configuration, retry);
}
- static Command browserHtmlTest(String url, TestConfiguration configuration,
- List<String> expectedMessages,
- {bool retry}) {
- return new BrowserHtmlTestCommand._(
- url, configuration, expectedMessages, retry);
- }
-
static Command compilation(
String displayName,
String outputFile,
@@ -403,46 +386,6 @@
int get hashCode => flags.hashCode ^ env.hashCode;
}
-class ContentShellCommand extends ProcessCommand {
- ContentShellCommand._(
- String executable,
- String htmlFile,
- List<String> options,
- List<String> dartFlags,
- Map<String, String> environmentOverrides)
- : super._("content_shell", executable, _getArguments(options, htmlFile),
- _getEnvironment(environmentOverrides, dartFlags));
-
- // Cache the modified environments in a map from the old environment and
- // the string of Dart flags to the new environment. Avoid creating new
- // environment object for each command object.
- static Map<AddFlagsKey, Map<String, String>> environments = {};
-
- static Map<String, String> _getEnvironment(
- Map<String, String> env, List<String> dartFlags) {
- var needDartFlags = dartFlags != null && dartFlags.isNotEmpty;
- if (needDartFlags) {
- if (env == null) {
- env = const <String, String>{};
- }
- var flags = dartFlags.join(' ');
- return environments.putIfAbsent(
- new AddFlagsKey(flags, env),
- () => new Map<String, String>.from(env)
- ..addAll({'DART_FLAGS': flags, 'DART_FORWARDING_PRINT': '1'}));
- }
- return env;
- }
-
- static List<String> _getArguments(List<String> options, String htmlFile) {
- var arguments = options.toList();
- arguments.add(htmlFile);
- return arguments;
- }
-
- int get maxNumRetries => 3;
-}
-
class BrowserTestCommand extends Command {
Runtime get browser => configuration.runtime;
final String url;
@@ -480,22 +423,6 @@
int get maxNumRetries => 4;
}
-class BrowserHtmlTestCommand extends BrowserTestCommand {
- List<String> expectedMessages;
- BrowserHtmlTestCommand._(String url, TestConfiguration configuration,
- this.expectedMessages, bool retry)
- : super._(url, configuration, retry);
-
- void _buildHashCode(HashCodeBuilder builder) {
- super._buildHashCode(builder);
- builder.addJson(expectedMessages);
- }
-
- bool _equal(BrowserHtmlTestCommand other) =>
- super._equal(other) &&
- identical(expectedMessages, other.expectedMessages);
-}
-
class AnalysisCommand extends ProcessCommand {
AnalysisCommand._(String executable, List<String> arguments,
Map<String, String> environmentOverrides)
diff --git a/tools/testing/dart/command_output.dart b/tools/testing/dart/command_output.dart
index 53e3d40..4f7521c 100644
--- a/tools/testing/dart/command_output.dart
+++ b/tools/testing/dart/command_output.dart
@@ -51,6 +51,17 @@
return Expectation.pass;
}
+ /// Cloned code from member result(), with changes.
+ /// Delete existing result() function and rename, when status files are gone.
+ Expectation realResult(TestCase testCase) {
+ if (hasCrashed) return Expectation.crash;
+ if (hasTimedOut) return Expectation.timeout;
+ if (_didFail(testCase)) return Expectation.fail;
+ if (hasNonUtf8) return Expectation.nonUtf8Error;
+
+ return Expectation.pass;
+ }
+
bool get hasCrashed {
// dart2js exits with code 253 in case of unhandled exceptions.
// The dart binary exits with code 253 in case of an API error such
@@ -76,8 +87,6 @@
return exitCode < 0;
}
- bool get hasSyntaxError => exitCode == parseFailExitCode;
-
bool _didFail(TestCase testCase) => exitCode != 0 && !hasCrashed;
bool get canRunDependendCommands {
@@ -129,180 +138,6 @@
}
}
-class ContentShellCommandOutput extends CommandOutput {
- // Although tests are reported as passing, content shell sometimes exits with
- // a nonzero exitcode which makes our builders extremely flaky.
- // See: http://dartbug.com/15139.
- // TODO(rnystrom): Is this still needed? The underlying bug is closed.
- static const _whitelistedContentShellExitCode = -1073740022;
-
- static bool _failedBecauseOfFlakyInfrastructure(
- Command command, bool timedOut, List<int> stderrBytes) {
- // If the browser test failed, it may have been because content shell
- // and the virtual framebuffer X server didn't hook up, or it crashed with
- // a core dump. Sometimes content shell crashes after it has set the stdout
- // to PASS, so we have to do this check first.
- // Content shell also fails with a broken pipe message: Issue 26739
- var zygoteCrash =
- new RegExp(r"ERROR:zygote_linux\.cc\(\d+\)] write: Broken pipe");
- var stderr = decodeUtf8(stderrBytes);
- // TODO(7564): See http://dartbug.com/7564
- // This may not be happening anymore. Test by removing this suppression.
- if (stderr.contains(cannotOpenDisplayMessage) ||
- stderr.contains(failedToRunCommandMessage)) {
- DebugLogger.warning(
- "Warning: Failure because of missing XDisplay. Test ignored");
- return true;
- }
- // TODO(26739): See http://dartbug.com/26739
- if (zygoteCrash.hasMatch(stderr)) {
- DebugLogger.warning("Warning: Failure because of content_shell "
- "zygote crash. Test ignored");
- return true;
- }
- return false;
- }
-
- final bool _infraFailure;
-
- ContentShellCommandOutput(
- Command command,
- int exitCode,
- bool timedOut,
- List<int> stdout,
- List<int> stderr,
- Duration time,
- bool compilationSkipped)
- : _infraFailure =
- _failedBecauseOfFlakyInfrastructure(command, timedOut, stderr),
- super(command, exitCode, timedOut, stdout, stderr, time,
- compilationSkipped, 0);
-
- Expectation result(TestCase testCase) {
- if (_infraFailure) {
- return Expectation.ignore;
- }
-
- // Handle crashes and timeouts first
- if (hasCrashed) return Expectation.crash;
- if (hasTimedOut) return Expectation.timeout;
- if (hasNonUtf8) return Expectation.nonUtf8Error;
-
- var outcome = _getOutcome();
-
- if (testCase.hasRuntimeError) {
- if (!outcome.canBeOutcomeOf(Expectation.runtimeError)) {
- return Expectation.missingRuntimeError;
- }
- }
- if (testCase.isNegative) {
- if (outcome.canBeOutcomeOf(Expectation.fail)) return Expectation.pass;
- return Expectation.fail;
- }
- return outcome;
- }
-
- bool get successful => canRunDependendCommands;
-
- bool get canRunDependendCommands {
- // We cannot rely on the exit code of content_shell as a method to
- // determine if we were successful or not.
- return super.canRunDependendCommands && !_didFail(null);
- }
-
- bool get hasCrashed => super.hasCrashed || _rendererCrashed;
-
- Expectation _getOutcome() {
- if (_browserTestFailure) {
- return Expectation.runtimeError;
- }
- return Expectation.pass;
- }
-
- bool get _rendererCrashed =>
- decodeUtf8(super.stdout).contains("#CRASHED - rendere");
-
- bool get _browserTestFailure {
- // Browser tests fail unless stdout contains
- // 'Content-Type: text/plain' followed by 'PASS'.
- var hasContentType = false;
- var stdoutLines = decodeUtf8(super.stdout).split("\n");
- var containsFail = false;
- var containsPass = false;
- for (String line in stdoutLines) {
- switch (line) {
- case 'Content-Type: text/plain':
- hasContentType = true;
- break;
- case 'FAIL':
- if (hasContentType) {
- containsFail = true;
- }
- break;
- case 'PASS':
- if (hasContentType) {
- containsPass = true;
- }
- break;
- }
- }
- if (hasContentType) {
- if (containsFail && containsPass) {
- DebugLogger.warning("Test had 'FAIL' and 'PASS' in stdout. ($command)");
- }
- if (!containsFail && !containsPass) {
- DebugLogger.warning("Test had neither 'FAIL' nor 'PASS' in stdout. "
- "($command)");
- return true;
- }
- if (containsFail) {
- return true;
- }
- assert(containsPass);
- if (exitCode != 0) {
- var message = "All tests passed, but exitCode != 0. "
- "Actual exitcode: $exitCode. "
- "($command)";
- DebugLogger.warning(message);
- diagnostics.add(message);
- }
-
- var isWindows = io.Platform.operatingSystem == 'windows';
- return (!hasCrashed &&
- exitCode != 0 &&
- (!isWindows || exitCode != _whitelistedContentShellExitCode));
- }
-
- DebugLogger.warning("Couldn't find 'Content-Type: text/plain' in output. "
- "($command).");
- return true;
- }
-}
-
-class HtmlBrowserCommandOutput extends ContentShellCommandOutput {
- HtmlBrowserCommandOutput(
- Command command,
- int exitCode,
- bool timedOut,
- List<int> stdout,
- List<int> stderr,
- Duration time,
- bool compilationSkipped)
- : super(command, exitCode, timedOut, stdout, stderr, time,
- compilationSkipped);
-
- bool _didFail(TestCase testCase) {
- return _getOutcome() != Expectation.pass;
- }
-
- bool get _browserTestFailure {
- // We should not need to convert back and forward.
- var output = decodeUtf8(super.stdout);
- if (output.contains("FAIL")) return true;
- return !output.contains("PASS");
- }
-}
-
class BrowserTestJsonResult {
static const _allowedTypes = const [
'sync_exception',
@@ -380,7 +215,7 @@
}
static Expectation _getOutcome(Map<String, List<String>> messagesByType) {
- occured(String type) => messagesByType[type].isNotEmpty;
+ occurred(String type) => messagesByType[type].isNotEmpty;
searchForMsg(List<String> types, String message) {
return types.any((type) => messagesByType[type].contains(message));
@@ -389,13 +224,13 @@
// FIXME(kustermann,ricow): I think this functionality doesn't work in
// test_controller.js: So far I haven't seen anything being reported on
// "window.compilationerror"
- if (occured('window_compilationerror')) {
+ if (occurred('window_compilationerror')) {
return Expectation.compileTimeError;
}
- if (occured('sync_exception') ||
- occured('window_onerror') ||
- occured('script_onerror')) {
+ if (occurred('sync_exception') ||
+ occurred('window_onerror') ||
+ occurred('script_onerror')) {
return Expectation.runtimeError;
}
@@ -462,7 +297,7 @@
stderr = "This test timed out. The delay until the test actually "
"started was: ${result.delayUntilTestStarted}.";
} else {
- stderr = "This test has not notified test.py that it started running.";
+ stderr = "This test did not notify test.py that it started running.";
}
}
@@ -498,6 +333,23 @@
return _negateOutcomeIfNegativeTest(_rawOutcome, testCase.isNegative);
}
+ /// Cloned code from member result(), with changes.
+ /// Delete existing result() function and rename, when status files are gone.
+ Expectation realResult(TestCase testCase) {
+ // Handle timeouts first.
+ if (_result.didTimeout) {
+ if (testCase.configuration.runtime == Runtime.ie11) {
+ // TODO(28955): See http://dartbug.com/28955
+ DebugLogger.warning("Timeout of ie11 on test ${testCase.displayName}");
+ return Expectation.ignore;
+ }
+ return Expectation.timeout;
+ }
+
+ if (hasNonUtf8) return Expectation.nonUtf8Error;
+ return _rawOutcome;
+ }
+
void describe(Progress progress, OutputWriter output) {
if (_jsonResult != null) {
_describeEvents(progress, output);
@@ -646,6 +498,32 @@
return Expectation.pass;
}
+ /// Cloned code from member result(), with changes.
+ /// Delete existing result() function and rename, when status files are gone.
+ Expectation realResult(TestCase testCase) {
+ // TODO(kustermann): If we run the analyzer not in batch mode, make sure
+ // that command.exitCodes matches 2 (errors), 1 (warnings), 0 (no warnings,
+ // no errors)
+
+ // Handle crashes and timeouts first
+ if (hasCrashed) return Expectation.crash;
+ if (hasTimedOut) return Expectation.timeout;
+ if (hasNonUtf8) return Expectation.nonUtf8Error;
+
+ // Get the errors/warnings from the analyzer
+ var errors = <String>[];
+ var warnings = <String>[];
+ parseAnalyzerOutput(errors, warnings);
+
+ if (errors.isNotEmpty) {
+ return Expectation.compileTimeError;
+ }
+ if (warnings.isNotEmpty) {
+ return Expectation.staticWarning;
+ }
+ return Expectation.pass;
+ }
+
void parseAnalyzerOutput(List<String> outErrors, List<String> outWarnings) {
// Parse a line delimited by the | character using \ as an escape character
// like: FOO|BAR|FOO\|BAR|FOO\\BAZ as 4 fields: FOO BAR FOO|BAR FOO\BAZ
@@ -700,6 +578,8 @@
: super(command, exitCode, timedOut, stdout, stderr, time,
compilationSkipped, 0);
+ bool get hasSyntaxError => exitCode == parseFailExitCode;
+
Expectation result(TestCase testCase) {
// Handle crashes and timeouts first.
if (hasCrashed) return Expectation.crash;
@@ -723,6 +603,17 @@
// No compile-time errors expected (including: no syntax errors).
return exitCode == 0 ? Expectation.pass : Expectation.syntaxError;
}
+
+ /// Cloned code from member result(), with changes.
+ /// Delete existing result() function and rename, when status files are gone.
+ Expectation realResult(TestCase testCase) {
+ if (hasCrashed) return Expectation.crash;
+ if (hasTimedOut) return Expectation.timeout;
+ if (hasNonUtf8) return Expectation.nonUtf8Error;
+ if (hasSyntaxError) return Expectation.syntaxError;
+ if (exitCode != 0) return Expectation.syntaxError;
+ return Expectation.pass;
+ }
}
class VMCommandOutput extends CommandOutput with UnittestSuiteMessagesMixin {
@@ -772,6 +663,29 @@
outcome = _negateOutcomeIfIncompleteAsyncTest(outcome, decodeUtf8(stdout));
return _negateOutcomeIfNegativeTest(outcome, testCase.isNegative);
}
+
+ /// Cloned code from member result(), with changes.
+ /// Delete existing result() function and rename, when status files are gone.
+ Expectation realResult(TestCase testCase) {
+ // Handle crashes and timeouts first.
+ if (exitCode == _dfeErrorExitCode) return Expectation.dartkCrash;
+ if (hasCrashed) return Expectation.crash;
+ if (hasTimedOut) return Expectation.timeout;
+ if (hasNonUtf8) return Expectation.nonUtf8Error;
+
+ // The actual outcome depends on the exitCode.
+ if (exitCode == _compileErrorExitCode) return Expectation.compileTimeError;
+ if (exitCode == _uncaughtExceptionExitCode) return Expectation.runtimeError;
+ if (exitCode != 0) {
+ // This is a general fail, in case we get an unknown nonzero exitcode.
+ return Expectation.fail;
+ }
+ var testOutput = decodeUtf8(stdout);
+ if (_isAsyncTest(testOutput) && !_isAsyncTestSuccessful(testOutput)) {
+ return Expectation.fail;
+ }
+ return Expectation.pass;
+ }
}
class CompilationCommandOutput extends CommandOutput {
@@ -788,6 +702,33 @@
: super(command, exitCode, timedOut, stdout, stderr, time,
compilationSkipped, 0);
+ /// Cloned code from member result(), with changes.
+ /// Delete existing result() function and rename, when status files are gone.
+ /// This code can return Expectation.ignore - we may want to fix that.
+ Expectation realResult(TestCase testCase) {
+ // Handle general crash/timeout detection.
+ if (hasCrashed) return Expectation.crash;
+ if (hasTimedOut) {
+ var isWindows = io.Platform.operatingSystem == 'windows';
+ var isBrowserTestCase =
+ testCase.commands.any((command) => command is BrowserTestCommand);
+ // TODO(26060) Dart2js batch mode hangs on Windows under heavy load.
+ return (isWindows && isBrowserTestCase)
+ ? Expectation.ignore
+ : Expectation.timeout;
+ }
+ if (hasNonUtf8) return Expectation.nonUtf8Error;
+
+ // Handle dart2js specific crash detection
+ if (exitCode == _crashExitCode ||
+ exitCode == VMCommandOutput._compileErrorExitCode ||
+ exitCode == VMCommandOutput._uncaughtExceptionExitCode) {
+ return Expectation.crash;
+ }
+ if (exitCode != 0) return Expectation.compileTimeError;
+ return Expectation.pass;
+ }
+
Expectation result(TestCase testCase) {
// Handle general crash/timeout detection.
if (hasCrashed) return Expectation.crash;
@@ -862,6 +803,17 @@
exitCode == 0 ? Expectation.pass : Expectation.compileTimeError;
return _negateOutcomeIfNegativeTest(outcome, testCase.isNegative);
}
+
+ /// Cloned code from member result(), with changes.
+ /// Delete existing result() function and rename, when status files are gone.
+ /// This code can return Expectation.ignore - we may want to fix that.
+ Expectation realResult(TestCase testCase) {
+ if (hasCrashed) return Expectation.crash;
+ if (hasTimedOut) return Expectation.timeout;
+ if (hasNonUtf8) return Expectation.nonUtf8Error;
+ if (exitCode != 0) return Expectation.compileTimeError;
+ return Expectation.pass;
+ }
}
class VMKernelCompilationCommandOutput extends CompilationCommandOutput {
@@ -924,6 +876,41 @@
return _negateOutcomeIfNegativeTest(outcome, testCase.isNegative);
}
+ /// Cloned code from member result(), with changes.
+ /// Delete existing result() function and rename, when status files are gone.
+ /// This code can return Expectation.ignore - we may want to fix that.
+ Expectation realResult(TestCase testCase) {
+ // TODO(kustermann): Currently the batch mode runner (which can be found
+ // in `test_runner.dart:BatchRunnerProcess`) does not really distinguish
+ // between different kinds of failures and will mark a failed
+ // compilation to just an exit code of "1". So we treat all `exitCode ==
+ // 1`s as compile-time errors as well.
+ const int kBatchModeCompileTimeErrorExit = 1;
+
+ // Handle crashes and timeouts first.
+ if (hasCrashed) return Expectation.dartkCrash;
+ if (hasTimedOut) return Expectation.timeout;
+ if (hasNonUtf8) return Expectation.nonUtf8Error;
+
+ // If the frontend had an uncaught exception, then we'll consider this a
+ // crash.
+ if (exitCode == VMCommandOutput._uncaughtExceptionExitCode) {
+ return Expectation.dartkCrash;
+ }
+
+ // Multitests are handled specially.
+
+ if (exitCode == VMCommandOutput._compileErrorExitCode ||
+ exitCode == kBatchModeCompileTimeErrorExit) {
+ return Expectation.compileTimeError;
+ }
+ if (exitCode != 0) {
+ // This is a general fail, in case we get an unknown nonzero exitcode.
+ return Expectation.fail;
+ }
+ return Expectation.pass;
+ }
+
/// If the compiler was able to produce a Kernel IR file we want to run the
/// result on the Dart VM. We therefore mark the [VMKernelCompilationCommand]
/// as successful.
@@ -954,6 +941,23 @@
outcome = _negateOutcomeIfIncompleteAsyncTest(outcome, decodeUtf8(stdout));
return _negateOutcomeIfNegativeTest(outcome, testCase.isNegative);
}
+
+ /// Cloned code from member result(), with changes.
+ /// Delete existing result() function and rename, when status files are gone.
+ /// This code can return Expectation.ignore - we may want to fix that.
+ Expectation realResult(TestCase testCase) {
+ // Handle crashes and timeouts first.
+ if (hasCrashed) return Expectation.crash;
+ if (hasTimedOut) return Expectation.timeout;
+ if (hasNonUtf8) return Expectation.nonUtf8Error;
+
+ if (exitCode != 0) return Expectation.runtimeError;
+ var output = decodeUtf8(stdout);
+ if (_isAsyncTest(output) && !_isAsyncTestSuccessful(output)) {
+ return Expectation.fail;
+ }
+ return Expectation.pass;
+ }
}
class ScriptCommandOutput extends CommandOutput {
@@ -967,6 +971,7 @@
}
Expectation result(TestCase testCase) => _result;
+ Expectation realResult(TestCase testCase) => _result;
bool get canRunDependendCommands => _result == Expectation.pass;
@@ -976,13 +981,7 @@
CommandOutput createCommandOutput(Command command, int exitCode, bool timedOut,
List<int> stdout, List<int> stderr, Duration time, bool compilationSkipped,
[int pid = 0]) {
- if (command is ContentShellCommand) {
- return new ContentShellCommandOutput(
- command, exitCode, timedOut, stdout, stderr, time, compilationSkipped);
- } else if (command is BrowserTestCommand) {
- return new HtmlBrowserCommandOutput(
- command, exitCode, timedOut, stdout, stderr, time, compilationSkipped);
- } else if (command is AnalysisCommand) {
+ if (command is AnalysisCommand) {
return new AnalysisCommandOutput(
command, exitCode, timedOut, stdout, stderr, time, compilationSkipped);
} else if (command is SpecParseCommand) {
diff --git a/tools/testing/dart/configuration.dart b/tools/testing/dart/configuration.dart
index 07f4bf5..bc2996a 100644
--- a/tools/testing/dart/configuration.dart
+++ b/tools/testing/dart/configuration.dart
@@ -180,9 +180,7 @@
Compiler.fasta,
];
return fastaCompilers.contains(compiler) ||
- (compiler == Compiler.dart2js && !useDart2JSOldFrontend) ||
- (compiler == Compiler.dart2analyzer &&
- (builderTag == 'analyzer_use_fasta' || useAnalyzerCfe));
+ (compiler == Compiler.dart2js && !useDart2JSOldFrontend);
}
/// The base directory named for this configuration, like:
diff --git a/tools/testing/dart/html_test.dart b/tools/testing/dart/html_test.dart
deleted file mode 100644
index 5c80b01..0000000
--- a/tools/testing/dart/html_test.dart
+++ /dev/null
@@ -1,82 +0,0 @@
-// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-/**
- * Classes and methods for running HTML tests.
- *
- * HTML tests are valid HTML files whose names end in _htmltest.html, and that
- * contain annotations specifying the scripts in the test and the
- * messages the test should post to its window, in order to pass.
- */
-library html_test;
-
-import "dart:convert";
-import "dart:io";
-
-import "path.dart";
-import "test_suite.dart";
-import "utils.dart";
-
-RegExp htmlAnnotation =
- new RegExp("START_HTML_DART_TEST([\\s\\S]*?)END_HTML_DART_TEST");
-
-HtmlTestInformation getInformation(String filename) {
- if (!filename.endsWith("_htmltest.html")) {
- DebugLogger.warning("File $filename is not an HTML test."
- " Should end in _htmltest.html.");
- return null;
- }
-
- var contents = new File(filename).readAsStringSync();
- var match = htmlAnnotation.firstMatch(contents);
- if (match == null) return null;
-
- var annotation = jsonDecode(match[1]);
- if (annotation is! Map ||
- annotation['expectedMessages'] is! List ||
- annotation['scripts'] is! List) {
- DebugLogger.warning("File $filename does not have expected annotation."
- " Should have {'scripts':[...], 'expectedMessages':[...]}");
- return null;
- }
-
- return new HtmlTestInformation(
- new Path(filename),
- new List<String>.from(annotation['expectedMessages'] as List),
- new List<String>.from(annotation['scripts'] as List));
-}
-
-String getContents(HtmlTestInformation info, bool compileToJS) {
- String contents = new File(info.filePath.toNativePath()).readAsStringSync();
- contents = contents.replaceFirst(htmlAnnotation, '');
- if (compileToJS) {
- for (String script in info.scripts) {
- if (dartExtension.hasMatch(script)) {
- String jsScript = script.replaceFirst(dartExtension, '.js');
- String tag = '<script src="$script" type="application/dart">';
- String jsTag = '<script src="$jsScript">';
- contents = contents.replaceAll(tag, jsTag);
- }
- }
- }
- return contents;
-}
-
-String makeFailingHtmlFile(String message) {
- return '''
-<!DOCTYPE html>
-<html>
-<head>
- <script>window.parent.dispatchEvent(new Event('detect_errors'));</script>
- <title>Failing HTML test</title>
-</head><body>
- <h1>Failing HTML test</h1>
- $message
- <script>
- throw "HTML test failed: $message";
- </script>
-</body>
-</html>
-''';
-}
diff --git a/tools/testing/dart/http_server.dart b/tools/testing/dart/http_server.dart
index 34032e7..ea8f3c3 100644
--- a/tools/testing/dart/http_server.dart
+++ b/tools/testing/dart/http_server.dart
@@ -10,8 +10,8 @@
import 'configuration.dart';
import 'repository.dart';
-import 'vendored_pkg/args/args.dart';
import 'utils.dart';
+import 'vendored_pkg/args/args.dart';
class DispatchingServer {
HttpServer server;
@@ -156,8 +156,11 @@
}
String get network => _serverList[0].address.address;
+
int get port => _serverList[0].port;
+
int get crossOriginPort => _serverList[1].port;
+
DispatchingServer get server => _server;
/**
@@ -246,29 +249,33 @@
var response = request.response;
response.headers
.set("Cache-Control", "max-age=$_CACHE_EXPIRATION_IN_SECONDS");
- var path = _getFileUriFromRequestUri(request.uri);
- if (path != null) {
- var file = new File.fromUri(path);
- var directory = new Directory.fromUri(path);
- if (await file.exists()) {
- _sendFileContent(request, response, allowedPort, file);
- } else if (await directory.exists()) {
- _sendDirectoryListing(
- await _listDirectory(directory), request, response);
+ try {
+ var path = _getFileUriFromRequestUri(request.uri);
+ if (path != null) {
+ var file = new File.fromUri(path);
+ var directory = new Directory.fromUri(path);
+ if (await file.exists()) {
+ _sendFileContent(request, response, allowedPort, file);
+ } else if (await directory.exists()) {
+ _sendDirectoryListing(
+ await _listDirectory(directory), request, response);
+ } else {
+ _sendNotFound(request);
+ }
} else {
- _sendNotFound(request);
+ if (request.uri.path == '/') {
+ var entries = [
+ new _Entry('root_dart', 'root_dart/'),
+ new _Entry('root_build', 'root_build/'),
+ new _Entry('echo', 'echo')
+ ];
+ _sendDirectoryListing(entries, request, response);
+ } else {
+ _sendNotFound(request);
+ }
}
- } else {
- if (request.uri.path == '/') {
- var entries = [
- new _Entry('root_dart', 'root_dart/'),
- new _Entry('root_build', 'root_build/'),
- new _Entry('echo', 'echo')
- ];
- _sendDirectoryListing(entries, request, response);
- } else {
- _sendNotFound(request);
- }
+ } catch (e) {
+ _sendNotFound(request);
}
}
diff --git a/tools/testing/dart/options.dart b/tools/testing/dart/options.dart
index dca625a..ca6272d 100644
--- a/tools/testing/dart/options.dart
+++ b/tools/testing/dart/options.dart
@@ -113,18 +113,13 @@
dart_precompiled: Run a precompiled snapshot on the VM without a JIT.
d8: Run JavaScript from the command line using v8.
jsshell: Run JavaScript from the command line using Firefox js-shell.
-drt: Run Dart or JavaScript in the headless version of Chrome,
- Content shell.
-ContentShellOnAndroid: Run Dart or JavaScript in content shell on Android.
-
-ff:
+firefox:
chrome:
safari:
ie9:
ie10:
ie11:
-opera:
chromeOnAndroid: Run JavaScript in the specified browser.
self_check: Pass each test or its compiled output to every file under
@@ -238,7 +233,6 @@
new _Option.bool('time', 'Print timing information after running tests.'),
new _Option('dart', 'Path to dart executable.', hide: true),
new _Option('flutter', 'Path to flutter executable.', hide: true),
- new _Option('drt', 'Path to content shell executable.', hide: true),
new _Option('firefox', 'Path to firefox browser executable.', hide: true),
new _Option('chrome', 'Path to chrome browser executable.', hide: true),
new _Option('safari', 'Path to safari browser executable.', hide: true),
diff --git a/tools/testing/dart/runtime_configuration.dart b/tools/testing/dart/runtime_configuration.dart
index 5046ef3..c8c922785 100644
--- a/tools/testing/dart/runtime_configuration.dart
+++ b/tools/testing/dart/runtime_configuration.dart
@@ -200,25 +200,7 @@
}
}
-/// Runtime configuration for Content Shell. We previously used a similar
-/// program named Dump Render Tree, hence the name.
-class DrtRuntimeConfiguration extends DartVmRuntimeConfiguration {
- int timeoutMultiplier(
- {Mode mode,
- bool isChecked: false,
- bool isReload: false,
- Architecture arch}) {
- return 4 // Allow additional time for browser testing to run.
- // TODO(ahe): We might need to distinguish between DRT for running
- // JavaScript and Dart code. I'm not convinced the inherited timeout
- // multiplier is relevant for JavaScript.
- *
- super.timeoutMultiplier(
- mode: mode, isChecked: isChecked, isReload: isReload);
- }
-}
-
-/// The standalone Dart VM binary, "dart" or "dart.exe".
+//// The standalone Dart VM binary, "dart" or "dart.exe".
class StandaloneDartRuntimeConfiguration extends DartVmRuntimeConfiguration {
List<Command> computeRuntimeCommands(
TestSuite suite,
diff --git a/tools/testing/dart/test_runner.dart b/tools/testing/dart/test_runner.dart
index bde6205..0573c17 100644
--- a/tools/testing/dart/test_runner.dart
+++ b/tools/testing/dart/test_runner.dart
@@ -153,6 +153,24 @@
}
Expectation get result => lastCommandOutput.result(this);
+ Expectation get realResult => lastCommandOutput.realResult(this);
+ Expectation get realExpected {
+ if (isNegative || (isNegativeIfChecked && configuration.isChecked)) {
+ return Expectation.fail;
+ }
+ if (configuration.compiler == Compiler.specParser) {
+ if (hasSyntaxError) {
+ return Expectation.syntaxError;
+ }
+ } else if ((hasCompileError) ||
+ (hasCompileErrorIfChecked && configuration.isChecked)) {
+ return Expectation.compileTimeError;
+ }
+ if (configuration.runtime != Runtime.none && hasRuntimeError) {
+ return Expectation.runtimeError;
+ }
+ return Expectation.pass;
+ }
CommandOutput get lastCommandOutput {
if (commandOutputs.length == 0) {
@@ -1302,13 +1320,7 @@
completer.complete(new BrowserCommandOutput(browserCommand, output));
};
- BrowserTest browserTest;
- if (browserCommand is BrowserHtmlTestCommand) {
- browserTest = new HtmlTest(browserCommand.url, callback, timeout,
- browserCommand.expectedMessages);
- } else {
- browserTest = new BrowserTest(browserCommand.url, callback, timeout);
- }
+ var browserTest = new BrowserTest(browserCommand.url, callback, timeout);
_getBrowserTestRunner(browserCommand.configuration).then((testRunner) {
testRunner.enqueueTest(browserTest);
});
@@ -1360,14 +1372,6 @@
}
}
- // As long as we use a legacy version of our custom content_shell (which
- // became quite flaky after chrome-50 roll) we'll re-run tests on it.
- // The plan is to use chrome's content_shell instead of our own.
- // See http://dartbug.com/29655 .
- if (command is ContentShellCommand) {
- return true;
- }
-
if (io.Platform.operatingSystem == 'linux') {
decodeOutput();
// No matter which command we ran: If we get failures due to the
diff --git a/tools/testing/dart/test_suite.dart b/tools/testing/dart/test_suite.dart
index 81964b2..0d0cfa6 100644
--- a/tools/testing/dart/test_suite.dart
+++ b/tools/testing/dart/test_suite.dart
@@ -22,7 +22,6 @@
import 'compiler_configuration.dart';
import 'configuration.dart';
import 'expectation_set.dart';
-import 'html_test.dart' as html_test;
import 'http_server.dart';
import 'multitest.dart';
import 'path.dart';
@@ -33,7 +32,7 @@
import 'utils.dart';
RegExp multiHtmlTestGroupRegExp = new RegExp(r"\s*[^/]\s*group\('[^,']*");
-RegExp multiHtmlTestRegExp = new RegExp(r"useHtmlIndividualConfiguration()");
+RegExp multiHtmlTestRegExp = new RegExp(r"useHtmlIndividualConfiguration\(\)");
// Require at least one non-space character before '//[/#]'
RegExp multiTestRegExp = new RegExp(r"\S *"
r"//[#/] \w+:(.*)");
@@ -533,23 +532,6 @@
}
}
-class HtmlTestInformation extends TestInformation {
- List<String> expectedMessages;
- List<String> scripts;
-
- HtmlTestInformation(Path filePath, this.expectedMessages, this.scripts)
- : super(
- filePath,
- filePath,
- {'isMultitest': false, 'isMultiHtmlTest': false},
- false,
- false,
- false,
- false,
- false,
- false) {}
-}
-
/**
* A standard [TestSuite] implementation that searches for tests in a
* directory, and creates [TestCase]s that compile and/or run them.
@@ -648,8 +630,6 @@
return filename.endsWith("Test.dart");
}
- bool isHtmlTestFile(String filename) => filename.endsWith('_htmltest.html');
-
List<String> additionalOptions(Path filePath) => [];
Future forEachTest(
@@ -730,17 +710,6 @@
}
if (!match) return;
- if (isHtmlTestFile(filename)) {
- var info = html_test.getInformation(filename);
- if (info == null) {
- DebugLogger.error(
- "HtmlTest $filename does not contain required annotations");
- return;
- }
- cachedTests.add(info);
- enqueueTestCaseFromTestInformation(info);
- return;
- }
if (!isTestFile(filename)) return;
Path filePath = new Path(filename);
@@ -764,11 +733,6 @@
multitestName: info.optionsFromFile['isMultitest'] as bool
? info.multitestKey
: "");
- if (info is HtmlTestInformation) {
- _enqueueHtmlTest(info, testName);
- return;
- }
-
var optionsFromFile = info.optionsFromFile;
// If this test is inside a package, we will check if there is a
@@ -1062,7 +1026,7 @@
}
// Construct the command(s) that compile all the inputs needed by the
- // browser test. For running Dart in DRT, this will be noop commands.
+ // browser test.
var commands = <Command>[];
void addCompileCommand(String fileName, String toPath) {
@@ -1130,84 +1094,6 @@
enqueueNewTestCase(fullName, commands, expectations, info);
}
- void _enqueueHtmlTest(HtmlTestInformation info, String testName) {
- var compiler = configuration.compiler;
- var runtime = configuration.runtime;
-
- if (compiler == Compiler.dartdevc || compiler == Compiler.dartdevk) {
- // TODO(rnystrom): Support this for dartdevc (#29919).
- print("Ignoring $testName on ${compiler.name} since HTML tests are not "
- "implemented for that compiler yet.");
- return;
- }
-
- // HTML tests work only with the browser controller.
- if (!runtime.isBrowser) return;
-
- var compileToJS = compiler == Compiler.dart2js;
-
- var filePath = info.filePath;
- var tempDir = createOutputDirectory(filePath);
- var tempUri = new Uri.file('$tempDir/');
- var contents = html_test.getContents(info, compileToJS);
- var commands = <Command>[];
-
- void fail(String message) {
- var msg = "$message: ${info.filePath}";
- DebugLogger.warning(msg);
- contents = html_test.makeFailingHtmlFile(msg);
- }
-
- if (info.scripts.length > 0) {
- var testUri = new Uri.file(filePath.toNativePath());
- for (var scriptPath in info.scripts) {
- if (!scriptPath.endsWith('.dart') && !scriptPath.endsWith('.js')) {
- fail('HTML test scripts must be dart or javascript: $scriptPath');
- break;
- }
-
- var uri = Uri.parse(scriptPath);
- if (uri.isAbsolute) {
- fail('HTML test scripts must have relative paths: $scriptPath');
- break;
- }
-
- if (uri.pathSegments.length > 1) {
- fail('HTML test scripts must be in test directory: $scriptPath');
- break;
- }
-
- var script = testUri.resolveUri(uri);
- var copiedScript = tempUri.resolveUri(uri);
- if (compiler == Compiler.none || scriptPath.endsWith('.js')) {
- new File.fromUri(copiedScript)
- .writeAsStringSync(new File.fromUri(script).readAsStringSync());
- } else {
- var destination = copiedScript.toFilePath();
- if (compileToJS) {
- destination = destination.replaceFirst(dartExtension, '.js');
- }
-
- assert(compiler == Compiler.dart2js);
-
- commands.add(_dart2jsCompileCommand(
- script.toFilePath(), destination, tempDir, info.optionsFromFile));
- }
- }
- }
-
- var htmlFile = tempUri.resolve(filePath.filename);
- new File.fromUri(htmlFile).writeAsStringSync(contents);
-
- var htmlPath = _createUrlPathFromFile(new Path(htmlFile.toFilePath()));
- var fullHtmlPath = _uriForBrowserTest(htmlPath);
- commands.add(Command.browserHtmlTest(
- fullHtmlPath, configuration, info.expectedMessages,
- retry: !isNegative(info)));
- enqueueNewTestCase(
- testName, commands, testExpectations.expectations(testName), info);
- }
-
/// Creates a [Command] to compile a single .dart file using dart2js.
Command _dart2jsCompileCommand(String inputFile, String outputFile,
String dir, Map<String, dynamic> optionsFromFile) {
@@ -1245,17 +1131,6 @@
alwaysCompile: !useSdk);
}
- String get contentShellFilename {
- if (configuration.drtPath != null) return configuration.drtPath;
-
- if (Platform.operatingSystem == 'macos') {
- final path = dartDir.append(
- '/client/tests/drt/Content Shell.app/Contents/MacOS/Content Shell');
- return path.toNativePath();
- }
- return dartDir.append('client/tests/drt/content_shell').toNativePath();
- }
-
List<String> commonArgumentsFromFile(
Path filePath, Map<String, dynamic> optionsFromFile) {
var args = configuration.standardOptions.toList();
@@ -1345,41 +1220,17 @@
*
* // OtherScripts=file1.dart file2.dart
*
- * - You can indicate whether a test is treated as a web-only test by
- * using an explicit import to a part of the dart:html library:
+ * - Most tests are not web tests, but can (and will be) wrapped within
+ * an HTML file and another script file to test them also on browser
+ * environments (e.g. language and corelib tests are run this way).
+ * We deduce that if a file with the same name as the test, but ending in
+ * .html instead of .dart exists, the test was intended to be a web test
+ * and no wrapping is necessary.
*
- * import 'dart:html';
- * import 'dart:web_audio';
- * import 'dart:indexed_db';
- * import 'dart:svg';
- * import 'dart:web_sql';
- *
- * Most tests are not web tests, but can (and will be) wrapped within
- * another script file to test them also on browser environments (e.g.
- * language and corelib tests are run this way). We deduce that if this
- * import is specified, the test was intended to be a web test and no
- * wrapping is necessary.
- *
- * - You can convert DRT web-tests into layout-web-tests by specifying a
- * test expectation file. An expectation file is located in the same
- * location as the test, it has the same file name, except for the extension
- * (which can be either .txt or .png).
- *
- * When there are no expectation files, 'test.dart' assumes tests fail if
- * the process return a non-zero exit code (in the case of web tests, we
+ * - 'test.dart' assumes tests fail if
+ * the process returns a non-zero exit code (in the case of web tests, we
* check for PASS/FAIL indications in the test output).
*
- * When there is an expectation file, tests are run differently: the test
- * code is run to the end of the event loop and 'test.dart' takes a snapshot
- * of what is rendered in the page at that moment. This snapshot is
- * represented either in text form, if the expectation ends in .txt, or as
- * an image, if the expectation ends in .png. 'test.dart' will compare the
- * snapshot to the expectation file. When tests fail, 'test.dart' saves the
- * new snapshot into a file so it can be visualized or copied over.
- * Expectations can be recorded for the first time by creating an empty file
- * with the right name (touch test_name_test.png), running the test, and
- * executing the copy command printed by the test script.
- *
* This method is static as the map is cached and shared amongst
* configurations, so it may not use [configuration].
*/
@@ -1643,7 +1494,7 @@
}
}
-/// Used for testing packages in on off settings, i.e., we pass in the actual
+/// Used for testing packages in one-off settings, i.e., we pass in the actual
/// directory that we want to test.
class PKGTestSuite extends StandardTestSuite {
PKGTestSuite(TestConfiguration configuration, Path directoryPath)
diff --git a/utils/dartanalyzer/BUILD.gn b/utils/dartanalyzer/BUILD.gn
index e41c7f6..fe73122 100644
--- a/utils/dartanalyzer/BUILD.gn
+++ b/utils/dartanalyzer/BUILD.gn
@@ -8,7 +8,6 @@
group("dartanalyzer") {
deps = [
":generate_dartanalyzer_snapshot",
- ":generate_summary_spec",
":generate_summary_strong",
]
}
@@ -54,31 +53,17 @@
],
"list lines")
-template("generate_summary") {
- assert(defined(invoker.type), "Must specify the summary type")
- type = invoker.type
- assert(type == "spec" || type == "strong")
-
- prebuilt_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,
- ]
- args = [
- "build-$type",
- rebase_path(output),
- rebase_path("../../sdk"),
- ]
- }
-}
-
-generate_summary("generate_summary_spec") {
- type = "spec"
-}
-
-generate_summary("generate_summary_strong") {
- type = "strong"
+prebuilt_dart_action("generate_summary_strong") {
+ script = "../../pkg/analyzer/tool/summary/build_sdk_summaries.dart"
+ packages = "../../.packages"
+ inputs = sdk_lib_files + analyzer_files
+ output = "$root_gen_dir/strong.sum"
+ outputs = [
+ output,
+ ]
+ args = [
+ "build-strong",
+ rebase_path(output),
+ rebase_path("../../sdk"),
+ ]
}