Version 2.0.0-dev.33.0
Merge commit '235e62264e4ba8aa01108c023cfcdd91ac48190f' into dev
diff --git a/DEPS b/DEPS
index 07dc0fc..c546b2a 100644
--- a/DEPS
+++ b/DEPS
@@ -42,7 +42,7 @@
# Fuchsia. This revision should be kept up to date with the revision pulled
# by the Flutter engine. If there are problems with the toolchain, contact
# fuchsia-toolchain@.
- "buildtools_revision": "@de2d6da936fa0be8bcb0bacd096fe124efff2854",
+ "buildtools_revision": "@446d5b1019dcbe7835236dc85261e91cf29a9239",
# Scripts that make 'git cl format' work.
"clang_format_scripts_rev": "@c09c8deeac31f05bd801995c475e7c8070f9ecda",
@@ -51,7 +51,7 @@
# Revisions of /third_party/* dependencies.
"args_tag": "@0.13.7",
- "async_tag": "@2.0.4",
+ "async_tag": "@2.0.6",
"barback-0.13.0_rev": "@34853",
"barback-0.14.0_rev": "@36398",
"barback-0.14.1_rev": "@38525",
@@ -63,7 +63,7 @@
"charcode_tag": "@v1.1.1",
"chrome_rev" : "@19997",
"cli_util_tag" : "@0.1.2+1",
- "collection_tag": "@1.14.5",
+ "collection_tag": "@5943e1681204250f33a833eb5550f270357ad6c8",
"convert_tag": "@2.0.1",
"crypto_tag" : "@2.0.2+1",
"csslib_tag" : "@0.14.1",
@@ -117,7 +117,7 @@
"protobuf_tag": "@0.7.0",
"pub_rev": "@73ff0d3d9f80f60d41e3135ac44597d011abb4f3",
"pub_semver_tag": "@1.3.2",
- "quiver_tag": "@0.28.0",
+ "quiver_tag": "@5aaa3f58c48608af5b027444d561270b53f15dbf",
"resource_rev":"@af5a5bf65511943398146cf146e466e5f0b95cb9",
"root_certificates_rev": "@16ef64be64c7dfdff2b9f4b910726e635ccc519e",
"shelf_static_rev": "@3558aa35a0d2f0f35868c3fd64b258e140db0122",
diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
index 0c8bbea..d1c2c40 100644
--- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn
@@ -341,12 +341,14 @@
# define into the compile line.
if (is_clang && (is_linux || is_mac)) {
if (is_linux) {
- toolchain_stamp_file = "//buildtools/linux64/clang.stamp"
+ toolchain_stamp_file =
+ "//buildtools/linux-x64/clang/.versions/clang.cipd_version"
} else {
- toolchain_stamp_file = "//buildtools/mac/clang.stamp"
+ toolchain_stamp_file =
+ "//buildtools/mac-x64/clang/.versions/clang.cipd_version"
}
- toolchain_version = read_file(toolchain_stamp_file, "trim string")
- defines = [ "TOOLCHAIN_VERSION=$toolchain_version" ]
+ cipd_version = read_file(toolchain_stamp_file, "json")
+ defines = [ "TOOLCHAIN_VERSION=${cipd_version.instance_id}" ]
}
# Assign any flags set for the C compiler to asmflags so that they are sent
@@ -369,7 +371,7 @@
"-mstack-alignment=16",
"-mstackrealign",
]
- }
+ }
}
config("compiler_arm_fpu") {
diff --git a/build/toolchain/linux/BUILD.gn b/build/toolchain/linux/BUILD.gn
index 313deba..4692784 100644
--- a/build/toolchain/linux/BUILD.gn
+++ b/build/toolchain/linux/BUILD.gn
@@ -42,8 +42,7 @@
}
gcc_toolchain("clang_arm") {
- prefix = rebase_path("//buildtools/toolchain/clang+llvm-x86_64-linux/bin",
- root_build_dir)
+ prefix = rebase_path("//buildtools/linux-x64/clang/bin", root_build_dir)
cc = "${compiler_prefix}${prefix}/clang"
cxx = "${compiler_prefix}${prefix}/clang++"
diff --git a/docs/language/informal/subtyping.md b/docs/language/informal/subtyping.md
new file mode 100644
index 0000000..121a657
--- /dev/null
+++ b/docs/language/informal/subtyping.md
@@ -0,0 +1,446 @@
+# Dart 2.0 static and runtime subtyping
+
+leafp@google.com
+
+Status: Draft
+
+This is intended to define the core of the Dart 2.0 static and runtime subtyping
+relation.
+
+## Types
+
+The syntactic set of types used in this draft are a slight simplification of
+full Dart types.
+
+The meta-variables `X`, `Y`, and `Z` range over type variables.
+
+The meta-variables `T`, `S`, and `U` range over types.
+
+The meta-variable `C` ranges over classes.
+
+The meta-variable `B` ranges over types used as bounds for type variables.
+
+The set of types under consideration are as follows:
+
+- Type variables `X`
+- Promoted type variables `X & T` *Note: static only*
+- `Object`
+- `dynamic`
+- `void`
+- `Null`
+- `Function`
+- `Future<T>`
+- `FutureOr<T>`
+- Interface types `C`, `C<T0, ..., Tn>`
+- Function types
+ - `U Function<X0 extends B0, ...., Xl extends Bl>(T0 x0, ...., Tn xn, [Tn+1 xn+1, ..., Tm xm])`
+ - `U Function<X0 extends B0, ...., Xl extends Bl>(T0 x0, ...., Tn xn, {Tn+1 xn+1, ..., Tm xm})`
+
+We leave the set of interface types unspecified, but assume a class hierarchy
+which provides a mapping from interfaces types `T` to the set of direct
+super-interfaces of `T` induced by the superclass declaration, implemented
+interfaces, and mixins of the class of `T`. Among other well-formedness
+constraints, the edges induced by this mapping must form a directed acyclic
+graph rooted at `Object`.
+
+The types `Object`, `dynamic` and `void` are all referred to as *top* types, and
+are considered equivalent as types (including when they appear as sub-components
+of other types). They exist as distinct names only to support distinct errors
+and warnings (or absense thereof).
+
+The type `X & T` represents the result of a type promotion operation on a
+variable. In certain circumstances (defined elsewhere) a variable `x` of type
+`X` that is tested against the type `T` (e.g. `x is T`) will have its type
+replaced with the more specific type `X & T`, indicating that while it is known
+to have type `X`, it is also known to have the more specific type `T`. Promoted
+type variables only occur statically (never at runtime).
+
+Given the current promotion semantics the following properties are also true:
+ - If `X` has bound `B` then for any type `X & T`, `T <: B` will be true
+ - Promoted type variable types will only appear as top level types: that is,
+ they can never appear as sub-components of other types, in bounds, or as
+ part of other promoted type variables.
+
+## Notation
+
+We use `S[T0/Y0, ..., Tl/Yl]` for the result of performing a simultaneous
+capture-avoiding substitution of types `T0, ..., Tl` for the type variables `Y0,
+..., Yl` in the type `S`.
+
+## Type equality
+
+We say that a type `T0` is equal to another type `T1` (written `T0 === T1`) if
+the two types are structurally equal up to renaming of bound type variables,
+and equating all top types.
+
+TODO: make these rules explicit.
+
+## Algorithmic (Syntax Directed) Subtyping
+
+By convention the following rules are intended to be applied in top down order,
+with exactly one rule syntactically applying. That is, rules are written in the
+form:
+
+```
+Syntactic criteria.
+ - Additional condition 1
+ - Additional or alternative condition 2
+```
+
+and it is the case that if a subtyping query matches the syntactic criteria for
+a rule (but not the syntactic criteria for any rule preceeding it), then the
+subtyping query holds iff the listed additional conditions hold.
+
+The runtime subtyping rules can be derived by eliminating all clauses dealing
+with promoted type variables.
+
+### Rules
+
+We say that a type `T0` is a subtype of a type `T1` (written `T0 <: T1`) when:
+
+- **Reflexivity**: `T0` and `T1` are the same type.
+ - *Note that this check is necessary as the base case for primitive types, and
+ type variables but not for composite types. In particular, algorithmically
+ a structural equality check is admissible, but not required
+ here. Pragmatically, non-constant time identity checks here are
+ counter-productive*
+
+- **Right Top**: `T1` is a top type (i.e. `Object`, `dynamic`, or `void`).
+
+- **Left Bottom**: `T0` is `Null`
+
+- **Left FutureOr**: `T0` is `FutureOr<S0>`
+ - and `Future<S0> <: T1`
+ - and `S0 <: T1`
+
+- **Type Variable Reflexivity 1**: `T0` is a type variable `X0` or a
+promoted type variables `X0 & S0` and `T1` is `X0`.
+ - *Note that this rule is admissible, and can be safely elided if desired*
+
+- **Type Variable Reflexivity 2**: Promoted`T0` is a type variable `X0` or a
+promoted type variables `X0 & S0` and `T1` is `X0 & S1`
+ - and `T0 <: S1`.
+ - *Note that this rule is admissible, and can be safely elided if desired*
+
+- **Right Promoted Variable**: `T1` is a promoted type variable `X1 & S1`
+ - and `T0 <: X1`
+ - and `T0 <: S1`
+
+- **Right FutureOr**: `T1` is `FutureOr<S1>` and
+ - either `T0 <: Future<S1>`
+ - or `T0 <: S1`
+ - or `T0` is `X0` and `X0` has bound `S0` and `S0 <: T1`
+ - or `T0` is `X0 & S0` and `S0 <: T1`
+
+- **Left Promoted Variable**: `T0` is a promoted type variable `X0 & S0`
+ - and `S0 <: T1`
+
+- **Left Type Variable Bound**: `T0` is a type variable `X0` with bound `B0`
+ - and `B0 <: T1`
+
+- **Function Type/Function**: `T0` is a function type and `T1` is `Function`
+
+- **Interface Compositionality**: `T0` is an interface type `C0<S0, ..., Sn>`
+ and `T1` is `C0<U0, ..., Un>`
+ - and each `Si <: Ui`
+
+- **Super-Interface**: `T0` is an interface type with super-interfaces `S0,...Sn`
+ - and `Si <: T1` for some `i`
+
+- **Positional Function Types**: `T0` is `U0 Function<X0 extends B00, ..., Xk extends B0k>(T0 x0, ..., Tn xn, [Tn+1 xn+1, ..., Tm xm])`
+ - and `T1` is `U1 Function<Y0 extends B10, ..., Yk extends B1k>(S0 y0, ..., Sp yp, [Sp+1 yp+1, ..., Sq yq])`
+ - and `p >= n`
+ - and `m >= q`
+ - and `Si[Z0/Y0, ..., Zk/Yk] <: Ti[Z0/X0, ..., Zk/Xk]` for `i` in `0...q`
+ - and `U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk]`
+ - and `B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk]` for `i` in `0...k`
+ - where the `Zi` are fresh type variables with bounds `B0i[Z0/X0, ..., Zk/Xk]`
+
+- **Named Function Types**: `T0` is `U0 Function<X0 extends B00, ..., Xk extends B0k>(T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm})`
+ - and `T1` is `U1 Function<Y0 extends B10, ..., Yk extends B1k>(S0 y0, ..., Sn yn, {Sn+1 yn+1, ..., Sq yq})`
+ - and `{yn+1, ... , yq}` subsetof `{xn+1, ... , xm}`
+ - and `Si[Z0/Y0, ..., Zk/Yk] <: Ti[Z0/X0, ..., Zk/Xk]` for `i` in `0...n`
+ - and `Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk]` for `i` in `n+1...q`, `yj = xi`
+ - and `U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk]`
+ - and `B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk]` for `i` in `0...k`
+ - where the `Zi` are fresh type variables with bounds `B0i[Z0/X0, ..., Zk/Xk]`
+
+*Note: the requirement that `Zi` are fresh is as usual strictly a requirement
+that the choice of common variable names avoid capture. It is valid to choose
+the `Xi` or the `Yi` for `Zi` so long as capture is avoided*
+
+## Derivation of syntax directed rules
+
+This section sketches out the derivation of the syntax directed rules from the
+interpretation of `FutureOr` and promoted type bounds as intersection types.
+
+### Non syntax directed rules
+
+The non syntax directed rules that we derive from first principles of union and
+intersection types are as follows:
+
+Left union introduction:
+ - `FutureOr<S> <: T` if `Future<S> <: T` and `S <: T`
+
+Right union introduction:
+ - `S <: FutureOr<T>` if `S <: Future<T>` or `S <: T`
+
+Left intersection introduction:
+ - `X & S <: T` if `X <: T` or `S <: T`
+
+Right intersection introduction:
+ - `S <: X & T` if `S <: X` and `S <: T`
+
+The only remaining non-syntax directed rule is the variable bounds rule:
+
+Variable bounds:
+ - `X <: T` if `X extends B` and `B <: T`
+
+All other rules are syntax directed.
+
+Note: I believe that bounds can be treated simply as uses of intersections,
+which could simplify this presentation.
+
+### Preliminaries
+
+**Lemma 1**: If there is any derivation of `FutureOr<S> <: T`, then there is a
+derivation ending in a use of left union introduction.
+
+Proof. By induction on derivations. Consider a derivation of `FutureOr<S> <:
+T`.
+
+If the last rule applied is:
+ - Top type rules are trivial.
+
+ - Null, Function and interface rules can't apply.
+
+ - Left union introduction rule is immediate.
+
+ - Right union introduction. Then `T` is of the form `FutureOr<T0>`, and either
+ - we have a sub-derivation of `FutureOr<S> <: Future<T0>`
+ - by induction we therefore have a derivation ending in left union
+ introduction, so by inversion we have:
+ - a derivation of `Future<S> <: Future<T0> `, and so by right union
+ introduction we have `Future<S> <: FutureOr<T0>`
+ - a derivation of `S <: Future<T0> `, and so by right union
+ introduction we have `S <: FutureOr<T0>`
+ - by left union introduction, we have `FutureOr<S> <: FutureOr<T0>`
+ - QED
+ - we have a sub-derivation of `FutureOr<S> <: T0`
+ - by induction we therefore have a derivation ending in left union
+ introduction, so by inversion we have:
+ - a derivation of `Future<S> <: T0 `, and so by right union
+ introduction we have `Future<S> <: FutureOr<T0>`
+ - a derivation of `S <: T0 `, and so by right union
+ introduction we have `S <: FutureOr<T0>`
+ - by left union introduction, we have `FutureOr<S> <: FutureOr<T0>`
+ - QED
+
+ - Right intersection introduction. Then `T` is of the form `X & T0`, and
+ - we have sub-derivations `FutureOr<S> <: X` and `FutureOr<S> <: T0`
+ - By induction, we can get derivations of the above ending in left union
+ introduction, so by inversion we have derivations of:
+ - `Future<S> <: X`, `S <: X`, `Future<S> <: T0`, `S <: T0`
+ - so we have derivations of `S <: X`, `S <: T0`, so by right
+ intersection introduction we have
+ - `S <: X & T0`
+ - so we have derivations of `Future<S> <: X`, `Future<S> <: T0`, so by right
+ intersection introduction we have
+ - `Future<S> <: X & T0`
+ - so by left union introduction, we have a derivation of `FutureOr<S> <: X & T0`
+ - QED
+
+
+Note: The reverse is not true. Counter-example:
+
+Given arbitrary `B <: A`, suppose we wish to show that `(X extends FutureOr<B>)
+<: FutureOr<A>`. If we apply right union introduction first, we must show
+either:
+ - `X <: Future<A>`
+ - only variable bounds rule applies, so we must show
+ - `FutureOr<B> <: Future<A>`
+ - Only left union introduction applies, so we must show both of:
+ - `Future<B> <: Future<A>` (yes)
+ - `B <: Future<A>` (no)
+ - `X <: A`
+ - only variable bounds rule applies, so we must show that
+ - `FutureOr<B> <: A`
+ - Only left union introduction applies, so we must show both of:
+ - `Future<B> <: Future<A>` (no)
+ - `B <: Future<A>` (yes)
+
+On the other hand, the derivation via first applying the variable bounds rule is
+trivial.
+
+Note though that we can also not simply always apply the variable bounds rule
+first. Counter-example:
+
+Given `X extends Object`, it is trivial to derive `X <: FutureOr<X>` via the
+right union introduction rule. But applying the variable bounds rule doesn't
+work.
+
+
+**Lemma 2**: If there is any derivation of `S <: X & T`, then there is
+derivation ending in a use of right intersection introduction.
+
+Proof. By induction on derivations. Consider a derivation D of `S <: X & T`.
+
+If last rule applied in D is:
+ - Bottom types are trivial.
+
+ - Function and interface type rules can't apply.
+
+ - Right intersection introduction then we're done.
+
+ - Left intersection introduction. Then `S` is of the form `Y & S0`, and either
+ - we have a sub-derivation of `Y <: X & T`
+ - by induction we therefore have a derivation ending in right intersection
+ introduction, so by inversion we have:
+ - a derivation of `Y <: X `, and so by left intersection
+ introduction we have `Y & S0 <: X`
+ - a derivation of `Y <: T `, and so by left intersection
+ introduction we have `Y & S0 <: T`
+ - by right intersection introduction, we have `Y & S0 <: X & T`
+ - QED
+ - we have a sub-derivation of `S0 <: X & T`
+ - by induction we therefore have a derivation ending in right intersection
+ introduction, so by inversion we have:
+ - a derivation of `S0 <: X `, and so by left intersection
+ introduction we have `Y & S0 <: X`
+ - a derivation of `S0 <: T `, and so by left intersection
+ introduction we have `Y & S0 <: T`
+ - by right intersection introduction, we have `Y & S0 <: X & T`
+ - QED
+
+ - Left union introduction. Then `S` is of the form `FutureOr<S0>`, and
+ - we have sub-derivations `Future<S0> <: X & T` and `S0 <: X & T`
+ - By induction, we can get derivations of the above ending in right intersection
+ introduction, so by inversion we have derivations of:
+ - `Future<S0> <: X`, `S0 <: X`, `Future<S0> <: T`, `S0 <: T`
+ - so we have derivations of `S0 <: X`, `Future<S0> <: X`, so by left
+ union introduction we have
+ - `FutureOr<S0> <: X`
+ - so we have derivations of `S0 <: T`, `Future<S0> <: T`, so by left
+ union introduction we have
+ - `FutureOr<S0> <: T`
+ - so by right intersection introduction, we have a derivation of `FutureOr<S0> <: X & T`
+ - QED
+
+
+**Conjecture 1**: `FutureOr<A> <: FutureOr<B>` is derivable iff `A <: B` is
+derivable.
+
+pf: Showing that `A <: B => FutureOr<A> <: FutureOr<B>` is easy, it's not
+immediately clear to me how to tackle the opposite direction.
+
+
+**Lemma 3**: Transitivity of subtyping is admissible. Given derivations of `A <: B`
+and `B <: C`, there is a derivation of `A <: C`.
+
+proof sketch: The proof should go through by induction on sizes of derivations,
+cases on pairs of rules used. For any pair of rules used, we can construct a
+new derivation of the desired result using only smaller derivations.
+
+**Observation 1**: Given `X` with bound `S`, we have the property that for all
+instances of `X & T`, `T <: S` will be true, and hence `S <: M => T <: M`.
+
+### Syntax directed rules
+
+Consider `T0 <: T1`.
+
+#### Union on the left
+By lemma 1, if `T0` is of the form `FutureOr<S0>` and there is any derivation of
+`T0 <: T1`, then there is a derivation ending with a use of left union
+introduction so we have the rule:
+
+- `T0` is `FutureOr<S0>`
+ - and `Future<S0> <: T1`
+ - and `S0 <: T1`
+
+#### Identical type variables
+
+If `T0` and `T1` are both the same unpromoted type variable, then subtyping
+holds by reflexivity. If `T0` is a promoted type variable `X0 & S0`, and `T0`
+is `X0` then it suffices to show that `X0 <: X0` or `S0 <: X0`, and the former
+holds immediately. This justifies the rule:
+
+- `T0` is a type variable `X0` or a promoted type variables `X0 & S0` and `T1`
+is `X0`.
+
+If `T0` is `X0` or `X0 & S0` and `T1` is `X0 & S1`, then by lemma 1 it suffices
+to show that `X0 & S0 <: X0` and `X0 & S0 <: S1`. The first holds immediately
+by reflexivity on the type variable, so it is sufficient to check `T0 <: S1`.
+
+- `T0` is a type variable `X0` or a promoted type variables `X0 & S0` and `T1`
+is `X0 & S1`
+ - and `T0 <: S1`.
+
+*Note that neither of the previous rules are required to make the rules syntax
+directed: they are merely useful special cases of the next rule.*
+
+#### Intersection on the right
+By lemma 2, if `T1` is of the `X1 & S1` and there is any derivation of `T0 <:
+T1`, then there is a derivation ending with a use of right intersection
+introduction, hence the rule:
+
+- `T1` is a promoted type variable `X1 & S1`
+ - and `T0 <: X1`
+ - and `T0 <: S1`
+
+#### Union on the right
+Suppose `T1` is `FutureOr<S1>`. The rules above have eliminated the possibility
+that `T0` is of the form `FutureOr<S0`. The only rules that could possibly
+apply then are right union introduction, left intersection introduction, or the
+variable bounds rules. Combining these yields the following preliminary
+disjunctive rule:
+
+- `T1` is `FutureOr<S1>` and
+ - either `T0 <: Future<S1>`
+ - or `T0 <: S1`
+ - or `T0` is `X0` and `X0` has bound `S0` and `S0 <: T1`
+ - or `T0` is `X0 & S0` and `X0 <: T1` and `S0 <: T1`
+
+The last disjunctive clause can be further simplified to
+ - or `T0` is `X0 & S0` and `S0 <: T1`
+
+since the premise `X0 <: FutureOr<S1>` can only derived either using the
+variable bounds rule or right union introduction. For the variable bounds rule,
+the premise `B0 <: T1` is redundant with `S0 <: T1` by observation 1. For right
+union introduction, `X0 <: S1` is redundant with `T0 <: S1`, since if `X0 <: S1`
+is derivable, then `T0 <: S1` is derivable by left union introduction; and `X0
+<: Future<S1>` is redundant with `T0 <: Future<S1>`, since if the former is
+derivable, then the latter is also derivable by left intersection introduction.
+So we have the final rule:
+
+- `T1` is `FutureOr<S1>` and
+ - either `T0 <: Future<S1>`
+ - or `T0 <: S1`
+ - or `T0` is `X0` and `X0` has bound `S0` and `S0 <: T1`
+ - or `T0` is `X0 & S0` and `S0 <: T1`
+
+#### Intersection on the left
+Suppose `T0` is `X0 & S0`. We've eliminated the possibility that `T1` is
+`FutureOr<S1>`, the possibility that `T1` is `X1 & S1`, and the possibility that
+`T1` is any variant of `X0`. The only remaining rule that applies is left
+intersection introduction, and so it suffices to check that `X0 <: T1` and `S0
+<: T1`. But given the remaining possible forms for `T1`, the only rule that can
+apply to `X0 <: T1` is the variable bounds rule, which by observation 1 is
+redundant with the second premise, and so we have the rule:
+
+`T0` is a promoted type variable `X0 & S0`
+ - and `S0 <: T1`
+
+#### Type variable on the left
+Suppose `T0` is `X0`. We've eliminated the possibility that `T1` is
+`FutureOr<S1>`, the possibility that `T1` is `X1 & S1`, and the possibility that
+`T1` is any variant of `X0`. The only rule that applies is the variable bounds
+rule:
+
+`T0` is a type variable `X0` with bound `B0`
+ - and `B0 <: T1`
+
+This eliminates all of the non-syntax directed rules: the remainder are strictly
+syntax directed.
+
+
+## Testing
diff --git a/pkg/analysis_server/lib/plugin/protocol/protocol_dart.dart b/pkg/analysis_server/lib/plugin/protocol/protocol_dart.dart
index 2ad30a4..8ef13df 100644
--- a/pkg/analysis_server/lib/plugin/protocol/protocol_dart.dart
+++ b/pkg/analysis_server/lib/plugin/protocol/protocol_dart.dart
@@ -25,7 +25,7 @@
name,
Element.makeFlags(
isPrivate: element.isPrivate,
- isDeprecated: element.isDeprecated,
+ isDeprecated: element.hasDeprecated,
isAbstract: _isAbstract(element),
isConst: _isConst(element),
isFinal: _isFinal(element),
@@ -145,17 +145,15 @@
sb.write(', ');
}
if (closeOptionalString.isEmpty) {
- engine.ParameterKind kind = parameter.parameterKind;
- if (kind == engine.ParameterKind.NAMED) {
+ if (parameter.isNamed) {
sb.write('{');
closeOptionalString = '}';
- }
- if (kind == engine.ParameterKind.POSITIONAL) {
+ } else if (parameter.isOptionalPositional) {
sb.write('[');
closeOptionalString = ']';
}
}
- if (parameter.isRequired) {
+ if (parameter.hasRequired) {
sb.write('@required ');
}
parameter.appendToWithoutDelimiters(sb);
@@ -224,11 +222,7 @@
// Sort @required named parameters before optional ones.
int _preferRequiredParams(
engine.ParameterElement e1, engine.ParameterElement e2) {
- int rank1 = e1.isRequired
- ? 0
- : e1.parameterKind != engine.ParameterKind.NAMED ? -1 : 1;
- int rank2 = e2.isRequired
- ? 0
- : e2.parameterKind != engine.ParameterKind.NAMED ? -1 : 1;
+ int rank1 = e1.hasRequired ? 0 : !e1.isNamed ? -1 : 1;
+ int rank2 = e2.hasRequired ? 0 : !e2.isNamed ? -1 : 1;
return rank1 - rank2;
}
diff --git a/pkg/analysis_server/lib/protocol/protocol_constants.dart b/pkg/analysis_server/lib/protocol/protocol_constants.dart
index cf044e0..02de8b5 100644
--- a/pkg/analysis_server/lib/protocol/protocol_constants.dart
+++ b/pkg/analysis_server/lib/protocol/protocol_constants.dart
@@ -208,8 +208,8 @@
const String EXECUTION_RESPONSE_MAP_URI_URI = 'uri';
const String FLUTTER_NOTIFICATION_OUTLINE = 'flutter.outline';
const String FLUTTER_NOTIFICATION_OUTLINE_FILE = 'file';
-const String FLUTTER_NOTIFICATION_OUTLINE_INSTRUMENTATION_EDITS =
- 'instrumentationEdits';
+const String FLUTTER_NOTIFICATION_OUTLINE_INSTRUMENTED_CODE =
+ 'instrumentedCode';
const String FLUTTER_NOTIFICATION_OUTLINE_OUTLINE = 'outline';
const String FLUTTER_REQUEST_SET_SUBSCRIPTIONS = 'flutter.setSubscriptions';
const String FLUTTER_REQUEST_SET_SUBSCRIPTIONS_SUBSCRIPTIONS = 'subscriptions';
diff --git a/pkg/analysis_server/lib/protocol/protocol_generated.dart b/pkg/analysis_server/lib/protocol/protocol_generated.dart
index 78949dd..07bc629 100644
--- a/pkg/analysis_server/lib/protocol/protocol_generated.dart
+++ b/pkg/analysis_server/lib/protocol/protocol_generated.dart
@@ -11734,7 +11734,7 @@
* {
* "file": FilePath
* "outline": FlutterOutline
- * "instrumentationEdits": List<SourceEdit>
+ * "instrumentedCode": optional String
* }
*
* Clients may not extend, implement or mix-in this class.
@@ -11744,7 +11744,7 @@
FlutterOutline _outline;
- List<SourceEdit> _instrumentationEdits;
+ String _instrumentedCode;
/**
* The file with which the outline is associated.
@@ -11773,27 +11773,28 @@
}
/**
- * If the file has Flutter widgets that can be rendered, the list of edits
- * that should be applied to the file to instrument widgets and associate
- * them with outline nodes.
+ * If the file has Flutter widgets that can be rendered, this field has the
+ * instrumented content of the file, that allows associating widgets with
+ * corresponding outline nodes. If there are no widgets to render, this field
+ * is absent.
*/
- List<SourceEdit> get instrumentationEdits => _instrumentationEdits;
+ String get instrumentedCode => _instrumentedCode;
/**
- * If the file has Flutter widgets that can be rendered, the list of edits
- * that should be applied to the file to instrument widgets and associate
- * them with outline nodes.
+ * If the file has Flutter widgets that can be rendered, this field has the
+ * instrumented content of the file, that allows associating widgets with
+ * corresponding outline nodes. If there are no widgets to render, this field
+ * is absent.
*/
- void set instrumentationEdits(List<SourceEdit> value) {
- assert(value != null);
- this._instrumentationEdits = value;
+ void set instrumentedCode(String value) {
+ this._instrumentedCode = value;
}
FlutterOutlineParams(String file, FlutterOutline outline,
- List<SourceEdit> instrumentationEdits) {
+ {String instrumentedCode}) {
this.file = file;
this.outline = outline;
- this.instrumentationEdits = instrumentationEdits;
+ this.instrumentedCode = instrumentedCode;
}
factory FlutterOutlineParams.fromJson(
@@ -11815,17 +11816,13 @@
} else {
throw jsonDecoder.mismatch(jsonPath, "outline");
}
- List<SourceEdit> instrumentationEdits;
- if (json.containsKey("instrumentationEdits")) {
- instrumentationEdits = jsonDecoder.decodeList(
- jsonPath + ".instrumentationEdits",
- json["instrumentationEdits"],
- (String jsonPath, Object json) =>
- new SourceEdit.fromJson(jsonDecoder, jsonPath, json));
- } else {
- throw jsonDecoder.mismatch(jsonPath, "instrumentationEdits");
+ String instrumentedCode;
+ if (json.containsKey("instrumentedCode")) {
+ instrumentedCode = jsonDecoder.decodeString(
+ jsonPath + ".instrumentedCode", json["instrumentedCode"]);
}
- return new FlutterOutlineParams(file, outline, instrumentationEdits);
+ return new FlutterOutlineParams(file, outline,
+ instrumentedCode: instrumentedCode);
} else {
throw jsonDecoder.mismatch(jsonPath, "flutter.outline params", json);
}
@@ -11841,8 +11838,9 @@
Map<String, dynamic> result = {};
result["file"] = file;
result["outline"] = outline.toJson();
- result["instrumentationEdits"] =
- instrumentationEdits.map((SourceEdit value) => value.toJson()).toList();
+ if (instrumentedCode != null) {
+ result["instrumentedCode"] = instrumentedCode;
+ }
return result;
}
@@ -11858,8 +11856,7 @@
if (other is FlutterOutlineParams) {
return file == other.file &&
outline == other.outline &&
- listEqual(instrumentationEdits, other.instrumentationEdits,
- (SourceEdit a, SourceEdit b) => a == b);
+ instrumentedCode == other.instrumentedCode;
}
return false;
}
@@ -11869,7 +11866,7 @@
int hash = 0;
hash = JenkinsSmiHash.combine(hash, file.hashCode);
hash = JenkinsSmiHash.combine(hash, outline.hashCode);
- hash = JenkinsSmiHash.combine(hash, instrumentationEdits.hashCode);
+ hash = JenkinsSmiHash.combine(hash, instrumentedCode.hashCode);
return JenkinsSmiHash.finish(hash);
}
}
diff --git a/pkg/analysis_server/lib/src/computer/computer_hover.dart b/pkg/analysis_server/lib/src/computer/computer_hover.dart
index 96b07f5..271e6d2 100644
--- a/pkg/analysis_server/lib/src/computer/computer_hover.dart
+++ b/pkg/analysis_server/lib/src/computer/computer_hover.dart
@@ -54,7 +54,7 @@
// description
hover.elementDescription = element.toString();
hover.elementKind = element.kind.displayName;
- hover.isDeprecated = element.isDeprecated;
+ hover.isDeprecated = element.hasDeprecated;
// not local element
if (element.enclosingElement is! ExecutableElement) {
// containing class
diff --git a/pkg/analysis_server/lib/src/computer/computer_outline.dart b/pkg/analysis_server/lib/src/computer/computer_outline.dart
index 23c0983..0f5bac1 100644
--- a/pkg/analysis_server/lib/src/computer/computer_outline.dart
+++ b/pkg/analysis_server/lib/src/computer/computer_outline.dart
@@ -377,7 +377,7 @@
*/
static bool _isDeprecated(Declaration declaration) {
engine.Element element = declaration.element;
- return element != null && element.isDeprecated;
+ return element != null && element.hasDeprecated;
}
static String _safeToSource(AstNode node) =>
diff --git a/pkg/analysis_server/lib/src/context_manager.dart b/pkg/analysis_server/lib/src/context_manager.dart
index 1b6b3a6..d6c3d91 100644
--- a/pkg/analysis_server/lib/src/context_manager.dart
+++ b/pkg/analysis_server/lib/src/context_manager.dart
@@ -1433,8 +1433,7 @@
// had a chance to process the event, resource might be a Folder. In
// that case don't add it.
if (resource is File) {
- File file = resource;
- if (_shouldFileBeAnalyzed(file)) {
+ if (_shouldFileBeAnalyzed(resource)) {
info.analysisDriver.addFile(path);
}
}
@@ -1475,10 +1474,15 @@
callbacks.applyFileRemoved(info.analysisDriver, path);
break;
case ChangeType.MODIFY:
- for (AnalysisDriver driver in driverMap.values) {
- driver.changeFile(path);
+ Resource resource = resourceProvider.getResource(path);
+ if (resource is File) {
+ if (_shouldFileBeAnalyzed(resource)) {
+ for (AnalysisDriver driver in driverMap.values) {
+ driver.changeFile(path);
+ }
+ break;
+ }
}
- break;
}
_checkForPackagespecUpdate(path, info, info.folder);
_checkForAnalysisOptionsUpdate(path, info, type);
diff --git a/pkg/analysis_server/lib/src/flutter/flutter_notifications.dart b/pkg/analysis_server/lib/src/flutter/flutter_notifications.dart
index bf407e1..f526036 100644
--- a/pkg/analysis_server/lib/src/flutter/flutter_notifications.dart
+++ b/pkg/analysis_server/lib/src/flutter/flutter_notifications.dart
@@ -15,7 +15,7 @@
new FlutterOutlineComputer(file, content, lineInfo, dartUnit);
protocol.FlutterOutline outline = computer.compute();
// send notification
- var params = new protocol.FlutterOutlineParams(file, outline, []);
+ var params = new protocol.FlutterOutlineParams(file, outline);
server.sendNotification(params.toNotification());
});
}
diff --git a/pkg/analysis_server/lib/src/services/completion/dart/arglist_contributor.dart b/pkg/analysis_server/lib/src/services/completion/dart/arglist_contributor.dart
index 0208901..e37be19 100644
--- a/pkg/analysis_server/lib/src/services/completion/dart/arglist_contributor.dart
+++ b/pkg/analysis_server/lib/src/services/completion/dart/arglist_contributor.dart
@@ -13,7 +13,6 @@
import 'package:analyzer/dart/ast/ast.dart';
import 'package:analyzer/dart/ast/token.dart';
import 'package:analyzer/dart/element/element.dart';
-import 'package:analyzer/src/generated/utilities_dart.dart';
/**
* Determine the number of arguments.
@@ -219,7 +218,7 @@
bool appendColon = !_isInNamedExpression(request);
Iterable<String> namedArgs = _namedArgs(request);
for (ParameterElement parameter in parameters) {
- if (parameter.parameterKind == ParameterKind.NAMED) {
+ if (parameter.isNamed) {
_addNamedParameterSuggestion(
namedArgs, parameter, appendColon, appendComma);
}
@@ -253,7 +252,7 @@
completion += ',';
}
- final int relevance = parameter.isRequired
+ final int relevance = parameter.hasRequired
? DART_RELEVANCE_NAMED_PARAMETER_REQUIRED
: DART_RELEVANCE_NAMED_PARAMETER;
@@ -280,8 +279,8 @@
if (parameters == null || parameters.length == 0) {
return;
}
- Iterable<ParameterElement> requiredParam = parameters.where(
- (ParameterElement p) => p.parameterKind == ParameterKind.REQUIRED);
+ Iterable<ParameterElement> requiredParam =
+ parameters.where((ParameterElement p) => p.isNotOptional);
int requiredCount = requiredParam.length;
// TODO (jwren) _isAppendingToArgList can be split into two cases (with and
// without preceded), then _isAppendingToArgList,
diff --git a/pkg/analysis_server/lib/src/services/completion/dart/local_reference_contributor.dart b/pkg/analysis_server/lib/src/services/completion/dart/local_reference_contributor.dart
index 3ae0120..0205b18 100644
--- a/pkg/analysis_server/lib/src/services/completion/dart/local_reference_contributor.dart
+++ b/pkg/analysis_server/lib/src/services/completion/dart/local_reference_contributor.dart
@@ -17,7 +17,6 @@
import 'package:analyzer/dart/ast/token.dart';
import 'package:analyzer/dart/element/element.dart';
import 'package:analyzer/dart/element/type.dart';
-import 'package:analyzer/src/generated/utilities_dart.dart' show ParameterKind;
import 'package:analyzer_plugin/protocol/protocol_common.dart' as protocol
show Element, ElementKind;
import 'package:analyzer_plugin/src/utilities/completion/optype.dart';
@@ -468,12 +467,12 @@
}).toList();
Iterable<ParameterElement> requiredParameters = paramList
- .where((FormalParameter param) => param.kind == ParameterKind.REQUIRED)
+ .where((FormalParameter param) => param.isRequired)
.map((p) => p.element);
suggestion.requiredParameterCount = requiredParameters.length;
Iterable<ParameterElement> namedParameters = paramList
- .where((FormalParameter param) => param.kind == ParameterKind.NAMED)
+ .where((FormalParameter param) => param.isNamed)
.map((p) => p.element);
suggestion.hasNamedParameters = namedParameters.isNotEmpty;
diff --git a/pkg/analysis_server/lib/src/services/completion/dart/override_contributor.dart b/pkg/analysis_server/lib/src/services/completion/dart/override_contributor.dart
index d0bc0b2..3f9c444 100644
--- a/pkg/analysis_server/lib/src/services/completion/dart/override_contributor.dart
+++ b/pkg/analysis_server/lib/src/services/completion/dart/override_contributor.dart
@@ -110,7 +110,7 @@
completion,
selectionRange.offset - offsetDelta,
selectionRange.length,
- element.isDeprecated,
+ element.hasDeprecated,
false,
displayText: displayText);
suggestion.element = protocol.convertElement(element);
diff --git a/pkg/analysis_server/lib/src/services/completion/dart/suggestion_builder.dart b/pkg/analysis_server/lib/src/services/completion/dart/suggestion_builder.dart
index 9ebcf46..23248e4 100644
--- a/pkg/analysis_server/lib/src/services/completion/dart/suggestion_builder.dart
+++ b/pkg/analysis_server/lib/src/services/completion/dart/suggestion_builder.dart
@@ -12,7 +12,6 @@
import 'package:analyzer/dart/element/type.dart';
import 'package:analyzer/dart/element/visitor.dart';
import 'package:analyzer/src/generated/source.dart';
-import 'package:analyzer/src/generated/utilities_dart.dart';
import 'package:path/path.dart' as path;
const String DYNAMIC = 'dynamic';
@@ -38,7 +37,7 @@
if (completion == null) {
completion = element.displayName;
}
- bool isDeprecated = element.isDeprecated;
+ bool isDeprecated = element.hasDeprecated;
CompletionSuggestion suggestion = new CompletionSuggestion(
kind,
isDeprecated ? DART_RELEVANCE_LOW : relevance,
@@ -70,13 +69,12 @@
return paramType != null ? paramType.displayName : 'var';
}).toList();
- Iterable<ParameterElement> requiredParameters = element.parameters.where(
- (ParameterElement param) =>
- param.parameterKind == ParameterKind.REQUIRED);
+ Iterable<ParameterElement> requiredParameters = element.parameters
+ .where((ParameterElement param) => param.isNotOptional);
suggestion.requiredParameterCount = requiredParameters.length;
- Iterable<ParameterElement> namedParameters = element.parameters.where(
- (ParameterElement param) => param.parameterKind == ParameterKind.NAMED);
+ Iterable<ParameterElement> namedParameters =
+ element.parameters.where((ParameterElement param) => param.isNamed);
suggestion.hasNamedParameters = namedParameters.isNotEmpty;
addDefaultArgDetails(
diff --git a/pkg/analysis_server/lib/src/services/completion/dart/utilities.dart b/pkg/analysis_server/lib/src/services/completion/dart/utilities.dart
index baf199e..cfd7cf4 100644
--- a/pkg/analysis_server/lib/src/services/completion/dart/utilities.dart
+++ b/pkg/analysis_server/lib/src/services/completion/dart/utilities.dart
@@ -55,7 +55,7 @@
}
for (ParameterElement param in namedParams) {
- if (param.isRequired) {
+ if (param.hasRequired) {
if (sb.isNotEmpty) {
sb.write(', ');
}
diff --git a/pkg/analysis_server/lib/src/services/correction/fix_internal.dart b/pkg/analysis_server/lib/src/services/correction/fix_internal.dart
index 93e8299..634df8d 100644
--- a/pkg/analysis_server/lib/src/services/correction/fix_internal.dart
+++ b/pkg/analysis_server/lib/src/services/correction/fix_internal.dart
@@ -42,7 +42,6 @@
import 'package:analyzer/src/generated/parser.dart';
import 'package:analyzer/src/generated/resolver.dart';
import 'package:analyzer/src/generated/source.dart';
-import 'package:analyzer/src/generated/utilities_dart.dart';
import 'package:analyzer_plugin/protocol/protocol_common.dart'
hide AnalysisError, Element, ElementKind;
import 'package:analyzer_plugin/src/utilities/string_utilities.dart';
@@ -528,10 +527,10 @@
if (targetElement is ExecutableElement) {
List<ParameterElement> parameters = targetElement.parameters;
int numParameters = parameters.length;
- Iterable<ParameterElement> requiredParameters = parameters
- .takeWhile((p) => p.parameterKind == ParameterKind.REQUIRED);
- Iterable<ParameterElement> optionalParameters = parameters
- .skipWhile((p) => p.parameterKind == ParameterKind.REQUIRED);
+ Iterable<ParameterElement> requiredParameters =
+ parameters.takeWhile((p) => p.isNotOptional);
+ Iterable<ParameterElement> optionalParameters =
+ parameters.skipWhile((p) => p.isNotOptional);
// prepare the argument to add a new parameter for
int numRequired = requiredParameters.length;
if (numRequired >= arguments.length) {
@@ -866,7 +865,7 @@
int numberOfPositionalParameters = 0;
var namedParameters = <ParameterElement>[];
for (var parameter in executable.parameters) {
- if (parameter.parameterKind == ParameterKind.NAMED) {
+ if (parameter.isNamed) {
namedParameters.add(parameter);
} else {
numberOfPositionalParameters++;
@@ -1183,7 +1182,7 @@
bool firstParameter = true;
for (ParameterElement parameter in superConstructor.parameters) {
// skip non-required parameters
- if (parameter.parameterKind != ParameterKind.REQUIRED) {
+ if (parameter.isOptional) {
break;
}
// comma
@@ -1219,9 +1218,9 @@
continue;
}
// prepare parameters and arguments
- Iterable<ParameterElement> requiredParameters =
- superConstructor.parameters.where(
- (parameter) => parameter.parameterKind == ParameterKind.REQUIRED);
+ Iterable<ParameterElement> requiredParameters = superConstructor
+ .parameters
+ .where((parameter) => parameter.isNotOptional);
// add proposal
ClassMemberLocation targetLocation =
utils.prepareNewConstructorLocation(targetClassNode);
@@ -2809,7 +2808,7 @@
FormalParameter lastRequiredParameter;
List<FormalParameter> parameters = constructor.parameters.parameters;
for (FormalParameter parameter in parameters) {
- if (parameter.kind == ParameterKind.REQUIRED) {
+ if (parameter.isRequired) {
lastRequiredParameter = parameter;
}
}
diff --git a/pkg/analysis_server/lib/src/services/refactoring/inline_method.dart b/pkg/analysis_server/lib/src/services/refactoring/inline_method.dart
index caf7a35..83da06e 100644
--- a/pkg/analysis_server/lib/src/services/refactoring/inline_method.dart
+++ b/pkg/analysis_server/lib/src/services/refactoring/inline_method.dart
@@ -18,7 +18,6 @@
import 'package:analyzer/src/dart/ast/utilities.dart';
import 'package:analyzer/src/dart/element/ast_provider.dart';
import 'package:analyzer/src/generated/source.dart';
-import 'package:analyzer/src/generated/utilities_dart.dart';
import 'package:analyzer_plugin/utilities/range_factory.dart';
/**
@@ -73,7 +72,7 @@
argumentSource = utils.getNodeText(argument);
} else {
// report about a missing required parameter
- if (parameter.parameterKind == ParameterKind.REQUIRED) {
+ if (parameter.isNotOptional) {
status.addError('No argument for the parameter "${parameter.name}".',
newLocation_fromNode(contextNode));
return;
diff --git a/pkg/analysis_server/lib/src/services/refactoring/rename_local.dart b/pkg/analysis_server/lib/src/services/refactoring/rename_local.dart
index 85f86e4..8a02a2b 100644
--- a/pkg/analysis_server/lib/src/services/refactoring/rename_local.dart
+++ b/pkg/analysis_server/lib/src/services/refactoring/rename_local.dart
@@ -18,7 +18,6 @@
import 'package:analyzer/dart/element/element.dart';
import 'package:analyzer/src/dart/element/ast_provider.dart';
import 'package:analyzer/src/generated/source.dart';
-import 'package:analyzer/src/generated/utilities_dart.dart';
/**
* A [Refactoring] for renaming [LocalElement]s.
@@ -89,7 +88,7 @@
Element enclosing = element.enclosingElement;
if (enclosing is MethodElement &&
element is ParameterElement &&
- (element as ParameterElement).parameterKind == ParameterKind.NAMED) {
+ (element as ParameterElement).isNamed) {
// prepare hierarchy methods
Set<ClassMemberElement> methods =
await getHierarchyMembers(searchEngine, enclosing);
@@ -97,8 +96,7 @@
for (ClassMemberElement method in methods) {
if (method is MethodElement) {
for (ParameterElement parameter in method.parameters) {
- if (parameter.parameterKind == ParameterKind.NAMED &&
- parameter.name == element.name) {
+ if (parameter.isNamed && parameter.name == element.name) {
elements.add(parameter);
}
}
diff --git a/pkg/analysis_server/lib/src/status/ast_writer.dart b/pkg/analysis_server/lib/src/status/ast_writer.dart
index 908cb67..3532d32 100644
--- a/pkg/analysis_server/lib/src/status/ast_writer.dart
+++ b/pkg/analysis_server/lib/src/status/ast_writer.dart
@@ -75,7 +75,13 @@
properties['static keyword'] = node.staticKeyword;
} else if (node is FormalParameter) {
properties['element'] = node.element;
- properties['kind'] = node.kind;
+ if (node.isNamed) {
+ properties['kind'] = 'named';
+ } else if (node.isOptionalPositional) {
+ properties['kind'] = 'positional';
+ } else {
+ properties['kind'] = 'required';
+ }
} else if (node is FunctionDeclaration) {
properties['element'] = node.element;
properties['external keyword'] = node.externalKeyword;
diff --git a/pkg/analysis_server/lib/src/status/element_writer.dart b/pkg/analysis_server/lib/src/status/element_writer.dart
index 8299ef9..e80d2ea 100644
--- a/pkg/analysis_server/lib/src/status/element_writer.dart
+++ b/pkg/analysis_server/lib/src/status/element_writer.dart
@@ -128,7 +128,13 @@
if (element is ParameterElement) {
properties['defaultValueCode'] = element.defaultValueCode;
properties['isInitializingFormal'] = element.isInitializingFormal;
- properties['parameterKind'] = element.parameterKind;
+ if (element.isNotOptional) {
+ properties['parameterKind'] = 'required';
+ } else if (element.isOptionalPositional) {
+ properties['parameterKind'] = 'positional';
+ } else if (element.isNamed) {
+ properties['parameterKind'] = 'named';
+ }
}
if (element is PropertyAccessorElement) {
properties['isGetter'] = element.isGetter;
diff --git a/pkg/analysis_server/test/context_manager_test.dart b/pkg/analysis_server/test/context_manager_test.dart
index d63240c..b9727e8 100644
--- a/pkg/analysis_server/test/context_manager_test.dart
+++ b/pkg/analysis_server/test/context_manager_test.dart
@@ -2432,6 +2432,27 @@
await new Future.delayed(new Duration(milliseconds: 1));
expect(callbacks.watchEvents, hasLength(1));
}
+
+ test_non_analyzable_files_not_considered() async {
+ // Set up project and get a reference to the driver.
+ manager.setRoots(<String>[projPath], <String>[], <String, String>{});
+ Folder projectFolder = resourceProvider.newFolder(projPath);
+ var drivers = manager.getDriversInAnalysisRoot(projectFolder);
+ expect(drivers, hasLength(1));
+
+ // Add the driver to the manager so that it will receive the events.
+ manager.driverMap[projectFolder] = drivers[0];
+
+ // Ensure adding a file that shouldn't be analyzed is not picked up.
+ newFile('$projPath/test.txt');
+ await pumpEventQueue();
+ expect(drivers[0].hasFilesToAnalyze, false);
+
+ // Ensure modifying a file that shouldn't be analyzed is not picked up.
+ modifyFile('$projPath/test.txt', 'new content');
+ await pumpEventQueue();
+ expect(drivers[0].hasFilesToAnalyze, false);
+ }
}
class TestContextManagerCallbacks extends ContextManagerCallbacks {
diff --git a/pkg/analysis_server/test/integration/support/integration_test_methods.dart b/pkg/analysis_server/test/integration/support/integration_test_methods.dart
index 33968b2..f1c05fc 100644
--- a/pkg/analysis_server/test/integration/support/integration_test_methods.dart
+++ b/pkg/analysis_server/test/integration/support/integration_test_methods.dart
@@ -2169,11 +2169,12 @@
*
* The outline associated with the file.
*
- * instrumentationEdits: List<SourceEdit>
+ * instrumentedCode: String (optional)
*
- * If the file has Flutter widgets that can be rendered, the list of edits
- * that should be applied to the file to instrument widgets and associate
- * them with outline nodes.
+ * If the file has Flutter widgets that can be rendered, this field has the
+ * instrumented content of the file, that allows associating widgets with
+ * corresponding outline nodes. If there are no widgets to render, this
+ * field is absent.
*/
Stream<FlutterOutlineParams> onFlutterOutline;
diff --git a/pkg/analysis_server/test/integration/support/protocol_matchers.dart b/pkg/analysis_server/test/integration/support/protocol_matchers.dart
index aaaa3d9..6a6dc6a 100644
--- a/pkg/analysis_server/test/integration/support/protocol_matchers.dart
+++ b/pkg/analysis_server/test/integration/support/protocol_matchers.dart
@@ -2455,15 +2455,13 @@
* {
* "file": FilePath
* "outline": FlutterOutline
- * "instrumentationEdits": List<SourceEdit>
+ * "instrumentedCode": optional String
* }
*/
-final Matcher isFlutterOutlineParams =
- new LazyMatcher(() => new MatchesJsonObject("flutter.outline params", {
- "file": isFilePath,
- "outline": isFlutterOutline,
- "instrumentationEdits": isListOf(isSourceEdit)
- }));
+final Matcher isFlutterOutlineParams = new LazyMatcher(() =>
+ new MatchesJsonObject("flutter.outline params",
+ {"file": isFilePath, "outline": isFlutterOutline},
+ optionalFields: {"instrumentedCode": isString}));
/**
* flutter.setSubscriptions params
diff --git a/pkg/analysis_server/test/plugin/protocol_dart_test.dart b/pkg/analysis_server/test/plugin/protocol_dart_test.dart
index dc4c218..645d03c 100644
--- a/pkg/analysis_server/test/plugin/protocol_dart_test.dart
+++ b/pkg/analysis_server/test/plugin/protocol_dart_test.dart
@@ -240,7 +240,7 @@
engine.CompilationUnit unit = await resolveLibraryUnit(source);
{
engine.ClassElement engineElement = findElementInUnit(unit, '_E1');
- expect(engineElement.isDeprecated, isTrue);
+ expect(engineElement.hasDeprecated, isTrue);
// create notification Element
Element element = convertElement(engineElement);
expect(element.kind, ElementKind.ENUM);
@@ -257,7 +257,7 @@
expect(element.parameters, isNull);
expect(
element.flags,
- (engineElement.isDeprecated ? Element.FLAG_DEPRECATED : 0) |
+ (engineElement.hasDeprecated ? Element.FLAG_DEPRECATED : 0) |
Element.FLAG_PRIVATE);
}
{
diff --git a/pkg/analysis_server/tool/spec/spec_input.html b/pkg/analysis_server/tool/spec/spec_input.html
index 0de9134..5be66ae 100644
--- a/pkg/analysis_server/tool/spec/spec_input.html
+++ b/pkg/analysis_server/tool/spec/spec_input.html
@@ -2699,14 +2699,13 @@
The outline associated with the file.
</p>
</field>
- <field name="instrumentationEdits">
- <list>
- <ref>SourceEdit</ref>
- </list>
+ <field name="instrumentedCode" optional="true">
+ <ref>String</ref>
<p>
- If the file has Flutter widgets that can be rendered, the list
- of edits that should be applied to the file to instrument widgets and
- associate them with outline nodes.
+ If the file has Flutter widgets that can be rendered, this field
+ has the instrumented content of the file, that allows associating
+ widgets with corresponding outline nodes. If there are no widgets
+ to render, this field is absent.
</p>
</field>
</params>
diff --git a/pkg/analyzer/lib/dart/ast/ast.dart b/pkg/analyzer/lib/dart/ast/ast.dart
index e49bab4..0c5fbe9 100644
--- a/pkg/analyzer/lib/dart/ast/ast.dart
+++ b/pkg/analyzer/lib/dart/ast/ast.dart
@@ -3028,8 +3028,43 @@
bool get isFinal;
/**
+ * Return `true` if this parameter is a named parameter. Named parameters are
+ * always optional, even when they are annotated with the `@required`
+ * annotation.
+ */
+ bool get isNamed;
+
+ /**
+ * Return `true` if this parameter is an optional parameter. Optional
+ * parameters can either be positional or named.
+ */
+ bool get isOptional;
+
+ /**
+ * Return `true` if this parameter is both an optional and positional
+ * parameter.
+ */
+ bool get isOptionalPositional;
+
+ /**
+ * Return `true` if this parameter is a positional parameter. Positional
+ * parameters can either be required or optional.
+ */
+ bool get isPositional;
+
+ /**
+ * Return `true` if this parameter is a required parameter. Required
+ * parameters are always positional.
+ *
+ * Note: this will return `false` for a named parameter that is annotated with
+ * the `@required` annotation.
+ */
+ bool get isRequired;
+
+ /**
* Return the kind of this parameter.
*/
+ @deprecated
ParameterKind get kind;
/**
diff --git a/pkg/analyzer/lib/dart/element/element.dart b/pkg/analyzer/lib/dart/element/element.dart
index c618f14..12a88e8 100644
--- a/pkg/analyzer/lib/dart/element/element.dart
+++ b/pkg/analyzer/lib/dart/element/element.dart
@@ -604,6 +604,49 @@
Element get enclosingElement;
/**
+ * Return `true` if this element has an annotation of the form
+ * `@alwaysThrows`.
+ */
+ bool get hasAlwaysThrows;
+
+ /**
+ * Return `true` if this element has an annotation of the form `@deprecated`
+ * or `@Deprecated('..')`.
+ */
+ bool get hasDeprecated;
+
+ /**
+ * Return `true` if this element has an annotation of the form `@factory`.
+ */
+ bool get hasFactory;
+
+ /**
+ * Return `true` if this element has an annotation of the form `@JS(..)`.
+ */
+ bool get hasJS;
+
+ /**
+ * Return `true` if this element has an annotation of the form `@override`.
+ */
+ bool get hasOverride;
+
+ /**
+ * Return `true` if this element has an annotation of the form `@protected`.
+ */
+ bool get hasProtected;
+
+ /**
+ * Return `true` if this element has an annotation of the form '@required'.
+ */
+ bool get hasRequired;
+
+ /**
+ * Return `true` if this element has an annotation of the form
+ * `@visibleForTesting`.
+ */
+ bool get hasVisibleForTesting;
+
+ /**
* The unique integer identifier of this element.
*/
int get id;
@@ -612,27 +655,32 @@
* Return `true` if this element has an annotation of the form
* '@alwaysThrows'.
*/
+ @deprecated
bool get isAlwaysThrows;
/**
* Return `true` if this element has an annotation of the form '@deprecated'
* or '@Deprecated('..')'.
*/
+ @deprecated
bool get isDeprecated;
/**
* Return `true` if this element has an annotation of the form '@factory'.
*/
+ @deprecated
bool get isFactory;
/**
* Return `true` if this element has an annotation of the form '@JS(..)'.
*/
+ @deprecated
bool get isJS;
/**
* Return `true` if this element has an annotation of the form '@override'.
*/
+ @deprecated
bool get isOverride;
/**
@@ -644,6 +692,7 @@
/**
* Return `true` if this element has an annotation of the form '@protected'.
*/
+ @deprecated
bool get isProtected;
/**
@@ -655,6 +704,7 @@
/**
* Return `true` if this element has an annotation of the form '@required'.
*/
+ @deprecated
bool get isRequired;
/**
@@ -667,6 +717,7 @@
/// Return `true` if this element has an annotation of the form
/// '@visibleForTesting'.
+ @deprecated
bool get isVisibleForTesting;
/**
@@ -877,8 +928,10 @@
*/
bool get isRequired;
- /// Return `true` if this annotation marks the associated member as being
- /// visible for testing.
+ /**
+ * Return `true` if this annotation marks the associated member as being
+ * visible for testing.
+ */
bool get isVisibleForTesting;
/**
@@ -1700,8 +1753,44 @@
bool get isInitializingFormal;
/**
+ * Return `true` if this parameter is a named parameter. Named parameters are
+ * always optional, even when they are annotated with the `@required`
+ * annotation.
+ */
+ bool get isNamed;
+
+ /**
+ * Return `true` if this parameter is a required parameter. Required
+ * parameters are always positional.
+ *
+ * Note: this will return `false` for a named parameter that is annotated with
+ * the `@required` annotation.
+ */
+ // TODO(brianwilkerson) Rename this to `isRequired`.
+ bool get isNotOptional;
+
+ /**
+ * Return `true` if this parameter is an optional parameter. Optional
+ * parameters can either be positional or named.
+ */
+ bool get isOptional;
+
+ /**
+ * Return `true` if this parameter is both an optional and positional
+ * parameter.
+ */
+ bool get isOptionalPositional;
+
+ /**
+ * Return `true` if this parameter is a positional parameter. Positional
+ * parameters can either be required or optional.
+ */
+ bool get isPositional;
+
+ /**
* Return the kind of this parameter.
*/
+ @deprecated
ParameterKind get parameterKind;
/**
diff --git a/pkg/analyzer/lib/error/error.dart b/pkg/analyzer/lib/error/error.dart
index 724bc66..9ef6cdf 100644
--- a/pkg/analyzer/lib/error/error.dart
+++ b/pkg/analyzer/lib/error/error.dart
@@ -76,6 +76,7 @@
CompileTimeErrorCode.CONFLICTING_CONSTRUCTOR_NAME_AND_METHOD,
CompileTimeErrorCode.CONFLICTING_GETTER_AND_METHOD,
CompileTimeErrorCode.CONFLICTING_METHOD_AND_GETTER,
+ CompileTimeErrorCode.CONFLICTING_GENERIC_INTERFACES,
CompileTimeErrorCode.CONFLICTING_TYPE_VARIABLE_AND_CLASS,
CompileTimeErrorCode.CONFLICTING_TYPE_VARIABLE_AND_MEMBER,
CompileTimeErrorCode.CONST_CONSTRUCTOR_THROWS_EXCEPTION,
diff --git a/pkg/analyzer/lib/src/context/builder.dart b/pkg/analyzer/lib/src/context/builder.dart
index 2efe773..ea45784 100644
--- a/pkg/analyzer/lib/src/context/builder.dart
+++ b/pkg/analyzer/lib/src/context/builder.dart
@@ -506,11 +506,17 @@
/**
* Return the analysis options file that should be used when analyzing code in
* the directory with the given [path].
+ *
+ * If [forceSearch] is true, then don't return the default analysis options
+ * path. This allows cli to locate what *would* have been the analysis options
+ * file path, and super-impose the defaults over it in-place.
*/
- File getOptionsFile(String path) {
- String filePath = builderOptions.defaultAnalysisOptionsFilePath;
- if (filePath != null) {
- return resourceProvider.getFile(filePath);
+ File getOptionsFile(String path, {bool forceSearch: false}) {
+ if (!forceSearch) {
+ String filePath = builderOptions.defaultAnalysisOptionsFilePath;
+ if (filePath != null) {
+ return resourceProvider.getFile(filePath);
+ }
}
Folder root = resourceProvider.getFolder(path);
for (Folder folder = root; folder != null; folder = folder.parent) {
diff --git a/pkg/analyzer/lib/src/dart/analysis/index.dart b/pkg/analyzer/lib/src/dart/analysis/index.dart
index 66337bb..448de64 100644
--- a/pkg/analyzer/lib/src/dart/analysis/index.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/index.dart
@@ -9,7 +9,6 @@
import 'package:analyzer/dart/element/element.dart';
import 'package:analyzer/dart/element/type.dart';
import 'package:analyzer/src/dart/element/member.dart';
-import 'package:analyzer/src/generated/utilities_dart.dart';
import 'package:analyzer/src/summary/format.dart';
import 'package:analyzer/src/summary/idl.dart';
@@ -442,7 +441,7 @@
element.enclosingElement is ExecutableElement ||
elementKind == ElementKind.PARAMETER &&
element is ParameterElement &&
- element.parameterKind != ParameterKind.NAMED ||
+ !element.isNamed ||
false) {
return;
}
diff --git a/pkg/analyzer/lib/src/dart/analysis/library_analyzer.dart b/pkg/analyzer/lib/src/dart/analysis/library_analyzer.dart
index ac98670..bc02210 100644
--- a/pkg/analyzer/lib/src/dart/analysis/library_analyzer.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/library_analyzer.dart
@@ -673,6 +673,11 @@
new DeclarationResolver(enableKernelDriver: _enableKernelDriver)
.resolve(unit, unitElement);
+ if (_libraryElement.context.analysisOptions.previewDart2) {
+ unit.accept(new AstRewriteVisitor(_libraryElement, source, _typeProvider,
+ AnalysisErrorListener.NULL_LISTENER));
+ }
+
// TODO(scheglov) remove EnumMemberBuilder class
new TypeParameterBoundsResolver(
@@ -722,6 +727,11 @@
new DeclarationResolver(enableKernelDriver: true, applyKernelTypes: true)
.resolve(unit, unitElement);
+ if (_libraryElement.context.analysisOptions.previewDart2) {
+ unit.accept(new AstRewriteVisitor(_libraryElement, file.source,
+ _typeProvider, AnalysisErrorListener.NULL_LISTENER));
+ }
+
for (var declaration in unit.declarations) {
if (declaration is ClassDeclaration) {
if (declaration.metadata.isNotEmpty) {
diff --git a/pkg/analyzer/lib/src/dart/analysis/search.dart b/pkg/analyzer/lib/src/dart/analysis/search.dart
index 90b0d6a..6b8d5e3 100644
--- a/pkg/analyzer/lib/src/dart/analysis/search.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/search.dart
@@ -15,7 +15,6 @@
import 'package:analyzer/src/dart/element/element.dart';
import 'package:analyzer/src/dart/element/member.dart';
import 'package:analyzer/src/dart/resolver/scope.dart' show NamespaceBuilder;
-import 'package:analyzer/src/generated/utilities_dart.dart';
import 'package:analyzer/src/summary/idl.dart';
import 'package:collection/collection.dart';
@@ -681,7 +680,7 @@
AstNode parent = node.parent;
return parent is ClassDeclaration || parent is CompilationUnit;
}));
- if (parameter.parameterKind == ParameterKind.NAMED) {
+ if (parameter.isNamed) {
results.addAll(await _searchReferences(parameter));
}
return results;
diff --git a/pkg/analyzer/lib/src/dart/ast/ast.dart b/pkg/analyzer/lib/src/dart/ast/ast.dart
index 0ec3a44..94fce0c 100644
--- a/pkg/analyzer/lib/src/dart/ast/ast.dart
+++ b/pkg/analyzer/lib/src/dart/ast/ast.dart
@@ -4784,6 +4784,27 @@
}
return identifier.staticElement as ParameterElement;
}
+
+ @override
+ bool get isNamed => kind == ParameterKind.NAMED;
+
+ @override
+ bool get isOptional =>
+ kind == ParameterKind.NAMED || kind == ParameterKind.POSITIONAL;
+
+ @override
+ bool get isOptionalPositional => kind == ParameterKind.POSITIONAL;
+
+ @override
+ bool get isPositional =>
+ kind == ParameterKind.POSITIONAL || kind == ParameterKind.REQUIRED;
+
+ @override
+ bool get isRequired => kind == ParameterKind.REQUIRED;
+
+ @override
+ // Overridden to remove the 'deprecated' annotation.
+ ParameterKind get kind;
}
/**
@@ -8350,6 +8371,7 @@
_identifier = _becomeParentOf(identifier as AstNodeImpl);
}
+ @deprecated
@override
ParameterKind get kind {
AstNode parent = this.parent;
diff --git a/pkg/analyzer/lib/src/dart/ast/utilities.dart b/pkg/analyzer/lib/src/dart/ast/utilities.dart
index 7c95144..0fe0143 100644
--- a/pkg/analyzer/lib/src/dart/ast/utilities.dart
+++ b/pkg/analyzer/lib/src/dart/ast/utilities.dart
@@ -17,7 +17,6 @@
import 'package:analyzer/src/generated/engine.dart' show AnalysisEngine;
import 'package:analyzer/src/generated/java_core.dart';
import 'package:analyzer/src/generated/utilities_collection.dart' show TokenMap;
-import 'package:analyzer/src/generated/utilities_dart.dart';
import 'package:meta/meta.dart';
/**
@@ -349,6 +348,7 @@
@override
DefaultFormalParameter visitDefaultFormalParameter(
DefaultFormalParameter node) =>
+ // ignore: deprecated_member_use
astFactory.defaultFormalParameter(cloneNode(node.parameter), node.kind,
cloneToken(node.separator), cloneNode(node.defaultValue));
@@ -1393,6 +1393,7 @@
bool visitDefaultFormalParameter(DefaultFormalParameter node) {
DefaultFormalParameter other = _other as DefaultFormalParameter;
return isEqualNodes(node.parameter, other.parameter) &&
+ // ignore: deprecated_member_use
node.kind == other.kind &&
isEqualTokens(node.separator, other.separator) &&
isEqualNodes(node.defaultValue, other.defaultValue);
@@ -5719,6 +5720,7 @@
DefaultFormalParameter toNode = this._toNode as DefaultFormalParameter;
return _and(
_isEqualNodes(node.parameter, toNode.parameter),
+ // ignore: deprecated_member_use
node.kind == toNode.kind,
_isEqualTokens(node.separator, toNode.separator),
_isEqualNodes(node.defaultValue, toNode.defaultValue));
@@ -7443,7 +7445,7 @@
_writer.print(", ");
}
if (groupEnd == null && parameter is DefaultFormalParameter) {
- if (parameter.kind == ParameterKind.NAMED) {
+ if (parameter.isNamed) {
groupEnd = "}";
_writer.print('{');
} else {
@@ -8758,7 +8760,7 @@
sink.write(", ");
}
if (groupEnd == null && parameter is DefaultFormalParameter) {
- if (parameter.kind == ParameterKind.NAMED) {
+ if (parameter.isNamed) {
groupEnd = "}";
sink.write('{');
} else {
diff --git a/pkg/analyzer/lib/src/dart/constant/evaluation.dart b/pkg/analyzer/lib/src/dart/constant/evaluation.dart
index 5f7251b..2dc985f 100644
--- a/pkg/analyzer/lib/src/dart/constant/evaluation.dart
+++ b/pkg/analyzer/lib/src/dart/constant/evaluation.dart
@@ -26,7 +26,6 @@
import 'package:analyzer/src/generated/type_system.dart'
show TypeSystem, TypeSystemImpl;
import 'package:analyzer/src/generated/utilities_collection.dart';
-import 'package:analyzer/src/generated/utilities_dart.dart' show ParameterKind;
import 'package:analyzer/src/task/dart.dart';
/**
@@ -622,7 +621,7 @@
}
DartObjectImpl argumentValue = null;
AstNode errorTarget = null;
- if (baseParameter.parameterKind == ParameterKind.NAMED) {
+ if (baseParameter.isNamed) {
argumentValue = namedArgumentValues[baseParameter.name];
errorTarget = namedArgumentNodes[baseParameter.name];
} else if (i < argumentCount) {
diff --git a/pkg/analyzer/lib/src/dart/element/builder.dart b/pkg/analyzer/lib/src/dart/element/builder.dart
index d4475b7..ce9381b 100644
--- a/pkg/analyzer/lib/src/dart/element/builder.dart
+++ b/pkg/analyzer/lib/src/dart/element/builder.dart
@@ -1406,6 +1406,7 @@
parameter.isConst = node.isConst;
parameter.isExplicitlyCovariant = node.parameter.covariantKeyword != null;
parameter.isFinal = node.isFinal;
+ // ignore: deprecated_member_use
parameter.parameterKind = node.kind;
// visible range
_setParameterVisibleRange(node, parameter);
@@ -1433,6 +1434,7 @@
parameter.isConst = node.isConst;
parameter.isExplicitlyCovariant = node.covariantKeyword != null;
parameter.isFinal = node.isFinal;
+ // ignore: deprecated_member_use
parameter.parameterKind = node.kind;
_currentHolder.addParameter(parameter);
parameterName.staticElement = parameter;
@@ -1462,6 +1464,7 @@
parameter.isConst = node.isConst;
parameter.isExplicitlyCovariant = node.covariantKeyword != null;
parameter.isFinal = node.isFinal;
+ // ignore: deprecated_member_use
parameter.parameterKind = node.kind;
_setParameterVisibleRange(node, parameter);
_currentHolder.addParameter(parameter);
@@ -1506,6 +1509,7 @@
parameter.isConst = node.isConst;
parameter.isExplicitlyCovariant = node.covariantKeyword != null;
parameter.isFinal = node.isFinal;
+ // ignore: deprecated_member_use
parameter.parameterKind = node.kind;
_setParameterVisibleRange(node, parameter);
if (node.type == null) {
diff --git a/pkg/analyzer/lib/src/dart/element/element.dart b/pkg/analyzer/lib/src/dart/element/element.dart
index 23397df..5f3d53b 100644
--- a/pkg/analyzer/lib/src/dart/element/element.dart
+++ b/pkg/analyzer/lib/src/dart/element/element.dart
@@ -1159,7 +1159,7 @@
// Otherwise only constructors that lack optional parameters are
// accessible (see dartbug.com/19576).
for (ParameterElement parameter in constructor.parameters) {
- if (parameter.parameterKind != ParameterKind.REQUIRED) {
+ if (parameter.isOptional) {
return false;
}
}
@@ -1253,6 +1253,7 @@
new ParameterElementImpl(superParameter.name, -1);
implicitParameter.isConst = superParameter.isConst;
implicitParameter.isFinal = superParameter.isFinal;
+ // ignore: deprecated_member_use
implicitParameter.parameterKind = superParameter.parameterKind;
implicitParameter.isSynthetic = true;
implicitParameter.type =
@@ -2373,7 +2374,7 @@
}
// no required parameters
for (ParameterElement parameter in parameters) {
- if (parameter.parameterKind == ParameterKind.REQUIRED) {
+ if (parameter.isNotOptional) {
return false;
}
}
@@ -3172,6 +3173,18 @@
}
@override
+ bool get hasAlwaysThrows =>
+ metadata.any((ElementAnnotation annotation) => annotation.isAlwaysThrows);
+
+ @override
+ bool get hasDeprecated =>
+ metadata.any((ElementAnnotation annotation) => annotation.isDeprecated);
+
+ @override
+ bool get hasFactory =>
+ metadata.any((ElementAnnotation annotation) => annotation.isFactory);
+
+ @override
int get hashCode {
// TODO: We might want to re-visit this optimization in the future.
// We cache the hash code value as this is a very frequently called method.
@@ -3181,6 +3194,26 @@
return _cachedHashCode;
}
+ @override
+ bool get hasJS =>
+ metadata.any((ElementAnnotation annotation) => annotation.isJS);
+
+ @override
+ bool get hasOverride =>
+ metadata.any((ElementAnnotation annotation) => annotation.isOverride);
+
+ @override
+ bool get hasProtected =>
+ metadata.any((ElementAnnotation annotation) => annotation.isProtected);
+
+ @override
+ bool get hasRequired =>
+ metadata.any((ElementAnnotation annotation) => annotation.isRequired);
+
+ @override
+ bool get hasVisibleForTesting => metadata
+ .any((ElementAnnotation annotation) => annotation.isVisibleForTesting);
+
/**
* Return an identifier that uniquely identifies this element among the
* children of this element's parent.
@@ -4377,6 +4410,7 @@
buffer.write(", ");
}
ParameterElement parameter = parameters[i];
+ // ignore: deprecated_member_use
ParameterKind parameterKind = parameter.parameterKind;
if (parameterKind != kind) {
if (closing != null) {
@@ -7470,6 +7504,30 @@
Element get enclosingElement => null;
@override
+ bool get hasAlwaysThrows => false;
+
+ @override
+ bool get hasDeprecated => false;
+
+ @override
+ bool get hasFactory => false;
+
+ @override
+ bool get hasJS => false;
+
+ @override
+ bool get hasOverride => false;
+
+ @override
+ bool get hasProtected => false;
+
+ @override
+ bool get hasRequired => false;
+
+ @override
+ bool get hasVisibleForTesting => false;
+
+ @override
bool get isAlwaysThrows => false;
@override
@@ -8550,6 +8608,29 @@
*/
abstract class ParameterElementMixin implements ParameterElement {
@override
+ bool get isNamed => parameterKind == ParameterKind.NAMED;
+
+ @override
+ bool get isNotOptional => parameterKind == ParameterKind.REQUIRED;
+
+ @override
+ bool get isOptional =>
+ parameterKind == ParameterKind.NAMED ||
+ parameterKind == ParameterKind.POSITIONAL;
+
+ @override
+ bool get isOptionalPositional => parameterKind == ParameterKind.POSITIONAL;
+
+ @override
+ bool get isPositional =>
+ parameterKind == ParameterKind.POSITIONAL ||
+ parameterKind == ParameterKind.REQUIRED;
+
+ @override
+ // Overridden to remove the 'deprecated' annotation.
+ ParameterKind get parameterKind;
+
+ @override
void appendToWithoutDelimiters(StringBuffer buffer) {
buffer.write(type);
buffer.write(" ");
diff --git a/pkg/analyzer/lib/src/dart/element/handle.dart b/pkg/analyzer/lib/src/dart/element/handle.dart
index 062b10f..a5f7cbe 100644
--- a/pkg/analyzer/lib/src/dart/element/handle.dart
+++ b/pkg/analyzer/lib/src/dart/element/handle.dart
@@ -44,12 +44,18 @@
List<FieldElement> get fields => actualElement.fields;
@override
+ bool get hasJS => actualElement.hasJS;
+
+ @override
bool get hasNonFinalField => actualElement.hasNonFinalField;
@override
bool get hasReferenceToSuper => actualElement.hasReferenceToSuper;
@override
+ bool get hasRequired => actualElement.hasRequired;
+
+ @override
bool get hasStaticMember => actualElement.hasStaticMember;
@override
@@ -62,7 +68,7 @@
bool get isEnum => actualElement.isEnum;
@override
- bool get isJS => actualElement.isJS;
+ bool get isJS => actualElement.hasJS;
@override
bool get isMixinApplication => actualElement.isMixinApplication;
@@ -74,7 +80,7 @@
bool get isProxy => actualElement.isProxy;
@override
- bool get isRequired => actualElement.isRequired;
+ bool get isRequired => actualElement.hasRequired;
@override
bool get isValidMixin => actualElement.isValidMixin;
@@ -345,40 +351,64 @@
Element get enclosingElement => actualElement.enclosingElement;
@override
+ bool get hasAlwaysThrows => actualElement.hasAlwaysThrows;
+
+ @override
+ bool get hasDeprecated => actualElement.hasDeprecated;
+
+ @override
+ bool get hasFactory => actualElement.hasFactory;
+
+ @override
int get hashCode => _location.hashCode;
@override
- bool get isAlwaysThrows => actualElement.isAlwaysThrows;
+ bool get hasJS => actualElement.hasJS;
@override
- bool get isDeprecated => actualElement.isDeprecated;
+ bool get hasOverride => actualElement.hasOverride;
@override
- bool get isFactory => actualElement.isFactory;
+ bool get hasProtected => actualElement.hasProtected;
@override
- bool get isJS => actualElement.isJS;
+ bool get hasRequired => actualElement.hasRequired;
@override
- bool get isOverride => actualElement.isOverride;
+ bool get hasVisibleForTesting => actualElement.hasVisibleForTesting;
+
+ @override
+ bool get isAlwaysThrows => actualElement.hasAlwaysThrows;
+
+ @override
+ bool get isDeprecated => actualElement.hasDeprecated;
+
+ @override
+ bool get isFactory => actualElement.hasFactory;
+
+ @override
+ bool get isJS => actualElement.hasJS;
+
+ @override
+ bool get isOverride => actualElement.hasOverride;
@override
bool get isPrivate => actualElement.isPrivate;
@override
- bool get isProtected => actualElement.isProtected;
+ bool get isProtected => actualElement.hasProtected;
@override
bool get isPublic => actualElement.isPublic;
@override
- bool get isRequired => actualElement.isRequired;
+ bool get isRequired => actualElement.hasRequired;
@override
bool get isSynthetic => actualElement.isSynthetic;
@override
- bool get isVisibleForTesting => actualElement.isVisibleForTesting;
+ bool get isVisibleForTesting => actualElement.hasVisibleForTesting;
@override
LibraryElement get library =>
@@ -944,6 +974,7 @@
@override
ElementKind get kind => ElementKind.PARAMETER;
+ @deprecated
@override
ParameterKind get parameterKind => actualElement.parameterKind;
diff --git a/pkg/analyzer/lib/src/dart/element/member.dart b/pkg/analyzer/lib/src/dart/element/member.dart
index ac66f59..026a7ef 100644
--- a/pkg/analyzer/lib/src/dart/element/member.dart
+++ b/pkg/analyzer/lib/src/dart/element/member.dart
@@ -391,40 +391,64 @@
String get documentationComment => _baseElement.documentationComment;
@override
+ bool get hasAlwaysThrows => _baseElement.hasAlwaysThrows;
+
+ @override
+ bool get hasDeprecated => _baseElement.hasDeprecated;
+
+ @override
+ bool get hasFactory => _baseElement.hasFactory;
+
+ @override
+ bool get hasJS => _baseElement.hasJS;
+
+ @override
+ bool get hasOverride => _baseElement.hasOverride;
+
+ @override
+ bool get hasProtected => _baseElement.hasProtected;
+
+ @override
+ bool get hasRequired => _baseElement.hasRequired;
+
+ @override
+ bool get hasVisibleForTesting => _baseElement.hasVisibleForTesting;
+
+ @override
int get id => _baseElement.id;
@override
- bool get isAlwaysThrows => _baseElement.isAlwaysThrows;
+ bool get isAlwaysThrows => _baseElement.hasAlwaysThrows;
@override
- bool get isDeprecated => _baseElement.isDeprecated;
+ bool get isDeprecated => _baseElement.hasDeprecated;
@override
- bool get isFactory => _baseElement.isFactory;
+ bool get isFactory => _baseElement.hasFactory;
@override
- bool get isJS => _baseElement.isJS;
+ bool get isJS => _baseElement.hasJS;
@override
- bool get isOverride => _baseElement.isOverride;
+ bool get isOverride => _baseElement.hasOverride;
@override
bool get isPrivate => _baseElement.isPrivate;
@override
- bool get isProtected => _baseElement.isProtected;
+ bool get isProtected => _baseElement.hasProtected;
@override
bool get isPublic => _baseElement.isPublic;
@override
- bool get isRequired => _baseElement.isRequired;
+ bool get isRequired => _baseElement.hasRequired;
@override
bool get isSynthetic => _baseElement.isSynthetic;
@override
- bool get isVisibleForTesting => _baseElement.isVisibleForTesting;
+ bool get isVisibleForTesting => _baseElement.hasVisibleForTesting;
@override
ElementKind get kind => _baseElement.kind;
@@ -578,6 +602,7 @@
buffer.write(", ");
}
ParameterElement parameter = parameters[i];
+ // ignore: deprecated_member_use
ParameterKind parameterKind = parameter.parameterKind;
if (parameterKind != kind) {
if (closing != null) {
@@ -661,6 +686,7 @@
@override
bool get isInitializingFormal => baseElement.isInitializingFormal;
+ @deprecated
@override
ParameterKind get parameterKind => baseElement.parameterKind;
@@ -707,13 +733,13 @@
String left = "";
String right = "";
while (true) {
- if (baseElement.parameterKind == ParameterKind.NAMED) {
+ if (baseElement.isNamed) {
left = "{";
right = "}";
- } else if (baseElement.parameterKind == ParameterKind.POSITIONAL) {
+ } else if (baseElement.isOptionalPositional) {
left = "[";
right = "]";
- } else if (baseElement.parameterKind == ParameterKind.REQUIRED) {}
+ }
break;
}
return '$left$type ${baseElement.displayName}$right';
diff --git a/pkg/analyzer/lib/src/dart/element/type.dart b/pkg/analyzer/lib/src/dart/element/type.dart
index 62345fc..2fe2d25 100644
--- a/pkg/analyzer/lib/src/dart/element/type.dart
+++ b/pkg/analyzer/lib/src/dart/element/type.dart
@@ -611,7 +611,7 @@
@override
List<String> get normalParameterNames {
return baseParameters
- .where((parameter) => parameter.parameterKind == ParameterKind.REQUIRED)
+ .where((parameter) => parameter.isNotOptional)
.map((parameter) => parameter.name)
.toList();
}
@@ -628,8 +628,7 @@
@override
List<String> get optionalParameterNames {
return baseParameters
- .where(
- (parameter) => parameter.parameterKind == ParameterKind.POSITIONAL)
+ .where((parameter) => parameter.isOptionalPositional)
.map((parameter) => parameter.name)
.toList();
}
@@ -774,35 +773,6 @@
}
@override
- bool isEquivalentTo(DartType other) {
- if (other is FunctionTypeImpl) {
- if (typeFormals.length != other.typeFormals.length) {
- return false;
- }
- // `<T>T -> T` should be equal to `<U>U -> U`
- // To test this, we instantiate both types with the same (unique) type
- // variables, and see if the result is equal.
- if (typeFormals.isNotEmpty) {
- List<DartType> freshVariables =
- relateTypeFormals(this, other, (t, s, _, __) => t == s);
- if (freshVariables == null) {
- return false;
- }
- return instantiate(freshVariables)
- .isEquivalentTo(other.instantiate(freshVariables));
- }
-
- return returnType.isEquivalentTo(other.returnType) &&
- TypeImpl.equivalentArrays(
- normalParameterTypes, other.normalParameterTypes) &&
- TypeImpl.equivalentArrays(
- optionalParameterTypes, other.optionalParameterTypes) &&
- _equivalent(namedParameterTypes, other.namedParameterTypes);
- }
- return false;
- }
-
- @override
bool operator ==(Object object) {
if (object is FunctionTypeImpl) {
if (typeFormals.length != object.typeFormals.length) {
@@ -983,6 +953,35 @@
}
@override
+ bool isEquivalentTo(DartType other) {
+ if (other is FunctionTypeImpl) {
+ if (typeFormals.length != other.typeFormals.length) {
+ return false;
+ }
+ // `<T>T -> T` should be equal to `<U>U -> U`
+ // To test this, we instantiate both types with the same (unique) type
+ // variables, and see if the result is equal.
+ if (typeFormals.isNotEmpty) {
+ List<DartType> freshVariables =
+ relateTypeFormals(this, other, (t, s, _, __) => t == s);
+ if (freshVariables == null) {
+ return false;
+ }
+ return instantiate(freshVariables)
+ .isEquivalentTo(other.instantiate(freshVariables));
+ }
+
+ return returnType.isEquivalentTo(other.returnType) &&
+ TypeImpl.equivalentArrays(
+ normalParameterTypes, other.normalParameterTypes) &&
+ TypeImpl.equivalentArrays(
+ optionalParameterTypes, other.optionalParameterTypes) &&
+ _equivalent(namedParameterTypes, other.namedParameterTypes);
+ }
+ return false;
+ }
+
+ @override
bool isMoreSpecificThan(DartType type,
[bool withDynamic = false, Set<Element> visitedElements]) {
// Note: visitedElements is only used for breaking recursion in the type
@@ -1083,6 +1082,7 @@
int length = parameters.length;
for (int i = 0; i < length; i++) {
ParameterElement parameter = parameters[i];
+ // ignore: deprecated_member_use
if (parameter.parameterKind == kind) {
TypeImpl type = parameter.type ?? DynamicTypeImpl.instance;
if (typeArguments.length != 0 &&
@@ -1252,13 +1252,12 @@
var tOptional = <ParameterElement>[];
var tNamed = <String, ParameterElement>{};
for (var p in tParams) {
- var kind = p.parameterKind;
- if (kind == ParameterKind.REQUIRED) {
+ if (p.isNotOptional) {
tRequired.add(p);
- } else if (kind == ParameterKind.POSITIONAL) {
+ } else if (p.isOptionalPositional) {
tOptional.add(p);
} else {
- assert(kind == ParameterKind.NAMED);
+ assert(p.isNamed);
tNamed[p.name] = p;
}
}
@@ -1267,13 +1266,12 @@
var sOptional = <ParameterElement>[];
var sNamed = <String, ParameterElement>{};
for (var p in sParams) {
- var kind = p.parameterKind;
- if (kind == ParameterKind.REQUIRED) {
+ if (p.isNotOptional) {
sRequired.add(p);
- } else if (kind == ParameterKind.POSITIONAL) {
+ } else if (p.isOptionalPositional) {
sOptional.add(p);
} else {
- assert(kind == ParameterKind.NAMED);
+ assert(p.isNamed);
sNamed[p.name] = p;
}
}
@@ -1723,18 +1721,6 @@
}
@override
- bool isEquivalentTo(DartType other) {
- if (identical(other, this)) {
- return true;
- }
- if (other is InterfaceTypeImpl) {
- return (element == other.element) &&
- TypeImpl.equivalentArrays(typeArguments, other.typeArguments);
- }
- return false;
- }
-
- @override
void appendTo(StringBuffer buffer, Set<TypeImpl> visitedTypes) {
if (visitedTypes.add(this)) {
buffer.write(name);
@@ -1849,6 +1835,18 @@
}
@override
+ bool isEquivalentTo(DartType other) {
+ if (identical(other, this)) {
+ return true;
+ }
+ if (other is InterfaceTypeImpl) {
+ return (element == other.element) &&
+ TypeImpl.equivalentArrays(typeArguments, other.typeArguments);
+ }
+ return false;
+ }
+
+ @override
bool isMoreSpecificThan(DartType type,
[bool withDynamic = false, Set<Element> visitedElements]) {
//
@@ -2587,9 +2585,6 @@
*/
final Element _element;
- @override
- bool isEquivalentTo(DartType other) => this == other;
-
/**
* The name of this type, or `null` if the type does not have a name.
*/
@@ -2672,6 +2667,9 @@
return isSubtypeOf(type) || type.isSubtypeOf(this);
}
+ @override
+ bool isEquivalentTo(DartType other) => this == other;
+
/**
* Return `true` if this type is more specific than the given [type] (written
* in the spec as "T << S", where T=[this] and S=[type]).
@@ -2866,24 +2864,6 @@
return false;
}
- @override
- bool isEquivalentTo(DartType other) {
- if (other is TypeParameterTypeImpl && element == other.element) {
- if (_comparingBounds) {
- // If we're comparing bounds already, then we only need type variable
- // equality.
- return true;
- }
- _comparingBounds = true;
- try {
- return bound.isEquivalentTo(other.bound);
- } finally {
- _comparingBounds = false;
- }
- }
- return false;
- }
-
/**
* Append a textual representation of this type to the given [buffer]. The set
* of [visitedTypes] is used to prevent infinite recursion.
@@ -2906,6 +2886,24 @@
}
@override
+ bool isEquivalentTo(DartType other) {
+ if (other is TypeParameterTypeImpl && element == other.element) {
+ if (_comparingBounds) {
+ // If we're comparing bounds already, then we only need type variable
+ // equality.
+ return true;
+ }
+ _comparingBounds = true;
+ try {
+ return bound.isEquivalentTo(other.bound);
+ } finally {
+ _comparingBounds = false;
+ }
+ }
+ return false;
+ }
+
+ @override
bool isMoreSpecificThan(DartType s,
[bool withDynamic = false, Set<Element> visitedElements]) {
//
diff --git a/pkg/analyzer/lib/src/dart/resolver/inheritance_manager.dart b/pkg/analyzer/lib/src/dart/resolver/inheritance_manager.dart
index 8995708..cb19d0f 100644
--- a/pkg/analyzer/lib/src/dart/resolver/inheritance_manager.dart
+++ b/pkg/analyzer/lib/src/dart/resolver/inheritance_manager.dart
@@ -460,6 +460,119 @@
}
/**
+ * Given some array of [ExecutableElement]s, this method creates a synthetic element as
+ * described in 8.1.1:
+ *
+ * Let <i>numberOfPositionals</i>(<i>f</i>) denote the number of positional parameters of a
+ * function <i>f</i>, and let <i>numberOfRequiredParams</i>(<i>f</i>) denote the number of
+ * required parameters of a function <i>f</i>. Furthermore, let <i>s</i> denote the set of all
+ * named parameters of the <i>m<sub>1</sub>, …, m<sub>k</sub></i>. Then let
+ * * <i>h = max(numberOfPositionals(m<sub>i</sub>)),</i>
+ * * <i>r = min(numberOfRequiredParams(m<sub>i</sub>)), for all <i>i</i>, 1 <= i <= k.</i>
+ * Then <i>I</i> has a method named <i>n</i>, with <i>r</i> required parameters of type
+ * <b>dynamic</b>, <i>h</i> positional parameters of type <b>dynamic</b>, named parameters
+ * <i>s</i> of type <b>dynamic</b> and return type <b>dynamic</b>.
+ *
+ */
+ ExecutableElement _computeMergedExecutableElement(
+ List<ExecutableElement> elementArrayToMerge) {
+ int h = _getNumOfPositionalParameters(elementArrayToMerge[0]);
+ int r = _getNumOfRequiredParameters(elementArrayToMerge[0]);
+ Set<String> namedParametersList = new HashSet<String>();
+ for (int i = 1; i < elementArrayToMerge.length; i++) {
+ ExecutableElement element = elementArrayToMerge[i];
+ int numOfPositionalParams = _getNumOfPositionalParameters(element);
+ if (h < numOfPositionalParams) {
+ h = numOfPositionalParams;
+ }
+ int numOfRequiredParams = _getNumOfRequiredParameters(element);
+ if (r > numOfRequiredParams) {
+ r = numOfRequiredParams;
+ }
+ namedParametersList.addAll(_getNamedParameterNames(element));
+ }
+ return _createSyntheticExecutableElement(
+ elementArrayToMerge,
+ elementArrayToMerge[0].displayName,
+ r,
+ h - r,
+ new List.from(namedParametersList));
+ }
+
+ /**
+ * Used by [computeMergedExecutableElement] to actually create the
+ * synthetic element.
+ *
+ * @param elementArrayToMerge the array used to create the synthetic element
+ * @param name the name of the method, getter or setter
+ * @param numOfRequiredParameters the number of required parameters
+ * @param numOfPositionalParameters the number of positional parameters
+ * @param namedParameters the list of [String]s that are the named parameters
+ * @return the created synthetic element
+ */
+ ExecutableElement _createSyntheticExecutableElement(
+ List<ExecutableElement> elementArrayToMerge,
+ String name,
+ int numOfRequiredParameters,
+ int numOfPositionalParameters,
+ List<String> namedParameters) {
+ DynamicTypeImpl dynamicType = DynamicTypeImpl.instance;
+ DartType bottomType = _library.context.analysisOptions.strongMode
+ ? BottomTypeImpl.instance
+ : dynamicType;
+ SimpleIdentifier nameIdentifier = astFactory
+ .simpleIdentifier(new StringToken(TokenType.IDENTIFIER, name, 0));
+ ExecutableElementImpl executable;
+ ExecutableElement elementToMerge = elementArrayToMerge[0];
+ if (elementToMerge is MethodElement) {
+ MultiplyInheritedMethodElementImpl unionedMethod =
+ new MultiplyInheritedMethodElementImpl(nameIdentifier);
+ unionedMethod.inheritedElements = elementArrayToMerge;
+ executable = unionedMethod;
+ } else if (elementToMerge is PropertyAccessorElement) {
+ MultiplyInheritedPropertyAccessorElementImpl unionedPropertyAccessor =
+ new MultiplyInheritedPropertyAccessorElementImpl(nameIdentifier);
+ unionedPropertyAccessor.getter = elementToMerge.isGetter;
+ unionedPropertyAccessor.setter = elementToMerge.isSetter;
+ unionedPropertyAccessor.inheritedElements = elementArrayToMerge;
+ executable = unionedPropertyAccessor;
+ } else {
+ throw new AnalysisException(
+ 'Invalid class of element in merge: ${elementToMerge.runtimeType}');
+ }
+ int numOfParameters = numOfRequiredParameters +
+ numOfPositionalParameters +
+ namedParameters.length;
+ List<ParameterElement> parameters =
+ new List<ParameterElement>(numOfParameters);
+ int i = 0;
+ for (int j = 0; j < numOfRequiredParameters; j++, i++) {
+ ParameterElementImpl parameter = new ParameterElementImpl("", 0);
+ parameter.type = bottomType;
+ parameter.parameterKind = ParameterKind.REQUIRED;
+ parameters[i] = parameter;
+ }
+ for (int k = 0; k < numOfPositionalParameters; k++, i++) {
+ ParameterElementImpl parameter = new ParameterElementImpl("", 0);
+ parameter.type = bottomType;
+ parameter.parameterKind = ParameterKind.POSITIONAL;
+ parameters[i] = parameter;
+ }
+ for (int m = 0; m < namedParameters.length; m++, i++) {
+ ParameterElementImpl parameter =
+ new ParameterElementImpl(namedParameters[m], 0);
+ parameter.type = bottomType;
+ parameter.parameterKind = ParameterKind.NAMED;
+ parameters[i] = parameter;
+ }
+ executable.returnType = dynamicType;
+ executable.parameters = parameters;
+ FunctionTypeImpl methodType = new FunctionTypeImpl(executable);
+ executable.type = methodType;
+ return executable;
+ }
+
+ /**
* Collect a list of interface lookup maps whose elements correspond to all of the classes
* directly above [classElt] in the class hierarchy (the direct superclass if any, all
* mixins, and all direct superinterfaces). Each item in the list is the interface lookup map
@@ -911,119 +1024,6 @@
}
/**
- * Given some array of [ExecutableElement]s, this method creates a synthetic element as
- * described in 8.1.1:
- *
- * Let <i>numberOfPositionals</i>(<i>f</i>) denote the number of positional parameters of a
- * function <i>f</i>, and let <i>numberOfRequiredParams</i>(<i>f</i>) denote the number of
- * required parameters of a function <i>f</i>. Furthermore, let <i>s</i> denote the set of all
- * named parameters of the <i>m<sub>1</sub>, …, m<sub>k</sub></i>. Then let
- * * <i>h = max(numberOfPositionals(m<sub>i</sub>)),</i>
- * * <i>r = min(numberOfRequiredParams(m<sub>i</sub>)), for all <i>i</i>, 1 <= i <= k.</i>
- * Then <i>I</i> has a method named <i>n</i>, with <i>r</i> required parameters of type
- * <b>dynamic</b>, <i>h</i> positional parameters of type <b>dynamic</b>, named parameters
- * <i>s</i> of type <b>dynamic</b> and return type <b>dynamic</b>.
- *
- */
- ExecutableElement _computeMergedExecutableElement(
- List<ExecutableElement> elementArrayToMerge) {
- int h = _getNumOfPositionalParameters(elementArrayToMerge[0]);
- int r = _getNumOfRequiredParameters(elementArrayToMerge[0]);
- Set<String> namedParametersList = new HashSet<String>();
- for (int i = 1; i < elementArrayToMerge.length; i++) {
- ExecutableElement element = elementArrayToMerge[i];
- int numOfPositionalParams = _getNumOfPositionalParameters(element);
- if (h < numOfPositionalParams) {
- h = numOfPositionalParams;
- }
- int numOfRequiredParams = _getNumOfRequiredParameters(element);
- if (r > numOfRequiredParams) {
- r = numOfRequiredParams;
- }
- namedParametersList.addAll(_getNamedParameterNames(element));
- }
- return _createSyntheticExecutableElement(
- elementArrayToMerge,
- elementArrayToMerge[0].displayName,
- r,
- h - r,
- new List.from(namedParametersList));
- }
-
- /**
- * Used by [computeMergedExecutableElement] to actually create the
- * synthetic element.
- *
- * @param elementArrayToMerge the array used to create the synthetic element
- * @param name the name of the method, getter or setter
- * @param numOfRequiredParameters the number of required parameters
- * @param numOfPositionalParameters the number of positional parameters
- * @param namedParameters the list of [String]s that are the named parameters
- * @return the created synthetic element
- */
- ExecutableElement _createSyntheticExecutableElement(
- List<ExecutableElement> elementArrayToMerge,
- String name,
- int numOfRequiredParameters,
- int numOfPositionalParameters,
- List<String> namedParameters) {
- DynamicTypeImpl dynamicType = DynamicTypeImpl.instance;
- DartType bottomType = _library.context.analysisOptions.strongMode
- ? BottomTypeImpl.instance
- : dynamicType;
- SimpleIdentifier nameIdentifier = astFactory
- .simpleIdentifier(new StringToken(TokenType.IDENTIFIER, name, 0));
- ExecutableElementImpl executable;
- ExecutableElement elementToMerge = elementArrayToMerge[0];
- if (elementToMerge is MethodElement) {
- MultiplyInheritedMethodElementImpl unionedMethod =
- new MultiplyInheritedMethodElementImpl(nameIdentifier);
- unionedMethod.inheritedElements = elementArrayToMerge;
- executable = unionedMethod;
- } else if (elementToMerge is PropertyAccessorElement) {
- MultiplyInheritedPropertyAccessorElementImpl unionedPropertyAccessor =
- new MultiplyInheritedPropertyAccessorElementImpl(nameIdentifier);
- unionedPropertyAccessor.getter = elementToMerge.isGetter;
- unionedPropertyAccessor.setter = elementToMerge.isSetter;
- unionedPropertyAccessor.inheritedElements = elementArrayToMerge;
- executable = unionedPropertyAccessor;
- } else {
- throw new AnalysisException(
- 'Invalid class of element in merge: ${elementToMerge.runtimeType}');
- }
- int numOfParameters = numOfRequiredParameters +
- numOfPositionalParameters +
- namedParameters.length;
- List<ParameterElement> parameters =
- new List<ParameterElement>(numOfParameters);
- int i = 0;
- for (int j = 0; j < numOfRequiredParameters; j++, i++) {
- ParameterElementImpl parameter = new ParameterElementImpl("", 0);
- parameter.type = bottomType;
- parameter.parameterKind = ParameterKind.REQUIRED;
- parameters[i] = parameter;
- }
- for (int k = 0; k < numOfPositionalParameters; k++, i++) {
- ParameterElementImpl parameter = new ParameterElementImpl("", 0);
- parameter.type = bottomType;
- parameter.parameterKind = ParameterKind.POSITIONAL;
- parameters[i] = parameter;
- }
- for (int m = 0; m < namedParameters.length; m++, i++) {
- ParameterElementImpl parameter =
- new ParameterElementImpl(namedParameters[m], 0);
- parameter.type = bottomType;
- parameter.parameterKind = ParameterKind.NAMED;
- parameters[i] = parameter;
- }
- executable.returnType = dynamicType;
- executable.parameters = parameters;
- FunctionTypeImpl methodType = new FunctionTypeImpl(executable);
- executable.type = methodType;
- return executable;
- }
-
- /**
* Given some [ExecutableElement], return the list of named parameters.
*/
static List<String> _getNamedParameterNames(
@@ -1032,7 +1032,7 @@
List<ParameterElement> parameters = executableElement.parameters;
for (int i = 0; i < parameters.length; i++) {
ParameterElement parameterElement = parameters[i];
- if (parameterElement.parameterKind == ParameterKind.NAMED) {
+ if (parameterElement.isNamed) {
namedParameterNames.add(parameterElement.name);
}
}
@@ -1048,6 +1048,7 @@
List<ParameterElement> parameters = executableElement.parameters;
for (int i = 0; i < parameters.length; i++) {
ParameterElement parameterElement = parameters[i];
+ // ignore: deprecated_member_use
if (parameterElement.parameterKind == parameterKind) {
parameterCount++;
}
diff --git a/pkg/analyzer/lib/src/error/codes.dart b/pkg/analyzer/lib/src/error/codes.dart
index c3cdad5..8e812db 100644
--- a/pkg/analyzer/lib/src/error/codes.dart
+++ b/pkg/analyzer/lib/src/error/codes.dart
@@ -423,6 +423,12 @@
"class.",
"Try renaming either the constructor or the field.");
+ static const CompileTimeErrorCode CONFLICTING_GENERIC_INTERFACES =
+ const CompileTimeErrorCode(
+ 'CONFLICTING_GENERIC_INTERFACES',
+ "The class '{0}' cannot implement both '{1}' and '{2}' because the "
+ "type arguments are different.");
+
/**
* 7. Classes: It is a compile time error if a generic class declares a type
* variable with the same name as the class or any of its members or
diff --git a/pkg/analyzer/lib/src/fasta/ast_builder.dart b/pkg/analyzer/lib/src/fasta/ast_builder.dart
index e9fed4b..5823b35 100644
--- a/pkg/analyzer/lib/src/fasta/ast_builder.dart
+++ b/pkg/analyzer/lib/src/fasta/ast_builder.dart
@@ -38,12 +38,14 @@
messageConstMethod,
messageConstructorWithReturnType,
messageDirectiveAfterDeclaration,
+ messageExpectedStatement,
messageFieldInitializerOutsideConstructor,
messageIllegalAssignmentToNonAssignable,
messageInterpolationInUri,
messageMissingAssignableSelector,
messageNativeClauseShouldBeAnnotation,
- messageStaticConstructor;
+ messageStaticConstructor,
+ templateDuplicateLabelInSwitchStatement;
import 'package:front_end/src/fasta/kernel/kernel_builder.dart'
show Builder, KernelLibraryBuilder, Scope;
import 'package:front_end/src/fasta/quote.dart';
@@ -319,8 +321,28 @@
void endExpressionStatement(Token semicolon) {
assert(optional(';', semicolon));
debugEvent("ExpressionStatement");
-
- push(ast.expressionStatement(pop(), semicolon));
+ Expression expression = pop();
+ if (expression is SuperExpression) {
+ // This error is also reported by the body builder.
+ handleRecoverableError(messageMissingAssignableSelector,
+ expression.beginToken, expression.endToken);
+ }
+ if (expression is SimpleIdentifier &&
+ expression.token?.keyword?.isBuiltInOrPseudo == false) {
+ // This error is also reported by the body builder.
+ handleRecoverableError(
+ messageExpectedStatement, expression.beginToken, expression.endToken);
+ }
+ if (expression is AssignmentExpression) {
+ if (!expression.leftHandSide.isAssignable) {
+ // This error is also reported by the body builder.
+ handleRecoverableError(
+ messageIllegalAssignmentToNonAssignable,
+ expression.leftHandSide.beginToken,
+ expression.leftHandSide.endToken);
+ }
+ }
+ push(ast.expressionStatement(expression, semicolon));
}
@override
@@ -638,13 +660,24 @@
push(variable);
}
+ @override
+ void beginVariablesDeclaration(Token token, Token varFinalOrConst) {
+ debugEvent("beginVariablesDeclaration");
+ if (varFinalOrConst != null) {
+ push(new _Modifiers()..finalConstOrVarKeyword = varFinalOrConst);
+ } else {
+ push(NullValue.Modifiers);
+ }
+ }
+
+ @override
void endVariablesDeclaration(int count, Token semicolon) {
assert(optionalOrNull(';', semicolon));
debugEvent("VariablesDeclaration");
List<VariableDeclaration> variables = popList(count);
+ _Modifiers modifiers = pop(NullValue.Modifiers);
TypeAnnotation type = pop();
- _Modifiers modifiers = pop();
Token keyword = modifiers?.finalConstOrVarKeyword;
List<Annotation> metadata = pop();
Comment comment = _findComment(metadata,
@@ -1160,6 +1193,20 @@
exitLocalScope();
List<SwitchMember> members =
membersList?.expand((members) => members)?.toList() ?? <SwitchMember>[];
+
+ Set<String> labels = new Set<String>();
+ for (SwitchMember member in members) {
+ for (Label label in member.labels) {
+ if (!labels.add(label.label.name)) {
+ handleRecoverableError(
+ templateDuplicateLabelInSwitchStatement
+ .withArguments(label.label.name),
+ label.beginToken,
+ label.beginToken);
+ }
+ }
+ }
+
push(leftBracket);
push(members);
push(rightBracket);
@@ -1357,9 +1404,7 @@
Expression expression = pop();
if (!expression.isAssignable) {
- // TODO(danrubel): The fasta parser does not have enough context to
- // report this error. Consider moving it to the resolution phase
- // or at least to common location that can be shared by all listeners.
+ // This error is also reported by the body builder.
handleRecoverableError(messageMissingAssignableSelector,
expression.endToken, expression.endToken);
}
@@ -1372,9 +1417,7 @@
Expression expression = pop();
if (!expression.isAssignable) {
- // TODO(danrubel): The fasta parser does not have enough context to
- // report this error. Consider moving it to the resolution phase
- // or at least to common location that can be shared by all listeners.
+ // This error is also reported by the body builder.
handleRecoverableError(
messageIllegalAssignmentToNonAssignable, operator, operator);
}
diff --git a/pkg/analyzer/lib/src/fasta/error_converter.dart b/pkg/analyzer/lib/src/fasta/error_converter.dart
index df8586b..c517b31 100644
--- a/pkg/analyzer/lib/src/fasta/error_converter.dart
+++ b/pkg/analyzer/lib/src/fasta/error_converter.dart
@@ -22,19 +22,7 @@
String analyzerCode, int offset, int length, Message message) {
Map<String, dynamic> arguments = message.arguments;
- String stringOrTokenLexeme() {
- var text = arguments['string'];
- if (text == null) {
- text = arguments['name'];
- if (text == null) {
- Token token = arguments['token'];
- if (token != null) {
- text = token.lexeme;
- }
- }
- }
- return text;
- }
+ String lexeme() => (arguments['token'] as Token).lexeme;
switch (analyzerCode) {
case "ABSTRACT_CLASS_MEMBER":
@@ -58,12 +46,11 @@
ParserErrorCode.BREAK_OUTSIDE_OF_LOOP, offset, length);
return;
case "BUILT_IN_IDENTIFIER_AS_TYPE":
- String name = stringOrTokenLexeme();
errorReporter?.reportErrorForOffset(
CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPE,
offset,
length,
- [name]);
+ [lexeme()]);
return;
case "CLASS_IN_CLASS":
errorReporter?.reportErrorForOffset(
@@ -138,6 +125,13 @@
errorReporter?.reportErrorForOffset(
ParserErrorCode.DEFAULT_VALUE_IN_FUNCTION_TYPE, offset, length);
return;
+ case "DUPLICATE_LABEL_IN_SWITCH_STATEMENT":
+ errorReporter?.reportErrorForOffset(
+ ParserErrorCode.DUPLICATE_LABEL_IN_SWITCH_STATEMENT,
+ offset,
+ length,
+ [arguments['string']]);
+ return;
case "COVARIANT_MEMBER":
errorReporter?.reportErrorForOffset(
ParserErrorCode.COVARIANT_MEMBER, offset, length);
@@ -155,9 +149,8 @@
ParserErrorCode.DUPLICATE_DEFERRED, offset, length);
return;
case "DUPLICATED_MODIFIER":
- String text = stringOrTokenLexeme();
errorReporter?.reportErrorForOffset(
- ParserErrorCode.DUPLICATED_MODIFIER, offset, length, [text]);
+ ParserErrorCode.DUPLICATED_MODIFIER, offset, length, [lexeme()]);
return;
case "DUPLICATE_PREFIX":
errorReporter?.reportErrorForOffset(
@@ -190,9 +183,8 @@
ParserErrorCode.EXPECTED_STRING_LITERAL, offset, length);
return;
case "EXPECTED_TOKEN":
- String text = stringOrTokenLexeme();
- errorReporter?.reportErrorForOffset(
- ParserErrorCode.EXPECTED_TOKEN, offset, length, [text]);
+ errorReporter?.reportErrorForOffset(ParserErrorCode.EXPECTED_TOKEN,
+ offset, length, [arguments['string']]);
return;
case "EXPECTED_TYPE_NAME":
errorReporter?.reportErrorForOffset(
@@ -241,9 +233,8 @@
ParserErrorCode.EXTERNAL_TYPEDEF, offset, length);
return;
case "EXTRANEOUS_MODIFIER":
- String text = stringOrTokenLexeme();
errorReporter?.reportErrorForOffset(
- ParserErrorCode.EXTRANEOUS_MODIFIER, offset, length, [text]);
+ ParserErrorCode.EXTRANEOUS_MODIFIER, offset, length, [lexeme()]);
return;
case "FACTORY_TOP_LEVEL_DECLARATION":
errorReporter?.reportErrorForOffset(
@@ -354,9 +345,8 @@
offset, length);
return;
case "INVALID_OPERATOR":
- String text = stringOrTokenLexeme();
errorReporter?.reportErrorForOffset(
- ParserErrorCode.INVALID_OPERATOR, offset, length, [text]);
+ ParserErrorCode.INVALID_OPERATOR, offset, length, [lexeme()]);
return;
case "INVALID_OPERATOR_FOR_SUPER":
_reportByCode(ParserErrorCode.INVALID_OPERATOR_FOR_SUPER, message,
@@ -426,6 +416,10 @@
errorReporter?.reportErrorForOffset(
ParserErrorCode.MISSING_STAR_AFTER_SYNC, offset, length);
return;
+ case "MISSING_STATEMENT":
+ errorReporter?.reportErrorForOffset(
+ ParserErrorCode.MISSING_STATEMENT, offset, length);
+ return;
case "MISSING_TYPEDEF_PARAMETERS":
errorReporter?.reportErrorForOffset(
ParserErrorCode.MISSING_TYPEDEF_PARAMETERS, offset, length);
@@ -521,12 +515,11 @@
ParserErrorCode.TOP_LEVEL_OPERATOR, offset, length);
return;
case "TYPE_ARGUMENTS_ON_TYPE_VARIABLE":
- String text = stringOrTokenLexeme();
errorReporter?.reportErrorForOffset(
ParserErrorCode.TYPE_ARGUMENTS_ON_TYPE_VARIABLE,
offset,
length,
- [text]);
+ [arguments['name']]);
return;
case "TYPEDEF_IN_CLASS":
errorReporter?.reportErrorForOffset(
@@ -545,9 +538,8 @@
StaticTypeWarningCode.UNDEFINED_SETTER, offset, length);
return;
case "UNEXPECTED_TOKEN":
- String text = stringOrTokenLexeme();
errorReporter?.reportErrorForOffset(
- ParserErrorCode.UNEXPECTED_TOKEN, offset, length, [text]);
+ ParserErrorCode.UNEXPECTED_TOKEN, offset, length, [lexeme()]);
return;
case "UNTERMINATED_MULTI_LINE_COMMENT":
errorReporter?.reportErrorForOffset(
diff --git a/pkg/analyzer/lib/src/generated/element_resolver.dart b/pkg/analyzer/lib/src/generated/element_resolver.dart
index c3376a6..7b3f436 100644
--- a/pkg/analyzer/lib/src/generated/element_resolver.dart
+++ b/pkg/analyzer/lib/src/generated/element_resolver.dart
@@ -5,7 +5,6 @@
import 'dart:collection';
import 'package:analyzer/dart/ast/ast.dart';
-import 'package:analyzer/dart/ast/ast_factory.dart';
import 'package:analyzer/dart/ast/syntactic_entity.dart';
import 'package:analyzer/dart/ast/token.dart';
import 'package:analyzer/dart/ast/visitor.dart';
@@ -18,9 +17,7 @@
IdentifierImpl,
PrefixedIdentifierImpl,
SimpleIdentifierImpl;
-import 'package:analyzer/src/dart/ast/ast_factory.dart';
import 'package:analyzer/src/dart/ast/token.dart';
-import 'package:analyzer/src/dart/ast/utilities.dart';
import 'package:analyzer/src/dart/element/element.dart';
import 'package:analyzer/src/dart/element/type.dart';
import 'package:analyzer/src/error/codes.dart';
@@ -124,11 +121,6 @@
TypePromotionManager _promoteManager;
/**
- * Gets an instance of [AstFactory] based on the standard AST implementation.
- */
- AstFactory _astFactory;
-
- /**
* Initialize a newly created visitor to work for the given [_resolver] to
* resolve the nodes in a compilation unit.
*/
@@ -140,7 +132,6 @@
_typeType = _resolver.typeProvider.typeType;
_subtypeManager = new SubtypeManager();
_promoteManager = _resolver.promoteManager;
- _astFactory = new AstFactoryImpl();
}
/**
@@ -626,23 +617,9 @@
}
Element staticElement;
Element propagatedElement;
- bool previewDart2 = _definingLibrary.context.analysisOptions.previewDart2;
if (target == null) {
staticElement = _resolveInvokedElement(methodName);
propagatedElement = null;
-
- if (previewDart2 &&
- staticElement != null &&
- staticElement is ClassElement) {
- // cases: C() or C<>()
- InstanceCreationExpression instanceCreationExpression =
- _handleImplicitConstructorCase(node, staticElement);
- if (instanceCreationExpression != null) {
- // If a non-null is returned, the node was created, replaced, so we
- // can return here.
- return null;
- }
- }
} else if (methodName.name == FunctionElement.LOAD_LIBRARY_NAME &&
_isDeferredPrefix(target)) {
if (node.operator.type == TokenType.QUESTION_PERIOD) {
@@ -667,28 +644,6 @@
bool isConditional = node.operator.type == TokenType.QUESTION_PERIOD;
ClassElement typeReference = getTypeReference(target);
- if (previewDart2) {
- InstanceCreationExpression instanceCreationExpression;
- if ((target is SimpleIdentifier &&
- target.staticElement is PrefixElement) ||
- (target is PrefixedIdentifier &&
- target.prefix.staticElement is PrefixElement)) {
- // case: p.C(), p.C<>() or p.C.n()
- instanceCreationExpression =
- _handlePrefixedImplicitConstructorCase(node, target);
- } else if (typeReference is ClassElement) {
- // case: C.n()
- instanceCreationExpression =
- _handleImplicitConstructorCase(node, typeReference);
- }
-
- if (instanceCreationExpression != null) {
- // If a non-null is returned, the node was created, replaced, so we
- // can return here.
- return null;
- }
- }
-
if (typeReference != null) {
if (node.isCascaded) {
typeReference = _typeType.element;
@@ -1630,216 +1585,6 @@
}
/**
- * Return the newly created and replaced [InstanceCreationExpression], or
- * `null` if this is not an implicit constructor case.
- *
- * This method covers the "ClassName()" and "ClassName.namedConstructor()"
- * cases for the prefixed cases, i.e. "libraryPrefix.ClassName()" and
- * "libraryPrefix.ClassName.namedConstructor()" see
- * [_handlePrefixedImplicitConstructorCase].
- */
- InstanceCreationExpression _handleImplicitConstructorCase(
- MethodInvocation node, ClassElement classElement) {
- // If target == null, then this is the unnamed constructor, A(), case,
- // otherwise it is the named constructor A.name() case.
- Expression target = node.realTarget;
- bool isNamedConstructorCase = target != null;
-
- // If we are in the named constructor case, verify that the target is a
- // SimpleIdentifier and that the operator is '.'
- SimpleIdentifier targetSimpleId;
- if (isNamedConstructorCase) {
- if (target is SimpleIdentifier &&
- node.operator.type == TokenType.PERIOD) {
- targetSimpleId = target;
- } else {
- // Return null as this is not an implicit constructor case.
- return null;
- }
- }
-
- // Before any ASTs are created, look up ConstructorElement to see if we
- // should construct an [InstanceCreationExpression] to replace this
- // [MethodInvocation].
- InterfaceType classType = classElement.type;
- if (node.typeArguments != null) {
- int parameterCount = classType.typeParameters.length;
- int argumentCount = node.typeArguments.arguments.length;
- if (parameterCount == argumentCount) {
- // TODO(brianwilkerson) More gracefully handle the case where the counts
- // are different.
- List<DartType> typeArguments = node.typeArguments.arguments
- .map((TypeAnnotation type) => type.type)
- .toList();
- classType = classType.instantiate(typeArguments);
- }
- } else {
- int parameterCount = classType.typeParameters.length;
- if (parameterCount > 0) {
- List<DartType> typeArguments =
- new List<DartType>.filled(parameterCount, _dynamicType);
- classType = classType.instantiate(typeArguments);
- }
- }
- ConstructorElement constructorElt;
- if (isNamedConstructorCase) {
- constructorElt =
- classType.lookUpConstructor(node.methodName.name, _definingLibrary);
- } else {
- constructorElt = classType.lookUpConstructor(null, _definingLibrary);
- }
- // If the constructor was not looked up, return `null` so resulting
- // resolution, such as error messages, will proceed as a [MethodInvocation].
- if (constructorElt == null) {
- return null;
- }
-
- // Create the Constructor name, in each case: A[.named]()
- TypeName typeName;
- ConstructorName constructorName;
- if (isNamedConstructorCase) {
- // A.named()
- typeName = _astFactory.typeName(targetSimpleId, node.typeArguments);
- typeName.type = classType;
- constructorName =
- _astFactory.constructorName(typeName, node.operator, node.methodName);
- } else {
- // A()
- node.methodName.staticElement = classElement;
- typeName = _astFactory.typeName(node.methodName, node.typeArguments);
- typeName.type = classType;
- constructorName = _astFactory.constructorName(typeName, null, null);
- }
- InstanceCreationExpression instanceCreationExpression = _astFactory
- .instanceCreationExpression(null, constructorName, node.argumentList);
-
- if (isNamedConstructorCase) {
- constructorName.name.staticElement = constructorElt;
- }
- constructorName.staticElement = constructorElt;
- instanceCreationExpression.staticElement = constructorElt;
- instanceCreationExpression.staticType = classType;
-
- node.argumentList.correspondingStaticParameters =
- _computeCorrespondingParameters(node.argumentList, constructorElt.type);
-
- // Finally, do the node replacement, true is returned iff the replacement
- // was successful, only return the new node if it was successful.
- if (NodeReplacer.replace(node, instanceCreationExpression)) {
- return instanceCreationExpression;
- }
- return null;
- }
-
- /**
- * Return the newly created and replaced [InstanceCreationExpression], or
- * `null` if this is not an implicit constructor case.
- *
- * This method covers the "libraryPrefix.ClassName()" and
- * "libraryPrefix.ClassName.namedConstructor()" cases for the non-prefixed
- * cases, i.e. "ClassName()" and "ClassName.namedConstructor()" see
- * [_handleImplicitConstructorCase].
- */
- InstanceCreationExpression _handlePrefixedImplicitConstructorCase(
- MethodInvocation node, Identifier libraryPrefixId) {
- bool isNamedConstructorCase = libraryPrefixId is PrefixedIdentifier;
- ClassElement classElement;
- if (isNamedConstructorCase) {
- var elt = (libraryPrefixId as PrefixedIdentifier).staticElement;
- if (elt is ClassElement) {
- classElement = elt;
- }
- } else {
- LibraryElement libraryElement = _getImportedLibrary(node.target);
- if (libraryElement == null) {
- // We cannot resolve the import to find the library, so we won't be able
- // to find the class to see whether the method is actually a constructor.
- return null;
- }
- classElement = libraryElement.getType(node.methodName.name);
- }
-
- // Before any ASTs are created, look up ConstructorElement to see if we
- // should construct an [InstanceCreationExpression] to replace this
- // [MethodInvocation].
- if (classElement == null) {
- return null;
- }
- InterfaceType classType = classElement.type;
- if (node.typeArguments != null) {
- int parameterCount = classType.typeParameters.length;
- int argumentCount = node.typeArguments.arguments.length;
- if (parameterCount == argumentCount) {
- // TODO(brianwilkerson) More gracefully handle the case where the counts
- // are different.
- List<DartType> typeArguments = node.typeArguments.arguments
- .map((TypeAnnotation type) => type.type)
- .toList();
- classType = classType.instantiate(typeArguments);
- }
- } else {
- int parameterCount = classType.typeParameters.length;
- if (parameterCount > 0) {
- List<DartType> typeArguments =
- new List<DartType>.filled(parameterCount, _dynamicType);
- classType = classType.instantiate(typeArguments);
- }
- }
- ConstructorElement constructorElt;
- if (isNamedConstructorCase) {
- constructorElt =
- classType.lookUpConstructor(node.methodName.name, _definingLibrary);
- } else {
- constructorElt = classType.lookUpConstructor(null, _definingLibrary);
- }
- // If the constructor was not looked up, return `null` so resulting
- // resolution, such as error messages, will proceed as a [MethodInvocation].
- if (constructorElt == null) {
- return null;
- }
-
- // Create the Constructor name, in each case: A[.named]()
- TypeName typeName;
- ConstructorName constructorName;
- if (isNamedConstructorCase) {
- // p.A.n()
- // libraryPrefixId is a PrefixedIdentifier in this case
- typeName = _astFactory.typeName(libraryPrefixId, node.typeArguments);
- typeName.type = classType;
- constructorName =
- _astFactory.constructorName(typeName, node.operator, node.methodName);
- } else {
- // p.A()
- // libraryPrefixId is a SimpleIdentifier in this case
- node.methodName.staticElement = classElement;
- PrefixedIdentifier prefixedIdentifier = _astFactory.prefixedIdentifier(
- libraryPrefixId, node.operator, node.methodName);
- typeName = _astFactory.typeName(prefixedIdentifier, node.typeArguments);
- typeName.type = classType;
- constructorName = _astFactory.constructorName(typeName, null, null);
- }
- InstanceCreationExpression instanceCreationExpression = _astFactory
- .instanceCreationExpression(null, constructorName, node.argumentList);
-
- if (isNamedConstructorCase) {
- constructorName.name.staticElement = constructorElt;
- }
- constructorName.staticElement = constructorElt;
- instanceCreationExpression.staticElement = constructorElt;
- instanceCreationExpression.staticType = classType;
-
- node.argumentList.correspondingStaticParameters =
- _computeCorrespondingParameters(node.argumentList, constructorElt.type);
-
- // Finally, do the node replacement, true is returned iff the replacement
- // was successful, only return the new node if it was successful.
- if (NodeReplacer.replace(node, instanceCreationExpression)) {
- return instanceCreationExpression;
- }
- return null;
- }
-
- /**
* Return `true` if the given [element] is or inherits from a class marked
* with `@proxy`.
*
diff --git a/pkg/analyzer/lib/src/generated/error_verifier.dart b/pkg/analyzer/lib/src/generated/error_verifier.dart
index abd1238..b3490e1 100644
--- a/pkg/analyzer/lib/src/generated/error_verifier.dart
+++ b/pkg/analyzer/lib/src/generated/error_verifier.dart
@@ -29,7 +29,6 @@
import 'package:analyzer/src/generated/resolver.dart';
import 'package:analyzer/src/generated/sdk.dart' show DartSdk, SdkLibrary;
import 'package:analyzer/src/generated/source.dart';
-import 'package:analyzer/src/generated/utilities_dart.dart';
import 'package:analyzer/src/task/dart.dart';
/**
@@ -1329,6 +1328,7 @@
if (_options.strongMode) {
_checkForMixinWithConflictingPrivateMember(withClause, superclass);
+ _checkForConflictingGenerics(node);
}
}
}
@@ -1944,8 +1944,7 @@
AstNode parameterLocationToSelect = null;
for (int i = 0; i < parameters.length; i++) {
ParameterElement parameter = parameters[i];
- if (parameter.parameterKind == ParameterKind.NAMED &&
- overriddenName == parameter.name) {
+ if (parameter.isNamed && overriddenName == parameter.name) {
parameterToSelect = parameter;
parameterLocationToSelect = parameterLocations[i];
break;
@@ -1978,13 +1977,13 @@
List<ParameterElement> overriddenPEs = baseElement.parameters;
for (int i = 0; i < parameters.length; i++) {
ParameterElement parameter = parameters[i];
- if (parameter.parameterKind.isOptional) {
+ if (parameter.isOptional) {
formalParameters.add(parameterLocations[i]);
parameterElts.add(parameter as ParameterElementImpl);
}
}
for (ParameterElement parameterElt in overriddenPEs) {
- if (parameterElt.parameterKind.isOptional) {
+ if (parameterElt.isOptional) {
if (parameterElt is ParameterElementImpl) {
overriddenParameterElts.add(parameterElt);
}
@@ -1995,7 +1994,7 @@
// overridden optional parameter elements.
//
if (parameterElts.length > 0) {
- if (parameterElts[0].parameterKind == ParameterKind.NAMED) {
+ if (parameterElts[0].isNamed) {
// Named parameters, consider the names when matching the parameterElts
// to the overriddenParameterElts
for (int i = 0; i < parameterElts.length; i++) {
@@ -2817,6 +2816,34 @@
}
}
+ void _checkForConflictingGenerics(NamedCompilationUnitMember node) {
+ var visitedClasses = <ClassElement>[];
+ var interfaces = <ClassElement, InterfaceType>{};
+ void visit(InterfaceType type) {
+ if (type == null) return;
+ var element = type.element;
+ if (visitedClasses.contains(element)) return;
+ visitedClasses.add(element);
+ if (element.typeParameters.isNotEmpty) {
+ var oldType = interfaces[element];
+ if (oldType == null) {
+ interfaces[element] = type;
+ } else if (oldType != type) {
+ _errorReporter.reportErrorForNode(
+ CompileTimeErrorCode.CONFLICTING_GENERIC_INTERFACES,
+ node,
+ [_enclosingClass.name, oldType, type]);
+ }
+ }
+ visit(type.superclass);
+ type.mixins.forEach(visit);
+ type.interfaces.forEach(visit);
+ visitedClasses.removeLast();
+ }
+
+ visit(_enclosingClass.type);
+ }
+
/**
* Verify that the [_enclosingClass] does not have a method and getter pair
* with the same name on, via inheritance.
@@ -4763,7 +4790,7 @@
void _checkForMissingJSLibAnnotation(Annotation node) {
if (resolutionMap.elementAnnotationForAnnotation(node)?.isJS ?? false) {
- if (_currentLibrary.isJS != true) {
+ if (_currentLibrary.hasJS != true) {
_errorReporter.reportErrorForNode(
HintCode.MISSING_JS_LIB_ANNOTATION, node);
}
@@ -5308,7 +5335,7 @@
NodeList<FormalParameter> formalParameters = parameterList.parameters;
for (FormalParameter formalParameter in formalParameters) {
- if (formalParameter.kind.isOptional) {
+ if (formalParameter.isOptional) {
_errorReporter.reportErrorForNode(
CompileTimeErrorCode.OPTIONAL_PARAMETER_IN_OPERATOR,
formalParameter);
@@ -5337,7 +5364,7 @@
*/
void _checkForPrivateOptionalParameter(FormalParameter parameter) {
// should be named parameter
- if (parameter.kind != ParameterKind.NAMED) {
+ if (!parameter.isNamed) {
return;
}
// name should start with '_'
@@ -5951,6 +5978,31 @@
[enclosingElement.name]);
}
+ /**
+ * Check for situations where the result of a method or function is used, when
+ * it returns 'void'. Or, in rare cases, when other types of expressions are
+ * void, such as identifiers.
+ *
+ * See [StaticWarningCode.USE_OF_VOID_RESULT].
+ */
+ bool _checkForUseOfVoidResult(Expression expression) {
+ if (expression == null ||
+ !identical(expression.staticType, VoidTypeImpl.instance)) {
+ return false;
+ }
+
+ if (expression is MethodInvocation) {
+ SimpleIdentifier methodName = expression.methodName;
+ _errorReporter.reportErrorForNode(
+ StaticWarningCode.USE_OF_VOID_RESULT, methodName, []);
+ } else {
+ _errorReporter.reportErrorForNode(
+ StaticWarningCode.USE_OF_VOID_RESULT, expression, []);
+ }
+
+ return true;
+ }
+
void _checkForValidField(FieldFormalParameter parameter) {
AstNode parent2 = parameter.parent?.parent;
if (parent2 is! ConstructorDeclaration &&
@@ -6086,8 +6138,7 @@
}
NodeList<FormalParameter> parameters = parameterList.parameters;
- if (parameters.length != 1 ||
- parameters[0].kind != ParameterKind.REQUIRED) {
+ if (parameters.length != 1 || !parameters[0].isRequired) {
_errorReporter.reportErrorForNode(
CompileTimeErrorCode.WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER,
setterName);
@@ -6214,27 +6265,31 @@
ClassElementImpl.collectAllSupertypes(
supertypesForMixinInference, supertype, type);
for (var typeName in withClause.mixinTypes) {
- if (typeName.typeArguments != null) continue;
var mixinElement = typeName.name.staticElement;
if (mixinElement is ClassElement) {
- var mixinSupertypeConstraints =
- _typeSystem.gatherMixinSupertypeConstraints(mixinElement);
- if (mixinSupertypeConstraints.isNotEmpty) {
- var matchingInterfaceTypes = _findInterfaceTypesForConstraints(
- typeName, mixinSupertypeConstraints, supertypesForMixinInference);
- if (matchingInterfaceTypes != null) {
- // Try to pattern match matchingInterfaceType against
- // mixinSupertypeConstraint to find the correct set of type
- // parameters to apply to the mixin.
- var matchedType = _typeSystem.matchSupertypeConstraints(
- mixinElement,
+ if (typeName.typeArguments == null) {
+ var mixinSupertypeConstraints =
+ _typeSystem.gatherMixinSupertypeConstraints(mixinElement);
+ if (mixinSupertypeConstraints.isNotEmpty) {
+ var matchingInterfaceTypes = _findInterfaceTypesForConstraints(
+ typeName,
mixinSupertypeConstraints,
- matchingInterfaceTypes);
- if (matchedType == null) {
- _errorReporter.reportErrorForToken(
- CompileTimeErrorCode.MIXIN_INFERENCE_NO_POSSIBLE_SUBSTITUTION,
- typeName.name.beginToken,
- [typeName]);
+ supertypesForMixinInference);
+ if (matchingInterfaceTypes != null) {
+ // Try to pattern match matchingInterfaceType against
+ // mixinSupertypeConstraint to find the correct set of type
+ // parameters to apply to the mixin.
+ var matchedType = _typeSystem.matchSupertypeConstraints(
+ mixinElement,
+ mixinSupertypeConstraints,
+ matchingInterfaceTypes);
+ if (matchedType == null) {
+ _errorReporter.reportErrorForToken(
+ CompileTimeErrorCode
+ .MIXIN_INFERENCE_NO_POSSIBLE_SUBSTITUTION,
+ typeName.name.beginToken,
+ [typeName]);
+ }
}
}
}
@@ -6309,31 +6364,6 @@
}
}
- /**
- * Check for situations where the result of a method or function is used, when
- * it returns 'void'. Or, in rare cases, when other types of expressions are
- * void, such as identifiers.
- *
- * See [StaticWarningCode.USE_OF_VOID_RESULT].
- */
- bool _checkForUseOfVoidResult(Expression expression) {
- if (expression == null ||
- !identical(expression.staticType, VoidTypeImpl.instance)) {
- return false;
- }
-
- if (expression is MethodInvocation) {
- SimpleIdentifier methodName = expression.methodName;
- _errorReporter.reportErrorForNode(
- StaticWarningCode.USE_OF_VOID_RESULT, methodName, []);
- } else {
- _errorReporter.reportErrorForNode(
- StaticWarningCode.USE_OF_VOID_RESULT, expression, []);
- }
-
- return true;
- }
-
DartType _computeReturnTypeForMethod(Expression returnExpression) {
// This method should never be called for generators, since generators are
// never allowed to contain return statements with expressions.
@@ -6360,24 +6390,6 @@
isDeclarationCast: isDeclarationCast);
}
- List<InterfaceType> _findInterfaceTypesForConstraints(
- TypeName mixin,
- List<InterfaceType> supertypeConstraints,
- List<InterfaceType> interfaceTypes) {
- var result = <InterfaceType>[];
- for (var constraint in supertypeConstraints) {
- var interfaceType =
- _findInterfaceTypeForMixin(mixin, constraint, interfaceTypes);
- if (interfaceType == null) {
- // No matching interface type found, so inference fails. The error has
- // already been reported.
- return null;
- }
- result.add(interfaceType);
- }
- return result;
- }
-
InterfaceType _findInterfaceTypeForMixin(TypeName mixin,
InterfaceType supertypeConstraint, List<InterfaceType> interfaceTypes) {
var element = supertypeConstraint.element;
@@ -6405,6 +6417,24 @@
return foundInterfaceType;
}
+ List<InterfaceType> _findInterfaceTypesForConstraints(
+ TypeName mixin,
+ List<InterfaceType> supertypeConstraints,
+ List<InterfaceType> interfaceTypes) {
+ var result = <InterfaceType>[];
+ for (var constraint in supertypeConstraints) {
+ var interfaceType =
+ _findInterfaceTypeForMixin(mixin, constraint, interfaceTypes);
+ if (interfaceType == null) {
+ // No matching interface type found, so inference fails. The error has
+ // already been reported.
+ return null;
+ }
+ result.add(interfaceType);
+ }
+ return result;
+ }
+
MethodElement _findOverriddenMemberThatMustCallSuper(MethodDeclaration node) {
ExecutableElement overriddenMember = _getOverriddenMember(node.element);
List<ExecutableElement> seen = <ExecutableElement>[];
@@ -7103,7 +7133,7 @@
DartType type, ArgumentList argumentList, AstNode node) {
if (type is FunctionType) {
for (ParameterElement parameter in type.parameters) {
- if (parameter.parameterKind == ParameterKind.NAMED) {
+ if (parameter.isNamed) {
ElementAnnotationImpl annotation = _getRequiredAnnotation(parameter);
if (annotation != null) {
String parameterName = parameter.name;
diff --git a/pkg/analyzer/lib/src/generated/resolver.dart b/pkg/analyzer/lib/src/generated/resolver.dart
index d580ab9..81cc956 100644
--- a/pkg/analyzer/lib/src/generated/resolver.dart
+++ b/pkg/analyzer/lib/src/generated/resolver.dart
@@ -7,6 +7,7 @@
import 'dart:collection';
import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer/dart/ast/ast_factory.dart';
import 'package:analyzer/dart/ast/standard_resolution_map.dart';
import 'package:analyzer/dart/ast/token.dart';
import 'package:analyzer/dart/ast/visitor.dart';
@@ -16,6 +17,7 @@
import 'package:analyzer/error/listener.dart';
import 'package:analyzer/exception/exception.dart';
import 'package:analyzer/src/dart/ast/ast.dart';
+import 'package:analyzer/src/dart/ast/ast_factory.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' show ConstructorMember;
@@ -31,7 +33,6 @@
import 'package:analyzer/src/generated/static_type_analyzer.dart';
import 'package:analyzer/src/generated/testing/element_factory.dart';
import 'package:analyzer/src/generated/type_system.dart';
-import 'package:analyzer/src/generated/utilities_dart.dart';
import 'package:path/path.dart' as path;
export 'package:analyzer/src/dart/resolver/inheritance_manager.dart';
@@ -39,6 +40,150 @@
export 'package:analyzer/src/generated/type_system.dart';
/**
+ * A visitor that will re-write an AST to support the optional `new` and `const`
+ * feature.
+ */
+class AstRewriteVisitor extends ScopedVisitor {
+ /**
+ * Initialize a newly created visitor.
+ */
+ AstRewriteVisitor(LibraryElement definingLibrary, Source source,
+ TypeProvider typeProvider, AnalysisErrorListener errorListener,
+ {Scope nameScope})
+ : super(definingLibrary, source, typeProvider, errorListener,
+ nameScope: nameScope);
+
+ @override
+ Object visitMethodInvocation(MethodInvocation node) {
+ super.visitMethodInvocation(node);
+
+ SimpleIdentifier methodName = node.methodName;
+ if (methodName.isSynthetic) {
+ // This isn't a constructor invocation because the method name is
+ // synthetic.
+ return null;
+ }
+
+ Expression target = node.target;
+ if (target == null) {
+ // Possible cases: C() or C<>()
+ if (node.realTarget != null) {
+ // This isn't a constructor invocation because it's in a cascade.
+ return null;
+ }
+ Element element = nameScope.lookup(methodName, definingLibrary);
+ if (element is ClassElement) {
+ AstFactory astFactory = new AstFactoryImpl();
+ TypeName typeName = astFactory.typeName(methodName, node.typeArguments);
+ InstanceCreationExpression instanceCreationExpression =
+ astFactory.instanceCreationExpression(
+ null,
+ astFactory.constructorName(typeName, null, null),
+ node.argumentList);
+ DartType type = _getType(element, node.typeArguments);
+ methodName.staticElement = element;
+ methodName.staticType = type;
+ typeName.type = type;
+ NodeReplacer.replace(node, instanceCreationExpression);
+ }
+ } else if (target is SimpleIdentifier) {
+ // Possible cases: C.n(), p.C() or p.C<>()
+ if (node.operator.type == TokenType.QUESTION_PERIOD) {
+ // This isn't a constructor invocation because a null aware operator is
+ // being used.
+ }
+ Element element = nameScope.lookup(target, definingLibrary);
+ if (element is ClassElement) {
+ // Possible case: C.n()
+ if (element.getNamedConstructor(methodName.name) != null) {
+ AstFactory astFactory = new AstFactoryImpl();
+ TypeName typeName = astFactory.typeName(target, node.typeArguments);
+ InstanceCreationExpression instanceCreationExpression =
+ astFactory.instanceCreationExpression(
+ null,
+ astFactory.constructorName(
+ typeName, node.operator, methodName),
+ node.argumentList);
+ DartType type = _getType(element, node.typeArguments);
+ methodName.staticElement = element;
+ methodName.staticType = type;
+ typeName.type = type;
+ NodeReplacer.replace(node, instanceCreationExpression);
+ }
+ } else if (element is PrefixElement) {
+ // Possible cases: p.C() or p.C<>()
+ AstFactory astFactory = new AstFactoryImpl();
+ Identifier identifier = astFactory.prefixedIdentifier(
+ astFactory.simpleIdentifier(target.token),
+ null,
+ astFactory.simpleIdentifier(methodName.token));
+ Element prefixedElement = nameScope.lookup(identifier, definingLibrary);
+ if (prefixedElement is ClassElement) {
+ TypeName typeName = astFactory.typeName(
+ astFactory.prefixedIdentifier(target, node.operator, methodName),
+ node.typeArguments);
+ InstanceCreationExpression instanceCreationExpression =
+ astFactory.instanceCreationExpression(
+ null,
+ astFactory.constructorName(typeName, null, null),
+ node.argumentList);
+ DartType type = _getType(prefixedElement, node.typeArguments);
+ methodName.staticElement = element;
+ methodName.staticType = type;
+ typeName.type = type;
+ NodeReplacer.replace(node, instanceCreationExpression);
+ }
+ }
+ } else if (target is PrefixedIdentifier) {
+ // Possible case: p.C.n()
+ Element prefixElement = nameScope.lookup(target.prefix, definingLibrary);
+ if (prefixElement is PrefixElement) {
+ Element element = nameScope.lookup(target, definingLibrary);
+ if (element is ClassElement) {
+ if (element.getNamedConstructor(methodName.name) != null) {
+ AstFactory astFactory = new AstFactoryImpl();
+ TypeName typeName = astFactory.typeName(target, node.typeArguments);
+ InstanceCreationExpression instanceCreationExpression =
+ astFactory.instanceCreationExpression(
+ null,
+ astFactory.constructorName(
+ typeName, node.operator, methodName),
+ node.argumentList);
+ DartType type = _getType(element, node.typeArguments);
+ methodName.staticElement = element;
+ methodName.staticType = type;
+ typeName.type = type;
+ NodeReplacer.replace(node, instanceCreationExpression);
+ }
+ }
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Return the type of the given class [element] after substituting any type
+ * arguments from the list of [typeArguments] for the class' type parameters.
+ */
+ DartType _getType(ClassElement element, TypeArgumentList typeArguments) {
+ DartType type = element.type;
+ List<TypeParameterElement> typeParameters = element.typeParameters;
+ if (typeArguments != null &&
+ typeParameters != null &&
+ typeArguments.arguments.length == typeParameters.length) {
+ List<DartType> argumentTypes = typeArguments.arguments
+ .map((TypeAnnotation argument) => argument.type)
+ .toList();
+ List<DartType> parameterTypes = typeParameters
+ .map((TypeParameterElement parameter) => parameter.type)
+ .toList();
+ type = type.substitute2(argumentTypes, parameterTypes);
+ }
+ return type;
+ }
+}
+
+/**
* Instances of the class `BestPracticesVerifier` traverse an AST structure looking for
* violations of Dart best practices.
*/
@@ -107,7 +252,7 @@
: _nullType = typeProvider.nullType,
_futureNullType = typeProvider.futureNullType,
_typeSystem = typeSystem ?? new TypeSystemImpl(typeProvider) {
- inDeprecatedMember = _currentLibrary.isDeprecated;
+ inDeprecatedMember = _currentLibrary.hasDeprecated;
}
@override
@@ -136,7 +281,7 @@
Object visitArgumentList(ArgumentList node) {
for (Expression argument in node.arguments) {
ParameterElement parameter = argument.bestParameterElement;
- if (parameter?.parameterKind == ParameterKind.POSITIONAL) {
+ if (parameter?.isOptionalPositional == true) {
_checkForDeprecatedMemberUse(parameter, argument);
}
}
@@ -173,7 +318,7 @@
ClassElementImpl outerClass = _enclosingClass;
bool wasInDeprecatedMember = inDeprecatedMember;
ClassElement element = AbstractClassElementImpl.getImpl(node.element);
- if (element != null && element.isDeprecated) {
+ if (element != null && element.hasDeprecated) {
inDeprecatedMember = true;
}
try {
@@ -218,7 +363,7 @@
Object visitFunctionDeclaration(FunctionDeclaration node) {
bool wasInDeprecatedMember = inDeprecatedMember;
ExecutableElement element = node.element;
- if (element != null && element.isDeprecated) {
+ if (element != null && element.hasDeprecated) {
inDeprecatedMember = true;
}
try {
@@ -261,7 +406,7 @@
Object visitMethodDeclaration(MethodDeclaration node) {
bool wasInDeprecatedMember = inDeprecatedMember;
ExecutableElement element = node.element;
- if (element != null && element.isDeprecated) {
+ if (element != null && element.hasDeprecated) {
inDeprecatedMember = true;
}
try {
@@ -564,9 +709,9 @@
if (variable == null) {
return false;
}
- return variable.isDeprecated;
+ return variable.hasDeprecated;
}
- return element.isDeprecated;
+ return element.hasDeprecated;
}
if (!inDeprecatedMember && isDeprecated(element)) {
@@ -764,12 +909,12 @@
bool isProtected(Element element) {
if (element is PropertyAccessorElement &&
element.enclosingElement is ClassElement &&
- (element.isProtected || element.variable.isProtected)) {
+ (element.hasProtected || element.variable.hasProtected)) {
return true;
}
if (element is MethodElement &&
element.enclosingElement is ClassElement &&
- element.isProtected) {
+ element.hasProtected) {
return true;
}
return false;
@@ -779,12 +924,12 @@
if (element == null) {
return false;
}
- if (element.isVisibleForTesting) {
+ if (element.hasVisibleForTesting) {
return true;
}
if (element is PropertyAccessorElement &&
element.enclosingElement is ClassElement &&
- element.variable.isVisibleForTesting) {
+ element.variable.hasVisibleForTesting) {
return true;
}
return false;
@@ -1179,11 +1324,11 @@
void _checkRequiredParameter(FormalParameterList node) {
final requiredParameters =
- node.parameters.where((p) => p.element?.isRequired == true);
+ node.parameters.where((p) => p.element?.hasRequired == true);
final nonNamedParamsWithRequired =
- requiredParameters.where((p) => p.kind != ParameterKind.NAMED);
+ requiredParameters.where((p) => !p.isNamed);
final namedParamsWithRequiredAndDefault = requiredParameters
- .where((p) => p.kind == ParameterKind.NAMED)
+ .where((p) => p.isNamed)
.where((p) => p.element.defaultValueCode != null);
final paramsToHint = [
nonNamedParamsWithRequired,
@@ -3322,7 +3467,7 @@
}
}
Element element = node.methodName.staticElement;
- if (element != null && element.isAlwaysThrows) {
+ if (element != null && element.hasAlwaysThrows) {
return true;
}
return _nodeExits(node.argumentList);
@@ -4516,7 +4661,7 @@
* @param element the element being tested
* @return `true` if the element has an override annotation associated with it
*/
- bool _isOverride(Element element) => element != null && element.isOverride;
+ bool _isOverride(Element element) => element != null && element.hasOverride;
}
/**
@@ -6876,12 +7021,11 @@
int length = parameters.length;
for (int i = 0; i < length; i++) {
ParameterElement parameter = parameters[i];
- ParameterKind kind = parameter.parameterKind;
- if (kind == ParameterKind.REQUIRED) {
+ if (parameter.isNotOptional) {
unnamedParameters.add(parameter);
unnamedParameterCount++;
requiredParameterCount++;
- } else if (kind == ParameterKind.POSITIONAL) {
+ } else if (parameter.isOptionalPositional) {
unnamedParameters.add(parameter);
unnamedParameterCount++;
} else {
@@ -7463,7 +7607,13 @@
@override
Object visitGenericFunctionType(GenericFunctionType node) {
- GenericFunctionTypeElement element = node.type.element;
+ DartType type = node.type;
+ if (type == null) {
+ // The function type hasn't been resolved yet, so we can't create a scope
+ // for its parameters.
+ return super.visitGenericFunctionType(node);
+ }
+ GenericFunctionTypeElement element = type.element;
Scope outerScope = nameScope;
try {
if (element == null) {
@@ -10030,20 +10180,6 @@
}
/**
- * In strong mode we infer "void" as the setter return type (as void is the
- * only legal return type for a setter). This allows us to give better
- * errors later if an invalid type is returned.
- */
- void _inferSetterReturnType(ExecutableElementImpl element) {
- if (_strongMode &&
- element is PropertyAccessorElementImpl &&
- element.isSetter &&
- element.hasImplicitReturnType) {
- element.declaredReturnType = VoidTypeImpl.instance;
- }
- }
-
- /**
* In strong mode we infer "void" as the return type of operator []= (as void
* is the only legal return type for []=). This allows us to give better
* errors later if an invalid type is returned.
@@ -10058,6 +10194,20 @@
}
/**
+ * In strong mode we infer "void" as the setter return type (as void is the
+ * only legal return type for a setter). This allows us to give better
+ * errors later if an invalid type is returned.
+ */
+ void _inferSetterReturnType(ExecutableElementImpl element) {
+ if (_strongMode &&
+ element is PropertyAccessorElementImpl &&
+ element.isSetter &&
+ element.hasImplicitReturnType) {
+ element.declaredReturnType = VoidTypeImpl.instance;
+ }
+ }
+
+ /**
* Record that the static type of the given node is the given type.
*
* @param expression the node whose type is to be recorded
diff --git a/pkg/analyzer/lib/src/generated/static_type_analyzer.dart b/pkg/analyzer/lib/src/generated/static_type_analyzer.dart
index 4ddd3d4..45c1a73 100644
--- a/pkg/analyzer/lib/src/generated/static_type_analyzer.dart
+++ b/pkg/analyzer/lib/src/generated/static_type_analyzer.dart
@@ -141,12 +141,10 @@
List<ParameterElement> parameters = node.parameterElements;
{
- Iterator<ParameterElement> positional = parameters
- .where((p) => p.parameterKind != ParameterKind.NAMED)
- .iterator;
- Iterator<ParameterElement> fnPositional = functionType.parameters
- .where((p) => p.parameterKind != ParameterKind.NAMED)
- .iterator;
+ Iterator<ParameterElement> positional =
+ parameters.where((p) => !p.isNamed).iterator;
+ Iterator<ParameterElement> fnPositional =
+ functionType.parameters.where((p) => !p.isNamed).iterator;
while (positional.moveNext() && fnPositional.moveNext()) {
inferType(positional.current, fnPositional.current.type);
}
@@ -155,8 +153,7 @@
{
Map<String, DartType> namedParameterTypes =
functionType.namedParameterTypes;
- Iterable<ParameterElement> named =
- parameters.where((p) => p.parameterKind == ParameterKind.NAMED);
+ Iterable<ParameterElement> named = parameters.where((p) => p.isNamed);
for (ParameterElementImpl p in named) {
if (!namedParameterTypes.containsKey(p.name)) {
continue;
@@ -1657,17 +1654,6 @@
}
/**
- * Gets the definite type of expression, which can be used in cases where
- * the most precise type is desired, for example computing the least upper
- * bound.
- *
- * See [getExpressionType] for more information. Without strong mode, this is
- * equivalent to [_getStaticType].
- */
- DartType _getExpressionType(Expression expr, {bool read: false}) =>
- getExpressionType(expr, _typeSystem, _typeProvider, read: read);
-
- /**
* If the given element name can be mapped to the name of a class defined within the given
* library, return the type specified by the argument.
*
@@ -1697,6 +1683,17 @@
}
/**
+ * Gets the definite type of expression, which can be used in cases where
+ * the most precise type is desired, for example computing the least upper
+ * bound.
+ *
+ * See [getExpressionType] for more information. Without strong mode, this is
+ * equivalent to [_getStaticType].
+ */
+ DartType _getExpressionType(Expression expr, {bool read: false}) =>
+ getExpressionType(expr, _typeSystem, _typeProvider, read: read);
+
+ /**
* If the given argument list contains at least one argument, and if the argument is a simple
* string literal, then parse that argument as a query string and return the type specified by the
* argument.
diff --git a/pkg/analyzer/lib/src/generated/type_system.dart b/pkg/analyzer/lib/src/generated/type_system.dart
index a206cdf..c0562b4 100644
--- a/pkg/analyzer/lib/src/generated/type_system.dart
+++ b/pkg/analyzer/lib/src/generated/type_system.dart
@@ -21,22 +21,6 @@
import 'package:analyzer/src/generated/resolver.dart' show TypeProvider;
import 'package:analyzer/src/generated/utilities_dart.dart' show ParameterKind;
-bool _isBottom(DartType t) {
- return t.isBottom ||
- t.isDartCoreNull ||
- identical(t, UnknownInferredType.instance);
-}
-
-bool _isTop(DartType t) {
- if (t.isDartAsyncFutureOr) {
- return _isTop((t as InterfaceType).typeArguments[0]);
- }
- return t.isDynamic ||
- t.isObject ||
- t.isVoid ||
- identical(t, UnknownInferredType.instance);
-}
-
/**
* `void`, `dynamic`, and `Object` are all equivalent. However, this makes
* LUB/GLB indeterministic. Therefore, for the cases of LUB/GLB, we have some
@@ -63,6 +47,22 @@
return -100000;
}
+bool _isBottom(DartType t) {
+ return t.isBottom ||
+ t.isDartCoreNull ||
+ identical(t, UnknownInferredType.instance);
+}
+
+bool _isTop(DartType t) {
+ if (t.isDartAsyncFutureOr) {
+ return _isTop((t as InterfaceType).typeArguments[0]);
+ }
+ return t.isDynamic ||
+ t.isObject ||
+ t.isVoid ||
+ identical(t, UnknownInferredType.instance);
+}
+
typedef bool _GuardedSubtypeChecker<T>(T t1, T t2, Set<TypeImpl> visitedTypes);
/**
@@ -105,27 +105,6 @@
return ft.parameters.any((p) => predicate(p.type));
}
- FunctionType _replaceDynamicParameters(FunctionType t, DartType replaceWith) {
- if (!t.parameters.any((p) => p.type.isDynamic)) {
- return t;
- }
- ParameterElement shave(ParameterElement p) {
- if (p.type.isDynamic) {
- return new ParameterElementImpl.synthetic(
- p.name, replaceWith, p.parameterKind);
- }
- return p;
- }
-
- List<ParameterElement> parameters = t.parameters.map(shave).toList();
- FunctionElementImpl function = new FunctionElementImpl("", -1);
- function.isSynthetic = true;
- function.returnType = t.returnType;
- function.shareTypeParameters(t.typeFormals);
- function.shareParameters(parameters);
- return function.type = new FunctionTypeImpl(function);
- }
-
FunctionType functionTypeToConcreteType(FunctionType t) =>
_replaceDynamicParameters(t, typeProvider.objectType);
@@ -971,6 +950,31 @@
return guardedIsFunctionSubtype(t1, t2, visitedTypes);
}
+ FunctionType _replaceDynamicParameters(FunctionType t, DartType replaceWith) {
+ if (!t.parameters.any((p) => p.type.isDynamic)) {
+ return t;
+ }
+ ParameterElement shave(ParameterElement p) {
+ if (p.type.isDynamic) {
+ return new ParameterElementImpl.synthetic(
+ // ignore: deprecated_member_use
+ p.name,
+ replaceWith,
+ // ignore: deprecated_member_use
+ p.parameterKind);
+ }
+ return p;
+ }
+
+ List<ParameterElement> parameters = t.parameters.map(shave).toList();
+ FunctionElementImpl function = new FunctionElementImpl("", -1);
+ function.isSynthetic = true;
+ function.returnType = t.returnType;
+ function.shareTypeParameters(t.typeFormals);
+ function.shareParameters(parameters);
+ return function.type = new FunctionTypeImpl(function);
+ }
+
DartType _substituteForUnknownType(DartType type, {bool lowerBound: false}) {
if (identical(type, UnknownInferredType.instance)) {
if (lowerBound) {
@@ -996,7 +1000,11 @@
var newType =
_substituteForUnknownType(p.type, lowerBound: !lowerBound);
return new ParameterElementImpl.synthetic(
- p.name, newType, p.parameterKind);
+ // ignore: deprecated_member_use
+ p.name,
+ newType,
+ // ignore: deprecated_member_use
+ p.parameterKind);
});
// Return type is covariant.
var newReturnType =
@@ -1112,6 +1120,11 @@
*/
bool get isStrong;
+ /**
+ * The provider of types for the system
+ */
+ TypeProvider get typeProvider;
+
List<InterfaceType> gatherMixinSupertypeConstraints(
ClassElement mixinElement) {
var mixinSupertypeConstraints = <InterfaceType>[];
@@ -1126,35 +1139,6 @@
return mixinSupertypeConstraints;
}
- /// Attempts to find the appropriate substitution for [typeParameters] that can
- /// be applied to [src] to make it equal to [dest]. If no such substitution can
- /// be found, `null` is returned.
- InterfaceType matchSupertypeConstraints(
- ClassElement mixinElement, List<DartType> srcs, List<DartType> dests) {
- var typeParameters = mixinElement.typeParameters;
- var inferrer = new _GenericInferrer(typeProvider, this, typeParameters);
- for (int i = 0; i < srcs.length; i++) {
- inferrer.constrainReturnType(srcs[i], dests[i]);
- inferrer.constrainReturnType(dests[i], srcs[i]);
- }
- var result = inferrer.infer(mixinElement.type, typeParameters,
- considerExtendsClause: false);
- for (int i = 0; i < srcs.length; i++) {
- if (!srcs[i]
- .substitute2(result.typeArguments, mixinElement.type.typeArguments)
- .isEquivalentTo(dests[i])) {
- // Failed to find an appropriate substitution
- return null;
- }
- }
- return result;
- }
-
- /**
- * The provider of types for the system
- */
- TypeProvider get typeProvider;
-
/**
* Compute the least upper bound of two types.
*/
@@ -1259,6 +1243,30 @@
*/
bool isSubtypeOf(DartType leftType, DartType rightType);
+ /// Attempts to find the appropriate substitution for [typeParameters] that can
+ /// be applied to [src] to make it equal to [dest]. If no such substitution can
+ /// be found, `null` is returned.
+ InterfaceType matchSupertypeConstraints(
+ ClassElement mixinElement, List<DartType> srcs, List<DartType> dests) {
+ var typeParameters = mixinElement.typeParameters;
+ var inferrer = new _GenericInferrer(typeProvider, this, typeParameters);
+ for (int i = 0; i < srcs.length; i++) {
+ inferrer.constrainReturnType(srcs[i], dests[i]);
+ inferrer.constrainReturnType(dests[i], srcs[i]);
+ }
+ var result = inferrer.infer(mixinElement.type, typeParameters,
+ considerExtendsClause: false);
+ for (int i = 0; i < srcs.length; i++) {
+ if (!srcs[i]
+ .substitute2(result.typeArguments, mixinElement.type.typeArguments)
+ .isEquivalentTo(dests[i])) {
+ // Failed to find an appropriate substitution
+ return null;
+ }
+ }
+ return result;
+ }
+
/**
* Searches the superinterfaces of [type] for implementations of [genericType]
* and returns the most specific type argument used for that generic type.
diff --git a/pkg/analyzer/lib/src/kernel/ast_from_analyzer.dart b/pkg/analyzer/lib/src/kernel/ast_from_analyzer.dart
index 9582f50..558aeb6 100644
--- a/pkg/analyzer/lib/src/kernel/ast_from_analyzer.dart
+++ b/pkg/analyzer/lib/src/kernel/ast_from_analyzer.dart
@@ -461,19 +461,13 @@
for (var parameter in element.parameters) {
var parameterNode = new ast.VariableDeclaration(parameter.name,
type: buildType(parameter.type));
- switch (parameter.parameterKind) {
- case ParameterKind.REQUIRED:
- positional.add(parameterNode);
- ++requiredParameterCount;
- break;
-
- case ParameterKind.POSITIONAL:
- positional.add(parameterNode);
- break;
-
- case ParameterKind.NAMED:
- named.add(parameterNode);
- break;
+ if (parameter.isNotOptional) {
+ positional.add(parameterNode);
+ ++requiredParameterCount;
+ } else if (parameter.isOptionalPositional) {
+ positional.add(parameterNode);
+ } else if (parameter.isNamed) {
+ named.add(parameterNode);
}
}
var returnType = element is ConstructorElement
@@ -564,20 +558,14 @@
: null,
type: buildType(
resolutionMap.elementDeclaredByFormalParameter(parameter).type));
- switch (parameter.kind) {
- case ParameterKind.REQUIRED:
- positional.add(declaration);
- ++requiredParameterCount;
- declaration.initializer = null;
- break;
-
- case ParameterKind.POSITIONAL:
- positional.add(declaration);
- break;
-
- case ParameterKind.NAMED:
- named.add(declaration);
- break;
+ if (parameter.isRequired) {
+ positional.add(declaration);
+ ++requiredParameterCount;
+ declaration.initializer = null;
+ } else if (parameter.isOptionalPositional) {
+ positional.add(declaration);
+ } else if (parameter.isNamed) {
+ named.add(declaration);
}
}
int offset = formalParameters?.offset ?? body.offset;
@@ -690,34 +678,30 @@
FunctionTypedElement target, ast.Arguments arguments) {
var positionals = arguments.positional;
var parameters = target.parameters;
- const required = ParameterKind.REQUIRED; // For avoiding long lines.
- const named = ParameterKind.NAMED;
// If the first unprovided parameter is required, there are too few
// positional arguments.
if (positionals.length < parameters.length &&
- parameters[positionals.length].parameterKind == required) {
+ parameters[positionals.length].isNotOptional) {
return false;
}
// If there are more positional arguments than parameters, or if the last
// positional argument corresponds to a named parameter, there are too many
// positional arguments.
if (positionals.length > parameters.length) return false;
- if (positionals.isNotEmpty &&
- parameters[positionals.length - 1].parameterKind == named) {
+ if (positionals.isNotEmpty && parameters[positionals.length - 1].isNamed) {
return false; // Too many positional arguments.
}
if (arguments.named.isEmpty) return true;
int firstNamedParameter = positionals.length;
while (firstNamedParameter < parameters.length &&
- parameters[firstNamedParameter].parameterKind != ParameterKind.NAMED) {
+ !parameters[firstNamedParameter].isNamed) {
++firstNamedParameter;
}
namedLoop:
for (int i = 0; i < arguments.named.length; ++i) {
String name = arguments.named[i].name;
for (int j = firstNamedParameter; j < parameters.length; ++j) {
- if (parameters[j].parameterKind == ParameterKind.NAMED &&
- parameters[j].name == name) {
+ if (parameters[j].isNamed && parameters[j].name == name) {
continue namedLoop;
}
}
diff --git a/pkg/analyzer/lib/src/summary/link.dart b/pkg/analyzer/lib/src/summary/link.dart
index 759c3b4..f8e38c3 100644
--- a/pkg/analyzer/lib/src/summary/link.dart
+++ b/pkg/analyzer/lib/src/summary/link.dart
@@ -276,16 +276,12 @@
TypeParameterizedElementMixin typeParameterContext) {
UnlinkedParamBuilder b = new UnlinkedParamBuilder();
b.name = parameter.name;
- switch (parameter.parameterKind) {
- case ParameterKind.REQUIRED:
- b.kind = UnlinkedParamKind.required;
- break;
- case ParameterKind.POSITIONAL:
- b.kind = UnlinkedParamKind.positional;
- break;
- case ParameterKind.NAMED:
- b.kind = UnlinkedParamKind.named;
- break;
+ if (parameter.isNotOptional) {
+ b.kind = UnlinkedParamKind.required;
+ } else if (parameter.isOptionalPositional) {
+ b.kind = UnlinkedParamKind.positional;
+ } else if (parameter.isNamed) {
+ b.kind = UnlinkedParamKind.named;
}
DartType type = parameter.type;
if (!parameter.hasImplicitType) {
@@ -824,6 +820,14 @@
return enclosingElement.enclosingElement._linker.typeProvider.objectType;
}
+ InterfaceType _findInterfaceTypeForElement(
+ ClassElement element, List<InterfaceType> interfaceTypes) {
+ for (var interfaceType in interfaceTypes) {
+ if (interfaceType.element == element) return interfaceType;
+ }
+ return null;
+ }
+
List<InterfaceType> _findInterfaceTypesForConstraints(
List<InterfaceType> constraints, List<InterfaceType> interfaceTypes) {
var result = <InterfaceType>[];
@@ -838,14 +842,6 @@
}
return result;
}
-
- InterfaceType _findInterfaceTypeForElement(
- ClassElement element, List<InterfaceType> interfaceTypes) {
- for (var interfaceType in interfaceTypes) {
- if (interfaceType.element == element) return interfaceType;
- }
- return null;
- }
}
/**
@@ -2764,7 +2760,7 @@
int positionalIndex = 0;
int numRequiredParameters = 0;
for (ParameterElement parameter in rawMethodType.parameters) {
- if (parameter.parameterKind == ParameterKind.REQUIRED) {
+ if (parameter.isNotOptional) {
numRequiredParameters++;
if (numRequiredParameters > numPositionalArguments) {
return null;
@@ -2772,13 +2768,13 @@
parameters.add(parameter);
argumentTypes.add(positionalArgTypes[positionalIndex]);
positionalIndex++;
- } else if (parameter.parameterKind == ParameterKind.POSITIONAL) {
+ } else if (parameter.isOptionalPositional) {
if (positionalIndex < numPositionalArguments) {
parameters.add(parameter);
argumentTypes.add(positionalArgTypes[positionalIndex]);
positionalIndex++;
}
- } else if (parameter.parameterKind == ParameterKind.NAMED) {
+ } else if (parameter.isNamed) {
DartType namedArgumentType = namedArgTypes[parameter.name];
if (namedArgumentType != null) {
parameters.add(parameter);
@@ -3636,9 +3632,17 @@
String get name => _unlinkedTypedef.name;
@override
+ DartType get returnType => enclosingElement.resolveTypeRef(
+ this, _unlinkedTypedef.returnType.syntheticReturnType);
+
+ @override
TypeParameterizedElementMixin get typeParameterContext => this;
@override
+ List<UnlinkedParam> get unlinkedParameters =>
+ _unlinkedTypedef.returnType.syntheticParams;
+
+ @override
List<UnlinkedTypeParam> get unlinkedTypeParams =>
_unlinkedTypedef.typeParameters;
@@ -4507,6 +4511,25 @@
bool get isExplicitlyCovariant => _unlinkedParam.isExplicitlyCovariant;
@override
+ bool get isNamed => parameterKind == ParameterKind.NAMED;
+
+ @override
+ bool get isNotOptional => parameterKind == ParameterKind.REQUIRED;
+
+ @override
+ bool get isOptional =>
+ parameterKind == ParameterKind.NAMED ||
+ parameterKind == ParameterKind.POSITIONAL;
+
+ @override
+ bool get isOptionalPositional => parameterKind == ParameterKind.POSITIONAL;
+
+ @override
+ bool get isPositional =>
+ parameterKind == ParameterKind.POSITIONAL ||
+ parameterKind == ParameterKind.REQUIRED;
+
+ @override
String get name => _unlinkedParam.name;
@override
diff --git a/pkg/analyzer/lib/src/summary/summarize_ast.dart b/pkg/analyzer/lib/src/summary/summarize_ast.dart
index 1d38fda..bf9328a 100644
--- a/pkg/analyzer/lib/src/summary/summarize_ast.dart
+++ b/pkg/analyzer/lib/src/summary/summarize_ast.dart
@@ -8,7 +8,6 @@
import 'package:analyzer/dart/ast/token.dart';
import 'package:analyzer/dart/ast/visitor.dart';
import 'package:analyzer/dart/element/type.dart' show DartType;
-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/public_namespace_computer.dart';
@@ -98,6 +97,10 @@
}
}
+ @override
+ EntityRefBuilder serializeGenericFunctionType(GenericFunctionType node) =>
+ visitor.serializeGenericFunctionType(node);
+
EntityRefBuilder serializeIdentifier(Identifier identifier) {
EntityRefBuilder b = new EntityRefBuilder();
if (identifier is SimpleIdentifier) {
@@ -148,10 +151,6 @@
DartType type, Identifier name, TypeArgumentList arguments) {
return visitor.serializeTypeName(name, arguments);
}
-
- @override
- EntityRefBuilder serializeGenericFunctionType(GenericFunctionType node) =>
- visitor.serializeGenericFunctionType(node);
}
/**
@@ -792,6 +791,19 @@
}
/**
+ * Serialize a type name that appears in a "with" clause to an [EntityRef].
+ */
+ EntityRefBuilder serializeMixedInType(TypeAnnotation node) {
+ var builder = serializeType(node);
+ if (builder != null && builder.typeArguments.isEmpty) {
+ // Type arguments may get inferred so we need to assign a slot to hold the
+ // complete inferred mixed in type.
+ builder.refinedSlot = assignSlot();
+ }
+ return builder;
+ }
+
+ /**
* Serialize a [FieldFormalParameter], [FunctionTypedFormalParameter], or
* [SimpleFormalParameter] into an [UnlinkedParam].
*/
@@ -806,18 +818,15 @@
if (_parametersMayInheritCovariance) {
b.inheritsCovariantSlot = assignSlot();
}
- switch (node.kind) {
- case ParameterKind.REQUIRED:
- b.kind = UnlinkedParamKind.required;
- break;
- case ParameterKind.POSITIONAL:
- b.kind = UnlinkedParamKind.positional;
- break;
- case ParameterKind.NAMED:
- b.kind = UnlinkedParamKind.named;
- break;
- default:
- throw new StateError('Unexpected parameter kind: ${node.kind}');
+ if (node.isRequired) {
+ b.kind = UnlinkedParamKind.required;
+ } else if (node.isOptionalPositional) {
+ b.kind = UnlinkedParamKind.positional;
+ } else if (node.isNamed) {
+ b.kind = UnlinkedParamKind.named;
+ } else {
+ // ignore: deprecated_member_use
+ throw new StateError('Unexpected parameter kind: ${node.kind}');
}
return b;
}
@@ -870,6 +879,23 @@
* a [EntityRef]. Note that this method does the right thing if the
* name doesn't refer to an entity other than a type (e.g. a class member).
*/
+ EntityRefBuilder serializeType(TypeAnnotation node) {
+ if (node is TypeName) {
+ return serializeTypeName(node?.name, node?.typeArguments);
+ } else if (node is GenericFunctionType) {
+ return serializeGenericFunctionType(node);
+ } else if (node != null) {
+ throw new ArgumentError('Cannot serialize a ${node.runtimeType}');
+ }
+ return null;
+ }
+
+ /**
+ * Serialize a type name (which might be defined in a nested scope, at top
+ * level within this library, or at top level within an imported library) to
+ * a [EntityRef]. Note that this method does the right thing if the
+ * name doesn't refer to an entity other than a type (e.g. a class member).
+ */
EntityRefBuilder serializeTypeName(
Identifier identifier, TypeArgumentList typeArguments) {
if (identifier == null) {
@@ -922,36 +948,6 @@
}
/**
- * Serialize a type name that appears in a "with" clause to an [EntityRef].
- */
- EntityRefBuilder serializeMixedInType(TypeAnnotation node) {
- var builder = serializeType(node);
- if (builder != null && builder.typeArguments.isEmpty) {
- // Type arguments may get inferred so we need to assign a slot to hold the
- // complete inferred mixed in type.
- builder.refinedSlot = assignSlot();
- }
- return builder;
- }
-
- /**
- * Serialize a type name (which might be defined in a nested scope, at top
- * level within this library, or at top level within an imported library) to
- * a [EntityRef]. Note that this method does the right thing if the
- * name doesn't refer to an entity other than a type (e.g. a class member).
- */
- EntityRefBuilder serializeType(TypeAnnotation node) {
- if (node is TypeName) {
- return serializeTypeName(node?.name, node?.typeArguments);
- } else if (node is GenericFunctionType) {
- return serializeGenericFunctionType(node);
- } else if (node != null) {
- throw new ArgumentError('Cannot serialize a ${node.runtimeType}');
- }
- return null;
- }
-
- /**
* Serialize the given [typeParameters] into a list of [UnlinkedTypeParam]s,
* and also store them in [typeParameterScope].
*/
diff --git a/pkg/analyzer/lib/src/task/dart.dart b/pkg/analyzer/lib/src/task/dart.dart
index c95f382..95424ed 100644
--- a/pkg/analyzer/lib/src/task/dart.dart
+++ b/pkg/analyzer/lib/src/task/dart.dart
@@ -5135,6 +5135,13 @@
library, unitElement.source, typeProvider, errorListener);
unit.accept(visitor);
//
+ // Re-write the AST to handle the optional new and const feature.
+ //
+ if (library.context.analysisOptions.previewDart2) {
+ unit.accept(new AstRewriteVisitor(library, unit.element.source,
+ typeProvider, AnalysisErrorListener.NULL_LISTENER));
+ }
+ //
// Record outputs.
//
outputs[RESOLVE_TYPE_NAMES_ERRORS] =
diff --git a/pkg/analyzer/lib/src/task/strong_mode.dart b/pkg/analyzer/lib/src/task/strong_mode.dart
index 8873c01..f2d1b2e 100644
--- a/pkg/analyzer/lib/src/task/strong_mode.dart
+++ b/pkg/analyzer/lib/src/task/strong_mode.dart
@@ -16,7 +16,6 @@
import 'package:analyzer/src/generated/resolver.dart'
show TypeProvider, InheritanceManager;
import 'package:analyzer/src/generated/type_system.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'
@@ -226,15 +225,14 @@
//
// Find the corresponding parameter.
//
- if (parameter.parameterKind == ParameterKind.NAMED) {
+ if (parameter.isNamed) {
//
// If we're looking for a named parameter, only a named parameter with
// the same name will be matched.
//
return methodParameters.lastWhere(
(ParameterElement methodParameter) =>
- methodParameter.parameterKind == ParameterKind.NAMED &&
- methodParameter.name == parameter.name,
+ methodParameter.isNamed && methodParameter.name == parameter.name,
orElse: () => null);
}
//
@@ -243,7 +241,7 @@
//
if (index < methodParameters.length) {
var matchingParameter = methodParameters[index];
- if (matchingParameter.parameterKind != ParameterKind.NAMED) {
+ if (!matchingParameter.isNamed) {
return matchingParameter;
}
}
diff --git a/pkg/analyzer/test/dart/element/builder_test.dart b/pkg/analyzer/test/dart/element/builder_test.dart
index 5e4eb01..224a4ea 100644
--- a/pkg/analyzer/test/dart/element/builder_test.dart
+++ b/pkg/analyzer/test/dart/element/builder_test.dart
@@ -20,7 +20,6 @@
import 'package:analyzer/src/generated/testing/element_search.dart';
import 'package:analyzer/src/generated/testing/node_search.dart';
import 'package:analyzer/src/generated/testing/token_factory.dart';
-import 'package:analyzer/src/generated/utilities_dart.dart';
import 'package:test/test.dart';
import 'package:test_reflective_loader/test_reflective_loader.dart';
@@ -292,9 +291,9 @@
expect(variable, isNotNull);
expect(variable.hasImplicitType, isTrue);
expect(variable.isConst, isFalse);
- expect(variable.isDeprecated, isFalse);
+ expect(variable.hasDeprecated, isFalse);
expect(variable.isFinal, isFalse);
- expect(variable.isOverride, isFalse);
+ expect(variable.hasAlwaysThrows, isFalse);
expect(variable.isPrivate, isFalse);
expect(variable.isPublic, isTrue);
expect(variable.isSynthetic, isFalse);
@@ -308,9 +307,9 @@
assertHasCodeRange(variable, 11, 5);
expect(variable.hasImplicitType, isFalse);
expect(variable.isConst, isFalse);
- expect(variable.isDeprecated, isFalse);
+ expect(variable.hasDeprecated, isFalse);
expect(variable.isFinal, isFalse);
- expect(variable.isOverride, isFalse);
+ expect(variable.hasOverride, isFalse);
expect(variable.isPrivate, isFalse);
expect(variable.isPublic, isTrue);
expect(variable.isSynthetic, isFalse);
@@ -337,10 +336,10 @@
expect(parameter.initializer.type, isNotNull);
expect(parameter.initializer.hasImplicitReturnType, isTrue);
expect(parameter.isConst, isFalse);
- expect(parameter.isDeprecated, isFalse);
+ expect(parameter.hasDeprecated, isFalse);
expect(parameter.isFinal, isFalse);
expect(parameter.isInitializingFormal, isFalse);
- expect(parameter.isOverride, isFalse);
+ expect(parameter.hasOverride, isFalse);
expect(parameter.isPrivate, isFalse);
expect(parameter.isPublic, isTrue);
expect(parameter.isSynthetic, isFalse);
@@ -365,10 +364,10 @@
expect(parameter.initializer.type, isNotNull);
expect(parameter.initializer.hasImplicitReturnType, isTrue);
expect(parameter.isConst, isFalse);
- expect(parameter.isDeprecated, isFalse);
+ expect(parameter.hasDeprecated, isFalse);
expect(parameter.isFinal, isFalse);
expect(parameter.isInitializingFormal, isFalse);
- expect(parameter.isOverride, isFalse);
+ expect(parameter.hasOverride, isFalse);
expect(parameter.isPrivate, isFalse);
expect(parameter.isPublic, isTrue);
expect(parameter.isSynthetic, isFalse);
@@ -461,7 +460,7 @@
expect(parameter.isConst, isFalse);
expect(parameter.isFinal, isFalse);
expect(parameter.isSynthetic, isFalse);
- expect(parameter.parameterKind, ParameterKind.REQUIRED);
+ expect(parameter.isNotOptional, isTrue);
_assertVisibleRange(parameter, 100, 110);
}
@@ -485,7 +484,7 @@
expect(parameter.isExplicitlyCovariant, isTrue);
expect(parameter.isFinal, isFalse);
expect(parameter.isSynthetic, isFalse);
- expect(parameter.parameterKind, ParameterKind.REQUIRED);
+ expect(parameter.isNotOptional, isTrue);
_assertVisibleRange(parameter, 100, 110);
}
@@ -509,7 +508,7 @@
expect(parameter.isConst, isFalse);
expect(parameter.isFinal, isFalse);
expect(parameter.isSynthetic, isFalse);
- expect(parameter.parameterKind, ParameterKind.REQUIRED);
+ expect(parameter.isNotOptional, isTrue);
expect(typeElement.typeParameters, hasLength(1));
_assertVisibleRange(parameter, 100, 110);
}
@@ -575,7 +574,7 @@
expect(parameter.isConst, isFalse);
expect(parameter.isFinal, isFalse);
expect(parameter.isSynthetic, isFalse);
- expect(parameter.parameterKind, ParameterKind.NAMED);
+ expect(parameter.isNamed, isTrue);
_assertVisibleRange(parameter, 100, 110);
expect(parameter.defaultValueCode, "42");
FunctionElement initializer = parameter.initializer;
@@ -608,7 +607,7 @@
expect(parameter.isExplicitlyCovariant, isTrue);
expect(parameter.isFinal, isFalse);
expect(parameter.isSynthetic, isFalse);
- expect(parameter.parameterKind, ParameterKind.NAMED);
+ expect(parameter.isNamed, isTrue);
_assertVisibleRange(parameter, 100, 110);
expect(parameter.defaultValueCode, "42");
FunctionElement initializer = parameter.initializer;
@@ -636,7 +635,7 @@
expect(parameter.isFinal, isFalse);
expect(parameter.isSynthetic, isFalse);
expect(parameter.name, parameterName);
- expect(parameter.parameterKind, ParameterKind.REQUIRED);
+ expect(parameter.isNotOptional, isTrue);
_assertVisibleRange(parameter, 100, 110);
}
@@ -662,7 +661,7 @@
expect(parameter.isFinal, isFalse);
expect(parameter.isSynthetic, isFalse);
expect(parameter.name, parameterName);
- expect(parameter.parameterKind, ParameterKind.REQUIRED);
+ expect(parameter.isNotOptional, isTrue);
_assertVisibleRange(parameter, 100, 110);
}
@@ -685,7 +684,7 @@
expect(parameter.isFinal, isFalse);
expect(parameter.isSynthetic, isFalse);
expect(parameter.name, parameterName);
- expect(parameter.parameterKind, ParameterKind.REQUIRED);
+ expect(parameter.isNotOptional, isTrue);
_assertVisibleRange(parameter, 100, 110);
}
@@ -711,7 +710,7 @@
expect(parameter.isFinal, isFalse);
expect(parameter.isSynthetic, isFalse);
expect(parameter.name, parameterName);
- expect(parameter.parameterKind, ParameterKind.REQUIRED);
+ expect(parameter.isNotOptional, isTrue);
_assertVisibleRange(parameter, 100, 110);
}
@@ -1840,7 +1839,7 @@
expect(parameter.isConst, isFalse);
expect(parameter.isFinal, isFalse);
expect(parameter.isSynthetic, isFalse);
- expect(parameter.parameterKind, ParameterKind.REQUIRED);
+ expect(parameter.isNotOptional, isTrue);
expect(parameter.parameters, hasLength(0));
}
@@ -1864,7 +1863,7 @@
expect(parameter.isConst, isFalse);
expect(parameter.isFinal, isFalse);
expect(parameter.isSynthetic, isFalse);
- expect(parameter.parameterKind, ParameterKind.REQUIRED);
+ expect(parameter.isNotOptional, isTrue);
expect(typeElement.parameters, hasLength(1));
}
diff --git a/pkg/analyzer/test/generated/compile_time_error_code_driver_test.dart b/pkg/analyzer/test/generated/compile_time_error_code_driver_test.dart
index 4e73768..117ae28 100644
--- a/pkg/analyzer/test/generated/compile_time_error_code_driver_test.dart
+++ b/pkg/analyzer/test/generated/compile_time_error_code_driver_test.dart
@@ -18,6 +18,18 @@
bool get enableNewAnalysisDriver => true;
@override // Passes with driver
+ test_mixinInference_doNotIgnorePreviousExplicitMixins() =>
+ super.test_mixinInference_doNotIgnorePreviousExplicitMixins();
+
+ @override // Passes with driver
+ test_mixinInference_matchingClass() =>
+ super.test_mixinInference_matchingClass();
+
+ @override // Passes with driver
+ test_mixinInference_matchingClass_inPreviousMixin() =>
+ super.test_mixinInference_matchingClass_inPreviousMixin();
+
+ @override // Passes with driver
test_mixinInference_recursiveSubtypeCheck() =>
super.test_mixinInference_recursiveSubtypeCheck();
}
diff --git a/pkg/analyzer/test/generated/compile_time_error_code_kernel_test.dart b/pkg/analyzer/test/generated/compile_time_error_code_kernel_test.dart
index 00619ba..740f671 100644
--- a/pkg/analyzer/test/generated/compile_time_error_code_kernel_test.dart
+++ b/pkg/analyzer/test/generated/compile_time_error_code_kernel_test.dart
@@ -131,6 +131,21 @@
@override
@failingTest
+ test_conflictingGenericInterfaces_hierarchyLoop() =>
+ super.test_conflictingGenericInterfaces_hierarchyLoop();
+
+ @override
+ @failingTest
+ test_conflictingGenericInterfaces_simple() =>
+ super.test_conflictingGenericInterfaces_simple();
+
+ @override
+ @failingTest
+ test_conflictingGenericInterfaces_viaMixin() =>
+ super.test_conflictingGenericInterfaces_viaMixin();
+
+ @override
+ @failingTest
test_conflictingGetterAndMethod_field_method() async {
// Expected 1 errors of type CompileTimeErrorCode.CONFLICTING_GETTER_AND_METHOD, found 0
await super.test_conflictingGetterAndMethod_field_method();
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 184d0e3..d69b4f2 100644
--- a/pkg/analyzer/test/generated/compile_time_error_code_test.dart
+++ b/pkg/analyzer/test/generated/compile_time_error_code_test.dart
@@ -102,6 +102,21 @@
AnalysisOptions get defaultAnalysisOptions =>
new AnalysisOptionsImpl()..strongMode = true;
+ disabled_test_conflictingGenericInterfaces_hierarchyLoop_infinite() async {
+ // There is an interface conflict here due to a loop in the class
+ // hierarchy leading to an infinite set of implemented types; this loop
+ // shouldn't cause non-termination.
+
+ // TODO(paulberry): this test is currently disabled due to non-termination
+ // bugs elsewhere in the analyzer.
+ Source source = addSource('''
+class A<T> implements B<List<T>> {}
+class B<T> implements A<List<T>> {}
+''');
+ await computeAnalysisResult(source);
+ assertErrors(source, [CompileTimeErrorCode.CONFLICTING_GENERIC_INTERFACES]);
+ }
+
test_accessPrivateEnumField() async {
Source source = addSource(r'''
enum E { ONE }
@@ -699,6 +714,54 @@
verify([source]);
}
+ test_conflictingGenericInterfaces_hierarchyLoop() async {
+ // There is no interface conflict here, but there is a loop in the class
+ // hierarchy leading to a finite set of implemented types; this loop
+ // shouldn't cause non-termination.
+ Source source = addSource('''
+class A<T> implements B<T> {}
+class B<T> implements A<T> {}
+''');
+ await computeAnalysisResult(source);
+ assertErrors(source, [
+ CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE,
+ CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE
+ ]);
+ }
+
+ test_conflictingGenericInterfaces_noConflict() async {
+ Source source = addSource('''
+class I<T> {}
+class A implements I<int> {}
+class B implements I<int> {}
+class C extends A implements B {}
+ ''');
+ await computeAnalysisResult(source);
+ assertNoErrors(source);
+ }
+
+ test_conflictingGenericInterfaces_simple() async {
+ Source source = addSource('''
+class I<T> {}
+class A implements I<int> {}
+class B implements I<String> {}
+class C extends A implements B {}
+''');
+ await computeAnalysisResult(source);
+ assertErrors(source, [CompileTimeErrorCode.CONFLICTING_GENERIC_INTERFACES]);
+ }
+
+ test_conflictingGenericInterfaces_viaMixin() async {
+ Source source = addSource('''
+class I<T> {}
+class A implements I<int> {}
+class B implements I<String> {}
+class C extends A with B {}
+''');
+ await computeAnalysisResult(source);
+ assertErrors(source, [CompileTimeErrorCode.CONFLICTING_GENERIC_INTERFACES]);
+ }
+
test_conflictingGetterAndMethod_field_method() async {
Source source = addSource(r'''
class A {
@@ -3966,8 +4029,27 @@
class C extends A<Map<int, String>> with M {}
''');
await computeAnalysisResult(source);
- assertErrors(source,
- [CompileTimeErrorCode.MIXIN_INFERENCE_NO_POSSIBLE_SUBSTITUTION]);
+ assertErrors(source, [
+ CompileTimeErrorCode.MIXIN_INFERENCE_NO_POSSIBLE_SUBSTITUTION,
+ CompileTimeErrorCode.CONFLICTING_GENERIC_INTERFACES
+ ]);
+ }
+
+ @failingTest // Does not work with old task model
+ test_mixinInference_doNotIgnorePreviousExplicitMixins() async {
+ AnalysisOptionsImpl options = new AnalysisOptionsImpl();
+ options.enableSuperMixins = true;
+ options.strongMode = true;
+ resetWith(options: options);
+ Source source = addSource('''
+class A extends Object with B<String>, C {}
+class B<T> {}
+class C<T> extends B<T> {}
+''');
+ var analysisResult = await computeAnalysisResult(source);
+ assertNoErrors(source);
+ var mixins = analysisResult.unit.element.getType('A').mixins;
+ expect(mixins[1].toString(), 'C<String>');
}
test_mixinInference_impossibleSubstitution() async {
@@ -3981,10 +4063,13 @@
class C extends A<List<int>> with M {}
''');
await computeAnalysisResult(source);
- assertErrors(source,
- [CompileTimeErrorCode.MIXIN_INFERENCE_NO_POSSIBLE_SUBSTITUTION]);
+ assertErrors(source, [
+ CompileTimeErrorCode.MIXIN_INFERENCE_NO_POSSIBLE_SUBSTITUTION,
+ CompileTimeErrorCode.CONFLICTING_GENERIC_INTERFACES
+ ]);
}
+ @failingTest // Does not work with old task model
test_mixinInference_matchingClass() async {
AnalysisOptionsImpl options = new AnalysisOptionsImpl();
options.enableSuperMixins = true;
@@ -4000,6 +4085,7 @@
assertNoErrors(source);
}
+ @failingTest // Does not work with old task model
test_mixinInference_matchingClass_inPreviousMixin() async {
AnalysisOptionsImpl options = new AnalysisOptionsImpl();
options.enableSuperMixins = true;
@@ -4044,8 +4130,10 @@
class C extends Object with M implements A<B> {}
''');
await computeAnalysisResult(source);
- assertErrors(
- source, [CompileTimeErrorCode.MIXIN_INFERENCE_NO_MATCHING_CLASS]);
+ assertErrors(source, [
+ CompileTimeErrorCode.MIXIN_INFERENCE_NO_MATCHING_CLASS,
+ CompileTimeErrorCode.CONFLICTING_GENERIC_INTERFACES
+ ]);
}
test_mixinInference_noMatchingClass_namedMixinApplication() async {
diff --git a/pkg/analyzer/test/generated/non_error_resolver_test.dart b/pkg/analyzer/test/generated/non_error_resolver_test.dart
index 29f7980..14a43d8 100644
--- a/pkg/analyzer/test/generated/non_error_resolver_test.dart
+++ b/pkg/analyzer/test/generated/non_error_resolver_test.dart
@@ -314,6 +314,30 @@
verify([source]);
}
+ test_argumentTypeNotAssignable_optionalNew() async {
+ resetWith(
+ options: new AnalysisOptionsImpl()
+ ..previewDart2 = true
+ ..strongMode = true);
+ Source source = addSource(r'''
+class Widget { }
+
+class MaterialPageRoute {
+ final Widget Function() builder;
+ const MaterialPageRoute({this.builder});
+}
+
+void main() {
+ print(MaterialPageRoute(
+ builder: () { return Widget(); }
+ ));
+}
+''');
+ await computeAnalysisResult(source);
+ assertNoErrors(source);
+ verify([source]);
+ }
+
test_argumentTypeNotAssignable_typedef_local() async {
Source source = addSource(r'''
typedef A(int p1, String p2);
diff --git a/pkg/analyzer/test/generated/parser_fasta_listener.dart b/pkg/analyzer/test/generated/parser_fasta_listener.dart
index 5dd1085..349d2ad 100644
--- a/pkg/analyzer/test/generated/parser_fasta_listener.dart
+++ b/pkg/analyzer/test/generated/parser_fasta_listener.dart
@@ -522,8 +522,8 @@
}
@override
- void beginVariablesDeclaration(Token token) {
- super.beginVariablesDeclaration(token);
+ void beginVariablesDeclaration(Token token, Token varFinalOrConst) {
+ super.beginVariablesDeclaration(token, varFinalOrConst);
begin('VariablesDeclaration');
}
diff --git a/pkg/analyzer/test/generated/parser_fasta_test.dart b/pkg/analyzer/test/generated/parser_fasta_test.dart
index 5fe1d70..99ef619 100644
--- a/pkg/analyzer/test/generated/parser_fasta_test.dart
+++ b/pkg/analyzer/test/generated/parser_fasta_test.dart
@@ -99,11 +99,8 @@
class ComplexParserTest_Fasta extends FastaParserTestCase
with ComplexParserTestMixin {
@override
- @failingTest
void test_assignableExpression_arguments_normal_chain_typeArgumentComments() {
- // Fasta does not support the generic comment syntax.
- super
- .test_assignableExpression_arguments_normal_chain_typeArgumentComments();
+ // Ignored: Fasta does not support the generic comment syntax.
}
}
@@ -115,68 +112,6 @@
with ErrorParserTestMixin {
@override
@failingTest
- void test_duplicateLabelInSwitchStatement() {
- // TODO(brianwilkerson) Wrong errors:
- // Expected 1 errors of type ParserErrorCode.DUPLICATE_LABEL_IN_SWITCH_STATEMENT, found 0
- super.test_duplicateLabelInSwitchStatement();
- }
-
- @override
- @failingTest
- void test_expectedClassMember_inClass_afterType() {
- // TODO(brianwilkerson) Does not recover.
- // Expected: an object with length of <1>
- // Actual: <Instance of 'Stack'>
- // Which: has length of <2>
- //
- // package:test expect
- // test/generated/parser_fasta_test.dart 2870:7 ParserProxy._run
- // test/generated/parser_fasta_test.dart 2750:18 ParserProxy.parseClassMember
- super.test_expectedClassMember_inClass_afterType();
- }
-
- @override
- @failingTest
- void test_expectedClassMember_inClass_beforeType() {
- // TODO(brianwilkerson) Does not recover.
- // Expected: an object with length of <1>
- // Actual: <Instance of 'Stack'>
- // Which: has length of <2>
- //
- // package:test expect
- // test/generated/parser_fasta_test.dart 2870:7 ParserProxy._run
- // test/generated/parser_fasta_test.dart 2750:18 ParserProxy.parseClassMember
- super.test_expectedClassMember_inClass_beforeType();
- }
-
- @override
- @failingTest
- void test_expectedExecutable_inClass_afterVoid() {
- // TODO(brianwilkerson) Does not recover.
- // Expected: an object with length of <1>
- // Actual: <Instance of 'Stack'>
- // Which: has length of <2>
- //
- // package:test expect
- // test/generated/parser_fasta_test.dart 2870:7 ParserProxy._run
- // test/generated/parser_fasta_test.dart 2750:18 ParserProxy.parseClassMember
- super.test_expectedExecutable_inClass_afterVoid();
- }
-
- @override
- @failingTest
- void test_expectedExecutable_topLevel_beforeType() {
- // TODO(brianwilkerson) Does not recover.
- // Expected: true
- // Actual: <false>
- //
- // package:test expect
- // test/generated/parser_fasta_test.dart 2852:5 ParserProxy.parseTopLevelDeclaration
- super.test_expectedExecutable_topLevel_beforeType();
- }
-
- @override
- @failingTest
void test_expectedInterpolationIdentifier() {
// TODO(brianwilkerson) Does not recover.
// RangeError: Value not in range: -1
@@ -240,15 +175,6 @@
@override
@failingTest
- void test_expectedToken_parseStatement_afterVoid() {
- // TODO(brianwilkerson) Wrong errors:
- // Expected 1 errors of type ParserErrorCode.EXPECTED_TOKEN, found 0;
- // 1 errors of type ParserErrorCode.MISSING_IDENTIFIER, found 0
- super.test_expectedToken_parseStatement_afterVoid();
- }
-
- @override
- @failingTest
void test_expectedToken_whileMissingInDoStatement() {
// TODO(brianwilkerson) Does not recover.
// NoSuchMethodError: Class 'SimpleToken' has no instance getter 'endGroup'.
@@ -290,23 +216,6 @@
@override
@failingTest
- void test_factoryWithInitializers() {
- // TODO(brianwilkerson) Does not recover.
- // Internal problem: Compiler cannot run without a compiler context.
- // Tip: Are calls to the compiler wrapped in CompilerContext.runInContext?
- // package:front_end/src/fasta/compiler_context.dart 81:7 CompilerContext.current
- // package:front_end/src/fasta/problems.dart 29:25 internalProblem
- // package:front_end/src/fasta/problems.dart 41:10 unhandled
- // package:analyzer/src/fasta/ast_builder.dart 1506:7 AstBuilder.endFactoryMethod
- // test/generated/parser_fasta_listener.dart 731:14 ForwardingTestListener.endFactoryMethod
- // package:front_end/src/fasta/parser/parser.dart 2465:14 Parser.parseFactoryMethod
- // package:front_end/src/fasta/parser/parser.dart 2240:15 Parser.parseMember
- // test/generated/parser_fasta_test.dart 3051:39 ParserProxy._run
- super.test_factoryWithInitializers();
- }
-
- @override
- @failingTest
void test_getterInFunction_block_noReturnType() {
// TODO(brianwilkerson) Does not recover.
// type 'ExpressionStatementImpl' is not a subtype of type 'FunctionDeclarationStatement' of 'statement' where
@@ -358,30 +267,6 @@
@override
@failingTest
- void test_illegalAssignmentToNonAssignable_superAssigned() {
- // TODO(brianwilkerson) Does not recover.
- // Expected: true
- // Actual: <false>
- //
- // package:test expect
- // test/generated/parser_fasta_test.dart 3157:5 ParserProxy._run
- super.test_illegalAssignmentToNonAssignable_superAssigned();
- }
-
- @override
- @failingTest
- void test_illegalAssignmentToNonAssignable_superAssigned_failing() {
- // TODO(brianwilkerson) Does not recover.
- // Expected: true
- // Actual: <false>
- //
- // package:test expect
- // test/generated/parser_fasta_test.dart 3157:5 ParserProxy._run
- super.test_illegalAssignmentToNonAssignable_superAssigned_failing();
- }
-
- @override
- @failingTest
void test_invalidCodePoint() {
// TODO(brianwilkerson) Does not recover.
// Internal problem: Compiler cannot run without a compiler context.
@@ -808,14 +693,6 @@
@override
@failingTest
- void test_missingAssignableSelector_superPrimaryExpression() {
- // TODO(brianwilkerson) Wrong errors:
- // Expected 1 errors of type ParserErrorCode.MISSING_ASSIGNABLE_SELECTOR, found 0
- super.test_missingAssignableSelector_superPrimaryExpression();
- }
-
- @override
- @failingTest
void test_missingAssignableSelector_superPropertyAccessAssigned() {
// TODO(brianwilkerson) Does not recover.
// Expected: true
@@ -922,14 +799,6 @@
@override
@failingTest
- void test_missingStatement_afterVoid() {
- // TODO(brianwilkerson) Wrong errors:
- // Expected 1 errors of type ParserErrorCode.MISSING_STATEMENT, found 0
- super.test_missingStatement_afterVoid();
- }
-
- @override
- @failingTest
void test_missingVariableInForEach() {
// TODO(brianwilkerson) Does not recover.
// type 'BinaryExpressionImpl' is not a subtype of type 'VariableDeclarationStatement' in type cast where
@@ -1467,8 +1336,10 @@
@override
Expression parseExpression(String source,
- {List<ErrorCode> codes, List<ExpectedError> errors}) {
- createParser(source);
+ {List<ErrorCode> codes,
+ List<ExpectedError> errors,
+ int expectedEndOffset}) {
+ createParser(source, expectedEndOffset: expectedEndOffset);
Expression result = _parserProxy.parseExpression2();
assertErrors(codes: codes, errors: errors);
return result;
diff --git a/pkg/analyzer/test/generated/parser_test.dart b/pkg/analyzer/test/generated/parser_test.dart
index 92e1c59..bbf84c6 100644
--- a/pkg/analyzer/test/generated/parser_test.dart
+++ b/pkg/analyzer/test/generated/parser_test.dart
@@ -159,7 +159,9 @@
BinaryExpression parseEqualityExpression(String code);
Expression parseExpression(String source,
- {List<ErrorCode> codes, List<ExpectedError> errors});
+ {List<ErrorCode> codes,
+ List<ExpectedError> errors,
+ int expectedEndOffset});
List<Expression> parseExpressionList(String code);
@@ -2584,23 +2586,6 @@
listener.assertErrors([expectedError(ParserErrorCode.CONST_METHOD, 0, 5)]);
}
- void test_constructorWithReturnType() {
- createParser('C C() {}');
- ClassMember member = parser.parseClassMember('C');
- expectNotNullIfNoErrors(member);
- listener.assertErrors(
- [expectedError(ParserErrorCode.CONSTRUCTOR_WITH_RETURN_TYPE, 0, 1)]);
- }
-
- void test_constructorWithReturnType_var() {
- createParser('var C() {}');
- ClassMember member = parser.parseClassMember('C');
- expectNotNullIfNoErrors(member);
- listener.assertErrors(usingFastaParser
- ? [expectedError(ParserErrorCode.VAR_RETURN_TYPE, 0, 3)]
- : [expectedError(ParserErrorCode.CONSTRUCTOR_WITH_RETURN_TYPE, 0, 3)]);
- }
-
void test_constructorPartial() {
createParser('class C { C< }');
parser.parseCompilationUnit2();
@@ -2619,6 +2604,23 @@
]);
}
+ void test_constructorWithReturnType() {
+ createParser('C C() {}');
+ ClassMember member = parser.parseClassMember('C');
+ expectNotNullIfNoErrors(member);
+ listener.assertErrors(
+ [expectedError(ParserErrorCode.CONSTRUCTOR_WITH_RETURN_TYPE, 0, 1)]);
+ }
+
+ void test_constructorWithReturnType_var() {
+ createParser('var C() {}');
+ ClassMember member = parser.parseClassMember('C');
+ expectNotNullIfNoErrors(member);
+ listener.assertErrors(usingFastaParser
+ ? [expectedError(ParserErrorCode.VAR_RETURN_TYPE, 0, 3)]
+ : [expectedError(ParserErrorCode.CONSTRUCTOR_WITH_RETURN_TYPE, 0, 3)]);
+ }
+
void test_constTypedef() {
parseCompilationUnit("const typedef F();",
errors: [expectedError(ParserErrorCode.CONST_TYPEDEF, 0, 5)]);
@@ -2942,19 +2944,41 @@
}
void test_expectedClassMember_inClass_afterType() {
- createParser('heart 2 heart');
- ClassMember member = parser.parseClassMember('C');
- expectNotNullIfNoErrors(member);
- listener.assertErrors(
- [expectedError(ParserErrorCode.EXPECTED_CLASS_MEMBER, 0, 5)]);
+ parseCompilationUnit('class C{ heart 2 heart }',
+ errors: usingFastaParser
+ ? [
+ expectedError(
+ ParserErrorCode.MISSING_CONST_FINAL_VAR_OR_TYPE, 9, 5),
+ expectedError(ParserErrorCode.EXPECTED_TOKEN, 15, 1),
+ expectedError(ParserErrorCode.EXPECTED_CLASS_MEMBER, 15, 1),
+ expectedError(
+ ParserErrorCode.MISSING_CONST_FINAL_VAR_OR_TYPE, 17, 5),
+ expectedError(ParserErrorCode.EXPECTED_TOKEN, 23, 1)
+ ]
+ : [
+ expectedError(ParserErrorCode.UNEXPECTED_TOKEN, 15, 1),
+ expectedError(ParserErrorCode.EXPECTED_CLASS_MEMBER, 15, 1),
+ expectedError(ParserErrorCode.EXPECTED_CLASS_MEMBER, 15, 1),
+ expectedError(ParserErrorCode.MISSING_IDENTIFIER, 23, 1),
+ expectedError(ParserErrorCode.EXPECTED_TOKEN, 23, 1)
+ ]);
}
void test_expectedClassMember_inClass_beforeType() {
- createParser('4 score');
- ClassMember member = parser.parseClassMember('C');
- expectNotNullIfNoErrors(member);
- listener.assertErrors(
- [expectedError(ParserErrorCode.EXPECTED_CLASS_MEMBER, 0, 1)]);
+ parseCompilationUnit('class C { 4 score }',
+ errors: usingFastaParser
+ ? [
+ expectedError(ParserErrorCode.EXPECTED_CLASS_MEMBER, 10, 1),
+ expectedError(
+ ParserErrorCode.MISSING_CONST_FINAL_VAR_OR_TYPE, 12, 5),
+ expectedError(ParserErrorCode.EXPECTED_TOKEN, 18, 1)
+ ]
+ : [
+ expectedError(ParserErrorCode.EXPECTED_CLASS_MEMBER, 10, 1),
+ expectedError(ParserErrorCode.UNEXPECTED_TOKEN, 10, 1),
+ expectedError(ParserErrorCode.MISSING_IDENTIFIER, 18, 1),
+ expectedError(ParserErrorCode.EXPECTED_TOKEN, 18, 1)
+ ]);
}
void test_expectedExecutable_afterAnnotation_atEOF() {
@@ -2965,11 +2989,21 @@
}
void test_expectedExecutable_inClass_afterVoid() {
- createParser('void 2 void');
- ClassMember member = parser.parseClassMember('C');
- expectNotNullIfNoErrors(member);
- listener.assertErrors(
- [expectedError(ParserErrorCode.EXPECTED_EXECUTABLE, 5, 1)]);
+ parseCompilationUnit('class C { void 2 void }',
+ errors: usingFastaParser
+ ? [
+ expectedError(ParserErrorCode.MISSING_IDENTIFIER, 15, 1),
+ expectedError(ParserErrorCode.EXPECTED_TOKEN, 15, 1),
+ expectedError(ParserErrorCode.EXPECTED_CLASS_MEMBER, 15, 1),
+ expectedError(ParserErrorCode.MISSING_IDENTIFIER, 22, 1),
+ expectedError(ParserErrorCode.EXPECTED_TOKEN, 22, 1)
+ ]
+ : [
+ expectedError(ParserErrorCode.EXPECTED_EXECUTABLE, 15, 1),
+ expectedError(ParserErrorCode.EXPECTED_CLASS_MEMBER, 15, 1),
+ expectedError(ParserErrorCode.UNEXPECTED_TOKEN, 15, 1),
+ expectedError(ParserErrorCode.EXPECTED_EXECUTABLE, 22, 1),
+ ]);
}
void test_expectedExecutable_topLevel_afterType() {
@@ -3013,11 +3047,19 @@
}
void test_expectedExecutable_topLevel_beforeType() {
- createParser('4 score');
- CompilationUnitMember member = parseFullCompilationUnitMember();
- expectNotNullIfNoErrors(member);
- listener.assertErrors(
- [expectedError(ParserErrorCode.EXPECTED_EXECUTABLE, 0, 1)]);
+ parseCompilationUnit('4 score',
+ errors: usingFastaParser
+ ? [
+ expectedError(ParserErrorCode.EXPECTED_EXECUTABLE, 0, 1),
+ expectedError(
+ ParserErrorCode.MISSING_CONST_FINAL_VAR_OR_TYPE, 2, 5),
+ expectedError(ParserErrorCode.EXPECTED_TOKEN, 7, 0),
+ ]
+ : [
+ expectedError(ParserErrorCode.EXPECTED_EXECUTABLE, 0, 1),
+ expectedError(ParserErrorCode.UNEXPECTED_TOKEN, 0, 1),
+ expectedError(ParserErrorCode.EXPECTED_EXECUTABLE, 2, 5),
+ ]);
}
void test_expectedExecutable_topLevel_eof() {
@@ -3087,11 +3129,16 @@
}
void test_expectedToken_parseStatement_afterVoid() {
- parseStatement("void}");
- listener.assertErrors([
- expectedError(ParserErrorCode.EXPECTED_TOKEN, 4, 1),
- expectedError(ParserErrorCode.MISSING_IDENTIFIER, 4, 1)
- ]);
+ parseStatement("void}", expectedEndOffset: 4);
+ listener.assertErrors(usingFastaParser
+ ? [
+ expectedError(ParserErrorCode.MISSING_STATEMENT, 0, 4),
+ expectedError(ParserErrorCode.EXPECTED_TOKEN, 4, 1)
+ ]
+ : [
+ expectedError(ParserErrorCode.EXPECTED_TOKEN, 4, 1),
+ expectedError(ParserErrorCode.MISSING_IDENTIFIER, 4, 1)
+ ]);
}
void test_expectedToken_semicolonMissingAfterExport() {
@@ -3160,6 +3207,7 @@
void test_expectedTypeName_as_void() {
parseExpression("x as void)",
+ expectedEndOffset: 9,
errors: [expectedError(ParserErrorCode.EXPECTED_TYPE_NAME, 5, 4)]);
}
@@ -3170,6 +3218,7 @@
void test_expectedTypeName_is_void() {
parseExpression("x is void)",
+ expectedEndOffset: 9,
errors: [expectedError(ParserErrorCode.EXPECTED_TYPE_NAME, 4, 4)]);
}
@@ -3435,11 +3484,12 @@
}
void test_factoryWithInitializers() {
- createParser('factory C() : x = 3 {}');
+ createParser('factory C() : x = 3 {}', expectedEndOffset: 12);
ClassMember member = parser.parseClassMember('C');
expectNotNullIfNoErrors(member);
- listener.assertErrors(
- [expectedError(ParserErrorCode.FACTORY_WITH_INITIALIZERS, 12, 1)]);
+ listener.assertErrors(usingFastaParser
+ ? [expectedError(ParserErrorCode.MISSING_FUNCTION_BODY, 12, 1)]
+ : [expectedError(ParserErrorCode.FACTORY_WITH_INITIALIZERS, 12, 1)]);
}
void test_factoryWithoutBody() {
@@ -3692,27 +3742,19 @@
}
void test_illegalAssignmentToNonAssignable_superAssigned() {
- // TODO(brianwilkerson) When the test
- // test_illegalAssignmentToNonAssignable_superAssigned_failing starts to pass,
- // remove this test (there should only be one error generated, but we're
- // keeping this test until that time so that we can catch other forms of
- // regressions).
- parseExpression("super = x;", codes: [
- ParserErrorCode.MISSING_ASSIGNABLE_SELECTOR,
- ParserErrorCode.ILLEGAL_ASSIGNMENT_TO_NON_ASSIGNABLE
- ]);
- }
-
- @failingTest
- void test_illegalAssignmentToNonAssignable_superAssigned_failing() {
// TODO(brianwilkerson) When this test starts to pass, remove the test
// test_illegalAssignmentToNonAssignable_superAssigned.
- parseExpression("super = x;",
-// codes: [ParserErrorCode.ILLEGAL_ASSIGNMENT_TO_NON_ASSIGNABLE],
- errors: [
- expectedError(
- ParserErrorCode.ILLEGAL_ASSIGNMENT_TO_NON_ASSIGNABLE, 6, 1)
- ]);
+ parseStatement("super = x;");
+ listener.assertErrors(usingFastaParser
+ ? [
+ expectedError(
+ ParserErrorCode.ILLEGAL_ASSIGNMENT_TO_NON_ASSIGNABLE, 0, 5)
+ ]
+ : [
+ expectedError(ParserErrorCode.MISSING_ASSIGNABLE_SELECTOR, 6, 1),
+ expectedError(
+ ParserErrorCode.ILLEGAL_ASSIGNMENT_TO_NON_ASSIGNABLE, 6, 1)
+ ]);
}
void test_implementsBeforeExtends() {
@@ -4163,10 +4205,13 @@
}
void test_missingAssignableSelector_superPrimaryExpression() {
- Expression expression = parseExpression('super', errors: [
- expectedError(ParserErrorCode.MISSING_ASSIGNABLE_SELECTOR, 5, 0)
+ CompilationUnit unit = parseCompilationUnit('main() {super;}', errors: [
+ expectedError(ParserErrorCode.MISSING_ASSIGNABLE_SELECTOR, 8, 5)
]);
- expectNotNullIfNoErrors(expression);
+ FunctionDeclaration declaration = unit.declarations.first;
+ BlockFunctionBody blockBody = declaration.functionExpression.body;
+ ExpressionStatement statement = (blockBody).block.statements.first;
+ Expression expression = (statement).expression;
expect(expression, new isInstanceOf<SuperExpression>());
SuperExpression superExpression = expression;
expect(superExpression.superKeyword, isNotNull);
@@ -4534,6 +4579,7 @@
listener.assertErrors(usingFastaParser
? [
expectedError(ParserErrorCode.MISSING_IDENTIFIER, 0, 2),
+ expectedError(ParserErrorCode.MISSING_STATEMENT, 0, 2),
expectedError(ParserErrorCode.EXPECTED_TOKEN, 2, 0)
]
: [expectedError(ParserErrorCode.MISSING_STATEMENT, 2, 0)]);
@@ -4542,7 +4588,7 @@
void test_missingStatement_afterVoid() {
parseStatement("void;");
listener
- .assertErrors([expectedError(ParserErrorCode.MISSING_STATEMENT, 4, 1)]);
+ .assertErrors([expectedError(ParserErrorCode.MISSING_STATEMENT, 0, 4)]);
}
void test_missingTerminatorForParameterGroup_named() {
@@ -4693,8 +4739,8 @@
expectNotNullIfNoErrors(list);
listener.assertErrors(
[expectedError(ParserErrorCode.NAMED_PARAMETER_OUTSIDE_GROUP, 6, 1)]);
- expect(list.parameters[0].kind, ParameterKind.REQUIRED);
- expect(list.parameters[1].kind, ParameterKind.NAMED);
+ expect(list.parameters[0].isRequired, isTrue);
+ expect(list.parameters[1].isNamed, isTrue);
}
void test_nonConstructorFactory_field() {
@@ -4832,9 +4878,12 @@
expectedError(
ParserErrorCode.POSITIONAL_PARAMETER_OUTSIDE_GROUP, 4, 1)
]);
- expect(list.parameters[0].kind, ParameterKind.REQUIRED);
- expect(list.parameters[1].kind,
- usingFastaParser ? ParameterKind.NAMED : ParameterKind.POSITIONAL);
+ expect(list.parameters[0].isRequired, isTrue);
+ if (usingFastaParser) {
+ expect(list.parameters[1].isNamed, isTrue);
+ } else {
+ expect(list.parameters[1].isOptionalPositional, isTrue);
+ }
}
void test_redirectingConstructorWithBody_named() {
@@ -8263,10 +8312,10 @@
expect(simpleParameter.identifier, isNotNull);
expect(simpleParameter.keyword, isNotNull);
expect(simpleParameter.type, isNull);
- expect(simpleParameter.kind, kind);
+ expect(simpleParameter.isNamed, isTrue);
expect(defaultParameter.separator, isNotNull);
expect(defaultParameter.defaultValue, isNotNull);
- expect(defaultParameter.kind, kind);
+ expect(defaultParameter.isNamed, isTrue);
}
void test_parseFormalParameter_covariant_final_normal() {
@@ -8280,7 +8329,7 @@
expect(simpleParameter.identifier, isNotNull);
expect(simpleParameter.keyword, isNotNull);
expect(simpleParameter.type, isNull);
- expect(simpleParameter.kind, kind);
+ expect(simpleParameter.isRequired, isTrue);
}
void test_parseFormalParameter_covariant_final_positional() {
@@ -8297,10 +8346,10 @@
expect(simpleParameter.identifier, isNotNull);
expect(simpleParameter.keyword, isNotNull);
expect(simpleParameter.type, isNull);
- expect(simpleParameter.kind, kind);
+ expect(simpleParameter.isOptionalPositional, isTrue);
expect(defaultParameter.separator, isNotNull);
expect(defaultParameter.defaultValue, isNotNull);
- expect(defaultParameter.kind, kind);
+ expect(defaultParameter.isOptionalPositional, isTrue);
}
void test_parseFormalParameter_covariant_final_type_named() {
@@ -8317,10 +8366,10 @@
expect(simpleParameter.identifier, isNotNull);
expect(simpleParameter.keyword, isNotNull);
expect(simpleParameter.type, isNotNull);
- expect(simpleParameter.kind, kind);
+ expect(simpleParameter.isNamed, isTrue);
expect(defaultParameter.separator, isNotNull);
expect(defaultParameter.defaultValue, isNotNull);
- expect(defaultParameter.kind, kind);
+ expect(defaultParameter.isNamed, isTrue);
}
void test_parseFormalParameter_covariant_final_type_normal() {
@@ -8335,7 +8384,7 @@
expect(simpleParameter.identifier, isNotNull);
expect(simpleParameter.keyword, isNotNull);
expect(simpleParameter.type, isNotNull);
- expect(simpleParameter.kind, kind);
+ expect(simpleParameter.isRequired, isTrue);
}
void test_parseFormalParameter_covariant_final_type_positional() {
@@ -8352,10 +8401,10 @@
expect(simpleParameter.identifier, isNotNull);
expect(simpleParameter.keyword, isNotNull);
expect(simpleParameter.type, isNotNull);
- expect(simpleParameter.kind, kind);
+ expect(simpleParameter.isOptionalPositional, isTrue);
expect(defaultParameter.separator, isNotNull);
expect(defaultParameter.defaultValue, isNotNull);
- expect(defaultParameter.kind, kind);
+ expect(defaultParameter.isOptionalPositional, isTrue);
}
void test_parseFormalParameter_covariant_type_function() {
@@ -8370,7 +8419,7 @@
expect(simpleParameter.identifier, isNotNull);
expect(simpleParameter.keyword, isNull);
expect(simpleParameter.type, new isInstanceOf<GenericFunctionType>());
- expect(simpleParameter.kind, kind);
+ expect(simpleParameter.isRequired, isTrue);
}
void test_parseFormalParameter_covariant_type_named() {
@@ -8387,10 +8436,10 @@
expect(simpleParameter.identifier, isNotNull);
expect(simpleParameter.keyword, isNull);
expect(simpleParameter.type, isNotNull);
- expect(simpleParameter.kind, kind);
+ expect(simpleParameter.isNamed, isTrue);
expect(defaultParameter.separator, isNotNull);
expect(defaultParameter.defaultValue, isNotNull);
- expect(defaultParameter.kind, kind);
+ expect(defaultParameter.isNamed, isTrue);
}
void test_parseFormalParameter_covariant_type_normal() {
@@ -8405,7 +8454,7 @@
expect(simpleParameter.identifier, isNotNull);
expect(simpleParameter.keyword, isNull);
expect(simpleParameter.type, isNotNull);
- expect(simpleParameter.kind, kind);
+ expect(simpleParameter.isRequired, isTrue);
}
void test_parseFormalParameter_covariant_type_positional() {
@@ -8422,10 +8471,10 @@
expect(simpleParameter.identifier, isNotNull);
expect(simpleParameter.keyword, isNull);
expect(simpleParameter.type, isNotNull);
- expect(simpleParameter.kind, kind);
+ expect(simpleParameter.isOptionalPositional, isTrue);
expect(defaultParameter.separator, isNotNull);
expect(defaultParameter.defaultValue, isNotNull);
- expect(defaultParameter.kind, kind);
+ expect(defaultParameter.isOptionalPositional, isTrue);
}
void test_parseFormalParameter_covariant_var_named() {
@@ -8442,10 +8491,10 @@
expect(simpleParameter.identifier, isNotNull);
expect(simpleParameter.keyword, isNotNull);
expect(simpleParameter.type, isNull);
- expect(simpleParameter.kind, kind);
+ expect(simpleParameter.isNamed, isTrue);
expect(defaultParameter.separator, isNotNull);
expect(defaultParameter.defaultValue, isNotNull);
- expect(defaultParameter.kind, kind);
+ expect(defaultParameter.isNamed, isTrue);
}
void test_parseFormalParameter_covariant_var_normal() {
@@ -8459,7 +8508,7 @@
expect(simpleParameter.identifier, isNotNull);
expect(simpleParameter.keyword, isNotNull);
expect(simpleParameter.type, isNull);
- expect(simpleParameter.kind, kind);
+ expect(simpleParameter.isRequired, isTrue);
}
void test_parseFormalParameter_covariant_var_positional() {
@@ -8476,10 +8525,10 @@
expect(simpleParameter.identifier, isNotNull);
expect(simpleParameter.keyword, isNotNull);
expect(simpleParameter.type, isNull);
- expect(simpleParameter.kind, kind);
+ expect(simpleParameter.isOptionalPositional, isTrue);
expect(defaultParameter.separator, isNotNull);
expect(defaultParameter.defaultValue, isNotNull);
- expect(defaultParameter.kind, kind);
+ expect(defaultParameter.isOptionalPositional, isTrue);
}
void test_parseFormalParameter_final_named() {
@@ -8495,10 +8544,10 @@
expect(simpleParameter.identifier, isNotNull);
expect(simpleParameter.keyword, isNotNull);
expect(simpleParameter.type, isNull);
- expect(simpleParameter.kind, kind);
+ expect(simpleParameter.isNamed, isTrue);
expect(defaultParameter.separator, isNotNull);
expect(defaultParameter.defaultValue, isNotNull);
- expect(defaultParameter.kind, kind);
+ expect(defaultParameter.isNamed, isTrue);
}
void test_parseFormalParameter_final_normal() {
@@ -8512,7 +8561,7 @@
expect(simpleParameter.identifier, isNotNull);
expect(simpleParameter.keyword, isNotNull);
expect(simpleParameter.type, isNull);
- expect(simpleParameter.kind, kind);
+ expect(simpleParameter.isRequired, isTrue);
}
void test_parseFormalParameter_final_positional() {
@@ -8528,10 +8577,10 @@
expect(simpleParameter.identifier, isNotNull);
expect(simpleParameter.keyword, isNotNull);
expect(simpleParameter.type, isNull);
- expect(simpleParameter.kind, kind);
+ expect(simpleParameter.isOptionalPositional, isTrue);
expect(defaultParameter.separator, isNotNull);
expect(defaultParameter.defaultValue, isNotNull);
- expect(defaultParameter.kind, kind);
+ expect(defaultParameter.isOptionalPositional, isTrue);
}
void test_parseFormalParameter_final_type_named() {
@@ -8547,10 +8596,10 @@
expect(simpleParameter.identifier, isNotNull);
expect(simpleParameter.keyword, isNotNull);
expect(simpleParameter.type, isNotNull);
- expect(simpleParameter.kind, kind);
+ expect(simpleParameter.isNamed, isTrue);
expect(defaultParameter.separator, isNotNull);
expect(defaultParameter.defaultValue, isNotNull);
- expect(defaultParameter.kind, kind);
+ expect(defaultParameter.isNamed, isTrue);
}
void test_parseFormalParameter_final_type_normal() {
@@ -8564,7 +8613,7 @@
expect(simpleParameter.identifier, isNotNull);
expect(simpleParameter.keyword, isNotNull);
expect(simpleParameter.type, isNotNull);
- expect(simpleParameter.kind, kind);
+ expect(simpleParameter.isRequired, isTrue);
}
void test_parseFormalParameter_final_type_positional() {
@@ -8580,10 +8629,10 @@
expect(simpleParameter.identifier, isNotNull);
expect(simpleParameter.keyword, isNotNull);
expect(simpleParameter.type, isNotNull);
- expect(simpleParameter.kind, kind);
+ expect(simpleParameter.isOptionalPositional, isTrue);
expect(defaultParameter.separator, isNotNull);
expect(defaultParameter.defaultValue, isNotNull);
- expect(defaultParameter.kind, kind);
+ expect(defaultParameter.isOptionalPositional, isTrue);
}
void test_parseFormalParameter_type_function() {
@@ -8598,7 +8647,7 @@
expect(simpleParameter.identifier, isNotNull);
expect(simpleParameter.keyword, isNull);
expect(simpleParameter.type, new isInstanceOf<GenericFunctionType>());
- expect(simpleParameter.kind, kind);
+ expect(simpleParameter.isRequired, isTrue);
}
void test_parseFormalParameter_type_named() {
@@ -8614,10 +8663,10 @@
expect(simpleParameter.identifier, isNotNull);
expect(simpleParameter.keyword, isNull);
expect(simpleParameter.type, isNotNull);
- expect(simpleParameter.kind, kind);
+ expect(simpleParameter.isNamed, isTrue);
expect(defaultParameter.separator, isNotNull);
expect(defaultParameter.defaultValue, isNotNull);
- expect(defaultParameter.kind, kind);
+ expect(defaultParameter.isNamed, isTrue);
}
void test_parseFormalParameter_type_named_noDefault() {
@@ -8633,10 +8682,10 @@
expect(simpleParameter.identifier, isNotNull);
expect(simpleParameter.keyword, isNull);
expect(simpleParameter.type, isNotNull);
- expect(simpleParameter.kind, kind);
+ expect(simpleParameter.isNamed, isTrue);
expect(defaultParameter.separator, isNull);
expect(defaultParameter.defaultValue, isNull);
- expect(defaultParameter.kind, kind);
+ expect(defaultParameter.isNamed, isTrue);
}
void test_parseFormalParameter_type_normal() {
@@ -8650,7 +8699,7 @@
expect(simpleParameter.identifier, isNotNull);
expect(simpleParameter.keyword, isNull);
expect(simpleParameter.type, isNotNull);
- expect(simpleParameter.kind, kind);
+ expect(simpleParameter.isRequired, isTrue);
}
void test_parseFormalParameter_type_positional() {
@@ -8666,10 +8715,10 @@
expect(simpleParameter.identifier, isNotNull);
expect(simpleParameter.keyword, isNull);
expect(simpleParameter.type, isNotNull);
- expect(simpleParameter.kind, kind);
+ expect(simpleParameter.isOptionalPositional, isTrue);
expect(defaultParameter.separator, isNotNull);
expect(defaultParameter.defaultValue, isNotNull);
- expect(defaultParameter.kind, kind);
+ expect(defaultParameter.isOptionalPositional, isTrue);
}
void test_parseFormalParameter_type_positional_noDefault() {
@@ -8685,10 +8734,10 @@
expect(simpleParameter.identifier, isNotNull);
expect(simpleParameter.keyword, isNull);
expect(simpleParameter.type, isNotNull);
- expect(simpleParameter.kind, kind);
+ expect(simpleParameter.isOptionalPositional, isTrue);
expect(defaultParameter.separator, isNull);
expect(defaultParameter.defaultValue, isNull);
- expect(defaultParameter.kind, kind);
+ expect(defaultParameter.isOptionalPositional, isTrue);
}
void test_parseFormalParameter_var_named() {
@@ -8704,10 +8753,10 @@
expect(simpleParameter.identifier, isNotNull);
expect(simpleParameter.keyword, isNotNull);
expect(simpleParameter.type, isNull);
- expect(simpleParameter.kind, kind);
+ expect(simpleParameter.isNamed, isTrue);
expect(defaultParameter.separator, isNotNull);
expect(defaultParameter.defaultValue, isNotNull);
- expect(defaultParameter.kind, kind);
+ expect(defaultParameter.isNamed, isTrue);
}
void test_parseFormalParameter_var_normal() {
@@ -8721,7 +8770,7 @@
expect(simpleParameter.identifier, isNotNull);
expect(simpleParameter.keyword, isNotNull);
expect(simpleParameter.type, isNull);
- expect(simpleParameter.kind, kind);
+ expect(simpleParameter.isRequired, isTrue);
}
void test_parseFormalParameter_var_positional() {
@@ -8737,10 +8786,10 @@
expect(simpleParameter.identifier, isNotNull);
expect(simpleParameter.keyword, isNotNull);
expect(simpleParameter.type, isNull);
- expect(simpleParameter.kind, kind);
+ expect(simpleParameter.isOptionalPositional, isTrue);
expect(defaultParameter.separator, isNotNull);
expect(defaultParameter.defaultValue, isNotNull);
- expect(defaultParameter.kind, kind);
+ expect(defaultParameter.isOptionalPositional, isTrue);
}
void test_parseFormalParameterList_empty() {
@@ -9121,10 +9170,10 @@
expect(functionParameter.identifier, isNotNull);
expect(functionParameter.typeParameters, isNull);
expect(functionParameter.parameters, isNotNull);
- expect(functionParameter.kind, kind);
+ expect(functionParameter.isNamed, isTrue);
expect(defaultParameter.separator, isNotNull);
expect(defaultParameter.defaultValue, isNotNull);
- expect(defaultParameter.kind, kind);
+ expect(defaultParameter.isNamed, isTrue);
}
void test_parseNormalFormalParameter_function_noType() {
@@ -9669,8 +9718,10 @@
* matches the list. Otherwise, assert that there are no errors.
*/
Expression parseExpression(String source,
- {List<ErrorCode> codes, List<ExpectedError> errors}) {
- createParser(source);
+ {List<ErrorCode> codes,
+ List<ExpectedError> errors,
+ int expectedEndOffset}) {
+ createParser(source, expectedEndOffset: expectedEndOffset);
Expression expression = parser.parseExpression2();
expectNotNullIfNoErrors(expression);
if (codes != null) {
@@ -11477,9 +11528,9 @@
MethodDeclaration method = classA.members[0];
NodeList<FormalParameter> parameters = method.parameters.parameters;
expect(parameters, hasLength(3));
- expect(parameters[0].kind, ParameterKind.NAMED);
- expect(parameters[1].kind, ParameterKind.NAMED);
- expect(parameters[2].kind, ParameterKind.REQUIRED);
+ expect(parameters[0].isNamed, isTrue);
+ expect(parameters[1].isNamed, isTrue);
+ expect(parameters[2].isRequired, isTrue);
}
void test_nonStringLiteralUri_import() {
diff --git a/pkg/analyzer/test/generated/static_type_analyzer_test.dart b/pkg/analyzer/test/generated/static_type_analyzer_test.dart
index 6842666..a324452 100644
--- a/pkg/analyzer/test/generated/static_type_analyzer_test.dart
+++ b/pkg/analyzer/test/generated/static_type_analyzer_test.dart
@@ -1627,6 +1627,7 @@
for (FormalParameter parameter in parameters.parameters) {
ParameterElementImpl element =
new ParameterElementImpl.forNode(parameter.identifier);
+ // ignore: deprecated_member_use
element.parameterKind = parameter.kind;
element.type = _typeProvider.dynamicType;
parameter.identifier.staticElement = element;
diff --git a/pkg/analyzer/test/src/dart/analysis/driver_test.dart b/pkg/analyzer/test/src/dart/analysis/driver_test.dart
index 3af39cd..d258087 100644
--- a/pkg/analyzer/test/src/dart/analysis/driver_test.dart
+++ b/pkg/analyzer/test/src/dart/analysis/driver_test.dart
@@ -5704,6 +5704,7 @@
expect(type, isNotNull);
expect(element.name, name);
expect(element.nameOffset, offset);
+ // ignore: deprecated_member_use
expect(element.parameterKind, kind);
expect(element.type, type);
}
diff --git a/pkg/analyzer/test/src/dart/ast/ast_test.dart b/pkg/analyzer/test/src/dart/ast/ast_test.dart
index bf5cf49..723f7e9 100644
--- a/pkg/analyzer/test/src/dart/ast/ast_test.dart
+++ b/pkg/analyzer/test/src/dart/ast/ast_test.dart
@@ -462,18 +462,60 @@
testUnit = await resolveSource2('/test.dart', source);
}
- void test_isConst_implicit_notInContext_nonConstConstructor() async {
+ void test_isConst_notInContext_constructor_const_generic_named() async {
enablePreviewDart2();
await resolve('''
-f() => <Object>[C()];
-class C {
- C();
+f() => <Object>[C<int>.n()];
+class C<E> {
+ const C.n();
}
''');
- assertInContext("C()", false);
+ assertInContext("C<int>.n", true);
}
- void test_isConst_implicit_notInContext_nonConstParam_implicitNew() async {
+ void
+ test_isConst_notInContext_constructor_const_generic_named_prefixed() async {
+ enablePreviewDart2();
+ addNamedSource('/c.dart', '''
+class C<E> {
+ const C.n();
+}
+''');
+ await resolve('''
+import 'c.dart' as p;
+f() => <Object>[p.C<int>.n()];
+''');
+ assertInContext("C<int>", true);
+ }
+
+ void test_isConst_notInContext_constructor_const_generic_unnamed() async {
+ enablePreviewDart2();
+ await resolve('''
+f() => <Object>[C<int>()];
+class C<E> {
+ const C();
+}
+''');
+ assertInContext("C<int>", true);
+ }
+
+ void
+ test_isConst_notInContext_constructor_const_generic_unnamed_prefixed() async {
+ enablePreviewDart2();
+ addNamedSource('/c.dart', '''
+class C<E> {
+ const C();
+}
+''');
+ await resolve('''
+import 'c.dart' as p;
+f() => <Object>[p.C<int>()];
+''');
+ assertInContext("C<int>", true);
+ }
+
+ void
+ test_isConst_notInContext_constructor_const_nonConstParam_constructor() async {
enablePreviewDart2();
await resolve('''
f() {
@@ -491,7 +533,8 @@
assertInContext("B())", false);
}
- void test_isConst_implicit_notInContext_nonConstParam_int() async {
+ void
+ test_isConst_notInContext_constructor_const_nonConstParam_variable() async {
enablePreviewDart2();
await resolve('''
f(int i) => <Object>[C(i)];
@@ -503,7 +546,33 @@
assertInContext("C(i)", false);
}
- void test_isConst_notExplicit_notInContext() async {
+ void test_isConst_notInContext_constructor_const_nonGeneric_named() async {
+ enablePreviewDart2();
+ await resolve('''
+f() => <Object>[C.n()];
+class C<E> {
+ const C.n();
+}
+''');
+ assertInContext("C.n()", true);
+ }
+
+ void
+ test_isConst_notInContext_constructor_const_nonGeneric_named_prefixed() async {
+ enablePreviewDart2();
+ addNamedSource('/c.dart', '''
+class C {
+ const C.n();
+}
+''');
+ await resolve('''
+import 'c.dart' as p;
+f() => <Object>[p.C.n()];
+''');
+ assertInContext("C.n()", true);
+ }
+
+ void test_isConst_notInContext_constructor_const_nonGeneric_unnamed() async {
enablePreviewDart2();
await resolve('''
f() => <Object>[C()];
@@ -513,6 +582,32 @@
''');
assertInContext("C()", true);
}
+
+ void
+ test_isConst_notInContext_constructor_const_nonGeneric_unnamed_prefixed() async {
+ enablePreviewDart2();
+ addNamedSource('/c.dart', '''
+class C {
+ const C();
+}
+''');
+ await resolve('''
+import 'c.dart' as p;
+f() => <Object>[p.C()];
+''');
+ assertInContext("C()", true);
+ }
+
+ void test_isConst_notInContext_constructor_nonConst() async {
+ enablePreviewDart2();
+ await resolve('''
+f() => <Object>[C()];
+class C {
+ C();
+}
+''');
+ assertInContext("C()", false);
+ }
}
@reflectiveTest
diff --git a/pkg/analyzer/test/src/dart/element/element_test.dart b/pkg/analyzer/test/src/dart/element/element_test.dart
index 9d385d5..3100d6f 100644
--- a/pkg/analyzer/test/src/dart/element/element_test.dart
+++ b/pkg/analyzer/test/src/dart/element/element_test.dart
@@ -64,7 +64,7 @@
// A
{
ClassElement elementA = unitElement.getType("A");
- expect(elementA.isDeprecated, isFalse);
+ expect(elementA.hasDeprecated, isFalse);
expect(elementA.isEnum, isFalse);
ClassDeclaration nodeA = elementA.computeNode();
expect(nodeA, isNotNull);
@@ -74,7 +74,7 @@
// B
{
ClassElement elementB = unitElement.getType("B");
- expect(elementB.isDeprecated, isTrue);
+ expect(elementB.hasDeprecated, isTrue);
expect(elementB.isEnum, isFalse);
ClassDeclaration nodeB = elementB.computeNode();
expect(nodeB, isNotNull);
@@ -84,7 +84,7 @@
// C
{
ClassElement elementC = unitElement.getEnum("C");
- expect(elementC.isDeprecated, isFalse);
+ expect(elementC.hasDeprecated, isFalse);
expect(elementC.isEnum, isTrue);
EnumDeclaration nodeC = elementC.computeNode();
expect(nodeC, isNotNull);
@@ -94,7 +94,7 @@
// D
{
ClassElement elementD = unitElement.getEnum("D");
- expect(elementD.isDeprecated, isTrue);
+ expect(elementD.hasDeprecated, isTrue);
expect(elementD.isEnum, isTrue);
EnumDeclaration nodeC = elementD.computeNode();
expect(nodeC, isNotNull);
diff --git a/pkg/analyzer/test/src/summary/element_text.dart b/pkg/analyzer/test/src/summary/element_text.dart
index 903fd18..e60f932 100644
--- a/pkg/analyzer/test/src/summary/element_text.dart
+++ b/pkg/analyzer/test/src/summary/element_text.dart
@@ -11,7 +11,6 @@
import 'package:analyzer/src/dart/element/element.dart';
import 'package:analyzer/src/dart/element/type.dart';
import 'package:analyzer/src/generated/source.dart';
-import 'package:analyzer/src/generated/utilities_dart.dart';
import 'package:analyzer/src/summary/idl.dart';
import 'package:test/test.dart';
@@ -619,21 +618,20 @@
String defaultValueSeparator;
Expression defaultValue;
String closeString;
- ParameterKind kind = e.parameterKind;
- if (kind == ParameterKind.REQUIRED) {
+ if (e.isNotOptional) {
closeString = '';
- } else if (kind == ParameterKind.POSITIONAL) {
+ } else if (e.isOptionalPositional) {
buffer.write('[');
defaultValueSeparator = ' = ';
defaultValue = (e as ConstVariableElement).constantInitializer;
closeString = ']';
- } else if (kind == ParameterKind.NAMED) {
+ } else if (e.isNamed) {
buffer.write('{');
defaultValueSeparator = ': ';
defaultValue = (e as ConstVariableElement).constantInitializer;
closeString = '}';
} else {
- fail('Unknown parameter kind: $kind');
+ fail('Unknown parameter kind');
}
// Kernel desugars omitted default parameter values to 'null'.
diff --git a/pkg/analyzer/test/src/summary/linker_test.dart b/pkg/analyzer/test/src/summary/linker_test.dart
index f01caa2..6d5ba24 100644
--- a/pkg/analyzer/test/src/summary/linker_test.dart
+++ b/pkg/analyzer/test/src/summary/linker_test.dart
@@ -276,6 +276,30 @@
expect(bundle.unlinkedUnits[0].references[typeRef.reference].name, 'int');
}
+ void test_genericTypeAlias_fromBundle() {
+ var bundle = createPackageBundle('''
+typedef F<S> = S Function(num);
+''', path: '/a.dart');
+ addBundle('/a.ds', bundle);
+
+ createLinker('''
+import 'a.dart';
+class A {
+ F<int> f;
+}
+class B implements A {
+ F<int> f;
+}
+''');
+ LibraryElementForLink library = linker.getLibrary(linkerInputs.testDartUri);
+ library.libraryCycleForLink.ensureLinked();
+
+ ClassElementForLink_Class B = library.getContainedName('B');
+ expect(B.fields, hasLength(1));
+ FieldElementForLink f = B.fields[0];
+ expect(f.type.toString(), '(num) → int');
+ }
+
void test_getContainedName_nonStaticField() {
createLinker('class C { var f; }');
LibraryElementForLink library = linker.getLibrary(linkerInputs.testDartUri);
diff --git a/pkg/analyzer/test/src/summary/resynthesize_common.dart b/pkg/analyzer/test/src/summary/resynthesize_common.dart
index 84a0684..f47ce77 100644
--- a/pkg/analyzer/test/src/summary/resynthesize_common.dart
+++ b/pkg/analyzer/test/src/summary/resynthesize_common.dart
@@ -965,6 +965,7 @@
compareVariableElements(resynthesized, original, desc);
compareParameterElementLists(
resynthesized.parameters, original.parameters, desc);
+ // ignore: deprecated_member_use
expect(resynthesized.parameterKind, original.parameterKind, reason: desc);
expect(resynthesized.isInitializingFormal, original.isInitializingFormal,
reason: desc);
diff --git a/pkg/analyzer/test/src/task/strong/checker_test.dart b/pkg/analyzer/test/src/task/strong/checker_test.dart
index ec7c82a..869f387 100644
--- a/pkg/analyzer/test/src/task/strong/checker_test.dart
+++ b/pkg/analyzer/test/src/task/strong/checker_test.dart
@@ -2807,10 +2807,12 @@
}
abstract class D extends Object with M<num> {}
-class E extends D with M<int> {
+/*error:CONFLICTING_GENERIC_INTERFACES*/
+/*error:CONFLICTING_GENERIC_INTERFACES*/class E extends D with M<int> {
/*error:INVALID_METHOD_OVERRIDE*/int x;
}
-class F extends D with M<int> {
+/*error:CONFLICTING_GENERIC_INTERFACES*/
+/*error:CONFLICTING_GENERIC_INTERFACES*/class F extends D with M<int> {
num x;
}
''');
diff --git a/pkg/analyzer_cli/lib/src/build_mode.dart b/pkg/analyzer_cli/lib/src/build_mode.dart
index b4a13f5..fc289ee 100644
--- a/pkg/analyzer_cli/lib/src/build_mode.dart
+++ b/pkg/analyzer_cli/lib/src/build_mode.dart
@@ -24,9 +24,11 @@
import 'package:analyzer/src/summary/summarize_ast.dart';
import 'package:analyzer/src/summary/summarize_elements.dart';
import 'package:analyzer/src/summary/summary_sdk.dart' show SummaryBasedDartSdk;
+import 'package:analyzer_cli/src/context_cache.dart';
import 'package:analyzer_cli/src/driver.dart';
import 'package:analyzer_cli/src/error_formatter.dart';
import 'package:analyzer_cli/src/error_severity.dart';
+import 'package:analyzer_cli/src/has_context_mixin.dart';
import 'package:analyzer_cli/src/options.dart';
import 'package:bazel_worker/bazel_worker.dart';
import 'package:collection/collection.dart';
@@ -70,8 +72,12 @@
var packageBundleProvider =
new WorkerPackageBundleProvider(packageBundleCache, inputs);
var buildMode = new BuildMode(
- resourceProvider, options, new AnalysisStats(),
- logger: logger, packageBundleProvider: packageBundleProvider);
+ resourceProvider,
+ options,
+ new AnalysisStats(),
+ new ContextCache(resourceProvider, options, Driver.verbosePrint),
+ logger: logger,
+ packageBundleProvider: packageBundleProvider);
await buildMode.analyze();
AnalysisEngine.instance.clearCaches();
}
@@ -149,13 +155,15 @@
/**
* Analyzer used when the "--build-mode" option is supplied.
*/
-class BuildMode {
+class BuildMode extends Object with HasContextMixin {
final ResourceProvider resourceProvider;
final CommandLineOptions options;
final AnalysisStats stats;
final PerformanceLog logger;
final PackageBundleProvider packageBundleProvider;
+ final ContextCache contextCache;
+
SummaryDataStore summaryDataStore;
AnalysisOptions analysisOptions;
Map<Uri, File> uriToFileMap;
@@ -168,7 +176,7 @@
final Set<Source> processedSources = new Set<Source>();
final Map<String, UnlinkedUnit> uriToUnit = <String, UnlinkedUnit>{};
- BuildMode(this.resourceProvider, this.options, this.stats,
+ BuildMode(this.resourceProvider, this.options, this.stats, this.contextCache,
{PerformanceLog logger, PackageBundleProvider packageBundleProvider})
: logger = logger ?? new PerformanceLog(null),
packageBundleProvider = packageBundleProvider ??
@@ -376,8 +384,7 @@
resourceProvider.getFolder(options.dartSdkPath),
options.strongMode);
dartSdk.analysisOptions =
- Driver.createAnalysisOptionsForCommandLineOptions(
- resourceProvider, options, rootPath);
+ createAnalysisOptionsForCommandLineOptions(options, rootPath);
dartSdk.useSummary = !options.buildSummaryOnly;
sdk = dartSdk;
sdkBundle = dartSdk.getSummarySdkBundle(options.strongMode);
@@ -393,8 +400,8 @@
new ExplicitSourceResolver(uriToFileMap)
]);
- analysisOptions = Driver.createAnalysisOptionsForCommandLineOptions(
- resourceProvider, options, rootPath);
+ analysisOptions =
+ createAnalysisOptionsForCommandLineOptions(options, rootPath);
AnalysisDriverScheduler scheduler = new AnalysisDriverScheduler(logger);
analysisDriver = new AnalysisDriver(
diff --git a/pkg/analyzer_cli/lib/src/context_cache.dart b/pkg/analyzer_cli/lib/src/context_cache.dart
new file mode 100644
index 0000000..578293c
--- /dev/null
+++ b/pkg/analyzer_cli/lib/src/context_cache.dart
@@ -0,0 +1,121 @@
+// 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/file_system/file_system.dart';
+import 'package:analyzer/src/context/builder.dart';
+import 'package:analyzer/src/generated/engine.dart';
+import 'package:analyzer_cli/src/options.dart';
+import 'package:path/path.dart' as path;
+
+/// Cache of [AnalysisOptionsImpl] objects that correspond to directories
+/// with analyzed files, used to reduce searching for `analysis_options.yaml`
+/// files.
+class ContextCache {
+ final ResourceProvider resourceProvider;
+ final CommandLineOptions clOptions;
+ final void Function(String) verbosePrint;
+
+ /// A mapping from normalized paths (currently, directories) to cache entries
+ /// which include builder, analysis_options paths, and [AnalysisOptionImpl]s.
+ Map<String, ContextCacheEntry> _byDirectory = {};
+
+ ContextCache(this.resourceProvider, this.clOptions, this.verbosePrint);
+
+ /// Look up info about a context from the cache. You can pass in any [path],
+ /// and it will try to provide an existing [ContextCacheEntry] that is
+ /// suitable for that [path] if one exists.
+ ContextCacheEntry forSource(String path) {
+ path = _normalizeSourcePath(path);
+ return _byDirectory.putIfAbsent(path, () {
+ final builder = new ContextBuilder(resourceProvider, null, null,
+ options: clOptions.contextBuilderOptions);
+ return new ContextCacheEntry(builder, path, clOptions, verbosePrint);
+ });
+ }
+
+ /// Cheaply normalize source paths so we can increase cache performance.
+ /// Getting the location of an analysis_options.yaml file for a given source
+ /// can be expensive, so we want to reduce extra lookups where possible. We
+ /// know that two files in the same directory share an analysis options file,
+ /// so that's the normalization we perform currently. However, this could be
+ /// any form of performance-increasing cache key normalization.
+ String _normalizeSourcePath(String sourcePath) {
+ if (!resourceProvider.pathContext.isAbsolute(sourcePath)) {
+ // TODO(mfairhurst) Use resourceProvider.pathContext.absolute(). For the
+ // moment, we get an issues where pathContext.current is `.`, which causes
+ // pathContext.absolute() to produce `./foo` instead of `/absolute/foo`.
+ sourcePath = path.absolute(sourcePath);
+ }
+
+ sourcePath = resourceProvider.pathContext.normalize(sourcePath);
+
+ // Prepare the directory which is, or contains, the context root.
+ if (resourceProvider.getFolder(sourcePath).exists) {
+ return sourcePath;
+ }
+
+ return resourceProvider.pathContext.dirname(sourcePath);
+ }
+}
+
+/// Each entry of the [ContextCache] caches three things: the [ContextBuilder],
+/// the analysis_options.yaml path of the context, and the [AnalysisOptionsImpl]
+/// of the context.
+class ContextCacheEntry {
+ final CommandLineOptions clOptions;
+ final ContextBuilder builder;
+ final String requestedSourceDirectory;
+ final void Function(String) verbosePrint;
+
+ AnalysisOptionsImpl _analysisOptions;
+ String _analysisRoot;
+
+ ContextCacheEntry(this.builder, this.requestedSourceDirectory, this.clOptions,
+ this.verbosePrint);
+
+ /// Get the fully parsed [AnalysisOptionsImpl] for this entry.
+ AnalysisOptionsImpl get analysisOptions =>
+ _analysisOptions ??= _getAnalysisOptions();
+
+ /// Find the root path from which excludes should be considered due to where
+ /// the analysis_options.yaml was defined.
+ String get analysisRoot => _analysisRoot ??= _getAnalysisRoot();
+
+ /// The actual calculation to get the [AnalysisOptionsImpl], with no caching.
+ /// This should not be used except behind the getter which caches this result
+ /// automatically.
+ AnalysisOptions _getAnalysisOptions() {
+ AnalysisOptionsImpl contextOptions = builder.getAnalysisOptions(
+ requestedSourceDirectory,
+ verbosePrint: clOptions.verbose ? verbosePrint : null);
+
+ contextOptions.trackCacheDependencies = false;
+ contextOptions.disableCacheFlushing = clOptions.disableCacheFlushing;
+ contextOptions.hint = !clOptions.disableHints;
+ contextOptions.generateImplicitErrors = clOptions.showPackageWarnings;
+ contextOptions.generateSdkErrors = clOptions.showSdkWarnings;
+ contextOptions.previewDart2 = clOptions.previewDart2;
+ if (clOptions.useCFE) {
+ contextOptions.useFastaParser = true;
+ }
+
+ return contextOptions;
+ }
+
+ /// The actual calculation to get the analysis root, with no caching. This
+ /// should not be used except behind the getter which caches this result
+ /// automatically.
+ String _getAnalysisRoot() {
+ // The analysis yaml defines the root, if it exists.
+ var analysisOptionsPath = builder
+ .getOptionsFile(requestedSourceDirectory, forceSearch: true)
+ ?.path;
+
+ if (analysisOptionsPath == null) {
+ return requestedSourceDirectory;
+ }
+
+ return path.dirname(analysisOptionsPath);
+ }
+}
diff --git a/pkg/analyzer_cli/lib/src/driver.dart b/pkg/analyzer_cli/lib/src/driver.dart
index ef33b5b..59ad0f0 100644
--- a/pkg/analyzer_cli/lib/src/driver.dart
+++ b/pkg/analyzer_cli/lib/src/driver.dart
@@ -12,6 +12,7 @@
import 'package:analyzer/plugin/resolver_provider.dart';
import 'package:analyzer/source/package_map_provider.dart';
import 'package:analyzer/source/package_map_resolver.dart';
+import 'package:analyzer/source/path_filter.dart';
import 'package:analyzer/source/pub_package_map_provider.dart';
import 'package:analyzer/source/sdk_ext.dart';
import 'package:analyzer/src/context/builder.dart';
@@ -36,8 +37,10 @@
import 'package:analyzer_cli/src/analyzer_impl.dart';
import 'package:analyzer_cli/src/batch_mode.dart';
import 'package:analyzer_cli/src/build_mode.dart';
+import 'package:analyzer_cli/src/context_cache.dart';
import 'package:analyzer_cli/src/error_formatter.dart';
import 'package:analyzer_cli/src/error_severity.dart';
+import 'package:analyzer_cli/src/has_context_mixin.dart';
import 'package:analyzer_cli/src/options.dart';
import 'package:analyzer_cli/src/perf_report.dart';
import 'package:analyzer_cli/starter.dart' show CommandLineStarter;
@@ -90,17 +93,14 @@
_analytics = replacementAnalytics;
}
-class Driver implements CommandLineStarter {
+class Driver extends Object with HasContextMixin implements CommandLineStarter {
static final PerformanceTag _analyzeAllTag =
new PerformanceTag("Driver._analyzeAll");
- /// Cache of [AnalysisOptionsImpl] objects that correspond to directories
- /// with analyzed files, used to reduce searching for `analysis_options.yaml`
- /// files.
- static Map<String, AnalysisOptionsImpl> _directoryToAnalysisOptions = {};
-
static ByteStore analysisDriverMemoryByteStore = new MemoryByteStore();
+ ContextCache contextCache;
+
/// The plugins that are defined outside the `analyzer_cli` package.
List<Plugin> _userDefinedPlugins = <Plugin>[];
@@ -134,6 +134,9 @@
CrashReportSender _crashReportSender;
+ /// The [PathFilter] for excluded files with wildcards, etc.
+ PathFilter pathFilter;
+
/// Create a new Driver instance.
///
/// [isTesting] is true if we're running in a test environment.
@@ -442,7 +445,9 @@
.run();
return ErrorSeverity.NONE;
} else {
- return await new BuildMode(resourceProvider, options, stats).analyze();
+ return await new BuildMode(resourceProvider, options, stats,
+ new ContextCache(resourceProvider, options, verbosePrint))
+ .analyze();
}
} finally {
previous.makeCurrent();
@@ -580,23 +585,9 @@
/// Collect all analyzable files at [filePath], recursively if it's a
/// directory, ignoring links.
Iterable<io.File> _collectFiles(String filePath, AnalysisOptions options) {
- List<String> excludedPaths = options.excludePatterns;
-
- /**
- * Returns `true` if the given [path] is excluded by [excludedPaths].
- */
- bool _isExcluded(String path) {
- return excludedPaths.any((excludedPath) {
- if (resourceProvider.absolutePathContext.isWithin(excludedPath, path)) {
- return true;
- }
- return path == excludedPath;
- });
- }
-
List<io.File> files = <io.File>[];
io.File file = new io.File(filePath);
- if (file.existsSync() && !_isExcluded(filePath)) {
+ if (file.existsSync() && !pathFilter.ignored(filePath)) {
files.add(file);
} else {
io.Directory directory = new io.Directory(filePath);
@@ -605,7 +596,7 @@
in directory.listSync(recursive: true, followLinks: false)) {
String relative = path.relative(entry.path, from: directory.path);
if (AnalysisEngine.isDartFileName(entry.path) &&
- !_isExcluded(relative) &&
+ !pathFilter.ignored(entry.path) &&
!_isInHiddenDir(relative)) {
files.add(entry);
}
@@ -639,17 +630,20 @@
// If not the same command-line options, clear cached information.
if (!_equalCommandLineOptions(_previousOptions, options)) {
_previousOptions = options;
- _directoryToAnalysisOptions.clear();
+ contextCache = new ContextCache(resourceProvider, options, verbosePrint);
_context = null;
analysisDriver = null;
}
AnalysisOptionsImpl analysisOptions =
- createAnalysisOptionsForCommandLineOptions(
- resourceProvider, options, source);
+ createAnalysisOptionsForCommandLineOptions(options, source);
analysisOptions.analyzeFunctionBodiesPredicate =
_chooseDietParsingPolicy(options);
+ // Store the [PathFilter] for this context to properly exclude files
+ pathFilter = new PathFilter(getContextInfo(options, source).analysisRoot,
+ analysisOptions.excludePatterns);
+
// If we have the analysis driver, and the new analysis options are the
// same, we can reuse this analysis driver.
if (_context != null &&
@@ -891,68 +885,6 @@
}
}
- static AnalysisOptionsImpl createAnalysisOptionsForCommandLineOptions(
- ResourceProvider resourceProvider,
- CommandLineOptions options,
- String source) {
- if (options.analysisOptionsFile != null) {
- file_system.File file =
- resourceProvider.getFile(options.analysisOptionsFile);
- if (!file.exists) {
- printAndFail('Options file not found: ${options.analysisOptionsFile}',
- exitCode: ErrorSeverity.ERROR.ordinal);
- }
- }
-
- String contextRoot;
- if (options.sourceFiles.isEmpty) {
- contextRoot = path.current;
- } else {
- if (path.isAbsolute(source)) {
- contextRoot = source;
- } else {
- contextRoot = path.absolute(source);
- }
- }
-
- void verbosePrint(String text) {
- outSink.writeln(text);
- }
-
- // Prepare the directory which is, or contains, the context root.
- String contextRootDirectory;
- if (resourceProvider.getFolder(contextRoot).exists) {
- contextRootDirectory = contextRoot;
- } else {
- contextRootDirectory = resourceProvider.pathContext.dirname(contextRoot);
- }
-
- // Check if there is the options object for the content directory.
- AnalysisOptionsImpl contextOptions =
- _directoryToAnalysisOptions[contextRootDirectory];
- if (contextOptions != null) {
- return contextOptions;
- }
-
- contextOptions = new ContextBuilder(resourceProvider, null, null,
- options: options.contextBuilderOptions)
- .getAnalysisOptions(contextRoot,
- verbosePrint: options.verbose ? verbosePrint : null);
-
- contextOptions.trackCacheDependencies = false;
- contextOptions.disableCacheFlushing = options.disableCacheFlushing;
- contextOptions.hint = !options.disableHints;
- contextOptions.generateImplicitErrors = options.showPackageWarnings;
- contextOptions.generateSdkErrors = options.showSdkWarnings;
- contextOptions.previewDart2 = options.previewDart2;
- if (options.useCFE) {
- contextOptions.useFastaParser = true;
- }
-
- _directoryToAnalysisOptions[contextRootDirectory] = contextOptions;
- return contextOptions;
- }
-
/// Copy variables defined in the [options] into [declaredVariables].
static void declareVariables(
DeclaredVariables declaredVariables, CommandLineOptions options) {
@@ -964,6 +896,10 @@
}
}
+ static void verbosePrint(String text) {
+ outSink.writeln(text);
+ }
+
/// Return whether the [newOptions] are equal to the [previous].
static bool _equalCommandLineOptions(
CommandLineOptions previous, CommandLineOptions newOptions) {
diff --git a/pkg/analyzer_cli/lib/src/has_context_mixin.dart b/pkg/analyzer_cli/lib/src/has_context_mixin.dart
new file mode 100644
index 0000000..8b51af6
--- /dev/null
+++ b/pkg/analyzer_cli/lib/src/has_context_mixin.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:analyzer/error/error.dart';
+import 'package:analyzer/file_system/file_system.dart' as file_system;
+import 'package:analyzer/file_system/file_system.dart';
+import 'package:analyzer/src/generated/engine.dart';
+import 'package:analyzer_cli/src/context_cache.dart';
+import 'package:analyzer_cli/src/options.dart';
+
+abstract class HasContextMixin {
+ ContextCache get contextCache;
+ ResourceProvider get resourceProvider;
+
+ /// Based on the command line options, performantly get cached analysis
+ /// options for the context.
+ AnalysisOptionsImpl createAnalysisOptionsForCommandLineOptions(
+ CommandLineOptions options, String source) {
+ if (options.analysisOptionsFile != null) {
+ file_system.File file =
+ resourceProvider.getFile(options.analysisOptionsFile);
+ if (!file.exists) {
+ printAndFail('Options file not found: ${options.analysisOptionsFile}',
+ exitCode: ErrorSeverity.ERROR.ordinal);
+ }
+ }
+
+ return getContextInfo(options, source).analysisOptions;
+ }
+
+ /// Based on the [CommandLineOptions], and a specific [Source] within those
+ /// options if any are specified, performantly get cached info about the
+ /// context.
+ ContextCacheEntry getContextInfo(CommandLineOptions options, String source) {
+ if (options.sourceFiles.isEmpty) {
+ return contextCache.forSource(resourceProvider.pathContext.current);
+ }
+
+ return contextCache.forSource(source);
+ }
+}
diff --git a/pkg/analyzer_cli/test/data/exclude_test_project/analysis_options.yaml b/pkg/analyzer_cli/test/data/exclude_test_project/analysis_options.yaml
new file mode 100644
index 0000000..31cb33b
--- /dev/null
+++ b/pkg/analyzer_cli/test/data/exclude_test_project/analysis_options.yaml
@@ -0,0 +1,3 @@
+analyzer:
+ exclude:
+ - lib/excluded_**.dart
diff --git a/pkg/analyzer_cli/test/data/exclude_test_project/lib/excluded_error.dart b/pkg/analyzer_cli/test/data/exclude_test_project/lib/excluded_error.dart
new file mode 100644
index 0000000..f580fe2
--- /dev/null
+++ b/pkg/analyzer_cli/test/data/exclude_test_project/lib/excluded_error.dart
@@ -0,0 +1 @@
+ExcludedUndefinedClass x = null;
diff --git a/pkg/analyzer_cli/test/data/exclude_test_project/lib/not_excluded_error.dart b/pkg/analyzer_cli/test/data/exclude_test_project/lib/not_excluded_error.dart
new file mode 100644
index 0000000..661c648
--- /dev/null
+++ b/pkg/analyzer_cli/test/data/exclude_test_project/lib/not_excluded_error.dart
@@ -0,0 +1 @@
+IncludedUndefinedClass f = null;
diff --git a/pkg/analyzer_cli/test/driver_test.dart b/pkg/analyzer_cli/test/driver_test.dart
index f31943d..2650724 100644
--- a/pkg/analyzer_cli/test/driver_test.dart
+++ b/pkg/analyzer_cli/test/driver_test.dart
@@ -74,7 +74,7 @@
return driveMany([source], options: options, args: args);
}
- /// An ability to use [drive] with many sources instead of one.
+ /// Like [drive], but takes an array of sources.
Future<Null> driveMany(
List<String> sources, {
String options: emptyOptionsFile,
@@ -82,15 +82,13 @@
}) async {
driver = new Driver(isTesting: true);
var cmd = <String>[];
-
- if (options != null)
- cmd.addAll([
+ if (options != null) {
+ cmd = <String>[
'--options',
path.join(testDirectory, options),
- ]);
-
+ ];
+ }
cmd..addAll(sources.map(_adjustFileSpec))..addAll(args);
-
if (usePreviewDart2) {
cmd.insert(0, '--preview-dart-2');
}
@@ -631,8 +629,7 @@
}
test_partFile() async {
- Driver driver = new Driver(isTesting: true);
- await driver.start([
+ await driveMany([
path.join(testDirectory, 'data/library_and_parts/lib.dart'),
path.join(testDirectory, 'data/library_and_parts/part1.dart')
]);
@@ -654,8 +651,7 @@
}
test_partFile_extra() async {
- Driver driver = new Driver(isTesting: true);
- await driver.start([
+ await driveMany([
path.join(testDirectory, 'data/library_and_parts/lib.dart'),
path.join(testDirectory, 'data/library_and_parts/part1.dart'),
path.join(testDirectory, 'data/library_and_parts/part2.dart')
@@ -920,7 +916,6 @@
await drive(path.join(testDir, 'main.dart'), args: ['--strong']);
expect(driver.context.analysisOptions.strongMode, isTrue);
expect(outSink.toString(), contains('No issues found'));
- expect(exitCode, 0);
}
test_todo() async {
@@ -967,6 +962,36 @@
expect(outSink.toString(), contains('1 lint found.'));
}
+ test_analysisOptions_excludes() async {
+ await drive('data/exclude_test_project',
+ options: 'data/exclude_test_project/$optionsFileName');
+ _expectUndefinedClassErrorsWithoutExclusions();
+ }
+
+ test_analysisOptions_excludesRelativeToAnalysisOptions_inferred() async {
+ // By passing no options, and the path `lib`, it should discover the
+ // analysis_options above lib. The exclude is relative to the project, not
+ // the analyzed path, and it has to then understand that.
+ await drive('data/exclude_test_project/lib', options: null);
+ _expectUndefinedClassErrorsWithoutExclusions();
+ }
+
+ test_analysisOptions_excludesRelativeToAnalysisOptions_explicit() async {
+ // The exclude is relative to the project, not/ the analyzed path, and it
+ // has to then understand that.
+ await drive('data/exclude_test_project',
+ options: 'data/exclude_test_project/$optionsFileName');
+ _expectUndefinedClassErrorsWithoutExclusions();
+ }
+
+ void _expectUndefinedClassErrorsWithoutExclusions() {
+ expect(bulletToDash(outSink),
+ contains("warning - Undefined class 'IncludedUndefinedClass'"));
+ expect(bulletToDash(outSink),
+ isNot(contains("warning - Undefined class 'ExcludedUndefinedClass'")));
+ expect(outSink.toString(), contains("1 warning found."));
+ }
+
Future<Null> _driveBasic() async {
await drive('data/options_tests_project/test_file.dart',
options: 'data/options_tests_project/$optionsFileName');
@@ -1008,6 +1033,20 @@
@failingTest
test_withFlags_overrideFatalWarning() =>
super.test_withFlags_overrideFatalWarning();
+
+ @override
+ @failingTest
+ test_analysisOptions_excludes() => super.test_analysisOptions_excludes();
+
+ @override
+ @failingTest
+ test_analysisOptions_excludesRelativeToAnalysisOptions_inferred() =>
+ super.test_analysisOptions_excludesRelativeToAnalysisOptions_inferred();
+
+ @override
+ @failingTest
+ test_analysisOptions_excludesRelativeToAnalysisOptions_explicit() =>
+ super.test_analysisOptions_excludesRelativeToAnalysisOptions_explicit();
}
class TestSource implements Source {
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 bd58ad2..015d4e3 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
@@ -15,7 +15,6 @@
import 'package:analyzer/src/dart/element/type.dart';
import 'package:analyzer/src/generated/resolver.dart';
import 'package:analyzer/src/generated/source.dart';
-import 'package:analyzer/src/generated/utilities_dart.dart';
import 'package:analyzer_plugin/protocol/protocol_common.dart'
hide Element, ElementKind;
import 'package:analyzer_plugin/src/utilities/change_builder/change_builder_core.dart';
@@ -482,15 +481,13 @@
if (i > 0) {
write(', ', displayTextBuffer: displayTextBuffer);
}
- // may be optional
- ParameterKind parameterKind = parameter.parameterKind;
- if (parameterKind == ParameterKind.NAMED) {
+ // Might be optional
+ if (parameter.isNamed) {
if (!sawNamed) {
write('{', displayTextBuffer: displayTextBuffer);
sawNamed = true;
}
- }
- if (parameterKind == ParameterKind.POSITIONAL) {
+ } else if (parameter.isOptionalPositional) {
if (!sawPositional) {
write('[', displayTextBuffer: displayTextBuffer);
sawPositional = true;
diff --git a/pkg/analyzer_plugin/lib/src/utilities/completion/completion_target.dart b/pkg/analyzer_plugin/lib/src/utilities/completion/completion_target.dart
index 1ec6942..93f221e 100644
--- a/pkg/analyzer_plugin/lib/src/utilities/completion/completion_target.dart
+++ b/pkg/analyzer_plugin/lib/src/utilities/completion/completion_target.dart
@@ -9,7 +9,6 @@
import 'package:analyzer/dart/element/type.dart';
import 'package:analyzer/src/dart/ast/token.dart';
import 'package:analyzer/src/generated/source.dart';
-import 'package:analyzer/src/generated/utilities_dart.dart';
/**
* A CompletionTarget represents an edge in the parse tree which connects an
@@ -560,13 +559,11 @@
DartType paramType;
if (paramIndex < parameters.length) {
ParameterElement param = parameters[paramIndex];
- if (param.parameterKind == ParameterKind.NAMED) {
+ if (param.isNamed) {
if (containingNode is NamedExpression) {
String name = containingNode.name?.label?.name;
param = parameters.firstWhere(
- (ParameterElement param) =>
- param.parameterKind == ParameterKind.NAMED &&
- param.name == name,
+ (ParameterElement param) => param.isNamed && param.name == name,
orElse: () => null);
paramType = param?.type;
}
diff --git a/pkg/analyzer_plugin/lib/src/utilities/completion/optype.dart b/pkg/analyzer_plugin/lib/src/utilities/completion/optype.dart
index a0b7e60..8dc738c 100644
--- a/pkg/analyzer_plugin/lib/src/utilities/completion/optype.dart
+++ b/pkg/analyzer_plugin/lib/src/utilities/completion/optype.dart
@@ -9,7 +9,6 @@
import 'package:analyzer/dart/element/type.dart';
import 'package:analyzer/src/dart/ast/token.dart';
import 'package:analyzer/src/dart/element/element.dart';
-import 'package:analyzer/src/generated/utilities_dart.dart';
import 'package:analyzer_plugin/protocol/protocol_common.dart' hide Element;
import 'package:analyzer_plugin/src/utilities/completion/completion_target.dart';
import 'package:analyzer_plugin/utilities/completion/relevance.dart';
@@ -346,7 +345,7 @@
}
if (0 <= index && index < parameters.length) {
ParameterElement param = parameters[index];
- if (param?.parameterKind == ParameterKind.NAMED) {
+ if (param?.isNamed == true) {
optype.includeNamedArgumentSuggestions = true;
return;
}
@@ -799,8 +798,7 @@
if (e is DefaultFieldFormalParameterElementImpl) {
return e.field?.name == node.name.label.name;
}
- return e.parameterKind == ParameterKind.NAMED &&
- e.name == node.name.label.name;
+ return e.isNamed && e.name == node.name.label.name;
}, orElse: () => null);
// Suggest tear-offs.
if (parameterElement?.type is FunctionType) {
diff --git a/pkg/analyzer_plugin/lib/src/utilities/completion/suggestion_builder.dart b/pkg/analyzer_plugin/lib/src/utilities/completion/suggestion_builder.dart
index 2afc039..f0fe61c 100644
--- a/pkg/analyzer_plugin/lib/src/utilities/completion/suggestion_builder.dart
+++ b/pkg/analyzer_plugin/lib/src/utilities/completion/suggestion_builder.dart
@@ -5,14 +5,13 @@
import 'package:analyzer/dart/element/element.dart';
import 'package:analyzer/dart/element/type.dart';
import 'package:analyzer/file_system/file_system.dart';
-import 'package:analyzer/src/generated/utilities_dart.dart';
+import 'package:analyzer/src/generated/source.dart' show Source, UriKind;
import 'package:analyzer_plugin/protocol/protocol_common.dart'
hide Element, ElementKind;
import 'package:analyzer_plugin/src/utilities/documentation.dart';
import 'package:analyzer_plugin/utilities/analyzer_converter.dart';
import 'package:analyzer_plugin/utilities/completion/relevance.dart';
import 'package:analyzer_plugin/utilities/completion/suggestion_builder.dart';
-import 'package:analyzer/src/generated/source.dart' show Source, UriKind;
/**
* An object used to build code completion suggestions for Dart code.
@@ -59,7 +58,7 @@
}
for (ParameterElement param in namedParams) {
- if (param.isRequired) {
+ if (param.hasRequired) {
if (buffer.isNotEmpty) {
buffer.write(', ');
}
@@ -95,7 +94,7 @@
if (completion == null) {
completion = element.displayName;
}
- bool isDeprecated = element.isDeprecated;
+ bool isDeprecated = element.hasDeprecated;
CompletionSuggestion suggestion = new CompletionSuggestion(
kind,
isDeprecated ? DART_RELEVANCE_LOW : relevance,
@@ -127,14 +126,12 @@
return paramType != null ? paramType.displayName : 'var';
}).toList();
- Iterable<ParameterElement> requiredParameters = element.parameters.where(
- (ParameterElement param) =>
- param.parameterKind == ParameterKind.REQUIRED);
+ Iterable<ParameterElement> requiredParameters = element.parameters
+ .where((ParameterElement param) => param.isNotOptional);
suggestion.requiredParameterCount = requiredParameters.length;
- Iterable<ParameterElement> namedParameters = element.parameters.where(
- (ParameterElement param) =>
- param.parameterKind == ParameterKind.NAMED);
+ Iterable<ParameterElement> namedParameters =
+ element.parameters.where((ParameterElement param) => param.isNamed);
suggestion.hasNamedParameters = namedParameters.isNotEmpty;
addDefaultArgDetails(
diff --git a/pkg/analyzer_plugin/lib/utilities/analyzer_converter.dart b/pkg/analyzer_plugin/lib/utilities/analyzer_converter.dart
index 1695a53..e562071 100644
--- a/pkg/analyzer_plugin/lib/utilities/analyzer_converter.dart
+++ b/pkg/analyzer_plugin/lib/utilities/analyzer_converter.dart
@@ -93,7 +93,7 @@
element.displayName,
plugin.Element.makeFlags(
isPrivate: element.isPrivate,
- isDeprecated: element.isDeprecated,
+ isDeprecated: element.hasDeprecated,
isAbstract: _isAbstract(element),
isConst: _isConst(element),
isFinal: _isFinal(element),
@@ -216,12 +216,10 @@
buffer.write(', ');
}
if (closeOptionalString.isEmpty) {
- analyzer.ParameterKind kind = parameter.parameterKind;
- if (kind == analyzer.ParameterKind.NAMED) {
+ if (parameter.isNamed) {
buffer.write('{');
closeOptionalString = '}';
- }
- if (kind == analyzer.ParameterKind.POSITIONAL) {
+ } else if (parameter.isOptionalPositional) {
buffer.write('[');
closeOptionalString = ']';
}
diff --git a/pkg/analyzer_plugin/test/utilities/analyzer_converter_test.dart b/pkg/analyzer_plugin/test/utilities/analyzer_converter_test.dart
index 38a4f9c..df0e08f 100644
--- a/pkg/analyzer_plugin/test/utilities/analyzer_converter_test.dart
+++ b/pkg/analyzer_plugin/test/utilities/analyzer_converter_test.dart
@@ -265,7 +265,7 @@
analyzer.CompilationUnit unit = await resolveLibraryUnit(source);
{
analyzer.ClassElement engineElement = findElementInUnit(unit, '_E1');
- expect(engineElement.isDeprecated, isTrue);
+ expect(engineElement.hasDeprecated, isTrue);
// create notification Element
plugin.Element element = converter.convertElement(engineElement);
expect(element.kind, plugin.ElementKind.ENUM);
@@ -282,7 +282,7 @@
expect(element.parameters, isNull);
expect(
element.flags,
- (engineElement.isDeprecated ? plugin.Element.FLAG_DEPRECATED : 0) |
+ (engineElement.hasDeprecated ? plugin.Element.FLAG_DEPRECATED : 0) |
plugin.Element.FLAG_PRIVATE);
}
{
diff --git a/pkg/compiler/lib/src/common_elements.dart b/pkg/compiler/lib/src/common_elements.dart
index 67f6910..e1f2ad8 100644
--- a/pkg/compiler/lib/src/common_elements.dart
+++ b/pkg/compiler/lib/src/common_elements.dart
@@ -1068,6 +1068,13 @@
FunctionEntity get hashCodeForNativeObject =>
_findHelperFunction('hashCodeForNativeObject');
+ ClassEntity get instantiation1Class => _findHelperClass('Instantiation1');
+ ClassEntity get instantiation2Class => _findHelperClass('Instantiation2');
+ ClassEntity get instantiation3Class => _findHelperClass('Instantiation3');
+ FunctionEntity get instantiate1 => _findHelperFunction('instantiate1');
+ FunctionEntity get instantiate2 => _findHelperFunction('instantiate2');
+ FunctionEntity get instantiate3 => _findHelperFunction('instantiate3');
+
// From dart:_internal
ClassEntity _symbolImplementationClass;
diff --git a/pkg/compiler/lib/src/js_backend/backend_impact.dart b/pkg/compiler/lib/src/js_backend/backend_impact.dart
index 3d0fd4f..e712bee 100644
--- a/pkg/compiler/lib/src/js_backend/backend_impact.dart
+++ b/pkg/compiler/lib/src/js_backend/backend_impact.dart
@@ -786,4 +786,17 @@
_commonElements.typeVariableClass
]);
}
+
+ BackendImpact _genericInstantiation;
+
+ BackendImpact get genericInstantiation =>
+ _genericInstantiation ??= new BackendImpact(staticUses: [
+ _commonElements.instantiate1,
+ _commonElements.instantiate2,
+ _commonElements.instantiate3,
+ ], instantiatedClasses: [
+ _commonElements.instantiation1Class,
+ _commonElements.instantiation2Class,
+ _commonElements.instantiation3Class,
+ ]);
}
diff --git a/pkg/compiler/lib/src/js_backend/impact_transformer.dart b/pkg/compiler/lib/src/js_backend/impact_transformer.dart
index c69f15e..3416641 100644
--- a/pkg/compiler/lib/src/js_backend/impact_transformer.dart
+++ b/pkg/compiler/lib/src/js_backend/impact_transformer.dart
@@ -108,6 +108,9 @@
new TypeUse.instantiation(_commonElements.nullType));
registerImpact(_impacts.nullLiteral);
break;
+ case Feature.GENERIC_INSTANTIATION:
+ registerImpact(_impacts.genericInstantiation);
+ break;
case Feature.LAZY_FIELD:
registerImpact(_impacts.lazyField);
break;
diff --git a/pkg/compiler/lib/src/js_emitter/instantiation_stub_generator.dart b/pkg/compiler/lib/src/js_emitter/instantiation_stub_generator.dart
new file mode 100644
index 0000000..08725fca
--- /dev/null
+++ b/pkg/compiler/lib/src/js_emitter/instantiation_stub_generator.dart
@@ -0,0 +1,140 @@
+// 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.
+
+library dart2js.js_emitter.instantiation_stub_generator;
+
+import '../elements/entities.dart';
+import '../io/source_information.dart';
+import '../js/js.dart' as jsAst;
+import '../js/js.dart' show js;
+import '../js_backend/namer.dart' show Namer;
+import '../universe/call_structure.dart' show CallStructure;
+import '../universe/selector.dart' show Selector;
+import '../universe/world_builder.dart'
+ show CodegenWorldBuilder, SelectorConstraints;
+import '../world.dart' show ClosedWorld;
+
+import 'model.dart';
+
+import 'code_emitter_task.dart' show CodeEmitterTask;
+
+// Generator of stubs required for Instantiation classes.
+class InstantiationStubGenerator {
+ // ignore: UNUSED_FIELD
+ final CodeEmitterTask _emitterTask;
+ final Namer _namer;
+ final CodegenWorldBuilder _codegenWorldBuilder;
+ final ClosedWorld _closedWorld;
+ // ignore: UNUSED_FIELD
+ final SourceInformationStrategy _sourceInformationStrategy;
+
+ InstantiationStubGenerator(
+ this._emitterTask,
+ this._namer,
+ this._codegenWorldBuilder,
+ this._closedWorld,
+ this._sourceInformationStrategy);
+
+ /// Generates a stub to forward a call selector with no type arguments to a
+ /// call selector with stored types.
+ ///
+ /// [instantiationClass] is the class containing the captured type arguments.
+ /// [callSelector] is the selector with no type arguments. [targetSelector] is
+ /// the selector accepting the type arguments.
+ ParameterStubMethod _generateStub(
+ ClassEntity instantiationClass,
+ FieldEntity functionField,
+ Selector callSelector,
+ Selector targetSelector) {
+ // TODO(sra): Generate source information for stub that has no member.
+ //
+ //SourceInformationBuilder sourceInformationBuilder =
+ // _sourceInformationStrategy.createBuilderForContext(member);
+ //SourceInformation sourceInformation =
+ // sourceInformationBuilder.buildStub(member, callStructure);
+
+ assert(callSelector.typeArgumentCount == 0);
+ int typeArgumentCount = targetSelector.typeArgumentCount;
+ assert(typeArgumentCount > 0);
+
+ // The forwarding stub for three arguments of an instantiation with two type
+ // arguments looks like this:
+ //
+ // ```
+ // call$3: function(a0, a1, a2) {
+ // return this._f.call$2$3(a0, a1, a2, this.$ti[0], this.$ti[1]);
+ // }
+ // ```
+
+ List<jsAst.Parameter> parameters = <jsAst.Parameter>[];
+ List<jsAst.Expression> arguments = <jsAst.Expression>[];
+
+ for (int i = 0; i < callSelector.argumentCount; i++) {
+ String jsName = 'a$i';
+ arguments.add(js('#', jsName));
+ parameters.add(new jsAst.Parameter(jsName));
+ }
+
+ for (int i = 0; i < targetSelector.typeArgumentCount; i++) {
+ arguments.add(js('this.#[#]', [_namer.rtiFieldJsName, js.number(i)]));
+ }
+
+ jsAst.Fun function = js('function(#) { return this.#.#(#); }', [
+ parameters,
+ _namer.fieldPropertyName(functionField),
+ _namer.invocationName(targetSelector),
+ arguments,
+ ]);
+ // TODO(sra): .withSourceInformation(sourceInformation);
+
+ jsAst.Name name = _namer.invocationName(callSelector);
+ return new ParameterStubMethod(name, null, function);
+ }
+
+ // Returns all stubs for an instantiation class.
+ //
+ List<StubMethod> generateStubs(
+ ClassEntity instantiationClass, FunctionEntity member) {
+ // 1. Find the number of type parameters in [instantiationClass].
+ int typeArgumentCount = _closedWorld.dartTypes
+ .getThisType(instantiationClass)
+ .typeArguments
+ .length;
+ assert(typeArgumentCount > 0);
+
+ // 2. Find the function field access path.
+ FieldEntity functionField;
+ _codegenWorldBuilder.forEachInstanceField(instantiationClass,
+ (ClassEntity enclosing, FieldEntity field) {
+ if (field.name == '_genericClosure') functionField = field;
+ });
+ assert(functionField != null,
+ "Can't find Closure field of $instantiationClass");
+
+ String call = _namer.closureInvocationSelectorName;
+ Map<Selector, SelectorConstraints> callSelectors =
+ _codegenWorldBuilder.invocationsByName(call);
+
+ List<StubMethod> stubs = <StubMethod>[];
+
+ // For every call-selector generate a stub to the corresponding selector
+ // with filled-in type arguments.
+
+ for (Selector selector in callSelectors.keys) {
+ CallStructure callStructure = selector.callStructure;
+ if (callStructure.typeArgumentCount != 0) continue;
+ CallStructure genericCallStructrure =
+ callStructure.withTypeArgumentCount(typeArgumentCount);
+ Selector genericSelector =
+ new Selector.call(selector.memberName, genericCallStructrure);
+ stubs.add(_generateStub(
+ instantiationClass, functionField, selector, genericSelector));
+ }
+
+ // TODO(sra): Generate $signature() stub that forwards to
+ // $instantiatedSignature() method of _f.
+
+ return stubs;
+ }
+}
diff --git a/pkg/compiler/lib/src/js_emitter/js_emitter.dart b/pkg/compiler/lib/src/js_emitter/js_emitter.dart
index 25467b1..7ad49b8 100644
--- a/pkg/compiler/lib/src/js_emitter/js_emitter.dart
+++ b/pkg/compiler/lib/src/js_emitter/js_emitter.dart
@@ -6,6 +6,7 @@
export 'class_stub_generator.dart';
export 'code_emitter_task.dart';
+export 'instantiation_stub_generator.dart';
export 'interceptor_stub_generator.dart';
export 'main_call_stub_generator.dart';
export 'metadata_collector.dart';
diff --git a/pkg/compiler/lib/src/js_emitter/program_builder/program_builder.dart b/pkg/compiler/lib/src/js_emitter/program_builder/program_builder.dart
index 831ff2c..db83938 100644
--- a/pkg/compiler/lib/src/js_emitter/program_builder/program_builder.dart
+++ b/pkg/compiler/lib/src/js_emitter/program_builder/program_builder.dart
@@ -45,6 +45,7 @@
ClassStubGenerator,
CodeEmitterTask,
Emitter,
+ InstantiationStubGenerator,
InterceptorStubGenerator,
MainCallStubGenerator,
ParameterStubGenerator,
@@ -733,6 +734,12 @@
callStubs.add(_buildStubMethod(name, function));
}
+ if (cls == _commonElements.instantiation1Class ||
+ cls == _commonElements.instantiation2Class ||
+ cls == _commonElements.instantiation3Class) {
+ callStubs.addAll(_generateInstantiationStubs(cls));
+ }
+
// MixinApplications run through the members of their mixin. Here, we are
// only interested in direct members.
if (!onlyForRti && !_elementEnvironment.isMixinApplication(cls)) {
@@ -979,6 +986,12 @@
return generator.generateParameterStubs(element, canTearOff: canTearOff);
}
+ List<StubMethod> _generateInstantiationStubs(ClassEntity instantiationClass) {
+ InstantiationStubGenerator generator = new InstantiationStubGenerator(
+ _task, _namer, _worldBuilder, _closedWorld, _sourceInformationStrategy);
+ return generator.generateStubs(instantiationClass, null);
+ }
+
/// Builds a stub method.
///
/// Stub methods may have an element that can be used for code-size
diff --git a/pkg/compiler/lib/src/js_emitter/type_test_registry.dart b/pkg/compiler/lib/src/js_emitter/type_test_registry.dart
index a740fb0..b69beb8 100644
--- a/pkg/compiler/lib/src/js_emitter/type_test_registry.dart
+++ b/pkg/compiler/lib/src/js_emitter/type_test_registry.dart
@@ -71,15 +71,6 @@
// argument checks.
addClassesWithSuperclasses(rtiChecks.requiredClasses);
- // 2. Add classes that contain checked generic function types. These are
- // needed to store the signature encoding.
- for (FunctionType type in rtiChecks.checkedFunctionTypes) {
- ClassEntity contextClass = DartTypes.getClassContext(type);
- if (contextClass != null) {
- _rtiNeededClasses.add(contextClass);
- }
- }
-
bool canTearOff(MemberEntity function) {
if (!function.isFunction ||
function.isConstructor ||
@@ -103,7 +94,7 @@
mirrorsData.isMemberAccessibleByReflection(element));
}
- // Find all types referenced from the types of elements that can be
+ // 2. Find all types referenced from the types of elements that can be
// reflected on 'as functions'.
liveMembers.where((MemberEntity element) {
return canBeReflectedAsFunction(element) && canBeReified(element);
diff --git a/pkg/compiler/lib/src/kernel/element_map_impl.dart b/pkg/compiler/lib/src/kernel/element_map_impl.dart
index ddb3abb..b54f422 100644
--- a/pkg/compiler/lib/src/kernel/element_map_impl.dart
+++ b/pkg/compiler/lib/src/kernel/element_map_impl.dart
@@ -485,6 +485,11 @@
void _ensureCallType(IndexedClass cls, ClassData data) {
if (!data.isCallTypeComputed) {
data.isCallTypeComputed = true;
+ if (options.strongMode && !cls.isClosure) {
+ // In Dart 2, a regular class with a 'call' method is no longer a
+ // subtype of its function type.
+ return;
+ }
MemberEntity callMethod = lookupClassMember(cls, Identifiers.call);
if (callMethod != null) {
if (callMethod.isFunction) {
diff --git a/pkg/compiler/lib/src/library_loader.dart b/pkg/compiler/lib/src/library_loader.dart
index 24b957d..a2d7c31 100644
--- a/pkg/compiler/lib/src/library_loader.dart
+++ b/pkg/compiler/lib/src/library_loader.dart
@@ -862,11 +862,14 @@
program = new ir.Program();
new BinaryBuilder(input.data).readProgram(program);
} else {
+ bool strongMode = _elementMap.options.strongMode;
+ String platform = strongMode
+ ? 'dart2js_platform_strong.dill'
+ : 'dart2js_platform.dill';
initializedCompilerState = fe.initializeCompiler(
initializedCompilerState,
- new Dart2jsTarget(
- new TargetFlags(strongMode: _elementMap.options.strongMode)),
- platformBinaries.resolve("dart2js_platform.dill"),
+ new Dart2jsTarget(new TargetFlags(strongMode: strongMode)),
+ platformBinaries.resolve(platform),
_packageConfig);
program = await fe.compile(
initializedCompilerState,
diff --git a/pkg/compiler/lib/src/parser/node_listener.dart b/pkg/compiler/lib/src/parser/node_listener.dart
index 342c4cd..940a35b 100644
--- a/pkg/compiler/lib/src/parser/node_listener.dart
+++ b/pkg/compiler/lib/src/parser/node_listener.dart
@@ -572,12 +572,23 @@
}
@override
+ void beginVariablesDeclaration(Token token, Token varFinalOrConst) {
+ if (varFinalOrConst == null) {
+ pushNode(Modifiers.EMPTY);
+ } else {
+ Link<Node> nodes =
+ const Link<Node>().prepend(new Identifier(varFinalOrConst));
+ pushNode(new Modifiers(new NodeList(null, nodes, null, ' ')));
+ }
+ }
+
+ @override
void endVariablesDeclaration(int count, Token endToken) {
// TODO(ahe): Pick one name for this concept, either
// VariablesDeclaration or VariableDefinitions.
NodeList variables = makeNodeList(count, null, endToken, ",");
- TypeAnnotation type = popNode();
Modifiers modifiers = popNode();
+ TypeAnnotation type = popNode();
popNode();
pushNode(new VariableDefinitions(type, modifiers, variables));
}
diff --git a/pkg/compiler/lib/src/ssa/builder_kernel.dart b/pkg/compiler/lib/src/ssa/builder_kernel.dart
index 101c9e4..ba6cb77 100644
--- a/pkg/compiler/lib/src/ssa/builder_kernel.dart
+++ b/pkg/compiler/lib/src/ssa/builder_kernel.dart
@@ -3990,10 +3990,33 @@
_elementMap.getDartType(type), sourceElement);
arguments.add(instruction);
}
- Selector selector =
- new Selector.genericInstantiation(node.typeArguments.length);
- _pushDynamicInvocation(node, commonMasks.functionType, selector, arguments,
- const <DartType>[], null /*_sourceInformationBuilder.?*/);
+ int typeArgumentCount = node.typeArguments.length;
+ bool targetCanThrow = false; // TODO(sra): Is this true?
+ FunctionEntity target = _instantiator(typeArgumentCount);
+ if (target == null) {
+ reporter.internalError(
+ _elementMap.getSpannable(targetElement, node),
+ 'Generic function instantiation not implemented for '
+ '${typeArgumentCount} type arguments');
+ stack.add(graph.addConstantNull(closedWorld));
+ return;
+ }
+ HInstruction instruction = new HInvokeStatic(
+ target, arguments, commonMasks.functionType, <DartType>[],
+ targetCanThrow: targetCanThrow);
+ // TODO(sra): ..sourceInformation = sourceInformation
+ instruction.sideEffects
+ ..clearAllDependencies()
+ ..clearAllSideEffects();
+
+ push(instruction);
+ }
+
+ FunctionEntity _instantiator(int count) {
+ if (count == 1) return _commonElements.instantiate1;
+ if (count == 2) return _commonElements.instantiate2;
+ if (count == 3) return _commonElements.instantiate3;
+ return null;
}
@override
@@ -5108,7 +5131,8 @@
static String cannotBeInlinedReason(KernelToElementMapForBuilding elementMap,
FunctionEntity function, int maxInliningNodes,
{bool allowLoops: false, bool enableUserAssertions: null}) {
- InlineWeeder visitor = new InlineWeeder(maxInliningNodes, allowLoops);
+ InlineWeeder visitor =
+ new InlineWeeder(maxInliningNodes, allowLoops, enableUserAssertions);
ir.FunctionNode node = getFunctionNode(elementMap, function);
node.accept(visitor);
if (function.isConstructor) {
@@ -5123,13 +5147,15 @@
final int maxInliningNodes; // `null` for unbounded.
final bool allowLoops;
+ final bool enableUserAssertions;
bool seenReturn = false;
int nodeCount = 0;
String tooDifficultReason;
bool get tooDifficult => tooDifficultReason != null;
- InlineWeeder(this.maxInliningNodes, this.allowLoops);
+ InlineWeeder(
+ this.maxInliningNodes, this.allowLoops, this.enableUserAssertions);
bool registerNode() {
if (maxInliningNodes == null) return true;
@@ -5263,6 +5289,18 @@
// This is last so that [tooDifficult] is always updated.
if (!registerNode()) return;
}
+
+ @override
+ visitAssertInitializer(ir.AssertInitializer node) {
+ if (!enableUserAssertions) return;
+ node.visitChildren(this);
+ }
+
+ @override
+ visitAssertStatement(ir.AssertStatement node) {
+ if (!enableUserAssertions) return;
+ defaultNode(node);
+ }
}
/// Class in charge of building try, catch and/or finally blocks. This handles
diff --git a/pkg/compiler/lib/src/ssa/kernel_impact.dart b/pkg/compiler/lib/src/ssa/kernel_impact.dart
index 8f78dd0..3498027 100644
--- a/pkg/compiler/lib/src/ssa/kernel_impact.dart
+++ b/pkg/compiler/lib/src/ssa/kernel_impact.dart
@@ -539,6 +539,12 @@
}
@override
+ void visitInstantiation(ir.Instantiation node) {
+ impactBuilder.registerFeature(Feature.GENERIC_INSTANTIATION);
+ node.visitChildren(this);
+ }
+
+ @override
void visitStringConcatenation(ir.StringConcatenation node) {
impactBuilder.registerFeature(Feature.STRING_INTERPOLATION);
impactBuilder.registerFeature(Feature.STRING_JUXTAPOSITION);
diff --git a/pkg/compiler/lib/src/universe/call_structure.dart b/pkg/compiler/lib/src/universe/call_structure.dart
index f20d529..1953d7b 100644
--- a/pkg/compiler/lib/src/universe/call_structure.dart
+++ b/pkg/compiler/lib/src/universe/call_structure.dart
@@ -42,6 +42,9 @@
argumentCount, namedArguments, typeArgumentCount);
}
+ CallStructure withTypeArgumentCount(int typeArgumentCount) =>
+ new CallStructure(argumentCount, namedArguments, typeArgumentCount);
+
/// `true` if this call has named arguments.
bool get isNamed => false;
diff --git a/pkg/compiler/lib/src/universe/feature.dart b/pkg/compiler/lib/src/universe/feature.dart
index d9799bc..611f6a8 100644
--- a/pkg/compiler/lib/src/universe/feature.dart
+++ b/pkg/compiler/lib/src/universe/feature.dart
@@ -43,6 +43,9 @@
/// A field without an initializer.
FIELD_WITHOUT_INITIALIZER,
+ /// A generic instantiation (application of type parameters).
+ GENERIC_INSTANTIATION,
+
/// A local variable without an initializer.
LOCAL_WITHOUT_INITIALIZER,
diff --git a/pkg/compiler/lib/src/universe/selector.dart b/pkg/compiler/lib/src/universe/selector.dart
index e03e640..5e1d07d 100644
--- a/pkg/compiler/lib/src/universe/selector.dart
+++ b/pkg/compiler/lib/src/universe/selector.dart
@@ -185,6 +185,7 @@
factory Selector.callDefaultConstructor() => new Selector(
SelectorKind.CALL, const PublicName(''), CallStructure.NO_ARGS);
+ // TODO(31953): Remove this if we can implement via static calls.
factory Selector.genericInstantiation(int typeArguments) => new Selector(
SelectorKind.SPECIAL,
Names.genericInstantiation,
diff --git a/pkg/compiler/tool/status_files/update_from_log.dart b/pkg/compiler/tool/status_files/update_from_log.dart
index 3a525cf..8f816d5 100644
--- a/pkg/compiler/tool/status_files/update_from_log.dart
+++ b/pkg/compiler/tool/status_files/update_from_log.dart
@@ -3,25 +3,25 @@
// BSD-style license that can be found in the LICENSE file.
/// Script that updates dart2js status lines automatically for tests under the
-/// '$dart2js_with_kernel' configuration.
+/// '$fasta' configuration.
///
/// This script is hardcoded to only support this configuration and relies on
/// a convention for how the status files are structured, In particular,
/// every status file for dart2js should have 3 sections:
///
-/// [ $compiler == dart2js && $dart2js_with_kernel && $host_checked ]
+/// [ $compiler == dart2js && $fasta && $host_checked ]
///
/// and:
///
-/// [ $compiler == dart2js && $dart2js_with_kernel && $minified ]
+/// [ $compiler == dart2js && $fasta && $minified ]
///
/// and:
///
-/// [ $compiler == dart2js && $dart2js_with_kernel && $fast_startup ]
+/// [ $compiler == dart2js && $fasta && $fast_startup ]
///
/// and:
///
-/// [ $compiler == dart2js && $checked && $dart2js_with_kernel ]
+/// [ $compiler == dart2js && $checked && $fasta ]
library compiler.status_files.update_from_log;
import 'dart:io';
@@ -30,21 +30,18 @@
import 'log_parser.dart';
final dart2jsConfigurations = {
- 'host-checked':
- r'[ $compiler == dart2js && $dart2js_with_kernel && $host_checked ]',
- 'minified': r'[ $compiler == dart2js && $dart2js_with_kernel && $minified ]',
+ 'host-checked': r'[ $compiler == dart2js && $fasta && $host_checked ]',
+ 'minified': r'[ $compiler == dart2js && $fasta && $minified ]',
'host-checked-strong':
- r'[ $compiler == dart2js && $dart2js_with_kernel && $host_checked && $strong ]',
+ r'[ $compiler == dart2js && $fasta && $host_checked && $strong ]',
'minified-strong':
- r'[ $compiler == dart2js && $dart2js_with_kernel && $minified && $strong ]',
- 'fast-startup':
- r'[ $compiler == dart2js && $dart2js_with_kernel && $fast_startup ]',
+ r'[ $compiler == dart2js && $fasta && $minified && $strong ]',
+ 'fast-startup': r'[ $compiler == dart2js && $fast_startup && $fasta ]',
'fast-startup-strong':
- r'[ $compiler == dart2js && $dart2js_with_kernel && $fast_startup && $strong ]',
- 'checked-mode':
- r'[ $compiler == dart2js && $checked && $dart2js_with_kernel ]',
+ r'[ $compiler == dart2js && $fast_startup && $fasta && $strong ]',
+ 'checked-mode': r'[ $compiler == dart2js && $checked && $fasta ]',
'checked-mode-strong':
- r'[ $compiler == dart2js && $checked && $dart2js_with_kernel && $strong ]',
+ r'[ $compiler == dart2js && $checked && $fasta && $strong ]',
};
final dart2jsStatusFiles = {
diff --git a/pkg/dart_internal/README.md b/pkg/dart_internal/README.md
index 3ce15a1..bde3777 100644
--- a/pkg/dart_internal/README.md
+++ b/pkg/dart_internal/README.md
@@ -1,5 +1,5 @@
-**Scary warning: This package is experimental and may deprecated in a future
-version of Dart.**
+☠☠**Warning: This package is experimental and may be removed in a future
+version of Dart.** ☠â˜
This package is not intended for wide use. It provides a temporary API to
solve the problem: "Given an object some generic type A, how do I construct an
diff --git a/pkg/dev_compiler/web/source_map_stack_trace.dart b/pkg/dev_compiler/web/source_map_stack_trace.dart
index 8cdb4f1..2b3a45c 100644
--- a/pkg/dev_compiler/web/source_map_stack_trace.dart
+++ b/pkg/dev_compiler/web/source_map_stack_trace.dart
@@ -62,7 +62,7 @@
// This compresses the long dart_sdk URLs if SDK source maps are missing.
// It's no longer linkable, but neither are the properly mapped ones
// above.
- sourceUrl = 'dart_sdk.js';
+ sourceUrl = 'dart:sdk_internal';
}
return new Frame(Uri.parse(sourceUrl), span.start.line + 1,
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 18161b7..21f523f 100644
--- a/pkg/front_end/lib/src/fasta/fasta_codes_generated.dart
+++ b/pkg/front_end/lib/src/fasta/fasta_codes_generated.dart
@@ -1120,6 +1120,35 @@
tip: r"""Try removing all but one 'deferred' keyword.""");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Template<
+ Message Function(
+ String
+ string)> templateDuplicateLabelInSwitchStatement = const Template<
+ Message Function(String string)>(
+ messageTemplate:
+ r"""The label '#string' was already used in this switch statement.""",
+ tipTemplate: r"""Try choosing a different name for this label.""",
+ withArguments: _withArgumentsDuplicateLabelInSwitchStatement);
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<Message Function(String string)>
+ codeDuplicateLabelInSwitchStatement =
+ const Code<Message Function(String string)>(
+ "DuplicateLabelInSwitchStatement",
+ templateDuplicateLabelInSwitchStatement,
+ analyzerCode: "DUPLICATE_LABEL_IN_SWITCH_STATEMENT",
+ dart2jsCode: "*fatal*");
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+Message _withArgumentsDuplicateLabelInSwitchStatement(String string) {
+ return new Message(codeDuplicateLabelInSwitchStatement,
+ message:
+ """The label '$string' was already used in this switch statement.""",
+ tip: """Try choosing a different name for this label.""",
+ arguments: {'string': string});
+}
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const Code<Null> codeDuplicatePrefix = messageDuplicatePrefix;
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -1619,6 +1648,16 @@
message: r"""Expected '('.""");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<Null> codeExpectedStatement = messageExpectedStatement;
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+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.
const Template<Message Function(Token token)> templateExpectedString =
const Template<Message Function(Token token)>(
messageTemplate: r"""Expected a String, but got '#lexeme'.""",
diff --git a/pkg/front_end/lib/src/fasta/incremental_compiler.dart b/pkg/front_end/lib/src/fasta/incremental_compiler.dart
index 6886d9b..c530048 100644
--- a/pkg/front_end/lib/src/fasta/incremental_compiler.dart
+++ b/pkg/front_end/lib/src/fasta/incremental_compiler.dart
@@ -43,12 +43,12 @@
DillTarget dillLoadedData;
List<LibraryBuilder> platformBuilders;
Map<Uri, LibraryBuilder> userBuilders;
- final Uri bootstrapDill;
- bool bootstrapSuccess = false;
+ final Uri initializeFromDillUri;
+ bool initializedFromDill = false;
KernelTarget userCode;
- IncrementalCompiler(this.context, [this.bootstrapDill])
+ IncrementalCompiler(this.context, [this.initializeFromDillUri])
: ticker = context.options.ticker;
@override
@@ -56,71 +56,37 @@
ticker.reset();
entryPoint ??= context.options.inputs.single;
return context.runInContext<Future<Program>>((CompilerContext c) async {
- bool includeUserLoadedLibraries = false;
- Map<Uri, Source> uriToSource = {};
- Map<Uri, int> importUriToOrder = {};
- Procedure userLoadedUriMain;
- bootstrapSuccess = false;
+ IncrementalCompilerData data = new IncrementalCompilerData();
if (dillLoadedData == null) {
UriTranslator uriTranslator = await c.options.getUriTranslator();
ticker.logMs("Read packages file");
- dillLoadedData =
- new DillTarget(ticker, uriTranslator, c.options.target);
List<int> summaryBytes = await c.options.loadSdkSummaryBytes();
- int bytesLength = 0;
- Program program;
- if (summaryBytes != null) {
- ticker.logMs("Read ${c.options.sdkSummary}");
- program = new Program();
- new BinaryBuilder(summaryBytes, disableLazyReading: false)
- .readProgram(program);
- ticker.logMs("Deserialized ${c.options.sdkSummary}");
- bytesLength += summaryBytes.length;
- }
-
- if (bootstrapDill != null) {
- FileSystemEntity entity =
- c.options.fileSystem.entityForUri(bootstrapDill);
- if (await entity.exists()) {
- List<int> bootstrapBytes = await entity.readAsBytes();
- if (bootstrapBytes != null) {
- Set<Uri> prevLibraryUris = new Set<Uri>.from(
- program.libraries.map((Library lib) => lib.importUri));
- ticker.logMs("Read $bootstrapDill");
- bool bootstrapFailed = false;
- try {
- // We're going to output all we read here so lazy loading it
- // doesn't make sense.
- new BinaryBuilder(bootstrapBytes, disableLazyReading: true)
- .readProgram(program);
- } catch (e) {
- bootstrapFailed = true;
- program = new Program();
- new BinaryBuilder(summaryBytes, disableLazyReading: false)
- .readProgram(program);
- }
- if (!bootstrapFailed) {
- bootstrapSuccess = true;
- bytesLength += bootstrapBytes.length;
- for (Library lib in program.libraries) {
- if (prevLibraryUris.contains(lib.importUri)) continue;
- importUriToOrder[lib.importUri] = importUriToOrder.length;
- }
- userLoadedUriMain = program.mainMethod;
- includeUserLoadedLibraries = true;
- uriToSource.addAll(program.uriToSource);
- }
- }
+ int bytesLength = prepareSummary(summaryBytes, uriTranslator, c, data);
+ if (initializeFromDillUri != null) {
+ try {
+ bytesLength += await initializeFromDill(summaryBytes, c, data);
+ } catch (e) {
+ // We might have loaded x out of y libraries into the program.
+ // To avoid any unforeseen problems start over.
+ bytesLength = prepareSummary(summaryBytes, uriTranslator, c, data);
}
}
- summaryBytes = null;
- if (program != null) {
- dillLoadedData.loader
- .appendLibraries(program, byteCount: bytesLength);
+ appendLibraries(data, bytesLength);
+
+ try {
+ await dillLoadedData.buildOutlines();
+ } catch (e) {
+ if (!initializedFromDill) rethrow;
+
+ // Retry without initializing from dill.
+ initializedFromDill = false;
+ data.reset();
+ bytesLength = prepareSummary(summaryBytes, uriTranslator, c, data);
+ appendLibraries(data, bytesLength);
+ await dillLoadedData.buildOutlines();
}
- ticker.logMs("Appended libraries");
- await dillLoadedData.buildOutlines();
+ summaryBytes = null;
userBuilders = <Uri, LibraryBuilder>{};
platformBuilders = <LibraryBuilder>[];
dillLoadedData.loader.builders.forEach((uri, builder) {
@@ -172,8 +138,8 @@
List<Library> libraries =
new List<Library>.from(userCode.loader.libraries);
- uriToSource.addAll(userCode.uriToSource);
- if (includeUserLoadedLibraries) {
+ data.uriToSource.addAll(userCode.uriToSource);
+ if (data.includeUserLoadedLibraries) {
for (LibraryBuilder library in reusedLibraries) {
if (library.fileUri.scheme == "dart") continue;
assert(library is DillLibraryBuilder);
@@ -183,8 +149,8 @@
// For now ensure original order of libraries to produce bit-perfect
// output.
libraries.sort((a, b) {
- int aOrder = importUriToOrder[a.importUri];
- int bOrder = importUriToOrder[b.importUri];
+ int aOrder = data.importUriToOrder[a.importUri];
+ int bOrder = data.importUriToOrder[b.importUri];
if (aOrder != null && bOrder != null) return aOrder - bOrder;
if (aOrder != null) return -1;
if (bOrder != null) return 1;
@@ -194,13 +160,70 @@
// This is the incremental program.
Procedure mainMethod = programWithDill == null
- ? userLoadedUriMain
+ ? data.userLoadedUriMain
: programWithDill.mainMethod;
- return new Program(libraries: libraries, uriToSource: uriToSource)
+ return new Program(libraries: libraries, uriToSource: data.uriToSource)
..mainMethod = mainMethod;
});
}
+ int prepareSummary(List<int> summaryBytes, UriTranslator uriTranslator,
+ CompilerContext c, IncrementalCompilerData data) {
+ dillLoadedData = new DillTarget(ticker, uriTranslator, c.options.target);
+ int bytesLength = 0;
+
+ if (summaryBytes != null) {
+ ticker.logMs("Read ${c.options.sdkSummary}");
+ data.program = new Program();
+ new BinaryBuilder(summaryBytes, disableLazyReading: false)
+ .readProgram(data.program);
+ ticker.logMs("Deserialized ${c.options.sdkSummary}");
+ bytesLength += summaryBytes.length;
+ }
+
+ return bytesLength;
+ }
+
+ // This procedure will try to load the dill file and will crash if it cannot.
+ Future<int> initializeFromDill(List<int> summaryBytes, CompilerContext c,
+ IncrementalCompilerData data) async {
+ int bytesLength = 0;
+ FileSystemEntity entity =
+ c.options.fileSystem.entityForUri(initializeFromDillUri);
+ if (await entity.exists()) {
+ List<int> initializationBytes = await entity.readAsBytes();
+ if (initializationBytes != null) {
+ Set<Uri> prevLibraryUris = new Set<Uri>.from(
+ data.program.libraries.map((Library lib) => lib.importUri));
+ ticker.logMs("Read $initializeFromDillUri");
+
+ // We're going to output all we read here so lazy loading it
+ // doesn't make sense.
+ new BinaryBuilder(initializationBytes, disableLazyReading: true)
+ .readProgram(data.program);
+
+ initializedFromDill = true;
+ bytesLength += initializationBytes.length;
+ for (Library lib in data.program.libraries) {
+ if (prevLibraryUris.contains(lib.importUri)) continue;
+ data.importUriToOrder[lib.importUri] = data.importUriToOrder.length;
+ }
+ data.userLoadedUriMain = data.program.mainMethod;
+ data.includeUserLoadedLibraries = true;
+ data.uriToSource.addAll(data.program.uriToSource);
+ }
+ }
+ return bytesLength;
+ }
+
+ void appendLibraries(IncrementalCompilerData data, int bytesLength) {
+ if (data.program != null) {
+ dillLoadedData.loader
+ .appendLibraries(data.program, byteCount: bytesLength);
+ }
+ ticker.logMs("Appended libraries");
+ }
+
List<LibraryBuilder> computeReusedLibraries(Iterable<Uri> invalidatedUris) {
if (userCode == null && userBuilders == null) {
return <LibraryBuilder>[];
@@ -217,7 +240,8 @@
List<Uri> invalidatedImportUris = <Uri>[];
// Compute [builders] and [invalidatedImportUris].
- addBuilderAndInvalidateUris(Uri uri, LibraryBuilder library) {
+ addBuilderAndInvalidateUris(Uri uri, LibraryBuilder library,
+ [bool recursive = true]) {
builders[uri] = library;
if (invalidatedFileUris.contains(uri) ||
(uri != library.fileUri &&
@@ -227,9 +251,14 @@
invalidatedFileUris.contains(library.library.fileUri))) {
invalidatedImportUris.add(uri);
}
+ if (!recursive) return;
if (library is SourceLibraryBuilder) {
for (var part in library.parts) {
- addBuilderAndInvalidateUris(part.uri, part);
+ addBuilderAndInvalidateUris(part.uri, part, false);
+ }
+ } else if (library is DillLibraryBuilder) {
+ for (var part in library.library.parts) {
+ addBuilderAndInvalidateUris(part.fileUri, library, false);
}
}
}
@@ -253,11 +282,19 @@
// Remove all dependencies of [invalidatedImportUris] from builders.
List<Uri> workList = invalidatedImportUris;
while (workList.isNotEmpty) {
- LibraryBuilder current = builders.remove(workList.removeLast());
+ Uri removed = workList.removeLast();
+ LibraryBuilder current = builders.remove(removed);
// [current] is null if the corresponding key (URI) has already been
// removed.
if (current != null) {
Set<Uri> s = directDependencies[current.uri];
+ if (current.uri != removed) {
+ if (s == null) {
+ s = directDependencies[removed];
+ } else {
+ s.addAll(directDependencies[removed]);
+ }
+ }
if (s != null) {
// [s] is null for leaves.
for (Uri dependency in s) {
@@ -267,7 +304,16 @@
}
}
- return builders.values.where((builder) => !builder.isPart).toList();
+ // Builders contain mappings from part uri to builder, meaning the same
+ // builder can exist multiple times in the values list.
+ Set<Uri> seenUris = new Set<Uri>();
+ List<LibraryBuilder> result = <LibraryBuilder>[];
+ for (var builder in builders.values) {
+ if (builder.isPart) continue;
+ if (!seenUris.add(builder.fileUri)) continue;
+ result.add(builder);
+ }
+ return result;
}
@override
@@ -275,3 +321,23 @@
invalidatedUris.add(uri);
}
}
+
+class IncrementalCompilerData {
+ bool includeUserLoadedLibraries;
+ Map<Uri, Source> uriToSource;
+ Map<Uri, int> importUriToOrder;
+ Procedure userLoadedUriMain;
+ Program program;
+
+ IncrementalCompilerData() {
+ reset();
+ }
+
+ reset() {
+ includeUserLoadedLibraries = false;
+ uriToSource = <Uri, Source>{};
+ importUriToOrder = <Uri, int>{};
+ userLoadedUriMain = null;
+ program = null;
+ }
+}
diff --git a/pkg/front_end/lib/src/fasta/kernel/body_builder.dart b/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
index 60992ba..8389e2d 100644
--- a/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
@@ -4,7 +4,6 @@
library fasta.body_builder;
-// ignore: UNDEFINED_HIDDEN_NAME
import 'dart:core' hide MapEntry;
import '../fasta_codes.dart' as fasta;
@@ -1613,10 +1612,10 @@
}
@override
- void beginVariablesDeclaration(Token token) {
+ void beginVariablesDeclaration(Token token, Token varFinalOrConst) {
debugEvent("beginVariablesDeclaration");
DartType type = pop();
- int modifiers = Modifier.validate(pop());
+ int modifiers = Modifier.validateVarFinalOrConst(varFinalOrConst?.lexeme);
super.push(currentLocalVariableModifiers);
super.push(currentLocalVariableType ?? NullValue.Type);
currentLocalVariableType = type;
@@ -1649,6 +1648,8 @@
}
void handleInvalidTopLevelBlock(Token token) {
+ // TODO(danrubel): Consider improved recovery by adding this block
+ // as part of a synthetic top level function.
pop(); // block
}
@@ -3016,7 +3017,7 @@
void handleLabel(Token token) {
debugEvent("Label");
Identifier identifier = pop();
- push(new Label(identifier.name));
+ push(new Label(identifier.name, identifier.token.charOffset));
}
@override
@@ -3201,8 +3202,14 @@
assert(scope == switchScope);
for (Label label in labels) {
if (scope.hasLocalLabel(label.name)) {
- // TODO(ahe): Should validate this is a goto target and not duplicated.
- scope.claimLabel(label.name);
+ // TODO(ahe): Should validate this is a goto target.
+ if (!scope.claimLabel(label.name)) {
+ addCompileTimeError(
+ fasta.templateDuplicateLabelInSwitchStatement
+ .withArguments(label.name),
+ label.charOffset,
+ label.name.length);
+ }
} else {
scope.declareLabel(label.name, createGotoTarget(firstToken.charOffset));
}
@@ -3895,8 +3902,9 @@
class Label {
String name;
+ int charOffset;
- Label(this.name);
+ Label(this.name, this.charOffset);
String toString() => "label($name)";
}
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 db948bc..9f9701d 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
@@ -34,6 +34,7 @@
StringLiteral,
SuperInitializer,
TypeParameter,
+ TypeParameterType,
VariableDeclaration,
VariableGet,
VoidType,
@@ -129,7 +130,7 @@
if (actualBody != null) {
unexpected("null", "${actualBody.runtimeType}", charOffset, fileUri);
}
- actualBody = new RedirectingFactoryBody(target);
+ actualBody = new RedirectingFactoryBody(target, typeArguments);
function.body = actualBody;
actualBody?.parent = function;
if (isPatch) {
@@ -608,6 +609,19 @@
function.body = actualBody;
actualBody?.parent = function;
if (isPatch) {
+ if (function.typeParameters != null) {
+ Map<TypeParameter, DartType> substitution = <TypeParameter, DartType>{};
+ for (int i = 0; i < function.typeParameters.length; i++) {
+ substitution[function.typeParameters[i]] =
+ new TypeParameterType(actualOrigin.function.typeParameters[i]);
+ }
+ List<DartType> newTypeArguments =
+ new List<DartType>(typeArguments.length);
+ for (int i = 0; i < newTypeArguments.length; i++) {
+ newTypeArguments[i] = substitute(typeArguments[i], substitution);
+ }
+ typeArguments = newTypeArguments;
+ }
actualOrigin.setRedirectingFactoryBody(target, typeArguments);
}
}
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 0f9acb9..a7447ef 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
@@ -18,7 +18,6 @@
/// kernel class, because multiple constructs in Dart may desugar to a tree
/// with the same kind of root node.
-// ignore: UNDEFINED_HIDDEN_NAME
import 'dart:core' hide MapEntry;
import 'package:front_end/src/base/instrumentation.dart';
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 af03b4f..282980e 100644
--- a/pkg/front_end/lib/src/fasta/kernel/kernel_target.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/kernel_target.dart
@@ -28,6 +28,7 @@
Name,
NamedExpression,
NullLiteral,
+ Procedure,
ProcedureKind,
Program,
Source,
@@ -51,6 +52,8 @@
import '../dill/dill_target.dart' show DillTarget;
+import '../dill/dill_member_builder.dart' show DillMemberBuilder;
+
import '../messages.dart'
show
LocatedMessage,
@@ -372,6 +375,10 @@
Builder builder = loader.first.exportScope.lookup("main", -1, null);
if (builder is KernelProcedureBuilder) {
program.mainMethod = builder.procedure;
+ } else if (builder is DillMemberBuilder) {
+ if (builder.member is Procedure) {
+ program.mainMethod = builder.member;
+ }
}
}
diff --git a/pkg/front_end/lib/src/fasta/modifier.dart b/pkg/front_end/lib/src/fasta/modifier.dart
index 15ff705..4c4cb84 100644
--- a/pkg/front_end/lib/src/fasta/modifier.dart
+++ b/pkg/front_end/lib/src/fasta/modifier.dart
@@ -82,4 +82,12 @@
}
return result;
}
+
+ static int validateVarFinalOrConst(String lexeme) {
+ if (lexeme == null) return 0;
+ if (identical('const', lexeme)) return Const.mask;
+ if (identical('final', lexeme)) return Final.mask;
+ if (identical('var', lexeme)) return Var.mask;
+ return unhandled(lexeme, "Modifier.validateVarFinalOrConst", -1, null);
+ }
}
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 d60e675..2ff44b0 100644
--- a/pkg/front_end/lib/src/fasta/parser/forwarding_listener.dart
+++ b/pkg/front_end/lib/src/fasta/parser/forwarding_listener.dart
@@ -403,8 +403,8 @@
}
@override
- void beginVariablesDeclaration(Token token) {
- listener?.beginVariablesDeclaration(token);
+ void beginVariablesDeclaration(Token token, Token varFinalOrConst) {
+ listener?.beginVariablesDeclaration(token, varFinalOrConst);
}
@override
diff --git a/pkg/front_end/lib/src/fasta/parser/listener.dart b/pkg/front_end/lib/src/fasta/parser/listener.dart
index 358f63b..b7d921e 100644
--- a/pkg/front_end/lib/src/fasta/parser/listener.dart
+++ b/pkg/front_end/lib/src/fasta/parser/listener.dart
@@ -62,6 +62,9 @@
logEvent("Block");
}
+ /// Called to handle a block that has been parsed but is not associated
+ /// with any top level function declaration. Substructures:
+ /// - block
void handleInvalidTopLevelBlock(Token token) {}
void beginCascade(Token token) {}
@@ -912,7 +915,7 @@
logEvent("FunctionExpression");
}
- void beginVariablesDeclaration(Token token) {}
+ void beginVariablesDeclaration(Token token, Token varFinalOrConst) {}
void endVariablesDeclaration(int count, Token endToken) {
logEvent("VariablesDeclaration");
diff --git a/pkg/front_end/lib/src/fasta/parser/modifier_context.dart b/pkg/front_end/lib/src/fasta/parser/modifier_context.dart
index 8433560..fd95bba 100644
--- a/pkg/front_end/lib/src/fasta/parser/modifier_context.dart
+++ b/pkg/front_end/lib/src/fasta/parser/modifier_context.dart
@@ -212,7 +212,6 @@
class ModifierRecoveryContext2 {
final Parser parser;
TypeContinuation typeContinuation;
- int modifierCount = 0;
Token abstractToken;
Token constToken;
Token covariantToken;
@@ -272,22 +271,23 @@
token = parseModifiers(token, typeContinuation,
externalToken: externalToken, varFinalOrConst: varFinalOrConst);
- if (abstractToken != null) {
- parser.reportRecoverableErrorWithToken(
- abstractToken, fasta.templateExtraneousModifier);
- }
- if (staticToken != null) {
- parser.reportRecoverableErrorWithToken(
- staticToken, fasta.templateExtraneousModifier);
- staticToken = null;
- --modifierCount;
- }
- if (covariantToken != null) {
- parser.reportRecoverableErrorWithToken(
- covariantToken, fasta.templateExtraneousModifier);
- covariantToken = null;
- --modifierCount;
- }
+ reportExtraneousModifier(abstractToken);
+ reportExtraneousModifier(covariantToken);
+ reportExtraneousModifier(staticToken);
+ return token;
+ }
+
+ /// Parse modifiers for variable declarations.
+ Token parseVariableDeclarationModifiers(
+ Token token, TypeContinuation typeContinuation,
+ {Token varFinalOrConst}) {
+ token = parseModifiers(token, typeContinuation,
+ varFinalOrConst: varFinalOrConst);
+
+ reportExtraneousModifier(abstractToken);
+ reportExtraneousModifier(covariantToken);
+ reportExtraneousModifier(externalToken);
+ reportExtraneousModifier(staticToken);
return token;
}
@@ -311,29 +311,23 @@
this.typeContinuation = typeContinuation;
if (externalToken != null) {
this.externalToken = externalToken;
- ++modifierCount;
}
if (staticOrCovariant != null) {
if (optional('static', staticOrCovariant)) {
this.staticToken = staticOrCovariant;
- ++modifierCount;
} else if (optional('covariant', staticOrCovariant)) {
this.covariantToken = staticOrCovariant;
- ++modifierCount;
} else {
throw "Internal error: "
"Unexpected staticOrCovariant '$staticOrCovariant'.";
}
} else if (staticToken != null) {
this.staticToken = staticToken;
- ++modifierCount;
} else if (covariantToken != null) {
this.covariantToken = covariantToken;
- ++modifierCount;
}
if (varFinalOrConst != null) {
this.varFinalOrConst = varFinalOrConst;
- ++modifierCount;
if (optional('var', varFinalOrConst)) {
varToken = varFinalOrConst;
} else if (optional('final', varFinalOrConst)) {
@@ -385,7 +379,6 @@
assert(optional('abstract', next));
if (abstractToken == null) {
abstractToken = next;
- ++modifierCount;
return next;
}
@@ -401,7 +394,6 @@
if (varFinalOrConst == null && covariantToken == null) {
typeContinuation ??= TypeContinuation.Optional;
varFinalOrConst = constToken = next;
- ++modifierCount;
if (afterFactory) {
parser.reportRecoverableError(next, fasta.messageConstAfterFactory);
@@ -433,7 +425,6 @@
staticToken == null &&
!afterFactory) {
covariantToken = next;
- ++modifierCount;
if (varToken != null) {
parser.reportRecoverableError(next, fasta.messageCovariantAfterVar);
@@ -448,8 +439,7 @@
parser.reportRecoverableErrorWithToken(
next, fasta.templateDuplicatedModifier);
} else if (afterFactory) {
- parser.reportRecoverableErrorWithToken(
- next, fasta.templateExtraneousModifier);
+ reportExtraneousModifier(next);
} else if (constToken != null) {
parser.reportRecoverableError(next, fasta.messageConstAndCovariant);
} else if (staticToken != null) {
@@ -465,7 +455,6 @@
assert(optional('external', next));
if (externalToken == null) {
externalToken = next;
- ++modifierCount;
if (afterFactory) {
parser.reportRecoverableError(next, fasta.messageExternalAfterFactory);
@@ -489,7 +478,6 @@
if (varFinalOrConst == null && !afterFactory) {
typeContinuation ??= TypeContinuation.Optional;
varFinalOrConst = finalToken = next;
- ++modifierCount;
return next;
}
@@ -498,8 +486,7 @@
parser.reportRecoverableErrorWithToken(
next, fasta.templateDuplicatedModifier);
} else if (afterFactory) {
- parser.reportRecoverableErrorWithToken(
- next, fasta.templateExtraneousModifier);
+ reportExtraneousModifier(next);
} else if (constToken != null) {
parser.reportRecoverableError(next, fasta.messageConstAndFinal);
} else if (varToken != null) {
@@ -515,7 +502,6 @@
assert(optional('static', next));
if (covariantToken == null && staticToken == null && !afterFactory) {
staticToken = next;
- ++modifierCount;
if (constToken != null) {
parser.reportRecoverableError(next, fasta.messageStaticAfterConst);
@@ -534,8 +520,7 @@
parser.reportRecoverableErrorWithToken(
next, fasta.templateDuplicatedModifier);
} else if (afterFactory) {
- parser.reportRecoverableErrorWithToken(
- next, fasta.templateExtraneousModifier);
+ reportExtraneousModifier(next);
} else {
throw 'Internal Error: Unhandled recovery: $next';
}
@@ -548,7 +533,6 @@
if (varFinalOrConst == null && !afterFactory) {
typeContinuation = typeContinuationAfterVar(typeContinuation);
varFinalOrConst = varToken = next;
- ++modifierCount;
return next;
}
@@ -557,8 +541,7 @@
parser.reportRecoverableErrorWithToken(
next, fasta.templateDuplicatedModifier);
} else if (afterFactory) {
- parser.reportRecoverableErrorWithToken(
- next, fasta.templateExtraneousModifier);
+ reportExtraneousModifier(next);
} else if (constToken != null) {
parser.reportRecoverableError(next, fasta.messageConstAndVar);
} else if (finalToken != null) {
@@ -568,6 +551,13 @@
}
return next;
}
+
+ void reportExtraneousModifier(Token token) {
+ if (token != null) {
+ parser.reportRecoverableErrorWithToken(
+ token, fasta.templateExtraneousModifier);
+ }
+ }
}
class ModifierRecoveryContext extends ModifierContext {
diff --git a/pkg/front_end/lib/src/fasta/parser/parser.dart b/pkg/front_end/lib/src/fasta/parser/parser.dart
index dc3c99e..5a847d1 100644
--- a/pkg/front_end/lib/src/fasta/parser/parser.dart
+++ b/pkg/front_end/lib/src/fasta/parser/parser.dart
@@ -5530,62 +5530,47 @@
return parseVariablesDeclarationMaybeSemicolon(token, true);
}
- Token parseVariablesDeclarationRest(Token token) {
- return parseVariablesDeclarationMaybeSemicolonRest(token, true);
- }
-
- Token parseVariablesDeclarationNoSemicolonRest(Token token) {
- // Only called when parsing a for loop, so this is for parsing locals.
- return parseVariablesDeclarationMaybeSemicolonRest(token, false);
- }
-
Token parseVariablesDeclarationMaybeSemicolon(
Token token, bool endWithSemicolon) {
Token next = token.next;
- MemberKind memberKind = MemberKind.Local;
TypeContinuation typeContinuation;
Token varFinalOrConst;
if (isModifier(next)) {
if (optional('var', next)) {
typeContinuation = TypeContinuation.OptionalAfterVar;
- varFinalOrConst = token = parseModifier(token);
+ varFinalOrConst = token = token.next;
next = token.next;
} else if (optional('final', next) || optional('const', next)) {
typeContinuation = TypeContinuation.Optional;
- varFinalOrConst = token = parseModifier(token);
+ varFinalOrConst = token = token.next;
next = token.next;
}
if (isModifier(next)) {
// Recovery
- ModifierRecoveryContext modifierContext = new ModifierRecoveryContext(
- this, memberKind, null, true, typeContinuation);
- token = modifierContext.parseRecovery(token,
+ ModifierRecoveryContext2 modifierContext =
+ new ModifierRecoveryContext2(this);
+ token = modifierContext.parseVariableDeclarationModifiers(
+ token, typeContinuation,
varFinalOrConst: varFinalOrConst);
varFinalOrConst = modifierContext.varFinalOrConst;
- listener.handleModifiers(modifierContext.modifierCount);
-
- memberKind = modifierContext.memberKind;
typeContinuation = modifierContext.typeContinuation;
modifierContext = null;
- } else {
- listener.handleModifiers(1);
}
- } else {
- listener.handleModifiers(0);
}
- token = parseType(
- token, typeContinuation ?? TypeContinuation.Required, null, memberKind);
- return parseVariablesDeclarationMaybeSemicolonRest(token, endWithSemicolon);
+ token = parseType(token, typeContinuation ?? TypeContinuation.Required,
+ null, MemberKind.Local);
+ return parseVariablesDeclarationMaybeSemicolonRest(
+ token, varFinalOrConst, endWithSemicolon);
}
Token parseVariablesDeclarationMaybeSemicolonRest(
- Token token, bool endWithSemicolon) {
+ Token token, Token varFinalOrConst, bool endWithSemicolon) {
int count = 1;
- listener.beginVariablesDeclaration(token.next);
+ listener.beginVariablesDeclaration(token.next, varFinalOrConst);
token = parseOptionallyInitializedIdentifier(token);
while (optional(',', token.next)) {
token = parseOptionallyInitializedIdentifier(token.next);
diff --git a/pkg/front_end/lib/src/fasta/scope.dart b/pkg/front_end/lib/src/fasta/scope.dart
index 33e5379..be0d0d0 100644
--- a/pkg/front_end/lib/src/fasta/scope.dart
+++ b/pkg/front_end/lib/src/fasta/scope.dart
@@ -182,12 +182,13 @@
forwardDeclaredLabels[name] = target;
}
- void claimLabel(String name) {
- if (forwardDeclaredLabels == null) return;
- forwardDeclaredLabels.remove(name);
+ bool claimLabel(String name) {
+ if (forwardDeclaredLabels == null ||
+ forwardDeclaredLabels.remove(name) == null) return false;
if (forwardDeclaredLabels.length == 0) {
forwardDeclaredLabels = null;
}
+ return true;
}
Map<String, Builder> get unclaimedForwardDeclarations {
diff --git a/pkg/front_end/lib/src/fasta/severity.dart b/pkg/front_end/lib/src/fasta/severity.dart
index 02da071..fb1fb5a 100644
--- a/pkg/front_end/lib/src/fasta/severity.dart
+++ b/pkg/front_end/lib/src/fasta/severity.dart
@@ -12,3 +12,21 @@
nit,
warning,
}
+
+const Map<String, String> severityEnumNames = const <String, String>{
+ 'CONTEXT': 'context',
+ 'ERROR': 'error',
+ 'ERROR_LEGACY_WARNING': 'errorLegacyWarning',
+ 'INTERNAL_PROBLEM': 'internalProblem',
+ 'NIT': 'nit',
+ 'WARNING': 'warning',
+};
+
+const Map<String, Severity> severityEnumValues = const <String, Severity>{
+ 'CONTEXT': Severity.context,
+ 'ERROR': Severity.error,
+ 'ERROR_LEGACY_WARNING': Severity.errorLegacyWarning,
+ 'INTERNAL_PROBLEM': Severity.internalProblem,
+ 'NIT': Severity.nit,
+ 'WARNING': Severity.warning,
+};
diff --git a/pkg/front_end/messages.status b/pkg/front_end/messages.status
index b03c6fa..d4216e5 100644
--- a/pkg/front_end/messages.status
+++ b/pkg/front_end/messages.status
@@ -1,12 +1,10 @@
# 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.md file.
-
-# Please don't add more failures to this status file of the "analyzerCode" or
-# "example" varity.
-
AbstractClassInstantiation/analyzerCode: Fail
AbstractClassInstantiation/example: Fail
+AbstractClassMember/script5: Fail
+AbstractClassMember/script6: Fail
AbstractNotSync/analyzerCode: Fail
AbstractNotSync/example: Fail
AbstractRedirectedClassInstantiation/analyzerCode: Fail
@@ -24,12 +22,9 @@
AwaitAsIdentifier/example: Fail
AwaitNotAsync/analyzerCode: Fail
AwaitNotAsync/example: Fail
+BreakOutsideOfLoop/script1: Fail
BuiltInIdentifierAsType/example: Fail
BuiltInIdentifierInDeclaration/example: Fail
-CandidateFound/analyzerCode: Fail
-CandidateFound/example: Fail
-CandidateFoundIsDefaultConstructor/analyzerCode: Fail
-CandidateFoundIsDefaultConstructor/example: Fail
CannotReadPackagesFile/analyzerCode: Fail
CannotReadPackagesFile/example: Fail
CannotReadSdkSpecification/analyzerCode: Fail
@@ -61,19 +56,27 @@
ConflictsWithSetterWarning/example: Fail
ConflictsWithTypeVariable/analyzerCode: Fail
ConflictsWithTypeVariable/example: Fail
-ConflictsWithTypeVariableCause/analyzerCode: Fail
-ConflictsWithTypeVariableCause/example: Fail
+ConstAfterFactory/script1: Fail
+ConstAndCovariant/script2: Fail
+ConstAndFinal/script1: Fail
+ConstAndVar/script1: Fail
ConstConstructorNonFinalField/analyzerCode: Fail
ConstConstructorNonFinalField/example: Fail
-ConstConstructorNonFinalFieldCause/analyzerCode: Fail
-ConstConstructorNonFinalFieldCause/example: Fail
ConstFieldWithoutInitializer/example: Fail
ConstructorHasNoSuchNamedParameter/analyzerCode: Fail
ConstructorHasNoSuchNamedParameter/example: Fail
ConstructorNotFound/analyzerCode: Fail
ConstructorNotFound/example: Fail
+ContinueOutsideOfLoop/script1: Fail
+ContinueWithoutLabelInCase/script1: Fail
CouldNotParseUri/analyzerCode: Fail
CouldNotParseUri/example: Fail
+CovariantAfterFinal/script1: Fail
+CovariantAfterVar/script1: Fail
+CovariantAndStatic/script1: Fail
+CovariantAndStatic/script2: Fail
+CovariantMember/script1: Fail
+CovariantMember/script2: Fail
CyclicClassHierarchy/analyzerCode: Fail
CyclicClassHierarchy/example: Fail
CyclicTypedef/analyzerCode: Fail
@@ -81,11 +84,11 @@
DeferredAfterPrefix/example: Fail
DeferredPrefixDuplicated/analyzerCode: Fail
DeferredPrefixDuplicated/example: Fail
-DeferredPrefixDuplicatedCause/analyzerCode: Fail
-DeferredPrefixDuplicatedCause/example: Fail
DeferredTypeAnnotation/example: Fail
DillOutlineSummary/analyzerCode: Fail
DillOutlineSummary/example: Fail
+DirectiveAfterDeclaration/script1: Fail
+DirectiveAfterDeclaration/script2: Fail
DuplicateDeferred/example: Fail
DuplicatePrefix/example: Fail
DuplicatedDefinition/analyzerCode: Fail
@@ -97,26 +100,34 @@
DuplicatedImport/example: Fail
DuplicatedImportInType/analyzerCode: Fail
DuplicatedImportInType/example: Fail
+DuplicatedModifier/script1: Fail
DuplicatedName/analyzerCode: Fail
DuplicatedName/example: Fail
DuplicatedParameterName/analyzerCode: Fail
DuplicatedParameterName/example: Fail
-DuplicatedParameterNameCause/analyzerCode: Fail
-DuplicatedParameterNameCause/example: Fail
Encoding/analyzerCode: Fail
EnumConstantSameNameAsEnclosing/analyzerCode: Fail
EnumConstantSameNameAsEnclosing/example: Fail
+EqualityCannotBeEqualityOperand/script1: Fail
+EqualityCannotBeEqualityOperand/script2: Fail
+ExpectedAnInitializer/script1: Fail
+ExpectedBlock/script: Fail
+ExpectedBlockToSkip/script: Fail
+ExpectedButGot/script1: Fail
+ExpectedButGot/script2: Fail
ExpectedClassBody/example: Fail
ExpectedClassMember/example: Fail
ExpectedDeclaration/example: Fail
ExpectedFunctionBody/example: Fail
ExpectedOpenParens/analyzerCode: Fail
ExpectedOpenParens/example: Fail
+ExpectedStatement/statement: Fail
ExpectedString/example: Fail
ExpectedToken/example: Fail
ExpectedType/example: Fail
ExpectedUri/analyzerCode: Fail
ExpectedUri/example: Fail
+ExportAfterPart/script1: Fail
ExportHidesExport/analyzerCode: Fail
ExportHidesExport/example: Fail
ExpressionNotMetadata/analyzerCode: Fail
@@ -124,7 +135,26 @@
ExtendingEnum/analyzerCode: Fail
ExtendingEnum/example: Fail
ExtendingRestricted/example: Fail
+ExternalConstructorWithBody/script1: Fail
ExternalFactoryRedirection/example: Fail
+ExternalFactoryWithBody/script1: Fail
+ExtraneousModifier/script1: Fail
+ExtraneousModifier/script10: Fail
+ExtraneousModifier/script11: Fail
+ExtraneousModifier/script12: Fail
+ExtraneousModifier/script13: Fail
+ExtraneousModifier/script16: Fail
+ExtraneousModifier/script17: Fail
+ExtraneousModifier/script18: Fail
+ExtraneousModifier/script19: Fail
+ExtraneousModifier/script2: Fail
+ExtraneousModifier/script20: Fail
+ExtraneousModifier/script3: Fail
+ExtraneousModifier/script4: Fail
+ExtraneousModifier/script5: Fail
+ExtraneousModifier/script7: Fail
+ExtraneousModifier/script8: Fail
+ExtraneousModifier/script9: Fail
FactoryNotSync/analyzerCode: Fail
FactoryNotSync/example: Fail
FastaCLIArgumentRequired/analyzerCode: Fail
@@ -133,69 +163,36 @@
FastaUsageLong/example: Fail
FastaUsageShort/analyzerCode: Fail
FastaUsageShort/example: Fail
+FieldInitializerOutsideConstructor/script1: Fail
+FinalAndCovariant/script2: Fail
FinalFieldWithoutInitializer/example: Fail
FinalInstanceVariableAlreadyInitialized/analyzerCode: Fail
FinalInstanceVariableAlreadyInitialized/example: Fail
-FinalInstanceVariableAlreadyInitializedCause/analyzerCode: Fail
-FinalInstanceVariableAlreadyInitializedCause/example: Fail
FunctionHasNoSuchNamedParameter/analyzerCode: Fail
FunctionHasNoSuchNamedParameter/example: Fail
FunctionTypeDefaultValue/example: Fail
+FunctionTypedParameterVar/script1: Fail
GeneratorReturnsValue/example: Fail
GetterNotFound/analyzerCode: Fail
GetterNotFound/example: Fail
GetterWithFormals/example: Fail
+IllegalAssignmentToNonAssignable/script1: Fail
IllegalMethodName/analyzerCode: Fail
IllegalMethodName/example: Fail
IllegalMixin/analyzerCode: Fail
IllegalMixin/example: Fail
IllegalMixinDueToConstructors/analyzerCode: Fail
IllegalMixinDueToConstructors/example: Fail
-IllegalMixinDueToConstructorsCause/analyzerCode: Fail
-IllegalMixinDueToConstructorsCause/example: Fail
+ImplementsBeforeExtends/script: Fail
+ImplementsBeforeWith/script: Fail
ImplicitCallOfNonMethod/analyzerCode: Fail
ImplicitCallOfNonMethod/example: Fail
+ImportAfterPart/script1: Fail
ImportHidesImport/analyzerCode: Fail
ImportHidesImport/example: Fail
InputFileNotFound/analyzerCode: Fail
InputFileNotFound/example: Fail
IntegerLiteralIsOutOfRange/example: Fail
-InternalProblemAlreadyInitialized/analyzerCode: Fail
-InternalProblemAlreadyInitialized/example: Fail
-InternalProblemBodyOnAbstractMethod/analyzerCode: Fail
-InternalProblemBodyOnAbstractMethod/example: Fail
-InternalProblemConstructorNotFound/analyzerCode: Fail
-InternalProblemConstructorNotFound/example: Fail
-InternalProblemExtendingUnmodifiableScope/analyzerCode: Fail
-InternalProblemExtendingUnmodifiableScope/example: Fail
-InternalProblemMissingContext/analyzerCode: Fail
-InternalProblemMissingContext/example: Fail
-InternalProblemMissingSeverity/analyzerCode: Fail
-InternalProblemMissingSeverity/example: Fail
-InternalProblemNotFound/analyzerCode: Fail
-InternalProblemNotFound/example: Fail
-InternalProblemNotFoundIn/analyzerCode: Fail
-InternalProblemNotFoundIn/example: Fail
-InternalProblemPreviousTokenNotFound/analyzerCode: Fail
-InternalProblemPreviousTokenNotFound/example: Fail
-InternalProblemPrivateConstructorAccess/analyzerCode: Fail
-InternalProblemPrivateConstructorAccess/example: Fail
-InternalProblemProvidedBothCompileSdkAndSdkSummary/analyzerCode: Fail
-InternalProblemProvidedBothCompileSdkAndSdkSummary/example: Fail
-InternalProblemStackNotEmpty/analyzerCode: Fail
-InternalProblemStackNotEmpty/example: Fail
-InternalProblemSuperclassNotFound/analyzerCode: Fail
-InternalProblemSuperclassNotFound/example: Fail
-InternalProblemUnexpected/analyzerCode: Fail
-InternalProblemUnexpected/example: Fail
-InternalProblemUnhandled/analyzerCode: Fail
-InternalProblemUnhandled/example: Fail
-InternalProblemUnimplemented/analyzerCode: Fail
-InternalProblemUnimplemented/example: Fail
-InternalProblemUnsupported/analyzerCode: Fail
-InternalProblemUnsupported/example: Fail
-InternalProblemUriMissingScheme/analyzerCode: Fail
-InternalProblemUriMissingScheme/example: Fail
InternalVerificationError/analyzerCode: Fail
InternalVerificationError/example: Fail
InterpolationInUri/example: Fail
@@ -209,9 +206,14 @@
InvalidInitializer/analyzerCode: Fail
InvalidInitializer/example: Fail
InvalidInlineFunctionType/analyzerCode: Fail
+InvalidInlineFunctionType/declaration: Fail
InvalidPackageUri/analyzerCode: Fail
InvalidPackageUri/example: Fail
InvalidVoid/analyzerCode: Fail
+InvalidVoid/script1: Fail
+InvalidVoid/script2: Fail
+LibraryDirectiveNotFirst/script2: Fail
+LibraryDirectiveNotFirst/script3: Fail
ListLiteralTooManyTypeArguments/analyzerCode: Fail
ListLiteralTooManyTypeArguments/example: Fail
ListLiteralTypeArgumentMismatch/analyzerCode: Fail
@@ -232,6 +234,8 @@
MethodHasNoSuchNamedParameter/example: Fail
MethodNotFound/analyzerCode: Fail
MethodNotFound/example: Fail
+MissingAssignableSelector/script1: Fail
+MissingAssignmentInInitializer/script1: Fail
MissingInput/analyzerCode: Fail
MissingInput/example: Fail
MissingMain/analyzerCode: Fail
@@ -241,14 +245,19 @@
MissingPrefixInDeferredImport/example: Fail
MixinInferenceNoMatchingClass/analyzerCode: Fail
MixinInferenceNoMatchingClass/example: Fail
+MultipleExtends/script: Fail
+MultipleImplements/script: Fail
MultipleLibraryDirectives/example: Fail
+MultipleWith/script: Fail
NamedFunctionExpression/example: Fail
NativeClauseShouldBeAnnotation/example: Fail
NoFormals/example: Fail
NoUnnamedConstructorInObject/analyzerCode: Fail
NoUnnamedConstructorInObject/example: Fail
+NonAsciiIdentifier/expression: Fail
NonInstanceTypeVariableUse/analyzerCode: Fail
NonInstanceTypeVariableUse/example: Fail
+NonPartOfDirectiveInPart/script1: Fail
NotAPrefixInTypeAnnotation/example: Fail
NotAType/example: Fail
NotAnLvalue/analyzerCode: Fail
@@ -263,8 +272,6 @@
OperatorParameterMismatch2/example: Fail
OperatorWithOptionalFormals/analyzerCode: Fail
OperatorWithOptionalFormals/example: Fail
-OverriddenMethodCause/analyzerCode: Fail
-OverriddenMethodCause/example: Fail
OverrideFewerNamedArguments/analyzerCode: Fail
OverrideFewerNamedArguments/example: Fail
OverrideFewerPositionalArguments/analyzerCode: Fail
@@ -289,14 +296,10 @@
PartOfUseUri/example: Fail
PartTwice/analyzerCode: Fail
PartTwice/example: Fail
-PatchClassOrigin/analyzerCode: Fail
-PatchClassOrigin/example: Fail
PatchClassTypeVariablesMismatch/analyzerCode: Fail
PatchClassTypeVariablesMismatch/example: Fail
PatchDeclarationMismatch/analyzerCode: Fail
PatchDeclarationMismatch/example: Fail
-PatchDeclarationOrigin/analyzerCode: Fail
-PatchDeclarationOrigin/example: Fail
PatchInjectionFailed/analyzerCode: Fail
PatchInjectionFailed/example: Fail
PatchNonExternal/analyzerCode: Fail
@@ -309,6 +312,8 @@
PreviousUseOfName/example: Fail
PrivateNamedParameter/analyzerCode: Fail
PrivateNamedParameter/example: Fail
+RedirectingConstructorWithBody/script1: Fail
+RedirectionInNonFactory/script1: Fail
RedirectionTargetNotFound/analyzerCode: Fail
RedirectionTargetNotFound/example: Fail
ReturnTypeFunctionExpression/analyzerCode: Fail
@@ -329,6 +334,7 @@
SourceOutlineSummary/example: Fail
StackOverflow/analyzerCode: Fail
StackOverflow/example: Fail
+StaticAfterConst/script1: Fail
SuperAsExpression/analyzerCode: Fail
SuperAsExpression/example: Fail
SuperAsIdentifier/analyzerCode: Fail
@@ -366,15 +372,17 @@
TooManyArgumentsToFunction/example: Fail
TooManyArgumentsToMethod/analyzerCode: Fail
TooManyArgumentsToMethod/example: Fail
+TopLevelOperator/script1: Fail
+TopLevelOperator/script2: Fail
+TopLevelOperator/script3: Fail
TypeAfterVar/example: Fail
TypeArgumentMismatch/analyzerCode: Fail
TypeArgumentMismatch/example: Fail
+TypeArgumentsOnTypeVariable/script1: Fail
TypeNotFound/analyzerCode: Fail
TypeNotFound/example: Fail
TypeVariableDuplicatedName/analyzerCode: Fail
TypeVariableDuplicatedName/example: Fail
-TypeVariableDuplicatedNameCause/analyzerCode: Fail
-TypeVariableDuplicatedNameCause/example: Fail
TypeVariableInStaticContext/analyzerCode: Fail
TypeVariableInStaticContext/example: Fail
TypeVariableSameNameAsEnclosing/analyzerCode: Fail
@@ -382,11 +390,26 @@
TypedefNotFunction/analyzerCode: Fail
TypedefNotFunction/example: Fail
UnexpectedDollarInString/analyzerCode: Fail
+UnexpectedDollarInString/script1: Fail
+UnexpectedDollarInString/script2: Fail
+UnexpectedDollarInString/script3: Fail
+UnexpectedDollarInString/script4: Fail
+UnexpectedToken/script1: Fail
UnmatchedToken/analyzerCode: Fail
+UnmatchedToken/script1: Fail
+UnmatchedToken/script3: Fail
UnresolvedPrefixInTypeAnnotation/example: Fail
Unspecified/analyzerCode: Fail
Unspecified/example: Fail
+UnsupportedPrefixPlus/script: Fail
+UnterminatedString/script2: Fail
+UnterminatedString/script4: Fail
+UnterminatedString/script5: Fail
+UnterminatedString/script6: Fail
+UnterminatedString/script7: Fail
+UnterminatedString/script8: Fail
UnterminatedToken/analyzerCode: Fail
UnterminatedToken/example: Fail
YieldAsIdentifier/example: Fail
YieldNotGenerator/example: Fail
+
diff --git a/pkg/front_end/messages.yaml b/pkg/front_end/messages.yaml
index edbcd7b..403ba23 100644
--- a/pkg/front_end/messages.yaml
+++ b/pkg/front_end/messages.yaml
@@ -137,6 +137,12 @@
dart2jsCode: BODY_EXPECTED
script: "main();"
+ExpectedStatement:
+ template: "Expected a statement."
+ analyzerCode: MISSING_STATEMENT
+ dart2jsCode: "*fatal*"
+ statement: "void;"
+
ExpectedButGot:
template: "Expected '#string' before this."
# Consider the second example below: the parser expects a ')' before 'y', but
@@ -615,6 +621,14 @@
script:
- "main() { switch (x) {case 1: continue;} }"
+DuplicateLabelInSwitchStatement:
+ template: "The label '#string' 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;}"
+
InitializedVariableInForEach:
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."
diff --git a/pkg/front_end/test/fasta/messages_test.dart b/pkg/front_end/test/fasta/messages_test.dart
index 9e46ca3..e254b8d 100644
--- a/pkg/front_end/test/fasta/messages_test.dart
+++ b/pkg/front_end/test/fasta/messages_test.dart
@@ -13,7 +13,30 @@
import "package:testing/testing.dart"
show Chain, ChainContext, Result, Step, TestDescription, runMe;
-import "package:yaml/yaml.dart" show loadYaml;
+import "package:yaml/yaml.dart" show YamlList, YamlMap, YamlNode, loadYamlNode;
+
+import 'package:front_end/src/api_prototype/compiler_options.dart'
+ show ProblemHandler;
+
+import 'package:front_end/src/api_prototype/memory_file_system.dart'
+ show MemoryFileSystem, MemoryFileSystemEntity;
+
+import 'package:front_end/src/fasta/fasta_codes.dart' show LocatedMessage;
+
+import 'package:front_end/src/fasta/severity.dart'
+ show Severity, severityEnumValues;
+
+import 'package:front_end/src/testing/hybrid_file_system.dart'
+ show HybridFileSystem;
+
+import "../../tool/_fasta/entry_points.dart" show BatchCompiler;
+
+ProblemHandler problemHandler(List<List> problems) {
+ return (LocatedMessage problem, Severity severity, String formatted, int line,
+ int column) {
+ problems.add([problem, severity, formatted, line, column]);
+ };
+}
class MessageTestDescription extends TestDescription {
@override
@@ -24,7 +47,7 @@
final String name;
- final Map data;
+ final YamlMap data;
final Example example;
@@ -40,30 +63,54 @@
const Compile(),
];
+ final MemoryFileSystem fileSystem;
+
+ final BatchCompiler compiler;
+
+ final List<List> problems;
+
+ MessageTestSuite()
+ : this.internal(new MemoryFileSystem(Uri.parse("org-dartlang-fasta:///")),
+ <List>[]);
+
+ MessageTestSuite.internal(this.fileSystem, this.problems)
+ : compiler = new BatchCompiler.forTesting(
+ new HybridFileSystem(fileSystem), problemHandler(problems));
+
/// Convert all the examples found in `messages.yaml` to a test
- /// description. In addition, for each problem found, create a test
- /// description that has a problem. This problem will then be reported as a
+ /// description. In addition, create a test description for each kind of
+ /// problem that a message can have. This problem will then be reported as a
/// failure by the [Validate] step that can be suppressed via the status
/// file.
Stream<MessageTestDescription> list(Chain suite) async* {
Uri uri = suite.uri.resolve("messages.yaml");
File file = new File.fromUri(uri);
- Map yaml = loadYaml(await file.readAsString());
- for (String name in yaml.keys) {
- var data = yaml[name];
- if (data is String) continue;
+ YamlMap messages = loadYamlNode(await file.readAsString(), sourceUrl: uri);
+ for (String name in messages.keys) {
+ YamlNode messageNode = messages.nodes[name];
+ var message = messageNode.value;
+ if (message is String) continue;
List<String> unknownKeys = <String>[];
List<Example> examples = <Example>[];
String analyzerCode;
String dart2jsCode;
+ Severity severity;
+ YamlNode badSeverity;
- for (String key in data.keys) {
- var value = data[key];
+ for (String key in message.keys) {
+ YamlNode node = message.nodes[key];
+ var value = node.value;
switch (key) {
case "template":
case "tip":
+ break;
+
case "severity":
+ severity = severityEnumValues[value];
+ if (severity == null) {
+ badSeverity = node;
+ }
break;
case "analyzerCode":
@@ -75,60 +122,61 @@
break;
case "bytes":
- if (value.first is List) {
- for (List bytes in value) {
+ YamlList list = node;
+ if (list.first is List) {
+ for (YamlList bytes in list.nodes) {
int i = 0;
examples.add(new BytesExample("bytes${++i}", name, bytes));
}
} else {
- examples.add(new BytesExample("bytes", name, value));
+ examples.add(new BytesExample("bytes", name, list));
}
break;
case "declaration":
- if (value is List) {
+ if (node is YamlList) {
int i = 0;
- for (String declaration in value) {
+ for (YamlNode declaration in node.nodes) {
examples.add(new DeclarationExample(
"declaration${++i}", name, declaration));
}
} else {
- examples.add(new DeclarationExample("declaration", name, value));
+ examples.add(new DeclarationExample("declaration", name, node));
}
break;
case "expression":
- if (value is List) {
+ if (node is YamlList) {
int i = 0;
- for (String expression in value) {
+ for (YamlNode expression in node.nodes) {
examples.add(new ExpressionExample(
"expression${++i}", name, expression));
}
} else {
- examples.add(new ExpressionExample("expression", name, value));
+ examples.add(new ExpressionExample("expression", name, node));
}
break;
case "script":
- if (value is List) {
+ if (node is YamlList) {
int i = 0;
- for (String script in value) {
+ for (YamlNode script in node.nodes) {
examples.add(new ScriptExample("script${++i}", name, script));
}
} else {
- examples.add(new ScriptExample("script", name, value));
+ examples.add(new ScriptExample("script", name, node));
}
break;
case "statement":
- if (value is List) {
+ if (node is YamlList) {
int i = 0;
- for (String statement in value) {
+ for (YamlNode statement in node.nodes) {
examples.add(
new StatementExample("statement${++i}", name, statement));
}
} else {
- examples.add(new StatementExample("statement", name, value));
+ examples.add(new StatementExample("statement", name, node));
}
break;
@@ -138,47 +186,107 @@
}
MessageTestDescription createDescription(
- String subName, Example example, String problem) {
+ String subName, Example example, String problem,
+ {location}) {
String shortName = "$name/$subName";
if (problem != null) {
- String base = "${Uri.base}";
- String filename = "$uri";
- if (filename.startsWith(base)) {
- filename = filename.substring(base.length);
- }
- var location = data.span.start;
+ String filename = relativize(uri);
+ location ??= message.span.start;
int line = location.line;
int column = location.column;
problem = "$filename:$line:$column: error:\n$problem";
}
return new MessageTestDescription(uri.resolve("#$shortName"), shortName,
- name, data, example, problem);
+ name, messageNode, example, problem);
}
for (Example example in examples) {
yield createDescription(example.name, example, null);
}
- if (unknownKeys.isNotEmpty) {
- yield createDescription(
- "knownKeys", null, "Unknown keys: ${unknownKeys.join(' ')}");
- }
+ yield createDescription(
+ "knownKeys",
+ null,
+ unknownKeys.isNotEmpty
+ ? "Unknown keys: ${unknownKeys.join(' ')}."
+ : null);
- if (examples.isEmpty) {
- yield createDescription("example", null, "No example for $name");
- }
+ yield createDescription(
+ "severity",
+ null,
+ badSeverity != null
+ ? "Unknown severity: '${badSeverity.value}'."
+ : null,
+ location: badSeverity?.span?.start);
- if (analyzerCode == null) {
- yield createDescription(
- "analyzerCode", null, "No analyzer code for $name");
- } else {
- if (dart2jsCode == null) {
- yield createDescription(
- "dart2jsCode", null, "No dart2js code for $name");
- }
- }
+ bool exampleAndAnalyzerCodeRequired = (severity != Severity.context &&
+ severity != Severity.internalProblem);
+
+ yield createDescription(
+ "example",
+ null,
+ exampleAndAnalyzerCodeRequired && examples.isEmpty
+ ? "No example for $name, please add at least one example."
+ : null);
+
+ yield createDescription(
+ "analyzerCode",
+ null,
+ exampleAndAnalyzerCodeRequired && analyzerCode == null
+ ? "No analyzer code for $name."
+ "\nTry running"
+ " <BUILDDIR>/dart-sdk/bin/dartanalyzer --format=machine"
+ " on an example to find the code."
+ " The code is printed just before the file name."
+ : null);
+
+ yield createDescription(
+ "dart2jsCode",
+ null,
+ exampleAndAnalyzerCodeRequired &&
+ analyzerCode != null &&
+ dart2jsCode == null
+ ? "No dart2js code for $name."
+ " Try using *ignored* or *fatal*"
+ : null);
}
}
+
+ Uri addSource(String name, List<int> bytes) {
+ Uri uri = fileSystem.currentDirectory.resolve(name);
+ MemoryFileSystemEntity entity = fileSystem.entityForUri(uri);
+ entity.writeAsBytesSync(bytes);
+ return uri;
+ }
+
+ List<List> takeProblems() {
+ List<List> result = problems.toList();
+ problems.clear();
+ return result;
+ }
+
+ String formatProblems(String message, Example example, List<List> problems) {
+ var span = example.node.span;
+ StringBuffer buffer = new StringBuffer();
+ buffer
+ ..write(relativize(span.sourceUrl))
+ ..write(":")
+ ..write(span.start.line)
+ ..write(":")
+ ..write(span.start.column)
+ ..write(": error: ")
+ ..write(message);
+ buffer.write("\n${span.text}");
+ for (List problem in problems) {
+ LocatedMessage messsage = problem[0];
+ String formatted = problem[2];
+ buffer.write("\nCode: ${messsage.code.name}");
+ buffer.write("\n > ");
+ buffer.write(formatted.replaceAll("\n", "\n > "));
+ }
+
+ return "$buffer";
+ }
}
abstract class Example {
@@ -188,23 +296,32 @@
Example(this.name, this.expectedCode);
+ YamlNode get node;
+
Uint8List get bytes;
}
class BytesExample extends Example {
@override
+ final YamlList node;
+
+ @override
final Uint8List bytes;
- BytesExample(String name, String code, List bytes)
- : bytes = new Uint8List.fromList(bytes),
+ BytesExample(String name, String code, this.node)
+ : bytes = new Uint8List.fromList(node.value),
super(name, code);
}
class DeclarationExample extends Example {
+ @override
+ final YamlNode node;
+
final String declaration;
- DeclarationExample(String name, String code, this.declaration)
- : super(name, code);
+ DeclarationExample(String name, String code, this.node)
+ : declaration = node.value,
+ super(name, code);
@override
Uint8List get bytes {
@@ -218,10 +335,14 @@
}
class StatementExample extends Example {
+ @override
+ final YamlNode node;
+
final String statement;
- StatementExample(String name, String code, this.statement)
- : super(name, code);
+ StatementExample(String name, String code, this.node)
+ : statement = node.value,
+ super(name, code);
@override
Uint8List get bytes {
@@ -234,10 +355,14 @@
}
class ExpressionExample extends Example {
+ @override
+ final YamlNode node;
+
final String expression;
- ExpressionExample(String name, String code, this.expression)
- : super(name, code);
+ ExpressionExample(String name, String code, this.node)
+ : expression = node.value,
+ super(name, code);
@override
Uint8List get bytes {
@@ -250,9 +375,14 @@
}
class ScriptExample extends Example {
+ @override
+ final YamlNode node;
+
final String script;
- ScriptExample(String name, String code, this.script) : super(name, code);
+ ScriptExample(String name, String code, this.node)
+ : script = node.value,
+ super(name, code);
@override
Uint8List get bytes {
@@ -281,13 +411,45 @@
String get name => "compile";
Future<Result<Null>> run(Example example, MessageTestSuite suite) async {
- // TODO(ahe): This is where I should actually compile the example and
- // verify that only one message is reported, and it is the expected
- // message.
- if (example is! BytesExample) {
- print(utf8.decode(example.bytes));
+ if (example == null) return pass(null);
+ String name = "${example.expectedCode}/${example.name}";
+ Uri uri = suite.addSource("${name}.dart", example.bytes);
+ print("Compiling $uri");
+ List<List> problems;
+ try {
+ await suite.compiler.batchCompile(<String>["--strong", "$uri"]);
+ } finally {
+ problems = suite.takeProblems();
}
- return pass(null);
+ List<List> unexpectedProblems = <List>[];
+ for (List problem in problems) {
+ LocatedMessage message = problem[0];
+ if (message.code.name != example.expectedCode) {
+ unexpectedProblems.add(problem);
+ }
+ }
+ if (unexpectedProblems.isEmpty) {
+ switch (problems.length) {
+ case 0:
+ return fail(
+ null,
+ suite.formatProblems("No problem reported in ${example.name}:",
+ example, problems));
+ case 1:
+ return pass(null);
+ default:
+ return fail(
+ null,
+ suite.formatProblems(
+ "Problem reported multiple times in ${example.name}:",
+ example,
+ problems));
+ }
+ }
+ return fail(
+ null,
+ suite.formatProblems("Too many problems reported in ${example.name}:",
+ example, problems));
}
}
@@ -296,5 +458,15 @@
return new MessageTestSuite();
}
+String relativize(Uri uri) {
+ String base = "${Uri.base}";
+ String filename = "$uri";
+ if (filename.startsWith(base)) {
+ return filename.substring(base.length);
+ } else {
+ return filename;
+ }
+}
+
main([List<String> arguments = const []]) =>
runMe(arguments, createContext, "../../testing.json");
diff --git a/pkg/front_end/test/incremental_load_from_dill_test.dart b/pkg/front_end/test/incremental_load_from_dill_test.dart
index 5236bed..686cda7 100644
--- a/pkg/front_end/test/incremental_load_from_dill_test.dart
+++ b/pkg/front_end/test/incremental_load_from_dill_test.dart
@@ -18,6 +18,12 @@
show writeProgramToFile, serializeProgram;
import "package:front_end/src/api_prototype/memory_file_system.dart"
show MemoryFileSystem;
+import 'package:kernel/kernel.dart'
+ show Class, EmptyStatement, Library, Procedure, Program;
+
+import 'package:front_end/src/fasta/fasta_codes.dart' show LocatedMessage;
+
+import 'package:front_end/src/fasta/severity.dart' show Severity;
Directory outDir;
@@ -26,6 +32,12 @@
await runPassingTest(testDisappearingLibrary);
await runPassingTest(testDeferredLibrary);
await runPassingTest(testStrongModeMixins);
+ await runFailingTest(
+ testStrongModeMixins2,
+ "testStrongModeMixins2_a.dart: Error: "
+ "The parameter 'value' of the method 'A::child' has type");
+ await runPassingTest(testInvalidateExportOfMain);
+ await runPassingTest(testInvalidatePart);
}
void runFailingTest(dynamic test, String expectContains) async {
@@ -52,6 +64,132 @@
}
}
+/// Invalidate a part file.
+void testInvalidatePart() async {
+ final Uri a = outDir.uri.resolve("testInvalidatePart_a.dart");
+ final Uri b = outDir.uri.resolve("testInvalidatePart_b.dart");
+ final Uri c = outDir.uri.resolve("testInvalidatePart_c.dart");
+ final Uri d = outDir.uri.resolve("testInvalidatePart_d.dart");
+
+ Uri output = outDir.uri.resolve("testInvalidatePart_full.dill");
+ Uri bootstrappedOutput =
+ outDir.uri.resolve("testInvalidatePart_full_from_bootstrap.dill");
+
+ new File.fromUri(a).writeAsStringSync("""
+ library a;
+ import 'testInvalidatePart_c.dart';
+ part 'testInvalidatePart_b.dart';
+ """);
+ new File.fromUri(b).writeAsStringSync("""
+ part of a;
+ b() { print("b"); }
+ """);
+ new File.fromUri(c).writeAsStringSync("""
+ library c;
+ part 'testInvalidatePart_d.dart';
+ """);
+ new File.fromUri(d).writeAsStringSync("""
+ part of c;
+ d() { print("d"); }
+ """);
+
+ Stopwatch stopwatch = new Stopwatch()..start();
+ await normalCompile(a, output, options: getOptions(true));
+ print("Normal compile took ${stopwatch.elapsedMilliseconds} ms");
+
+ stopwatch.reset();
+ bool bootstrapResult = await bootstrapCompile(
+ a, bootstrappedOutput, output, [b],
+ performSizeTests: true, options: getOptions(true));
+ print("Bootstrapped compile(s) from ${output.pathSegments.last} "
+ "took ${stopwatch.elapsedMilliseconds} ms");
+ Expect.isTrue(bootstrapResult);
+
+ // Compare the two files.
+ List<int> normalDillData = new File.fromUri(output).readAsBytesSync();
+ List<int> bootstrappedDillData =
+ new File.fromUri(bootstrappedOutput).readAsBytesSync();
+ checkBootstrappedIsEqual(normalDillData, bootstrappedDillData);
+}
+
+/// Invalidate the entrypoint which just exports another file (which has main).
+void testInvalidateExportOfMain() async {
+ final Uri a = outDir.uri.resolve("testInvalidateExportOfMain_a.dart");
+ final Uri b = outDir.uri.resolve("testInvalidateExportOfMain_b.dart");
+
+ Uri output = outDir.uri.resolve("testInvalidateExportOfMain_full.dill");
+ Uri bootstrappedOutput =
+ outDir.uri.resolve("testInvalidateExportOfMain_full_from_bootstrap.dill");
+
+ new File.fromUri(a).writeAsStringSync("""
+ export 'testInvalidateExportOfMain_b.dart';
+ """);
+ new File.fromUri(b).writeAsStringSync("""
+ main() { print("hello"); }
+ """);
+
+ Stopwatch stopwatch = new Stopwatch()..start();
+ await normalCompile(a, output, options: getOptions(true));
+ print("Normal compile took ${stopwatch.elapsedMilliseconds} ms");
+
+ stopwatch.reset();
+ bool bootstrapResult = await bootstrapCompile(
+ a, bootstrappedOutput, output, [a],
+ performSizeTests: true, options: getOptions(true));
+ print("Bootstrapped compile(s) from ${output.pathSegments.last} "
+ "took ${stopwatch.elapsedMilliseconds} ms");
+ Expect.isTrue(bootstrapResult);
+
+ // Compare the two files.
+ List<int> normalDillData = new File.fromUri(output).readAsBytesSync();
+ List<int> bootstrappedDillData =
+ new File.fromUri(bootstrappedOutput).readAsBytesSync();
+ checkBootstrappedIsEqual(normalDillData, bootstrappedDillData);
+}
+
+/// Compile in strong mode. Use mixins.
+void testStrongModeMixins2() async {
+ final Uri a = outDir.uri.resolve("testStrongModeMixins2_a.dart");
+ final Uri b = outDir.uri.resolve("testStrongModeMixins2_b.dart");
+
+ Uri output = outDir.uri.resolve("testStrongModeMixins2_full.dill");
+ Uri bootstrappedOutput =
+ outDir.uri.resolve("testStrongModeMixins2_full_from_bootstrap.dill");
+
+ new File.fromUri(a).writeAsStringSync("""
+ import 'testStrongModeMixins2_b.dart';
+ class A extends Object with B<C>, D<Object> {}
+ """);
+ new File.fromUri(b).writeAsStringSync("""
+ abstract class B<ChildType extends Object> extends Object {
+ ChildType get child => null;
+ set child(ChildType value) {}
+ }
+
+ class C extends Object {}
+
+ abstract class D<T extends Object> extends Object with B<T> {}
+ """);
+
+ Stopwatch stopwatch = new Stopwatch()..start();
+ await normalCompile(a, output, options: getOptions(true));
+ print("Normal compile took ${stopwatch.elapsedMilliseconds} ms");
+
+ stopwatch.reset();
+ bool bootstrapResult = await bootstrapCompile(
+ a, bootstrappedOutput, output, [a],
+ performSizeTests: true, options: getOptions(true));
+ print("Bootstrapped compile(s) from ${output.pathSegments.last} "
+ "took ${stopwatch.elapsedMilliseconds} ms");
+ Expect.isTrue(bootstrapResult);
+
+ // Compare the two files.
+ List<int> normalDillData = new File.fromUri(output).readAsBytesSync();
+ List<int> bootstrappedDillData =
+ new File.fromUri(bootstrappedOutput).readAsBytesSync();
+ checkBootstrappedIsEqual(normalDillData, bootstrappedDillData);
+}
+
/// Compile in strong mode. Invalidate a file so type inferrer starts
/// on something compiled from source and (potentially) goes into
/// something loaded from dill.
@@ -73,13 +211,13 @@
""");
Stopwatch stopwatch = new Stopwatch()..start();
- await normalCompile(a, output, options: getOptions()..strongMode = true);
+ await normalCompile(a, output, options: getOptions(true));
print("Normal compile took ${stopwatch.elapsedMilliseconds} ms");
stopwatch.reset();
bool bootstrapResult = await bootstrapCompile(
a, bootstrappedOutput, output, [a],
- performSizeTests: false, options: getOptions()..strongMode = true);
+ performSizeTests: true, options: getOptions(true));
print("Bootstrapped compile(s) from ${output.pathSegments.last} "
"took ${stopwatch.elapsedMilliseconds} ms");
Expect.isTrue(bootstrapResult);
@@ -221,7 +359,7 @@
}
""");
- CompilerOptions options = getOptions();
+ CompilerOptions options = getOptions(false);
options.fileSystem = fs;
options.sdkRoot = null;
options.sdkSummary = sdkSummary;
@@ -229,6 +367,7 @@
new IncrementalKernelGenerator(options, main);
Stopwatch stopwatch = new Stopwatch()..start();
var program = await compiler.computeDelta();
+ throwOnEmptyMixinBodies(program);
print("Normal compile took ${stopwatch.elapsedMilliseconds} ms");
libCount2 = serializeProgram(program);
if (program.libraries.length != 2) {
@@ -251,7 +390,7 @@
print("hello from b!");
}
""");
- CompilerOptions options = getOptions();
+ CompilerOptions options = getOptions(false);
options.fileSystem = fs;
options.sdkRoot = null;
options.sdkSummary = sdkSummary;
@@ -261,6 +400,7 @@
compiler.invalidate(b);
Stopwatch stopwatch = new Stopwatch()..start();
var program = await compiler.computeDelta();
+ throwOnEmptyMixinBodies(program);
print("Bootstrapped compile took ${stopwatch.elapsedMilliseconds} ms");
if (program.libraries.length != 1) {
throw "Expected 1 library, got ${program.libraries.length}";
@@ -268,42 +408,83 @@
}
}
-CompilerOptions getOptions() {
+CompilerOptions getOptions(bool strong) {
final Uri sdkRoot = computePlatformBinariesLocation();
var options = new CompilerOptions()
..sdkRoot = sdkRoot
..librariesSpecificationUri = Uri.base.resolve("sdk/lib/libraries.json")
- ..strongMode = false;
+ ..onProblem = (LocatedMessage message, Severity severity, String formatted,
+ int line, int column) {
+ if (severity == Severity.error || severity == Severity.warning) {
+ Expect.fail("Unexpected error: $formatted");
+ }
+ }
+ ..strongMode = strong;
+ if (strong) {
+ options.sdkSummary =
+ computePlatformBinariesLocation().resolve("vm_platform_strong.dill");
+ } else {
+ options.sdkSummary =
+ computePlatformBinariesLocation().resolve("vm_platform.dill");
+ }
return options;
}
Future<bool> normalCompile(Uri input, Uri output,
{CompilerOptions options}) async {
- options ??= getOptions();
+ options ??= getOptions(false);
IncrementalCompiler compiler = new IncrementalKernelGenerator(options, input);
- var y = await compiler.computeDelta();
- await writeProgramToFile(y, output);
- return compiler.bootstrapSuccess;
+ var program = await compiler.computeDelta();
+ throwOnEmptyMixinBodies(program);
+ await writeProgramToFile(program, output);
+ return compiler.initializedFromDill;
+}
+
+void throwOnEmptyMixinBodies(Program program) {
+ int empty = countEmptyMixinBodies(program);
+ if (empty != 0) {
+ throw "Expected 0 empty bodies in mixins, but found $empty";
+ }
+}
+
+int countEmptyMixinBodies(Program program) {
+ int empty = 0;
+ for (Library lib in program.libraries) {
+ for (Class c in lib.classes) {
+ if (c.isSyntheticMixinImplementation) {
+ // Assume mixin
+ for (Procedure p in c.procedures) {
+ if (p.function.body is EmptyStatement) {
+ empty++;
+ }
+ }
+ }
+ }
+ }
+ return empty;
}
Future<bool> bootstrapCompile(
Uri input, Uri output, Uri bootstrapWith, List<Uri> invalidateUris,
{bool performSizeTests: true, CompilerOptions options}) async {
- options ??= getOptions();
+ options ??= getOptions(false);
IncrementalCompiler compiler =
new IncrementalKernelGenerator(options, input, bootstrapWith);
for (Uri invalidateUri in invalidateUris) {
compiler.invalidate(invalidateUri);
}
var bootstrappedProgram = await compiler.computeDelta();
- bool result = compiler.bootstrapSuccess;
+ throwOnEmptyMixinBodies(bootstrappedProgram);
+ bool result = compiler.initializedFromDill;
await writeProgramToFile(bootstrappedProgram, output);
for (Uri invalidateUri in invalidateUris) {
compiler.invalidate(invalidateUri);
}
var partialProgram = await compiler.computeDelta();
+ throwOnEmptyMixinBodies(partialProgram);
var emptyProgram = await compiler.computeDelta();
+ throwOnEmptyMixinBodies(emptyProgram);
var fullLibUris =
bootstrappedProgram.libraries.map((lib) => lib.importUri).toList();
diff --git a/pkg/front_end/tool/_fasta/command_line.dart b/pkg/front_end/tool/_fasta/command_line.dart
index f3404a3..82caa0e 100644
--- a/pkg/front_end/tool/_fasta/command_line.dart
+++ b/pkg/front_end/tool/_fasta/command_line.dart
@@ -7,7 +7,9 @@
import 'dart:io' show exit;
import 'package:front_end/src/api_prototype/compiler_options.dart'
- show CompilerOptions;
+ show CompilerOptions, ProblemHandler;
+
+import 'package:front_end/src/api_prototype/file_system.dart' show FileSystem;
import 'package:front_end/src/base/processed_options.dart'
show ProcessedOptions;
@@ -226,7 +228,9 @@
String programName,
ParsedArguments parsedArguments,
bool areRestArgumentsInputs,
- bool verbose) {
+ bool verbose,
+ FileSystem fileSystem,
+ ProblemHandler problemHandler) {
final Map<String, dynamic> options = parsedArguments.options;
final List<String> arguments = parsedArguments.arguments;
@@ -295,6 +299,8 @@
return new ProcessedOptions(
new CompilerOptions()
+ ..fileSystem = fileSystem
+ ..onProblem = problemHandler
..sdkSummary = options["--platform"]
..librariesSpecificationUri =
Uri.base.resolveUri(new Uri.file(arguments[1]))
@@ -329,6 +335,8 @@
computePlatformBinariesLocation().resolve("vm_platform.dill"));
CompilerOptions compilerOptions = new CompilerOptions()
+ ..fileSystem = fileSystem
+ ..onProblem = problemHandler
..compileSdk = compileSdk
..sdkRoot = sdk
..sdkSummary = platform
@@ -356,7 +364,10 @@
String programName,
List<String> arguments,
bool areRestArgumentsInputs,
- dynamic f(CompilerContext context, List<String> restArguments)) {
+ dynamic f(CompilerContext context, List<String> restArguments),
+ {FileSystem fileSystem,
+ ProblemHandler problemHandler}) {
+ fileSystem ??= new CompilerOptions().fileSystem;
bool verbose = false;
for (String argument in arguments) {
if (argument == "--") break;
@@ -370,8 +381,8 @@
CommandLineProblem problem;
try {
parsedArguments = ParsedArguments.parse(arguments, optionSpecification);
- options = analyzeCommandLine(
- programName, parsedArguments, areRestArgumentsInputs, verbose);
+ options = analyzeCommandLine(programName, parsedArguments,
+ areRestArgumentsInputs, verbose, fileSystem, problemHandler);
} on CommandLineProblem catch (e) {
options = new ProcessedOptions(new CompilerOptions());
problem = e;
diff --git a/pkg/front_end/tool/_fasta/entry_points.dart b/pkg/front_end/tool/_fasta/entry_points.dart
index 2555edb..a68f9fd 100644
--- a/pkg/front_end/tool/_fasta/entry_points.dart
+++ b/pkg/front_end/tool/_fasta/entry_points.dart
@@ -17,6 +17,11 @@
import 'package:kernel/target/targets.dart' show TargetFlags, targets;
+import 'package:front_end/src/api_prototype/compiler_options.dart'
+ show ProblemHandler;
+
+import 'package:front_end/src/api_prototype/file_system.dart' show FileSystem;
+
import 'package:front_end/src/base/processed_options.dart'
show ProcessedOptions;
@@ -86,16 +91,24 @@
class BatchCompiler {
final Stream lines;
+ final FileSystem fileSystem;
+
+ final ProblemHandler problemHandler;
+
Uri platformUri;
Program platformComponent;
- BatchCompiler(this.lines);
+ BatchCompiler(this.lines)
+ : fileSystem = null,
+ problemHandler = null;
+
+ BatchCompiler.forTesting(this.fileSystem, this.problemHandler) : lines = null;
run() async {
await for (String line in lines) {
try {
- if (await batchCompile(line)) {
+ if (await batchCompile(JSON.decode(line))) {
stdout.writeln(">>> TEST OK");
} else {
stdout.writeln(">>> TEST FAIL");
@@ -111,8 +124,7 @@
}
}
- Future<bool> batchCompile(String line) async {
- List<String> arguments = new List<String>.from(JSON.decode(line));
+ Future<bool> batchCompile(List<String> arguments) async {
try {
return await withGlobalOptions("compile", arguments, true,
(CompilerContext c, _) async {
@@ -120,7 +132,7 @@
bool verbose = options.verbose;
Ticker ticker = new Ticker(isVerbose: verbose);
if (verbose) {
- print("Compiling directly to Kernel: $line");
+ print("Compiling directly to Kernel: ${arguments.join(' ')}");
}
if (platformComponent == null || platformUri != options.sdkSummary) {
platformUri = options.sdkSummary;
@@ -140,7 +152,7 @@
}
root.unbindAll();
return c.errors.isEmpty;
- });
+ }, fileSystem: fileSystem, problemHandler: problemHandler);
} on deprecated_InputError catch (e) {
CompilerContext.runWithDefaultOptions(
(c) => c.report(deprecated_InputError.toMessage(e), Severity.error));
@@ -234,7 +246,6 @@
Future<Uri> compile({bool sansPlatform: false}) async {
KernelTarget kernelTarget = await buildOutline();
- if (exitCode != 0) return null;
Uri uri = c.options.output;
Program program = await kernelTarget.buildProgram(verify: c.options.verify);
if (c.options.debugDump) {
@@ -253,8 +264,10 @@
}
program = userCode;
}
- await writeProgramToFile(program, uri);
- ticker.logMs("Wrote program to ${uri.toFilePath()}");
+ if (uri.scheme == "file") {
+ await writeProgramToFile(program, uri);
+ ticker.logMs("Wrote program to ${uri.toFilePath()}");
+ }
return uri;
}
}
diff --git a/pkg/front_end/tool/_fasta/generate_messages.dart b/pkg/front_end/tool/_fasta/generate_messages.dart
index 83d821c..0ec9a18 100644
--- a/pkg/front_end/tool/_fasta/generate_messages.dart
+++ b/pkg/front_end/tool/_fasta/generate_messages.dart
@@ -10,14 +10,7 @@
import 'package:dart_style/dart_style.dart' show DartFormatter;
-Map<String, String> severityEnumNames = <String, String>{
- 'NIT': 'nit',
- 'WARNING': 'warning',
- 'ERROR': 'error',
- 'ERROR_LEGACY_WARNING': 'errorLegacyWarning',
- 'INTERNAL_PROBLEM': 'internalProblem',
- 'CONTEXT': 'context',
-};
+import "package:front_end/src/fasta/severity.dart" show severityEnumNames;
main(List<String> arguments) async {
var port = new ReceivePort();
diff --git a/pkg/js_ast/lib/src/template.dart b/pkg/js_ast/lib/src/template.dart
index e85f33a..1c09529 100644
--- a/pkg/js_ast/lib/src/template.dart
+++ b/pkg/js_ast/lib/src/template.dart
@@ -103,7 +103,8 @@
if (arguments is List) {
if (arguments.length != positionalArgumentCount) {
throw 'Wrong number of template arguments, given ${arguments.length}, '
- 'expected $positionalArgumentCount';
+ 'expected $positionalArgumentCount'
+ ', source: "$source"';
}
return instantiator(arguments);
}
diff --git a/pkg/kernel/lib/binary/ast_from_binary.dart b/pkg/kernel/lib/binary/ast_from_binary.dart
index 4782a7d..b0aa91d 100644
--- a/pkg/kernel/lib/binary/ast_from_binary.dart
+++ b/pkg/kernel/lib/binary/ast_from_binary.dart
@@ -3,7 +3,6 @@
// BSD-style license that can be found in the LICENSE file.
library kernel.ast_from_binary;
-// ignore: UNDEFINED_HIDDEN_NAME
import 'dart:core' hide MapEntry;
import 'dart:convert';
import 'dart:typed_data';
diff --git a/pkg/kernel/lib/binary/ast_to_binary.dart b/pkg/kernel/lib/binary/ast_to_binary.dart
index 1cb3111..fb19994 100644
--- a/pkg/kernel/lib/binary/ast_to_binary.dart
+++ b/pkg/kernel/lib/binary/ast_to_binary.dart
@@ -3,7 +3,6 @@
// BSD-style license that can be found in the LICENSE file.
library kernel.ast_to_binary;
-// ignore: UNDEFINED_HIDDEN_NAME
import 'dart:core' hide MapEntry;
import '../ast.dart';
diff --git a/pkg/kernel/lib/clone.dart b/pkg/kernel/lib/clone.dart
index 78a59c6..0d4982d 100644
--- a/pkg/kernel/lib/clone.dart
+++ b/pkg/kernel/lib/clone.dart
@@ -3,7 +3,6 @@
// BSD-style license that can be found in the LICENSE file.
library kernel.clone;
-// ignore: UNDEFINED_HIDDEN_NAME
import 'dart:core' hide MapEntry;
import 'ast.dart';
diff --git a/pkg/kernel/lib/target/vm.dart b/pkg/kernel/lib/target/vm.dart
index 5079c65..6090179 100644
--- a/pkg/kernel/lib/target/vm.dart
+++ b/pkg/kernel/lib/target/vm.dart
@@ -3,7 +3,6 @@
// BSD-style license that can be found in the LICENSE file.
library kernel.target.vm;
-// ignore: UNDEFINED_HIDDEN_NAME
import 'dart:core' hide MapEntry;
import '../ast.dart';
diff --git a/pkg/kernel/lib/text/ast_to_text.dart b/pkg/kernel/lib/text/ast_to_text.dart
index 4ad291a..0db4862 100644
--- a/pkg/kernel/lib/text/ast_to_text.dart
+++ b/pkg/kernel/lib/text/ast_to_text.dart
@@ -3,7 +3,6 @@
// BSD-style license that can be found in the LICENSE file.
library kernel.ast_to_text;
-// ignore: UNDEFINED_HIDDEN_NAME
import 'dart:core' hide MapEntry;
import '../ast.dart';
diff --git a/pkg/kernel/lib/visitor.dart b/pkg/kernel/lib/visitor.dart
index 0eb36d1..5890d5f 100644
--- a/pkg/kernel/lib/visitor.dart
+++ b/pkg/kernel/lib/visitor.dart
@@ -3,7 +3,6 @@
// BSD-style license that can be found in the LICENSE file.
library kernel.ast.visitor;
-// ignore: UNDEFINED_HIDDEN_NAME
import 'dart:core' hide MapEntry;
import 'ast.dart';
diff --git a/pkg/pkg.status b/pkg/pkg.status
index 1fbd076..7c5d041 100644
--- a/pkg/pkg.status
+++ b/pkg/pkg.status
@@ -119,6 +119,7 @@
front_end/test/fasta/ast_builder_test: Pass, Slow, Timeout
front_end/test/fasta/bootstrap_test: Skip # Issue 31902
front_end/test/fasta/strong_test: Pass, Slow, Timeout
+front_end/test/incremental_load_from_dill_test: Pass, Slow
front_end/test/src/incremental/hot_reload_e2e_test: Skip # Issue 31901
front_end/test/whole_program_test: Skip # Issue 31902
diff --git a/pkg/vm/bin/frontend_server_starter.dart b/pkg/vm/bin/frontend_server_starter.dart
new file mode 100644
index 0000000..229410b
--- /dev/null
+++ b/pkg/vm/bin/frontend_server_starter.dart
@@ -0,0 +1,7 @@
+library frontend_server;
+
+import '../lib/frontend_server.dart';
+
+void main(List<String> args) {
+ starter(args);
+}
diff --git a/pkg/vm/lib/frontend_server.dart b/pkg/vm/lib/frontend_server.dart
new file mode 100644
index 0000000..4abf53c
--- /dev/null
+++ b/pkg/vm/lib/frontend_server.dart
@@ -0,0 +1,484 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+library frontend_server;
+
+import 'dart:async';
+import 'dart:convert';
+import 'dart:io' hide FileSystemEntity;
+
+import 'package:args/args.dart';
+// front_end/src imports below that require lint `ignore_for_file`
+// are a temporary state of things until frontend team builds better api
+// that would replace api used below. This api was made private in
+// an effort to discourage further use.
+// ignore_for_file: implementation_imports
+import 'package:front_end/src/api_prototype/compiler_options.dart';
+import 'package:front_end/src/api_prototype/file_system.dart'
+ show FileSystemEntity;
+import 'package:kernel/ast.dart';
+import 'package:kernel/binary/ast_to_binary.dart';
+import 'package:kernel/binary/limited_ast_to_binary.dart';
+import 'package:kernel/kernel.dart' show Program, loadProgramFromBytes;
+import 'package:kernel/target/targets.dart';
+import 'package:path/path.dart' as path;
+import 'package:usage/uuid/uuid.dart';
+import 'package:vm/incremental_compiler.dart' show IncrementalCompiler;
+import 'package:vm/kernel_front_end.dart' show compileToKernel;
+
+ArgParser argParser = new ArgParser(allowTrailingOptions: true)
+ ..addFlag('train',
+ help: 'Run through sample command line to produce snapshot',
+ negatable: false)
+ ..addFlag('incremental',
+ help: 'Run compiler in incremental mode', defaultsTo: false)
+ ..addOption('sdk-root',
+ help: 'Path to sdk root',
+ defaultsTo: '../../out/android_debug/flutter_patched_sdk')
+ ..addOption('platform', help: 'Platform kernel filename')
+ ..addFlag('aot',
+ help: 'Run compiler in AOT mode (enables whole-program transformations)',
+ defaultsTo: false)
+ ..addFlag('strong',
+ help: 'Run compiler in strong mode (uses strong mode semantics)',
+ defaultsTo: false)
+ ..addFlag('tfa',
+ help:
+ 'Enable global type flow analysis and related transformations in AOT mode.',
+ defaultsTo: false)
+ ..addOption('entry-points',
+ help: 'Path to JSON file with the list of entry points',
+ allowMultiple: true)
+ ..addFlag('link-platform',
+ help:
+ 'When in batch mode, link platform kernel file into result kernel file.'
+ ' Intended use is to satisfy different loading strategies implemented'
+ ' by gen_snapshot(which needs platform embedded) vs'
+ ' Flutter engine(which does not)',
+ defaultsTo: true)
+ ..addOption('output-dill',
+ help: 'Output path for the generated dill', defaultsTo: null)
+ ..addOption('output-incremental-dill',
+ help: 'Output path for the generated incremental dill', defaultsTo: null)
+ ..addOption('depfile',
+ help: 'Path to output Ninja depfile. Only used in batch mode.')
+ ..addOption('packages',
+ help: '.packages file to use for compilation', defaultsTo: null)
+ ..addOption('target',
+ help: 'Target model that determines what core libraries are available',
+ allowed: <String>['vm', 'flutter'],
+ defaultsTo: 'vm');
+
+String usage = '''
+Usage: server [options] [input.dart]
+
+If input dart source code is provided on the command line, then the server
+compiles it, generates dill file and exits.
+If no input dart source is provided on the command line, server waits for
+instructions from stdin.
+
+Instructions:
+- compile <input.dart>
+- recompile [<input.dart>] <boundary-key>
+<path/to/updated/file1.dart>
+<path/to/updated/file2.dart>
+...
+<boundary-key>
+- accept
+- quit
+
+Output:
+- result <boundary-key>
+<compiler output>
+<boundary-key> [<output.dill>]
+
+Options:
+${argParser.usage}
+''';
+
+enum _State { READY_FOR_INSTRUCTION, RECOMPILE_LIST }
+
+/// Actions that every compiler should implement.
+abstract class CompilerInterface {
+ /// Compile given Dart program identified by `filename` with given list of
+ /// `options`. When `generator` parameter is omitted, new instance of
+ /// `IncrementalKernelGenerator` is created by this method. Main use for this
+ /// parameter is for mocking in tests.
+ Future<Null> compile(
+ String filename,
+ ArgResults options, {
+ IncrementalCompiler generator,
+ });
+
+ /// Assuming some Dart program was previously compiled, recompile it again
+ /// taking into account some changed(invalidated) sources.
+ Future<Null> recompileDelta({String filename});
+
+ /// Accept results of previous compilation so that next recompilation cycle
+ /// won't recompile sources that were previously reported as changed.
+ void acceptLastDelta();
+
+ /// This let's compiler know that source file identifed by `uri` was changed.
+ void invalidate(Uri uri);
+
+ /// Resets incremental compiler accept/reject status so that next time
+ /// recompile is requested, complete kernel file is produced.
+ void resetIncrementalCompiler();
+}
+
+abstract class ProgramTransformer {
+ void transform(Program program);
+}
+
+/// Class that for test mocking purposes encapsulates creation of [BinaryPrinter].
+class BinaryPrinterFactory {
+ /// Creates new [BinaryPrinter] to write to [targetSink].
+ BinaryPrinter newBinaryPrinter(IOSink targetSink) {
+ return new LimitedBinaryPrinter(targetSink, (_) => true /* predicate */,
+ false /* excludeUriToSource */);
+ }
+}
+
+class FrontendCompiler implements CompilerInterface {
+ FrontendCompiler(this._outputStream,
+ {this.printerFactory, this.transformer}) {
+ _outputStream ??= stdout;
+ printerFactory ??= new BinaryPrinterFactory();
+ }
+
+ StringSink _outputStream;
+ BinaryPrinterFactory printerFactory;
+
+ CompilerOptions _compilerOptions;
+ Uri _mainSource;
+ ArgResults _options;
+
+ IncrementalCompiler _generator;
+ String _kernelBinaryFilename;
+ String _kernelBinaryFilenameIncremental;
+ String _kernelBinaryFilenameFull;
+
+ final ProgramTransformer transformer;
+
+ void setMainSourceFilename(String filename) {
+ final Uri filenameUri = Uri.base.resolveUri(new Uri.file(filename));
+ _mainSource = filenameUri;
+ }
+
+ @override
+ Future<Null> compile(
+ String filename,
+ ArgResults options, {
+ IncrementalCompiler generator,
+ }) async {
+ _options = options;
+ setMainSourceFilename(filename);
+ _kernelBinaryFilenameFull = _options['output-dill'] ?? '$filename.dill';
+ _kernelBinaryFilenameIncremental = _options['output-incremental-dill'] ??
+ (_options['output-dill'] != null
+ ? '${_options["output-dill"]}.incremental.dill'
+ : '$filename.incremental.dill');
+ _kernelBinaryFilename = _kernelBinaryFilenameFull;
+ final String boundaryKey = new Uuid().generateV4();
+ _outputStream.writeln('result $boundaryKey');
+ final Uri sdkRoot = _ensureFolderPath(options['sdk-root']);
+ final String platformKernelDill = options['platform'] ??
+ (options['strong'] ? 'platform_strong.dill' : 'platform.dill');
+ final CompilerOptions compilerOptions = new CompilerOptions()
+ ..sdkRoot = sdkRoot
+ ..packagesFileUri = options['packages'] != null
+ ? Uri.base.resolveUri(new Uri.file(options['packages']))
+ : null
+ ..strongMode = options['strong']
+ ..sdkSummary = sdkRoot.resolve(platformKernelDill)
+ ..reportMessages = true;
+
+ final TargetFlags targetFlags =
+ new TargetFlags(strongMode: options['strong']);
+ compilerOptions.target = getTarget(options['target'], targetFlags);
+
+ Program program;
+ if (options['incremental']) {
+ _compilerOptions = compilerOptions;
+ _generator = generator ??
+ _createGenerator(new Uri.file(_kernelBinaryFilenameFull));
+ await invalidateIfBootstrapping();
+ program = await _runWithPrintRedirection(() => _generator.compile());
+ } else {
+ if (options['link-platform']) {
+ // TODO(aam): Remove linkedDependencies once platform is directly embedded
+ // into VM snapshot and http://dartbug.com/30111 is fixed.
+ compilerOptions.linkedDependencies = <Uri>[
+ sdkRoot.resolve(platformKernelDill)
+ ];
+ }
+ program = await _runWithPrintRedirection(() => compileToKernel(
+ _mainSource, compilerOptions,
+ aot: options['aot'],
+ useGlobalTypeFlowAnalysis: options['tfa'],
+ entryPoints: options['entry-points']));
+ }
+ if (program != null) {
+ if (transformer != null) {
+ transformer.transform(program);
+ }
+
+ final IOSink sink = new File(_kernelBinaryFilename).openWrite();
+ final BinaryPrinter printer = printerFactory.newBinaryPrinter(sink);
+ printer.writeProgramFile(program);
+ await sink.close();
+ _outputStream.writeln('$boundaryKey $_kernelBinaryFilename');
+
+ final String depfile = options['depfile'];
+ if (depfile != null) {
+ await _writeDepfile(program, _kernelBinaryFilename, depfile);
+ }
+
+ _kernelBinaryFilename = _kernelBinaryFilenameIncremental;
+ } else
+ _outputStream.writeln(boundaryKey);
+ return null;
+ }
+
+ Future<Null> invalidateIfBootstrapping() async {
+ if (_kernelBinaryFilename != _kernelBinaryFilenameFull) return null;
+
+ try {
+ final File f = new File(_kernelBinaryFilenameFull);
+ if (!f.existsSync()) return null;
+
+ final Program program = loadProgramFromBytes(f.readAsBytesSync());
+ for (Uri uri in program.uriToSource.keys) {
+ if ('$uri' == '') continue;
+
+ final List<int> oldBytes = program.uriToSource[uri].source;
+ final FileSystemEntity entity =
+ _compilerOptions.fileSystem.entityForUri(uri);
+ if (!await entity.exists()) {
+ _generator.invalidate(uri);
+ continue;
+ }
+ final List<int> newBytes = await entity.readAsBytes();
+ if (oldBytes.length != newBytes.length) {
+ _generator.invalidate(uri);
+ continue;
+ }
+ for (int i = 0; i < oldBytes.length; ++i) {
+ if (oldBytes[i] != newBytes[i]) {
+ _generator.invalidate(uri);
+ continue;
+ }
+ }
+ }
+ } catch (e) {
+ // If there's a failure in the above block we might not have invalidated
+ // correctly. Create a new generator that doesn't bootstrap to avoid missing
+ // any changes.
+ _generator = _createGenerator(null);
+ }
+ }
+
+ @override
+ Future<Null> recompileDelta({String filename}) async {
+ final String boundaryKey = new Uuid().generateV4();
+ _outputStream.writeln('result $boundaryKey');
+ await invalidateIfBootstrapping();
+ if (filename != null) {
+ setMainSourceFilename(filename);
+ }
+ final Program deltaProgram =
+ await _generator.compile(entryPoint: _mainSource);
+
+ if (deltaProgram != null && transformer != null) {
+ transformer.transform(deltaProgram);
+ }
+
+ final IOSink sink = new File(_kernelBinaryFilename).openWrite();
+ final BinaryPrinter printer = printerFactory.newBinaryPrinter(sink);
+ printer.writeProgramFile(deltaProgram);
+ await sink.close();
+ _outputStream.writeln('$boundaryKey $_kernelBinaryFilename');
+ _kernelBinaryFilename = _kernelBinaryFilenameIncremental;
+ return null;
+ }
+
+ @override
+ void acceptLastDelta() {
+ _generator.accept();
+ }
+
+ @override
+ void invalidate(Uri uri) {
+ _generator.invalidate(uri);
+ }
+
+ @override
+ void resetIncrementalCompiler() {
+ _generator = _createGenerator(new Uri.file(_kernelBinaryFilenameFull));
+ _kernelBinaryFilename = _kernelBinaryFilenameFull;
+ }
+
+ IncrementalCompiler _createGenerator(Uri bootstrapDill) {
+ return new IncrementalCompiler(_compilerOptions, _mainSource,
+ bootstrapDill: bootstrapDill);
+ }
+
+ Uri _ensureFolderPath(String path) {
+ String uriPath = new Uri.file(path).toString();
+ if (!uriPath.endsWith('/')) {
+ uriPath = '$uriPath/';
+ }
+ return Uri.base.resolve(uriPath);
+ }
+
+ /// Runs the given function [f] in a Zone that redirects all prints into
+ /// [_outputStream].
+ Future<T> _runWithPrintRedirection<T>(Future<T> f()) {
+ return runZoned(() => new Future<T>(f),
+ zoneSpecification: new ZoneSpecification(
+ print: (Zone self, ZoneDelegate parent, Zone zone, String line) =>
+ _outputStream.writeln(line)));
+ }
+}
+
+String _escapePath(String path) {
+ return path.replaceAll(r'\', r'\\').replaceAll(r' ', r'\ ');
+}
+
+// https://ninja-build.org/manual.html#_depfile
+void _writeDepfile(Program program, String output, String depfile) async {
+ final IOSink file = new File(depfile).openWrite();
+ file.write(_escapePath(output));
+ file.write(':');
+ for (Uri dep in program.uriToSource.keys) {
+ file.write(' ');
+ file.write(_escapePath(dep.toFilePath()));
+ }
+ file.write('\n');
+ await file.close();
+}
+
+/// Listens for the compilation commands on [input] stream.
+/// This supports "interactive" recompilation mode of execution.
+void listenAndCompile(CompilerInterface compiler, Stream<List<int>> input,
+ ArgResults options, void quit(),
+ {IncrementalCompiler generator}) {
+ _State state = _State.READY_FOR_INSTRUCTION;
+ String boundaryKey;
+ String recompileFilename;
+ input
+ .transform(UTF8.decoder)
+ .transform(const LineSplitter())
+ .listen((String string) async {
+ switch (state) {
+ case _State.READY_FOR_INSTRUCTION:
+ const String COMPILE_INSTRUCTION_SPACE = 'compile ';
+ const String RECOMPILE_INSTRUCTION_SPACE = 'recompile ';
+ if (string.startsWith(COMPILE_INSTRUCTION_SPACE)) {
+ final String filename =
+ string.substring(COMPILE_INSTRUCTION_SPACE.length);
+ await compiler.compile(filename, options, generator: generator);
+ } else if (string.startsWith(RECOMPILE_INSTRUCTION_SPACE)) {
+ // 'recompile [<filename>] <boundarykey>'
+ // where <boundarykey> can't have spaces
+ final String remainder =
+ string.substring(RECOMPILE_INSTRUCTION_SPACE.length);
+ final int spaceDelim = remainder.lastIndexOf(' ');
+ if (spaceDelim > -1) {
+ recompileFilename = remainder.substring(0, spaceDelim);
+ boundaryKey = remainder.substring(spaceDelim + 1);
+ } else {
+ boundaryKey = remainder;
+ }
+ state = _State.RECOMPILE_LIST;
+ } else if (string == 'accept') {
+ compiler.acceptLastDelta();
+ } else if (string == 'reset') {
+ compiler.resetIncrementalCompiler();
+ } else if (string == 'quit') {
+ quit();
+ }
+ break;
+ case _State.RECOMPILE_LIST:
+ if (string == boundaryKey) {
+ compiler.recompileDelta(filename: recompileFilename);
+ state = _State.READY_FOR_INSTRUCTION;
+ } else
+ compiler.invalidate(Uri.base.resolve(string));
+ break;
+ }
+ });
+}
+
+/// Entry point for this module, that creates `_FrontendCompiler` instance and
+/// processes user input.
+/// `compiler` is an optional parameter so it can be replaced with mocked
+/// version for testing.
+Future<int> starter(
+ List<String> args, {
+ CompilerInterface compiler,
+ Stream<List<int>> input,
+ StringSink output,
+ IncrementalCompiler generator,
+ BinaryPrinterFactory binaryPrinterFactory,
+}) async {
+ ArgResults options;
+ try {
+ options = argParser.parse(args);
+ } catch (error) {
+ print('ERROR: $error\n');
+ print(usage);
+ return 1;
+ }
+
+ if (options['train']) {
+ final String sdkRoot = options['sdk-root'];
+ final String platform = options['platform'];
+ final Directory temp =
+ Directory.systemTemp.createTempSync('train_frontend_server');
+ try {
+ final String outputTrainingDill = path.join(temp.path, 'app.dill');
+ final List<String> args = <String>[
+ '--incremental',
+ '--sdk-root=$sdkRoot',
+ '--output-dill=$outputTrainingDill',
+ ];
+ if (platform != null) {
+ args.add('--platform=${new Uri.file(platform)}');
+ }
+ options = argParser.parse(args);
+ compiler ??=
+ new FrontendCompiler(output, printerFactory: binaryPrinterFactory);
+
+ await compiler.compile(Platform.script.toFilePath(), options,
+ generator: generator);
+ compiler.acceptLastDelta();
+ await compiler.recompileDelta();
+ compiler.acceptLastDelta();
+ compiler.resetIncrementalCompiler();
+ await compiler.recompileDelta();
+ compiler.acceptLastDelta();
+ await compiler.recompileDelta();
+ compiler.acceptLastDelta();
+ return 0;
+ } finally {
+ temp.deleteSync(recursive: true);
+ }
+ }
+
+ compiler ??= new FrontendCompiler(
+ output,
+ printerFactory: binaryPrinterFactory,
+ );
+
+ if (options.rest.isNotEmpty) {
+ await compiler.compile(options.rest[0], options, generator: generator);
+ return 0;
+ }
+
+ listenAndCompile(compiler, input ?? stdin, options, () {
+ exit(0);
+ }, generator: generator);
+ return 0;
+}
diff --git a/pkg/vm/test/frontend_server_test.dart b/pkg/vm/test/frontend_server_test.dart
new file mode 100644
index 0000000..481eb0c
--- /dev/null
+++ b/pkg/vm/test/frontend_server_test.dart
@@ -0,0 +1,540 @@
+import 'dart:async';
+import 'dart:convert';
+import 'dart:io';
+import 'dart:isolate';
+
+import 'package:args/src/arg_results.dart';
+import 'package:kernel/binary/ast_to_binary.dart';
+import 'package:kernel/ast.dart' show Program;
+import 'package:mockito/mockito.dart';
+import 'package:test/test.dart';
+import 'package:vm/incremental_compiler.dart';
+
+import '../lib/frontend_server.dart';
+
+class _MockedCompiler extends Mock implements CompilerInterface {}
+
+class _MockedIncrementalCompiler extends Mock implements IncrementalCompiler {}
+
+class _MockedBinaryPrinterFactory extends Mock implements BinaryPrinterFactory {
+}
+
+class _MockedBinaryPrinter extends Mock implements BinaryPrinter {}
+
+Future<int> main() async {
+ group('basic', () {
+ final CompilerInterface compiler = new _MockedCompiler();
+
+ test('train with mocked compiler completes', () async {
+ expect(await starter(<String>['--train'], compiler: compiler), equals(0));
+ });
+ });
+
+ group('batch compile with mocked compiler', () {
+ final CompilerInterface compiler = new _MockedCompiler();
+
+ test('compile from command line', () async {
+ final List<String> args = <String>[
+ 'server.dart',
+ '--sdk-root',
+ 'sdkroot',
+ ];
+ final int exitcode = await starter(args, compiler: compiler);
+ expect(exitcode, equals(0));
+ final List<ArgResults> capturedArgs = verify(compiler.compile(
+ argThat(equals('server.dart')),
+ captureAny,
+ generator: any,
+ ))
+ .captured;
+ expect(capturedArgs.single['sdk-root'], equals('sdkroot'));
+ expect(capturedArgs.single['strong'], equals(false));
+ });
+
+ test('compile from command line (strong mode)', () async {
+ final List<String> args = <String>[
+ 'server.dart',
+ '--sdk-root',
+ 'sdkroot',
+ '--strong',
+ ];
+ final int exitcode = await starter(args, compiler: compiler);
+ expect(exitcode, equals(0));
+ final List<ArgResults> capturedArgs = verify(compiler.compile(
+ argThat(equals('server.dart')),
+ captureAny,
+ generator: any,
+ ))
+ .captured;
+ expect(capturedArgs.single['sdk-root'], equals('sdkroot'));
+ expect(capturedArgs.single['strong'], equals(true));
+ });
+
+ test('compile from command line with link platform', () async {
+ final List<String> args = <String>[
+ 'server.dart',
+ '--sdk-root',
+ 'sdkroot',
+ '--link-platform',
+ ];
+ final int exitcode = await starter(args, compiler: compiler);
+ expect(exitcode, equals(0));
+ final List<ArgResults> capturedArgs = verify(compiler.compile(
+ argThat(equals('server.dart')),
+ captureAny,
+ generator: any,
+ ))
+ .captured;
+ expect(capturedArgs.single['sdk-root'], equals('sdkroot'));
+ expect(capturedArgs.single['link-platform'], equals(true));
+ expect(capturedArgs.single['strong'], equals(false));
+ });
+ });
+
+ group('interactive compile with mocked compiler', () {
+ final CompilerInterface compiler = new _MockedCompiler();
+
+ final List<String> args = <String>[
+ '--sdk-root',
+ 'sdkroot',
+ ];
+
+ test('compile one file', () async {
+ final StreamController<List<int>> inputStreamController =
+ new StreamController<List<int>>();
+ final ReceivePort compileCalled = new ReceivePort();
+ when(compiler.compile(any, any, generator: any))
+ .thenAnswer((Invocation invocation) {
+ expect(invocation.positionalArguments[0], equals('server.dart'));
+ expect(
+ invocation.positionalArguments[1]['sdk-root'], equals('sdkroot'));
+ expect(invocation.positionalArguments[1]['strong'], equals(false));
+ compileCalled.sendPort.send(true);
+ });
+
+ final int exitcode = await starter(
+ args,
+ compiler: compiler,
+ input: inputStreamController.stream,
+ );
+ expect(exitcode, equals(0));
+ inputStreamController.add('compile server.dart\n'.codeUnits);
+ await compileCalled.first;
+ inputStreamController.close();
+ });
+ });
+
+ group('interactive compile with mocked compiler', () {
+ final CompilerInterface compiler = new _MockedCompiler();
+
+ final List<String> args = <String>[
+ '--sdk-root',
+ 'sdkroot',
+ ];
+ final List<String> strongArgs = <String>[
+ '--sdk-root',
+ 'sdkroot',
+ '--strong',
+ ];
+
+ test('compile one file', () async {
+ final StreamController<List<int>> inputStreamController =
+ new StreamController<List<int>>();
+ final ReceivePort compileCalled = new ReceivePort();
+ when(compiler.compile(any, any, generator: any))
+ .thenAnswer((Invocation invocation) {
+ expect(invocation.positionalArguments[0], equals('server.dart'));
+ expect(
+ invocation.positionalArguments[1]['sdk-root'], equals('sdkroot'));
+ expect(invocation.positionalArguments[1]['strong'], equals(false));
+ compileCalled.sendPort.send(true);
+ });
+
+ final int exitcode = await starter(
+ args,
+ compiler: compiler,
+ input: inputStreamController.stream,
+ );
+ expect(exitcode, equals(0));
+ inputStreamController.add('compile server.dart\n'.codeUnits);
+ await compileCalled.first;
+ inputStreamController.close();
+ });
+
+ test('compile one file (strong mode)', () async {
+ final StreamController<List<int>> inputStreamController =
+ new StreamController<List<int>>();
+ final ReceivePort compileCalled = new ReceivePort();
+ when(compiler.compile(any, any, generator: any))
+ .thenAnswer((Invocation invocation) {
+ expect(invocation.positionalArguments[0], equals('server.dart'));
+ expect(
+ invocation.positionalArguments[1]['sdk-root'], equals('sdkroot'));
+ expect(invocation.positionalArguments[1]['strong'], equals(true));
+ compileCalled.sendPort.send(true);
+ });
+
+ final int exitcode = await starter(
+ strongArgs,
+ compiler: compiler,
+ input: inputStreamController.stream,
+ );
+ expect(exitcode, equals(0));
+ inputStreamController.add('compile server.dart\n'.codeUnits);
+ await compileCalled.first;
+ inputStreamController.close();
+ });
+
+ test('compile few files', () async {
+ final StreamController<List<int>> streamController =
+ new StreamController<List<int>>();
+ final ReceivePort compileCalled = new ReceivePort();
+ int counter = 1;
+ when(compiler.compile(any, any, generator: any))
+ .thenAnswer((Invocation invocation) {
+ expect(invocation.positionalArguments[0],
+ equals('server${counter++}.dart'));
+ expect(
+ invocation.positionalArguments[1]['sdk-root'], equals('sdkroot'));
+ expect(invocation.positionalArguments[1]['strong'], equals(false));
+ compileCalled.sendPort.send(true);
+ });
+
+ final int exitcode = await starter(
+ args,
+ compiler: compiler,
+ input: streamController.stream,
+ );
+ expect(exitcode, equals(0));
+ streamController.add('compile server1.dart\n'.codeUnits);
+ streamController.add('compile server2.dart\n'.codeUnits);
+ await compileCalled.first;
+ streamController.close();
+ });
+ });
+
+ group('interactive incremental compile with mocked compiler', () {
+ final CompilerInterface compiler = new _MockedCompiler();
+
+ final List<String> args = <String>[
+ '--sdk-root',
+ 'sdkroot',
+ '--incremental'
+ ];
+
+ test('recompile few files', () async {
+ final StreamController<List<int>> streamController =
+ new StreamController<List<int>>();
+ final ReceivePort recompileCalled = new ReceivePort();
+
+ when(compiler.recompileDelta(filename: null))
+ .thenAnswer((Invocation invocation) {
+ recompileCalled.sendPort.send(true);
+ });
+ final int exitcode = await starter(
+ args,
+ compiler: compiler,
+ input: streamController.stream,
+ );
+ expect(exitcode, equals(0));
+ streamController
+ .add('recompile abc\nfile1.dart\nfile2.dart\nabc\n'.codeUnits);
+ await recompileCalled.first;
+
+ verifyInOrder(<void>[
+ compiler.invalidate(Uri.base.resolve('file1.dart')),
+ compiler.invalidate(Uri.base.resolve('file2.dart')),
+ await compiler.recompileDelta(filename: null),
+ ]);
+ streamController.close();
+ });
+
+ test('recompile few files with new entrypoint', () async {
+ final StreamController<List<int>> streamController =
+ new StreamController<List<int>>();
+ final ReceivePort recompileCalled = new ReceivePort();
+
+ when(compiler.recompileDelta(filename: 'file2.dart'))
+ .thenAnswer((Invocation invocation) {
+ recompileCalled.sendPort.send(true);
+ });
+ final int exitcode = await starter(
+ args,
+ compiler: compiler,
+ input: streamController.stream,
+ );
+ expect(exitcode, equals(0));
+ streamController.add(
+ 'recompile file2.dart abc\nfile1.dart\nfile2.dart\nabc\n'.codeUnits);
+ await recompileCalled.first;
+
+ verifyInOrder(<void>[
+ compiler.invalidate(Uri.base.resolve('file1.dart')),
+ compiler.invalidate(Uri.base.resolve('file2.dart')),
+ await compiler.recompileDelta(filename: 'file2.dart'),
+ ]);
+ streamController.close();
+ });
+
+ test('accept', () async {
+ final StreamController<List<int>> inputStreamController =
+ new StreamController<List<int>>();
+ final ReceivePort acceptCalled = new ReceivePort();
+ when(compiler.acceptLastDelta()).thenAnswer((Invocation invocation) {
+ acceptCalled.sendPort.send(true);
+ });
+ final int exitcode = await starter(
+ args,
+ compiler: compiler,
+ input: inputStreamController.stream,
+ );
+ expect(exitcode, equals(0));
+ inputStreamController.add('accept\n'.codeUnits);
+ await acceptCalled.first;
+ inputStreamController.close();
+ });
+
+ test('reset', () async {
+ final StreamController<List<int>> inputStreamController =
+ new StreamController<List<int>>();
+ final ReceivePort resetCalled = new ReceivePort();
+ when(compiler.resetIncrementalCompiler())
+ .thenAnswer((Invocation invocation) {
+ resetCalled.sendPort.send(true);
+ });
+ final int exitcode = await starter(
+ args,
+ compiler: compiler,
+ input: inputStreamController.stream,
+ );
+ expect(exitcode, equals(0));
+ inputStreamController.add('reset\n'.codeUnits);
+ await resetCalled.first;
+ inputStreamController.close();
+ });
+
+ test('compile then recompile', () async {
+ final StreamController<List<int>> streamController =
+ new StreamController<List<int>>();
+ final ReceivePort recompileCalled = new ReceivePort();
+
+ when(compiler.recompileDelta(filename: null))
+ .thenAnswer((Invocation invocation) {
+ recompileCalled.sendPort.send(true);
+ });
+ final int exitcode = await starter(
+ args,
+ compiler: compiler,
+ input: streamController.stream,
+ );
+ expect(exitcode, equals(0));
+ streamController.add('compile file1.dart\n'.codeUnits);
+ streamController.add('accept\n'.codeUnits);
+ streamController
+ .add('recompile def\nfile2.dart\nfile3.dart\ndef\n'.codeUnits);
+ await recompileCalled.first;
+
+ verifyInOrder(<void>[
+ await compiler.compile('file1.dart', any, generator: any),
+ compiler.acceptLastDelta(),
+ compiler.invalidate(Uri.base.resolve('file2.dart')),
+ compiler.invalidate(Uri.base.resolve('file3.dart')),
+ await compiler.recompileDelta(filename: null),
+ ]);
+ streamController.close();
+ });
+ });
+
+ group('interactive incremental compile with mocked IKG', () {
+ final List<String> args = <String>[
+ '--sdk-root',
+ 'sdkroot',
+ '--incremental',
+ ];
+
+ test('compile then accept', () async {
+ final StreamController<List<int>> streamController =
+ new StreamController<List<int>>();
+ final StreamController<List<int>> stdoutStreamController =
+ new StreamController<List<int>>();
+ final IOSink ioSink = new IOSink(stdoutStreamController.sink);
+ ReceivePort receivedResult = new ReceivePort();
+
+ String boundaryKey;
+ stdoutStreamController.stream
+ .transform(UTF8.decoder)
+ .transform(const LineSplitter())
+ .listen((String 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)) {
+ boundaryKey = null;
+ receivedResult.sendPort.send(true);
+ }
+ }
+ });
+
+ final _MockedIncrementalCompiler generator =
+ new _MockedIncrementalCompiler();
+ when(generator.compile())
+ .thenAnswer((_) => new Future<Program>.value(new Program()));
+ final _MockedBinaryPrinterFactory printerFactory =
+ new _MockedBinaryPrinterFactory();
+ when(printerFactory.newBinaryPrinter(any))
+ .thenReturn(new _MockedBinaryPrinter());
+ final int exitcode = await starter(
+ args,
+ compiler: null,
+ input: streamController.stream,
+ output: ioSink,
+ generator: generator,
+ binaryPrinterFactory: printerFactory,
+ );
+ expect(exitcode, equals(0));
+
+ streamController.add('compile file1.dart\n'.codeUnits);
+ await receivedResult.first;
+ streamController.add('accept\n'.codeUnits);
+ receivedResult = new ReceivePort();
+ streamController.add('recompile def\nfile1.dart\ndef\n'.codeUnits);
+ await receivedResult.first;
+
+ streamController.close();
+ });
+
+ group('compile with output path', () {
+ final CompilerInterface compiler = new _MockedCompiler();
+
+ test('compile from command line', () async {
+ final List<String> args = <String>[
+ 'server.dart',
+ '--sdk-root',
+ 'sdkroot',
+ '--output-dill',
+ '/foo/bar/server.dart.dill',
+ '--output-incremental-dill',
+ '/foo/bar/server.incremental.dart.dill',
+ ];
+ final int exitcode = await starter(args, compiler: compiler);
+ expect(exitcode, equals(0));
+ final List<ArgResults> capturedArgs = verify(compiler.compile(
+ argThat(equals('server.dart')),
+ captureAny,
+ generator: any,
+ ))
+ .captured;
+ expect(capturedArgs.single['sdk-root'], equals('sdkroot'));
+ expect(capturedArgs.single['strong'], equals(false));
+ });
+ });
+ });
+
+ group('full compiler tests', () {
+ final platformKernel =
+ computePlatformBinariesLocation().resolve('vm_platform_strong.dill');
+ final sdkRoot = computePlatformBinariesLocation();
+
+ Directory tempDir;
+ setUp(() {
+ var systemTempDir = Directory.systemTemp;
+ tempDir = systemTempDir.createTempSync('foo');
+ });
+
+ tearDown(() {
+ tempDir.delete(recursive: true);
+ });
+
+ test('recompile request keeps incremental output dill filename', () async {
+ var file = new File('${tempDir.path}/foo.dart')..createSync();
+ file.writeAsStringSync("main() {}\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>> streamController =
+ 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) {
+ 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.substring(boundaryKey.length + 1));
+ boundaryKey = null;
+ }
+ }
+ });
+ int exitcode =
+ await starter(args, input: streamController.stream, output: ioSink);
+ expect(exitcode, equals(0));
+ streamController.add('compile ${file.path}\n'.codeUnits);
+ int count = 0;
+ Completer<bool> allDone = new Completer<bool>();
+ receivedResults.stream.listen((String outputFilename) {
+ if (count == 0) {
+ // First request is to 'compile', which results in full kernel file.
+ expect(dillFile.existsSync(), equals(true));
+ expect(outputFilename, dillFile.path);
+ count += 1;
+ streamController.add('accept\n'.codeUnits);
+ var file2 = new File('${tempDir.path}/bar.dart')..createSync();
+ file2.writeAsStringSync("main() {}\n");
+ streamController.add('recompile ${file2.path} abc\n'
+ '${file2.path}\n'
+ 'abc\n'
+ .codeUnits);
+ } else {
+ expect(count, 1);
+ // Second request is to 'recompile', which results in incremental
+ // kernel file.
+ var dillIncFile = new File('${dillFile.path}.incremental.dill');
+ expect(outputFilename, dillIncFile.path);
+ expect(dillIncFile.existsSync(), equals(true));
+ allDone.complete(true);
+ }
+ });
+ expect(await allDone.future, true);
+ });
+ });
+ return 0;
+}
+
+/// Computes the location of platform binaries, that is, compiled `.dill` files
+/// of the platform libraries that are used to avoid recompiling those
+/// libraries.
+Uri computePlatformBinariesLocation() {
+ // The directory of the Dart VM executable.
+ Uri vmDirectory = Uri.base
+ .resolveUri(new Uri.file(Platform.resolvedExecutable))
+ .resolve(".");
+ if (vmDirectory.path.endsWith("/bin/")) {
+ // Looks like the VM is in a `/bin/` directory, so this is running from a
+ // built SDK.
+ return vmDirectory.resolve("../lib/_internal/");
+ } else {
+ // We assume this is running from a build directory (for example,
+ // `out/ReleaseX64` or `xcodebuild/ReleaseX64`).
+ return vmDirectory;
+ }
+}
diff --git a/runtime/bin/platform_android.cc b/runtime/bin/platform_android.cc
index 7e3f880..8031f9e 100644
--- a/runtime/bin/platform_android.cc
+++ b/runtime/bin/platform_android.cc
@@ -14,6 +14,7 @@
#include "bin/fdutils.h"
#include "bin/file.h"
+#include "bin/log.h"
namespace dart {
namespace bin {
@@ -24,6 +25,12 @@
char** Platform::argv_ = NULL;
static void segv_handler(int signal, siginfo_t* siginfo, void* context) {
+ Log::PrintErr(
+ "\n===== DART STANDALONE VM CRASH =====\n"
+ "version=%s\n"
+ "si_signo=%s(%d), si_code=%d, si_addr=%p\n",
+ Dart_VersionString(), strsignal(siginfo->si_signo), siginfo->si_signo,
+ siginfo->si_code, siginfo->si_addr);
Dart_DumpNativeStackTrace(context);
abort();
}
@@ -62,7 +69,10 @@
perror("sigaction() failed.");
return false;
}
-
+ if (sigaction(SIGILL, &act, NULL) != 0) {
+ perror("sigaction() failed.");
+ return false;
+ }
return true;
}
diff --git a/runtime/bin/platform_linux.cc b/runtime/bin/platform_linux.cc
index e681f03..0d5d885 100644
--- a/runtime/bin/platform_linux.cc
+++ b/runtime/bin/platform_linux.cc
@@ -14,6 +14,7 @@
#include "bin/fdutils.h"
#include "bin/file.h"
+#include "bin/log.h"
namespace dart {
namespace bin {
@@ -24,6 +25,12 @@
char** Platform::argv_ = NULL;
static void segv_handler(int signal, siginfo_t* siginfo, void* context) {
+ Log::PrintErr(
+ "\n===== DART STANDALONE VM CRASH =====\n"
+ "version=%s\n"
+ "si_signo=%s(%d), si_code=%d, si_addr=%p\n",
+ Dart_VersionString(), strsignal(siginfo->si_signo), siginfo->si_signo,
+ siginfo->si_code, siginfo->si_addr);
Dart_DumpNativeStackTrace(context);
abort();
}
@@ -62,6 +69,10 @@
perror("sigaction() failed.");
return false;
}
+ if (sigaction(SIGILL, &act, NULL) != 0) {
+ perror("sigaction() failed.");
+ return false;
+ }
return true;
}
diff --git a/runtime/bin/platform_macos.cc b/runtime/bin/platform_macos.cc
index e563788..d6544be 100644
--- a/runtime/bin/platform_macos.cc
+++ b/runtime/bin/platform_macos.cc
@@ -22,6 +22,7 @@
#include "bin/fdutils.h"
#include "bin/file.h"
+#include "bin/log.h"
namespace dart {
namespace bin {
@@ -32,6 +33,12 @@
char** Platform::argv_ = NULL;
static void segv_handler(int signal, siginfo_t* siginfo, void* context) {
+ Log::PrintErr(
+ "\n===== DART STANDALONE VM CRASH =====\n"
+ "version=%s\n"
+ "si_signo=%s(%d), si_code=%d, si_addr=%p\n",
+ Dart_VersionString(), strsignal(siginfo->si_signo), siginfo->si_signo,
+ siginfo->si_code, siginfo->si_addr);
Dart_DumpNativeStackTrace(context);
abort();
}
@@ -69,6 +76,10 @@
perror("sigaction() failed.");
return false;
}
+ if (sigaction(SIGILL, &act, NULL) != 0) {
+ perror("sigaction() failed.");
+ return false;
+ }
return true;
}
diff --git a/runtime/bin/platform_win.cc b/runtime/bin/platform_win.cc
index 333d57c..b7a2115 100644
--- a/runtime/bin/platform_win.cc
+++ b/runtime/bin/platform_win.cc
@@ -116,10 +116,19 @@
// https://msdn.microsoft.com/en-us/library/windows/desktop/ms681401(v=vs.85).aspx
static LONG WINAPI
DartExceptionHandler(struct _EXCEPTION_POINTERS* ExceptionInfo) {
- if (ExceptionInfo->ExceptionRecord->ExceptionCode ==
- EXCEPTION_ACCESS_VIOLATION) {
- const int kAbortExitCode = 3;
+ if ((ExceptionInfo->ExceptionRecord->ExceptionCode ==
+ EXCEPTION_ACCESS_VIOLATION) ||
+ (ExceptionInfo->ExceptionRecord->ExceptionCode ==
+ EXCEPTION_ILLEGAL_INSTRUCTION)) {
+ Log::PrintErr(
+ "\n===== DART STANDALONE VM CRASH =====\n"
+ "version=%s\n"
+ "ExceptionCode=%d, ExceptionFlags=%d, ExceptionAddress=%p\n",
+ Dart_VersionString(), ExceptionInfo->ExceptionRecord->ExceptionCode,
+ ExceptionInfo->ExceptionRecord->ExceptionFlags,
+ ExceptionInfo->ExceptionRecord->ExceptionAddress);
Dart_DumpNativeStackTrace(ExceptionInfo->ContextRecord);
+ const int kAbortExitCode = 3;
Platform::Exit(kAbortExitCode);
}
return EXCEPTION_CONTINUE_SEARCH;
diff --git a/runtime/bin/secure_socket_patch.dart b/runtime/bin/secure_socket_patch.dart
index 0ef6c35..cae58a5 100644
--- a/runtime/bin/secure_socket_patch.dart
+++ b/runtime/bin/secure_socket_patch.dart
@@ -94,6 +94,10 @@
void handshake() native "SecureSocket_Handshake";
+ void rehandshake() => throw new UnimplementedError();
+
+ int processBuffer(int bufferIndex) => throw new UnimplementedError();
+
String selectedProtocol() native "SecureSocket_GetSelectedProtocol";
void renegotiate(bool useSessionCache, bool requestClientCertificate,
diff --git a/runtime/bin/socket_patch.dart b/runtime/bin/socket_patch.dart
index 1aec6f8..6a74465 100644
--- a/runtime/bin/socket_patch.dart
+++ b/runtime/bin/socket_patch.dart
@@ -236,7 +236,7 @@
}
}
-// The NativeFieldWrapperClass1 can not be used with a mixin, due to missing
+// The NativeFieldWrapperClass1 cannot be used with a mixin, due to missing
// implicit constructor.
class _NativeSocketNativeWrapper extends NativeFieldWrapperClass1 {}
@@ -593,6 +593,10 @@
bool get isTcp => (typeFlags & TYPE_TCP_SOCKET) != 0;
bool get isUdp => (typeFlags & TYPE_UDP_SOCKET) != 0;
+ Map _toJSON(bool ref) => throw new UnimplementedError();
+ String get _serviceTypePath => throw new UnimplementedError();
+ String get _serviceTypeName => throw new UnimplementedError();
+
List<int> read(int len) {
if (len != null && len <= 0) {
throw new ArgumentError("Illegal length $len");
@@ -1550,6 +1554,10 @@
void add(List<int> bytes) => _sink.add(bytes);
+ void addError(Object error, [StackTrace stackTrace]) {
+ throw new UnsupportedError("Cannot send errors on sockets");
+ }
+
Future addStream(Stream<List<int>> stream) {
return _sink.addStream(stream);
}
diff --git a/runtime/lib/mirrors_impl.dart b/runtime/lib/mirrors_impl.dart
index 072545e..26d8f3d 100644
--- a/runtime/lib/mirrors_impl.dart
+++ b/runtime/lib/mirrors_impl.dart
@@ -1325,6 +1325,8 @@
}
static _tryUpgradePrefix(libraryPrefix) native "LibraryMirror_fromPrefix";
+
+ SourceLocation get location => null;
}
class _LocalCombinatorMirror extends _LocalMirror implements CombinatorMirror {
diff --git a/runtime/observatory/tests/service/service.status b/runtime/observatory/tests/service/service.status
index 6a0a132..040f075 100644
--- a/runtime/observatory/tests/service/service.status
+++ b/runtime/observatory/tests/service/service.status
@@ -35,7 +35,7 @@
# Tests with known analyzer issues
[ $compiler == dart2analyzer ]
developer_extension_test: SkipByDesign
-evaluate_activation_in_method_class_test: CompileTimeError # Issue 24478
+evaluate_activation_in_method_class_test: RuntimeError # Issue 24478, also, test is excluded in .analysis_options
get_isolate_after_language_error_test: SkipByDesign
# Kernel version of tests
diff --git a/runtime/tests/vm/vm.status b/runtime/tests/vm/vm.status
index 8553eca..16e041d 100644
--- a/runtime/tests/vm/vm.status
+++ b/runtime/tests/vm/vm.status
@@ -285,7 +285,7 @@
cc/DartAPI_NativePortPostInteger: Crash # Issue 32190
cc/DartAPI_NativePortReceiveInteger: Timeout # Issue 32190
cc/DartAPI_NativePortReceiveNull: Timeout # Issue 32190
-cc/DartAPI_NewNativePort: Crash # Issue 32190
+cc/DartAPI_NewNativePort: Crash,Timeout # Issue 32190
cc/DartGeneratedArrayLiteralMessages: Crash # Issue 32190
cc/FullSnapshot1: Crash # Issue 32190
cc/IsolateReload_LibraryImportAdded: Crash # Issue 32190
diff --git a/runtime/vm/class_finalizer.cc b/runtime/vm/class_finalizer.cc
index 12c48e7..3c8a853 100644
--- a/runtime/vm/class_finalizer.cc
+++ b/runtime/vm/class_finalizer.cc
@@ -639,7 +639,13 @@
const TypeArguments& arguments =
TypeArguments::Handle(zone, type.arguments());
// A type can only be recursive via its type arguments.
- ASSERT(!arguments.IsNull());
+ if (arguments.IsNull()) {
+ // However, Kernel does not keep the relation between a function type and
+ // its declaring typedef. Therefore, a typedef-declared function type may
+ // refer to the still unfinalized typedef via a type in its signature.
+ ASSERT(type.IsFunctionType());
+ return;
+ }
const intptr_t num_type_args = arguments.Length();
ASSERT(num_type_args > 0);
ASSERT(num_type_args == type_cls.NumTypeArguments());
@@ -1100,7 +1106,7 @@
}
}
AbstractType& super_type = AbstractType::Handle(cls.super_type());
- if (!super_type.IsNull()) {
+ if (!super_type.IsNull() && !super_type.IsBeingFinalized()) {
const Class& super_class = Class::Handle(super_type.type_class());
CheckTypeArgumentBounds(super_class, arguments, bound_error);
}
diff --git a/runtime/vm/compiler/aot/aot_call_specializer.cc b/runtime/vm/compiler/aot/aot_call_specializer.cc
index 5ccc59e..caedbd7 100644
--- a/runtime/vm/compiler/aot/aot_call_specializer.cc
+++ b/runtime/vm/compiler/aot/aot_call_specializer.cc
@@ -1277,20 +1277,20 @@
return true;
}
-void AotCallSpecializer::ReplaceArrayBoundChecks() {
- for (BlockIterator block_it = flow_graph()->reverse_postorder_iterator();
+void AotCallSpecializer::ReplaceArrayBoundChecks(FlowGraph* flow_graph) {
+ Zone* zone = Thread::Current()->zone();
+
+ for (BlockIterator block_it = flow_graph->reverse_postorder_iterator();
!block_it.Done(); block_it.Advance()) {
- ForwardInstructionIterator it(block_it.Current());
- current_iterator_ = ⁢
- for (; !it.Done(); it.Advance()) {
- CheckArrayBoundInstr* check = it.Current()->AsCheckArrayBound();
- if (check != NULL) {
- GenericCheckBoundInstr* new_check = new (Z) GenericCheckBoundInstr(
- new (Z) Value(check->length()->definition()),
- new (Z) Value(check->index()->definition()), check->deopt_id());
- flow_graph()->InsertBefore(check, new_check, check->env(),
- FlowGraph::kEffect);
- current_iterator()->RemoveCurrentFromGraph();
+ for (ForwardInstructionIterator it(block_it.Current()); !it.Done();
+ it.Advance()) {
+ if (CheckArrayBoundInstr* check = it.Current()->AsCheckArrayBound()) {
+ GenericCheckBoundInstr* new_check = new (zone) GenericCheckBoundInstr(
+ new (zone) Value(check->length()->definition()),
+ new (zone) Value(check->index()->definition()), check->deopt_id());
+ flow_graph->InsertBefore(check, new_check, check->env(),
+ FlowGraph::kEffect);
+ it.RemoveCurrentFromGraph();
}
}
}
diff --git a/runtime/vm/compiler/aot/aot_call_specializer.h b/runtime/vm/compiler/aot/aot_call_specializer.h
index 34a089a..7169626 100644
--- a/runtime/vm/compiler/aot/aot_call_specializer.h
+++ b/runtime/vm/compiler/aot/aot_call_specializer.h
@@ -23,7 +23,7 @@
// TODO(dartbug.com/30633) these method has nothing to do with
// specialization of calls. They are here for historical reasons.
// Find a better place for them.
- void ReplaceArrayBoundChecks();
+ static void ReplaceArrayBoundChecks(FlowGraph* flow_graph);
virtual void VisitInstanceCall(InstanceCallInstr* instr);
virtual void VisitStaticCall(StaticCallInstr* instr);
diff --git a/runtime/vm/compiler/aot/precompiler.cc b/runtime/vm/compiler/aot/precompiler.cc
index 6e912c6..d70ef75 100644
--- a/runtime/vm/compiler/aot/precompiler.cc
+++ b/runtime/vm/compiler/aot/precompiler.cc
@@ -21,6 +21,7 @@
#include "vm/compiler/backend/redundancy_elimination.h"
#include "vm/compiler/backend/type_propagator.h"
#include "vm/compiler/cha.h"
+#include "vm/compiler/compiler_pass.h"
#include "vm/compiler/frontend/flow_graph_builder.h"
#include "vm/compiler/jit/compiler.h"
#include "vm/dart_entry.h"
@@ -63,17 +64,11 @@
"Max number of attempts with speculative inlining (precompilation only)");
DEFINE_FLAG(int, precompiler_rounds, 1, "Number of precompiler iterations");
-DECLARE_FLAG(bool, allocation_sinking);
-DECLARE_FLAG(bool, common_subexpression_elimination);
-DECLARE_FLAG(bool, constant_propagation);
-DECLARE_FLAG(bool, loop_invariant_code_motion);
DECLARE_FLAG(bool, print_flow_graph);
DECLARE_FLAG(bool, print_flow_graph_optimized);
-DECLARE_FLAG(bool, range_analysis);
DECLARE_FLAG(bool, trace_compiler);
DECLARE_FLAG(bool, trace_optimizing_compiler);
DECLARE_FLAG(bool, trace_bailout);
-DECLARE_FLAG(bool, use_inlining);
DECLARE_FLAG(bool, verify_compiler);
DECLARE_FLAG(bool, huge_method_cutoff_in_code_size);
DECLARE_FLAG(bool, trace_failed_optimization_attempts);
@@ -2717,39 +2712,22 @@
(optimized() && FLAG_print_flow_graph_optimized)) &&
FlowGraphPrinter::ShouldPrint(function);
- if (print_flow_graph) {
- FlowGraphPrinter::PrintGraph("Before Optimizations", flow_graph);
+ if (print_flow_graph && !optimized()) {
+ FlowGraphPrinter::PrintGraph("Unoptimized Compilation", flow_graph);
}
- if (optimized()) {
-#ifndef PRODUCT
- TimelineDurationScope tds(thread(), compiler_timeline, "ComputeSSA");
-#endif // !PRODUCT
- CSTAT_TIMER_SCOPE(thread(), ssa_timer);
- // Transform to SSA (virtual register 0 and no inlining arguments).
- flow_graph->ComputeSSA(0, NULL);
- DEBUG_ASSERT(flow_graph->VerifyUseLists());
- if (print_flow_graph) {
- FlowGraphPrinter::PrintGraph("After SSA", flow_graph);
- }
- }
+ CompilerPassState pass_state(thread(), flow_graph, &speculative_policy,
+ precompiler_);
+ NOT_IN_PRODUCT(pass_state.compiler_timeline = compiler_timeline);
- // Maps inline_id_to_function[inline_id] -> function. Top scope
- // function has inline_id 0. The map is populated by the inliner.
- GrowableArray<const Function*> inline_id_to_function;
- // Token position where inlining occured.
- GrowableArray<TokenPosition> inline_id_to_token_pos;
- // For a given inlining-id(index) specifies the caller's inlining-id.
- GrowableArray<intptr_t> caller_inline_id;
- // Collect all instance fields that are loaded in the graph and
- // have non-generic type feedback attached to them that can
- // potentially affect optimizations.
if (optimized()) {
#ifndef PRODUCT
TimelineDurationScope tds(thread(), compiler_timeline,
"OptimizationPasses");
#endif // !PRODUCT
- inline_id_to_function.Add(&function);
+ CSTAT_TIMER_SCOPE(thread(), graphoptimizer_timer);
+
+ pass_state.inline_id_to_function.Add(&function);
// We do not add the token position now because we don't know the
// position of the inlined call until later. A side effect of this
// is that the length of |inline_id_to_function| is always larger
@@ -2757,339 +2735,22 @@
// Top scope function has no caller (-1). We do this because we expect
// all token positions to be at an inlined call.
// Top scope function has no caller (-1).
- caller_inline_id.Add(-1);
- CSTAT_TIMER_SCOPE(thread(), graphoptimizer_timer);
+ pass_state.caller_inline_id.Add(-1);
AotCallSpecializer call_specializer(precompiler_, flow_graph,
&speculative_policy);
+ pass_state.call_specializer = &call_specializer;
- call_specializer.ApplyClassIds();
- DEBUG_ASSERT(flow_graph->VerifyUseLists());
-
- FlowGraphTypePropagator::Propagate(flow_graph);
- DEBUG_ASSERT(flow_graph->VerifyUseLists());
-
- call_specializer.ApplyICData();
- DEBUG_ASSERT(flow_graph->VerifyUseLists());
-
- // Optimize (a << b) & c patterns, merge operations.
- // Run early in order to have more opportunity to optimize left shifts.
- flow_graph->TryOptimizePatterns();
- DEBUG_ASSERT(flow_graph->VerifyUseLists());
-
- FlowGraphInliner::SetInliningId(flow_graph, 0);
-
- // Inlining (mutates the flow graph)
- if (FLAG_use_inlining) {
-#ifndef PRODUCT
- TimelineDurationScope tds2(thread(), compiler_timeline, "Inlining");
-#endif // !PRODUCT
- CSTAT_TIMER_SCOPE(thread(), graphinliner_timer);
- // Propagate types to create more inlining opportunities.
- FlowGraphTypePropagator::Propagate(flow_graph);
- DEBUG_ASSERT(flow_graph->VerifyUseLists());
-
- // Use propagated class-ids to create more inlining opportunities.
- call_specializer.ApplyClassIds();
- DEBUG_ASSERT(flow_graph->VerifyUseLists());
-
- FlowGraphInliner inliner(flow_graph, &inline_id_to_function,
- &inline_id_to_token_pos, &caller_inline_id,
- &speculative_policy, precompiler_);
- inliner.Inline();
- // Use lists are maintained and validated by the inliner.
- DEBUG_ASSERT(flow_graph->VerifyUseLists());
- }
-
- // Propagate types and eliminate more type tests.
- FlowGraphTypePropagator::Propagate(flow_graph);
- DEBUG_ASSERT(flow_graph->VerifyUseLists());
-
- {
-#ifndef PRODUCT
- TimelineDurationScope tds2(thread(), compiler_timeline,
- "ApplyClassIds");
-#endif // !PRODUCT
- // Use propagated class-ids to optimize further.
- call_specializer.ApplyClassIds();
- DEBUG_ASSERT(flow_graph->VerifyUseLists());
- }
-
- // Propagate types for potentially newly added instructions by
- // ApplyClassIds(). Must occur before canonicalization.
- FlowGraphTypePropagator::Propagate(flow_graph);
- DEBUG_ASSERT(flow_graph->VerifyUseLists());
-
- // Do optimizations that depend on the propagated type information.
- if (flow_graph->Canonicalize()) {
- // Invoke Canonicalize twice in order to fully canonicalize patterns
- // like "if (a & const == 0) { }".
- flow_graph->Canonicalize();
- }
- DEBUG_ASSERT(flow_graph->VerifyUseLists());
-
- {
-#ifndef PRODUCT
- TimelineDurationScope tds2(thread(), compiler_timeline,
- "BranchSimplifier");
-#endif // !PRODUCT
- BranchSimplifier::Simplify(flow_graph);
- DEBUG_ASSERT(flow_graph->VerifyUseLists());
-
- IfConverter::Simplify(flow_graph);
- DEBUG_ASSERT(flow_graph->VerifyUseLists());
- }
-
- if (FLAG_constant_propagation) {
-#ifndef PRODUCT
- TimelineDurationScope tds2(thread(), compiler_timeline,
- "ConstantPropagation");
-#endif // !PRODUCT
- ConstantPropagator::Optimize(flow_graph);
- DEBUG_ASSERT(flow_graph->VerifyUseLists());
- // A canonicalization pass to remove e.g. smi checks on smi constants.
- flow_graph->Canonicalize();
- DEBUG_ASSERT(flow_graph->VerifyUseLists());
- // Canonicalization introduced more opportunities for constant
- // propagation.
- ConstantPropagator::Optimize(flow_graph);
- DEBUG_ASSERT(flow_graph->VerifyUseLists());
- }
-
- // Optimistically convert loop phis that have a single non-smi input
- // coming from the loop pre-header into smi-phis.
- if (FLAG_loop_invariant_code_motion) {
- LICM licm(flow_graph);
- licm.OptimisticallySpecializeSmiPhis();
- DEBUG_ASSERT(flow_graph->VerifyUseLists());
- }
-
- // Propagate types and eliminate even more type tests.
- // Recompute types after constant propagation to infer more precise
- // types for uses that were previously reached by now eliminated phis.
- FlowGraphTypePropagator::Propagate(flow_graph);
- DEBUG_ASSERT(flow_graph->VerifyUseLists());
-
- {
-#ifndef PRODUCT
- TimelineDurationScope tds2(thread(), compiler_timeline,
- "SelectRepresentations");
-#endif // !PRODUCT
- // Where beneficial convert Smi operations into Int32 operations.
- // Only meanigful for 32bit platforms right now.
- flow_graph->WidenSmiToInt32();
-
- // Unbox doubles. Performed after constant propagation to minimize
- // interference from phis merging double values and tagged
- // values coming from dead paths.
- flow_graph->SelectRepresentations();
- DEBUG_ASSERT(flow_graph->VerifyUseLists());
- }
-
- {
-#ifndef PRODUCT
- TimelineDurationScope tds2(thread(), compiler_timeline,
- "CommonSubexpressionElimination");
-#endif // !PRODUCT
-
- if (FLAG_common_subexpression_elimination) {
- if (DominatorBasedCSE::Optimize(flow_graph)) {
- DEBUG_ASSERT(flow_graph->VerifyUseLists());
- flow_graph->Canonicalize();
- // Do another round of CSE to take secondary effects into account:
- // e.g. when eliminating dependent loads (a.x[0] + a.x[0])
- // TODO(fschneider): Change to a one-pass optimization pass.
- if (DominatorBasedCSE::Optimize(flow_graph)) {
- flow_graph->Canonicalize();
- }
- DEBUG_ASSERT(flow_graph->VerifyUseLists());
- }
- }
-
- // Run loop-invariant code motion right after load elimination since
- // it depends on the numbering of loads from the previous
- // load-elimination.
- if (FLAG_loop_invariant_code_motion) {
- flow_graph->RenameUsesDominatedByRedefinitions();
- DEBUG_ASSERT(flow_graph->VerifyRedefinitions());
- LICM licm(flow_graph);
- licm.Optimize();
- DEBUG_ASSERT(flow_graph->VerifyUseLists());
- }
- flow_graph->RemoveRedefinitions();
- }
-
- // Optimize (a << b) & c patterns, merge operations.
- // Run after CSE in order to have more opportunity to merge
- // instructions that have same inputs.
- flow_graph->TryOptimizePatterns();
- DEBUG_ASSERT(flow_graph->VerifyUseLists());
-
- {
-#ifndef PRODUCT
- TimelineDurationScope tds2(thread(), compiler_timeline,
- "DeadStoreElimination");
-#endif // !PRODUCT
- DeadStoreElimination::Optimize(flow_graph);
- }
-
- if (FLAG_range_analysis) {
-#ifndef PRODUCT
- TimelineDurationScope tds2(thread(), compiler_timeline,
- "RangeAnalysis");
-#endif // !PRODUCT
- // Propagate types after store-load-forwarding. Some phis may have
- // become smi phis that can be processed by range analysis.
- FlowGraphTypePropagator::Propagate(flow_graph);
- DEBUG_ASSERT(flow_graph->VerifyUseLists());
-
- // We have to perform range analysis after LICM because it
- // optimistically moves CheckSmi through phis into loop preheaders
- // making some phis smi.
- RangeAnalysis range_analysis(flow_graph);
- range_analysis.Analyze();
- DEBUG_ASSERT(flow_graph->VerifyUseLists());
- }
-
- if (FLAG_constant_propagation) {
-#ifndef PRODUCT
- TimelineDurationScope tds2(thread(), compiler_timeline,
- "ConstantPropagator::OptimizeBranches");
-#endif // !PRODUCT
- // Constant propagation can use information from range analysis to
- // find unreachable branch targets and eliminate branches that have
- // the same true- and false-target.
- ConstantPropagator::OptimizeBranches(flow_graph);
- DEBUG_ASSERT(flow_graph->VerifyUseLists());
- }
-
- // Recompute types after code movement was done to ensure correct
- // reaching types for hoisted values.
- FlowGraphTypePropagator::Propagate(flow_graph);
- DEBUG_ASSERT(flow_graph->VerifyUseLists());
-
- {
-#ifndef PRODUCT
- TimelineDurationScope tds2(thread(), compiler_timeline,
- "TryCatchAnalyzer::Optimize");
-#endif // !PRODUCT
- // Optimize try-blocks.
- TryCatchAnalyzer::Optimize(flow_graph);
- }
-
- // Detach environments from the instructions that can't deoptimize.
- // Do it before we attempt to perform allocation sinking to minimize
- // amount of materializations it has to perform.
- flow_graph->EliminateEnvironments();
-
- {
-#ifndef PRODUCT
- TimelineDurationScope tds2(thread(), compiler_timeline,
- "EliminateDeadPhis");
-#endif // !PRODUCT
- DeadCodeElimination::EliminateDeadPhis(flow_graph);
- DEBUG_ASSERT(flow_graph->VerifyUseLists());
- }
-
- if (flow_graph->Canonicalize()) {
- flow_graph->Canonicalize();
- }
-
- // Attempt to sink allocations of temporary non-escaping objects to
- // the deoptimization path.
- AllocationSinking* sinking = NULL;
- if (FLAG_allocation_sinking &&
- (flow_graph->graph_entry()->SuccessorCount() == 1)) {
-#ifndef PRODUCT
- TimelineDurationScope tds2(thread(), compiler_timeline,
- "AllocationSinking::Optimize");
-#endif // !PRODUCT
- // TODO(fschneider): Support allocation sinking with try-catch.
- sinking = new AllocationSinking(flow_graph);
- sinking->Optimize();
- }
- DEBUG_ASSERT(flow_graph->VerifyUseLists());
-
- DeadCodeElimination::EliminateDeadPhis(flow_graph);
- DEBUG_ASSERT(flow_graph->VerifyUseLists());
-
- FlowGraphTypePropagator::Propagate(flow_graph);
- DEBUG_ASSERT(flow_graph->VerifyUseLists());
-
- {
-#ifndef PRODUCT
- TimelineDurationScope tds2(thread(), compiler_timeline,
- "SelectRepresentations");
-#endif // !PRODUCT
- // Ensure that all phis inserted by optimization passes have
- // consistent representations.
- flow_graph->SelectRepresentations();
- }
-
- if (flow_graph->Canonicalize()) {
- // To fully remove redundant boxing (e.g. BoxDouble used only in
- // environments and UnboxDouble instructions) instruction we
- // first need to replace all their uses and then fold them away.
- // For now we just repeat Canonicalize twice to do that.
- // TODO(vegorov): implement a separate representation folding pass.
- flow_graph->Canonicalize();
- }
- DEBUG_ASSERT(flow_graph->VerifyUseLists());
-
- CheckStackOverflowElimination::EliminateStackOverflow(flow_graph);
-
- if (flow_graph->Canonicalize()) {
- // To fully remove redundant boxing (e.g. BoxDouble used only in
- // environments and UnboxDouble instructions) instruction we
- // first need to replace all their uses and then fold them away.
- // For now we just repeat Canonicalize twice to do that.
- // TODO(vegorov): implement a separate representation folding pass.
- flow_graph->Canonicalize();
- }
- DEBUG_ASSERT(flow_graph->VerifyUseLists());
-
- if (sinking != NULL) {
-#ifndef PRODUCT
- TimelineDurationScope tds2(
- thread(), compiler_timeline,
- "AllocationSinking::DetachMaterializations");
-#endif // !PRODUCT
- // Remove all MaterializeObject instructions inserted by allocation
- // sinking from the flow graph and let them float on the side
- // referenced only from environments. Register allocator will consider
- // them as part of a deoptimization environment.
- sinking->DetachMaterializations();
- }
-
- // Replace bounds check instruction with a generic one.
- call_specializer.ReplaceArrayBoundChecks();
-
- // Compute and store graph informations (call & instruction counts)
- // to be later used by the inliner.
- FlowGraphInliner::CollectGraphInfo(flow_graph, true);
-
- flow_graph->RemoveRedefinitions();
- {
-#ifndef PRODUCT
- TimelineDurationScope tds2(thread(), compiler_timeline,
- "AllocateRegisters");
-#endif // !PRODUCT
- // Perform register allocation on the SSA graph.
- FlowGraphAllocator allocator(*flow_graph);
- allocator.AllocateRegisters();
- }
-
- if (print_flow_graph) {
- FlowGraphPrinter::PrintGraph("After Optimizations", flow_graph);
- }
+ CompilerPass::RunPipeline(CompilerPass::kAOT, &pass_state);
}
- ASSERT(inline_id_to_function.length() == caller_inline_id.length());
+ ASSERT(pass_state.inline_id_to_function.length() ==
+ pass_state.caller_inline_id.length());
Assembler assembler(use_far_branches);
FlowGraphCompiler graph_compiler(
&assembler, flow_graph, *parsed_function(), optimized(),
- &speculative_policy, inline_id_to_function, inline_id_to_token_pos,
- caller_inline_id);
+ &speculative_policy, pass_state.inline_id_to_function,
+ pass_state.inline_id_to_token_pos, pass_state.caller_inline_id);
{
CSTAT_TIMER_SCOPE(thread(), graphcompiler_timer);
#ifndef PRODUCT
diff --git a/runtime/vm/compiler/assembler/assembler_arm64.cc b/runtime/vm/compiler/assembler/assembler_arm64.cc
index 6d5c531..6eba840 100644
--- a/runtime/vm/compiler/assembler/assembler_arm64.cc
+++ b/runtime/vm/compiler/assembler/assembler_arm64.cc
@@ -425,6 +425,7 @@
// TODO(zra, kmillikin): Also load other large immediates from the object
// pool
if (object.IsSmi()) {
+ ASSERT(Smi::IsValid(Smi::Value(reinterpret_cast<RawSmi*>(object.raw()))));
// If the raw smi does not fit into a 32-bit signed int, then we'll keep
// the raw value in the object pool.
return !Utils::IsInt(32, reinterpret_cast<int64_t>(object.raw()));
@@ -680,37 +681,69 @@
}
}
-void Assembler::AddImmediateSetFlags(Register dest, Register rn, int64_t imm) {
+void Assembler::AddImmediateSetFlags(Register dest,
+ Register rn,
+ int64_t imm,
+ OperandSize sz) {
+ ASSERT(sz == kDoubleWord || sz == kWord);
Operand op;
if (Operand::CanHold(imm, kXRegSizeInBits, &op) == Operand::Immediate) {
// Handles imm == kMinInt64.
- adds(dest, rn, op);
+ if (sz == kDoubleWord) {
+ adds(dest, rn, op);
+ } else {
+ addsw(dest, rn, op);
+ }
} else if (Operand::CanHold(-imm, kXRegSizeInBits, &op) ==
Operand::Immediate) {
ASSERT(imm != kMinInt64); // Would cause erroneous overflow detection.
- subs(dest, rn, op);
+ if (sz == kDoubleWord) {
+ subs(dest, rn, op);
+ } else {
+ subsw(dest, rn, op);
+ }
} else {
// TODO(zra): Try adding top 12 bits, then bottom 12 bits.
ASSERT(rn != TMP2);
LoadImmediate(TMP2, imm);
- adds(dest, rn, Operand(TMP2));
+ if (sz == kDoubleWord) {
+ adds(dest, rn, Operand(TMP2));
+ } else {
+ addsw(dest, rn, Operand(TMP2));
+ }
}
}
-void Assembler::SubImmediateSetFlags(Register dest, Register rn, int64_t imm) {
+void Assembler::SubImmediateSetFlags(Register dest,
+ Register rn,
+ int64_t imm,
+ OperandSize sz) {
Operand op;
+ ASSERT(sz == kDoubleWord || sz == kWord);
if (Operand::CanHold(imm, kXRegSizeInBits, &op) == Operand::Immediate) {
// Handles imm == kMinInt64.
- subs(dest, rn, op);
+ if (sz == kDoubleWord) {
+ subs(dest, rn, op);
+ } else {
+ subsw(dest, rn, op);
+ }
} else if (Operand::CanHold(-imm, kXRegSizeInBits, &op) ==
Operand::Immediate) {
ASSERT(imm != kMinInt64); // Would cause erroneous overflow detection.
- adds(dest, rn, op);
+ if (sz == kDoubleWord) {
+ adds(dest, rn, op);
+ } else {
+ addsw(dest, rn, op);
+ }
} else {
// TODO(zra): Try subtracting top 12 bits, then bottom 12 bits.
ASSERT(rn != TMP2);
LoadImmediate(TMP2, imm);
- subs(dest, rn, Operand(TMP2));
+ if (sz == kDoubleWord) {
+ subs(dest, rn, Operand(TMP2));
+ } else {
+ subsw(dest, rn, Operand(TMP2));
+ }
}
}
diff --git a/runtime/vm/compiler/assembler/assembler_arm64.h b/runtime/vm/compiler/assembler/assembler_arm64.h
index 4a9c450..3b7e289 100644
--- a/runtime/vm/compiler/assembler/assembler_arm64.h
+++ b/runtime/vm/compiler/assembler/assembler_arm64.h
@@ -649,8 +649,9 @@
int width,
OperandSize size = kDoubleWord) {
int wordsize = size == kDoubleWord ? 64 : 32;
- EmitBitfieldOp(UBFM, rd, rn, (width - low_bit) & (wordsize - 1),
- wordsize - 1, size);
+ ASSERT(width > 0);
+ ASSERT(low_bit < wordsize);
+ EmitBitfieldOp(UBFM, rd, rn, (-low_bit) & (wordsize - 1), width - 1, size);
}
// Unsigned bitfield extract. Takes the width bits, starting at low_bit and
@@ -688,6 +689,11 @@
EmitBitfieldOp(UBFM, rd, rn, 0, 15, kDoubleWord);
}
+ // Zero/unsigned extend word->64 bit.
+ void uxtw(Register rd, Register rn) {
+ EmitBitfieldOp(UBFM, rd, rn, 0, 31, kDoubleWord);
+ }
+
// Logical immediate operations.
void andi(Register rd, Register rn, const Immediate& imm) {
Operand imm_op;
@@ -737,6 +743,9 @@
void orn(Register rd, Register rn, Operand o) {
EmitLogicalShiftOp(ORN, rd, rn, o, kDoubleWord);
}
+ void ornw(Register rd, Register rn, Operand o) {
+ EmitLogicalShiftOp(ORN, rd, rn, o, kWord);
+ }
void eor(Register rd, Register rn, Operand o) {
EmitLogicalShiftOp(EOR, rd, rn, o, kDoubleWord);
}
@@ -774,20 +783,66 @@
void asrv(Register rd, Register rn, Register rm) {
EmitMiscDP2Source(ASRV, rd, rn, rm, kDoubleWord);
}
- void madd(Register rd, Register rn, Register rm, Register ra) {
- EmitMiscDP3Source(MADD, rd, rn, rm, ra, kDoubleWord);
+ void lslvw(Register rd, Register rn, Register rm) {
+ EmitMiscDP2Source(LSLV, rd, rn, rm, kWord);
}
- void msub(Register rd, Register rn, Register rm, Register ra) {
- EmitMiscDP3Source(MSUB, rd, rn, rm, ra, kDoubleWord);
+ void lsrvw(Register rd, Register rn, Register rm) {
+ EmitMiscDP2Source(LSRV, rd, rn, rm, kWord);
}
- void smulh(Register rd, Register rn, Register rm) {
- EmitMiscDP3Source(SMULH, rd, rn, rm, R31, kDoubleWord);
+ void asrvw(Register rd, Register rn, Register rm) {
+ EmitMiscDP2Source(ASRV, rd, rn, rm, kWord);
}
- void umulh(Register rd, Register rn, Register rm) {
- EmitMiscDP3Source(UMULH, rd, rn, rm, R31, kDoubleWord);
+ void madd(Register rd,
+ Register rn,
+ Register rm,
+ Register ra,
+ OperandSize sz = kDoubleWord) {
+ EmitMiscDP3Source(MADD, rd, rn, rm, ra, sz);
}
- void umaddl(Register rd, Register rn, Register rm, Register ra) {
- EmitMiscDP3Source(UMADDL, rd, rn, rm, ra, kDoubleWord);
+ void msub(Register rd,
+ Register rn,
+ Register rm,
+ Register ra,
+ OperandSize sz = kDoubleWord) {
+ EmitMiscDP3Source(MSUB, rd, rn, rm, ra, sz);
+ }
+ void smulh(Register rd,
+ Register rn,
+ Register rm,
+ OperandSize sz = kDoubleWord) {
+ EmitMiscDP3Source(SMULH, rd, rn, rm, R31, sz);
+ }
+ void umulh(Register rd,
+ Register rn,
+ Register rm,
+ OperandSize sz = kDoubleWord) {
+ EmitMiscDP3Source(UMULH, rd, rn, rm, R31, sz);
+ }
+ void umaddl(Register rd,
+ Register rn,
+ Register rm,
+ Register ra,
+ OperandSize sz = kDoubleWord) {
+ EmitMiscDP3Source(UMADDL, rd, rn, rm, ra, sz);
+ }
+ void umull(Register rd,
+ Register rn,
+ Register rm,
+ OperandSize sz = kDoubleWord) {
+ EmitMiscDP3Source(UMADDL, rd, rn, rm, ZR, sz);
+ }
+ void smaddl(Register rd,
+ Register rn,
+ Register rm,
+ Register ra,
+ OperandSize sz = kDoubleWord) {
+ EmitMiscDP3Source(SMADDL, rd, rn, rm, ra, sz);
+ }
+ void smull(Register rd,
+ Register rn,
+ Register rm,
+ OperandSize sz = kDoubleWord) {
+ EmitMiscDP3Source(SMADDL, rd, rn, rm, ZR, sz);
}
// Move wide immediate.
@@ -903,6 +958,7 @@
// For add and sub, to use CSP for rn, o must be of type Operand::Extend.
// For an unmodified rm in this case, use Operand(rm, UXTX, 0);
void cmp(Register rn, Operand o) { subs(ZR, rn, o); }
+ void cmpw(Register rn, Operand o) { subsw(ZR, rn, o); }
// rn cmp -o.
void cmn(Register rn, Operand o) { adds(ZR, rn, o); }
@@ -1199,9 +1255,16 @@
}
void vmov(VRegister vd, VRegister vn) { vorr(vd, vn, vn); }
void mvn(Register rd, Register rm) { orn(rd, ZR, Operand(rm)); }
+ void mvnw(Register rd, Register rm) { ornw(rd, ZR, Operand(rm)); }
void neg(Register rd, Register rm) { sub(rd, ZR, Operand(rm)); }
void negs(Register rd, Register rm) { subs(rd, ZR, Operand(rm)); }
- void mul(Register rd, Register rn, Register rm) { madd(rd, rn, rm, ZR); }
+ void negsw(Register rd, Register rm) { subsw(rd, ZR, Operand(rm)); }
+ void mul(Register rd, Register rn, Register rm) {
+ madd(rd, rn, rm, ZR, kDoubleWord);
+ }
+ void mulw(Register rd, Register rn, Register rm) {
+ madd(rd, rn, rm, ZR, kWord);
+ }
void Push(Register reg) {
ASSERT(reg != PP); // Only push PP with TagAndPushPP().
str(reg, Address(SP, -1 * kWordSize, Address::PreIndex));
@@ -1257,8 +1320,15 @@
void tsti(Register rn, const Immediate& imm) { andis(ZR, rn, imm); }
// We use an alias of add, where ARM recommends an alias of ubfm.
- void LslImmediate(Register rd, Register rn, int shift) {
- add(rd, ZR, Operand(rn, LSL, shift));
+ void LslImmediate(Register rd,
+ Register rn,
+ int shift,
+ OperandSize sz = kDoubleWord) {
+ if (sz == kDoubleWord) {
+ add(rd, ZR, Operand(rn, LSL, shift));
+ } else {
+ addw(rd, ZR, Operand(rn, LSL, shift));
+ }
}
// We use an alias of add, where ARM recommends an alias of ubfm.
void LsrImmediate(Register rd, Register rn, int shift) {
@@ -1310,8 +1380,14 @@
// pool pointer is in another register, or that it is not available at all,
// PP should be passed for pp.
void AddImmediate(Register dest, Register rn, int64_t imm);
- void AddImmediateSetFlags(Register dest, Register rn, int64_t imm);
- void SubImmediateSetFlags(Register dest, Register rn, int64_t imm);
+ void AddImmediateSetFlags(Register dest,
+ Register rn,
+ int64_t imm,
+ OperandSize sz = kDoubleWord);
+ void SubImmediateSetFlags(Register dest,
+ Register rn,
+ int64_t imm,
+ OperandSize sz = kDoubleWord);
void AndImmediate(Register rd, Register rn, int64_t imm);
void OrImmediate(Register rd, Register rn, int64_t imm);
void XorImmediate(Register rd, Register rn, int64_t imm);
diff --git a/runtime/vm/compiler/assembler/assembler_arm64_test.cc b/runtime/vm/compiler/assembler/assembler_arm64_test.cc
index 8bf00c9..fbfb286 100644
--- a/runtime/vm/compiler/assembler/assembler_arm64_test.cc
+++ b/runtime/vm/compiler/assembler/assembler_arm64_test.cc
@@ -1654,6 +1654,154 @@
EXPECT_EQ(0x700000001, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
}
+ASSEMBLER_TEST_GENERATE(Smaddl, assembler) {
+ __ movn(R1, Immediate(1), 0); // W1 = -2.
+ __ movz(R2, Immediate(7), 0); // W2 = 7.
+ __ movz(R3, Immediate(20), 0); // X3 = 20.
+ __ smaddl(R0, R1, R2, R3); // X0 = W1*W2 + X3 = 6.
+ __ ret();
+}
+
+ASSEMBLER_TEST_RUN(Smaddl, test) {
+ typedef int64_t (*Int64Return)() DART_UNUSED;
+ EXPECT_EQ(6, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
+}
+
+ASSEMBLER_TEST_GENERATE(Smaddl2, assembler) {
+ __ movn(R1, Immediate(1), 0); // W1 = -2.
+ __ movn(R2, Immediate(0), 0); // W2 = -1.
+ __ smull(R0, R1, R2); // X0 = W1*W2 = 2, alias of smaddl.
+ __ ret();
+}
+
+ASSEMBLER_TEST_RUN(Smaddl2, test) {
+ typedef int64_t (*Int64Return)() DART_UNUSED;
+ EXPECT_EQ(2, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
+}
+
+ASSEMBLER_TEST_GENERATE(Smaddl3, assembler) {
+ __ movz(R1, Immediate(0xffff), 0); // W1 = 0xffff.
+ __ movz(R2, Immediate(0xffff), 0); // W2 = 0xffff.
+ __ smull(R0, R1, R2); // X0 = W1*W2, alias of smaddl.
+ __ ret();
+}
+
+ASSEMBLER_TEST_RUN(Smaddl3, test) {
+ typedef int64_t (*Int64Return)() DART_UNUSED;
+ EXPECT_EQ(0xffffl * 0xffffl,
+ EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
+}
+
+ASSEMBLER_TEST_GENERATE(SmaddlOverflow, assembler) {
+ Label return_ltuae;
+ __ movz(R1, Immediate(0xffff), 0); // W1 = 0xffff.
+ __ AddImmediate(R1, 4); // W1 = 0x10003.
+ __ movz(R2, Immediate(0x7fff), 0); // W2 = 0xffff.
+ __ smull(R0, R1, R2); // X0 = W1*W2, alias of smaddl.
+ __ AsrImmediate(R3, R0, 31);
+ __ cmp(R3, Operand(R0, ASR, 63)); // Detect signed 32 bit overflow.
+ __ b(&return_ltuae, NE);
+ __ ret();
+ __ Bind(&return_ltuae);
+ __ movz(R0, Immediate(42), 0);
+ __ ret();
+}
+
+ASSEMBLER_TEST_RUN(SmaddlOverflow, test) {
+ typedef int64_t (*Int64Return)() DART_UNUSED;
+ EXPECT_EQ(42, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
+}
+
+ASSEMBLER_TEST_GENERATE(SmaddlOverflow2, assembler) {
+ Label return_ltuae;
+ __ movz(R1, Immediate(0xffff), 0); // W1 = 0xffff.
+ __ movn(R2, Immediate(0xffff), 0); // W2 = -0x10000.
+ __ AddImmediate(R2, -3); // W2 = -0x10003.
+ __ smull(R0, R1, R2); // X0 = W1*W2, alias of smaddl.
+ __ AsrImmediate(R3, R0, 31);
+ __ cmp(R3, Operand(R0, ASR, 63)); // Detect signed 32 bit overflow.
+ __ b(&return_ltuae, NE);
+ __ ret();
+ __ Bind(&return_ltuae);
+ __ movz(R0, Immediate(42), 0);
+ __ ret();
+}
+
+ASSEMBLER_TEST_RUN(SmaddlOverflow2, test) {
+ typedef int64_t (*Int64Return)() DART_UNUSED;
+ EXPECT_EQ(42, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
+}
+
+ASSEMBLER_TEST_GENERATE(SmaddlOverflow3, assembler) {
+ Label return_ltuae;
+ __ LoadImmediate(R1, 0x01007fff);
+ __ LoadImmediate(R2, 0x01007fff);
+ __ smull(R0, R1, R2); // X0 = W1*W2, alias of smaddl.
+ __ AsrImmediate(R3, R0, 31);
+ __ cmp(R3, Operand(R0, ASR, 63)); // Detect signed 32 bit overflow.
+ __ b(&return_ltuae, NE);
+ __ ret();
+ __ Bind(&return_ltuae);
+ __ movz(R0, Immediate(42), 0);
+ __ ret();
+}
+
+ASSEMBLER_TEST_RUN(SmaddlOverflow3, test) {
+ typedef int64_t (*Int64Return)() DART_UNUSED;
+ EXPECT_EQ(42, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
+}
+
+ASSEMBLER_TEST_GENERATE(NegNoOverflow, assembler) {
+ Label return_ltuae;
+ __ LoadImmediate(R1, 0x7fffffff);
+ __ negsw(R0, R1); // X0 = W1*W2, alias of smaddl.
+ __ sxtw(R0, R0);
+ __ b(&return_ltuae, VS); // Branch on overflow set.
+ __ ret();
+ __ Bind(&return_ltuae);
+ __ movz(R0, Immediate(42), 0);
+ __ ret();
+}
+
+ASSEMBLER_TEST_RUN(NegNoOverflow, test) {
+ typedef int64_t (*Int64Return)() DART_UNUSED;
+ EXPECT_EQ(-0x7fffffff, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
+}
+
+ASSEMBLER_TEST_GENERATE(NegNoOverflow2, assembler) {
+ Label return_ltuae;
+ __ LoadImmediate(R1, 0x7123);
+ __ negsw(R0, R1); // X0 = W1*W2, alias of smaddl.
+ __ sxtw(R0, R0);
+ __ b(&return_ltuae, VS); // Branch on overflow set.
+ __ ret();
+ __ Bind(&return_ltuae);
+ __ movz(R0, Immediate(42), 0);
+ __ ret();
+}
+
+ASSEMBLER_TEST_RUN(NegNoOverflow2, test) {
+ typedef int64_t (*Int64Return)() DART_UNUSED;
+ EXPECT_EQ(-0x7123, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
+}
+
+ASSEMBLER_TEST_GENERATE(NegOverflow, assembler) {
+ Label return_ltuae;
+ __ LoadImmediate(R1, -0x80000000ll);
+ __ negsw(R0, R1); // X0 = W1*W2, alias of smaddl.
+ __ sxtw(R0, R0);
+ __ b(&return_ltuae, VS); // Branch on overflow set.
+ __ ret();
+ __ Bind(&return_ltuae);
+ __ movz(R0, Immediate(42), 0);
+ __ ret();
+}
+
+ASSEMBLER_TEST_RUN(NegOverflow, test) {
+ typedef int64_t (*Int64Return)() DART_UNUSED;
+ EXPECT_EQ(42, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
+}
+
// Loading immediate values without the object pool.
ASSEMBLER_TEST_GENERATE(LoadImmediateSmall, assembler) {
__ LoadImmediate(R0, 42);
@@ -2145,6 +2293,19 @@
EXPECT_EQ(0x5a5b9a5a, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
}
+ASSEMBLER_TEST_GENERATE(Ubfiz, assembler) {
+ __ LoadImmediate(R1, 0xff1248ff);
+ __ LoadImmediate(R0, 0x5a5a5a5a);
+ // Take 30 low bits and place at position 1 in R0, zeroing the rest.
+ __ ubfiz(R0, R1, 1, 30);
+ __ ret();
+}
+
+ASSEMBLER_TEST_RUN(Ubfiz, test) {
+ typedef int64_t (*Int64Return)() DART_UNUSED;
+ EXPECT_EQ(0x7e2491fe, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
+}
+
ASSEMBLER_TEST_GENERATE(Bfxil, assembler) {
__ LoadImmediate(R1, 0x819);
__ LoadImmediate(R0, 0x5a5a5a5a);
@@ -2217,6 +2378,23 @@
EXPECT_EQ(0x29, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
}
+ASSEMBLER_TEST_GENERATE(Uxtw, assembler) {
+ __ LoadImmediate(R1, 0xffffffffll);
+ __ LoadImmediate(R0, 0x5a5a5a5a); // Overwritten.
+ __ ubfiz(R0, R1, 0, 32); // Zero extend word.
+ __ LoadImmediate(R2, 0x10000002all);
+ __ LoadImmediate(R1, 0x5a5a5a5a); // Overwritten.
+ __ ubfiz(R1, R2, 0, 32); // Zero extend word.
+ __ add(R0, R0, Operand(R1));
+ __ ret();
+}
+
+ASSEMBLER_TEST_RUN(Uxtw, test) {
+ typedef int64_t (*Int64Return)() DART_UNUSED;
+ EXPECT_EQ(0xffffffffll + 42,
+ EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
+}
+
ASSEMBLER_TEST_GENERATE(Uxtb, assembler) {
__ LoadImmediate(R1, -1);
__ LoadImmediate(R0, 0x5a5a5a5a); // Overwritten.
diff --git a/runtime/vm/compiler/assembler/assembler_x64.cc b/runtime/vm/compiler/assembler/assembler_x64.cc
index e9451d0..b13e48a 100644
--- a/runtime/vm/compiler/assembler/assembler_x64.cc
+++ b/runtime/vm/compiler/assembler/assembler_x64.cc
@@ -683,12 +683,19 @@
}
}
-void Assembler::MulImmediate(Register reg, const Immediate& imm) {
+void Assembler::MulImmediate(Register reg,
+ const Immediate& imm,
+ OperandWidth width) {
if (imm.is_int32()) {
- imulq(reg, imm);
+ if (width == k32Bit) {
+ imull(reg, imm);
+ } else {
+ imulq(reg, imm);
+ }
} else {
ASSERT(reg != TMP);
- LoadImmediate(TMP, imm);
+ ASSERT(width != k32Bit);
+ movq(TMP, imm);
imulq(reg, TMP);
}
}
@@ -943,25 +950,36 @@
popq(r);
}
-void Assembler::AddImmediate(Register reg, const Immediate& imm) {
+void Assembler::AddImmediate(Register reg,
+ const Immediate& imm,
+ OperandWidth width) {
const int64_t value = imm.value();
if (value == 0) {
return;
}
if ((value > 0) || (value == kMinInt64)) {
if (value == 1) {
- incq(reg);
+ if (width == k32Bit) {
+ incl(reg);
+ } else {
+ incq(reg);
+ }
} else {
- if (imm.is_int32()) {
- addq(reg, imm);
+ if (imm.is_int32() || (width == k32Bit && imm.is_uint32())) {
+ if (width == k32Bit) {
+ addl(reg, imm);
+ } else {
+ addq(reg, imm);
+ }
} else {
ASSERT(reg != TMP);
+ ASSERT(width != k32Bit);
LoadImmediate(TMP, imm);
addq(reg, TMP);
}
}
} else {
- SubImmediate(reg, Immediate(-value));
+ SubImmediate(reg, Immediate(-value), width);
}
}
@@ -986,25 +1004,37 @@
}
}
-void Assembler::SubImmediate(Register reg, const Immediate& imm) {
+void Assembler::SubImmediate(Register reg,
+ const Immediate& imm,
+ OperandWidth width) {
const int64_t value = imm.value();
if (value == 0) {
return;
}
- if ((value > 0) || (value == kMinInt64)) {
+ if ((value > 0) || (value == kMinInt64) ||
+ (value == kMinInt32 && width == k32Bit)) {
if (value == 1) {
- decq(reg);
+ if (width == k32Bit) {
+ decl(reg);
+ } else {
+ decq(reg);
+ }
} else {
if (imm.is_int32()) {
- subq(reg, imm);
+ if (width == k32Bit) {
+ subl(reg, imm);
+ } else {
+ subq(reg, imm);
+ }
} else {
ASSERT(reg != TMP);
+ ASSERT(width != k32Bit);
LoadImmediate(TMP, imm);
subq(reg, TMP);
}
}
} else {
- AddImmediate(reg, Immediate(-value));
+ AddImmediate(reg, Immediate(-value), width);
}
}
diff --git a/runtime/vm/compiler/assembler/assembler_x64.h b/runtime/vm/compiler/assembler/assembler_x64.h
index c6117d1..116ff36 100644
--- a/runtime/vm/compiler/assembler/assembler_x64.h
+++ b/runtime/vm/compiler/assembler/assembler_x64.h
@@ -484,6 +484,9 @@
void cvttsd2siq(Register dst, XmmRegister src) {
EmitQ(dst, src, 0x2C, 0x0F, 0xF2);
}
+ void cvttsd2sil(Register dst, XmmRegister src) {
+ EmitL(dst, src, 0x2C, 0x0F, 0xF2);
+ }
void movmskpd(Register dst, XmmRegister src) {
EmitL(dst, src, 0x50, 0x0F, 0x66);
}
@@ -579,10 +582,16 @@
REGULAR_UNARY(dec, 0xFF, 1)
#undef REGULAR_UNARY
+ // We could use kWord, kDoubleWord, and kQuadWord here, but it is rather
+ // confusing since the same sizes mean something different on ARM.
+ enum OperandWidth { k32Bit, k64Bit };
+
void imull(Register reg, const Immediate& imm);
void imulq(Register dst, const Immediate& imm);
- void MulImmediate(Register reg, const Immediate& imm);
+ void MulImmediate(Register reg,
+ const Immediate& imm,
+ OperandWidth width = k64Bit);
void shll(Register reg, const Immediate& imm);
void shll(Register operand, Register shifter);
@@ -653,9 +662,13 @@
// Methods for adding/subtracting an immediate value that may be loaded from
// the constant pool.
// TODO(koda): Assert that these are not used for heap objects.
- void AddImmediate(Register reg, const Immediate& imm);
+ void AddImmediate(Register reg,
+ const Immediate& imm,
+ OperandWidth width = k64Bit);
void AddImmediate(const Address& address, const Immediate& imm);
- void SubImmediate(Register reg, const Immediate& imm);
+ void SubImmediate(Register reg,
+ const Immediate& imm,
+ OperandWidth width = k64Bit);
void SubImmediate(const Address& address, const Immediate& imm);
void Drop(intptr_t stack_elements, Register tmp = TMP);
diff --git a/runtime/vm/compiler/assembler/assembler_x64_test.cc b/runtime/vm/compiler/assembler/assembler_x64_test.cc
index 73ec3b7..a18453c 100644
--- a/runtime/vm/compiler/assembler/assembler_x64_test.cc
+++ b/runtime/vm/compiler/assembler/assembler_x64_test.cc
@@ -838,7 +838,7 @@
__ movq(RAX, Immediate(kLargeConstant));
__ movq(RCX, Immediate(kAnotherLargeConstant));
__ imulq(RAX, RCX);
- __ imulq(RCX, Immediate(kLargeConstant));
+ __ MulImmediate(RCX, Immediate(kLargeConstant));
__ cmpq(RAX, RCX);
__ j(EQUAL, &done);
__ int3();
@@ -4628,7 +4628,17 @@
}
ASSEMBLER_TEST_GENERATE(DoubleToInt64Conversion, assembler) {
- __ movq(RAX, Immediate(bit_cast<int64_t, double>(12.3)));
+ __ movq(RAX, Immediate(bit_cast<int64_t, double>(4.2e22)));
+ __ pushq(RAX);
+ __ movsd(XMM9, Address(RSP, 0));
+ __ popq(RAX);
+ __ cvttsd2siq(RAX, XMM9);
+ __ CompareImmediate(RAX, Immediate(0x8000000000000000ll));
+ Label ok;
+ __ j(EQUAL, &ok);
+ __ int3(); // cvttsd2siq overflow not detected
+ __ Bind(&ok);
+ __ movq(RAX, Immediate(bit_cast<int64_t, double>(4.2e11)));
__ pushq(RAX);
__ movsd(XMM9, Address(RSP, 0));
__ movsd(XMM6, Address(RSP, 0));
@@ -4638,6 +4648,8 @@
__ cvttsd2siq(R10, XMM9);
__ cvttsd2siq(RDX, XMM9);
__ subq(RDX, R10);
+ __ addq(RDX, RDX);
+ __ addq(RDX, R10);
__ movq(RAX, RDX);
__ ret();
}
@@ -4645,11 +4657,20 @@
ASSEMBLER_TEST_RUN(DoubleToInt64Conversion, test) {
typedef int64_t (*DoubleToInt64ConversionCode)();
int64_t res = reinterpret_cast<DoubleToInt64ConversionCode>(test->entry())();
- EXPECT_EQ(0, res);
+ EXPECT_EQ(420000000000l, res);
EXPECT_DISASSEMBLY(
"movq rax,0x................\n"
"push rax\n"
"movsd xmm9,[rsp]\n"
+ "pop rax\n"
+ "cvttsd2siq rax,xmm9\n"
+ "movq r11,0x................\n"
+ "cmpq rax,r11\n"
+ "jz 0x................\n"
+ "int3\n"
+ "movq rax,0x................\n"
+ "push rax\n"
+ "movsd xmm9,[rsp]\n"
"movsd xmm6,[rsp]\n"
"pop rax\n"
"cvttsd2siq r10,xmm6\n"
@@ -4657,6 +4678,99 @@
"cvttsd2siq r10,xmm9\n"
"cvttsd2siq rdx,xmm9\n"
"subq rdx,r10\n"
+ "addq rdx,rdx\n"
+ "addq rdx,r10\n"
+ "movq rax,rdx\n"
+ "ret\n");
+}
+
+ASSEMBLER_TEST_GENERATE(DoubleToInt32Conversion, assembler) {
+ // Check that a too big double results in the overflow value for a conversion
+ // to signed 32 bit.
+ __ movq(RAX, Immediate(bit_cast<int64_t, double>(4.2e11)));
+ __ pushq(RAX);
+ __ movsd(XMM9, Address(RSP, 0));
+ __ popq(RAX);
+ __ cvttsd2sil(RAX, XMM9);
+ __ CompareImmediate(RAX, Immediate(0x80000000ll));
+ {
+ Label ok;
+ __ j(EQUAL, &ok);
+ __ int3(); // cvttsd2sil overflow not detected.
+ __ Bind(&ok);
+ }
+
+ // Check that negative floats result in signed 32 bit results with the top
+ // bits zeroed.
+ __ movq(RAX, Immediate(bit_cast<int64_t, double>(-42.0)));
+ __ pushq(RAX);
+ __ movsd(XMM9, Address(RSP, 0));
+ __ popq(RAX);
+ // These high 1-bits will be zeroed in the next insn.
+ __ movq(R10, Immediate(-1));
+ // Put -42 in r10d, zeroing the high bits of r10.
+ __ cvttsd2sil(R10, XMM9);
+ __ CompareImmediate(R10, Immediate(-42 & 0xffffffffll));
+ {
+ Label ok;
+ __ j(EQUAL, &ok);
+ __ int3(); // cvttsd2sil negative result error
+ __ Bind(&ok);
+ }
+
+ // Check for correct result for positive in-range input.
+ __ movq(RAX, Immediate(bit_cast<int64_t, double>(42.0)));
+ __ pushq(RAX);
+ __ movsd(XMM9, Address(RSP, 0));
+ __ movsd(XMM6, Address(RSP, 0));
+ __ popq(RAX);
+ __ cvttsd2sil(R10, XMM6);
+ __ cvttsd2sil(RDX, XMM6);
+ __ cvttsd2sil(R10, XMM9);
+ __ cvttsd2sil(RDX, XMM9);
+ __ subq(RDX, R10);
+ __ addq(RDX, RDX);
+ __ addq(RDX, R10);
+ __ movq(RAX, RDX);
+ __ ret();
+}
+
+ASSEMBLER_TEST_RUN(DoubleToInt32Conversion, test) {
+ typedef int64_t (*DoubleToInt32ConversionCode)();
+ int64_t res = reinterpret_cast<DoubleToInt32ConversionCode>(test->entry())();
+ EXPECT_EQ(42, res);
+ EXPECT_DISASSEMBLY(
+ "movq rax,0x................\n"
+ "push rax\n"
+ "movsd xmm9,[rsp]\n"
+ "pop rax\n"
+ "cvttsd2sil rax,xmm9\n"
+ "movl r11,0x........\n"
+ "cmpq rax,r11\n"
+ "jz 0x................\n"
+ "int3\n"
+ "movq rax,0x................\n"
+ "push rax\n"
+ "movsd xmm9,[rsp]\n"
+ "pop rax\n"
+ "movq r10,-1\n"
+ "cvttsd2sil r10,xmm9\n"
+ "movl r11,0x........\n"
+ "cmpq r10,r11\n"
+ "jz 0x................\n"
+ "int3\n"
+ "movq rax,0x................\n"
+ "push rax\n"
+ "movsd xmm9,[rsp]\n"
+ "movsd xmm6,[rsp]\n"
+ "pop rax\n"
+ "cvttsd2sil r10,xmm6\n"
+ "cvttsd2sil rdx,xmm6\n"
+ "cvttsd2sil r10,xmm9\n"
+ "cvttsd2sil rdx,xmm9\n"
+ "subq rdx,r10\n"
+ "addq rdx,rdx\n"
+ "addq rdx,r10\n"
"movq rax,rdx\n"
"ret\n");
}
@@ -5435,6 +5549,160 @@
"ret\n");
}
+ASSEMBLER_TEST_GENERATE(ImmediateMacros, assembler) {
+ const intptr_t kBillion = 1000 * 1000 * 1000;
+ {
+ __ LoadImmediate(RAX, Immediate(42));
+ __ MulImmediate(RAX, Immediate(kBillion));
+ Label ok;
+ __ CompareImmediate(RAX, Immediate(42 * kBillion));
+ __ j(EQUAL, &ok);
+ __ int3(); // MulImmediate 64 bit.
+ __ Bind(&ok);
+ }
+ {
+ __ LoadImmediate(RAX, Immediate(42));
+ __ MulImmediate(RAX, Immediate(kBillion), Assembler::k32Bit);
+ Label ok;
+ __ CompareImmediate(RAX, Immediate((42 * kBillion) & 0xffffffffll));
+ __ j(EQUAL, &ok);
+ __ int3(); // MulImmediate 32 bit.
+ __ Bind(&ok);
+ }
+ {
+ __ LoadImmediate(RAX, Immediate(kBillion));
+ __ AddImmediate(RAX, Immediate(41 * kBillion));
+ Label ok;
+ __ CompareImmediate(RAX, Immediate(42 * kBillion));
+ __ j(EQUAL, &ok);
+ __ int3(); // AddImmediate 64 bit.
+ __ Bind(&ok);
+ }
+ {
+ __ LoadImmediate(RAX, Immediate(kBillion));
+ __ AddImmediate(RAX, Immediate(kBillion), Assembler::k32Bit);
+ __ AddImmediate(RAX, Immediate(kBillion), Assembler::k32Bit);
+ __ AddImmediate(RAX, Immediate(kBillion), Assembler::k32Bit);
+ Label ok;
+ __ CompareImmediate(RAX, Immediate((4 * kBillion) & 0xffffffffll));
+ __ j(EQUAL, &ok);
+ __ int3(); // AddImmediate 32 bit.
+ __ Bind(&ok);
+ }
+ {
+ __ LoadImmediate(RAX, Immediate(kBillion));
+ __ AddImmediate(RAX, Immediate(static_cast<int32_t>(3 * kBillion)),
+ Assembler::k32Bit);
+ __ AddImmediate(RAX, Immediate(kBillion), Assembler::k32Bit);
+ __ AddImmediate(RAX, Immediate(-kBillion), Assembler::k32Bit);
+ Label ok;
+ __ CompareImmediate(RAX, Immediate((4 * kBillion) & 0xffffffffll));
+ __ j(EQUAL, &ok);
+ __ int3(); // AddImmediate negative 32 bit.
+ __ Bind(&ok);
+ }
+ {
+ __ LoadImmediate(RAX, Immediate(kBillion));
+ __ SubImmediate(RAX, Immediate(43 * kBillion));
+ Label ok;
+ __ CompareImmediate(RAX, Immediate(-42 * kBillion));
+ __ j(EQUAL, &ok);
+ __ int3(); // AddImmediate negative 64 bit.
+ __ Bind(&ok);
+ }
+ {
+ __ LoadImmediate(RAX, Immediate(-kBillion));
+ __ SubImmediate(RAX, Immediate(kBillion), Assembler::k32Bit);
+ __ SubImmediate(RAX, Immediate(kBillion), Assembler::k32Bit);
+ __ SubImmediate(RAX, Immediate(kBillion), Assembler::k32Bit);
+ Label ok;
+ __ CompareImmediate(RAX, Immediate((-4 * kBillion) & 0xffffffffll));
+ __ j(EQUAL, &ok);
+ __ int3(); // SubImmediate 32 bit.
+ __ Bind(&ok);
+ }
+ {
+ __ LoadImmediate(RAX, Immediate(kBillion));
+ __ SubImmediate(RAX, Immediate((-3 * kBillion) & 0xffffffffll),
+ Assembler::k32Bit);
+ __ SubImmediate(RAX, Immediate(kBillion), Assembler::k32Bit);
+ __ SubImmediate(RAX, Immediate(-kBillion), Assembler::k32Bit);
+ Label ok;
+ __ CompareImmediate(RAX, Immediate((4 * kBillion) & 0xffffffffll));
+ __ j(EQUAL, &ok);
+ __ int3(); // SubImmediate 32 bit.
+ __ Bind(&ok);
+ }
+ __ LoadImmediate(RAX, Immediate(42));
+ __ ret();
+}
+
+ASSEMBLER_TEST_RUN(ImmediateMacros, test) {
+ typedef int (*ImmediateMacrosCode)();
+ int res = reinterpret_cast<ImmediateMacrosCode>(test->entry())();
+ EXPECT_EQ(42, res);
+ EXPECT_DISASSEMBLY(
+ "movl rax,0x2a\n"
+ "imulq rax,rax,0x........\n"
+ "movq r11,0x................\n"
+ "cmpq rax,r11\n"
+ "jz 0x................\n"
+ "int3\n"
+ "movl rax,0x2a\n"
+ "imull rax,rax,0x........\n"
+ "movl r11,0x........\n"
+ "cmpq rax,r11\n"
+ "jz 0x................\n"
+ "int3\n"
+ "movl rax,0x........\n"
+ "movq r11,0x................\n"
+ "addq rax,r11\n"
+ "movq r11,0x................\n"
+ "cmpq rax,r11\n"
+ "jz 0x................\n"
+ "int3\n"
+ "movl rax,0x........\n"
+ "addl rax,0x........\n"
+ "addl rax,0x........\n"
+ "addl rax,0x........\n"
+ "movl r11,0x........\n"
+ "cmpq rax,r11\n"
+ "jz 0x................\n"
+ "int3\n"
+ "movl rax,0x........\n"
+ "subl rax,0x........\n"
+ "addl rax,0x........\n"
+ "subl rax,0x........\n"
+ "movl r11,0x........\n"
+ "cmpq rax,r11\n"
+ "jz 0x................\n"
+ "int3\n"
+ "movl rax,0x........\n"
+ "movq r11,0x................\n"
+ "subq rax,r11\n"
+ "movq r11,0x................\n"
+ "cmpq rax,r11\n"
+ "jz 0x................\n"
+ "int3\n"
+ "movq rax,-0x........\n"
+ "subl rax,0x........\n"
+ "subl rax,0x........\n"
+ "subl rax,0x........\n"
+ "cmpq rax,0x........\n"
+ "jz 0x................\n"
+ "int3\n"
+ "movl rax,0x........\n"
+ "subl rax,0x........\n"
+ "subl rax,0x........\n"
+ "addl rax,0x........\n"
+ "movl r11,0x........\n"
+ "cmpq rax,r11\n"
+ "jz 0x................\n"
+ "int3\n"
+ "movl rax,0x2a\n"
+ "ret\n");
+}
+
// clang-format off
#define ALU_TEST(NAME, WIDTH, INTRO, LHS, RHS, OUTRO) \
ASSEMBLER_TEST_GENERATE(NAME, assembler) { \
diff --git a/runtime/vm/compiler/assembler/disassembler_arm64.cc b/runtime/vm/compiler/assembler/disassembler_arm64.cc
index 06b9ad7..ad102433 100644
--- a/runtime/vm/compiler/assembler/disassembler_arm64.cc
+++ b/runtime/vm/compiler/assembler/disassembler_arm64.cc
@@ -1061,8 +1061,12 @@
break;
case 2: {
if ((instr->RnField() == R31) && (instr->IsShift()) &&
- (instr->Imm16Field() == 0) && (instr->ShiftTypeField() == LSL)) {
- Format(instr, "mov'sf 'rd, 'rm");
+ (instr->ShiftTypeField() == LSL)) {
+ if (instr->ShiftAmountField() == 0) {
+ Format(instr, "mov'sf 'rd, 'rm");
+ } else {
+ Format(instr, "lsl'sf 'rd, 'rm, 'imms");
+ }
} else {
Format(instr, "orr'sf 'rd, 'rn, 'shift_op");
}
@@ -1134,25 +1138,50 @@
}
void ARM64Decoder::DecodeMiscDP3Source(Instr* instr) {
- if ((instr->Bits(29, 2) == 0) && (instr->Bits(21, 3) == 0) &&
- (instr->Bit(15) == 0)) {
- if (instr->RaField() == R31) {
+ bool zero_operand = instr->RaField() == R31;
+ int32_t mask = B31 | B30 | B29 | B23 | B22 | B21 | B15 | MiscDP3SourceMask;
+ int32_t bits = instr->InstructionBits() & mask;
+
+ if (bits == MADD) {
+ if (zero_operand) {
Format(instr, "mul'sf 'rd, 'rn, 'rm");
} else {
Format(instr, "madd'sf 'rd, 'rn, 'rm, 'ra");
}
- } else if ((instr->Bits(29, 2) == 0) && (instr->Bits(21, 3) == 0) &&
- (instr->Bit(15) == 1)) {
- Format(instr, "msub'sf 'rd, 'rn, 'rm, 'ra");
- } else if ((instr->Bits(29, 2) == 0) && (instr->Bits(21, 3) == 2) &&
- (instr->Bit(15) == 0)) {
+ } else if (bits == MSUB) {
+ if (zero_operand) {
+ Format(instr, "mneg'sf 'rd, 'rn, 'rm");
+ } else {
+ Format(instr, "msub'sf 'rd, 'rn, 'rm, 'ra");
+ }
+ } else if (bits == SMULH) {
Format(instr, "smulh 'rd, 'rn, 'rm");
- } else if ((instr->Bits(29, 2) == 0) && (instr->Bits(21, 3) == 6) &&
- (instr->Bit(15) == 0)) {
+ } else if (bits == UMULH) {
Format(instr, "umulh 'rd, 'rn, 'rm");
- } else if ((instr->Bits(29, 3) == 4) && (instr->Bits(21, 3) == 5) &&
- (instr->Bit(15) == 0)) {
- Format(instr, "umaddl 'rd, 'rn, 'rm, 'ra");
+ } else if (bits == UMADDL) {
+ if (zero_operand) {
+ Format(instr, "umull 'rd, 'rn, 'rm");
+ } else {
+ Format(instr, "umaddl 'rd, 'rn, 'rm, 'ra");
+ }
+ } else if (bits == SMADDL) {
+ if (zero_operand) {
+ Format(instr, "smull 'rd, 'rn, 'rm");
+ } else {
+ Format(instr, "smaddl 'rd, 'rn, 'rm, 'ra");
+ }
+ } else if (bits == SMSUBL) {
+ if (zero_operand) {
+ Format(instr, "smnegl 'rd, 'rn, 'rm");
+ } else {
+ Format(instr, "smsubl 'rd, 'rn, 'rm, 'ra");
+ }
+ } else if (bits == UMSUBL) {
+ if (zero_operand) {
+ Format(instr, "umnegl 'rd, 'rn, 'rm");
+ } else {
+ Format(instr, "umsubl 'rd, 'rn, 'rm, 'ra");
+ }
} else {
Unknown(instr);
}
diff --git a/runtime/vm/compiler/assembler/disassembler_x86.cc b/runtime/vm/compiler/assembler/disassembler_x86.cc
index bd9b2de..56b3878 100644
--- a/runtime/vm/compiler/assembler/disassembler_x86.cc
+++ b/runtime/vm/compiler/assembler/disassembler_x86.cc
@@ -1559,7 +1559,7 @@
Print(",");
current += PrintImmediate(current, BYTE_SIZE);
}
- } else if (opcode == 0xBA && (*current & 0xE0) == 0xE0) {
+ } else if (opcode == 0xBA && (*current & 0x60) == 0x60) {
// bt? immediate instruction
int r = (*current >> 3) & 7;
static const char* const names[4] = {"bt", "bts", "btr", "btc"};
diff --git a/runtime/vm/compiler/backend/constant_propagator.cc b/runtime/vm/compiler/backend/constant_propagator.cc
index ca96978..5d30eda 100644
--- a/runtime/vm/compiler/backend/constant_propagator.cc
+++ b/runtime/vm/compiler/backend/constant_propagator.cc
@@ -1299,8 +1299,7 @@
changed = true;
- if (FLAG_trace_constant_propagation &&
- FlowGraphPrinter::ShouldPrint(graph_->function())) {
+ if (FLAG_trace_constant_propagation && graph_->should_print()) {
THR_Print("Eliminated branch in B%" Pd " common target B%" Pd "\n",
block->block_id(), join->block_id());
}
@@ -1318,11 +1317,6 @@
}
void ConstantPropagator::Transform() {
- if (FLAG_trace_constant_propagation &&
- FlowGraphPrinter::ShouldPrint(graph_->function())) {
- FlowGraphPrinter::PrintGraph("Before CP", graph_);
- }
-
// We will recompute dominators, block ordering, block ids, block last
// instructions, previous pointers, predecessors, etc. after eliminating
// unreachable code. We do not maintain those properties during the
@@ -1331,8 +1325,7 @@
b.Advance()) {
BlockEntryInstr* block = b.Current();
if (!reachable_->Contains(block->preorder_number())) {
- if (FLAG_trace_constant_propagation &&
- FlowGraphPrinter::ShouldPrint(graph_->function())) {
+ if (FLAG_trace_constant_propagation && graph_->should_print()) {
THR_Print("Unreachable B%" Pd "\n", block->block_id());
}
// Remove all uses in unreachable blocks.
@@ -1401,8 +1394,7 @@
!defn->IsConstant() && !defn->IsPushArgument() &&
!defn->IsStoreIndexed() && !defn->IsStoreInstanceField() &&
!defn->IsStoreStaticField()) {
- if (FLAG_trace_constant_propagation &&
- FlowGraphPrinter::ShouldPrint(graph_->function())) {
+ if (FLAG_trace_constant_propagation && graph_->should_print()) {
THR_Print("Constant v%" Pd " = %s\n", defn->ssa_temp_index(),
defn->constant_value().ToCString());
}
@@ -1463,11 +1455,6 @@
graph_->MergeBlocks();
GrowableArray<BitVector*> dominance_frontier;
graph_->ComputeDominators(&dominance_frontier);
-
- if (FLAG_trace_constant_propagation &&
- FlowGraphPrinter::ShouldPrint(graph_->function())) {
- FlowGraphPrinter::PrintGraph("After CP", graph_);
- }
}
} // namespace dart
diff --git a/runtime/vm/compiler/backend/flow_graph.cc b/runtime/vm/compiler/backend/flow_graph.cc
index 516db37..febb84c 100644
--- a/runtime/vm/compiler/backend/flow_graph.cc
+++ b/runtime/vm/compiler/backend/flow_graph.cc
@@ -50,7 +50,8 @@
deferred_prefixes_(parsed_function.deferred_prefixes()),
await_token_positions_(NULL),
captured_parameters_(new (zone()) BitVector(zone(), variable_count())),
- inlining_id_(-1) {
+ inlining_id_(-1),
+ should_print_(FlowGraphPrinter::ShouldPrint(parsed_function.function())) {
DiscoverBlocks();
}
diff --git a/runtime/vm/compiler/backend/flow_graph.h b/runtime/vm/compiler/backend/flow_graph.h
index a98c65c..ac09be0 100644
--- a/runtime/vm/compiler/backend/flow_graph.h
+++ b/runtime/vm/compiler/backend/flow_graph.h
@@ -346,6 +346,8 @@
// values that are dominated by a redefinition are renamed.
void RenameUsesDominatedByRedefinitions();
+ bool should_print() const { return should_print_; }
+
private:
friend class IfConverter;
friend class BranchSimplifier;
@@ -445,6 +447,7 @@
BitVector* captured_parameters_;
intptr_t inlining_id_;
+ bool should_print_;
};
class LivenessAnalysis : public ValueObject {
diff --git a/runtime/vm/compiler/backend/flow_graph_compiler.cc b/runtime/vm/compiler/backend/flow_graph_compiler.cc
index 91f5bcd..074df75 100644
--- a/runtime/vm/compiler/backend/flow_graph_compiler.cc
+++ b/runtime/vm/compiler/backend/flow_graph_compiler.cc
@@ -1831,7 +1831,8 @@
}
Label next_test;
if (!complete || !is_last_check) {
- bias = EmitTestAndCallCheckCid(is_last_check ? failed : &next_test,
+ bias = EmitTestAndCallCheckCid(assembler(),
+ is_last_check ? failed : &next_test,
EmitTestCidRegister(), targets[i], bias,
/*jump_on_miss =*/true);
}
@@ -1871,7 +1872,8 @@
for (intptr_t i = 0; i < ranges.length(); ++i) {
const CidRange& range = ranges[i];
if (!range.IsIllegalRange()) {
- bias = EmitTestAndCallCheckCid(is_subtype, class_id_reg, range, bias,
+ bias = EmitTestAndCallCheckCid(assembler(), is_subtype, class_id_reg,
+ range, bias,
/*jump_on_miss=*/false);
}
}
diff --git a/runtime/vm/compiler/backend/flow_graph_compiler.h b/runtime/vm/compiler/backend/flow_graph_compiler.h
index 54cdc63..b6daea0 100644
--- a/runtime/vm/compiler/backend/flow_graph_compiler.h
+++ b/runtime/vm/compiler/backend/flow_graph_compiler.h
@@ -622,6 +622,16 @@
void RecordAfterCall(Instruction* instr, CallResult result);
#endif
+ // Returns new class-id bias.
+ //
+ // TODO(kustermann): We should move this code out of the [FlowGraphCompiler]!
+ static int EmitTestAndCallCheckCid(Assembler* assembler,
+ Label* label,
+ Register class_id_reg,
+ const CidRange& range,
+ int bias,
+ bool jump_on_miss = true);
+
private:
friend class CheckStackOverflowSlowPath; // For pending_deoptimization_env_.
friend class CheckedSmiSlowPath; // Same.
@@ -668,13 +678,6 @@
void EmitTestAndCallLoadCid(Register class_id_reg);
- // Returns new class-id bias.
- int EmitTestAndCallCheckCid(Label* label,
- Register class_id_reg,
- const CidRange& range,
- int bias,
- bool jump_on_miss = true);
-
// DBC handles type tests differently from all other architectures due
// to its interpreted nature.
#if !defined(TARGET_ARCH_DBC)
diff --git a/runtime/vm/compiler/backend/flow_graph_compiler_arm.cc b/runtime/vm/compiler/backend/flow_graph_compiler_arm.cc
index 5a7e101..bdbf67e 100644
--- a/runtime/vm/compiler/backend/flow_graph_compiler_arm.cc
+++ b/runtime/vm/compiler/backend/flow_graph_compiler_arm.cc
@@ -1182,7 +1182,11 @@
__ LoadClassId(class_id_reg, R0);
}
-int FlowGraphCompiler::EmitTestAndCallCheckCid(Label* label,
+#undef __
+#define __ assembler->
+
+int FlowGraphCompiler::EmitTestAndCallCheckCid(Assembler* assembler,
+ Label* label,
Register class_id_reg,
const CidRange& range,
int bias,
diff --git a/runtime/vm/compiler/backend/flow_graph_compiler_arm64.cc b/runtime/vm/compiler/backend/flow_graph_compiler_arm64.cc
index 605f983..2609224 100644
--- a/runtime/vm/compiler/backend/flow_graph_compiler_arm64.cc
+++ b/runtime/vm/compiler/backend/flow_graph_compiler_arm64.cc
@@ -1137,7 +1137,11 @@
__ LoadClassId(class_id_reg, R0);
}
-int FlowGraphCompiler::EmitTestAndCallCheckCid(Label* label,
+#undef __
+#define __ assembler->
+
+int FlowGraphCompiler::EmitTestAndCallCheckCid(Assembler* assembler,
+ Label* label,
Register class_id_reg,
const CidRange& range,
int bias,
diff --git a/runtime/vm/compiler/backend/flow_graph_compiler_ia32.cc b/runtime/vm/compiler/backend/flow_graph_compiler_ia32.cc
index 12a23c2..712ab2e 100644
--- a/runtime/vm/compiler/backend/flow_graph_compiler_ia32.cc
+++ b/runtime/vm/compiler/backend/flow_graph_compiler_ia32.cc
@@ -1123,7 +1123,11 @@
__ LoadClassId(class_id_reg, EAX);
}
-int FlowGraphCompiler::EmitTestAndCallCheckCid(Label* label,
+#undef __
+#define __ assembler->
+
+int FlowGraphCompiler::EmitTestAndCallCheckCid(Assembler* assembler,
+ Label* label,
Register class_id_reg,
const CidRange& range,
int bias,
diff --git a/runtime/vm/compiler/backend/flow_graph_compiler_x64.cc b/runtime/vm/compiler/backend/flow_graph_compiler_x64.cc
index 20fb90d..25fb8a7 100644
--- a/runtime/vm/compiler/backend/flow_graph_compiler_x64.cc
+++ b/runtime/vm/compiler/backend/flow_graph_compiler_x64.cc
@@ -1099,7 +1099,11 @@
__ LoadClassId(class_id_reg, RAX);
}
-int FlowGraphCompiler::EmitTestAndCallCheckCid(Label* label,
+#undef __
+#define __ assembler->
+
+int FlowGraphCompiler::EmitTestAndCallCheckCid(Assembler* assembler,
+ Label* label,
Register class_id_reg,
const CidRange& range,
int bias,
diff --git a/runtime/vm/compiler/backend/il.cc b/runtime/vm/compiler/backend/il.cc
index ef164ec..dcd56b5 100644
--- a/runtime/vm/compiler/backend/il.cc
+++ b/runtime/vm/compiler/backend/il.cc
@@ -46,9 +46,6 @@
DECLARE_FLAG(bool, eliminate_type_checks);
const CidRangeVector& HierarchyInfo::SubtypeRangesForClass(const Class& klass) {
- ASSERT(!klass.IsGeneric());
-
- Zone* zone = thread_->zone();
ClassTable* table = thread_->isolate()->class_table();
const intptr_t cid_count = table->NumCids();
if (cid_subtype_ranges_ == NULL) {
@@ -57,59 +54,93 @@
CidRangeVector& ranges = cid_subtype_ranges_[klass.id()];
if (ranges.length() == 0) {
- // The ranges haven't been computed yet, so let's compute them.
-
- Class& cls = Class::Handle(zone);
- Type& dst_type = Type::Handle(zone, Type::NewNonParameterizedType(klass));
- AbstractType& cls_type = AbstractType::Handle(zone);
-
- intptr_t start = -1;
- for (intptr_t cid = kInstanceCid; cid < cid_count; ++cid) {
- // Create local zone because deep hierarchies may allocate lots of handles
- // within one iteration of this loop.
- StackZone stack_zone(thread_);
- HANDLESCOPE(thread_);
-
- if (!table->HasValidClassAt(cid)) continue;
- if (cid == kTypeArgumentsCid) continue;
- if (cid == kVoidCid) continue;
- if (cid == kDynamicCid) continue;
- if (cid == kNullCid) continue;
- cls = table->At(cid);
- if (cls.is_abstract()) continue;
- if (cls.is_patch()) continue;
- if (cls.IsTopLevel()) continue;
-
- cls_type = cls.RareType();
- const bool is_subtype =
- cls_type.IsSubtypeOf(dst_type, NULL, NULL, Heap::kNew);
- if (start == -1 && is_subtype) {
- start = cid;
- } else if (start != -1 && !is_subtype) {
- CidRange range(start, cid - 1);
- ranges.Add(range);
- start = -1;
- }
- }
-
- if (start != -1) {
- CidRange range(start, cid_count - 1);
- ranges.Add(range);
- }
-
- if (start == -1 && ranges.length() == 0) {
- // Not implemented by any concrete class.
- CidRange range;
- ASSERT(range.IsIllegalRange());
- ranges.Add(range);
- }
+ BuildRangesFor(table, &ranges, klass, /*use_subtype_test=*/true);
}
return ranges;
}
-bool HierarchyInfo::InstanceOfHasClassRange(const AbstractType& type,
- intptr_t* lower_limit,
- intptr_t* upper_limit) {
+const CidRangeVector& HierarchyInfo::SubclassRangesForClass(
+ const Class& klass) {
+ ClassTable* table = thread_->isolate()->class_table();
+ const intptr_t cid_count = table->NumCids();
+ if (cid_subclass_ranges_ == NULL) {
+ cid_subclass_ranges_ = new CidRangeVector[cid_count];
+ }
+
+ CidRangeVector& ranges = cid_subclass_ranges_[klass.id()];
+ if (ranges.length() == 0) {
+ BuildRangesFor(table, &ranges, klass, /*use_subtype_test=*/false);
+ }
+ return ranges;
+}
+
+void HierarchyInfo::BuildRangesFor(ClassTable* table,
+ CidRangeVector* ranges,
+ const Class& klass,
+ bool use_subtype_test) {
+ Zone* zone = thread_->zone();
+ Class& cls = Class::Handle(zone);
+
+ // Only really used if `use_subtype_test == true`.
+ const Type& dst_type = Type::Handle(zone, Type::RawCast(klass.RareType()));
+ AbstractType& cls_type = AbstractType::Handle(zone);
+
+ const intptr_t cid_count = table->NumCids();
+
+ intptr_t start = -1;
+ for (intptr_t cid = kInstanceCid; cid < cid_count; ++cid) {
+ // Create local zone because deep hierarchies may allocate lots of handles
+ // within one iteration of this loop.
+ StackZone stack_zone(thread_);
+ HANDLESCOPE(thread_);
+
+ if (!table->HasValidClassAt(cid)) continue;
+ if (cid == kTypeArgumentsCid) continue;
+ if (cid == kVoidCid) continue;
+ if (cid == kDynamicCid) continue;
+ if (cid == kNullCid) continue;
+ cls = table->At(cid);
+ if (cls.is_abstract()) continue;
+ if (cls.is_patch()) continue;
+ if (cls.IsTopLevel()) continue;
+
+ // We are either interested in [CidRange]es of subclasses or subtypes.
+ bool test_succeded = false;
+ if (use_subtype_test) {
+ cls_type = cls.RareType();
+ test_succeded = cls_type.IsSubtypeOf(dst_type, NULL, NULL, Heap::kNew);
+ } else {
+ while (!cls.IsObjectClass()) {
+ if (cls.raw() == klass.raw()) {
+ test_succeded = true;
+ break;
+ }
+ cls = cls.SuperClass();
+ }
+ }
+
+ if (start == -1 && test_succeded) {
+ start = cid;
+ } else if (start != -1 && !test_succeded) {
+ CidRange range(start, cid - 1);
+ ranges->Add(range);
+ start = -1;
+ }
+ }
+
+ if (start != -1) {
+ CidRange range(start, cid_count - 1);
+ ranges->Add(range);
+ }
+
+ if (start == -1 && ranges->length() == 0) {
+ CidRange range;
+ ASSERT(range.IsIllegalRange());
+ ranges->Add(range);
+ }
+}
+
+bool HierarchyInfo::CanUseSubtypeRangeCheckFor(const AbstractType& type) {
ASSERT(type.IsFinalized() && !type.IsMalformedOrMalbounded());
if (!type.IsInstantiated() || type.IsFunctionType() ||
@@ -117,17 +148,92 @@
return false;
}
- // TODO(kustermann): Support also classes like 'class Foo extends Bar<Baz> {}'
Zone* zone = thread_->zone();
const Class& type_class = Class::Handle(zone, type.type_class());
- if (type_class.NumTypeArguments() > 0) {
+
+ // We can use class id range checks only if we don't have to test type
+ // arguments.
+ //
+ // This is e.g. true for "String" but also for "List<dynamic>". (A type for
+ // which the type arguments vector is filled with "dynamic" is known as a rare
+ // type)
+ if (type_class.IsGeneric()) {
+ // TODO(kustermann): We might want to consider extending this when the type
+ // arguments are not "dynamic" but instantiated-to-bounds.
+ const Type& rare_type =
+ Type::Handle(zone, Type::RawCast(type_class.RareType()));
+ if (!rare_type.Equals(type)) {
+ return false;
+ }
+ }
+
+ return true;
+}
+
+bool HierarchyInfo::CanUseGenericSubtypeRangeCheckFor(
+ const AbstractType& type) {
+ ASSERT(type.IsFinalized() && !type.IsMalformedOrMalbounded());
+
+ if (type.IsFunctionType() || type.IsDartFunctionType()) {
return false;
}
- const CidRangeVector& ranges = SubtypeRangesForClass(type_class);
- if (ranges.length() == 1) {
- *lower_limit = ranges[0].cid_start;
- *upper_limit = ranges[0].cid_end;
- return true;
+
+ // NOTE: We do allow non-instantiated types here (in comparison to
+ // [CanUseSubtypeRangeCheckFor], since we handle type parameters in the type
+ // expression in some cases (see below).
+
+ Zone* zone = thread_->zone();
+ const Class& type_class = Class::Handle(zone, type.type_class());
+ const intptr_t num_type_parameters = type_class.NumTypeParameters();
+ const intptr_t num_type_arguments = type_class.NumTypeArguments();
+
+ // This function should only be called for generic classes.
+ ASSERT(type_class.NumTypeParameters() > 0 &&
+ type.arguments() != TypeArguments::null());
+
+ // If the type class is implemented the different implementations might have
+ // their type argument vector stored at different offsets and we can therefore
+ // not perform our optimized [CidRange]-based implementation.
+ //
+ // TODO(kustermann): If the class is implemented but all implementations
+ // store the instantator type argument vector at the same offset we can
+ // still do it!
+ if (type_class.is_implemented()) {
+ return false;
+ }
+
+ const TypeArguments& ta =
+ TypeArguments::Handle(zone, Type::Cast(type).arguments());
+ ASSERT(ta.Length() == num_type_arguments);
+
+ // The last [num_type_pararameters] entries in the [TypeArguments] vector [ta]
+ // are the values we have to check against. Ensure we can handle all of them
+ // via [CidRange]-based checks or that it is a type parameter.
+ AbstractType& type_arg = AbstractType::Handle(zone);
+ for (intptr_t i = 0; i < num_type_parameters; ++i) {
+ type_arg = ta.TypeAt(num_type_arguments - num_type_parameters + i);
+ if (!CanUseSubtypeRangeCheckFor(type_arg) && !type_arg.IsTypeParameter()) {
+ return false;
+ }
+ }
+
+ return true;
+}
+
+bool HierarchyInfo::InstanceOfHasClassRange(const AbstractType& type,
+ intptr_t* lower_limit,
+ intptr_t* upper_limit) {
+ if (CanUseSubtypeRangeCheckFor(type)) {
+ const Class& type_class = Class::Handle(thread_->zone(), type.type_class());
+ const CidRangeVector& ranges = SubtypeRangesForClass(type_class);
+ if (ranges.length() == 1) {
+ const CidRange& range = ranges[0];
+ if (!range.IsIllegalRange()) {
+ *lower_limit = range.cid_start;
+ *upper_limit = range.cid_end;
+ return true;
+ }
+ }
}
return false;
}
diff --git a/runtime/vm/compiler/backend/il.h b/runtime/vm/compiler/backend/il.h
index 3a95a1a..556d1f4 100644
--- a/runtime/vm/compiler/backend/il.h
+++ b/runtime/vm/compiler/backend/il.h
@@ -350,7 +350,10 @@
class HierarchyInfo : public StackResource {
public:
explicit HierarchyInfo(Thread* thread)
- : StackResource(thread), thread_(thread), cid_subtype_ranges_(NULL) {
+ : StackResource(thread),
+ thread_(thread),
+ cid_subtype_ranges_(NULL),
+ cid_subclass_ranges_(NULL) {
thread->set_hierarchy_info(this);
}
@@ -359,17 +362,45 @@
delete[] cid_subtype_ranges_;
cid_subtype_ranges_ = NULL;
+
+ delete[] cid_subclass_ranges_;
+ cid_subclass_ranges_ = NULL;
}
const CidRangeVector& SubtypeRangesForClass(const Class& klass);
+ const CidRangeVector& SubclassRangesForClass(const Class& klass);
bool InstanceOfHasClassRange(const AbstractType& type,
intptr_t* lower_limit,
intptr_t* upper_limit);
+ // Returns `true` if a simple [CidRange]-based subtype-check can be used to
+ // determine if a given instance's type is a subtype of [type].
+ //
+ // This is the case for [type]s without type arguments or where the type
+ // arguments are all dynamic (known as "rare type").
+ bool CanUseSubtypeRangeCheckFor(const AbstractType& type);
+
+ // Returns `true` if a combination of [CidRange]-based checks can be used to
+ // determine if a given instance's type is a subtype of [type].
+ //
+ // This is the case for [type]s with type arguments where we are able to do a
+ // [CidRange]-based subclass-check against the class and [CidRange]-based
+ // subtype-checks against the type arguments.
+ //
+ // This method should only be called if [CanUseSubtypeRangecheckFor] returned
+ // false.
+ bool CanUseGenericSubtypeRangeCheckFor(const AbstractType& type);
+
private:
+ void BuildRangesFor(ClassTable* table,
+ CidRangeVector* ranges,
+ const Class& klass,
+ bool use_subtype_test);
+
Thread* thread_;
CidRangeVector* cid_subtype_ranges_;
+ CidRangeVector* cid_subclass_ranges_;
};
// An embedded container with N elements of type T. Used (with partial
diff --git a/runtime/vm/compiler/backend/il_printer.cc b/runtime/vm/compiler/backend/il_printer.cc
index a17f9ea..e9815df 100644
--- a/runtime/vm/compiler/backend/il_printer.cc
+++ b/runtime/vm/compiler/backend/il_printer.cc
@@ -36,6 +36,8 @@
}
char* save_ptr; // Needed for strtok_r.
+ const char* scrubbed_name =
+ String::Handle(function.QualifiedScrubbedName()).ToCString();
const char* function_name = function.ToFullyQualifiedCString();
intptr_t function_name_len = strlen(function_name);
@@ -45,7 +47,8 @@
char* token = strtok_r(filter_buffer, ",", &save_ptr);
bool found = false;
while (token != NULL) {
- if (strstr(function_name, token) != NULL) {
+ if ((strstr(function_name, token) != NULL) ||
+ (strstr(scrubbed_name, token) != NULL)) {
found = true;
break;
}
diff --git a/runtime/vm/compiler/backend/inliner.cc b/runtime/vm/compiler/backend/inliner.cc
index e3153f3..e137fad 100644
--- a/runtime/vm/compiler/backend/inliner.cc
+++ b/runtime/vm/compiler/backend/inliner.cc
@@ -2091,11 +2091,6 @@
return true;
}
-static bool ShouldTraceInlining(FlowGraph* flow_graph) {
- const Function& top = flow_graph->parsed_function().function();
- return FLAG_trace_inlining && FlowGraphPrinter::ShouldPrint(top);
-}
-
FlowGraphInliner::FlowGraphInliner(
FlowGraph* flow_graph,
GrowableArray<const Function*>* inline_id_to_function,
@@ -2107,7 +2102,7 @@
inline_id_to_function_(inline_id_to_function),
inline_id_to_token_pos_(inline_id_to_token_pos),
caller_inline_id_(caller_inline_id),
- trace_inlining_(ShouldTraceInlining(flow_graph)),
+ trace_inlining_(FLAG_trace_inlining && flow_graph->should_print()),
speculative_policy_(speculative_policy),
precompiler_(precompiler) {}
diff --git a/runtime/vm/compiler/backend/range_analysis.cc b/runtime/vm/compiler/backend/range_analysis.cc
index 865982a..689b89c 100644
--- a/runtime/vm/compiler/backend/range_analysis.cc
+++ b/runtime/vm/compiler/backend/range_analysis.cc
@@ -679,9 +679,6 @@
}
void RangeAnalysis::InferRanges() {
- if (FLAG_trace_range_analysis) {
- FlowGraphPrinter::PrintGraph("Range Analysis (BEFORE)", flow_graph_);
- }
Zone* zone = flow_graph_->zone();
// Initialize bitvector for quick filtering of int values.
BitVector* set =
@@ -719,19 +716,11 @@
// Widening simply maps growing bounds to the respective range bound.
Iterate(WIDEN, kMaxInt32);
- if (FLAG_trace_range_analysis) {
- FlowGraphPrinter::PrintGraph("Range Analysis (WIDEN)", flow_graph_);
- }
-
// Perform fix-point iteration of range inference applying narrowing
// to phis to compute more accurate range.
// Narrowing only improves those boundaries that were widened up to
// range boundary and leaves other boundaries intact.
Iterate(NARROW, kMaxInt32);
-
- if (FLAG_trace_range_analysis) {
- FlowGraphPrinter::PrintGraph("Range Analysis (AFTER)", flow_graph_);
- }
}
void RangeAnalysis::AssignRangesRecursively(Definition* defn) {
@@ -1446,10 +1435,6 @@
generalizer.TryGeneralize(check, array_length);
}
}
-
- if (FLAG_trace_range_analysis) {
- FlowGraphPrinter::PrintGraph("RangeAnalysis (ABCE)", flow_graph_);
- }
}
}
@@ -1467,8 +1452,7 @@
target->PredecessorAt(0)->last_instruction()->AsBranch();
if (target == branch->true_successor()) {
// True unreachable.
- if (FLAG_trace_constant_propagation &&
- FlowGraphPrinter::ShouldPrint(flow_graph_->function())) {
+ if (FLAG_trace_constant_propagation && flow_graph_->should_print()) {
THR_Print("Range analysis: True unreachable (B%" Pd ")\n",
branch->true_successor()->block_id());
}
@@ -1476,8 +1460,7 @@
} else {
ASSERT(target == branch->false_successor());
// False unreachable.
- if (FLAG_trace_constant_propagation &&
- FlowGraphPrinter::ShouldPrint(flow_graph_->function())) {
+ if (FLAG_trace_constant_propagation && flow_graph_->should_print()) {
THR_Print("Range analysis: False unreachable (B%" Pd ")\n",
branch->false_successor()->block_id());
}
diff --git a/runtime/vm/compiler/backend/redundancy_elimination.cc b/runtime/vm/compiler/backend/redundancy_elimination.cc
index 41ad3f9..2623846 100644
--- a/runtime/vm/compiler/backend/redundancy_elimination.cc
+++ b/runtime/vm/compiler/backend/redundancy_elimination.cc
@@ -1432,9 +1432,6 @@
static bool OptimizeGraph(FlowGraph* graph) {
ASSERT(FLAG_load_cse);
- if (FLAG_trace_load_optimization) {
- FlowGraphPrinter::PrintGraph("Before LoadOptimizer", graph);
- }
// For now, bail out for large functions to avoid OOM situations.
// TODO(fschneider): Fix the memory consumption issue.
@@ -1469,11 +1466,6 @@
}
ForwardLoads();
EmitPhis();
-
- if (FLAG_trace_load_optimization) {
- FlowGraphPrinter::PrintGraph("After LoadOptimizer", graph_);
- }
-
return forwarded_;
}
@@ -2379,9 +2371,6 @@
static void OptimizeGraph(FlowGraph* graph) {
ASSERT(FLAG_load_cse);
- if (FLAG_trace_load_optimization) {
- FlowGraphPrinter::PrintGraph("Before StoreOptimizer", graph);
- }
// For now, bail out for large functions to avoid OOM situations.
// TODO(fschneider): Fix the memory consumption issue.
@@ -2406,9 +2395,6 @@
Dump();
}
EliminateDeadStores();
- if (FLAG_trace_load_optimization) {
- FlowGraphPrinter::PrintGraph("After StoreOptimizer", graph_);
- }
}
bool CanEliminateStore(Instruction* instr) {
diff --git a/runtime/vm/compiler/backend/type_propagator.cc b/runtime/vm/compiler/backend/type_propagator.cc
index cb60f6a3..76cf248 100644
--- a/runtime/vm/compiler/backend/type_propagator.cc
+++ b/runtime/vm/compiler/backend/type_propagator.cc
@@ -76,11 +76,6 @@
}
void FlowGraphTypePropagator::Propagate() {
- if (FLAG_support_il_printer && FLAG_trace_type_propagation &&
- FlowGraphPrinter::ShouldPrint(flow_graph_->function())) {
- FlowGraphPrinter::PrintGraph("Before type propagation", flow_graph_);
- }
-
// Walk the dominator tree and propagate reaching types to all Values.
// Collect all phis for a fixed point iteration.
PropagateRecursive(flow_graph_->graph_entry());
@@ -101,13 +96,13 @@
while (!worklist_.is_empty()) {
Definition* def = RemoveLastFromWorklist();
if (FLAG_support_il_printer && FLAG_trace_type_propagation &&
- FlowGraphPrinter::ShouldPrint(flow_graph_->function())) {
+ flow_graph_->should_print()) {
THR_Print("recomputing type of v%" Pd ": %s\n", def->ssa_temp_index(),
def->Type()->ToCString());
}
if (def->RecomputeType()) {
if (FLAG_support_il_printer && FLAG_trace_type_propagation &&
- FlowGraphPrinter::ShouldPrint(flow_graph_->function())) {
+ flow_graph_->should_print()) {
THR_Print(" ... new type %s\n", def->Type()->ToCString());
}
for (Value::Iterator it(def->input_use_list()); !it.Done();
@@ -121,11 +116,6 @@
}
}
}
-
- if (FLAG_support_il_printer && FLAG_trace_type_propagation &&
- FlowGraphPrinter::ShouldPrint(flow_graph_->function())) {
- FlowGraphPrinter::PrintGraph("After type propagation", flow_graph_);
- }
}
void FlowGraphTypePropagator::PropagateRecursive(BlockEntryInstr* block) {
@@ -233,7 +223,7 @@
}
if (FLAG_support_il_printer && FLAG_trace_type_propagation &&
- FlowGraphPrinter::ShouldPrint(flow_graph_->function())) {
+ flow_graph_->should_print()) {
THR_Print("reaching type to %s for v%" Pd " is %s\n",
value->instruction()->ToCString(),
value->definition()->ssa_temp_index(),
@@ -1260,7 +1250,7 @@
if ((isolate->strong() && FLAG_use_strong_mode_types) ||
(isolate->type_checks() &&
(type().IsFunctionType() || type().HasResolvedTypeClass()))) {
- const AbstractType* abstract_type = abstract_type = &type();
+ const AbstractType* abstract_type = &type();
TraceStrongModeType(this, *abstract_type);
compile_type_annotation = CompileType::FromAbstractType(*abstract_type);
}
diff --git a/runtime/vm/compiler/compiler_pass.cc b/runtime/vm/compiler/compiler_pass.cc
new file mode 100644
index 0000000..6750314
--- /dev/null
+++ b/runtime/vm/compiler/compiler_pass.cc
@@ -0,0 +1,405 @@
+// 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.
+
+#include "vm/compiler/compiler_pass.h"
+
+#ifndef DART_PRECOMPILED_RUNTIME
+
+#include "vm/compiler/backend/block_scheduler.h"
+#include "vm/compiler/backend/branch_optimizer.h"
+#include "vm/compiler/backend/constant_propagator.h"
+#include "vm/compiler/backend/il_printer.h"
+#include "vm/compiler/backend/inliner.h"
+#include "vm/compiler/backend/linearscan.h"
+#include "vm/compiler/backend/range_analysis.h"
+#include "vm/compiler/backend/redundancy_elimination.h"
+#include "vm/compiler/backend/type_propagator.h"
+#include "vm/compiler/call_specializer.h"
+#if defined(DART_PRECOMPILER)
+#include "vm/compiler/aot/aot_call_specializer.h"
+#endif
+#include "vm/timeline.h"
+
+#define COMPILER_PASS_REPEAT(Name, Body) \
+ class CompilerPass_##Name : public CompilerPass { \
+ public: \
+ CompilerPass_##Name() : CompilerPass(k##Name, #Name) {} \
+ \
+ static bool Register() { return true; } \
+ \
+ protected: \
+ virtual bool DoBody(CompilerPassState* state) const { \
+ FlowGraph* flow_graph = state->flow_graph; \
+ USE(flow_graph); \
+ Body; \
+ } \
+ }; \
+ static CompilerPass_##Name compiler_pass_##Name;
+
+#define COMPILER_PASS(Name, Body) \
+ COMPILER_PASS_REPEAT(Name, { \
+ Body; \
+ return false; \
+ })
+
+namespace dart {
+
+CompilerPass* CompilerPass::passes_[CompilerPass::kNumPasses] = {NULL};
+
+DEFINE_OPTION_HANDLER(CompilerPass::ParseFilters,
+ compiler_passes,
+ "List of comma separated compilation passes flags. "
+ "Use -Name to disable a pass, Name to print IL after it. "
+ "Do --compiler-passes=help for more information.");
+
+static const char* kCompilerPassesUsage =
+ "=== How to use --compiler-passes flag\n"
+ "\n"
+ "Pass the list of comma separated compiler pass filter flags.\n"
+ "\n"
+ "For the given pass Name the following flags are supported:\n"
+ "\n"
+ " -Name disable the pass\n"
+ " ]Name or Name print IL after the pass\n"
+ " [Name print IL before the pass\n"
+ " *Name print IL before and after the pass\n"
+ " * print IL after each pass.\n"
+ "\n"
+ " The flag can be followed by '+' which makes it sticky, e.g. Inlining+\n"
+ " would cause IL to be printed after all passes that follow inlining and\n"
+ " are not disabled.\n"
+ "\n"
+ "List of compiler passes:\n";
+
+void CompilerPass::ParseFilters(const char* filter) {
+ if (filter == NULL || *filter == 0) {
+ return;
+ }
+
+ if (strcmp(filter, "help") == 0) {
+ OS::PrintErr("%s", kCompilerPassesUsage);
+ for (intptr_t i = 0; i < kNumPasses; i++) {
+ if (passes_[i] != NULL) {
+ OS::PrintErr(" %s\n", passes_[i]->name());
+ }
+ }
+ return;
+ }
+
+ for (const char *start = filter, *end = filter; *end != 0;
+ start = (end + 1)) {
+ // Search forward until the separator ',' or the end of filter is reached.
+ end = start;
+ while (*end != ',' && *end != '\0') {
+ end++;
+ }
+ if (start == end) {
+ OS::PrintErr("Ignoring empty compiler pass flag\n");
+ continue;
+ }
+
+ uint8_t flags = 0;
+ if (*start == '-') {
+ flags = kDisabled;
+ } else if (*start == ']') {
+ flags = kTraceAfter;
+ } else if (*start == '[') {
+ flags = kTraceBefore;
+ } else if (*start == '*') {
+ flags = kTraceBeforeOrAfter;
+ }
+ if (flags == 0) {
+ flags |= kTraceAfter;
+ } else {
+ start++; // Skip the modifier
+ }
+
+ size_t suffix = 0;
+ if (end[-1] == '+') {
+ if (start == (end - 1)) {
+ OS::PrintErr("Sticky modifier '+' should follow pass name\n");
+ continue;
+ }
+ flags |= kSticky;
+ suffix = 1;
+ }
+
+ size_t length = (end - start) - suffix;
+ if (length != 0) {
+ char* pass_name = Utils::StrNDup(start, length);
+ CompilerPass* pass = FindPassByName(pass_name);
+ if (pass != NULL) {
+ pass->flags_ |= flags;
+ } else {
+ OS::PrintErr("Unknown compiler pass: %s\n", pass_name);
+ }
+ free(pass_name);
+ } else if (flags == kTraceBeforeOrAfter) {
+ for (intptr_t i = 0; i < kNumPasses; i++) {
+ if (passes_[i] != NULL) {
+ passes_[i]->flags_ = kTraceAfter;
+ }
+ }
+ }
+ }
+}
+
+void CompilerPass::Run(CompilerPassState* state) const {
+ if (IsFlagSet(kDisabled)) {
+ return;
+ }
+
+ if ((flags() & kSticky) != 0) {
+ state->sticky_flags |= flags();
+ }
+
+ const intptr_t kMaxRounds = 2;
+ Thread* thread = state->thread;
+ bool repeat = true;
+ for (intptr_t round = 1; round <= kMaxRounds && repeat; round++) {
+ if (round > 1) {
+ Get(kCanonicalize)->Run(state);
+ }
+
+ PrintGraph(state, kTraceBefore, round);
+ {
+ NOT_IN_PRODUCT(
+ TimelineDurationScope tds2(thread, state->compiler_timeline, name()));
+ repeat = DoBody(state);
+ DEBUG_ASSERT(state->flow_graph->VerifyUseLists());
+ thread->CheckForSafepoint();
+ }
+ PrintGraph(state, kTraceAfter, round);
+ }
+}
+
+void CompilerPass::PrintGraph(CompilerPassState* state,
+ Flag mask,
+ intptr_t round) const {
+ const intptr_t current_flags = flags() | state->sticky_flags;
+ FlowGraph* flow_graph = state->flow_graph;
+
+ if (flow_graph->should_print() && ((current_flags & mask) != 0)) {
+ Zone* zone = state->thread->zone();
+ const char* when = mask == kTraceBefore ? "Before" : "After";
+ const char* phase =
+ round == 1
+ ? zone->PrintToString("%s %s", when, name())
+ : zone->PrintToString("%s %s (round %" Pd ")", when, name(), round);
+
+ FlowGraphPrinter::PrintGraph(phase, flow_graph);
+ }
+}
+
+#define INVOKE_PASS(Name) \
+ CompilerPass::Get(CompilerPass::k##Name)->Run(pass_state);
+
+void CompilerPass::RunPipeline(PipelineMode mode,
+ CompilerPassState* pass_state) {
+ INVOKE_PASS(ComputeSSA);
+#if defined(DART_PRECOMPILER)
+ if (mode == kAOT) {
+ INVOKE_PASS(ApplyClassIds);
+ INVOKE_PASS(TypePropagation);
+ }
+#endif
+ INVOKE_PASS(ApplyICData);
+ INVOKE_PASS(TryOptimizePatterns);
+ INVOKE_PASS(SetOuterInliningId);
+ INVOKE_PASS(TypePropagation);
+ INVOKE_PASS(ApplyClassIds);
+ INVOKE_PASS(Inlining);
+ INVOKE_PASS(TypePropagation);
+ INVOKE_PASS(ApplyClassIds);
+ INVOKE_PASS(TypePropagation);
+ INVOKE_PASS(Canonicalize);
+ INVOKE_PASS(BranchSimplify);
+ INVOKE_PASS(IfConvert);
+ INVOKE_PASS(Canonicalize);
+ INVOKE_PASS(ConstantPropagation);
+ INVOKE_PASS(OptimisticallySpecializeSmiPhis);
+ INVOKE_PASS(TypePropagation);
+ INVOKE_PASS(WidenSmiToInt32);
+ INVOKE_PASS(SelectRepresentations);
+ INVOKE_PASS(CSE);
+ INVOKE_PASS(LICM);
+ INVOKE_PASS(TryOptimizePatterns);
+ INVOKE_PASS(DSE);
+ INVOKE_PASS(TypePropagation);
+ INVOKE_PASS(RangeAnalysis);
+ INVOKE_PASS(OptimizeBranches);
+ INVOKE_PASS(TypePropagation);
+ INVOKE_PASS(TryCatchOptimization);
+ INVOKE_PASS(EliminateEnvironments);
+ INVOKE_PASS(EliminateDeadPhis);
+ INVOKE_PASS(Canonicalize);
+ INVOKE_PASS(AllocationSinking_Sink);
+ INVOKE_PASS(EliminateDeadPhis);
+ INVOKE_PASS(TypePropagation);
+ INVOKE_PASS(SelectRepresentations);
+ INVOKE_PASS(Canonicalize);
+ INVOKE_PASS(EliminateStackOverflowChecks);
+ INVOKE_PASS(Canonicalize);
+ INVOKE_PASS(AllocationSinking_DetachMaterializations);
+#if defined(DART_PRECOMPILER)
+ if (mode == kAOT) {
+ INVOKE_PASS(ReplaceArrayBoundChecksForAOT);
+ }
+#endif
+ INVOKE_PASS(FinalizeGraph);
+ INVOKE_PASS(AllocateRegisters);
+ if (mode == kJIT) {
+ INVOKE_PASS(ReorderBlocks);
+ }
+}
+
+COMPILER_PASS(ComputeSSA, {
+ CSTAT_TIMER_SCOPE(state->thread, ssa_timer);
+ // Transform to SSA (virtual register 0 and no inlining arguments).
+ flow_graph->ComputeSSA(0, NULL);
+});
+
+COMPILER_PASS(ApplyICData, { state->call_specializer->ApplyICData(); });
+
+COMPILER_PASS(TryOptimizePatterns, { flow_graph->TryOptimizePatterns(); });
+
+COMPILER_PASS(SetOuterInliningId,
+ { FlowGraphInliner::SetInliningId(flow_graph, 0); });
+
+COMPILER_PASS(Inlining, {
+ CSTAT_TIMER_SCOPE(state->thread, graphinliner_timer);
+ FlowGraphInliner inliner(
+ flow_graph, &state->inline_id_to_function, &state->inline_id_to_token_pos,
+ &state->caller_inline_id, state->speculative_policy, state->precompiler);
+ state->inlining_depth = inliner.Inline();
+});
+
+COMPILER_PASS(TypePropagation,
+ { FlowGraphTypePropagator::Propagate(flow_graph); });
+
+COMPILER_PASS(ApplyClassIds, { state->call_specializer->ApplyClassIds(); });
+
+COMPILER_PASS(EliminateStackOverflowChecks, {
+ if (!flow_graph->IsCompiledForOsr()) {
+ CheckStackOverflowElimination::EliminateStackOverflow(flow_graph);
+ }
+});
+
+COMPILER_PASS(Canonicalize, {
+ // Do optimizations that depend on the propagated type information.
+ if (flow_graph->Canonicalize()) {
+ flow_graph->Canonicalize();
+ }
+});
+
+COMPILER_PASS(BranchSimplify, { BranchSimplifier::Simplify(flow_graph); });
+
+COMPILER_PASS(IfConvert, { IfConverter::Simplify(flow_graph); });
+
+COMPILER_PASS_REPEAT(ConstantPropagation, {
+ ConstantPropagator::Optimize(flow_graph);
+ return true;
+});
+
+// Optimistically convert loop phis that have a single non-smi input
+// coming from the loop pre-header into smi-phis.
+COMPILER_PASS(OptimisticallySpecializeSmiPhis, {
+ LICM licm(flow_graph);
+ licm.OptimisticallySpecializeSmiPhis();
+});
+
+COMPILER_PASS(WidenSmiToInt32, {
+ // Where beneficial convert Smi operations into Int32 operations.
+ // Only meanigful for 32bit platforms right now.
+ flow_graph->WidenSmiToInt32();
+});
+
+COMPILER_PASS(SelectRepresentations, {
+ // Unbox doubles. Performed after constant propagation to minimize
+ // interference from phis merging double values and tagged
+ // values coming from dead paths.
+ flow_graph->SelectRepresentations();
+});
+
+COMPILER_PASS_REPEAT(CSE, { return DominatorBasedCSE::Optimize(flow_graph); });
+
+COMPILER_PASS(LICM, {
+ flow_graph->RenameUsesDominatedByRedefinitions();
+ DEBUG_ASSERT(flow_graph->VerifyRedefinitions());
+ LICM licm(flow_graph);
+ licm.Optimize();
+ flow_graph->RemoveRedefinitions();
+});
+
+COMPILER_PASS(DSE, { DeadStoreElimination::Optimize(flow_graph); });
+
+COMPILER_PASS(RangeAnalysis, {
+ // We have to perform range analysis after LICM because it
+ // optimistically moves CheckSmi through phis into loop preheaders
+ // making some phis smi.
+ RangeAnalysis range_analysis(flow_graph);
+ range_analysis.Analyze();
+});
+
+COMPILER_PASS(OptimizeBranches, {
+ // Constant propagation can use information from range analysis to
+ // find unreachable branch targets and eliminate branches that have
+ // the same true- and false-target.
+ ConstantPropagator::OptimizeBranches(flow_graph);
+});
+
+COMPILER_PASS(TryCatchOptimization,
+ { TryCatchAnalyzer::Optimize(flow_graph); });
+
+COMPILER_PASS(EliminateEnvironments, { flow_graph->EliminateEnvironments(); });
+
+COMPILER_PASS(EliminateDeadPhis,
+ { DeadCodeElimination::EliminateDeadPhis(flow_graph); });
+
+COMPILER_PASS(AllocationSinking_Sink, {
+ // TODO(vegorov): Support allocation sinking with try-catch.
+ if (flow_graph->graph_entry()->SuccessorCount() == 1) {
+ state->sinking = new AllocationSinking(flow_graph);
+ state->sinking->Optimize();
+ }
+});
+
+COMPILER_PASS(AllocationSinking_DetachMaterializations, {
+ if (state->sinking != NULL) {
+ // Remove all MaterializeObject instructions inserted by allocation
+ // sinking from the flow graph and let them float on the side
+ // referenced only from environments. Register allocator will consider
+ // them as part of a deoptimization environment.
+ state->sinking->DetachMaterializations();
+ }
+});
+
+COMPILER_PASS(AllocateRegisters, {
+ // Perform register allocation on the SSA graph.
+ FlowGraphAllocator allocator(*flow_graph);
+ allocator.AllocateRegisters();
+});
+
+COMPILER_PASS(ReorderBlocks, {
+ if (state->reorder_blocks) {
+ state->block_scheduler->ReorderBlocks();
+ }
+});
+
+COMPILER_PASS(FinalizeGraph, {
+ // Compute and store graph informations (call & instruction counts)
+ // to be later used by the inliner.
+ FlowGraphInliner::CollectGraphInfo(flow_graph, true);
+ flow_graph->function().set_inlining_depth(state->inlining_depth);
+ flow_graph->RemoveRedefinitions();
+});
+
+#if defined(DART_PRECOMPILER)
+COMPILER_PASS(ReplaceArrayBoundChecksForAOT,
+ { AotCallSpecializer::ReplaceArrayBoundChecks(flow_graph); })
+#endif
+
+} // namespace dart
+
+#endif // DART_PRECOMPILED_RUNTIME
diff --git a/runtime/vm/compiler/compiler_pass.h b/runtime/vm/compiler/compiler_pass.h
new file mode 100644
index 0000000..4c31527
--- /dev/null
+++ b/runtime/vm/compiler/compiler_pass.h
@@ -0,0 +1,170 @@
+// 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_PASS_H_
+#define RUNTIME_VM_COMPILER_COMPILER_PASS_H_
+
+#ifndef DART_PRECOMPILED_RUNTIME
+
+#include "vm/growable_array.h"
+#include "vm/token_position.h"
+#include "vm/zone.h"
+
+namespace dart {
+
+#define COMPILER_PASS_LIST(V) \
+ V(AllocateRegisters) \
+ V(AllocationSinking_DetachMaterializations) \
+ V(AllocationSinking_Sink) \
+ V(ApplyClassIds) \
+ V(ApplyICData) \
+ V(BranchSimplify) \
+ V(CSE) \
+ V(Canonicalize) \
+ V(ComputeSSA) \
+ V(ConstantPropagation) \
+ V(DSE) \
+ V(EliminateDeadPhis) \
+ V(EliminateEnvironments) \
+ V(EliminateStackOverflowChecks) \
+ V(FinalizeGraph) \
+ V(IfConvert) \
+ V(Inlining) \
+ V(LICM) \
+ V(OptimisticallySpecializeSmiPhis) \
+ V(OptimizeBranches) \
+ V(RangeAnalysis) \
+ V(ReorderBlocks) \
+ V(ReplaceArrayBoundChecksForAOT) \
+ V(SelectRepresentations) \
+ V(SetOuterInliningId) \
+ V(TryCatchOptimization) \
+ V(TryOptimizePatterns) \
+ V(TypePropagation) \
+ V(WidenSmiToInt32)
+
+class AllocationSinking;
+class BlockScheduler;
+class CallSpecializer;
+class FlowGraph;
+class Function;
+class Precompiler;
+class SpeculativeInliningPolicy;
+
+struct CompilerPassState {
+ CompilerPassState(Thread* thread,
+ FlowGraph* flow_graph,
+ SpeculativeInliningPolicy* speculative_policy,
+ Precompiler* precompiler = NULL)
+ : thread(thread),
+ flow_graph(flow_graph),
+ precompiler(precompiler),
+ inlining_depth(0),
+ sinking(NULL),
+#ifndef PRODUCT
+ compiler_timeline(NULL),
+#endif
+ call_specializer(NULL),
+ speculative_policy(speculative_policy),
+ reorder_blocks(false),
+ block_scheduler(NULL),
+ sticky_flags(0) {
+ }
+
+ Thread* const thread;
+ FlowGraph* const flow_graph;
+ Precompiler* const precompiler;
+ int inlining_depth;
+ AllocationSinking* sinking;
+
+ NOT_IN_PRODUCT(TimelineStream* compiler_timeline);
+
+ // Maps inline_id_to_function[inline_id] -> function. Top scope
+ // function has inline_id 0. The map is populated by the inliner.
+ GrowableArray<const Function*> inline_id_to_function;
+ // Token position where inlining occured.
+ GrowableArray<TokenPosition> inline_id_to_token_pos;
+ // For a given inlining-id(index) specifies the caller's inlining-id.
+ GrowableArray<intptr_t> caller_inline_id;
+
+ CallSpecializer* call_specializer;
+
+ SpeculativeInliningPolicy* speculative_policy;
+
+ bool reorder_blocks;
+ BlockScheduler* block_scheduler;
+
+ intptr_t sticky_flags;
+};
+
+class CompilerPass {
+ public:
+ enum Id {
+#define DEF(name) k##name,
+ COMPILER_PASS_LIST(DEF)
+#undef DEF
+ };
+
+#define ADD_ONE(name) +1
+ static const intptr_t kNumPasses = 0 COMPILER_PASS_LIST(ADD_ONE);
+#undef ADD_ONE
+
+ CompilerPass(Id id, const char* name) : name_(name), flags_(0) {
+ ASSERT(passes_[id] == NULL);
+ passes_[id] = this;
+ }
+ virtual ~CompilerPass() {}
+
+ enum Flag {
+ kDisabled = 1 << 0,
+ kTraceBefore = 1 << 1,
+ kTraceAfter = 1 << 2,
+ kSticky = 1 << 3,
+ kTraceBeforeOrAfter = kTraceBefore | kTraceAfter,
+ };
+
+ void Run(CompilerPassState* state) const;
+
+ intptr_t flags() const { return flags_; }
+ const char* name() const { return name_; }
+
+ bool IsFlagSet(Flag flag) const { return (flags() & flag) != 0; }
+
+ static CompilerPass* Get(Id id) { return passes_[id]; }
+
+ static void ParseFilters(const char* filter);
+
+ enum PipelineMode { kJIT, kAOT };
+
+ static void RunPipeline(PipelineMode mode, CompilerPassState* state);
+
+ protected:
+ // This function executes the pass. If it returns true then
+ // we will run Canonicalize on the graph and execute the pass
+ // again.
+ virtual bool DoBody(CompilerPassState* state) const = 0;
+
+ private:
+ static CompilerPass* FindPassByName(const char* name) {
+ for (intptr_t i = 0; i < kNumPasses; i++) {
+ if ((passes_[i] != NULL) && (strcmp(passes_[i]->name_, name) == 0)) {
+ return passes_[i];
+ }
+ }
+ return NULL;
+ }
+
+ void PrintGraph(CompilerPassState* state, Flag mask, intptr_t round) const;
+
+ static CompilerPass* passes_[];
+
+ const char* name_;
+ intptr_t flags_;
+};
+
+} // namespace dart
+
+#endif
+
+#endif // RUNTIME_VM_COMPILER_COMPILER_PASS_H_
diff --git a/runtime/vm/compiler/compiler_sources.gni b/runtime/vm/compiler/compiler_sources.gni
index 3fc13ce..4b5a3ec 100644
--- a/runtime/vm/compiler/compiler_sources.gni
+++ b/runtime/vm/compiler/compiler_sources.gni
@@ -69,6 +69,8 @@
"call_specializer.h",
"cha.cc",
"cha.h",
+ "compiler_pass.cc",
+ "compiler_pass.h",
"frontend/flow_graph_builder.cc",
"frontend/flow_graph_builder.h",
"frontend/kernel_binary_flowgraph.cc",
diff --git a/runtime/vm/compiler/jit/compiler.cc b/runtime/vm/compiler/jit/compiler.cc
index c77b602..81113f6 100644
--- a/runtime/vm/compiler/jit/compiler.cc
+++ b/runtime/vm/compiler/jit/compiler.cc
@@ -22,6 +22,7 @@
#include "vm/compiler/backend/redundancy_elimination.h"
#include "vm/compiler/backend/type_propagator.h"
#include "vm/compiler/cha.h"
+#include "vm/compiler/compiler_pass.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"
@@ -47,28 +48,11 @@
namespace dart {
-DEFINE_FLAG(bool,
- allocation_sinking,
- true,
- "Attempt to sink temporary allocations to side exits");
-DEFINE_FLAG(bool,
- common_subexpression_elimination,
- true,
- "Do common subexpression elimination.");
-DEFINE_FLAG(
- bool,
- constant_propagation,
- true,
- "Do conditional constant propagation/unreachable code elimination.");
DEFINE_FLAG(
int,
max_deoptimization_counter_threshold,
16,
"How many times we allow deoptimization before we disallow optimization.");
-DEFINE_FLAG(bool,
- loop_invariant_code_motion,
- true,
- "Do loop invariant code motion.");
DEFINE_FLAG(charp, optimization_filter, NULL, "Optimize only named function");
DEFINE_FLAG(bool, print_flow_graph, false, "Print the IR flow graph.");
DEFINE_FLAG(bool,
@@ -80,7 +64,6 @@
false,
"Print the deopt-id to ICData map in optimizing compiler.");
DEFINE_FLAG(bool, print_code_source_map, false, "Print code source map.");
-DEFINE_FLAG(bool, range_analysis, true, "Enable range analysis");
DEFINE_FLAG(bool,
stress_test_background_compilation,
false,
@@ -99,7 +82,6 @@
false,
"Trace only optimizing compiler operations.");
DEFINE_FLAG(bool, trace_bailout, false, "Print bailout from ssa compiler.");
-DEFINE_FLAG(bool, use_inlining, true, "Enable call-site inlining");
DEFINE_FLAG(bool,
verify_compiler,
false,
@@ -839,12 +821,8 @@
(optimized() && FLAG_print_flow_graph_optimized)) &&
FlowGraphPrinter::ShouldPrint(function);
- if (print_flow_graph) {
- if (osr_id() == Compiler::kNoOSRDeoptId) {
- FlowGraphPrinter::PrintGraph("Before Optimizations", flow_graph);
- } else {
- FlowGraphPrinter::PrintGraph("For OSR", flow_graph);
- }
+ if (print_flow_graph && !optimized()) {
+ FlowGraphPrinter::PrintGraph("Unoptimized Compilation", flow_graph);
}
BlockScheduler block_scheduler(flow_graph);
@@ -856,355 +834,38 @@
block_scheduler.AssignEdgeWeights();
}
- if (optimized()) {
- NOT_IN_PRODUCT(TimelineDurationScope tds(thread(), compiler_timeline,
- "ComputeSSA"));
- CSTAT_TIMER_SCOPE(thread(), ssa_timer);
- // Transform to SSA (virtual register 0 and no inlining arguments).
- flow_graph->ComputeSSA(0, NULL);
- DEBUG_ASSERT(flow_graph->VerifyUseLists());
- if (print_flow_graph) {
- FlowGraphPrinter::PrintGraph("After SSA", flow_graph);
- }
- }
+ CompilerPassState pass_state(thread(), flow_graph, &speculative_policy);
+ NOT_IN_PRODUCT(pass_state.compiler_timeline = compiler_timeline);
+ pass_state.block_scheduler = &block_scheduler;
+ pass_state.reorder_blocks = reorder_blocks;
- // Maps inline_id_to_function[inline_id] -> function. Top scope
- // function has inline_id 0. The map is populated by the inliner.
- GrowableArray<const Function*> inline_id_to_function;
- // Token position where inlining occured.
- GrowableArray<TokenPosition> inline_id_to_token_pos;
- // For a given inlining-id(index) specifies the caller's inlining-id.
- GrowableArray<intptr_t> caller_inline_id;
- // Collect all instance fields that are loaded in the graph and
- // have non-generic type feedback attached to them that can
- // potentially affect optimizations.
if (optimized()) {
NOT_IN_PRODUCT(TimelineDurationScope tds(thread(), compiler_timeline,
"OptimizationPasses"));
- inline_id_to_function.Add(&function);
+ CSTAT_TIMER_SCOPE(thread(), graphoptimizer_timer);
+
+ pass_state.inline_id_to_function.Add(&function);
// We do not add the token position now because we don't know the
// position of the inlined call until later. A side effect of this
// is that the length of |inline_id_to_function| is always larger
// than the length of |inline_id_to_token_pos| by one.
// Top scope function has no caller (-1). We do this because we expect
// all token positions to be at an inlined call.
- caller_inline_id.Add(-1);
- CSTAT_TIMER_SCOPE(thread(), graphoptimizer_timer);
+ pass_state.caller_inline_id.Add(-1);
JitCallSpecializer call_specializer(flow_graph, &speculative_policy);
+ pass_state.call_specializer = &call_specializer;
- {
- NOT_IN_PRODUCT(TimelineDurationScope tds(thread(), compiler_timeline,
- "ApplyICData"));
- call_specializer.ApplyICData();
- thread()->CheckForSafepoint();
- }
- DEBUG_ASSERT(flow_graph->VerifyUseLists());
-
- // Optimize (a << b) & c patterns, merge operations.
- // Run early in order to have more opportunity to optimize left shifts.
- flow_graph->TryOptimizePatterns();
- DEBUG_ASSERT(flow_graph->VerifyUseLists());
-
- FlowGraphInliner::SetInliningId(flow_graph, 0);
-
- int inlining_depth = 0;
-
- // Inlining (mutates the flow graph)
- if (FLAG_use_inlining) {
- NOT_IN_PRODUCT(TimelineDurationScope tds2(thread(), compiler_timeline,
- "Inlining"));
- CSTAT_TIMER_SCOPE(thread(), graphinliner_timer);
- // Propagate types to create more inlining opportunities.
- FlowGraphTypePropagator::Propagate(flow_graph);
- DEBUG_ASSERT(flow_graph->VerifyUseLists());
-
- // Use propagated class-ids to create more inlining opportunities.
- call_specializer.ApplyClassIds();
- DEBUG_ASSERT(flow_graph->VerifyUseLists());
-
- FlowGraphInliner inliner(flow_graph, &inline_id_to_function,
- &inline_id_to_token_pos, &caller_inline_id,
- &speculative_policy,
- /*precompiler=*/NULL);
- inlining_depth = inliner.Inline();
- // Use lists are maintained and validated by the inliner.
- DEBUG_ASSERT(flow_graph->VerifyUseLists());
- thread()->CheckForSafepoint();
- }
-
- // Propagate types and eliminate more type tests.
- FlowGraphTypePropagator::Propagate(flow_graph);
- DEBUG_ASSERT(flow_graph->VerifyUseLists());
-
- {
- NOT_IN_PRODUCT(TimelineDurationScope tds2(thread(), compiler_timeline,
- "ApplyClassIds"));
- // Use propagated class-ids to optimize further.
- call_specializer.ApplyClassIds();
- DEBUG_ASSERT(flow_graph->VerifyUseLists());
- }
-
- // Propagate types for potentially newly added instructions by
- // ApplyClassIds(). Must occur before canonicalization.
- FlowGraphTypePropagator::Propagate(flow_graph);
- DEBUG_ASSERT(flow_graph->VerifyUseLists());
-
- // Do optimizations that depend on the propagated type information.
- if (flow_graph->Canonicalize()) {
- // Invoke Canonicalize twice in order to fully canonicalize patterns
- // like "if (a & const == 0) { }".
- flow_graph->Canonicalize();
- }
- DEBUG_ASSERT(flow_graph->VerifyUseLists());
-
- {
- NOT_IN_PRODUCT(TimelineDurationScope tds2(thread(), compiler_timeline,
- "BranchSimplifier"));
- BranchSimplifier::Simplify(flow_graph);
- DEBUG_ASSERT(flow_graph->VerifyUseLists());
-
- IfConverter::Simplify(flow_graph);
- DEBUG_ASSERT(flow_graph->VerifyUseLists());
- }
-
- if (FLAG_constant_propagation) {
- NOT_IN_PRODUCT(TimelineDurationScope tds2(thread(), compiler_timeline,
- "ConstantPropagation");
- ConstantPropagator::Optimize(flow_graph));
- DEBUG_ASSERT(flow_graph->VerifyUseLists());
- // A canonicalization pass to remove e.g. smi checks on smi constants.
- flow_graph->Canonicalize();
- DEBUG_ASSERT(flow_graph->VerifyUseLists());
- // Canonicalization introduced more opportunities for constant
- // propagation.
- ConstantPropagator::Optimize(flow_graph);
- DEBUG_ASSERT(flow_graph->VerifyUseLists());
- thread()->CheckForSafepoint();
- }
-
- // Optimistically convert loop phis that have a single non-smi input
- // coming from the loop pre-header into smi-phis.
- if (FLAG_loop_invariant_code_motion) {
- LICM licm(flow_graph);
- licm.OptimisticallySpecializeSmiPhis();
- DEBUG_ASSERT(flow_graph->VerifyUseLists());
- }
-
- // Propagate types and eliminate even more type tests.
- // Recompute types after constant propagation to infer more precise
- // types for uses that were previously reached by now eliminated phis.
- FlowGraphTypePropagator::Propagate(flow_graph);
- DEBUG_ASSERT(flow_graph->VerifyUseLists());
-
- {
- NOT_IN_PRODUCT(TimelineDurationScope tds2(thread(), compiler_timeline,
- "SelectRepresentations"));
- // Where beneficial convert Smi operations into Int32 operations.
- // Only meanigful for 32bit platforms right now.
- flow_graph->WidenSmiToInt32();
-
- // Unbox doubles. Performed after constant propagation to minimize
- // interference from phis merging double values and tagged
- // values coming from dead paths.
- flow_graph->SelectRepresentations();
- DEBUG_ASSERT(flow_graph->VerifyUseLists());
- }
-
- {
- NOT_IN_PRODUCT(TimelineDurationScope tds2(
- thread(), compiler_timeline, "CommonSubexpressionElinination"));
-
- if (FLAG_common_subexpression_elimination) {
- if (DominatorBasedCSE::Optimize(flow_graph)) {
- DEBUG_ASSERT(flow_graph->VerifyUseLists());
- flow_graph->Canonicalize();
- // Do another round of CSE to take secondary effects into account:
- // e.g. when eliminating dependent loads (a.x[0] + a.x[0])
- // TODO(fschneider): Change to a one-pass optimization pass.
- if (DominatorBasedCSE::Optimize(flow_graph)) {
- flow_graph->Canonicalize();
- }
- DEBUG_ASSERT(flow_graph->VerifyUseLists());
- }
- }
-
- // Run loop-invariant code motion right after load elimination since
- // it depends on the numbering of loads from the previous
- // load-elimination.
- if (FLAG_loop_invariant_code_motion) {
- flow_graph->RenameUsesDominatedByRedefinitions();
- DEBUG_ASSERT(flow_graph->VerifyRedefinitions());
- LICM licm(flow_graph);
- licm.Optimize();
- DEBUG_ASSERT(flow_graph->VerifyUseLists());
- }
- flow_graph->RemoveRedefinitions();
- thread()->CheckForSafepoint();
- }
-
- // Optimize (a << b) & c patterns, merge operations.
- // Run after CSE in order to have more opportunity to merge
- // instructions that have same inputs.
- flow_graph->TryOptimizePatterns();
- DEBUG_ASSERT(flow_graph->VerifyUseLists());
-
- {
- NOT_IN_PRODUCT(TimelineDurationScope tds2(thread(), compiler_timeline,
- "DeadStoreElimination"));
- DeadStoreElimination::Optimize(flow_graph);
- }
-
- if (FLAG_range_analysis) {
- NOT_IN_PRODUCT(TimelineDurationScope tds2(thread(), compiler_timeline,
- "RangeAnalysis"));
- // Propagate types after store-load-forwarding. Some phis may have
- // become smi phis that can be processed by range analysis.
- FlowGraphTypePropagator::Propagate(flow_graph);
- DEBUG_ASSERT(flow_graph->VerifyUseLists());
-
- // We have to perform range analysis after LICM because it
- // optimistically moves CheckSmi through phis into loop preheaders
- // making some phis smi.
- RangeAnalysis range_analysis(flow_graph);
- range_analysis.Analyze();
- DEBUG_ASSERT(flow_graph->VerifyUseLists());
- }
-
- if (FLAG_constant_propagation) {
- NOT_IN_PRODUCT(TimelineDurationScope tds2(
- thread(), compiler_timeline,
- "ConstantPropagator::OptimizeBranches"));
- // Constant propagation can use information from range analysis to
- // find unreachable branch targets and eliminate branches that have
- // the same true- and false-target.
- ConstantPropagator::OptimizeBranches(flow_graph);
- DEBUG_ASSERT(flow_graph->VerifyUseLists());
- }
-
- // Recompute types after code movement was done to ensure correct
- // reaching types for hoisted values.
- FlowGraphTypePropagator::Propagate(flow_graph);
- DEBUG_ASSERT(flow_graph->VerifyUseLists());
-
- {
- NOT_IN_PRODUCT(TimelineDurationScope tds2(
- thread(), compiler_timeline, "TryCatchAnalyzer::Optimize"));
- // Optimize try-blocks.
- TryCatchAnalyzer::Optimize(flow_graph);
- }
-
- // Detach environments from the instructions that can't deoptimize.
- // Do it before we attempt to perform allocation sinking to minimize
- // amount of materializations it has to perform.
- flow_graph->EliminateEnvironments();
-
- {
- NOT_IN_PRODUCT(TimelineDurationScope tds2(thread(), compiler_timeline,
- "EliminateDeadPhis"));
- DeadCodeElimination::EliminateDeadPhis(flow_graph);
- DEBUG_ASSERT(flow_graph->VerifyUseLists());
- }
-
- if (flow_graph->Canonicalize()) {
- flow_graph->Canonicalize();
- }
-
- // Attempt to sink allocations of temporary non-escaping objects to
- // the deoptimization path.
- AllocationSinking* sinking = NULL;
- if (FLAG_allocation_sinking &&
- (flow_graph->graph_entry()->SuccessorCount() == 1)) {
- NOT_IN_PRODUCT(TimelineDurationScope tds2(
- thread(), compiler_timeline, "AllocationSinking::Optimize"));
- // TODO(fschneider): Support allocation sinking with try-catch.
- sinking = new AllocationSinking(flow_graph);
- sinking->Optimize();
- thread()->CheckForSafepoint();
- }
- DEBUG_ASSERT(flow_graph->VerifyUseLists());
-
- DeadCodeElimination::EliminateDeadPhis(flow_graph);
- DEBUG_ASSERT(flow_graph->VerifyUseLists());
-
- FlowGraphTypePropagator::Propagate(flow_graph);
- DEBUG_ASSERT(flow_graph->VerifyUseLists());
-
- {
- NOT_IN_PRODUCT(TimelineDurationScope tds2(thread(), compiler_timeline,
- "SelectRepresentations"));
- // Ensure that all phis inserted by optimization passes have
- // consistent representations.
- flow_graph->SelectRepresentations();
- }
-
- if (flow_graph->Canonicalize()) {
- // To fully remove redundant boxing (e.g. BoxDouble used only in
- // environments and UnboxDouble instructions) instruction we
- // first need to replace all their uses and then fold them away.
- // For now we just repeat Canonicalize twice to do that.
- // TODO(vegorov): implement a separate representation folding pass.
- flow_graph->Canonicalize();
- }
- DEBUG_ASSERT(flow_graph->VerifyUseLists());
-
- if (!flow_graph->IsCompiledForOsr()) {
- CheckStackOverflowElimination::EliminateStackOverflow(flow_graph);
-
- if (flow_graph->Canonicalize()) {
- // To fully remove redundant boxing (e.g. BoxDouble used only in
- // environments and UnboxDouble instructions) instruction we
- // first need to replace all their uses and then fold them away.
- // For now we just repeat Canonicalize twice to do that.
- // TODO(vegorov): implement a separate representation folding pass.
- flow_graph->Canonicalize();
- }
- DEBUG_ASSERT(flow_graph->VerifyUseLists());
- }
-
- if (sinking != NULL) {
- NOT_IN_PRODUCT(TimelineDurationScope tds2(
- thread(), compiler_timeline,
- "AllocationSinking::DetachMaterializations"));
- // Remove all MaterializeObject instructions inserted by allocation
- // sinking from the flow graph and let them float on the side
- // referenced only from environments. Register allocator will consider
- // them as part of a deoptimization environment.
- sinking->DetachMaterializations();
- }
-
- // Compute and store graph informations (call & instruction counts)
- // to be later used by the inliner.
- FlowGraphInliner::CollectGraphInfo(flow_graph, true);
- function.set_inlining_depth(inlining_depth);
-
- flow_graph->RemoveRedefinitions();
- {
- NOT_IN_PRODUCT(TimelineDurationScope tds2(thread(), compiler_timeline,
- "AllocateRegisters"));
- // Perform register allocation on the SSA graph.
- FlowGraphAllocator allocator(*flow_graph);
- allocator.AllocateRegisters();
- thread()->CheckForSafepoint();
- }
-
- if (reorder_blocks) {
- NOT_IN_PRODUCT(TimelineDurationScope tds(
- thread(), compiler_timeline, "BlockScheduler::ReorderBlocks"));
- block_scheduler.ReorderBlocks();
- }
-
- if (print_flow_graph) {
- FlowGraphPrinter::PrintGraph("After Optimizations", flow_graph);
- }
+ CompilerPass::RunPipeline(CompilerPass::kJIT, &pass_state);
}
- ASSERT(inline_id_to_function.length() == caller_inline_id.length());
+ ASSERT(pass_state.inline_id_to_function.length() ==
+ pass_state.caller_inline_id.length());
Assembler assembler(use_far_branches);
FlowGraphCompiler graph_compiler(
&assembler, flow_graph, *parsed_function(), optimized(),
- &speculative_policy, inline_id_to_function, inline_id_to_token_pos,
- caller_inline_id);
+ &speculative_policy, pass_state.inline_id_to_function,
+ pass_state.inline_id_to_token_pos, pass_state.caller_inline_id);
{
CSTAT_TIMER_SCOPE(thread(), graphcompiler_timer);
NOT_IN_PRODUCT(TimelineDurationScope tds(thread(), compiler_timeline,
@@ -1236,12 +897,6 @@
*result =
FinalizeCompilation(&assembler, &graph_compiler, flow_graph);
}
- // TODO(srdjan): Enable this and remove the one from
- // 'BackgroundCompiler::CompileOptimized' once cause of time-outs
- // is resolved.
- // if (isolate()->heap()->NeedsGarbageCollection()) {
- // isolate()->heap()->CollectAllGarbage();
- // }
}
}
// Exit the loop and the function with the correct result value.
diff --git a/runtime/vm/compiler/method_recognizer.h b/runtime/vm/compiler/method_recognizer.h
index 67ae5b3..23686a3 100644
--- a/runtime/vm/compiler/method_recognizer.h
+++ b/runtime/vm/compiler/method_recognizer.h
@@ -146,14 +146,15 @@
V(_Smi, ~, Smi_bitNegate, Smi, 0x67299f4f) \
V(_Smi, get:bitLength, Smi_bitLength, Smi, 0x25b3cb0a) \
V(_Smi, _bitAndFromSmi, Smi_bitAndFromSmi, Smi, 0x562d5047) \
- V(_Bigint, _lsh, Bigint_lsh, Dynamic, 0x7b99f80e) \
- V(_Bigint, _rsh, Bigint_rsh, Dynamic, 0x5262b3a1) \
- V(_Bigint, _absAdd, Bigint_absAdd, Dynamic, 0x07cad968) \
- V(_Bigint, _absSub, Bigint_absSub, Dynamic, 0x1bf1bb4c) \
- V(_Bigint, _mulAdd, Bigint_mulAdd, Dynamic, 0x229759b7) \
- V(_Bigint, _sqrAdd, Bigint_sqrAdd, Dynamic, 0x5212b81f) \
- V(_Bigint, _estQuotientDigit, Bigint_estQuotientDigit, Dynamic, 0x4dd342fe) \
- V(_Montgomery, _mulMod, Montgomery_mulMod, Dynamic, 0x17a515ac) \
+ V(_BigIntImpl, _lsh, Bigint_lsh, Dynamic, 0x6cd9b291) \
+ V(_BigIntImpl, _rsh, Bigint_rsh, Dynamic, 0x1ac17d4d) \
+ V(_BigIntImpl, _absAdd, Bigint_absAdd, Dynamic, 0x5bf14238) \
+ V(_BigIntImpl, _absSub, Bigint_absSub, Dynamic, 0x1de5bd32) \
+ V(_BigIntImpl, _mulAdd, Bigint_mulAdd, Smi, 0x6f277966) \
+ V(_BigIntImpl, _sqrAdd, Bigint_sqrAdd, Smi, 0x68e4c8ea) \
+ V(_BigIntImpl, _estimateQuotientDigit, Bigint_estQuotientDigit, Smi, \
+ 0x35456d91) \
+ V(_BigIntMontgomeryReduction, _mulMod, Montgomery_mulMod, Smi, 0x0f7b0375) \
V(_Double, >, Double_greaterThan, Bool, 0x4f1375a3) \
V(_Double, >=, Double_greaterEqualThan, Bool, 0x4260c184) \
V(_Double, <, Double_lessThan, Bool, 0x365d1eba) \
@@ -460,14 +461,14 @@
V(::, sin, MathSin, 0x6b7bd98c) \
V(::, sqrt, MathSqrt, 0x70482cf3) \
V(::, tan, MathTan, 0x3bcd772a) \
- V(_Bigint, _lsh, Bigint_lsh, 0x7b99f80e) \
- V(_Bigint, _rsh, Bigint_rsh, 0x5262b3a1) \
- V(_Bigint, _absAdd, Bigint_absAdd, 0x07cad968) \
- V(_Bigint, _absSub, Bigint_absSub, 0x1bf1bb4c) \
- V(_Bigint, _mulAdd, Bigint_mulAdd, 0x229759b7) \
- V(_Bigint, _sqrAdd, Bigint_sqrAdd, 0x5212b81f) \
- V(_Bigint, _estQuotientDigit, Bigint_estQuotientDigit, 0x4dd342fe) \
- V(_Montgomery, _mulMod, Montgomery_mulMod, 0x17a515ac) \
+ V(_BigIntImpl, _lsh, Bigint_lsh, 0x6cd9b291) \
+ V(_BigIntImpl, _rsh, Bigint_rsh, 0x1ac17d4d) \
+ V(_BigIntImpl, _absAdd, Bigint_absAdd, 0x5bf14238) \
+ V(_BigIntImpl, _absSub, Bigint_absSub, 0x1de5bd32) \
+ V(_BigIntImpl, _mulAdd, Bigint_mulAdd, 0x6f277966) \
+ V(_BigIntImpl, _sqrAdd, Bigint_sqrAdd, 0x68e4c8ea) \
+ V(_BigIntImpl, _estimateQuotientDigit, Bigint_estQuotientDigit, 0x35456d91) \
+ V(_BigIntMontgomeryReduction, _mulMod, Montgomery_mulMod, 0x0f7b0375) \
V(_Double, >, Double_greaterThan, 0x4f1375a3) \
V(_Double, >=, Double_greaterEqualThan, 0x4260c184) \
V(_Double, <, Double_lessThan, 0x365d1eba) \
diff --git a/runtime/vm/constants_arm64.h b/runtime/vm/constants_arm64.h
index 1665a3a..829e3d9 100644
--- a/runtime/vm/constants_arm64.h
+++ b/runtime/vm/constants_arm64.h
@@ -525,7 +525,10 @@
MSUB = MiscDP3SourceFixed | B15,
SMULH = MiscDP3SourceFixed | B31 | B22,
UMULH = MiscDP3SourceFixed | B31 | B23 | B22,
+ SMADDL = MiscDP3SourceFixed | B31 | B21,
UMADDL = MiscDP3SourceFixed | B31 | B23 | B21,
+ SMSUBL = MiscDP3SourceFixed | B31 | B21 | B15,
+ UMSUBL = MiscDP3SourceFixed | B31 | B23 | B21 | B15,
};
// C3.5.10
diff --git a/runtime/vm/flags.cc b/runtime/vm/flags.cc
index 998d322..dbee5f1 100644
--- a/runtime/vm/flags.cc
+++ b/runtime/vm/flags.cc
@@ -80,12 +80,28 @@
class Flag {
public:
- enum FlagType { kBoolean, kInteger, kUint64, kString, kFunc, kNumFlagTypes };
+ enum FlagType {
+ kBoolean,
+ kInteger,
+ kUint64,
+ kString,
+ kFlagHandler,
+ kOptionHandler,
+ kNumFlagTypes
+ };
Flag(const char* name, const char* comment, void* addr, FlagType type)
: name_(name), comment_(comment), addr_(addr), type_(type) {}
Flag(const char* name, const char* comment, FlagHandler handler)
- : name_(name), comment_(comment), handler_(handler), type_(kFunc) {}
+ : name_(name),
+ comment_(comment),
+ flag_handler_(handler),
+ type_(kFlagHandler) {}
+ Flag(const char* name, const char* comment, OptionHandler handler)
+ : name_(name),
+ comment_(comment),
+ option_handler_(handler),
+ type_(kOptionHandler) {}
void Print() {
if (IsUnrecognized()) {
@@ -114,7 +130,8 @@
}
break;
}
- case kFunc: {
+ case kOptionHandler:
+ case kFlagHandler: {
OS::Print("%s: (%s)\n", name_, comment_);
break;
}
@@ -136,7 +153,8 @@
int* int_ptr_;
uint64_t* uint64_ptr_;
charp* charp_ptr_;
- FlagHandler handler_;
+ FlagHandler flag_handler_;
+ OptionHandler option_handler_;
};
FlagType type_;
bool changed_;
@@ -226,9 +244,18 @@
return default_value;
}
-bool Flags::Register_func(FlagHandler handler,
- const char* name,
- const char* comment) {
+bool Flags::RegisterFlagHandler(FlagHandler handler,
+ const char* name,
+ const char* comment) {
+ ASSERT(Lookup(name) == NULL);
+ Flag* flag = new Flag(name, comment, handler);
+ AddFlag(flag);
+ return false;
+}
+
+bool Flags::RegisterOptionHandler(OptionHandler handler,
+ const char* name,
+ const char* comment) {
ASSERT(Lookup(name) == NULL);
Flag* flag = new Flag(name, comment, handler);
AddFlag(flag);
@@ -291,16 +318,20 @@
}
break;
}
- case Flag::kFunc: {
+ case Flag::kFlagHandler: {
if (strcmp(argument, "true") == 0) {
- (flag->handler_)(true);
+ (flag->flag_handler_)(true);
} else if (strcmp(argument, "false") == 0) {
- (flag->handler_)(false);
+ (flag->flag_handler_)(false);
} else {
return false;
}
break;
}
+ case Flag::kOptionHandler: {
+ (flag->option_handler_)(argument);
+ break;
+ }
default: {
UNREACHABLE();
return false;
@@ -453,7 +484,8 @@
if (!FLAG_support_service) {
return;
}
- if (flag->IsUnrecognized() || flag->type_ == Flag::kFunc) {
+ if (flag->IsUnrecognized() || flag->type_ == Flag::kFlagHandler ||
+ flag->type_ == Flag::kOptionHandler) {
return;
}
JSONObject jsflag(jsarr);
diff --git a/runtime/vm/flags.h b/runtime/vm/flags.h
index 2b31c35..a83e2e0 100644
--- a/runtime/vm/flags.h
+++ b/runtime/vm/flags.h
@@ -18,11 +18,15 @@
Flags::Register_##type(&FLAG_##name, #name, default_value, comment);
#define DEFINE_FLAG_HANDLER(handler, name, comment) \
- bool DUMMY_##name = Flags::Register_func(handler, #name, comment);
+ bool DUMMY_##name = Flags::RegisterFlagHandler(handler, #name, comment);
+
+#define DEFINE_OPTION_HANDLER(handler, name, comment) \
+ bool DUMMY_##name = Flags::RegisterOptionHandler(handler, #name, comment);
namespace dart {
typedef void (*FlagHandler)(bool value);
+typedef void (*OptionHandler)(const char* value);
// Forward declarations.
class Flag;
@@ -51,9 +55,13 @@
const char* default_value,
const char* comment);
- static bool Register_func(FlagHandler handler,
- const char* name,
- const char* comment);
+ static bool RegisterFlagHandler(FlagHandler handler,
+ const char* name,
+ const char* comment);
+
+ static bool RegisterOptionHandler(OptionHandler handler,
+ const char* name,
+ const char* comment);
static bool ProcessCommandLineFlags(int argc, const char** argv);
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
index 707af78..e03dcb1 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -17543,16 +17543,19 @@
Zone* zone = thread->zone();
Isolate* isolate = thread->isolate();
- // Since void is a keyword, we never have to canonicalize the void type after
- // it is canonicalized once by the vm isolate. The parser does the mapping.
- ASSERT((type_class_id() != kVoidCid) || (isolate == Dart::vm_isolate()));
+ if ((type_class_id() == kVoidCid) && (isolate != Dart::vm_isolate())) {
+ ASSERT(Object::void_type().IsCanonical());
+ return Object::void_type().raw();
+ }
- // Since dynamic is not a keyword, the parser builds a type that requires
- // canonicalization.
if ((type_class_id() == kDynamicCid) && (isolate != Dart::vm_isolate())) {
ASSERT(Object::dynamic_type().IsCanonical());
return Object::dynamic_type().raw();
}
+ if ((type_class_id() == kVectorCid) && (isolate != Dart::vm_isolate())) {
+ ASSERT(Object::vector_type().IsCanonical());
+ return Object::vector_type().raw();
+ }
const Class& cls = Class::Handle(zone, type_class());
diff --git a/runtime/vm/object.h b/runtime/vm/object.h
index a03522c..4f1f085 100644
--- a/runtime/vm/object.h
+++ b/runtime/vm/object.h
@@ -6289,6 +6289,9 @@
virtual bool IsMalformedOrMalbounded() const {
return AbstractType::Handle(type()).IsMalformedOrMalbounded();
}
+ virtual RawLanguageError* error() const {
+ return AbstractType::Handle(type()).error();
+ }
virtual bool IsResolved() const { return true; }
virtual bool HasResolvedTypeClass() const {
return (type() != AbstractType::null()) &&
diff --git a/runtime/vm/simulator_arm64.cc b/runtime/vm/simulator_arm64.cc
index a97c62c..4c9495a 100644
--- a/runtime/vm/simulator_arm64.cc
+++ b/runtime/vm/simulator_arm64.cc
@@ -2573,14 +2573,22 @@
const uint64_t alu_out = static_cast<uint64_t>(res >> 64);
#endif // HOST_OS_WINDOWS
set_register(instr, rd, alu_out, R31IsZR);
- } else if ((instr->Bits(29, 3) == 4) && (instr->Bits(21, 3) == 5) &&
- (instr->Bit(15) == 0)) {
- // Format(instr, "umaddl 'rd, 'rn, 'rm, 'ra");
- const uint64_t rn_val = static_cast<uint32_t>(get_wregister(rn, R31IsZR));
- const uint64_t rm_val = static_cast<uint32_t>(get_wregister(rm, R31IsZR));
- const uint64_t ra_val = get_register(ra, R31IsZR);
- const uint64_t alu_out = ra_val + (rn_val * rm_val);
- set_register(instr, rd, alu_out, R31IsZR);
+ } else if ((instr->Bits(29, 3) == 4) && (instr->Bit(15) == 0)) {
+ if (instr->Bits(21, 3) == 5) {
+ // Format(instr, "umaddl 'rd, 'rn, 'rm, 'ra");
+ const uint64_t rn_val = static_cast<uint32_t>(get_wregister(rn, R31IsZR));
+ const uint64_t rm_val = static_cast<uint32_t>(get_wregister(rm, R31IsZR));
+ const uint64_t ra_val = get_register(ra, R31IsZR);
+ const uint64_t alu_out = ra_val + (rn_val * rm_val);
+ set_register(instr, rd, alu_out, R31IsZR);
+ } else {
+ // Format(instr, "smaddl 'rd, 'rn, 'rm, 'ra");
+ const int64_t rn_val = static_cast<int32_t>(get_wregister(rn, R31IsZR));
+ const int64_t rm_val = static_cast<int32_t>(get_wregister(rm, R31IsZR));
+ const int64_t ra_val = get_register(ra, R31IsZR);
+ const int64_t alu_out = ra_val + (rn_val * rm_val);
+ set_register(instr, rd, alu_out, R31IsZR);
+ }
} else {
UnimplementedInstruction(instr);
}
diff --git a/runtime/vm/thread.cc b/runtime/vm/thread.cc
index 981b1dc..239b06a7 100644
--- a/runtime/vm/thread.cc
+++ b/runtime/vm/thread.cc
@@ -661,19 +661,53 @@
}
bool Thread::CanLoadFromThread(const Object& object) {
+ // In order to allow us to use assembler helper routines with non-[Code]
+ // objects *before* stubs are initialized, we only loop ver the stubs if the
+ // [object] is in fact a [Code] object.
+ if (object.IsCode()) {
#define CHECK_OBJECT(type_name, member_name, expr, default_init_value) \
- if (object.raw() == expr) return true;
- CACHED_VM_OBJECTS_LIST(CHECK_OBJECT)
+ if (object.raw() == expr) { \
+ return true; \
+ }
+ CACHED_VM_STUBS_LIST(CHECK_OBJECT)
+#undef CHECK_OBJECT
+ }
+
+ // For non [Code] objects we check if the object equals to any of the cached
+ // non-stub entries.
+#define CHECK_OBJECT(type_name, member_name, expr, default_init_value) \
+ if (object.raw() == expr) { \
+ return true; \
+ }
+ CACHED_NON_VM_STUB_LIST(CHECK_OBJECT)
#undef CHECK_OBJECT
return false;
}
intptr_t Thread::OffsetFromThread(const Object& object) {
+ // In order to allow us to use assembler helper routines with non-[Code]
+ // objects *before* stubs are initialized, we only loop ver the stubs if the
+ // [object] is in fact a [Code] object.
+ if (object.IsCode()) {
#define COMPUTE_OFFSET(type_name, member_name, expr, default_init_value) \
ASSERT((expr)->IsVMHeapObject()); \
- if (object.raw() == expr) return Thread::member_name##offset();
- CACHED_VM_OBJECTS_LIST(COMPUTE_OFFSET)
+ if (object.raw() == expr) { \
+ return Thread::member_name##offset(); \
+ }
+ CACHED_VM_STUBS_LIST(COMPUTE_OFFSET)
#undef COMPUTE_OFFSET
+ }
+
+ // For non [Code] objects we check if the object equals to any of the cached
+ // non-stub entries.
+#define COMPUTE_OFFSET(type_name, member_name, expr, default_init_value) \
+ ASSERT((expr)->IsVMHeapObject()); \
+ if (object.raw() == expr) { \
+ return Thread::member_name##offset(); \
+ }
+ CACHED_NON_VM_STUB_LIST(COMPUTE_OFFSET)
+#undef COMPUTE_OFFSET
+
UNREACHABLE();
return -1;
}
diff --git a/runtime/vm/thread.h b/runtime/vm/thread.h
index ec32052..2c51ce0 100644
--- a/runtime/vm/thread.h
+++ b/runtime/vm/thread.h
@@ -101,12 +101,15 @@
#endif
+#define CACHED_NON_VM_STUB_LIST(V) \
+ V(RawObject*, object_null_, Object::null(), NULL) \
+ V(RawBool*, bool_true_, Object::bool_true().raw(), NULL) \
+ V(RawBool*, bool_false_, Object::bool_false().raw(), NULL)
+
// List of VM-global objects/addresses cached in each Thread object.
// Important: constant false must immediately follow constant true.
#define CACHED_VM_OBJECTS_LIST(V) \
- V(RawObject*, object_null_, Object::null(), NULL) \
- V(RawBool*, bool_true_, Object::bool_true().raw(), NULL) \
- V(RawBool*, bool_false_, Object::bool_false().raw(), NULL) \
+ CACHED_NON_VM_STUB_LIST(V) \
CACHED_VM_STUBS_LIST(V)
// This assertion marks places which assume that boolean false immediate
diff --git a/sdk/BUILD.gn b/sdk/BUILD.gn
index 1bff383..ed685d8 100644
--- a/sdk/BUILD.gn
+++ b/sdk/BUILD.gn
@@ -64,6 +64,7 @@
#.........spec.sum
#.........strong.sum
#.........dart2js_platform.dill
+#.........dart2js_platform_strong.dill
#.........vm_outline.dill
#.........vm_outline_strong.dill
#.........vm_platform.dill
@@ -547,9 +548,11 @@
deps = [
":copy_libraries",
"../utils/compiler:compile_dart2js_platform",
+ "../utils/compiler:compile_dart2js_platform_strong",
]
sources = [
"$root_out_dir/dart2js_platform.dill",
+ "$root_out_dir/dart2js_platform_strong.dill",
]
outputs = [
"$root_out_dir/dart-sdk/lib/_internal/{{source_file_part}}",
diff --git a/sdk/lib/_internal/js_runtime/lib/js_helper.dart b/sdk/lib/_internal/js_runtime/lib/js_helper.dart
index 1f58cc4..ed7134c 100644
--- a/sdk/lib/_internal/js_runtime/lib/js_helper.dart
+++ b/sdk/lib/_internal/js_runtime/lib/js_helper.dart
@@ -3074,6 +3074,54 @@
}
}
+/// Support class for generic function type instantiation (binding of types).
+///
+abstract class Instantiation extends Closure {
+ final Closure _genericClosure;
+ Instantiation(this._genericClosure) {
+ // TODO(sra): Copy some metadata used by Function.apply.
+ }
+
+ /// Returns a list of the bound types.
+ List get _types;
+
+ String toString() {
+ var types = "<${_types.join(', ')}>";
+ // TODO(sra): Refactor Closure formatting to place type arguments inside,
+ // e.g. "Closure 'map<String>' of Instance of 'JSArray<int>'".
+ return '$_genericClosure with $types';
+ }
+}
+
+/// Instantiation classes are subclasses of [Instantiation]. For now we have a
+/// few canned subclasses. Later we might generate the classes on demand.
+class Instantiation1<T1> extends Instantiation {
+ Instantiation1(Closure f) : super(f);
+ List get _types => [T1];
+}
+
+class Instantiation2<T1, T2> extends Instantiation {
+ Instantiation2(Closure f) : super(f);
+ List get _types => [T1, T2];
+}
+
+class Instantiation3<T1, T2, T3> extends Instantiation {
+ Instantiation3(Closure f) : super(f);
+ List get _types => [T1, T2, T3];
+}
+
+Instantiation instantiate1<U>(Closure f) {
+ return new Instantiation1<U>(f);
+}
+
+Instantiation instantiate2<U, V>(Closure f) {
+ return new Instantiation2<U, V>(f);
+}
+
+Instantiation instantiate3<U, V, W>(Closure f) {
+ return new Instantiation3<U, V, W>(f);
+}
+
bool jsHasOwnProperty(var jsObject, String property) {
return JS('bool', r'#.hasOwnProperty(#)', jsObject, property);
}
diff --git a/sdk/lib/core/core.dart b/sdk/lib/core/core.dart
index bb46d6c..ca55d4a 100644
--- a/sdk/lib/core/core.dart
+++ b/sdk/lib/core/core.dart
@@ -101,7 +101,7 @@
* and used by Map for its keys and values.
*
* For other kinds of collections, check out the
- * [dart:collection](#dart-collection) library.
+ * `dart:collection` library.
*
* ## Date and time
*
diff --git a/sdk/lib/core/iterable.dart b/sdk/lib/core/iterable.dart
index 410b57d..8341360 100644
--- a/sdk/lib/core/iterable.dart
+++ b/sdk/lib/core/iterable.dart
@@ -38,7 +38,7 @@
* }
*
* The [List] and [Set] classes are both `Iterable`,
- * as are most classes in the [dart:collection](#dart-collection) library.
+ * as are most classes in the `dart:collection` library.
*
* Some [Iterable] collections can be modified.
* Adding an element to a `List` or `Set` will change which elements it
diff --git a/sdk/lib/html/dart2js/html_dart2js.dart b/sdk/lib/html/dart2js/html_dart2js.dart
index 82e2175..b3de731 100644
--- a/sdk/lib/html/dart2js/html_dart2js.dart
+++ b/sdk/lib/html/dart2js/html_dart2js.dart
@@ -10749,6 +10749,7 @@
bool get supportsRegister => supportsRegisterElement;
@DomName('Document.createElement')
+ @ForceInline() // Almost all call sites have one argument.
Element createElement(String tagName, [String typeExtension]) {
return (typeExtension == null)
? _createElement_2(tagName)
@@ -42929,6 +42930,9 @@
this;
bool get isBroadcast => true;
+ // TODO(9757): Inlining should be smart and inline only when inlining would
+ // enable scalar replacement of an immediately allocated receiver.
+ @ForceInline()
StreamSubscription<T> listen(void onData(T event),
{Function onError, void onDone(), bool cancelOnError}) {
return new _EventStreamSubscription<T>(
diff --git a/sdk/lib/io/socket.dart b/sdk/lib/io/socket.dart
index 3f89cff..b1565cd 100644
--- a/sdk/lib/io/socket.dart
+++ b/sdk/lib/io/socket.dart
@@ -80,7 +80,7 @@
/**
* The [type] of the [InternetAddress] specified what IP protocol.
*/
- InternetAddressType type;
+ InternetAddressType get type;
/**
* The numeric address of the host. For IPv4 addresses this is using
diff --git a/tests/compiler/dart2js/class_set_test.dart b/tests/compiler/dart2js/class_set_test.dart
index 6f446e6..cf71cf5 100644
--- a/tests/compiler/dart2js/class_set_test.dart
+++ b/tests/compiler/dart2js/class_set_test.dart
@@ -9,6 +9,7 @@
import 'package:expect/expect.dart';
import 'package:async_helper/async_helper.dart';
import 'type_test_helper.dart';
+import 'package:compiler/src/commandline_options.dart';
import 'package:compiler/src/elements/entities.dart' show ClassEntity;
import 'package:compiler/src/universe/class_set.dart';
import 'package:compiler/src/util/enumset.dart';
@@ -21,13 +22,15 @@
await testAll(CompileMode.memory);
print('--test from kernel------------------------------------------------');
await testAll(CompileMode.kernel);
+ print('--test from kernel (strong)---------------------------------------');
+ await testAll(CompileMode.kernel, strongMode: true);
});
}
-testAll(CompileMode compileMode) async {
+testAll(CompileMode compileMode, {bool strongMode: false}) async {
await testIterators(compileMode);
await testForEach(compileMode);
- await testClosures(compileMode);
+ await testClosures(compileMode, strongMode);
}
testIterators(CompileMode compileMode) async {
@@ -587,30 +590,37 @@
find: I, anySubtype: true, expectedResult: true);
}
-testClosures(CompileMode compileMode) async {
+testClosures(CompileMode compileMode, bool strongMode) async {
var env = await TypeEnvironment.create(r"""
class A {
call() => null;
}
- """, mainSource: r"""
+ """,
+ mainSource: r"""
main() {
new A();
() {};
local() {}
}
- """, compileMode: compileMode, testBackendWorld: true);
+ """,
+ compileMode: compileMode,
+ options: strongMode ? [Flags.strongMode] : [],
+ testBackendWorld: true);
ClosedWorld world = env.closedWorld;
ClassEntity functionClass = world.commonElements.functionClass;
ClassEntity closureClass = world.commonElements.closureClass;
ClassEntity A = env.getClass("A");
- checkIsFunction(ClassEntity cls) {
- Expect.isTrue(world.isSubtypeOf(cls, functionClass),
- "Expected $cls to be a subtype of $functionClass.");
+ checkIsFunction(ClassEntity cls, {bool expected: true}) {
+ Expect.equals(
+ expected,
+ world.isSubtypeOf(cls, functionClass),
+ "Expected $cls ${expected ? '' : 'not '}to be a subtype "
+ "of $functionClass.");
}
- checkIsFunction(A);
+ checkIsFunction(A, expected: !strongMode);
world.forEachStrictSubtypeOf(closureClass, checkIsFunction);
}
diff --git a/tests/compiler/dart2js/dart2js.status b/tests/compiler/dart2js/dart2js.status
index 39af62a..0f13e20 100644
--- a/tests/compiler/dart2js/dart2js.status
+++ b/tests/compiler/dart2js/dart2js.status
@@ -91,6 +91,7 @@
codegen/value_range_test: Pass, Slow
codegen/value_range_kernel_test: Pass, Slow
end_to_end/exit_code_test: Pass, Slow
+generic_methods/world_test: RuntimeError
jsinterop/declaration_test: Slow, Pass
jsinterop/interop_anonymous_unreachable_test: Pass, Slow
jsinterop/world_test: Pass, Slow
diff --git a/tests/compiler/dart2js/equivalence/id_equivalence_helper.dart b/tests/compiler/dart2js/equivalence/id_equivalence_helper.dart
index 23dfb6f..253b3da 100644
--- a/tests/compiler/dart2js/equivalence/id_equivalence_helper.dart
+++ b/tests/compiler/dart2js/equivalence/id_equivalence_helper.dart
@@ -440,7 +440,9 @@
args = args.toList();
bool verbose = args.remove('-v');
bool shouldContinue = args.remove('-c');
+ bool testAfterFailures = args.remove('-a');
bool continued = false;
+ bool hasFailures = false;
var relativeDir = dataDir.uri.path.replaceAll(Uri.base.path, '');
print('Data dir: ${relativeDir}');
@@ -521,7 +523,10 @@
verbose: verbose,
forUserLibrariesOnly: forUserLibrariesOnly,
globalIds: annotations.globalData.keys);
- await checkCode(code, annotations, compiledData1);
+ if (await checkCode(code, annotations, compiledData1,
+ fatalErrors: !testAfterFailures)) {
+ hasFailures = true;
+ }
}
if (skipForKernel.contains(name)) {
print('--skipped for kernel--------------------------------------------');
@@ -535,19 +540,24 @@
verbose: verbose,
forUserLibrariesOnly: forUserLibrariesOnly,
globalIds: annotations.globalData.keys);
- await checkCode(code, annotations, compiledData2,
- filterActualData: filterActualData);
+ if (await checkCode(code, annotations, compiledData2,
+ filterActualData: filterActualData,
+ fatalErrors: !testAfterFailures)) {
+ hasFailures = true;
+ }
}
}
+ Expect.isFalse(hasFailures, 'Errors found.');
}
final Set<String> userFiles = new Set<String>();
/// Checks [compiledData] against the expected data in [expectedMap] derived
/// from [code].
-Future checkCode(Map<Uri, AnnotatedCode> code,
+Future<bool> checkCode(Map<Uri, AnnotatedCode> code,
MemberAnnotations<IdValue> expectedMaps, CompiledData compiledData,
- {bool filterActualData(IdValue expected, ActualData actualData)}) async {
+ {bool filterActualData(IdValue expected, ActualData actualData),
+ bool fatalErrors: true}) async {
IdData data = new IdData(code, expectedMaps, compiledData);
bool hasFailure = false;
@@ -641,9 +651,10 @@
print("Ids not found: ${missingIds}.");
hasFailure = true;
}
- if (hasFailure) {
+ if (hasFailure && fatalErrors) {
Expect.fail('Errors found.');
}
+ return hasFailure;
}
/// Compute a [Spannable] from an [id] in the library [mainUri].
diff --git a/tests/compiler/dart2js/old_frontend/analyze_dart2js_test.dart b/tests/compiler/dart2js/old_frontend/analyze_dart2js_test.dart
index 5f4a8e0..e10862d 100644
--- a/tests/compiler/dart2js/old_frontend/analyze_dart2js_test.dart
+++ b/tests/compiler/dart2js/old_frontend/analyze_dart2js_test.dart
@@ -37,30 +37,6 @@
"third_party/pkg/collection/lib/src/functions.dart": const [
"Method type variables are treated as `dynamic` in `as` expressions."
],
- "pkg/front_end/lib/src/fasta/kernel/kernel_shadow_ast.dart": const [
- "Library 'dart:core' doesn't export a 'MapEntry' declaration.",
- ],
- "pkg/front_end/lib/src/fasta/kernel/body_builder.dart": const [
- "Library 'dart:core' doesn't export a 'MapEntry' declaration.",
- ],
- "pkg/kernel/lib/visitor.dart": const [
- "Library 'dart:core' doesn't export a 'MapEntry' declaration.",
- ],
- "pkg/kernel/lib/text/ast_to_text.dart": const [
- "Library 'dart:core' doesn't export a 'MapEntry' declaration.",
- ],
- "pkg/kernel/lib/target/vm.dart": const [
- "Library 'dart:core' doesn't export a 'MapEntry' declaration.",
- ],
- "pkg/kernel/lib/clone.dart": const [
- "Library 'dart:core' doesn't export a 'MapEntry' declaration.",
- ],
- "pkg/kernel/lib/binary/ast_to_binary.dart": const [
- "Library 'dart:core' doesn't export a 'MapEntry' declaration.",
- ],
- "pkg/kernel/lib/binary/ast_from_binary.dart": const [
- "Library 'dart:core' doesn't export a 'MapEntry' declaration.",
- ],
"sdk/lib/_internal/js_runtime/lib/js_array.dart": const [
"Method type variables do not have a runtime value.",
],
diff --git a/tests/compiler/dart2js/old_frontend/mock_libraries.dart b/tests/compiler/dart2js/old_frontend/mock_libraries.dart
index fae6bca..3544485 100644
--- a/tests/compiler/dart2js/old_frontend/mock_libraries.dart
+++ b/tests/compiler/dart2js/old_frontend/mock_libraries.dart
@@ -218,6 +218,9 @@
'getTypeArgumentByIndex': 'getTypeArgumentByIndex(target, index) {}',
'GeneralConstantMap': 'class GeneralConstantMap {}',
'iae': 'iae(x) { throw x; } ioore(x) { throw x; }',
+ 'Instantiation1': 'class Instantiation1<T1> extends Closure {}',
+ 'Instantiation2': 'class Instantiation2<T1,T2> extends Closure {}',
+ 'Instantiation3': 'class Instantiation3<T1,T2,T3> extends Closure {}',
'interceptedTypeCast': 'interceptedTypeCast(value, property) {}',
'interceptedTypeCheck': 'interceptedTypeCheck(value, property) {}',
'intTypeCast': 'intTypeCast(value) {}',
diff --git a/tests/compiler/dart2js/rti/data/generic_class_is2.dart b/tests/compiler/dart2js/rti/data/generic_class_is2.dart
index 508466d..2cfc7ac 100644
--- a/tests/compiler/dart2js/rti/data/generic_class_is2.dart
+++ b/tests/compiler/dart2js/rti/data/generic_class_is2.dart
@@ -8,6 +8,7 @@
/*class: A:implicit=[List<A<C2>>,List<A<C>>]*/
class A<T> {}
+/*kernel.class: A1:implicit=[A1]*/
class A1 implements A<C1> {}
/*class: B:direct,explicit=[B.T],needsArgs*/
diff --git a/tests/compiler/dart2js/rti/data/list_to_set.dart b/tests/compiler/dart2js/rti/data/list_to_set.dart
index f858a43..611e7df 100644
--- a/tests/compiler/dart2js/rti/data/list_to_set.dart
+++ b/tests/compiler/dart2js/rti/data/list_to_set.dart
@@ -3,9 +3,9 @@
// BSD-style license that can be found in the LICENSE file.
/*ast.class: global#List:deps=[Class,EmptyIterable,Iterable,JSArray,ListIterable,SetMixin,SubListIterable],explicit=[List],implicit=[List.E],indirect,needsArgs*/
-/*kernel.class: global#List:deps=[Class,EmptyIterable,Iterable,JSArray,ListIterable,SetMixin],explicit=[List],implicit=[List.E],indirect,needsArgs*/
+/*kernel.class: global#List:deps=[Class,EmptyIterable,Iterable,JSArray,ListIterable,SetMixin,makeListFixedLength],explicit=[List,List.E,List<JSArray.E>,List<makeListFixedLength.T>],implicit=[List.E],indirect,needsArgs*/
/*ast.class: global#JSArray:deps=[List],explicit=[JSArray],implicit=[JSArray.E],indirect,needsArgs*/
-/*kernel.class: global#JSArray:deps=[EmptyIterable,List,ListIterable,SetMixin,SubListIterable],explicit=[JSArray],implicit=[JSArray.E],indirect,needsArgs*/
+/*kernel.class: global#JSArray:deps=[EmptyIterable,List,ListIterable,SetMixin,SubListIterable],explicit=[JSArray,List<JSArray.E>],implicit=[JSArray.E],indirect,needsArgs*/
main() {
var c = new Class<int>();
diff --git a/tests/compiler/dart2js/rti/data/map_literal.dart b/tests/compiler/dart2js/rti/data/map_literal.dart
index 1643414..0ca8b19 100644
--- a/tests/compiler/dart2js/rti/data/map_literal.dart
+++ b/tests/compiler/dart2js/rti/data/map_literal.dart
@@ -2,10 +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.
-/*class: global#Map:*/
-/*class: global#LinkedHashMap:deps=[Map]*/
-/*class: global#JsLinkedHashMap:deps=[LinkedHashMap]*/
-/*class: global#double:explicit=[double]*/
+/*ast.class: global#Map:*/
+/*kernel.class: global#Map:indirect,needsArgs*/
+/*ast.class: global#LinkedHashMap:deps=[Map]*/
+/*kernel.class: global#LinkedHashMap:deps=[Map],explicit=[LinkedHashMap<LinkedHashMap.K,LinkedHashMap.V>],implicit=[LinkedHashMap.K,LinkedHashMap.V],indirect,needsArgs*/
+/*ast.class: global#JsLinkedHashMap:deps=[LinkedHashMap]*/
+/*kernel.class: global#JsLinkedHashMap:deps=[LinkedHashMap],direct,explicit=[JsLinkedHashMap.K,JsLinkedHashMap.V],implicit=[JsLinkedHashMap.K,JsLinkedHashMap.V],needsArgs*/
+/*ast.class: global#double:explicit=[double]*/
+/*kernel.class: global#double:explicit=[double],implicit=[double]*/
/*class: global#JSDouble:*/
main() {
diff --git a/tests/compiler/dart2js/rti/data/map_to_set.dart b/tests/compiler/dart2js/rti/data/map_to_set.dart
index 4cfda0e..a0c6503 100644
--- a/tests/compiler/dart2js/rti/data/map_to_set.dart
+++ b/tests/compiler/dart2js/rti/data/map_to_set.dart
@@ -2,10 +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.
-/*class: global#Map:deps=[Class],needsArgs*/
-/*class: global#LinkedHashMap:deps=[Map],needsArgs*/
-/*class: global#JsLinkedHashMap:deps=[LinkedHashMap],implicit=[JsLinkedHashMap.K],needsArgs*/
-/*class: global#double:explicit=[double]*/
+/*ast.class: global#Map:deps=[Class],needsArgs*/
+/*kernel.class: global#Map:deps=[Class],indirect,needsArgs*/
+/*ast.class: global#LinkedHashMap:deps=[Map],needsArgs*/
+/*kernel.class: global#LinkedHashMap:deps=[Map],explicit=[LinkedHashMap<LinkedHashMap.K,LinkedHashMap.V>],implicit=[LinkedHashMap.K,LinkedHashMap.V],indirect,needsArgs*/
+/*ast.class: global#JsLinkedHashMap:deps=[LinkedHashMap],implicit=[JsLinkedHashMap.K],needsArgs*/
+/*kernel.class: global#JsLinkedHashMap:deps=[LinkedHashMap],explicit=[JsLinkedHashMap.K,JsLinkedHashMap.V],implicit=[JsLinkedHashMap.K,JsLinkedHashMap.V],indirect,needsArgs*/
+/*ast.class: global#double:explicit=[double]*/
+/*kernel.class: global#double:explicit=[double],implicit=[double]*/
/*class: global#JSDouble:*/
main() {
@@ -15,7 +19,8 @@
set is Set<String>;
}
-/*class: Class:needsArgs*/
+/*ast.class: Class:needsArgs*/
+/*kernel.class: Class:implicit=[Class.S,Class.T],indirect,needsArgs*/
class Class<T, S> {
m() {
return <T, S>{};
diff --git a/tests/compiler/dart2js/rti/emission/call.dart b/tests/compiler/dart2js/rti/emission/call.dart
index 41faae4..82ebfee 100644
--- a/tests/compiler/dart2js/rti/emission/call.dart
+++ b/tests/compiler/dart2js/rti/emission/call.dart
@@ -5,7 +5,7 @@
import 'package:expect/expect.dart';
import 'package:meta/dart2js.dart';
-/*class: A:checks=[$isFunction],instance*/
+/*class: A:checks=[$isFunction],functionType,instance*/
class A {
call() {}
}
diff --git a/tests/compiler/dart2js/rti/emission/call_strong.dart b/tests/compiler/dart2js/rti/emission/call_strong.dart
new file mode 100644
index 0000000..51f2ee76
--- /dev/null
+++ b/tests/compiler/dart2js/rti/emission/call_strong.dart
@@ -0,0 +1,19 @@
+// 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=[],instance*/
+class A {
+ call() {}
+}
+
+@noInline
+test(o) => o is Function;
+
+main() {
+ Expect.isFalse(test(new A()));
+ Expect.isFalse(test(null));
+}
diff --git a/tests/compiler/dart2js/rti/emission/closure_function.dart b/tests/compiler/dart2js/rti/emission/closure_function.dart
index 9604fba..2b51d64 100644
--- a/tests/compiler/dart2js/rti/emission/closure_function.dart
+++ b/tests/compiler/dart2js/rti/emission/closure_function.dart
@@ -8,6 +8,6 @@
test(o) => o is Function;
main() {
- test(/*checks=[],instance*/ () {});
+ test(/*checks=[],functionType,instance*/ () {});
test(null);
}
diff --git a/tests/compiler/dart2js/rti/emission/closure_function_type.dart b/tests/compiler/dart2js/rti/emission/closure_function_type.dart
index f8560ed..22ffd4f 100644
--- a/tests/compiler/dart2js/rti/emission/closure_function_type.dart
+++ b/tests/compiler/dart2js/rti/emission/closure_function_type.dart
@@ -8,6 +8,6 @@
test(o) => o is Function();
main() {
- test(/*checks=[],instance*/ () {});
- test(/*checks=[],instance*/ (a) {});
+ test(/*checks=[],functionType,instance*/ () {});
+ test(/*checks=[],functionType,instance*/ (a) {});
}
diff --git a/tests/compiler/dart2js/rti/emission/function_type_argument.dart b/tests/compiler/dart2js/rti/emission/function_type_argument.dart
new file mode 100644
index 0000000..97ce3ce
--- /dev/null
+++ b/tests/compiler/dart2js/rti/emission/function_type_argument.dart
@@ -0,0 +1,29 @@
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+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/subtype_named_args.dart b/tests/compiler/dart2js/rti/emission/subtype_named_args.dart
index 3291f16..c10ef59 100644
--- a/tests/compiler/dart2js/rti/emission/subtype_named_args.dart
+++ b/tests/compiler/dart2js/rti/emission/subtype_named_args.dart
@@ -45,46 +45,51 @@
typedef okWithDynamicFunc_2({int x, bool y, List<Map> z, classesFunc v});
main() {
- Expect
- .isTrue(/*checks=[],instance*/ ({D a, B b, C c, A d}) {} is classesFunc);
- Expect
- .isTrue(/*checks=[],instance*/ ({A a, A b, A c, A d}) {} is classesFunc);
+ 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=[],instance*/ ({D a, A1 b, A1 c, A1 d}) {} is classesFunc);
+ /*checks=[],functionType,instance*/ ({D a, A1 b, A1 c, A1 d}) {}
+ is classesFunc);
Expect.isTrue(
- /*checks=[],instance*/ ({D a, A2 b, A2 c, A2 d}) {} is classesFunc);
- Expect
- .isTrue(/*checks=[],instance*/ ({D a, D b, D c, D d}) {} is classesFunc);
+ /*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);
Expect.isTrue(
- /*checks=[],instance*/ ({var a, var b, var c, var d}) {} is classesFunc);
- Expect.isTrue(/*checks=[],instance*/ (
+ /*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=[],instance*/ (
+ Expect.isTrue(/*checks=[],functionType,instance*/ (
{Map<num, num> m,
List<List<A1>> l,
G<A, A1, A1, A1> g}) {} is genericsFunc);
Expect.isTrue(
- /*checks=[],instance*/ (
+ /*checks=[],functionType,instance*/ (
{Map<int, int> m,
List<List<D>> l,
G<D, D, D, D> g}) {} is genericsFunc);
Expect.isTrue(
- /*checks=[],instance*/ ({var m, var l, var g}) {} is genericsFunc);
+ /*checks=[],functionType,instance*/ ({var m, var l, var g}) {}
+ is genericsFunc);
Expect.isTrue(
- /*checks=[],instance*/ ({Object m, Object l, Object g}) {}
+ /*checks=[],functionType,instance*/ ({Object m, Object l, Object g}) {}
is genericsFunc);
Expect.isTrue(
- /*checks=[],instance*/ ({A x, G y, mixFunc z, var v}) {} is dynamicFunc);
- Expect.isTrue(/*checks=[],instance*/ (
+ /*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);
- Expect.isTrue(/*checks=[],instance*/ (
+ Expect.isTrue(/*checks=[],functionType,instance*/ (
{okWithClassesFunc_1 f1,
okWithGenericsFunc_1 f2,
okWithDynamicFunc_1 f3}) {} is funcFunc);
- Expect.isTrue(/*checks=[],instance*/ (
+ 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 cb3a0a4..f7b516b 100644
--- a/tests/compiler/dart2js/rti/rti_emission_test.dart
+++ b/tests/compiler/dart2js/rti/rti_emission_test.dart
@@ -5,7 +5,6 @@
import 'dart:io';
import 'package:async_helper/async_helper.dart';
import 'package:compiler/src/closure.dart';
-import 'package:compiler/src/commandline_options.dart';
import 'package:compiler/src/common.dart';
import 'package:compiler/src/compiler.dart';
import 'package:compiler/src/diagnostics/diagnostic_listener.dart';
@@ -32,9 +31,6 @@
computeClassDataFromAst: computeAstRtiClassEmission,
computeClassDataFromKernel: computeKernelRtiClassEmission,
args: args,
- options: [
- Flags.strongMode
- ],
skipForKernel: [
// TODO(johnniwinther): Fix this. It triggers a crash in the ssa
// builder.
@@ -49,6 +45,7 @@
static const String checkedInstance = 'checkedInstance';
static const String typeArgument = 'typeArgument';
static const String checkedTypeArgument = 'checkedTypeArgument';
+ static const String functionType = 'functionType';
}
void computeAstRtiMemberEmission(
@@ -85,6 +82,9 @@
for (StubMethod stub in cls.isChecks) {
features.addElement(Tags.isChecks, stub.name.key);
}
+ if (cls.functionTypeIndex != null) {
+ features.add(Tags.functionType);
+ }
}
ClassUse classUse = checksBuilder.classUseMapForTesting[element];
if (classUse != null) {
diff --git a/tests/compiler/dart2js/subtype_test.dart b/tests/compiler/dart2js/subtype_test.dart
index 7d938fc..8053400 100644
--- a/tests/compiler/dart2js/subtype_test.dart
+++ b/tests/compiler/dart2js/subtype_test.dart
@@ -6,6 +6,7 @@
import 'dart:async';
import 'package:async_helper/async_helper.dart';
+import 'package:compiler/src/commandline_options.dart';
import 'package:compiler/src/elements/entities.dart' show ClassEntity;
import 'package:compiler/src/elements/types.dart';
import 'package:compiler/src/elements/resolution_types.dart';
@@ -18,19 +19,21 @@
await runTests(CompileMode.memory);
print('--test from kernel------------------------------------------------');
await runTests(CompileMode.kernel);
+ print('--test from kernel (strong)---------------------------------------');
+ await runTests(CompileMode.kernel, strongMode: true);
});
}
-Future runTests(CompileMode compileMode) async {
- await testInterfaceSubtype(compileMode);
- await testCallableSubtype(compileMode);
- await testFunctionSubtyping(compileMode);
- await testTypedefSubtyping(compileMode);
- await testFunctionSubtypingOptional(compileMode);
- await testTypedefSubtypingOptional(compileMode);
- await testFunctionSubtypingNamed(compileMode);
- await testTypedefSubtypingNamed(compileMode);
- await testTypeVariableSubtype(compileMode);
+Future runTests(CompileMode compileMode, {bool strongMode: false}) async {
+ await testCallableSubtype(compileMode, strongMode);
+ await testInterfaceSubtype(compileMode, strongMode);
+ await testFunctionSubtyping(compileMode, strongMode);
+ await testTypedefSubtyping(compileMode, strongMode);
+ await testFunctionSubtypingOptional(compileMode, strongMode);
+ await testTypedefSubtypingOptional(compileMode, strongMode);
+ await testFunctionSubtypingNamed(compileMode, strongMode);
+ await testTypedefSubtypingNamed(compileMode, strongMode);
+ await testTypeVariableSubtype(compileMode, strongMode);
}
void testTypes(TypeEnvironment env, DartType subtype, DartType supertype,
@@ -51,14 +54,16 @@
testTypes(env, subtype, supertype, expectSubtype, expectMoreSpecific);
}
-Future testInterfaceSubtype(CompileMode compileMode) async {
+Future testInterfaceSubtype(CompileMode compileMode, bool strongMode) async {
await TypeEnvironment.create(r"""
class A<T> {}
class B<T1, T2> extends A<T1> {}
// TODO(johnniwinther): Inheritance with different type arguments is
// currently not supported by the implementation.
class C<T1, T2> extends B<T2, T1> /*implements A<A<T1>>*/ {}
- """, compileMode: compileMode).then((env) {
+ """,
+ compileMode: compileMode,
+ options: strongMode ? [Flags.strongMode] : []).then((env) {
void expect(bool expectSubtype, DartType T, DartType S,
{bool expectMoreSpecific}) {
testTypes(env, T, S, expectSubtype, expectMoreSpecific);
@@ -292,7 +297,7 @@
});
}
-Future testCallableSubtype(CompileMode compileMode) async {
+Future testCallableSubtype(CompileMode compileMode, bool strongMode) async {
await TypeEnvironment.create(r"""
class U {}
class V extends U {}
@@ -306,7 +311,9 @@
int m4(V v, U u) => null;
void m5(V v, int i) => null;
}
- """, compileMode: compileMode).then((env) {
+ """,
+ compileMode: compileMode,
+ options: strongMode ? [Flags.strongMode] : []).then((env) {
void expect(bool expectSubtype, DartType T, DartType S,
{bool expectMoreSpecific}) {
testTypes(env, T, S, expectSubtype, expectMoreSpecific);
@@ -322,14 +329,14 @@
DartType m4 = env.getMemberType('m4', classA);
DartType m5 = env.getMemberType('m5', classA);
- expect(true, A, function);
- expect(true, A, call);
+ expect(!strongMode, A, function);
+ expect(!strongMode, A, call);
expect(true, call, m1);
- expect(true, A, m1);
- expect(true, A, m2, expectMoreSpecific: false);
+ expect(!strongMode, A, m1);
+ expect(!strongMode, A, m2, expectMoreSpecific: false);
expect(false, A, m3);
expect(false, A, m4);
- expect(true, A, m5);
+ expect(!strongMode, A, m5);
});
}
@@ -353,15 +360,19 @@
'void', 'inline_void__int', '(void Function(int i) f)'),
];
-Future testFunctionSubtyping(CompileMode compileMode) async {
+Future testFunctionSubtyping(CompileMode compileMode, bool strongMode) async {
await TypeEnvironment
- .create(createMethods(functionTypesData), compileMode: compileMode)
+ .create(createMethods(functionTypesData),
+ compileMode: compileMode,
+ options: strongMode ? [Flags.strongMode] : [])
.then(functionSubtypingHelper);
}
-Future testTypedefSubtyping(CompileMode compileMode) async {
+Future testTypedefSubtyping(CompileMode compileMode, bool strongMode) async {
await TypeEnvironment
- .create(createTypedefs(functionTypesData), compileMode: compileMode)
+ .create(createTypedefs(functionTypesData),
+ compileMode: compileMode,
+ options: strongMode ? [Flags.strongMode] : [])
.then(functionSubtypingHelper);
}
@@ -437,17 +448,21 @@
const FunctionTypeData('void', 'void___Object_int', '([Object o, int i])'),
];
-Future testFunctionSubtypingOptional(CompileMode compileMode) async {
+Future testFunctionSubtypingOptional(
+ CompileMode compileMode, bool strongMode) async {
await TypeEnvironment
.create(createMethods(optionalFunctionTypesData),
- compileMode: compileMode)
+ compileMode: compileMode,
+ options: strongMode ? [Flags.strongMode] : [])
.then(functionSubtypingOptionalHelper);
}
-Future testTypedefSubtypingOptional(CompileMode compileMode) async {
+Future testTypedefSubtypingOptional(
+ CompileMode compileMode, bool strongMode) async {
await TypeEnvironment
.create(createTypedefs(optionalFunctionTypesData),
- compileMode: compileMode)
+ compileMode: compileMode,
+ options: strongMode ? [Flags.strongMode] : [])
.then(functionSubtypingOptionalHelper);
}
@@ -511,15 +526,21 @@
const FunctionTypeData('void', 'void___c_int', '({int c})'),
];
-Future testFunctionSubtypingNamed(CompileMode compileMode) async {
+Future testFunctionSubtypingNamed(
+ CompileMode compileMode, bool strongMode) async {
await TypeEnvironment
- .create(createMethods(namedFunctionTypesData), compileMode: compileMode)
+ .create(createMethods(namedFunctionTypesData),
+ compileMode: compileMode,
+ options: strongMode ? [Flags.strongMode] : [])
.then(functionSubtypingNamedHelper);
}
-Future testTypedefSubtypingNamed(CompileMode compileMode) async {
+Future testTypedefSubtypingNamed(
+ CompileMode compileMode, bool strongMode) async {
await TypeEnvironment
- .create(createTypedefs(namedFunctionTypesData), compileMode: compileMode)
+ .create(createTypedefs(namedFunctionTypesData),
+ compileMode: compileMode,
+ options: strongMode ? [Flags.strongMode] : [])
.then(functionSubtypingNamedHelper);
}
@@ -559,7 +580,7 @@
expect(true, 'void___a_int_b_int_c_int', 'void___c_int');
}
-Future testTypeVariableSubtype(CompileMode compileMode) async {
+Future testTypeVariableSubtype(CompileMode compileMode, bool strongMode) async {
await TypeEnvironment.create(r"""
class A<T> {}
class B<T extends Object> {}
@@ -571,7 +592,9 @@
class H<T extends S, S extends T> {}
class I<T extends S, S extends U, U extends T> {}
class J<T extends S, S extends U, U extends S> {}
- """, compileMode: compileMode).then((env) {
+ """,
+ compileMode: compileMode,
+ options: strongMode ? [Flags.strongMode] : []).then((env) {
void expect(bool expectSubtype, DartType T, DartType S,
{bool expectMoreSpecific}) {
testTypes(env, T, S, expectSubtype, expectMoreSpecific);
diff --git a/tests/compiler/dart2js/subtypeset_test.dart b/tests/compiler/dart2js/subtypeset_test.dart
index 9a43016..d5038c6 100644
--- a/tests/compiler/dart2js/subtypeset_test.dart
+++ b/tests/compiler/dart2js/subtypeset_test.dart
@@ -9,6 +9,7 @@
import 'package:expect/expect.dart';
import 'package:async_helper/async_helper.dart';
import 'type_test_helper.dart';
+import 'package:compiler/src/commandline_options.dart';
import 'package:compiler/src/elements/entities.dart';
import 'package:compiler/src/universe/class_set.dart';
import 'package:compiler/src/world.dart';
@@ -19,10 +20,12 @@
await runTests(CompileMode.memory);
print('--test from kernel------------------------------------------------');
await runTests(CompileMode.kernel);
+ print('--test from kernel (strong)---------------------------------------');
+ await runTests(CompileMode.kernel, strongMode: true);
});
}
-runTests(CompileMode compileMode) async {
+runTests(CompileMode compileMode, {bool strongMode: false}) async {
var env = await TypeEnvironment.create(r"""
/// A
/// / \
@@ -41,7 +44,8 @@
class G extends C {}
class H implements C {}
class I implements H {}
- """, mainSource: r"""
+ """,
+ mainSource: r"""
main() {
new A().call;
new C();
@@ -50,7 +54,9 @@
new F();
new G();
}
- """, compileMode: compileMode);
+ """,
+ compileMode: compileMode,
+ options: strongMode ? [Flags.strongMode] : []);
ClosedWorld world = env.closedWorld;
ClassEntity A = env.getElement("A");
@@ -62,16 +68,28 @@
ClassEntity G = env.getElement("G");
ClassEntity H = env.getElement("H");
ClassEntity I = env.getElement("I");
+ ClassEntity Function_ = env.getElement("Function");
- void checkClass(ClassEntity cls, List<ClassEntity> subtypes) {
+ void checkClass(ClassEntity cls, List<ClassEntity> expectedSubtypes,
+ {bool checkSubset: false}) {
ClassSet node = world.getClassSet(cls);
- print('$cls:\n${node}');
- Expect.setEquals(
- subtypes,
- node.subtypes().toList(),
- "Unexpected subtypes of ${cls.name}:\n"
- "Expected: $subtypes\n"
- "Found : ${node.subtypes().toList()}");
+ Set<ClassEntity> actualSubtypes = node.subtypes().toSet();
+ if (checkSubset) {
+ for (ClassEntity subtype in expectedSubtypes) {
+ Expect.isTrue(
+ actualSubtypes.contains(subtype),
+ "Unexpected subtype ${subtype} of ${cls.name}:\n"
+ "Expected: $expectedSubtypes\n"
+ "Found : $actualSubtypes");
+ }
+ } else {
+ Expect.setEquals(
+ expectedSubtypes,
+ actualSubtypes,
+ "Unexpected subtypes of ${cls.name}:\n"
+ "Expected: $expectedSubtypes\n"
+ "Found : $actualSubtypes");
+ }
}
checkClass(A, [A, C, E, F, G, B, D, H, I]);
@@ -83,4 +101,6 @@
checkClass(G, [G]);
checkClass(H, [H, I]);
checkClass(I, [I]);
+ checkClass(Function_, strongMode ? [] : [A, B, C, D, E, F, G],
+ checkSubset: true);
}
diff --git a/tests/compiler/dart2js_extra/dart2js_extra.status b/tests/compiler/dart2js_extra/dart2js_extra.status
index ffe01f1..b254385 100644
--- a/tests/compiler/dart2js_extra/dart2js_extra.status
+++ b/tests/compiler/dart2js_extra/dart2js_extra.status
@@ -27,11 +27,6 @@
dummy_compiler_test: Skip # Issue 28649
recursive_import_test: Skip # Issue 28649
-[ $compiler == dart2js && !$strong ]
-generic_method_dynamic_is_test: RuntimeError # Test against function type variables is only supported in strong mode.
-generic_method_static_is_test: RuntimeError # Test against function type variables is only supported in strong mode.
-local_signature_test: RuntimeError # Test against function type variables is only supported in strong mode.
-
[ $compiler == dart2js && $mode == debug ]
operator_test: Skip
string_interpolation_test: Skip
@@ -68,20 +63,36 @@
variable_type_test/01: Fail, OK
variable_type_test/03: Fail, OK
-[ $compiler == dart2js && $checked && $dart2js_with_kernel ]
+[ $compiler == dart2js && $checked && $fasta ]
21666_test: RuntimeError
-closure_capture2_test: RuntimeError
closure_type_reflection2_test: RuntimeError
closure_type_reflection_test: RuntimeError
constant_javascript_semantics_test/01: MissingCompileTimeError
+deferred/default_arg_is_tearoff_test: RuntimeError
+deferred/deferred_class_test: RuntimeError
+deferred/deferred_constant2_test: RuntimeError
+deferred/deferred_constant3_test: RuntimeError
+deferred/deferred_constant4_test: RuntimeError
+deferred/deferred_function_test: RuntimeError
+deferred/deferred_metadata_test: RuntimeError
deferred/deferred_mirrors1_test: Crash # Unsupported operation: KernelDeferredLoadTask.addMirrorElementsForLibrary
deferred/deferred_mirrors2_test: Crash # Unsupported operation: KernelDeferredLoadTask.addMirrorElementsForLibrary
+deferred/deferred_overlapping_test: RuntimeError
+deferred/interface_type_variable_test: RuntimeError
+deferred/load_in_correct_order_test: RuntimeError
+deferred/multiple_default_arg_test: RuntimeError
deferred/reflect_multiple_annotations_test: Crash # Unsupported operation: KernelDeferredLoadTask.addMirrorElementsForLibrary
deferred/reflect_multiple_default_arg_test: Crash # Unsupported operation: KernelDeferredLoadTask.addMirrorElementsForLibrary
+deferred/shared_constant_test: RuntimeError
+deferred/uninstantiated_type_variable_test: RuntimeError
+deferred_custom_loader_test: RuntimeError
deferred_fail_and_retry_test: RuntimeError
deferred_fail_and_retry_worker_test: Fail
-dummy_compiler_test: CompileTimeError
+deferred_inheritance_test: RuntimeError
+deferred_split_test: RuntimeError
+dummy_compiler_test: Crash
invalid_annotation2_test/none: RuntimeError
+local_signature_test: Crash
minus_zero_test/01: MissingCompileTimeError
mirror_invalid_field_access2_test: RuntimeError
mirror_invalid_field_access3_test: RuntimeError
@@ -99,15 +110,16 @@
mirrors_declarations_filtering_test: RuntimeError
mirrors_used_metatargets_test: RuntimeError
mirrors_used_native_test: RuntimeError
-mirrors_used_warning2_test: RuntimeError
-mirrors_used_warning_test/minif: RuntimeError
-mirrors_used_warning_test/none: RuntimeError
+mirrors_used_warning2_test: Crash
+mirrors_used_warning_test/minif: Crash
+mirrors_used_warning_test/none: Crash
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
+recursive_import_test: Crash
reflect_native_types_test: RuntimeError
regress/4562_test/none: CompileTimeError
type_constant_switch_test/01: MissingCompileTimeError
@@ -119,126 +131,6 @@
deferred_fail_and_retry_worker_test: SkipByDesign # Uses eval to simulate failed loading.
js_interop_test: RuntimeError # Issue 31082
-[ $compiler == dart2js && $dart2js_with_kernel && $fast_startup ]
-23056_test: Pass
-closure_capture2_test: RuntimeError
-constant_javascript_semantics_test/01: MissingCompileTimeError
-deferred/deferred_mirrors1_test: Crash # Unsupported operation: KernelDeferredLoadTask.addMirrorElementsForLibrary
-deferred/deferred_mirrors2_test: Crash # Unsupported operation: KernelDeferredLoadTask.addMirrorElementsForLibrary
-deferred/reflect_multiple_annotations_test: Crash # Unsupported operation: KernelDeferredLoadTask.addMirrorElementsForLibrary
-deferred/reflect_multiple_default_arg_test: Crash # Unsupported operation: KernelDeferredLoadTask.addMirrorElementsForLibrary
-deferred_fail_and_retry_test: RuntimeError
-deferred_fail_and_retry_worker_test: Fail
-mirror_enqueuer_regression_test: Pass
-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
-type_constant_switch_test/01: MissingCompileTimeError
-unconditional_dartio_import_test: RuntimeError
-
-[ $compiler == dart2js && $dart2js_with_kernel && $host_checked ]
-21666_test: RuntimeError
-23264_test: RuntimeError
-closure_capture2_test: RuntimeError
-closure_type_reflection2_test: RuntimeError
-closure_type_reflection_test: RuntimeError
-constant_javascript_semantics_test/01: MissingCompileTimeError
-deferred/deferred_mirrors1_test: RuntimeError
-deferred/deferred_mirrors2_test: RuntimeError
-deferred/reflect_multiple_annotations_test: RuntimeError
-deferred/reflect_multiple_default_arg_test: RuntimeError
-deferred_fail_and_retry_test: RuntimeError
-deferred_fail_and_retry_worker_test: Fail
-inference_nsm_mirrors_test: RuntimeError
-invalid_annotation2_test/none: RuntimeError
-mirror_invalid_field_access2_test: RuntimeError
-mirror_invalid_field_access3_test: RuntimeError
-mirror_invalid_field_access4_test: RuntimeError
-mirror_invalid_field_access_test: RuntimeError
-mirror_invalid_invoke2_test: RuntimeError
-mirror_invalid_invoke3_test: RuntimeError
-mirror_invalid_invoke_test: RuntimeError
-mirror_printer_test/01: RuntimeError
-mirror_printer_test/none: RuntimeError
-mirror_test: RuntimeError
-mirror_type_inference_field2_test: RuntimeError
-mirror_type_inference_field_test: RuntimeError
-mirror_type_inference_function_test: RuntimeError
-mirrors_declarations_filtering_test: RuntimeError
-mirrors_used_closure_test: SkipByDesign
-mirrors_used_metatargets_test: RuntimeError
-mirrors_used_native_test: RuntimeError
-mirrors_used_warning2_test: RuntimeError
-mirrors_used_warning_test/minif: RuntimeError
-mirrors_used_warning_test/none: RuntimeError
-no_such_method_mirrors_test: RuntimeError
-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
-reflect_native_types_test: RuntimeError
-regress/4562_test/none: CompileTimeError
-type_constant_switch_test/01: MissingCompileTimeError
-unconditional_dartio_import_test: RuntimeError # Issue 30902
-
-[ $compiler == dart2js && $dart2js_with_kernel && $minified ]
-21666_test: RuntimeError
-23264_test: RuntimeError
-closure_type_reflection2_test: RuntimeError
-closure_type_reflection_test: RuntimeError
-constant_javascript_semantics_test/01: MissingCompileTimeError
-deferred/deferred_mirrors1_test: RuntimeError
-deferred/deferred_mirrors2_test: RuntimeError
-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.
-deferred_fail_and_retry_test: RuntimeError
-deferred_fail_and_retry_worker_test: Fail
-dummy_compiler_test: CompileTimeError
-inference_nsm_mirrors_test: RuntimeError
-invalid_annotation2_test/none: RuntimeError
-mirror_invalid_field_access2_test: RuntimeError
-mirror_invalid_field_access3_test: RuntimeError
-mirror_invalid_field_access4_test: RuntimeError
-mirror_invalid_field_access_test: RuntimeError
-mirror_invalid_invoke2_test: RuntimeError
-mirror_invalid_invoke3_test: RuntimeError
-mirror_invalid_invoke_test: RuntimeError
-mirror_printer_test/01: RuntimeError
-mirror_printer_test/none: RuntimeError
-mirror_test: RuntimeError
-mirror_type_inference_field2_test: RuntimeError
-mirror_type_inference_field_test: RuntimeError
-mirror_type_inference_function_test: RuntimeError
-mirrors_declarations_filtering_test: RuntimeError
-mirrors_used_closure_test: SkipByDesign
-mirrors_used_metatargets_test: RuntimeError
-mirrors_used_native_test: RuntimeError
-mirrors_used_warning2_test: RuntimeError
-mirrors_used_warning_test/none: RuntimeError
-no_such_method_mirrors_test: RuntimeError
-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
-reflect_native_types_test: RuntimeError
-regress/4562_test/none: CompileTimeError
-type_constant_switch_test/01: MissingCompileTimeError
-unconditional_dartio_import_test: RuntimeError # Issue 30902
-
-[ $compiler == dart2js && !$dart2js_with_kernel ]
-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 && $fast_startup ]
21666_test: Fail # mirrors not supported
23056_test: Fail # mirrors not supported
@@ -276,6 +168,91 @@
no_such_method_mirrors_test: Fail # mirrors not supported
reflect_native_types_test: Fail # mirrors not supported
+[ $compiler == dart2js && $fast_startup && $fasta ]
+23056_test: Pass
+closure_capture2_test: RuntimeError
+constant_javascript_semantics_test/01: MissingCompileTimeError
+deferred/deferred_mirrors1_test: Crash # Unsupported operation: KernelDeferredLoadTask.addMirrorElementsForLibrary
+deferred/deferred_mirrors2_test: Crash # Unsupported operation: KernelDeferredLoadTask.addMirrorElementsForLibrary
+deferred/reflect_multiple_annotations_test: Crash # Unsupported operation: KernelDeferredLoadTask.addMirrorElementsForLibrary
+deferred/reflect_multiple_default_arg_test: Crash # Unsupported operation: KernelDeferredLoadTask.addMirrorElementsForLibrary
+deferred_fail_and_retry_test: RuntimeError
+deferred_fail_and_retry_worker_test: Fail
+mirror_enqueuer_regression_test: Pass
+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
+type_constant_switch_test/01: MissingCompileTimeError
+unconditional_dartio_import_test: RuntimeError
+
+[ $compiler == dart2js && $fasta ]
+21666_test: RuntimeError
+23264_test: RuntimeError
+closure_capture2_test: RuntimeError
+closure_type_reflection2_test: RuntimeError
+closure_type_reflection_test: RuntimeError
+constant_javascript_semantics_test/01: MissingCompileTimeError
+deferred/deferred_mirrors1_test: SkipByDesign
+deferred/deferred_mirrors2_test: RuntimeError
+deferred/reflect_multiple_annotations_test: RuntimeError
+deferred/reflect_multiple_default_arg_test: RuntimeError
+deferred_fail_and_retry_test: RuntimeError
+deferred_fail_and_retry_worker_test: Fail
+inference_nsm_mirrors_test: SkipByDesign
+invalid_annotation2_test/none: RuntimeError
+mirror_invalid_field_access2_test: RuntimeError
+mirror_invalid_field_access3_test: RuntimeError
+mirror_invalid_field_access4_test: RuntimeError
+mirror_invalid_field_access_test: RuntimeError
+mirror_invalid_invoke2_test: RuntimeError
+mirror_invalid_invoke3_test: RuntimeError
+mirror_invalid_invoke_test: RuntimeError
+mirror_printer_test/01: RuntimeError
+mirror_printer_test/none: RuntimeError
+mirror_test: RuntimeError
+mirror_type_inference_field2_test: RuntimeError
+mirror_type_inference_field_test: RuntimeError
+mirror_type_inference_function_test: RuntimeError
+mirrors_declarations_filtering_test: RuntimeError
+mirrors_used_closure_test: SkipByDesign
+mirrors_used_metatargets_test: RuntimeError
+mirrors_used_native_test: RuntimeError
+mirrors_used_warning2_test: RuntimeError
+mirrors_used_warning_test/minif: RuntimeError
+mirrors_used_warning_test/none: RuntimeError
+no_such_method_mirrors_test: SkipByDesign
+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
+reflect_native_types_test: RuntimeError
+regress/4562_test/none: CompileTimeError
+type_constant_switch_test/01: MissingCompileTimeError
+unconditional_dartio_import_test: RuntimeError # Issue 30902
+
+[ $compiler == dart2js && $fasta && $host_checked ]
+closure_capture2_test: RuntimeError
+deferred/reflect_multiple_annotations_test: RuntimeError
+deferred/reflect_multiple_default_arg_test: RuntimeError
+
+[ $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.
+dummy_compiler_test: CompileTimeError
+
+[ $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: Skip # Issue 30773
recursive_import_test: Skip # Issue 30773
@@ -293,6 +270,11 @@
to_string_test: Fail # Issue 7179.
typevariable_typedef_test: Fail, OK # Tests expected output of Type.toString().
+[ $compiler == dart2js && !$strong ]
+generic_method_dynamic_is_test: RuntimeError # Test against function type variables is only supported in strong mode.
+generic_method_static_is_test: RuntimeError # Test against function type variables is only supported in strong mode.
+local_signature_test: RuntimeError # Test against function type variables is only supported in strong mode.
+
[ $compiler == dart2js && ($runtime == chrome || $runtime == chromeOnAndroid || $runtime == drt || $runtime == ff || $runtime == safari) ]
isolate2_test/01: Fail # Issue 14458.
diff --git a/tests/compiler/dart2js_native/dart2js_native.status b/tests/compiler/dart2js_native/dart2js_native.status
index d3fcb95..573d775 100644
--- a/tests/compiler/dart2js_native/dart2js_native.status
+++ b/tests/compiler/dart2js_native/dart2js_native.status
@@ -2,83 +2,31 @@
# 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 ]
+bound_closure_super_test: RuntimeError
+fake_thing_test: RuntimeError # Issue 13010
+mirror_intercepted_field_test: SkipByDesign # mirrors not supported
+native_mirror_test: SkipByDesign # mirrors not supported
+native_no_such_method_exception3_frog_test: SkipByDesign # mirrors not supported
+native_no_such_method_exception4_frog_test: SkipByDesign # mirrors not supported
+native_no_such_method_exception5_frog_test: SkipByDesign # mirrors not supported
+
[ $browser ]
*: Skip
-[ $compiler == dart2js && $runtime == d8 && $system == windows && !$dart2js_with_kernel ]
+[ $compiler == dart2js && $runtime == d8 && $system == windows && !$fasta ]
compute_this_script_test: Skip # Issue 17458
-[ $compiler == dart2js && $checked && $dart2js_with_kernel ]
-bound_closure_super_test: RuntimeError
-fake_thing_test: RuntimeError
-mirror_intercepted_field_test: RuntimeError
+[ $compiler == dart2js && $fasta ]
native_library_same_name_used_frog_test: CompileTimeError
-native_mirror_test: RuntimeError
-native_no_such_method_exception4_frog_test: RuntimeError
-native_no_such_method_exception5_frog_test: RuntimeError
subclassing_constructor_1_test: RuntimeError
subclassing_super_call_test: RuntimeError
subclassing_super_field_1_test: RuntimeError
subclassing_super_field_2_test: RuntimeError
-[ $compiler == dart2js && $dart2js_with_kernel && $fast_startup ]
-bound_closure_super_test: RuntimeError
-fake_thing_test: RuntimeError
-mirror_intercepted_field_test: RuntimeError
-native_library_same_name_used_frog_test: CompileTimeError
-native_mirror_test: RuntimeError
-native_no_such_method_exception3_frog_test: RuntimeError
-native_no_such_method_exception4_frog_test: RuntimeError
-native_no_such_method_exception5_frog_test: RuntimeError
-optimization_hints_test: RuntimeError
-subclassing_constructor_1_test: RuntimeError
-subclassing_super_call_test: RuntimeError
-subclassing_super_field_1_test: RuntimeError
-subclassing_super_field_2_test: RuntimeError
-
-[ $compiler == dart2js && $dart2js_with_kernel && $host_checked ]
-bound_closure_super_test: RuntimeError
+[ $compiler == dart2js && $fasta && $host_checked ]
compute_this_script_test: Crash # 'file:*/pkg/compiler/lib/src/ssa/types.dart': Failed assertion: line 63 pos 12: '!result.isEmpty': is not true.
-fake_thing_test: RuntimeError
-mirror_intercepted_field_test: RuntimeError
-native_library_same_name_used_frog_test: CompileTimeError
-native_mirror_test: RuntimeError
-native_no_such_method_exception3_frog_test: RuntimeError
-native_no_such_method_exception4_frog_test: RuntimeError
-native_no_such_method_exception5_frog_test: RuntimeError
-subclassing_constructor_1_test: RuntimeError
-subclassing_super_call_test: RuntimeError
-subclassing_super_field_1_test: RuntimeError
-subclassing_super_field_2_test: RuntimeError
-[ $compiler == dart2js && $dart2js_with_kernel && $minified ]
-bound_closure_super_test: RuntimeError
-fake_thing_test: RuntimeError
-mirror_intercepted_field_test: RuntimeError
-native_library_same_name_used_frog_test: CompileTimeError
-native_mirror_test: RuntimeError
-native_no_such_method_exception3_frog_test: RuntimeError
-native_no_such_method_exception4_frog_test: RuntimeError
-native_no_such_method_exception5_frog_test: RuntimeError
-optimization_hints_test: RuntimeError
-subclassing_constructor_1_test: RuntimeError
-subclassing_super_call_test: RuntimeError
-subclassing_super_field_1_test: RuntimeError
-subclassing_super_field_2_test: RuntimeError
-
-[ $compiler == dart2js && !$dart2js_with_kernel ]
-bound_closure_super_test: Fail
-fake_thing_test: Fail # Issue 13010
-native_no_such_method_exception4_frog_test: CompileTimeError # Issue 9631
-native_no_such_method_exception5_frog_test: CompileTimeError # Issue 9631
-
-[ $compiler == dart2js && !$dart2js_with_kernel && $fast_startup ]
-mirror_intercepted_field_test: Fail # mirrors not supported
-native_mirror_test: Fail # mirrors not supported
-native_no_such_method_exception3_frog_test: Fail # mirrors not supported
-native_no_such_method_exception4_frog_test: Fail # mirrors not supported
-native_no_such_method_exception5_frog_test: Fail # mirrors not supported
-
-[ $compiler == dart2js && !$dart2js_with_kernel && $minified ]
-optimization_hints_test: Fail, OK # Test relies on unminified names.
+[ $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 3996278..bf64735 100644
--- a/tests/corelib/corelib.status
+++ b/tests/corelib/corelib.status
@@ -6,6 +6,7 @@
*: Skip
[ $compiler == dart2js ]
+error_stack_trace1_test: RuntimeError # Issue 12399
regexp/pcre_test: Pass, Slow # Issue 21593
[ $compiler == precompiler ]
@@ -102,14 +103,7 @@
[ $compiler == dart2js && !$browser ]
package_resource_test: RuntimeError # Issue 26842
-[ $compiler == dart2js && $checked && $dart2js_with_kernel ]
-apply3_test: RuntimeError
-big_integer_parsed_arith_vm_test: RuntimeError
-big_integer_parsed_div_rem_vm_test: RuntimeError
-big_integer_parsed_mul_div_vm_test: RuntimeError
-compare_to2_test: RuntimeError
-double_parse_test/01: RuntimeError
-error_stack_trace1_test: RuntimeError # Issue 12399
+[ $compiler == dart2js && $checked && $fasta ]
from_environment_const_type_test/02: MissingCompileTimeError
from_environment_const_type_test/03: MissingCompileTimeError
from_environment_const_type_test/04: MissingCompileTimeError
@@ -128,17 +122,12 @@
from_environment_const_type_undefined_test/06: MissingCompileTimeError
from_environment_const_type_undefined_test/07: MissingCompileTimeError
from_environment_const_type_undefined_test/08: MissingCompileTimeError
-hash_set_test/01: RuntimeError
-int_parse_radix_test/01: RuntimeError
-iterable_return_type_test/01: RuntimeError
-iterable_return_type_test/02: RuntimeError
-iterable_to_list_test/01: RuntimeError
-map_test: Crash # tests/corelib/map_test.dart:866:7: Internal problem: Unhandled Null in installDefaultConstructor.
-nan_infinity_test/01: RuntimeError
-string_base_vm_test: RuntimeError
-symbol_reserved_word_test/03: RuntimeError
-[ $compiler == dart2js && $dart2js_with_kernel ]
+[ $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: RuntimeError
big_integer_arith_vm_test/div: RuntimeError
big_integer_arith_vm_test/gcd: RuntimeError
@@ -152,72 +141,40 @@
big_integer_arith_vm_test/shift: RuntimeError
big_integer_arith_vm_test/sub: RuntimeError
big_integer_arith_vm_test/trunDiv: RuntimeError
+big_integer_parsed_arith_vm_test: RuntimeError
+big_integer_parsed_div_rem_vm_test: RuntimeError
+big_integer_parsed_mul_div_vm_test: RuntimeError
bit_twiddling_bigint_test: RuntimeError
+compare_to2_test: RuntimeError
+double_parse_test/01: RuntimeError
+hash_set_test/01: RuntimeError
int_modulo_arith_test/bignum: RuntimeError
int_modulo_arith_test/modPow: RuntimeError
+int_parse_radix_test/01: RuntimeError
int_parse_radix_test/02: RuntimeError
integer_to_radix_string_test: RuntimeError
integer_to_string_test/01: RuntimeError
+iterable_return_type_test/01: RuntimeError
+iterable_return_type_test/02: RuntimeError
+iterable_to_list_test/01: RuntimeError
+nan_infinity_test/01: RuntimeError
regress_r21715_test: RuntimeError
-
-[ $compiler == dart2js && $dart2js_with_kernel && $fast_startup ]
-big_integer_parsed_arith_vm_test: RuntimeError
-big_integer_parsed_div_rem_vm_test: RuntimeError
-big_integer_parsed_mul_div_vm_test: RuntimeError
-compare_to2_test: RuntimeError
-double_parse_test/01: RuntimeError
-hash_set_test/01: RuntimeError
-int_parse_radix_test/01: RuntimeError
-iterable_return_type_test/01: RuntimeError
-iterable_return_type_test/02: RuntimeError
-iterable_to_list_test/01: RuntimeError
-map_test: Crash # tests/corelib/map_test.dart:866:7: Internal problem: Unhandled Null in installDefaultConstructor.
-nan_infinity_test/01: RuntimeError
string_base_vm_test: RuntimeError
symbol_reserved_word_test/03: RuntimeError
-[ $compiler == dart2js && $dart2js_with_kernel && $host_checked ]
+[ $compiler == dart2js && $fasta && $host_checked ]
apply3_test: RuntimeError
-big_integer_parsed_arith_vm_test: RuntimeError
-big_integer_parsed_div_rem_vm_test: RuntimeError
-big_integer_parsed_mul_div_vm_test: RuntimeError
-compare_to2_test: RuntimeError
-double_parse_test/01: RuntimeError
-error_stack_trace1_test: RuntimeError # Issue 12399
-hash_set_test/01: RuntimeError
-int_parse_radix_test/01: RuntimeError
-iterable_return_type_test/01: RuntimeError
-iterable_return_type_test/02: RuntimeError
-iterable_to_list_test/01: RuntimeError
-nan_infinity_test/01: RuntimeError
-string_base_vm_test: RuntimeError
-symbol_reserved_word_test/03: RuntimeError
-[ $compiler == dart2js && $dart2js_with_kernel && $minified ]
+[ $compiler == dart2js && $fasta && $minified ]
apply3_test: RuntimeError
-big_integer_parsed_arith_vm_test: RuntimeError
-big_integer_parsed_div_rem_vm_test: RuntimeError
-big_integer_parsed_mul_div_vm_test: RuntimeError
-compare_to2_test: RuntimeError
-double_parse_test/01: RuntimeError
-error_stack_trace1_test: RuntimeError
-hash_set_test/01: RuntimeError
-int_parse_radix_test/01: RuntimeError
-iterable_return_type_test/01: RuntimeError
-iterable_return_type_test/02: RuntimeError
-iterable_to_list_test/01: RuntimeError
-nan_infinity_test/01: RuntimeError
-string_base_vm_test: RuntimeError
symbol_operator_test/03: RuntimeError # Issue 27394
symbol_operator_test/none: RuntimeError
-symbol_reserved_word_test/03: RuntimeError
-[ $compiler == dart2js && !$dart2js_with_kernel ]
+[ $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.
-error_stack_trace1_test: RuntimeError # Issue 12399
hash_set_test/01: RuntimeError # Issue 11551
int_modulo_arith_test/bignum: RuntimeError # No bigints.
int_modulo_arith_test/modPow: RuntimeError # No bigints.
@@ -239,9 +196,6 @@
symbol_reserved_word_test/07: MissingCompileTimeError
symbol_reserved_word_test/10: MissingCompileTimeError
-[ $compiler == dart2js && $fast_startup ]
-apply3_test: Fail # mirrors not supported
-
[ $compiler != dart2js && $fasta ]
big_integer_arith_vm_test/add: CompileTimeError
big_integer_arith_vm_test/div: CompileTimeError
diff --git a/tests/corelib_2/apply_test.dart b/tests/corelib_2/apply_test.dart
index 2540d9a..9a3e94b 100644
--- a/tests/corelib_2/apply_test.dart
+++ b/tests/corelib_2/apply_test.dart
@@ -42,6 +42,8 @@
Expect.equals(res, Function.apply(func, list, new Map<Symbol, dynamic>()));
}
+ testListTyped(res, Function func, list) => testList(res, func, list);
+
test(res, func, list, map) {
map = symbolMapToStringMap(map);
Expect.equals(res, Function.apply(func, list, map));
@@ -71,6 +73,8 @@
[17, 25]
]));
- // Test that apply works on callable objects.
- testList(42, new Callable(), [13, 29]);
+ // Test that apply works on callable objects when it is passed to a method
+ // that expects Function (and not dynamic).
+ Expect.throws(() => testList(42, new Callable(), [13, 29])); //# 01: ok
+ testListTyped(42, new Callable(), [13, 29]); //# 02: ok
}
diff --git a/tests/corelib_2/corelib_2.status b/tests/corelib_2/corelib_2.status
index 5384ab4..92a3bee 100644
--- a/tests/corelib_2/corelib_2.status
+++ b/tests/corelib_2/corelib_2.status
@@ -9,7 +9,10 @@
num_sign_test: Crash, Pass # Issue 31768
[ $compiler == dart2js ]
+date_time11_test: RuntimeError, Pass # Fails when US is on winter time, issue 31285.
+int_parse_radix_test/badTypes: RuntimeError # wrong exception returned
iterable_where_type_test: RuntimeError # issue 31718
+list_unmodifiable_test: Pass, RuntimeError # Issue 28712
[ $compiler != dartdevc ]
error_stack_trace_test/static: MissingCompileTimeError
@@ -132,32 +135,12 @@
list_as_map_test: Pass, Slow # TODO(kasperl): Please triage.
string_trimlr_test/unicode63: RuntimeError # Uses Unicode 6.2.0 or earlier.
-[ $compiler == dart2js && $runtime == d8 && !$dart2js_with_kernel ]
+[ $compiler == dart2js && $runtime == d8 ]
uri_base_test: RuntimeError # D8 uses a custom uri scheme for Uri.base
-[ $compiler == dart2js && $runtime == drt && $csp && !$dart2js_with_kernel && $minified ]
-core_runtime_types_test: Pass, Fail # Issue 27913
-
[ $compiler == dart2js && $runtime != none ]
regexp/pcre_test: Pass, Slow # Issue 21593
-[ $compiler == dart2js && $runtime != none && !$checked && !$dart2js_with_kernel ]
-growable_list_test: RuntimeError # Concurrent modifications test always runs
-null_nosuchmethod_test: RuntimeError # Like many tests, fails if type checks are skipped.
-splay_tree_from_iterable_test: RuntimeError
-string_split_test/checkedstore: RuntimeError # Issue 30548: does not check stores into List<String>
-
-[ $compiler == dart2js && $runtime != none && !$dart2js_with_kernel ]
-error_stack_trace1_test: RuntimeError # Issue 12399
-int_parse_radix_test/01: RuntimeError
-int_parse_radix_test/02: RuntimeError
-integer_to_string_test/01: RuntimeError
-iterable_to_set_test: RuntimeError # is-checks do not implement strong mode type system
-list_concurrent_modify_test: RuntimeError # dart2js does not fully implement these
-list_test/*: RuntimeError # dart2js doesn't implement strong mode covariance checks
-nan_infinity_test/01: RuntimeError
-symbol_reserved_word_test/03: RuntimeError # Issue 19972, new Symbol('void') should be allowed.
-
[ $compiler == dart2js && $runtime == safari ]
regexp/lookahead_test: RuntimeError
regexp/no-extensions_test: RuntimeError
@@ -166,7 +149,7 @@
[ $compiler == dart2js && !$browser ]
package_resource_test: RuntimeError # Issue 26842
-[ $compiler == dart2js && $checked && $dart2js_with_kernel && $strong ]
+[ $compiler == dart2js && $checked && $fasta && $strong ]
apply3_test: RuntimeError
error_stack_trace1_test: RuntimeError # Issue 12399
from_environment_const_type_test/02: MissingCompileTimeError
@@ -187,38 +170,46 @@
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_return_type_test/01: RuntimeError
-iterable_return_type_test/02: RuntimeError
+iterable_return_type_test/01: RuntimeError # Issue 20085
+iterable_return_type_test/02: RuntimeError # Dart2js does not support Uint64*.
iterable_to_list_test/01: Crash # Wrong number of template arguments, given 2, expected 1
iterable_to_list_test/none: Crash # Wrong number of template arguments, given 2, expected 1
list_replace_range_test: RuntimeError # Issue 32010
list_test/01: Crash # Unsupported operation: Unsupported type parameter type node T.
list_test/none: Crash # Unsupported operation: Unsupported type parameter type node T.
map_test: Crash # tests/corelib_2/map_test.dart:903:7: Internal problem: Unhandled Null in installDefaultConstructor.
-symbol_reserved_word_test/03: RuntimeError
+symbol_reserved_word_test/03: RuntimeError # Issue 19972, new Symbol('void') should be allowed.
-[ $compiler == dart2js && $dart2js_with_kernel ]
-int_from_environment_test: Pass # Issue 31762
-int_parse_radix_test/none: Pass # Issue 31762
+[ $compiler == dart2js && $fast_startup ]
+apply3_test: Fail # mirrors not supported
+dynamic_nosuchmethod_test: Fail # mirrors not supported
-[ $compiler == dart2js && $dart2js_with_kernel && $fast_startup && $strong ]
-iterable_return_type_test/01: RuntimeError
-iterable_return_type_test/02: RuntimeError
+[ $compiler == dart2js && $fast_startup && $fasta && $strong ]
+iterable_return_type_test/01: RuntimeError # Issue 20085
+iterable_return_type_test/02: RuntimeError # Dart2js does not support Uint64*.
iterable_to_list_test/01: Crash # Wrong number of template arguments, given 2, expected 1
iterable_to_list_test/none: Crash # Wrong number of template arguments, given 2, expected 1
list_test/01: Crash # Unsupported operation: Unsupported type parameter type node T.
list_test/none: Crash # Unsupported operation: Unsupported type parameter type node T.
map_test: Crash # tests/corelib_2/map_test.dart:903:7: Internal problem: Unhandled Null in installDefaultConstructor.
-symbol_reserved_word_test/03: RuntimeError
+symbol_reserved_word_test/03: RuntimeError # Issue 19972, new Symbol('void') should be allowed.
uri_base_test: Crash # RangeError (index): Invalid value: Valid value range is empty: 0
-[ $compiler == dart2js && $dart2js_with_kernel && $host_checked && $strong ]
-apply3_test: RuntimeError
+[ $compiler == dart2js && $fasta ]
+int_from_environment_test: Pass # Issue 31762
+int_parse_radix_test/none: Pass # Issue 31762
+
+[ $compiler == dart2js && $fasta && $host_checked && $strong ]
+apply2_test: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+apply3_test: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+apply_test: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+bigint_test: RuntimeError
cast_test: RuntimeError
-collection_removes_test: RuntimeError
+core_runtime_types_test: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+date_time11_test: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
dynamic_nosuchmethod_test: RuntimeError
error_stack_trace1_test: RuntimeError # Issue 12399
-growable_list_test: RuntimeError
+growable_list_test: RuntimeError # Concurrent modifications test always runs
int_parse_radix_test/01: RuntimeError
int_parse_radix_test/02: RuntimeError
integer_to_radix_string_test/01: RuntimeError
@@ -227,32 +218,58 @@
integer_to_string_test/01: RuntimeError
iterable_empty_test: Crash # 'file:*/pkg/compiler/lib/src/ssa/interceptor_simplifier.dart': Failed assertion: line 391 pos 16: 'receiver.nonCheck() == user.inputs[1].nonCheck()': is not true.
iterable_fold_test: Crash # NoSuchMethodError: The getter 'isDynamic' was called on null.
+iterable_followed_by_test: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
iterable_reduce_test: Crash # NoSuchMethodError: The getter 'isDynamic' was called on null.
-iterable_return_type_test/01: RuntimeError
-iterable_return_type_test/02: RuntimeError
-iterable_to_list_test/01: RuntimeError
-list_concurrent_modify_test: RuntimeError
-list_insert_all_test: RuntimeError
-list_replace_range_test: RuntimeError
-list_set_all_test: RuntimeError
-list_test/01: RuntimeError
-list_test/none: RuntimeError
+iterable_return_type_test/01: RuntimeError # Issue 20085
+iterable_return_type_test/02: RuntimeError # Dart2js does not support Uint64*.
+iterable_to_list_test/01: RuntimeError # Issue 26501
+iterable_where_type_test: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+linked_hash_map_from_iterables_test: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+list_concurrent_modify_test: RuntimeError # dart2js does not fully implement these
+list_test/01: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+list_test/none: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+list_unmodifiable_test: RuntimeError
+main_test: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+map_from_iterables_test: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+map_test: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
nan_infinity_test/01: RuntimeError
queue_test: Crash # 'file:*/pkg/compiler/lib/src/ssa/interceptor_simplifier.dart': Failed assertion: line 391 pos 16: 'receiver.nonCheck() == user.inputs[1].nonCheck()': is not true.
+reg_exp_all_matches_test: RuntimeError
+reg_exp_start_end_test: RuntimeError
+regexp/capture_test: RuntimeError
+regexp/ecma-regex-examples_test: RuntimeError
+regexp/global_test: RuntimeError
+regexp/indexof_test: RuntimeError
+regexp/lastindex_test: RuntimeError
+regexp/non-capturing-groups_test: RuntimeError
+regexp/parentheses_test: RuntimeError
+regexp/pcre-test-4_test: RuntimeError
+regexp/regexp_kde_test: RuntimeError
+regexp/regexp_test: RuntimeError
+regexp/regress-regexp-codeflush_test: RuntimeError
+regexp/standalones_test: RuntimeError
+set_test: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
splay_tree_from_iterable_test: RuntimeError
stacktrace_fromstring_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
+string_from_list_test: RuntimeError
+string_fromcharcodes_test: RuntimeError
string_replace_test: Crash # NoSuchMethodError: The getter 'isDynamic' was called on null.
-string_split_test/checkedstore: RuntimeError
-symbol_reserved_word_test/03: RuntimeError
+string_split_test/checkedstore: RuntimeError # Issue 30548: does not check stores into List<String>
+string_split_test/none: RuntimeError
+string_test: RuntimeError
+symbol_reserved_word_test/03: RuntimeError # Issue 19972, new Symbol('void') should be allowed.
uri_base_test: RuntimeError
+uri_parameters_all_test: RuntimeError
+uri_query_test: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+uri_test: RuntimeError
-[ $compiler == dart2js && $dart2js_with_kernel && $minified && $strong ]
+[ $compiler == dart2js && $fasta && $minified && $strong ]
apply3_test: RuntimeError
+bigint_test: RuntimeError
cast_test: RuntimeError
-collection_removes_test: RuntimeError
dynamic_nosuchmethod_test: RuntimeError
-error_stack_trace1_test: RuntimeError
-growable_list_test: RuntimeError
+error_stack_trace1_test: RuntimeError # Issue 12399
+growable_list_test: RuntimeError # Concurrent modifications test always runs
hash_set_test/01: Crash # Assertion failure: Cannot find value Instance of 'ThisLocal' in (local(_CustomHashSet.#x), local(_CustomHashSet.#)) for j:closure_call(_CustomHashSet__CustomHashSet_closure.call).
int_parse_radix_test/01: RuntimeError
int_parse_radix_test/02: RuntimeError
@@ -262,63 +279,55 @@
integer_to_string_test/01: RuntimeError
iterable_empty_test: RuntimeError
iterable_fold_test: Crash # NoSuchMethodError: The getter 'isDynamic' was called on null.
+iterable_followed_by_test: RuntimeError
iterable_reduce_test: Crash # NoSuchMethodError: The getter 'isDynamic' was called on null.
-iterable_return_type_test/01: RuntimeError
-iterable_return_type_test/02: RuntimeError
-iterable_to_list_test/01: RuntimeError
-list_concurrent_modify_test: RuntimeError
-list_insert_all_test: RuntimeError
-list_replace_range_test: RuntimeError # Issue 32010
-list_set_all_test: RuntimeError # Issue 32010
-list_test/01: RuntimeError
-list_test/none: RuntimeError
-nan_infinity_test/01: RuntimeError
-queue_test: RuntimeError
-splay_tree_from_iterable_test: RuntimeError
-stacktrace_fromstring_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-string_replace_test: Crash # NoSuchMethodError: The getter 'isDynamic' was called on null.
-string_split_test/checkedstore: RuntimeError
-symbol_operator_test/03: RuntimeError
-symbol_operator_test/none: RuntimeError
-symbol_reserved_word_test/03: RuntimeError
-uri_base_test: RuntimeError
-
-[ $compiler == dart2js && $dart2js_with_kernel && $strong ]
-map_unmodifiable_cast_test: Crash
-null_nosuchmethod_test: RuntimeError
-
-[ $compiler == dart2js && $dart2js_with_kernel && !$strong ]
-*: SkipByDesign
-
-[ $compiler == dart2js && !$dart2js_with_kernel ]
-date_time11_test: RuntimeError, Pass # Fails when US is on winter time, issue 31285.
-from_environment_const_type_undefined_test/09: MissingCompileTimeError
-from_environment_const_type_undefined_test/11: MissingCompileTimeError
-from_environment_const_type_undefined_test/12: MissingCompileTimeError
-from_environment_const_type_undefined_test/13: MissingCompileTimeError
-from_environment_const_type_undefined_test/14: MissingCompileTimeError
-from_environment_const_type_undefined_test/16: MissingCompileTimeError
-hash_set_test/01: RuntimeError # Issue 11551
-int_parse_radix_bad_handler_test: MissingCompileTimeError
-integer_to_radix_string_test: RuntimeError # Issue 29921
-iterable_element_at_test/static: MissingCompileTimeError
-iterable_mapping_test/01: MissingCompileTimeError
iterable_return_type_test/01: RuntimeError # Issue 20085
iterable_return_type_test/02: RuntimeError # Dart2js does not support Uint64*.
iterable_to_list_test/01: RuntimeError # Issue 26501
-list_unmodifiable_test: Pass, RuntimeError # Issue 28712
-map_keys2_test: RuntimeError # needs Dart 2 is checks
-string_base_vm_static_test: MissingCompileTimeError
-string_static_test: MissingCompileTimeError
+list_concurrent_modify_test: RuntimeError # dart2js does not fully implement these
+list_test/01: RuntimeError
+list_test/none: RuntimeError
+list_unmodifiable_test: RuntimeError
+nan_infinity_test/01: RuntimeError
+queue_test: RuntimeError
+reg_exp_all_matches_test: RuntimeError
+reg_exp_start_end_test: RuntimeError
+regexp/capture_test: RuntimeError
+regexp/ecma-regex-examples_test: RuntimeError
+regexp/global_test: RuntimeError
+regexp/indexof_test: RuntimeError
+regexp/lastindex_test: RuntimeError
+regexp/non-capturing-groups_test: RuntimeError
+regexp/parentheses_test: RuntimeError
+regexp/pcre-test-4_test: RuntimeError
+regexp/regexp_kde_test: RuntimeError
+regexp/regexp_test: RuntimeError
+regexp/regress-regexp-codeflush_test: RuntimeError
+regexp/standalones_test: RuntimeError
+splay_tree_from_iterable_test: RuntimeError
+stacktrace_fromstring_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
+string_from_list_test: RuntimeError
+string_fromcharcodes_test: RuntimeError
+string_replace_test: Crash # NoSuchMethodError: The getter 'isDynamic' was called on null.
+string_split_test/checkedstore: RuntimeError # Issue 30548: does not check stores into List<String>
+string_split_test/none: RuntimeError
+string_test: RuntimeError
+symbol_operator_test/03: RuntimeError
+symbol_operator_test/none: RuntimeError
+symbol_reserved_word_test/03: RuntimeError # Issue 19972, new Symbol('void') should be allowed.
+uri_base_test: RuntimeError
+uri_parameters_all_test: RuntimeError
+uri_test: RuntimeError
-# Dart2JS does not support strong mode without the new front end, though it
-# does support checked mode which is partly compatible.
-[ $compiler == dart2js && !$dart2js_with_kernel && $strong ]
+[ $compiler == dart2js && $fasta && $strong ]
+map_unmodifiable_cast_test: Crash
+null_nosuchmethod_test: RuntimeError # Fails if type checks are skipped.
+
+[ $compiler == dart2js && $fasta && !$strong ]
*: SkipByDesign
-[ $compiler == dart2js && $fast_startup ]
-apply3_test: Fail # mirrors not supported
-dynamic_nosuchmethod_test: Fail # mirrors not supported
+[ $compiler == dart2js && !$fasta ]
+*: SkipByDesign
[ $compiler != dart2js && $compiler != dartdevc && $compiler != dartdevk && $compiler != dartk && $compiler != dartkp ]
iterable_element_at_test/static: MissingCompileTimeError
@@ -356,7 +365,6 @@
# ===== dartk + vm status lines =====
[ $compiler == dartk && $runtime == vm && $strong ]
apply3_test: RuntimeError
-apply_test: RuntimeError, OK
iterable_fold_test/02: RuntimeError
iterable_reduce_test/01: CompileTimeError # Issue 31533
iterable_reduce_test/none: RuntimeError
@@ -367,17 +375,7 @@
symbol_test/none: RuntimeError # Issues 11669 and 31936 - throwing const constructors.
unicode_test: RuntimeError # Issue 18061: German double S.
-# ===== dartkp + dart_precompiled + debug status lines =====
-[ $compiler == dartkp && $mode == debug && $runtime == dart_precompiled && $strong ]
-null_nosuchmethod_test/01: Crash # dartbug.com/32377
-null_nosuchmethod_test/none: Crash # dartbug.com/32377
-
-# ===== dartkp + dart_precompiled status lines =====
-[ $compiler == dartkp && $mode == debug && $runtime == dart_precompiled && $strong ]
-null_nosuchmethod_test: Crash
-
[ $compiler == dartkp && $runtime == dart_precompiled && $strong ]
-apply_test: RuntimeError, OK
iterable_fold_test/02: RuntimeError
iterable_reduce_test/01: CompileTimeError # Issue 31533
iterable_reduce_test/none: RuntimeError
@@ -403,6 +401,27 @@
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
@@ -428,7 +447,7 @@
double_floor_test/int64: RuntimeError, OK # Requires fixed-size int64 support.
double_round_test/int64: RuntimeError, OK # Requires fixed-size int64 support.
double_truncate_test/int64: RuntimeError, OK # Requires fixed-size int64 support.
-hash_set_test/01: RuntimeError # Issue 11551
+hash_set_test/01: RuntimeError # non JS number semantics - Issue 11551
int_modulo_arith_test/modPow: RuntimeError # Issue 29921
int_parse_with_limited_ints_test: Skip # dart2js and dartdevc don't know about --limit-ints-to-64-bits
integer_arith_vm_test/modPow: RuntimeError # Issues 10245, 30170
@@ -439,6 +458,7 @@
typed_data_with_limited_ints_test: Skip # dart2js and dartdevc don't know about --limit-ints-to-64-bits
[ $runtime != none && ($compiler == dartdevc || $compiler == dartdevk) ]
+apply_test/01: RuntimeError # Issue 32157
apply2_test: RuntimeError # Issue 29921
apply3_test: RuntimeError # Issue 29921
bigint_test: Pass, Slow
@@ -507,27 +527,6 @@
symbol_test/none: RuntimeError # Issue 29921
typed_data_with_limited_ints_test: Skip # dartdevc doesn't know about --limit-ints-to-64-bits
-[ !$checked && !$dart2js_with_kernel && ($compiler == dart2js || $compiler == none && $runtime == vm) ]
-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
-
[ !$checked && !$strong ]
core_runtime_types_static_test: MissingCompileTimeError
splay_tree_test/01: MissingCompileTimeError
@@ -599,20 +598,17 @@
[ $compiler == app_jit || $compiler == none || $compiler == precompiler ]
int_parse_radix_bad_handler_test: MissingCompileTimeError
symbol_operator_test/03: Fail # Issue 11669
+symbol_reserved_word_test/02: CompileTimeError # Issue 20191
+symbol_reserved_word_test/04: MissingCompileTimeError # Issue 11669, 19972, With the exception of 'void', const Symbol() should not accept reserved words.
symbol_reserved_word_test/06: RuntimeError # Issue 11669, With the exception of 'void', new Symbol() should not accept reserved words.
+symbol_reserved_word_test/07: MissingCompileTimeError # Issue 11669, 19972, With the exception of 'void', const Symbol() should not accept reserved words.
symbol_reserved_word_test/09: RuntimeError # Issue 11669, With the exception of 'void', new Symbol() should not accept reserved words.
+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/none: Fail # Issue 11669
unicode_test: Fail # Issue 6706
-# void should be a valid symbol.
-[ $compiler == app_jit || $compiler == none || $compiler == precompiler || $compiler == dart2js && !$dart2js_with_kernel ]
-symbol_reserved_word_test/02: CompileTimeError # Issue 20191
-symbol_reserved_word_test/04: MissingCompileTimeError # Issue 11669, 19972, With the exception of 'void', const Symbol() should not accept reserved words.
-symbol_reserved_word_test/07: MissingCompileTimeError # Issue 11669, 19972, With the exception of 'void', const Symbol() should not accept reserved words.
-symbol_reserved_word_test/10: MissingCompileTimeError # Issue 11669, 19972, With the exception of 'void', const Symbol() should not accept reserved words.
-
[ $compiler == app_jit || $compiler == precompiler ]
from_environment_const_type_test/02: MissingCompileTimeError
from_environment_const_type_test/03: MissingCompileTimeError
@@ -651,7 +647,7 @@
apply3_test: SkipByDesign
dynamic_nosuchmethod_test: SkipByDesign
-[ $compiler == precompiler || $compiler == dart2js && !$checked || $runtime == vm && !$checked && !$strong ]
+[ $compiler == precompiler || $runtime == vm && !$checked && !$strong ]
int_parse_radix_test/badTypes: RuntimeError # wrong exception returned
[ $runtime == dart_precompiled || $runtime == flutter || $runtime == vm ]
@@ -670,3 +666,6 @@
bigint_test: Pass, Crash # Issue 31660
integer_parsed_mul_div_vm_test: Pass, Slow # Slow
+[ $compiler != dartk && $runtime == vm && $checked ]
+apply_test/01: RuntimeError
+
diff --git a/tests/html/html.status b/tests/html/html.status
index cfa3a87..ccc75f4 100644
--- a/tests/html/html.status
+++ b/tests/html/html.status
@@ -233,7 +233,7 @@
[ $compiler == dart2js && $checked ]
js_function_getter_trust_types_test: Skip # --trust-type-annotations incompatible with --checked
-[ $compiler == dart2js && $checked && $dart2js_with_kernel ]
+[ $compiler == dart2js && $checked && $fasta ]
canvasrenderingcontext2d_test/drawImage_image_element: Timeout
canvasrenderingcontext2d_test/drawImage_video_element: Timeout
canvasrenderingcontext2d_test/drawImage_video_element_dataUrl: Timeout
@@ -317,7 +317,14 @@
mirrors_js_typed_interop_test: SkipByDesign
postmessage_structured_test: SkipByDesign
-[ $compiler == dart2js && $dart2js_with_kernel && $fast_startup ]
+[ $compiler == dart2js && $fast_startup ]
+custom/constructor_calls_created_synchronously_test: Fail # mirrors not supported
+custom/js_custom_test: Fail # mirrors not supported
+custom/mirrors_2_test: Fail # mirrors not supported
+custom/mirrors_test: Fail # mirrors not supported
+mirrors_js_typed_interop_test: Fail # mirrors not supported
+
+[ $compiler == dart2js && $fast_startup && $fasta ]
js_typed_interop_default_arg_test/explicit_argument: RuntimeError
js_typed_interop_default_arg_test/none: RuntimeError
js_typed_interop_test/object literal: RuntimeError
@@ -325,27 +332,20 @@
js_typed_interop_test/static_method_tearoff_1: RuntimeError
js_util_test/hasProperty: RuntimeError
-[ $compiler == dart2js && $dart2js_with_kernel && $host_checked ]
+[ $compiler == dart2js && $fasta && $host_checked ]
custom/mirrors_2_test: RuntimeError
custom/mirrors_test: RuntimeError
fileapi_test/entry: RuntimeError
js_typed_interop_default_arg_test/explicit_argument: RuntimeError
js_typed_interop_test/static_method_tearoff_1: RuntimeError
-[ $compiler == dart2js && $dart2js_with_kernel && $minified ]
+[ $compiler == dart2js && $fasta && $minified ]
custom/mirrors_2_test: RuntimeError
custom/mirrors_test: RuntimeError
fileapi_test/entry: RuntimeError
js_typed_interop_default_arg_test/explicit_argument: RuntimeError
js_typed_interop_test/static_method_tearoff_1: RuntimeError
-[ $compiler == dart2js && $fast_startup ]
-custom/constructor_calls_created_synchronously_test: Fail # mirrors not supported
-custom/js_custom_test: Fail # mirrors not supported
-custom/mirrors_2_test: Fail # mirrors not supported
-custom/mirrors_test: Fail # mirrors not supported
-mirrors_js_typed_interop_test: Fail # mirrors not supported
-
[ $compiler == dart2js && $minified ]
canvas_pixel_array_type_alias_test/types2_runtimeTypeName: Fail, OK # Issue 12605
diff --git a/tests/language/deferred_optimized_test.dart b/tests/language/deferred_optimized_test.dart
index d39d84e..e2de2bf 100644
--- a/tests/language/deferred_optimized_test.dart
+++ b/tests/language/deferred_optimized_test.dart
@@ -1,7 +1,7 @@
// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// VMOptions=--optimization-counter-threshold=10 --no-use-inlining --no-background-compilation
+// VMOptions=--optimization-counter-threshold=10 --compiler-passes=-Inlining --no-background-compilation
// Declares foo that returns 42.
import "deferred_constraints_lib2.dart" deferred as lib;
diff --git a/tests/language/language_dart2js.status b/tests/language/language_dart2js.status
index 271a2ed..5e33574 100644
--- a/tests/language/language_dart2js.status
+++ b/tests/language/language_dart2js.status
@@ -7,6 +7,9 @@
# VM specific tests that should not be run by dart2js.
[ $compiler == dart2js ]
+full_stacktrace1_test: Pass, RuntimeError # Issue 12698
+full_stacktrace2_test: Pass, RuntimeError # Issue 12698
+full_stacktrace3_test: Pass, RuntimeError # Issue 12698
local_function_test: RuntimeError # Issue 31879
vm/*: Skip # Issue 12699
@@ -25,7 +28,7 @@
[ $compiler == dart2js && $runtime == ff ]
round_test: Pass, Fail, OK # Fixed in ff 35. Common JavaScript engine Math.round bug.
-[ $compiler == dart2js && $runtime == jsshell && !$dart2js_with_kernel ]
+[ $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
@@ -35,7 +38,7 @@
[ $compiler == dart2js && $runtime == none ]
*: Fail, Pass # TODO(ahe): Triage these tests.
-[ $compiler == dart2js && $runtime == none && $dart2js_with_kernel ]
+[ $compiler == dart2js && $runtime == none && $fasta ]
*: Fail, Pass, Crash # TODO(sigmund): we should have no crashes when migration completes
[ $compiler == dart2js && $runtime == safari ]
@@ -48,37 +51,25 @@
conditional_import_string_test: Fail # Issue 30615
conditional_import_test: Fail # Issue 30615
-[ $compiler == dart2js && $browser && !$dart2js_with_kernel ]
+[ $compiler == dart2js && $browser && !$fasta ]
config_import_test: Fail # Test flag is not passed to the compiler.
library_env_test/has_io_support: RuntimeError # Issue 27398
library_env_test/has_no_io_support: Pass # Issue 27398
-[ $compiler == dart2js && $checked && $dart2js_with_kernel ]
+[ $compiler == dart2js && $checked && $fasta ]
assertion_initializer_const_function_test/01: RuntimeError
-assertion_initializer_test: CompileTimeError
+assertion_initializer_test: RuntimeError
assign_static_type_test/01: Fail
assign_static_type_test/02: MissingCompileTimeError
+async_await_test: Crash # NoSuchMethodError: The getter 'parent' was called on null.
async_return_types_test/nestedFuture: Fail # Issue 26429
async_return_types_test/wrongTypeParameter: Fail # Issue 26429
-async_star_cancel_while_paused_test: RuntimeError
-bad_override_test/03: MissingCompileTimeError
-bad_override_test/04: MissingCompileTimeError
-bad_override_test/05: MissingCompileTimeError
-bit_operations_test/01: RuntimeError
-bit_operations_test/02: RuntimeError
-bit_operations_test/03: RuntimeError
-bit_operations_test/04: RuntimeError
-bit_operations_test/none: RuntimeError
-branch_canonicalization_test: RuntimeError
-call_function_apply_test: RuntimeError
-call_nonexistent_constructor_test/01: RuntimeError
-canonical_const2_test: RuntimeError
-canonical_const3_test: CompileTimeError
-check_member_static_test/02: MissingCompileTimeError
-class_cycle_test/02: MissingCompileTimeError
-class_cycle_test/03: MissingCompileTimeError
-closure_in_field_test/01: RuntimeError
-closure_in_field_test/02: RuntimeError
+async_star_pause_test: Crash # NoSuchMethodError: The getter 'parent' was called on null.
+async_star_test: Crash # NoSuchMethodError: The getter 'parent' was called on null.
+await_for_test: Crash # NoSuchMethodError: The getter 'parent' was called on null.
+cha_deopt1_test: RuntimeError
+cha_deopt2_test: RuntimeError
+cha_deopt3_test: RuntimeError
closure_type_test/01: RuntimeError # Issue 12745
closure_type_test/none: RuntimeError # Issue 12745
compile_time_constant_checked2_test/01: MissingCompileTimeError
@@ -107,7 +98,6 @@
compile_time_constant_checked_test/01: Fail
compile_time_constant_checked_test/02: MissingCompileTimeError
compile_time_constant_checked_test/03: Fail
-config_import_test: RuntimeError
const_constructor2_test/13: MissingCompileTimeError
const_constructor2_test/14: MissingCompileTimeError
const_constructor2_test/15: MissingCompileTimeError
@@ -118,103 +108,163 @@
const_constructor2_test/24: MissingCompileTimeError
const_constructor3_test/02: MissingCompileTimeError
const_constructor3_test/04: MissingCompileTimeError
-const_error_multiply_initialized_test/02: MissingCompileTimeError
-const_error_multiply_initialized_test/04: MissingCompileTimeError
-const_evaluation_test/01: RuntimeError
const_init2_test/02: MissingCompileTimeError
-const_instance_field_test/01: MissingCompileTimeError
-const_map2_test/00: MissingCompileTimeError
-const_map3_test/00: MissingCompileTimeError
-const_switch2_test/01: MissingCompileTimeError
-const_switch_test/02: RuntimeError
-const_switch_test/04: RuntimeError
-constants_test/05: MissingCompileTimeError
-constructor2_test: RuntimeError
-constructor3_test: RuntimeError
-constructor5_test: RuntimeError
-constructor6_test: RuntimeError
-constructor_named_arguments_test/none: RuntimeError
-constructor_redirect1_negative_test: Crash # Issue 30856
-constructor_redirect2_negative_test: Crash # Issue 30856
-constructor_redirect2_test/01: MissingCompileTimeError
-constructor_redirect_test/01: Crash # Assertion failure: Cannot find value Instance of 'ThisLocal' in (local(A.named2#x), local(A.named2#y), local(A.named2#z)) for j:constructor(A.named2).
-cyclic_constructor_test/01: Crash # Issue 30856
-deferred_constraints_constants_test/default_argument2: Crash # Unsupported operation: KernelDeferredLoadTask.addMirrorElementsForLibrary
+deferred_closurize_load_library_test: RuntimeError
+deferred_constant_list_test: RuntimeError
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/as_operation: RuntimeError
deferred_constraints_type_annotation_test/catch_check: RuntimeError
deferred_constraints_type_annotation_test/is_check: RuntimeError
-deferred_constraints_type_annotation_test/type_annotation1: Fail
-deferred_constraints_type_annotation_test/type_annotation_generic1: Fail
-deferred_constraints_type_annotation_test/type_annotation_generic4: Fail
-deferred_inheritance_constraints_test/extends: MissingCompileTimeError
-deferred_inheritance_constraints_test/implements: MissingCompileTimeError
-deferred_inheritance_constraints_test/mixin: MissingCompileTimeError
+deferred_constraints_type_annotation_test/new: RuntimeError
+deferred_constraints_type_annotation_test/new_before_load: RuntimeError
+deferred_constraints_type_annotation_test/new_generic1: RuntimeError
+deferred_constraints_type_annotation_test/new_generic2: RuntimeError
+deferred_constraints_type_annotation_test/new_generic3: RuntimeError
+deferred_constraints_type_annotation_test/none: RuntimeError
+deferred_constraints_type_annotation_test/static_method: RuntimeError
+deferred_constraints_type_annotation_test/type_annotation_generic2: RuntimeError
+deferred_constraints_type_annotation_test/type_annotation_generic3: RuntimeError
+deferred_constraints_type_annotation_test/type_annotation_non_deferred: RuntimeError
+deferred_constraints_type_annotation_test/type_annotation_null: RuntimeError
+deferred_constraints_type_annotation_test/type_annotation_top_level: RuntimeError
+deferred_function_type_test: RuntimeError
+deferred_global_test: RuntimeError
+deferred_inlined_test: RuntimeError
deferred_load_constants_test/none: RuntimeError
-deferred_load_library_wrong_args_test/01: MissingRuntimeError
-deferred_not_loaded_check_test: RuntimeError
-deferred_redirecting_factory_test: RuntimeError
-double_int_to_string_test: RuntimeError
-duplicate_export_negative_test: Fail
-duplicate_implements_test/01: MissingCompileTimeError
-duplicate_implements_test/02: MissingCompileTimeError
-duplicate_implements_test/03: MissingCompileTimeError
-duplicate_implements_test/04: MissingCompileTimeError
-dynamic_prefix_core_test/01: RuntimeError
-dynamic_prefix_core_test/none: RuntimeError
-enum_mirror_test: RuntimeError
-example_constructor_test: RuntimeError
-expect_test: RuntimeError
-external_test/10: MissingRuntimeError
-external_test/13: MissingRuntimeError
-external_test/20: MissingRuntimeError
-factory_redirection_test/07: MissingCompileTimeError
+deferred_load_inval_code_test: RuntimeError
+deferred_mixin_test: RuntimeError
+deferred_no_such_method_test: RuntimeError
+deferred_only_constant_test: RuntimeError
+deferred_optimized_test: RuntimeError
+deferred_regression_22995_test: RuntimeError
+deferred_regression_28678_test: RuntimeError
+deferred_shadow_load_library_test: RuntimeError
+deferred_shared_and_unshared_classes_test: RuntimeError
+deferred_static_seperate_test: RuntimeError
+deferred_type_dependency_test/as: RuntimeError
+deferred_type_dependency_test/is: RuntimeError
+deferred_type_dependency_test/none: RuntimeError
+deferred_type_dependency_test/type_annotation: RuntimeError
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
-fauxverride_test/03: MissingCompileTimeError
-fauxverride_test/05: MissingCompileTimeError
-field_initialization_order_test: RuntimeError
-field_override3_test/00: MissingCompileTimeError
-field_override3_test/01: MissingCompileTimeError
-field_override3_test/02: MissingCompileTimeError
-field_override3_test/03: MissingCompileTimeError
-field_override4_test/02: MissingCompileTimeError
-final_attempt_reinitialization_test/01: MissingCompileTimeError
-final_attempt_reinitialization_test/02: MissingCompileTimeError
-final_field_initialization_order_test: RuntimeError
-full_stacktrace1_test: RuntimeError # Issue 12698
-full_stacktrace2_test: RuntimeError # Issue 12698
-full_stacktrace3_test: RuntimeError # Issue 12698
-generic_methods_type_expression_test/01: RuntimeError
-generic_methods_type_expression_test/03: RuntimeError
-generic_methods_type_expression_test/none: RuntimeError
-getter_override2_test/02: MissingCompileTimeError
-getter_override_test/00: MissingCompileTimeError
-getter_override_test/01: MissingCompileTimeError
-getter_override_test/02: MissingCompileTimeError
-identical_closure2_test: RuntimeError
-if_null_assignment_behavior_test/14: RuntimeError
-infinity_test: RuntimeError
-instance_creation_in_function_annotation_test: RuntimeError
-integer_division_by_zero_test: RuntimeError
+function_type/function_type0_test: Crash # NoSuchMethodError: The getter 'parent' was called on null.
+function_type/function_type10_test: Crash # NoSuchMethodError: The getter 'parent' was called on null.
+function_type/function_type11_test: Crash # NoSuchMethodError: The getter 'parent' was called on null.
+function_type/function_type12_test: Crash # NoSuchMethodError: The getter 'parent' was called on null.
+function_type/function_type13_test: Crash # NoSuchMethodError: The getter 'parent' was called on null.
+function_type/function_type14_test: Crash # NoSuchMethodError: The getter 'parent' was called on null.
+function_type/function_type15_test: Crash # NoSuchMethodError: The getter 'parent' was called on null.
+function_type/function_type16_test: Crash # NoSuchMethodError: The getter 'parent' was called on null.
+function_type/function_type17_test: Crash # NoSuchMethodError: The getter 'parent' was called on null.
+function_type/function_type18_test: Crash # NoSuchMethodError: The getter 'parent' was called on null.
+function_type/function_type19_test: Crash # NoSuchMethodError: The getter 'parent' was called on null.
+function_type/function_type1_test: Crash # NoSuchMethodError: The getter 'parent' was called on null.
+function_type/function_type20_test: Crash # NoSuchMethodError: The getter 'parent' was called on null.
+function_type/function_type21_test: Crash # NoSuchMethodError: The getter 'parent' was called on null.
+function_type/function_type22_test: Crash # NoSuchMethodError: The getter 'parent' was called on null.
+function_type/function_type23_test: Crash # NoSuchMethodError: The getter 'parent' was called on null.
+function_type/function_type24_test: Crash # NoSuchMethodError: The getter 'parent' was called on null.
+function_type/function_type25_test: Crash # NoSuchMethodError: The getter 'parent' was called on null.
+function_type/function_type26_test: Crash # NoSuchMethodError: The getter 'parent' was called on null.
+function_type/function_type27_test: Crash # NoSuchMethodError: The getter 'parent' was called on null.
+function_type/function_type28_test: Crash # NoSuchMethodError: The getter 'parent' was called on null.
+function_type/function_type29_test: Crash # NoSuchMethodError: The getter 'parent' was called on null.
+function_type/function_type2_test: Crash # NoSuchMethodError: The getter 'parent' was called on null.
+function_type/function_type30_test: Crash # NoSuchMethodError: The getter 'parent' was called on null.
+function_type/function_type31_test: Crash # NoSuchMethodError: The getter 'parent' was called on null.
+function_type/function_type32_test: Crash # NoSuchMethodError: The getter 'parent' was called on null.
+function_type/function_type33_test: Crash # NoSuchMethodError: The getter 'parent' was called on null.
+function_type/function_type34_test: Crash # NoSuchMethodError: The getter 'parent' was called on null.
+function_type/function_type35_test: Crash # NoSuchMethodError: The getter 'parent' was called on null.
+function_type/function_type36_test: Crash # NoSuchMethodError: The getter 'parent' was called on null.
+function_type/function_type37_test: Crash # NoSuchMethodError: The getter 'parent' was called on null.
+function_type/function_type38_test: Crash # NoSuchMethodError: The getter 'parent' was called on null.
+function_type/function_type39_test: Crash # NoSuchMethodError: The getter 'parent' was called on null.
+function_type/function_type3_test: Crash # NoSuchMethodError: The getter 'parent' was called on null.
+function_type/function_type40_test: Crash # NoSuchMethodError: The getter 'parent' was called on null.
+function_type/function_type41_test: Crash # NoSuchMethodError: The getter 'parent' was called on null.
+function_type/function_type42_test: Crash # NoSuchMethodError: The getter 'parent' was called on null.
+function_type/function_type43_test: Crash # NoSuchMethodError: The getter 'parent' was called on null.
+function_type/function_type44_test: Crash # NoSuchMethodError: The getter 'parent' was called on null.
+function_type/function_type45_test: Crash # NoSuchMethodError: The getter 'parent' was called on null.
+function_type/function_type46_test: Crash # NoSuchMethodError: The getter 'parent' was called on null.
+function_type/function_type47_test: Crash # NoSuchMethodError: The getter 'parent' was called on null.
+function_type/function_type48_test: Crash # NoSuchMethodError: The getter 'parent' was called on null.
+function_type/function_type49_test: Crash # NoSuchMethodError: The getter 'parent' was called on null.
+function_type/function_type4_test: Crash # NoSuchMethodError: The getter 'parent' was called on null.
+function_type/function_type50_test: Crash # NoSuchMethodError: The getter 'parent' was called on null.
+function_type/function_type51_test: Crash # NoSuchMethodError: The getter 'parent' was called on null.
+function_type/function_type52_test: Crash # NoSuchMethodError: The getter 'parent' was called on null.
+function_type/function_type53_test: Crash # NoSuchMethodError: The getter 'parent' was called on null.
+function_type/function_type54_test: Crash # NoSuchMethodError: The getter 'parent' was called on null.
+function_type/function_type55_test: Crash # NoSuchMethodError: The getter 'parent' was called on null.
+function_type/function_type56_test: Crash # NoSuchMethodError: The getter 'parent' was called on null.
+function_type/function_type57_test: Crash # NoSuchMethodError: The getter 'parent' was called on null.
+function_type/function_type58_test: Crash # NoSuchMethodError: The getter 'parent' was called on null.
+function_type/function_type59_test: Crash # NoSuchMethodError: The getter 'parent' was called on null.
+function_type/function_type5_test: Crash # NoSuchMethodError: The getter 'parent' was called on null.
+function_type/function_type60_test: Crash # NoSuchMethodError: The getter 'parent' was called on null.
+function_type/function_type61_test: Crash # NoSuchMethodError: The getter 'parent' was called on null.
+function_type/function_type62_test: Crash # NoSuchMethodError: The getter 'parent' was called on null.
+function_type/function_type63_test: Crash # NoSuchMethodError: The getter 'parent' was called on null.
+function_type/function_type64_test: Crash # NoSuchMethodError: The getter 'parent' was called on null.
+function_type/function_type65_test: Crash # NoSuchMethodError: The getter 'parent' was called on null.
+function_type/function_type66_test: Crash # NoSuchMethodError: The getter 'parent' was called on null.
+function_type/function_type67_test: Crash # NoSuchMethodError: The getter 'parent' was called on null.
+function_type/function_type68_test: Crash # NoSuchMethodError: The getter 'parent' was called on null.
+function_type/function_type69_test: Crash # NoSuchMethodError: The getter 'parent' was called on null.
+function_type/function_type6_test: Crash # NoSuchMethodError: The getter 'parent' was called on null.
+function_type/function_type70_test: Crash # NoSuchMethodError: The getter 'parent' was called on null.
+function_type/function_type71_test: Crash # NoSuchMethodError: The getter 'parent' was called on null.
+function_type/function_type72_test: Crash # NoSuchMethodError: The getter 'parent' was called on null.
+function_type/function_type73_test: Crash # NoSuchMethodError: The getter 'parent' was called on null.
+function_type/function_type74_test: Crash # NoSuchMethodError: The getter 'parent' was called on null.
+function_type/function_type75_test: Crash # NoSuchMethodError: The getter 'parent' was called on null.
+function_type/function_type76_test: Crash # NoSuchMethodError: The getter 'parent' was called on null.
+function_type/function_type77_test: Crash # NoSuchMethodError: The getter 'parent' was called on null.
+function_type/function_type78_test: Crash # NoSuchMethodError: The getter 'parent' was called on null.
+function_type/function_type79_test: Crash # NoSuchMethodError: The getter 'parent' was called on null.
+function_type/function_type7_test: Crash # NoSuchMethodError: The getter 'parent' was called on null.
+function_type/function_type80_test: Crash # NoSuchMethodError: The getter 'parent' was called on null.
+function_type/function_type81_test: Crash # NoSuchMethodError: The getter 'parent' was called on null.
+function_type/function_type82_test: Crash # NoSuchMethodError: The getter 'parent' was called on null.
+function_type/function_type83_test: Crash # NoSuchMethodError: The getter 'parent' was called on null.
+function_type/function_type84_test: Crash # NoSuchMethodError: The getter 'parent' was called on null.
+function_type/function_type85_test: Crash # NoSuchMethodError: The getter 'parent' was called on null.
+function_type/function_type86_test: Crash # NoSuchMethodError: The getter 'parent' was called on null.
+function_type/function_type87_test: Crash # NoSuchMethodError: The getter 'parent' was called on null.
+function_type/function_type88_test: Crash # NoSuchMethodError: The getter 'parent' was called on null.
+function_type/function_type89_test: Crash # NoSuchMethodError: The getter 'parent' was called on null.
+function_type/function_type8_test: Crash # NoSuchMethodError: The getter 'parent' was called on null.
+function_type/function_type90_test: Crash # NoSuchMethodError: The getter 'parent' was called on null.
+function_type/function_type91_test: Crash # NoSuchMethodError: The getter 'parent' was called on null.
+function_type/function_type92_test: Crash # NoSuchMethodError: The getter 'parent' was called on null.
+function_type/function_type93_test: Crash # NoSuchMethodError: The getter 'parent' was called on null.
+function_type/function_type94_test: Crash # NoSuchMethodError: The getter 'parent' was called on null.
+function_type/function_type95_test: Crash # NoSuchMethodError: The getter 'parent' was called on null.
+function_type/function_type96_test: Crash # NoSuchMethodError: The getter 'parent' was called on null.
+function_type/function_type97_test: Crash # NoSuchMethodError: The getter 'parent' was called on null.
+function_type/function_type98_test: Crash # NoSuchMethodError: The getter 'parent' was called on null.
+function_type/function_type99_test: Crash # NoSuchMethodError: The getter 'parent' was called on null.
+function_type/function_type9_test: Crash # NoSuchMethodError: The getter 'parent' was called on null.
+generalized_void_syntax_test: RuntimeError
+generic_function_typedef2_test/04: Crash # NoSuchMethodError: The getter 'parent' was called on null.
+generic_function_typedef_test: Crash # NoSuchMethodError: The getter 'parent' was called on null.
+generic_functions_test: RuntimeError
+generic_local_functions_test: Crash # NoSuchMethodError: The getter 'parent' was called on null.
+generic_methods_generic_function_parameter_test: Crash # NoSuchMethodError: The getter 'parent' was called on null.
+generic_methods_test: RuntimeError
internal_library_test/02: Crash # NoSuchMethodError: Class 'DillLibraryBuilder' has no instance getter 'mixinApplicationClasses'.
-invocation_mirror2_test: RuntimeError
-invocation_mirror_empty_arguments_test: RuntimeError
-invocation_mirror_test: RuntimeError
-issue21079_test: RuntimeError
-left_shift_test: RuntimeError
-library_env_test/has_mirror_support: RuntimeError
-library_env_test/has_no_html_support: RuntimeError
-library_env_test/has_no_io_support: RuntimeError
list_literal1_test/01: MissingCompileTimeError
-list_literal4_test: RuntimeError
-main_not_a_function_test/01: CompileTimeError
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
@@ -223,187 +273,15 @@
malformed2_test/00: RuntimeError
malformed2_test/01: MissingCompileTimeError
map_literal1_test/01: MissingCompileTimeError
-method_override5_test: RuntimeError
-method_override7_test/00: MissingCompileTimeError
-method_override7_test/01: MissingCompileTimeError
-method_override7_test/02: MissingCompileTimeError
-method_override8_test/00: MissingCompileTimeError
-method_override8_test/01: MissingCompileTimeError
-mint_arithmetic_test: RuntimeError
-mixin_forwarding_constructor4_test/01: MissingCompileTimeError
-mixin_forwarding_constructor4_test/02: MissingCompileTimeError
-mixin_forwarding_constructor4_test/03: MissingCompileTimeError
-mixin_illegal_super_use_test/01: MissingCompileTimeError
-mixin_illegal_super_use_test/02: MissingCompileTimeError
-mixin_illegal_super_use_test/03: MissingCompileTimeError
-mixin_illegal_super_use_test/04: MissingCompileTimeError
-mixin_illegal_super_use_test/05: MissingCompileTimeError
-mixin_illegal_super_use_test/06: MissingCompileTimeError
-mixin_illegal_super_use_test/07: MissingCompileTimeError
-mixin_illegal_super_use_test/08: MissingCompileTimeError
-mixin_illegal_super_use_test/09: MissingCompileTimeError
-mixin_illegal_super_use_test/10: MissingCompileTimeError
-mixin_illegal_super_use_test/11: MissingCompileTimeError
-mixin_illegal_superclass_test/01: MissingCompileTimeError
-mixin_illegal_superclass_test/02: MissingCompileTimeError
-mixin_illegal_superclass_test/03: MissingCompileTimeError
-mixin_illegal_superclass_test/04: MissingCompileTimeError
-mixin_illegal_superclass_test/05: MissingCompileTimeError
-mixin_illegal_superclass_test/06: MissingCompileTimeError
-mixin_illegal_superclass_test/07: MissingCompileTimeError
-mixin_illegal_superclass_test/08: MissingCompileTimeError
-mixin_illegal_superclass_test/09: MissingCompileTimeError
-mixin_illegal_superclass_test/10: MissingCompileTimeError
-mixin_illegal_superclass_test/11: MissingCompileTimeError
-mixin_illegal_superclass_test/12: MissingCompileTimeError
-mixin_illegal_superclass_test/13: MissingCompileTimeError
-mixin_illegal_superclass_test/14: MissingCompileTimeError
-mixin_illegal_superclass_test/15: MissingCompileTimeError
-mixin_illegal_superclass_test/16: MissingCompileTimeError
-mixin_illegal_superclass_test/17: MissingCompileTimeError
-mixin_illegal_superclass_test/18: MissingCompileTimeError
-mixin_illegal_superclass_test/19: MissingCompileTimeError
-mixin_illegal_superclass_test/20: MissingCompileTimeError
-mixin_illegal_superclass_test/21: MissingCompileTimeError
-mixin_illegal_superclass_test/22: MissingCompileTimeError
-mixin_illegal_superclass_test/23: MissingCompileTimeError
-mixin_illegal_superclass_test/24: MissingCompileTimeError
-mixin_illegal_superclass_test/25: MissingCompileTimeError
-mixin_illegal_superclass_test/26: MissingCompileTimeError
-mixin_illegal_superclass_test/27: MissingCompileTimeError
-mixin_illegal_superclass_test/28: MissingCompileTimeError
-mixin_illegal_superclass_test/29: MissingCompileTimeError
-mixin_illegal_superclass_test/30: MissingCompileTimeError
-mixin_issue10216_2_test: RuntimeError
-mixin_mixin4_test: RuntimeError
-mixin_mixin5_test: RuntimeError
-mixin_mixin6_test: RuntimeError
-mixin_mixin7_test: RuntimeError
-mixin_mixin_bound2_test: RuntimeError
-mixin_mixin_bound_test: RuntimeError
-mixin_mixin_test: RuntimeError
-mixin_of_mixin_test/01: CompileTimeError
-mixin_of_mixin_test/02: CompileTimeError
-mixin_of_mixin_test/03: CompileTimeError
-mixin_of_mixin_test/04: CompileTimeError
-mixin_of_mixin_test/05: CompileTimeError
-mixin_of_mixin_test/06: CompileTimeError
-mixin_of_mixin_test/07: CompileTimeError
-mixin_of_mixin_test/08: CompileTimeError
-mixin_of_mixin_test/09: CompileTimeError
-mixin_of_mixin_test/10: CompileTimeError
-mixin_of_mixin_test/11: CompileTimeError
-mixin_of_mixin_test/12: CompileTimeError
-mixin_of_mixin_test/13: CompileTimeError
-mixin_of_mixin_test/14: CompileTimeError
-mixin_of_mixin_test/15: CompileTimeError
-mixin_of_mixin_test/16: CompileTimeError
-mixin_of_mixin_test/17: CompileTimeError
-mixin_of_mixin_test/18: CompileTimeError
-mixin_of_mixin_test/19: CompileTimeError
-mixin_of_mixin_test/20: CompileTimeError
-mixin_of_mixin_test/21: CompileTimeError
-mixin_of_mixin_test/22: CompileTimeError
-mixin_of_mixin_test/none: CompileTimeError
-mixin_super_2_test: CompileTimeError
-mixin_super_bound2_test/01: CompileTimeError
-mixin_super_bound2_test/none: CompileTimeError
-mixin_super_constructor_named_test/01: MissingCompileTimeError
-mixin_super_constructor_positionals_test/01: MissingCompileTimeError
-mixin_super_test: CompileTimeError
-mixin_super_use_test: CompileTimeError
-mixin_superclass_test: CompileTimeError
-mixin_supertype_subclass2_test/01: CompileTimeError
-mixin_supertype_subclass2_test/02: CompileTimeError
-mixin_supertype_subclass2_test/03: CompileTimeError
-mixin_supertype_subclass2_test/04: CompileTimeError
-mixin_supertype_subclass2_test/05: CompileTimeError
-mixin_supertype_subclass2_test/none: CompileTimeError
-mixin_supertype_subclass3_test/01: CompileTimeError
-mixin_supertype_subclass3_test/02: CompileTimeError
-mixin_supertype_subclass3_test/03: CompileTimeError
-mixin_supertype_subclass3_test/04: CompileTimeError
-mixin_supertype_subclass3_test/05: CompileTimeError
-mixin_supertype_subclass3_test/none: CompileTimeError
-mixin_supertype_subclass4_test/01: CompileTimeError
-mixin_supertype_subclass4_test/02: CompileTimeError
-mixin_supertype_subclass4_test/03: CompileTimeError
-mixin_supertype_subclass4_test/04: CompileTimeError
-mixin_supertype_subclass4_test/05: CompileTimeError
-mixin_supertype_subclass4_test/none: CompileTimeError
-mixin_supertype_subclass_test/01: CompileTimeError
-mixin_supertype_subclass_test/02: CompileTimeError
-mixin_supertype_subclass_test/03: CompileTimeError
-mixin_supertype_subclass_test/04: CompileTimeError
-mixin_supertype_subclass_test/05: CompileTimeError
-mixin_supertype_subclass_test/none: CompileTimeError
-modulo_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
-named_constructor_test/01: MissingRuntimeError
-named_parameters_default_eq_test/02: MissingCompileTimeError
-nan_identical_test: RuntimeError
-no_main_test/01: CompileTimeError
-null_test/02: MissingCompileTimeError
-null_test/03: MissingCompileTimeError
-null_test/none: RuntimeError
-number_identity2_test: RuntimeError
-numbers_test: RuntimeError
-override_field_method1_negative_test: Fail
-override_field_method2_negative_test: Fail
-override_field_method4_negative_test: Fail
-override_field_method5_negative_test: Fail
-override_field_test/01: MissingCompileTimeError
-override_inheritance_mixed_test/01: MissingCompileTimeError
-override_inheritance_mixed_test/02: MissingCompileTimeError
-override_inheritance_mixed_test/03: MissingCompileTimeError
-override_inheritance_mixed_test/04: MissingCompileTimeError
-override_method_with_field_test/01: MissingCompileTimeError
-private_super_constructor_test/01: MissingCompileTimeError
-redirecting_constructor_initializer_test: RuntimeError
-redirecting_factory_default_values_test/01: MissingCompileTimeError
-redirecting_factory_default_values_test/02: MissingCompileTimeError
redirecting_factory_infinite_steps_test/01: Fail
-redirecting_factory_long_test: RuntimeError
-redirecting_factory_reflection_test: RuntimeError
-regress_13494_test: RuntimeError
-regress_17382_test: RuntimeError
-regress_20394_test/01: MissingCompileTimeError
-regress_22936_test/01: RuntimeError
-regress_24283_test: RuntimeError
+redirecting_factory_malbounded_test/01: Fail
+regress_22443_test: RuntimeError
regress_26133_test: RuntimeError # Issue 26429
-regress_27572_test: RuntimeError
-regress_27617_test/1: Crash # Assertion failure: Unexpected constructor j:constructor(Foo._) in ConstructorDataImpl._getConstructorConstant
-regress_28217_test/01: MissingCompileTimeError
-regress_28217_test/none: MissingCompileTimeError
-regress_28255_test: RuntimeError
+regress_28278_test: RuntimeError
regress_29405_test: RuntimeError # Issue 29422
-setter_override_test/00: MissingCompileTimeError
-setter_override_test/03: MissingCompileTimeError
stacktrace_demangle_ctors_test: RuntimeError
-stacktrace_rethrow_error_test/none: RuntimeError
-stacktrace_rethrow_error_test/withtraceparameter: RuntimeError
-stacktrace_rethrow_nonerror_test: RuntimeError
stacktrace_test: RuntimeError
-static_getter_no_setter1_test/01: RuntimeError
-static_getter_no_setter2_test/01: RuntimeError
-static_getter_no_setter3_test/01: RuntimeError
super_call4_test: Crash # NoSuchMethodError: The getter 'thisLocal' was called on null.
-super_test: RuntimeError
-switch_bad_case_test/01: MissingCompileTimeError
-switch_bad_case_test/02: MissingCompileTimeError
-switch_case_test/00: MissingCompileTimeError
-switch_case_test/01: MissingCompileTimeError
-switch_case_test/02: MissingCompileTimeError
-syntax_test/none: CompileTimeError
-top_level_getter_no_setter1_test/01: RuntimeError
-top_level_getter_no_setter2_test/01: RuntimeError
-truncdiv_test: RuntimeError
-try_catch_test/01: MissingCompileTimeError
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.
@@ -418,7 +296,7 @@
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 && !$dart2js_with_kernel ]
+[ $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
@@ -441,7 +319,7 @@
type_variable_bounds3_test/00: Fail # Issue 12702
type_variable_bounds_test/02: Fail # Issue 12702
-[ $compiler == dart2js && !$checked && !$dart2js_with_kernel ]
+[ $compiler == dart2js && !$checked ]
assertion_test: RuntimeError
generic_test: RuntimeError, OK
issue13474_test: RuntimeError, OK
@@ -453,58 +331,25 @@
positional_parameters_type_test/02: MissingRuntimeError, OK
type_checks_in_factory_method_test: RuntimeError # Issue 12746
-[ $compiler == dart2js && !$checked && !$dart2js_with_kernel && $enable_asserts ]
-assertion_test: RuntimeError # Issue 12748
-
-[ $compiler == dart2js && !$checked && !$dart2js_with_kernel && $minified ]
-f_bounded_quantification5_test: Fail, OK # Issue 12605
-
[ $compiler == dart2js && !$checked && $enable_asserts ]
bool_check_test: RuntimeError # Issue 29647
-[ $compiler == dart2js && $dart2js_with_kernel && $fast_startup ]
+[ $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: Fail, OK # Issue 12605
+
+[ $compiler == dart2js && $fast_startup && $fasta ]
arithmetic_canonicalization_test: RuntimeError
assertion_initializer_const_error2_test/none: CompileTimeError
-assertion_test: RuntimeError
-async_star_cancel_while_paused_test: RuntimeError
-bad_override_test/03: MissingCompileTimeError
-bad_override_test/04: MissingCompileTimeError
-bad_override_test/05: MissingCompileTimeError
-bit_operations_test/01: RuntimeError
-bit_operations_test/02: RuntimeError
-bit_operations_test/03: RuntimeError
-bit_operations_test/04: RuntimeError
-bit_operations_test/none: RuntimeError
-branch_canonicalization_test: RuntimeError
-call_function_apply_test: RuntimeError
-call_nonexistent_constructor_test/01: RuntimeError
-canonical_const2_test: RuntimeError
canonical_const3_test: CompileTimeError
-check_member_static_test/02: MissingCompileTimeError
-class_cycle_test/02: MissingCompileTimeError
-class_cycle_test/03: MissingCompileTimeError
-closure_in_field_test/01: RuntimeError
-closure_in_field_test/02: RuntimeError
-config_import_test: RuntimeError
-const_error_multiply_initialized_test/02: MissingCompileTimeError
-const_error_multiply_initialized_test/04: MissingCompileTimeError
-const_evaluation_test/01: RuntimeError
-const_instance_field_test/01: MissingCompileTimeError
-const_map2_test/00: MissingCompileTimeError
-const_map3_test/00: MissingCompileTimeError
-const_switch2_test/01: MissingCompileTimeError
-const_switch_test/02: RuntimeError
-const_switch_test/04: RuntimeError
-constants_test/05: MissingCompileTimeError
-constructor2_test: RuntimeError
-constructor3_test: RuntimeError
-constructor5_test: RuntimeError
-constructor6_test: RuntimeError
-constructor_named_arguments_test/none: RuntimeError
constructor_redirect1_negative_test: Crash # Stack Overflow
constructor_redirect2_negative_test: Crash # Stack Overflow
constructor_redirect2_test/01: MissingCompileTimeError
-constructor_redirect_test/01: Crash # Assertion failure: Cannot find value Instance of 'ThisLocal' in (local(A.named2#x), local(A.named2#y), local(A.named2#z)) for j:constructor(A.named2).
cyclic_constructor_test/01: Crash # Stack Overflow
deferred_constraints_constants_test/default_argument2: Crash # Unsupported operation: KernelDeferredLoadTask.addMirrorElementsForLibrary
deferred_constraints_constants_test/none: Crash # Unsupported operation: KernelDeferredLoadTask.addMirrorElementsForLibrary
@@ -512,124 +357,12 @@
deferred_constraints_type_annotation_test/as_operation: RuntimeError
deferred_constraints_type_annotation_test/catch_check: RuntimeError
deferred_constraints_type_annotation_test/is_check: RuntimeError
-deferred_inheritance_constraints_test/extends: MissingCompileTimeError
-deferred_inheritance_constraints_test/implements: MissingCompileTimeError
-deferred_inheritance_constraints_test/mixin: MissingCompileTimeError
deferred_load_constants_test/none: RuntimeError
-deferred_load_library_wrong_args_test/01: MissingRuntimeError
-deferred_not_loaded_check_test: RuntimeError
-deferred_redirecting_factory_test: RuntimeError
-double_int_to_string_test: RuntimeError
-duplicate_export_negative_test: Fail
-duplicate_implements_test/01: MissingCompileTimeError
-duplicate_implements_test/02: MissingCompileTimeError
-duplicate_implements_test/03: MissingCompileTimeError
-duplicate_implements_test/04: MissingCompileTimeError
-dynamic_prefix_core_test/01: RuntimeError
-dynamic_prefix_core_test/none: RuntimeError
-enum_mirror_test: RuntimeError
-example_constructor_test: RuntimeError
-expect_test: RuntimeError
-external_test/10: MissingRuntimeError
-external_test/13: MissingRuntimeError
-external_test/20: MissingRuntimeError
-factory_redirection_test/07: MissingCompileTimeError
-fauxverride_test/03: MissingCompileTimeError
-fauxverride_test/05: MissingCompileTimeError
-field_increment_bailout_test: RuntimeError
-field_initialization_order_test: RuntimeError
-field_override3_test/00: MissingCompileTimeError
-field_override3_test/01: MissingCompileTimeError
-field_override3_test/02: MissingCompileTimeError
-field_override3_test/03: MissingCompileTimeError
-field_override4_test/02: MissingCompileTimeError
-final_attempt_reinitialization_test/01: MissingCompileTimeError
-final_attempt_reinitialization_test/02: MissingCompileTimeError
-final_field_initialization_order_test: RuntimeError
generic_field_mixin4_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(M.T) in () for j:constructor(C3.).
generic_field_mixin5_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(M.T) in () for j:constructor(C3.).
generic_field_mixin_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(M.T) in () for j:constructor(C3.).
generic_local_functions_test: Crash # Unsupported operation: Unsupported type parameter type node Y.
-generic_methods_type_expression_test/01: RuntimeError
-generic_methods_type_expression_test/03: RuntimeError
-generic_methods_type_expression_test/none: RuntimeError
-generic_test: RuntimeError
-getter_override2_test/02: MissingCompileTimeError
-getter_override_test/00: MissingCompileTimeError
-getter_override_test/01: MissingCompileTimeError
-getter_override_test/02: MissingCompileTimeError
-identical_closure2_test: RuntimeError
-if_null_assignment_behavior_test/14: RuntimeError
-infinity_test: RuntimeError
-instance_creation_in_function_annotation_test: RuntimeError
-integer_division_by_zero_test: RuntimeError
internal_library_test/02: Crash # NoSuchMethodError: Class 'DillLibraryBuilder' has no instance getter 'mixinApplicationClasses'.
-invocation_mirror2_test: RuntimeError
-invocation_mirror_empty_arguments_test: RuntimeError
-invocation_mirror_invoke_on2_test: RuntimeError
-invocation_mirror_invoke_on_test: RuntimeError
-invocation_mirror_test: RuntimeError
-issue13474_test: RuntimeError
-issue21079_test: RuntimeError
-left_shift_test: RuntimeError
-library_env_test/has_mirror_support: RuntimeError
-library_env_test/has_no_html_support: RuntimeError
-library_env_test/has_no_io_support: RuntimeError
-list_literal4_test: RuntimeError
-main_not_a_function_test/01: CompileTimeError
-many_overridden_no_such_method_test: RuntimeError
-map_literal4_test: RuntimeError
-method_override5_test: RuntimeError
-method_override7_test/00: MissingCompileTimeError
-method_override7_test/01: MissingCompileTimeError
-method_override7_test/02: MissingCompileTimeError
-method_override8_test/00: MissingCompileTimeError
-method_override8_test/01: MissingCompileTimeError
-mint_arithmetic_test: RuntimeError
-mixin_forwarding_constructor4_test/01: MissingCompileTimeError
-mixin_forwarding_constructor4_test/02: MissingCompileTimeError
-mixin_forwarding_constructor4_test/03: MissingCompileTimeError
-mixin_illegal_super_use_test/01: MissingCompileTimeError
-mixin_illegal_super_use_test/02: MissingCompileTimeError
-mixin_illegal_super_use_test/03: MissingCompileTimeError
-mixin_illegal_super_use_test/04: MissingCompileTimeError
-mixin_illegal_super_use_test/05: MissingCompileTimeError
-mixin_illegal_super_use_test/06: MissingCompileTimeError
-mixin_illegal_super_use_test/07: MissingCompileTimeError
-mixin_illegal_super_use_test/08: MissingCompileTimeError
-mixin_illegal_super_use_test/09: MissingCompileTimeError
-mixin_illegal_super_use_test/10: MissingCompileTimeError
-mixin_illegal_super_use_test/11: MissingCompileTimeError
-mixin_illegal_superclass_test/01: MissingCompileTimeError
-mixin_illegal_superclass_test/02: MissingCompileTimeError
-mixin_illegal_superclass_test/03: MissingCompileTimeError
-mixin_illegal_superclass_test/04: MissingCompileTimeError
-mixin_illegal_superclass_test/05: MissingCompileTimeError
-mixin_illegal_superclass_test/06: MissingCompileTimeError
-mixin_illegal_superclass_test/07: MissingCompileTimeError
-mixin_illegal_superclass_test/08: MissingCompileTimeError
-mixin_illegal_superclass_test/09: MissingCompileTimeError
-mixin_illegal_superclass_test/10: MissingCompileTimeError
-mixin_illegal_superclass_test/11: MissingCompileTimeError
-mixin_illegal_superclass_test/12: MissingCompileTimeError
-mixin_illegal_superclass_test/13: MissingCompileTimeError
-mixin_illegal_superclass_test/14: MissingCompileTimeError
-mixin_illegal_superclass_test/15: MissingCompileTimeError
-mixin_illegal_superclass_test/16: MissingCompileTimeError
-mixin_illegal_superclass_test/17: MissingCompileTimeError
-mixin_illegal_superclass_test/18: MissingCompileTimeError
-mixin_illegal_superclass_test/19: MissingCompileTimeError
-mixin_illegal_superclass_test/20: MissingCompileTimeError
-mixin_illegal_superclass_test/21: MissingCompileTimeError
-mixin_illegal_superclass_test/22: MissingCompileTimeError
-mixin_illegal_superclass_test/23: MissingCompileTimeError
-mixin_illegal_superclass_test/24: MissingCompileTimeError
-mixin_illegal_superclass_test/25: MissingCompileTimeError
-mixin_illegal_superclass_test/26: MissingCompileTimeError
-mixin_illegal_superclass_test/27: MissingCompileTimeError
-mixin_illegal_superclass_test/28: MissingCompileTimeError
-mixin_illegal_superclass_test/29: MissingCompileTimeError
-mixin_illegal_superclass_test/30: MissingCompileTimeError
mixin_issue10216_2_test: RuntimeError
mixin_mixin4_test: RuntimeError
mixin_mixin5_test: RuntimeError
@@ -638,136 +371,49 @@
mixin_mixin_bound2_test: RuntimeError
mixin_mixin_bound_test: RuntimeError
mixin_mixin_test: RuntimeError
-mixin_of_mixin_test/01: CompileTimeError
-mixin_of_mixin_test/02: CompileTimeError
-mixin_of_mixin_test/03: CompileTimeError
-mixin_of_mixin_test/04: CompileTimeError
-mixin_of_mixin_test/05: CompileTimeError
-mixin_of_mixin_test/06: CompileTimeError
-mixin_of_mixin_test/07: CompileTimeError
-mixin_of_mixin_test/08: CompileTimeError
-mixin_of_mixin_test/09: CompileTimeError
-mixin_of_mixin_test/10: CompileTimeError
-mixin_of_mixin_test/11: CompileTimeError
-mixin_of_mixin_test/12: CompileTimeError
-mixin_of_mixin_test/13: CompileTimeError
-mixin_of_mixin_test/14: CompileTimeError
-mixin_of_mixin_test/15: CompileTimeError
-mixin_of_mixin_test/16: CompileTimeError
-mixin_of_mixin_test/17: CompileTimeError
-mixin_of_mixin_test/18: CompileTimeError
-mixin_of_mixin_test/19: CompileTimeError
-mixin_of_mixin_test/20: CompileTimeError
-mixin_of_mixin_test/21: CompileTimeError
-mixin_of_mixin_test/22: CompileTimeError
-mixin_of_mixin_test/none: CompileTimeError
-mixin_super_2_test: CompileTimeError
-mixin_super_bound2_test/01: CompileTimeError
-mixin_super_bound2_test/none: CompileTimeError
-mixin_super_constructor_named_test/01: MissingCompileTimeError
-mixin_super_constructor_positionals_test/01: MissingCompileTimeError
-mixin_super_test: CompileTimeError
-mixin_super_use_test: CompileTimeError
-mixin_superclass_test: CompileTimeError
-mixin_supertype_subclass2_test/01: CompileTimeError
-mixin_supertype_subclass2_test/02: CompileTimeError
-mixin_supertype_subclass2_test/03: CompileTimeError
-mixin_supertype_subclass2_test/04: CompileTimeError
-mixin_supertype_subclass2_test/05: CompileTimeError
-mixin_supertype_subclass2_test/none: CompileTimeError
-mixin_supertype_subclass3_test/01: CompileTimeError
-mixin_supertype_subclass3_test/02: CompileTimeError
-mixin_supertype_subclass3_test/03: CompileTimeError
-mixin_supertype_subclass3_test/04: CompileTimeError
-mixin_supertype_subclass3_test/05: CompileTimeError
-mixin_supertype_subclass3_test/none: CompileTimeError
-mixin_supertype_subclass4_test/01: CompileTimeError
-mixin_supertype_subclass4_test/02: CompileTimeError
-mixin_supertype_subclass4_test/03: CompileTimeError
-mixin_supertype_subclass4_test/04: CompileTimeError
-mixin_supertype_subclass4_test/05: CompileTimeError
-mixin_supertype_subclass4_test/none: CompileTimeError
-mixin_supertype_subclass_test/01: CompileTimeError
-mixin_supertype_subclass_test/02: CompileTimeError
-mixin_supertype_subclass_test/03: CompileTimeError
-mixin_supertype_subclass_test/04: CompileTimeError
-mixin_supertype_subclass_test/05: CompileTimeError
-mixin_supertype_subclass_test/none: CompileTimeError
-modulo_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
-named_constructor_test/01: MissingRuntimeError
-named_parameters_default_eq_test/02: MissingCompileTimeError
-named_parameters_type_test/01: MissingRuntimeError
-named_parameters_type_test/02: MissingRuntimeError
-named_parameters_type_test/03: MissingRuntimeError
-nan_identical_test: RuntimeError
-no_main_test/01: CompileTimeError
-no_such_method_test: RuntimeError
null_test/02: MissingCompileTimeError
null_test/03: MissingCompileTimeError
-null_test/none: RuntimeError
-number_identity2_test: RuntimeError
-numbers_test: RuntimeError
-overridden_no_such_method_test: RuntimeError
-override_field_method1_negative_test: Fail
-override_field_method2_negative_test: Fail
-override_field_method4_negative_test: Fail
-override_field_method5_negative_test: Fail
-override_field_test/01: MissingCompileTimeError
-override_inheritance_mixed_test/01: MissingCompileTimeError
-override_inheritance_mixed_test/02: MissingCompileTimeError
-override_inheritance_mixed_test/03: MissingCompileTimeError
-override_inheritance_mixed_test/04: MissingCompileTimeError
-override_method_with_field_test/01: MissingCompileTimeError
-positional_parameters_type_test/01: MissingRuntimeError
-positional_parameters_type_test/02: MissingRuntimeError
-private_super_constructor_test/01: MissingCompileTimeError
-redirecting_constructor_initializer_test: RuntimeError
-redirecting_factory_default_values_test/01: MissingCompileTimeError
-redirecting_factory_default_values_test/02: MissingCompileTimeError
redirecting_factory_long_test: RuntimeError
-redirecting_factory_reflection_test: RuntimeError
-regress_13494_test: RuntimeError
-regress_17382_test: RuntimeError
-regress_20394_test/01: MissingCompileTimeError
-regress_22936_test/01: RuntimeError
-regress_24283_test: RuntimeError
-regress_27572_test: RuntimeError
-regress_27617_test/1: Crash # Assertion failure: Unexpected constructor j:constructor(Foo._) in ConstructorDataImpl._getConstructorConstant
-regress_28217_test/01: MissingCompileTimeError
-regress_28217_test/none: MissingCompileTimeError
-regress_28255_test: RuntimeError
-setter_override_test/00: MissingCompileTimeError
-setter_override_test/03: MissingCompileTimeError
stacktrace_demangle_ctors_test: RuntimeError
stacktrace_test: RuntimeError
-static_getter_no_setter1_test/01: RuntimeError
-static_getter_no_setter2_test/01: RuntimeError
-static_getter_no_setter3_test/01: RuntimeError
super_call4_test: Crash # NoSuchMethodError: The getter 'thisLocal' was called on null.
-super_test: RuntimeError
-switch_bad_case_test/01: MissingCompileTimeError
-switch_bad_case_test/02: MissingCompileTimeError
-switch_case_test/00: MissingCompileTimeError
-switch_case_test/01: MissingCompileTimeError
-switch_case_test/02: MissingCompileTimeError
-syntax_test/none: CompileTimeError
-top_level_getter_no_setter1_test/01: RuntimeError
-top_level_getter_no_setter2_test/01: RuntimeError
-truncdiv_test: RuntimeError
-try_catch_test/01: MissingCompileTimeError
-type_checks_in_factory_method_test: RuntimeError
-[ $compiler == dart2js && $dart2js_with_kernel && $host_checked ]
-assertion_initializer_const_function_error_test/01: MissingCompileTimeError
-assertion_test: RuntimeError
+[ $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 ]
async_star_cancel_while_paused_test: RuntimeError
-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.
bad_override_test/03: MissingCompileTimeError
bad_override_test/04: MissingCompileTimeError
bad_override_test/05: MissingCompileTimeError
@@ -777,7 +423,6 @@
bit_operations_test/04: RuntimeError
bit_operations_test/none: RuntimeError
branch_canonicalization_test: RuntimeError
-branches_test: Crash # 'package:front_end/src/fasta/kernel/kernel_shadow_ast.dart': Failed assertion: line 441 pos 16: 'identical(combiner.arguments.positional[0], rhs)': is not true.
call_function_apply_test: RuntimeError
call_nonexistent_constructor_test/01: RuntimeError
call_type_literal_test/01: RuntimeError
@@ -790,7 +435,6 @@
class_literal_test/07: RuntimeError
closure_in_field_test/01: RuntimeError
closure_in_field_test/02: RuntimeError
-closure_self_reference_test: Crash # 'file:*/pkg/compiler/lib/src/ssa/nodes.dart': Failed assertion: line 641 pos 12: 'isClosed()': is not true.
config_import_test: RuntimeError
const_error_multiply_initialized_test/02: MissingCompileTimeError
const_error_multiply_initialized_test/04: MissingCompileTimeError
@@ -847,14 +491,9 @@
final_attempt_reinitialization_test/01: MissingCompileTimeError
final_attempt_reinitialization_test/02: MissingCompileTimeError
final_field_initialization_order_test: RuntimeError
-full_stacktrace1_test: RuntimeError
-full_stacktrace2_test: RuntimeError
-full_stacktrace3_test: RuntimeError
-generic_methods_generic_function_parameter_test: Crash # 'file:*/pkg/compiler/lib/src/ssa/builder_kernel.dart': Failed assertion: line 1728 pos 16: 'type is MethodTypeVariableType': is not true.
-generic_methods_type_expression_test/01: Crash # 'file:*/pkg/compiler/lib/src/ssa/builder_kernel.dart': Failed assertion: line 1728 pos 16: 'type is MethodTypeVariableType': is not true.
-generic_methods_type_expression_test/03: Crash # 'file:*/pkg/compiler/lib/src/ssa/builder_kernel.dart': Failed assertion: line 1728 pos 16: 'type is MethodTypeVariableType': is not true.
-generic_methods_type_expression_test/none: Crash # 'file:*/pkg/compiler/lib/src/ssa/builder_kernel.dart': Failed assertion: line 1728 pos 16: 'type is MethodTypeVariableType': is not true.
-generic_test: RuntimeError
+generic_methods_type_expression_test/01: RuntimeError
+generic_methods_type_expression_test/03: RuntimeError
+generic_methods_type_expression_test/none: RuntimeError
getter_override2_test/02: MissingCompileTimeError
getter_override_test/00: MissingCompileTimeError
getter_override_test/01: MissingCompileTimeError
@@ -865,12 +504,11 @@
instance_creation_in_function_annotation_test: RuntimeError
integer_division_by_zero_test: RuntimeError
internal_library_test/02: Crash # type 'DillLibraryBuilder' is not a subtype of type 'SourceLibraryBuilder<KernelTypeBuilder, Library>' of 'value' where
-invocation_mirror2_test: RuntimeError
-invocation_mirror_empty_arguments_test: RuntimeError
-invocation_mirror_invoke_on2_test: RuntimeError
-invocation_mirror_invoke_on_test: RuntimeError
-invocation_mirror_test: Crash # 'file:*/pkg/compiler/lib/src/ssa/builder_kernel.dart': Failed assertion: line 2521 pos 14: 'arguments.named.isEmpty': is not true.
-issue13474_test: RuntimeError
+invocation_mirror2_test: RuntimeError # mirrors not supported
+invocation_mirror_empty_arguments_test: RuntimeError # mirrors not supported
+invocation_mirror_invoke_on2_test: RuntimeError # mirrors not supported
+invocation_mirror_invoke_on_test: RuntimeError # mirrors not supported
+invocation_mirror_test: RuntimeError # mirrors not supported
issue21079_test: RuntimeError
left_shift_test: RuntimeError
library_env_test/has_mirror_support: RuntimeError
@@ -879,7 +517,6 @@
list_literal4_test: RuntimeError
main_not_a_function_test/01: CompileTimeError
many_overridden_no_such_method_test: RuntimeError
-map_literal4_test: RuntimeError
method_override5_test: RuntimeError
method_override7_test/00: MissingCompileTimeError
method_override7_test/01: MissingCompileTimeError
@@ -995,17 +632,12 @@
multiline_newline_test/06r: MissingCompileTimeError
named_constructor_test/01: MissingRuntimeError
named_parameters_default_eq_test/02: MissingCompileTimeError
-named_parameters_type_test/01: MissingRuntimeError
-named_parameters_type_test/02: MissingRuntimeError
-named_parameters_type_test/03: MissingRuntimeError
nan_identical_test: RuntimeError
no_main_test/01: CompileTimeError
no_such_method_test: RuntimeError
null_test/none: RuntimeError
number_identity2_test: RuntimeError
numbers_test: RuntimeError
-operator2_negative_test: Crash # 'file:*/pkg/compiler/lib/src/kernel/env.dart': Failed assertion: line 322 pos 16: '!name.contains('#')': is not true.
-operator_test: Crash # 'package:front_end/src/fasta/kernel/kernel_shadow_ast.dart': Failed assertion: line 441 pos 16: 'identical(combiner.arguments.positional[0], rhs)': is not true.
overridden_no_such_method_test: RuntimeError
override_field_method1_negative_test: Fail
override_field_method2_negative_test: Fail
@@ -1017,9 +649,6 @@
override_inheritance_mixed_test/03: MissingCompileTimeError
override_inheritance_mixed_test/04: MissingCompileTimeError
override_method_with_field_test/01: MissingCompileTimeError
-positional_parameters_type_test/01: MissingRuntimeError
-positional_parameters_type_test/02: MissingRuntimeError
-prefix5_negative_test: Crash # 'package:front_end/src/fasta/kernel/kernel_shadow_ast.dart': Failed assertion: line 441 pos 16: 'identical(combiner.arguments.positional[0], rhs)': is not true.
private_super_constructor_test/01: MissingCompileTimeError
redirecting_constructor_initializer_test: RuntimeError
redirecting_factory_default_values_test/01: MissingCompileTimeError
@@ -1056,6 +685,26 @@
switch_case_test/00: MissingCompileTimeError
switch_case_test/01: MissingCompileTimeError
switch_case_test/02: MissingCompileTimeError
+syntax_test/none: CompileTimeError
+top_level_getter_no_setter1_test/01: RuntimeError
+top_level_getter_no_setter2_test/01: RuntimeError
+truncdiv_test: RuntimeError
+try_catch_test/01: MissingCompileTimeError
+type_literal_prefix_call_test/00: RuntimeError
+type_variable_conflict2_test/02: MissingCompileTimeError
+
+[ $compiler == dart2js && $fasta && $host_checked ]
+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.
+branches_test: Crash # 'package:front_end/src/fasta/kernel/kernel_shadow_ast.dart': Failed assertion: line 441 pos 16: 'identical(combiner.arguments.positional[0], rhs)': is not true.
+closure_self_reference_test: Crash # 'file:*/pkg/compiler/lib/src/ssa/nodes.dart': Failed assertion: line 641 pos 12: 'isClosed()': is not true.
+generic_methods_generic_function_parameter_test: Crash # 'file:*/pkg/compiler/lib/src/ssa/builder_kernel.dart': Failed assertion: line 1728 pos 16: 'type is MethodTypeVariableType': is not true.
+generic_methods_type_expression_test/01: Crash # 'file:*/pkg/compiler/lib/src/ssa/builder_kernel.dart': Failed assertion: line 1728 pos 16: 'type is MethodTypeVariableType': is not true.
+generic_methods_type_expression_test/03: Crash # 'file:*/pkg/compiler/lib/src/ssa/builder_kernel.dart': Failed assertion: line 1728 pos 16: 'type is MethodTypeVariableType': is not true.
+generic_methods_type_expression_test/none: Crash # 'file:*/pkg/compiler/lib/src/ssa/builder_kernel.dart': Failed assertion: line 1728 pos 16: 'type is MethodTypeVariableType': is not true.
+invocation_mirror_test: Crash # 'file:*/pkg/compiler/lib/src/ssa/builder_kernel.dart': Failed assertion: line 3014 pos 14: 'arguments.named.isEmpty': is not true.
+operator2_negative_test: Crash # 'file:*/pkg/compiler/lib/src/kernel/env.dart': Failed assertion: line 322 pos 16: '!name.contains('#')': is not true.
+operator_test: Crash # 'package:front_end/src/fasta/kernel/kernel_shadow_ast.dart': Failed assertion: line 441 pos 16: 'identical(combiner.arguments.positional[0], rhs)': is not true.
+prefix5_negative_test: Crash # 'package:front_end/src/fasta/kernel/kernel_shadow_ast.dart': Failed assertion: line 441 pos 16: 'identical(combiner.arguments.positional[0], rhs)': is not true.
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.
syntax_test/04: Crash # 'file:*/pkg/compiler/lib/src/kernel/env.dart': Failed assertion: line 322 pos 16: '!name.contains('#')': is not true.
@@ -1080,315 +729,18 @@
syntax_test/24: Crash # 'file:*/pkg/compiler/lib/src/kernel/env.dart': Failed assertion: line 322 pos 16: '!name.contains('#')': is not true.
syntax_test/25: Crash # 'file:*/pkg/compiler/lib/src/kernel/env.dart': Failed assertion: line 322 pos 16: '!name.contains('#')': is not true.
syntax_test/26: Crash # 'file:*/pkg/compiler/lib/src/kernel/env.dart': Failed assertion: line 322 pos 16: '!name.contains('#')': is not true.
-syntax_test/none: CompileTimeError
-top_level_getter_no_setter1_test/01: RuntimeError
-top_level_getter_no_setter2_test/01: RuntimeError
-truncdiv_test: RuntimeError
-try_catch_test/01: MissingCompileTimeError
-type_checks_in_factory_method_test: RuntimeError
-type_literal_prefix_call_test/00: RuntimeError
-type_variable_conflict2_test/02: MissingCompileTimeError
-[ $compiler == dart2js && $dart2js_with_kernel && $minified ]
-assertion_initializer_const_function_error_test/01: MissingCompileTimeError
-assertion_test: RuntimeError
-async_star_cancel_while_paused_test: RuntimeError
-bad_override_test/03: MissingCompileTimeError
-bad_override_test/04: MissingCompileTimeError
-bad_override_test/05: MissingCompileTimeError
-bit_operations_test/01: RuntimeError
-bit_operations_test/02: RuntimeError
-bit_operations_test/03: RuntimeError
-bit_operations_test/04: RuntimeError
-bit_operations_test/none: RuntimeError
-branch_canonicalization_test: RuntimeError
-call_function_apply_test: RuntimeError
-call_nonexistent_constructor_test/01: RuntimeError
-call_type_literal_test/01: RuntimeError
-canonical_const2_test: RuntimeError
-check_member_static_test/02: MissingCompileTimeError
-class_cycle_test/02: MissingCompileTimeError
-class_cycle_test/03: MissingCompileTimeError
-class_literal_test/01: RuntimeError
-class_literal_test/03: RuntimeError
-class_literal_test/07: RuntimeError
-closure_in_field_test/01: RuntimeError
-closure_in_field_test/02: RuntimeError
-config_import_test: RuntimeError
-const_error_multiply_initialized_test/02: MissingCompileTimeError
-const_error_multiply_initialized_test/04: MissingCompileTimeError
-const_evaluation_test/01: RuntimeError
-const_instance_field_test/01: MissingCompileTimeError
-const_map2_test/00: MissingCompileTimeError
-const_map3_test/00: MissingCompileTimeError
-const_switch2_test/01: MissingCompileTimeError
-const_switch_test/02: RuntimeError
-const_switch_test/04: RuntimeError
-constants_test/05: MissingCompileTimeError
-constructor2_test: RuntimeError
-constructor3_test: RuntimeError
-constructor5_test: RuntimeError
-constructor6_test: RuntimeError
-constructor_call_as_function_test/01: MissingRuntimeError
-constructor_named_arguments_test/none: RuntimeError
-constructor_redirect1_negative_test: Crash # Issue 30856
-constructor_redirect2_negative_test: Crash # Issue 30856
-constructor_redirect_test/01: Crash # Assertion failure: Cannot find value Instance of 'ThisLocal' in (local(A.named2#x), local(A.named2#y), local(A.named2#z)) for j:constructor(A.named2).
-cyclic_constructor_test/01: Crash # Issue 30856
-deferred_constraints_constants_test/none: RuntimeError
-deferred_constraints_constants_test/reference_after_load: RuntimeError
-deferred_inheritance_constraints_test/extends: MissingCompileTimeError
-deferred_inheritance_constraints_test/implements: MissingCompileTimeError
-deferred_inheritance_constraints_test/mixin: MissingCompileTimeError
+[ $compiler == dart2js && $fasta && $minified ]
deferred_load_library_wrong_args_test/01: Crash # NoSuchMethodError: The getter 'closureClassEntity' was called on null.
-deferred_load_library_wrong_args_test/01: MissingRuntimeError
-deferred_not_loaded_check_test: RuntimeError
deferred_redirecting_factory_test: Crash # NoSuchMethodError: The getter 'closureClassEntity' was called on null.
-deferred_redirecting_factory_test: RuntimeError
-double_int_to_string_test: RuntimeError
-duplicate_export_negative_test: Fail
-duplicate_implements_test/01: MissingCompileTimeError
-duplicate_implements_test/02: MissingCompileTimeError
-duplicate_implements_test/03: MissingCompileTimeError
-duplicate_implements_test/04: MissingCompileTimeError
-dynamic_prefix_core_test/01: RuntimeError
-dynamic_prefix_core_test/none: RuntimeError
-enum_mirror_test: RuntimeError
-example_constructor_test: RuntimeError
-expect_test: RuntimeError
-external_test/10: MissingRuntimeError
-external_test/13: MissingRuntimeError
-external_test/20: MissingRuntimeError
f_bounded_quantification5_test: RuntimeError
-factory_redirection_test/07: MissingCompileTimeError
-fauxverride_test/03: MissingCompileTimeError
-fauxverride_test/05: MissingCompileTimeError
-field_increment_bailout_test: RuntimeError
-field_initialization_order_test: RuntimeError
-field_override3_test/00: MissingCompileTimeError
-field_override3_test/01: MissingCompileTimeError
-field_override3_test/02: MissingCompileTimeError
-field_override3_test/03: MissingCompileTimeError
-field_override4_test/02: MissingCompileTimeError
-final_attempt_reinitialization_test/01: MissingCompileTimeError
-final_attempt_reinitialization_test/02: MissingCompileTimeError
-final_field_initialization_order_test: RuntimeError
-full_stacktrace1_test: RuntimeError # Issue 12698
-full_stacktrace2_test: RuntimeError # Issue 12698
-full_stacktrace3_test: RuntimeError # Issue 12698
-generic_methods_type_expression_test/01: RuntimeError
-generic_methods_type_expression_test/03: RuntimeError
-generic_methods_type_expression_test/none: RuntimeError
-generic_test: RuntimeError
-getter_override2_test/02: MissingCompileTimeError
-getter_override_test/00: MissingCompileTimeError
-getter_override_test/01: MissingCompileTimeError
-getter_override_test/02: MissingCompileTimeError
-identical_closure2_test: RuntimeError
-if_null_assignment_behavior_test/14: RuntimeError
-infinity_test: RuntimeError
-instance_creation_in_function_annotation_test: RuntimeError
-integer_division_by_zero_test: RuntimeError
internal_library_test/02: Crash # NoSuchMethodError: Class 'DillLibraryBuilder' has no instance getter 'mixinApplicationClasses'.
-invocation_mirror2_test: RuntimeError
-invocation_mirror_empty_arguments_test: RuntimeError
-invocation_mirror_invoke_on2_test: RuntimeError
-invocation_mirror_invoke_on_test: RuntimeError
-invocation_mirror_test: RuntimeError
-issue13474_test: RuntimeError
-issue21079_test: RuntimeError
-left_shift_test: RuntimeError
-library_env_test/has_mirror_support: RuntimeError
-library_env_test/has_no_html_support: RuntimeError
-library_env_test/has_no_io_support: RuntimeError
-list_literal4_test: RuntimeError
-main_not_a_function_test/01: CompileTimeError
-many_overridden_no_such_method_test: RuntimeError
-map_literal4_test: RuntimeError
-method_override5_test: RuntimeError
-method_override7_test/00: MissingCompileTimeError
-method_override7_test/01: MissingCompileTimeError
-method_override7_test/02: MissingCompileTimeError
-method_override8_test/00: MissingCompileTimeError
-method_override8_test/01: MissingCompileTimeError
-mint_arithmetic_test: RuntimeError
-mixin_forwarding_constructor4_test/01: MissingCompileTimeError
-mixin_forwarding_constructor4_test/02: MissingCompileTimeError
-mixin_forwarding_constructor4_test/03: MissingCompileTimeError
-mixin_illegal_super_use_test/01: MissingCompileTimeError
-mixin_illegal_super_use_test/02: MissingCompileTimeError
-mixin_illegal_super_use_test/03: MissingCompileTimeError
-mixin_illegal_super_use_test/04: MissingCompileTimeError
-mixin_illegal_super_use_test/05: MissingCompileTimeError
-mixin_illegal_super_use_test/06: MissingCompileTimeError
-mixin_illegal_super_use_test/07: MissingCompileTimeError
-mixin_illegal_super_use_test/08: MissingCompileTimeError
-mixin_illegal_super_use_test/09: MissingCompileTimeError
-mixin_illegal_super_use_test/10: MissingCompileTimeError
-mixin_illegal_super_use_test/11: MissingCompileTimeError
-mixin_illegal_superclass_test/01: MissingCompileTimeError
-mixin_illegal_superclass_test/02: MissingCompileTimeError
-mixin_illegal_superclass_test/03: MissingCompileTimeError
-mixin_illegal_superclass_test/04: MissingCompileTimeError
-mixin_illegal_superclass_test/05: MissingCompileTimeError
-mixin_illegal_superclass_test/06: MissingCompileTimeError
-mixin_illegal_superclass_test/07: MissingCompileTimeError
-mixin_illegal_superclass_test/08: MissingCompileTimeError
-mixin_illegal_superclass_test/09: MissingCompileTimeError
-mixin_illegal_superclass_test/10: MissingCompileTimeError
-mixin_illegal_superclass_test/11: MissingCompileTimeError
-mixin_illegal_superclass_test/12: MissingCompileTimeError
-mixin_illegal_superclass_test/13: MissingCompileTimeError
-mixin_illegal_superclass_test/14: MissingCompileTimeError
-mixin_illegal_superclass_test/15: MissingCompileTimeError
-mixin_illegal_superclass_test/16: MissingCompileTimeError
-mixin_illegal_superclass_test/17: MissingCompileTimeError
-mixin_illegal_superclass_test/18: MissingCompileTimeError
-mixin_illegal_superclass_test/19: MissingCompileTimeError
-mixin_illegal_superclass_test/20: MissingCompileTimeError
-mixin_illegal_superclass_test/21: MissingCompileTimeError
-mixin_illegal_superclass_test/22: MissingCompileTimeError
-mixin_illegal_superclass_test/23: MissingCompileTimeError
-mixin_illegal_superclass_test/24: MissingCompileTimeError
-mixin_illegal_superclass_test/25: MissingCompileTimeError
-mixin_illegal_superclass_test/26: MissingCompileTimeError
-mixin_illegal_superclass_test/27: MissingCompileTimeError
-mixin_illegal_superclass_test/28: MissingCompileTimeError
-mixin_illegal_superclass_test/29: MissingCompileTimeError
-mixin_illegal_superclass_test/30: MissingCompileTimeError
-mixin_of_mixin_test/01: CompileTimeError
-mixin_of_mixin_test/02: CompileTimeError
-mixin_of_mixin_test/03: CompileTimeError
-mixin_of_mixin_test/04: CompileTimeError
-mixin_of_mixin_test/05: CompileTimeError
-mixin_of_mixin_test/06: CompileTimeError
-mixin_of_mixin_test/07: CompileTimeError
-mixin_of_mixin_test/08: CompileTimeError
-mixin_of_mixin_test/09: CompileTimeError
-mixin_of_mixin_test/10: CompileTimeError
-mixin_of_mixin_test/11: CompileTimeError
-mixin_of_mixin_test/12: CompileTimeError
-mixin_of_mixin_test/13: CompileTimeError
-mixin_of_mixin_test/14: CompileTimeError
-mixin_of_mixin_test/15: CompileTimeError
-mixin_of_mixin_test/16: CompileTimeError
-mixin_of_mixin_test/17: CompileTimeError
-mixin_of_mixin_test/18: CompileTimeError
-mixin_of_mixin_test/19: CompileTimeError
-mixin_of_mixin_test/20: CompileTimeError
-mixin_of_mixin_test/21: CompileTimeError
-mixin_of_mixin_test/22: CompileTimeError
-mixin_of_mixin_test/none: CompileTimeError
-mixin_super_2_test: CompileTimeError
-mixin_super_bound2_test/01: CompileTimeError
-mixin_super_bound2_test/none: CompileTimeError
-mixin_super_constructor_named_test/01: MissingCompileTimeError
-mixin_super_constructor_positionals_test/01: MissingCompileTimeError
-mixin_super_test: CompileTimeError
-mixin_super_use_test: CompileTimeError
-mixin_superclass_test: CompileTimeError
-mixin_supertype_subclass2_test/01: CompileTimeError
-mixin_supertype_subclass2_test/02: CompileTimeError
-mixin_supertype_subclass2_test/03: CompileTimeError
-mixin_supertype_subclass2_test/04: CompileTimeError
-mixin_supertype_subclass2_test/05: CompileTimeError
-mixin_supertype_subclass2_test/none: CompileTimeError
-mixin_supertype_subclass3_test/01: CompileTimeError
-mixin_supertype_subclass3_test/02: CompileTimeError
-mixin_supertype_subclass3_test/03: CompileTimeError
-mixin_supertype_subclass3_test/04: CompileTimeError
-mixin_supertype_subclass3_test/05: CompileTimeError
-mixin_supertype_subclass3_test/none: CompileTimeError
-mixin_supertype_subclass4_test/01: CompileTimeError
-mixin_supertype_subclass4_test/02: CompileTimeError
-mixin_supertype_subclass4_test/03: CompileTimeError
-mixin_supertype_subclass4_test/04: CompileTimeError
-mixin_supertype_subclass4_test/05: CompileTimeError
-mixin_supertype_subclass4_test/none: CompileTimeError
-mixin_supertype_subclass_test/01: CompileTimeError
-mixin_supertype_subclass_test/02: CompileTimeError
-mixin_supertype_subclass_test/03: CompileTimeError
-mixin_supertype_subclass_test/04: CompileTimeError
-mixin_supertype_subclass_test/05: CompileTimeError
-mixin_supertype_subclass_test/none: CompileTimeError
-modulo_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
-named_constructor_test/01: MissingRuntimeError
-named_parameters_default_eq_test/02: MissingCompileTimeError
-named_parameters_type_test/01: MissingRuntimeError
-named_parameters_type_test/02: MissingRuntimeError
-named_parameters_type_test/03: MissingRuntimeError
-nan_identical_test: RuntimeError
-no_main_test/01: CompileTimeError
-no_such_method_test: RuntimeError
-null_test/none: RuntimeError
-number_identity2_test: RuntimeError
-numbers_test: RuntimeError
-overridden_no_such_method_test: RuntimeError
-override_field_method1_negative_test: Fail
-override_field_method2_negative_test: Fail
-override_field_method4_negative_test: Fail
-override_field_method5_negative_test: Fail
-override_field_test/01: MissingCompileTimeError
-override_inheritance_mixed_test/01: MissingCompileTimeError
-override_inheritance_mixed_test/02: MissingCompileTimeError
-override_inheritance_mixed_test/03: MissingCompileTimeError
-override_inheritance_mixed_test/04: MissingCompileTimeError
-override_method_with_field_test/01: MissingCompileTimeError
-positional_parameters_type_test/01: MissingRuntimeError
-positional_parameters_type_test/02: MissingRuntimeError
-private_super_constructor_test/01: MissingCompileTimeError
-redirecting_constructor_initializer_test: RuntimeError
-redirecting_factory_default_values_test/01: MissingCompileTimeError
-redirecting_factory_default_values_test/02: MissingCompileTimeError
-redirecting_factory_reflection_test: RuntimeError
-regress_13462_1_test: RuntimeError
-regress_13494_test: RuntimeError
-regress_17382_test: RuntimeError
-regress_18535_test: RuntimeError
-regress_20394_test/01: MissingCompileTimeError
-regress_22936_test/01: RuntimeError
-regress_23408_test: RuntimeError
-regress_24283_test: RuntimeError
-regress_27572_test: RuntimeError
-regress_27617_test/1: Crash # Assertion failure: Unexpected constructor j:constructor(Foo._) in ConstructorDataImpl._getConstructorConstant
-regress_28217_test/01: MissingCompileTimeError
-regress_28217_test/none: MissingCompileTimeError
-regress_28255_test: RuntimeError
-setter_override_test/00: MissingCompileTimeError
-setter_override_test/03: MissingCompileTimeError
-stacktrace_demangle_ctors_test: RuntimeError # Issue 12698
stacktrace_rethrow_error_test/none: RuntimeError # Issue 12698
stacktrace_rethrow_error_test/withtraceparameter: RuntimeError # Issue 12698
stacktrace_rethrow_nonerror_test: RuntimeError # Issue 12698
-stacktrace_test: RuntimeError # Issue 12698
-static_getter_no_setter1_test/01: RuntimeError
-static_getter_no_setter2_test/01: RuntimeError
-static_getter_no_setter3_test/01: RuntimeError
-super_call4_test: RuntimeError
-super_getter_setter_test: RuntimeError
-super_test: RuntimeError
-switch_bad_case_test/01: MissingCompileTimeError
-switch_bad_case_test/02: MissingCompileTimeError
-switch_case_test/00: MissingCompileTimeError
-switch_case_test/01: MissingCompileTimeError
-switch_case_test/02: MissingCompileTimeError
symbol_conflict_test: RuntimeError
-syntax_test/none: CompileTimeError
-top_level_getter_no_setter1_test/01: RuntimeError
-top_level_getter_no_setter2_test/01: RuntimeError
-truncdiv_test: RuntimeError
-try_catch_test/01: MissingCompileTimeError
-type_checks_in_factory_method_test: RuntimeError
-type_literal_prefix_call_test/00: RuntimeError
-type_variable_conflict2_test/02: MissingCompileTimeError
-[ $compiler == dart2js && !$dart2js_with_kernel ]
+[ $compiler == dart2js && !$fasta ]
accessor_conflict_export2_test: Crash # Issue 25626
accessor_conflict_export_test: Crash # Issue 25626
accessor_conflict_import2_test: RuntimeError # Issue 25626
@@ -1425,9 +777,6 @@
external_test/13: CompileTimeError # Issue 12887
external_test/20: CompileTimeError # Issue 12887
final_attempt_reinitialization_test.dart: Skip # Issue 29659
-full_stacktrace1_test: Pass, RuntimeError # Issue 12698
-full_stacktrace2_test: Pass, RuntimeError # Issue 12698
-full_stacktrace3_test: Pass, RuntimeError # Issue 12698
generalized_void_syntax_test: CompileTimeError
generic_field_mixin4_test: Crash # Issue 18651
generic_field_mixin5_test: Crash # Issue 18651
@@ -1519,41 +868,7 @@
type_variable_conflict_test/05: Fail # Issue 13702
type_variable_conflict_test/06: Fail # Issue 13702
-[ $compiler == dart2js && !$dart2js_with_kernel && $fast_startup ]
-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 && !$dart2js_with_kernel && $host_checked ]
+[ $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
@@ -1573,7 +888,7 @@
regress_26855_test/3: Crash # Issue 26867
regress_26855_test/4: Crash # Issue 26867
-[ $compiler == dart2js && !$dart2js_with_kernel && $minified ]
+[ $compiler == dart2js && !$fasta && $minified ]
symbol_conflict_test: RuntimeError # Issue 23857
[ $compiler == dart2js && $minified ]
diff --git a/tests/language_2/bug32372_test.dart b/tests/language_2/bug32372_test.dart
new file mode 100644
index 0000000..3804958
--- /dev/null
+++ b/tests/language_2/bug32372_test.dart
@@ -0,0 +1,19 @@
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+// SharedOptions=--supermixin
+
+import "package:expect/expect.dart";
+
+class A extends Object with B<String>, C {}
+
+class B<T> {}
+
+class C<T> extends B<T> {
+ get t => T;
+}
+
+main() {
+ var x = new A();
+ Expect.equals(x.t, String);
+}
diff --git a/tests/language_2/call_operator_test.dart b/tests/language_2/call_operator_test.dart
index 6709ac7..8513bcb 100644
--- a/tests/language_2/call_operator_test.dart
+++ b/tests/language_2/call_operator_test.dart
@@ -75,6 +75,6 @@
Expect.equals("foo:foo", e.call("foo", count: 2));
Expect.equals("foo:foo:foo", e.call("foo", count: 3));
- Expect.isTrue(a1 is Function);
- Expect.isTrue(e is Function);
+ Expect.isFalse(a1 is Function); //# 01: ok
+ Expect.isFalse(e is Function); //# 02: ok
}
diff --git a/tests/language_2/conflicting_generic_interfaces_hierarchy_loop_infinite_test.dart b/tests/language_2/conflicting_generic_interfaces_hierarchy_loop_infinite_test.dart
new file mode 100644
index 0000000..f3f4473
--- /dev/null
+++ b/tests/language_2/conflicting_generic_interfaces_hierarchy_loop_infinite_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.
+// Dart test program to test arithmetic operations.
+
+// There is an interface conflict here due to a loop in the class
+// hierarchy leading to an infinite set of implemented types; this loop
+// shouldn't cause non-termination.
+/*@compile-error=unspecified*/ class A<T> implements B<List<T>> {}
+
+/*@compile-error=unspecified*/ class B<T> implements A<List<T>> {}
+
+main() {
+ new A();
+ new B();
+}
diff --git a/tests/language_2/conflicting_generic_interfaces_hierarchy_loop_test.dart b/tests/language_2/conflicting_generic_interfaces_hierarchy_loop_test.dart
new file mode 100644
index 0000000..e24aaa8
--- /dev/null
+++ b/tests/language_2/conflicting_generic_interfaces_hierarchy_loop_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.
+// Dart test program to test arithmetic operations.
+
+// There is no interface conflict here, but there is a loop in the class
+// hierarchy leading to a finite set of implemented types; this loop
+// shouldn't cause non-termination.
+/*@compile-error=unspecified*/ class A<T> implements B<T> {}
+
+/*@compile-error=unspecified*/ class B<T> implements A<T> {}
+
+main() {
+ new A();
+ new B();
+}
diff --git a/tests/language_2/conflicting_generic_interfaces_no_conflict_test.dart b/tests/language_2/conflicting_generic_interfaces_no_conflict_test.dart
new file mode 100644
index 0000000..f52d32b
--- /dev/null
+++ b/tests/language_2/conflicting_generic_interfaces_no_conflict_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.
+// Dart test program to test arithmetic operations.
+
+class I<T> {}
+
+class A implements I<int> {}
+
+class B implements I<int> {}
+
+class C extends A implements B {}
+
+main() {
+ new C();
+}
diff --git a/tests/language_2/conflicting_generic_interfaces_simple_test.dart b/tests/language_2/conflicting_generic_interfaces_simple_test.dart
new file mode 100644
index 0000000..fe319b2
--- /dev/null
+++ b/tests/language_2/conflicting_generic_interfaces_simple_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.
+// Dart test program to test arithmetic operations.
+
+class I<T> {}
+
+class A implements I<int> {}
+
+class B implements I<String> {}
+
+/*@compile-error=unspecified*/ class C extends A implements B {}
+
+main() {
+ new C();
+}
diff --git a/tests/language_2/deferred_optimized_test.dart b/tests/language_2/deferred_optimized_test.dart
index bcd4d5b..8755e7f 100644
--- a/tests/language_2/deferred_optimized_test.dart
+++ b/tests/language_2/deferred_optimized_test.dart
@@ -1,7 +1,7 @@
// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// VMOptions=--optimization-counter-threshold=10 --no-use-inlining
+// VMOptions=--optimization-counter-threshold=10 --compiler-passes=-Inlining
// Declares foo that returns 42.
import "deferred_constraints_lib2.dart" deferred as lib;
diff --git a/tests/language_2/language_2.status b/tests/language_2/language_2.status
index 9828cc6..e4840e6 100644
--- a/tests/language_2/language_2.status
+++ b/tests/language_2/language_2.status
@@ -259,10 +259,6 @@
[ !$checked && ($compiler == app_jit || $compiler == none || $compiler == precompiler) && ($runtime == dart_precompiled || $runtime == vm) ]
*: SkipByDesign
-[ !$dart2js_with_kernel && $minified ]
-regress_21795_test: RuntimeError # Issue 12605
-stack_trace_test: Fail, OK # Stack trace not preserved in minified code.
-
[ !$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.
diff --git a/tests/language_2/language_2_analyzer.status b/tests/language_2/language_2_analyzer.status
index c8f9a3e..5a9ec1e 100644
--- a/tests/language_2/language_2_analyzer.status
+++ b/tests/language_2/language_2_analyzer.status
@@ -11,7 +11,6 @@
black_listed_test/none: Fail # Issue 14228
built_in_identifier_prefix_test: CompileTimeError
built_in_identifier_type_annotation_test/22: MissingCompileTimeError # Issue 28813
-built_in_identifier_type_annotation_test/85: Crash # Issue 28813
call_type_literal_test: CompileTimeError
cascade_test/none: Fail # Issue 11577
class_literal_static_test/none: CompileTimeError
@@ -1124,6 +1123,7 @@
call_method_override_test/02: MissingCompileTimeError
cascaded_forwarding_stubs_test: CompileTimeError
config_import_corelib_test: CompileTimeError
+conflicting_generic_interfaces_hierarchy_loop_infinite_test: Skip # Crashes or times out
const_types_test/07: MissingCompileTimeError # Incorrectly allows using type parameter in const expression.
const_types_test/08: MissingCompileTimeError # Incorrectly allows using type parameter in const expression.
const_types_test/14: MissingCompileTimeError # Incorrectly allows using type parameter in const expression.
@@ -1209,6 +1209,9 @@
prefix15_negative_test: CompileTimeError, OK
prefix18_negative_test: CompileTimeError, OK
prefix6_negative_test: CompileTimeError, OK
+regress_22976_test/01: CompileTimeError
+regress_22976_test/02: CompileTimeError
+regress_22976_test/none: CompileTimeError
regress_30121_test: CompileTimeError # Issue 31087
regress_30339_test: CompileTimeError
reify_typevar_static_test/00: MissingCompileTimeError # Issue 28823
@@ -1359,6 +1362,7 @@
conditional_property_increment_decrement_test/34: MissingCompileTimeError
conditional_property_increment_decrement_test/39: MissingCompileTimeError
conditional_property_increment_decrement_test/40: MissingCompileTimeError
+conflicting_generic_interfaces_simple_test: MissingCompileTimeError
const_constructor2_test/05: MissingCompileTimeError
const_constructor2_test/06: MissingCompileTimeError
const_dynamic_type_literal_test/02: MissingCompileTimeError
diff --git a/tests/language_2/language_2_dart2js.status b/tests/language_2/language_2_dart2js.status
index 9841b1f..afef09f 100644
--- a/tests/language_2/language_2_dart2js.status
+++ b/tests/language_2/language_2_dart2js.status
@@ -4,7 +4,13 @@
# Sections in this file should contain "$compiler == dart2js".
[ $compiler == dart2js ]
+async_star_cancel_while_paused_test: RuntimeError # Issue 22853
+bit_operations_test: RuntimeError, OK # non JS number semantics
+config_import_test: RuntimeError # Test flag is not passed to the compiler.
double_identical_test: RuntimeError # Negative and positive zero are distinct, but not in dart2js; bug #11551.
+issue23244_test: RuntimeError # Isolates - enum canonicalization - Issue 23244
+null_test/mirrors: SkipByDesign # Uses mirrors.
+vm/*: SkipByDesign # Tests for the VM.
[ $compiler != dart2js ]
minify_closure_variable_collision_test: SkipByDesign # Regression test for dart2js
@@ -13,19 +19,12 @@
field_override_optimization_test: RuntimeError
field_type_check2_test/01: MissingRuntimeError
-[ $compiler == dart2js && $runtime == chrome && $system == macos && !$dart2js_with_kernel ]
+[ $compiler == dart2js && $runtime == chrome && $system == macos ]
await_future_test: Pass, Timeout # Issue 26735
-[ $compiler == dart2js && $runtime == chrome && !$dart2js_with_kernel ]
-enum_mirror_test: Pass
-
-[ $compiler == dart2js && $runtime == chromeOnAndroid && !$dart2js_with_kernel ]
+[ $compiler == dart2js && $runtime == chromeOnAndroid ]
override_field_test/02: Pass, Slow # TODO(kasperl): Please triage.
-[ $compiler == dart2js && $runtime == d8 && $checked && !$dart2js_with_kernel ]
-factory_implementation_test/00: Fail
-regress_30339_test: RuntimeError # Issue 26429
-
[ $compiler == dart2js && $runtime == d8 && !$checked ]
field_override_optimization_test: RuntimeError
field_type_check2_test/01: MissingRuntimeError
@@ -33,42 +32,31 @@
[ $compiler == dart2js && $runtime == d8 && !$checked && !$strong ]
generic_list_checked_test: RuntimeError
-[ $compiler == dart2js && $runtime == d8 && $dart2js_with_kernel ]
+[ $compiler == dart2js && $runtime == d8 && $fasta ]
assertion_test: RuntimeError
bug32353_test: CompileTimeError
+bug32372_test: CompileTimeError
implicit_creation/implicit_new_constructor_generic_test: Pass
-[ $compiler == dart2js && $runtime == d8 && !$dart2js_with_kernel ]
-void_type_function_types_test/none: CompileTimeError # Issue #30515
-
-[ $compiler == dart2js && $runtime == drt && $checked && !$dart2js_with_kernel ]
-regress_30339_test: RuntimeError # Issue 30393
-
-[ $compiler == dart2js && $runtime == drt && !$checked && !$dart2js_with_kernel ]
-field_override_optimization_test: RuntimeError
-field_type_check2_test/01: MissingRuntimeError
-
-[ $compiler == dart2js && $runtime == ff && !$dart2js_with_kernel ]
+[ $compiler == dart2js && $runtime == ff ]
field_override_optimization_test: RuntimeError
field_type_check2_test/01: MissingRuntimeError
round_test: Pass, Fail, OK # Fixed in ff 35. Common JavaScript engine Math.round bug.
[ $compiler == dart2js && $runtime == jsshell ]
async_call_test: RuntimeError # Timer interface not supported: Issue 7728.
+async_star_await_pauses_test: RuntimeError # Need triage
+async_star_no_cancel2_test: RuntimeError # Need triage
+async_star_no_cancel_test: RuntimeError # Need triage
async_star_test/01: RuntimeError
async_star_test/02: RuntimeError
async_star_test/03: RuntimeError
async_star_test/04: RuntimeError
async_star_test/05: RuntimeError
async_star_test/none: RuntimeError
+await_for_test: Skip # Jsshell does not provide periodic timers, Issue 7728
field_override_optimization_test: RuntimeError
field_type_check2_test/01: MissingRuntimeError
-
-[ $compiler == dart2js && $runtime == jsshell && !$dart2js_with_kernel ]
-async_star_await_pauses_test: RuntimeError # Need triage
-async_star_no_cancel2_test: RuntimeError # Need triage
-async_star_no_cancel_test: RuntimeError # Need triage
-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 ]
@@ -179,247 +167,30 @@
function_type_alias3_test: RuntimeError
function_type_alias4_test: RuntimeError
-[ $compiler == dart2js && $runtime != none && !$checked && !$dart2js_with_kernel ]
-callable_test/none: RuntimeError
-cascaded_forwarding_stubs_generic_test: RuntimeError
-cascaded_forwarding_stubs_test: RuntimeError
-checked_setter2_test: RuntimeError
-checked_setter3_test: RuntimeError
-checked_setter_test: RuntimeError
-covariant_subtyping_tearoff1_test: RuntimeError
-covariant_subtyping_tearoff2_test: RuntimeError
-covariant_subtyping_tearoff3_test: RuntimeError
-covariant_subtyping_test: CompileTimeError
-covariant_subtyping_unsafe_call1_test: RuntimeError
-covariant_subtyping_unsafe_call2_test: RuntimeError
-covariant_subtyping_unsafe_call3_test: RuntimeError
-function_subtype_bound_closure1_test: RuntimeError
-function_subtype_bound_closure2_test: RuntimeError
-function_subtype_bound_closure3_test: RuntimeError
-function_subtype_bound_closure4_test: RuntimeError
-function_subtype_bound_closure5_test: RuntimeError
-function_subtype_bound_closure5a_test: RuntimeError
-function_subtype_bound_closure6_test: RuntimeError
-function_subtype_bound_closure7_test: RuntimeError
-function_subtype_call1_test: RuntimeError
-function_subtype_call2_test: RuntimeError
-function_subtype_cast0_test: RuntimeError
-function_subtype_cast1_test: RuntimeError
-function_subtype_cast2_test: RuntimeError
-function_subtype_cast3_test: RuntimeError
-function_subtype_checked0_test: RuntimeError
-function_subtype_closure0_test: RuntimeError
-function_subtype_closure1_test: RuntimeError
-function_subtype_factory1_test: RuntimeError
-function_subtype_inline1_test: RuntimeError
-function_subtype_local1_test: RuntimeError
-function_subtype_local2_test: RuntimeError
-function_subtype_local5_test: RuntimeError
-function_subtype_named1_test: RuntimeError
-function_subtype_named2_test: RuntimeError
-function_subtype_not0_test: RuntimeError
-function_subtype_not1_test: RuntimeError
-function_subtype_not2_test: RuntimeError
-function_subtype_not3_test: RuntimeError
-function_subtype_optional1_test: RuntimeError
-function_subtype_optional2_test: RuntimeError
-function_subtype_regression_ddc_588_test: RuntimeError
-function_subtype_setter0_test: RuntimeError
-function_subtype_top_level1_test: RuntimeError
-function_subtype_typearg2_test: RuntimeError
-function_subtype_typearg3_test: RuntimeError
-function_subtype_typearg5_test: RuntimeError
-function_type2_test: RuntimeError
-function_type_alias2_test: RuntimeError
-function_type_alias3_test: RuntimeError
-function_type_alias4_test: RuntimeError
-function_type_call_getter2_test/none: RuntimeError
-function_type_test: RuntimeError
-generic_field_mixin6_test/none: RuntimeError
-generic_list_checked_test: RuntimeError
-getters_setters2_test/01: RuntimeError
-getters_setters2_test/none: RuntimeError
-if_null_precedence_test/none: RuntimeError
-implicit_downcast_during_assignment_test: RuntimeError
-implicit_downcast_during_combiner_test: RuntimeError
-implicit_downcast_during_compound_assignment_test: RuntimeError
-implicit_downcast_during_conditional_expression_test: RuntimeError
-implicit_downcast_during_constructor_initializer_test: RuntimeError
-implicit_downcast_during_constructor_invocation_test: RuntimeError
-implicit_downcast_during_do_test: RuntimeError
-implicit_downcast_during_factory_constructor_invocation_test: RuntimeError
-implicit_downcast_during_field_declaration_test: RuntimeError
-implicit_downcast_during_for_condition_test: RuntimeError
-implicit_downcast_during_for_in_element_test: RuntimeError
-implicit_downcast_during_for_initializer_expression_test: RuntimeError
-implicit_downcast_during_for_initializer_var_test: RuntimeError
-implicit_downcast_during_if_null_assignment_test: RuntimeError
-implicit_downcast_during_if_statement_test: RuntimeError
-implicit_downcast_during_indexed_assignment_test: RuntimeError
-implicit_downcast_during_indexed_compound_assignment_test: RuntimeError
-implicit_downcast_during_indexed_get_test: RuntimeError
-implicit_downcast_during_indexed_if_null_assignment_test: RuntimeError
-implicit_downcast_during_invocation_test: RuntimeError
-implicit_downcast_during_logical_expression_test: RuntimeError
-implicit_downcast_during_map_literal_test: RuntimeError
-implicit_downcast_during_method_invocation_test: RuntimeError
-implicit_downcast_during_not_test: RuntimeError
-implicit_downcast_during_null_aware_method_invocation_test: RuntimeError
-implicit_downcast_during_return_test: RuntimeError
-implicit_downcast_during_static_method_invocation_test: RuntimeError
-implicit_downcast_during_super_method_invocation_test: RuntimeError
-implicit_downcast_during_variable_declaration_test: RuntimeError
-implicit_downcast_during_while_statement_test: RuntimeError
-inferrer_synthesized_constructor_test: RuntimeError
-malformed2_test/00: MissingCompileTimeError
-mixin_type_parameters_super_test: RuntimeError
-type_parameter_test/05: MissingCompileTimeError
-typevariable_substitution2_test/02: RuntimeError
-
-[ $compiler == dart2js && $runtime != none && !$checked && !$dart2js_with_kernel && !$enable_asserts ]
-assertion_test: RuntimeError # Issue 12748
-runtime_type_function_test: Pass, RuntimeError # Issue 27394
-typevariable_substitution2_test/02: RuntimeError
-
-[ $compiler == dart2js && $runtime != none && !$dart2js_with_kernel ]
-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_test: RuntimeError # Issue 30326
-async_star_cancel_while_paused_test: RuntimeError # Issue 22853
-async_star_test/02: RuntimeError
-bit_operations_test: RuntimeError, OK # Issue 1533
-branch_canonicalization_test: RuntimeError # Issue 638.
-call_method_as_cast_test/01: RuntimeError
-call_method_as_cast_test/02: RuntimeError
-call_method_as_cast_test/03: RuntimeError
-call_method_as_cast_test/04: RuntimeError
-call_method_as_cast_test/05: RuntimeError
-call_method_function_typed_value_test/02: RuntimeError
-call_method_function_typed_value_test/04: RuntimeError
-call_method_function_typed_value_test/06: RuntimeError
-call_method_function_typed_value_test/08: RuntimeError
-call_method_implicit_tear_off_implements_function_test/01: RuntimeError
-call_method_implicit_tear_off_implements_function_test/02: RuntimeError
-call_method_implicit_tear_off_implements_function_test/03: RuntimeError
-call_method_implicit_tear_off_implements_function_test/04: RuntimeError
-call_method_implicit_tear_off_test/01: RuntimeError
-call_method_implicit_tear_off_test/02: RuntimeError
-call_method_implicit_tear_off_test/03: RuntimeError
-call_method_implicit_tear_off_test/04: RuntimeError
-call_method_implicit_tear_off_test/05: RuntimeError
-call_method_implicit_tear_off_test/06: RuntimeError
-call_method_is_check_test/01: RuntimeError
-call_method_is_check_test/02: RuntimeError
-call_method_is_check_test/03: RuntimeError
-call_method_is_check_test/04: RuntimeError
-call_method_is_check_test/05: RuntimeError
-call_method_must_not_be_field_test/01: MissingCompileTimeError
-call_method_must_not_be_field_test/02: MissingCompileTimeError
-call_method_must_not_be_field_test/03: RuntimeError
-call_method_must_not_be_getter_test/01: MissingCompileTimeError
-call_method_must_not_be_getter_test/02: MissingCompileTimeError
-call_method_must_not_be_getter_test/03: RuntimeError
-call_method_override_test/01: MissingCompileTimeError
-call_method_override_test/02: MissingCompileTimeError
-covariant_override/runtime_check_test: RuntimeError
-function_propagation_test: RuntimeError
-function_type_alias_test: RuntimeError
-generic_closure_test: RuntimeError
-generic_function_typedef_test/01: RuntimeError
-generic_instanceof_test: RuntimeError
-generic_typedef_test: RuntimeError
-implicit_downcast_during_assert_initializer_test: CompileTimeError
-implicit_downcast_during_for_in_iterable_test: RuntimeError
-implicit_downcast_during_function_literal_arrow_test: RuntimeError
-implicit_downcast_during_function_literal_return_test: RuntimeError
-implicit_downcast_during_list_literal_test: RuntimeError
-implicit_downcast_during_redirecting_initializer_test: RuntimeError
-implicit_downcast_during_return_async_test: RuntimeError
-implicit_downcast_during_super_initializer_test: RuntimeError
-implicit_downcast_during_yield_star_test: RuntimeError
-implicit_downcast_during_yield_test: RuntimeError
-instanceof2_test: RuntimeError
-instanceof4_test/01: RuntimeError
-instanceof4_test/none: RuntimeError
-invalid_cast_test/01: MissingCompileTimeError
-invalid_cast_test/02: MissingCompileTimeError
-invalid_cast_test/03: MissingCompileTimeError
-invalid_cast_test/04: MissingCompileTimeError
-invalid_cast_test/07: MissingCompileTimeError
-invalid_cast_test/08: MissingCompileTimeError
-invalid_cast_test/09: MissingCompileTimeError
-invalid_cast_test/10: MissingCompileTimeError
-invalid_cast_test/11: MissingCompileTimeError
-issue23244_test: RuntimeError # 23244
-issue31596_super_test/05: RuntimeError
-many_generic_instanceof_test: RuntimeError
-map_literal8_test: RuntimeError
-mixin_forwarding_constructor4_test/01: MissingCompileTimeError # Issue 15101
-mixin_forwarding_constructor4_test/02: MissingCompileTimeError # Issue 15101
-mixin_forwarding_constructor4_test/03: MissingCompileTimeError # Issue 15101
-mixin_type_parameter_inference_error_test/none: CompileTimeError
-mixin_type_parameter_inference_previous_mixin_test/01: CompileTimeError
-mixin_type_parameter_inference_previous_mixin_test/02: CompileTimeError
-mixin_type_parameter_inference_previous_mixin_test/05: CompileTimeError
-mixin_type_parameter_inference_previous_mixin_test/none: CompileTimeError
-mixin_type_parameter_inference_test/01: CompileTimeError
-mixin_type_parameter_inference_test/02: CompileTimeError
-mixin_type_parameter_inference_test/03: CompileTimeError
-mixin_type_parameter_inference_test/08: CompileTimeError
-mixin_type_parameter_inference_test/09: CompileTimeError
-mixin_type_parameter_inference_test/10: CompileTimeError
-mixin_type_parameter_inference_test/12: CompileTimeError
-mixin_type_parameter_inference_test/13: CompileTimeError
-mixin_type_parameter_inference_test/16: CompileTimeError
-mixin_type_parameter_inference_test/none: CompileTimeError
-not_enough_positional_arguments_test/00: MissingCompileTimeError
-not_enough_positional_arguments_test/03: MissingCompileTimeError
-not_enough_positional_arguments_test/06: MissingCompileTimeError
-not_enough_positional_arguments_test/07: MissingCompileTimeError
-nsm5_test: MissingCompileTimeError
-null_test/mirrors: Skip # Uses mirrors.
-override_inheritance_no_such_method_test/05: MissingCompileTimeError
-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_28341_test: Fail # Issue 28340
-symbol_literal_test/none: CompileTimeError
-tearoff_dynamic_test: RuntimeError
-truncdiv_test: RuntimeError # Issue 15246
-type_literal_test: RuntimeError
-vm/*: SkipByDesign # Tests for the VM.
-
-[ $compiler == dart2js && $runtime == safari && !$dart2js_with_kernel ]
+[ $compiler == dart2js && $runtime == safari ]
field_override_optimization_test: RuntimeError
field_type_check2_test/01: MissingRuntimeError
round_test: Fail, OK # Common JavaScript engine Math.round bug.
-[ $compiler == dart2js && $system == windows && !$dart2js_with_kernel ]
+[ $compiler == dart2js && $system == windows ]
string_literals_test: Pass, RuntimeError # Failures on dart2js-win7-chrome-4-4-be and dart2js-win7-ie11ff-4-4-be
+[ $compiler == dart2js && $browser ]
+library_env_test/has_io_support: RuntimeError # Issue 27398
+library_env_test/has_no_io_support: Pass # Issue 27398
+
[ $compiler == dart2js && $browser && $csp && !$fast_startup ]
conditional_import_string_test: Fail # Issue 30615
conditional_import_test: Fail # Issue 30615
-[ $compiler == dart2js && $browser && !$dart2js_with_kernel ]
-config_import_test: Fail # Test flag is not passed to the compiler.
-library_env_test/has_io_support: RuntimeError # Issue 27398
-library_env_test/has_no_io_support: Pass # Issue 27398
-
[ $compiler == dart2js && $checked ]
covariant_subtyping_test: CompileTimeError
-[ $compiler == dart2js && $checked && $dart2js_with_kernel && $minified && $strong ]
+[ $compiler == dart2js && $checked && $fasta && $minified && $strong ]
inline_super_field_test: Crash
typedef_is_test: Crash
-[ $compiler == dart2js && $checked && $dart2js_with_kernel && $strong ]
+[ $compiler == dart2js && $checked && $fasta && $strong ]
assertion_initializer_const_function_test/01: MissingCompileTimeError
assertion_test: RuntimeError
async_star_cancel_while_paused_test: RuntimeError
@@ -432,8 +203,8 @@
bit_operations_test/none: RuntimeError
branch_canonicalization_test: RuntimeError
built_in_identifier_test: RuntimeError # Issue 28815
-call_function_apply_test: RuntimeError
-canonical_const2_test: RuntimeError
+call_function_apply_test: RuntimeError # Issue 23873
+canonical_const2_test: RuntimeError, OK # non JS number semantics
check_member_static_test/02: MissingCompileTimeError
checked_method_error_order_test: RuntimeError
class_cycle_test/02: MissingCompileTimeError
@@ -505,8 +276,8 @@
const_map2_test/00: MissingCompileTimeError
const_map3_test/00: MissingCompileTimeError
const_switch2_test/01: MissingCompileTimeError
-const_switch_test/02: RuntimeError
-const_switch_test/04: RuntimeError
+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
const_types_test/02: MissingCompileTimeError
const_types_test/03: MissingCompileTimeError
@@ -555,9 +326,9 @@
deferred_inheritance_constraints_test/mixin: MissingCompileTimeError
deferred_load_constants_test/none: RuntimeError
deferred_load_library_wrong_args_test/01: MissingRuntimeError
-deferred_not_loaded_check_test: RuntimeError
+deferred_not_loaded_check_test: RuntimeError # Test out of date. Issue 31933
deferred_redirecting_factory_test: RuntimeError
-double_int_to_string_test: RuntimeError
+double_int_to_string_test: RuntimeError, OK # non JS number semantics
duplicate_export_negative_test: Fail
duplicate_implements_test/01: MissingCompileTimeError
duplicate_implements_test/02: MissingCompileTimeError
@@ -565,7 +336,7 @@
duplicate_implements_test/04: MissingCompileTimeError
dynamic_prefix_core_test/none: RuntimeError
enum_mirror_test: RuntimeError
-expect_test: RuntimeError
+expect_test: RuntimeError, OK # Issue 13080
external_test/10: MissingRuntimeError
external_test/13: MissingRuntimeError
external_test/20: MissingRuntimeError
@@ -583,7 +354,7 @@
full_stacktrace2_test: RuntimeError # Issue 12698
full_stacktrace3_test: RuntimeError # Issue 12698
function_type_alias_test: RuntimeError
-generalized_void_syntax_test: CompileTimeError
+generalized_void_syntax_test: CompileTimeError # Issue #30176.
generic_closure_test/01: RuntimeError
generic_closure_test/none: RuntimeError
generic_function_bounds_test: Crash # Unsupported operation: Unsupported type parameter type node T.
@@ -596,19 +367,19 @@
getter_override_test/00: MissingCompileTimeError
getter_override_test/01: MissingCompileTimeError
getter_override_test/02: MissingCompileTimeError
-identical_closure2_test: RuntimeError
+identical_closure2_test: RuntimeError # non JS number semantics
implicit_downcast_during_assert_initializer_test: RuntimeError
-infinity_test: RuntimeError
+infinity_test: RuntimeError # non JS number semantics - Issue 4984
instance_creation_in_function_annotation_test: RuntimeError
instanceof2_test: RuntimeError
instanceof4_test/01: RuntimeError
instanceof4_test/none: RuntimeError
-integer_division_by_zero_test: RuntimeError
+integer_division_by_zero_test: RuntimeError # Issue 8301
internal_library_test/02: Crash # NoSuchMethodError: Class 'DillLibraryBuilder' has no instance getter 'mixinApplicationClasses'.
-invocation_mirror2_test: RuntimeError
+invocation_mirror2_test: RuntimeError # mirrors not supported
issue21079_test: RuntimeError
issue23244_test: RuntimeError
-left_shift_test: RuntimeError
+left_shift_test: RuntimeError # non JS number semantics
library_env_test/has_mirror_support: RuntimeError
list_literal1_test/01: MissingCompileTimeError
list_literal4_test/00: MissingCompileTimeError
@@ -628,7 +399,7 @@
method_override7_test/02: MissingCompileTimeError
method_override8_test/00: MissingCompileTimeError
method_override8_test/01: MissingCompileTimeError
-mint_arithmetic_test: RuntimeError
+mint_arithmetic_test: RuntimeError # non JS number semantics
mixin_forwarding_constructor4_test/01: MissingCompileTimeError
mixin_forwarding_constructor4_test/02: MissingCompileTimeError
mixin_forwarding_constructor4_test/03: MissingCompileTimeError
@@ -707,7 +478,7 @@
mixin_supertype_subclass4_test/05: CompileTimeError
mixin_supertype_subclass4_test/none: CompileTimeError
mixin_type_parameters_super_test: RuntimeError
-modulo_test: RuntimeError
+modulo_test: RuntimeError # non JS number semantics
multiline_newline_test/04: MissingCompileTimeError
multiline_newline_test/04r: MissingCompileTimeError
multiline_newline_test/05: MissingCompileTimeError
@@ -715,7 +486,7 @@
multiline_newline_test/06: MissingCompileTimeError
multiline_newline_test/06r: MissingCompileTimeError
named_parameters_default_eq_test/02: MissingCompileTimeError
-nan_identical_test: RuntimeError
+nan_identical_test: RuntimeError # Issue 11551
nested_generic_closure_test: Crash # Unsupported operation: Unsupported type parameter type node F.
no_main_test/01: CompileTimeError
not_enough_positional_arguments_test/00: MissingCompileTimeError
@@ -728,7 +499,7 @@
null_test/mirrors: RuntimeError
null_test/none: RuntimeError
number_identity2_test: RuntimeError
-numbers_test: RuntimeError
+numbers_test: RuntimeError, OK # non JS number semantics
override_field_method1_negative_test: Fail
override_field_method2_negative_test: Fail
override_field_method4_negative_test: Fail
@@ -749,7 +520,7 @@
redirecting_factory_long_test: RuntimeError
redirecting_factory_reflection_test: RuntimeError
regress_20394_test/01: MissingCompileTimeError
-regress_24283_test: RuntimeError
+regress_24283_test: RuntimeError # non JS number semantics
regress_27617_test/1: Crash # Assertion failure: Unexpected constructor j:constructor(Foo._) in ConstructorDataImpl._getConstructorConstant
regress_28217_test/01: MissingCompileTimeError
regress_28217_test/none: MissingCompileTimeError
@@ -781,7 +552,7 @@
syntax_test/32: MissingCompileTimeError
syntax_test/33: MissingCompileTimeError
tearoff_dynamic_test: RuntimeError
-truncdiv_test: RuntimeError
+truncdiv_test: RuntimeError # non JS number semantics - Issue 15246
try_catch_test/01: MissingCompileTimeError
type_check_const_function_typedef2_test: MissingCompileTimeError
type_literal_test: RuntimeError
@@ -789,34 +560,6 @@
type_parameter_test/09: Crash # Internal Error: Unexpected type variable in static context.
type_variable_scope_test/03: Crash # Internal Error: Unexpected type variable in static context.
-[ $compiler == dart2js && $checked && !$dart2js_with_kernel ]
-async_return_types_test/nestedFuture: Fail # Issue 26429
-async_return_types_test/wrongTypeParameter: Fail # Issue 26429
-check_member_static_test/01: MissingCompileTimeError
-check_method_override_test/01: MissingCompileTimeError
-check_method_override_test/02: MissingCompileTimeError
-covariant_subtyping_test: CompileTimeError
-default_factory2_test/01: Fail # Issue 14121
-function_malformed_result_type_test/00: MissingCompileTimeError
-function_type_alias_test: RuntimeError
-function_type_call_getter2_test/00: MissingCompileTimeError
-function_type_call_getter2_test/01: MissingCompileTimeError
-function_type_call_getter2_test/02: MissingCompileTimeError
-function_type_call_getter2_test/03: MissingCompileTimeError
-function_type_call_getter2_test/04: MissingCompileTimeError
-function_type_call_getter2_test/05: MissingCompileTimeError
-generic_test/01: MissingCompileTimeError
-generic_test/none: RuntimeError
-malbounded_instantiation_test/01: Fail # Issue 12702
-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_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
-
[ $compiler == dart2js && !$checked ]
covariance_field_test/01: RuntimeError
covariance_field_test/02: RuntimeError
@@ -838,7 +581,10 @@
recursive_mixin_test: RuntimeError # no check without --checked
type_argument_in_super_type_test: RuntimeError
-[ $compiler == dart2js && !$checked && $dart2js_with_kernel ]
+[ $compiler == dart2js && !$checked && !$enable_asserts ]
+assertion_test: RuntimeError, OK
+
+[ $compiler == dart2js && !$checked && $fasta ]
cascaded_forwarding_stubs_generic_test: RuntimeError
cascaded_forwarding_stubs_test: RuntimeError
checked_setter3_test: RuntimeError # Issue 31128
@@ -881,98 +627,35 @@
nsm5_test: MissingCompileTimeError
override_inheritance_no_such_method_test/05: MissingCompileTimeError
-[ $compiler == dart2js && !$checked && !$dart2js_with_kernel ]
-bool_check_test: RuntimeError # Issue 29647
-bool_condition_check_test: RuntimeError
-const_constructor2_test/13: MissingCompileTimeError
-const_constructor2_test/14: MissingCompileTimeError
-const_constructor2_test/15: MissingCompileTimeError
-const_constructor2_test/16: MissingCompileTimeError
-const_constructor2_test/17: MissingCompileTimeError
-const_constructor2_test/18: MissingCompileTimeError
-const_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
-forwarding_semi_stub_test: RuntimeError
-forwarding_stub_tearoff_generic_test: RuntimeError
-forwarding_stub_tearoff_test: RuntimeError
-function_subtype_inline2_test: RuntimeError
-generic_test/01: MissingCompileTimeError
-generic_test/none: RuntimeError # test requires Dart 2 subtyping for `is`
-issue31596_implement_covariant_test: RuntimeError
-issue31596_test: RuntimeError
-list_literal1_test/01: MissingCompileTimeError
-type_check_const_function_typedef2_test: MissingCompileTimeError
+[ $compiler == dart2js && $fast_startup ]
+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: CompileTimeError
+vm/reflect_core_vm_test: Fail # mirrors not supported
-[ $compiler == dart2js && $dart2js_with_kernel ]
-async_error_timing_test: Crash
-bug31436_test: RuntimeError
-call_method_as_cast_test/01: RuntimeError
-call_method_as_cast_test/02: RuntimeError
-call_method_as_cast_test/03: RuntimeError
-call_method_as_cast_test/04: RuntimeError
-call_method_as_cast_test/05: RuntimeError
-call_method_function_typed_value_test/02: RuntimeError
-call_method_function_typed_value_test/04: RuntimeError
-call_method_function_typed_value_test/06: RuntimeError
-call_method_function_typed_value_test/08: RuntimeError
-call_method_is_check_test/01: RuntimeError
-call_method_is_check_test/02: RuntimeError
-call_method_is_check_test/03: RuntimeError
-call_method_is_check_test/04: RuntimeError
-call_method_is_check_test/05: RuntimeError
-call_method_must_not_be_field_test/03: RuntimeError # Issue 32155
-call_method_must_not_be_getter_test/03: RuntimeError # Issue 32155
-call_with_no_such_method_test: RuntimeError
-callable_test/none: RuntimeError
-checked_setter2_test: RuntimeError # Issue 31128
-checked_setter_test: RuntimeError # Issue 31128
-extract_type_arguments_test: Crash # Issue 31371
-function_propagation_test: RuntimeError
-function_type_call_getter2_test/none: RuntimeError
-generic_test/01: MissingCompileTimeError # front end does not validate `extends`
-implicit_downcast_during_constructor_invocation_test: RuntimeError
-implicit_downcast_during_for_in_element_test: RuntimeError
-implicit_downcast_during_for_in_iterable_test: RuntimeError
-implicit_downcast_during_function_literal_arrow_test: RuntimeError
-implicit_downcast_during_function_literal_return_test: RuntimeError
-implicit_downcast_during_invocation_test: RuntimeError
-implicit_downcast_during_list_literal_test: RuntimeError
-implicit_downcast_during_redirecting_initializer_test: RuntimeError
-implicit_downcast_during_return_async_test: RuntimeError
-implicit_downcast_during_super_initializer_test: RuntimeError
-implicit_downcast_during_yield_star_test: RuntimeError
-implicit_downcast_during_yield_test: RuntimeError
-instantiate_tearoff_after_contravariance_check_test: RuntimeError
-instantiate_tearoff_of_call_test: RuntimeError
-instantiate_tearoff_test: RuntimeError
-mixin_type_parameter_inference_error_test/none: CompileTimeError
-mixin_type_parameter_inference_previous_mixin_test/01: CompileTimeError
-mixin_type_parameter_inference_previous_mixin_test/02: CompileTimeError
-mixin_type_parameter_inference_previous_mixin_test/05: CompileTimeError
-mixin_type_parameter_inference_previous_mixin_test/none: CompileTimeError
-mixin_type_parameter_inference_test/01: CompileTimeError
-mixin_type_parameter_inference_test/02: CompileTimeError
-mixin_type_parameter_inference_test/03: CompileTimeError
-mixin_type_parameter_inference_test/08: CompileTimeError
-mixin_type_parameter_inference_test/09: CompileTimeError
-mixin_type_parameter_inference_test/10: CompileTimeError
-mixin_type_parameter_inference_test/12: CompileTimeError
-mixin_type_parameter_inference_test/13: CompileTimeError
-mixin_type_parameter_inference_test/16: CompileTimeError
-mixin_type_parameter_inference_test/none: CompileTimeError
-partial_tearoff_instantiation_test/02: CompileTimeError
-partial_tearoff_instantiation_test/04: CompileTimeError
-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.
-partial_tearoff_instantiation_test/08: Pass # for the wrong reason.
-partial_tearoff_instantiation_test/none: CompileTimeError
-
-[ $compiler == dart2js && $dart2js_with_kernel && $fast_startup && $strong ]
+[ $compiler == dart2js && $fast_startup && $fasta && $strong ]
assertion_initializer_const_error2_test/none: CompileTimeError
assertion_initializer_const_function_test/01: MissingCompileTimeError
assertion_test: RuntimeError
@@ -985,8 +668,8 @@
bool_check_test: RuntimeError
bool_condition_check_test: RuntimeError
branch_canonicalization_test: RuntimeError
-call_function_apply_test: RuntimeError
-canonical_const2_test: RuntimeError
+call_function_apply_test: RuntimeError # Issue 23873
+canonical_const2_test: RuntimeError, OK # non JS number semantics
check_member_static_test/02: MissingCompileTimeError
class_cycle_test/02: MissingCompileTimeError
class_cycle_test/03: MissingCompileTimeError
@@ -1057,8 +740,8 @@
const_map2_test/00: MissingCompileTimeError
const_map3_test/00: MissingCompileTimeError
const_switch2_test/01: MissingCompileTimeError
-const_switch_test/02: RuntimeError
-const_switch_test/04: RuntimeError
+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
const_types_test/02: MissingCompileTimeError
const_types_test/03: MissingCompileTimeError
@@ -1110,9 +793,9 @@
deferred_inheritance_constraints_test/mixin: MissingCompileTimeError
deferred_load_constants_test/none: RuntimeError
deferred_load_library_wrong_args_test/01: MissingRuntimeError
-deferred_not_loaded_check_test: RuntimeError
+deferred_not_loaded_check_test: RuntimeError # Test out of date. Issue 31933
deferred_redirecting_factory_test: RuntimeError
-double_int_to_string_test: RuntimeError
+double_int_to_string_test: RuntimeError, OK # non JS number semantics
duplicate_export_negative_test: Fail
duplicate_implements_test/01: MissingCompileTimeError
duplicate_implements_test/02: MissingCompileTimeError
@@ -1121,7 +804,7 @@
dynamic_prefix_core_test/none: RuntimeError
dynamic_test: RuntimeError
enum_mirror_test: RuntimeError
-expect_test: RuntimeError
+expect_test: RuntimeError, OK # Issue 13080
external_test/10: MissingRuntimeError
external_test/13: MissingRuntimeError
external_test/20: MissingRuntimeError
@@ -1136,9 +819,9 @@
field_override4_test/02: MissingCompileTimeError
final_attempt_reinitialization_test/01: MissingCompileTimeError
final_attempt_reinitialization_test/02: MissingCompileTimeError
-full_stacktrace1_test: RuntimeError
-full_stacktrace2_test: RuntimeError
-full_stacktrace3_test: RuntimeError
+full_stacktrace1_test: RuntimeError # Issue 12698
+full_stacktrace2_test: RuntimeError # Issue 12698
+full_stacktrace3_test: RuntimeError # Issue 12698
function_subtype_bound_closure3_test: RuntimeError
function_subtype_bound_closure4_test: RuntimeError
function_subtype_bound_closure7_test: RuntimeError
@@ -1166,7 +849,7 @@
function_type_alias_test: RuntimeError
function_type_call_getter2_test/none: RuntimeError
function_type_test: RuntimeError
-generalized_void_syntax_test: CompileTimeError
+generalized_void_syntax_test: CompileTimeError # Issue #30176.
generic_closure_test/01: RuntimeError
generic_closure_test/none: RuntimeError
generic_field_mixin6_test/none: RuntimeError
@@ -1185,24 +868,24 @@
getter_override_test/02: MissingCompileTimeError
getters_setters2_test/01: RuntimeError
getters_setters2_test/none: RuntimeError
-identical_closure2_test: RuntimeError
+identical_closure2_test: RuntimeError # non JS number semantics
if_null_precedence_test/none: RuntimeError
implicit_creation/implicit_new_or_const_composite_test: RuntimeError
implicit_creation/implicit_new_or_const_test: RuntimeError
inferrer_synthesized_constructor_test: RuntimeError
-infinity_test: RuntimeError
+infinity_test: RuntimeError # non JS number semantics - Issue 4984
instance_creation_in_function_annotation_test: RuntimeError
instanceof2_test: RuntimeError
instanceof4_test/01: RuntimeError
instanceof4_test/none: RuntimeError
-integer_division_by_zero_test: RuntimeError
+integer_division_by_zero_test: RuntimeError # Issue 8301
internal_library_test/02: Crash # NoSuchMethodError: Class 'DillLibraryBuilder' has no instance getter 'mixinApplicationClasses'.
-invocation_mirror2_test: RuntimeError
+invocation_mirror2_test: RuntimeError # mirrors not supported
invocation_mirror_invoke_on2_test: RuntimeError
invocation_mirror_invoke_on_test: RuntimeError
issue21079_test: RuntimeError
issue23244_test: RuntimeError
-left_shift_test: RuntimeError
+left_shift_test: RuntimeError # non JS number semantics
library_env_test/has_mirror_support: RuntimeError
list_literal1_test/01: MissingCompileTimeError
list_literal4_test/00: MissingCompileTimeError
@@ -1222,7 +905,7 @@
method_override7_test/02: MissingCompileTimeError
method_override8_test/00: MissingCompileTimeError
method_override8_test/01: MissingCompileTimeError
-mint_arithmetic_test: RuntimeError
+mint_arithmetic_test: RuntimeError # non JS number semantics
mixin_forwarding_constructor4_test/01: MissingCompileTimeError
mixin_forwarding_constructor4_test/02: MissingCompileTimeError
mixin_forwarding_constructor4_test/03: MissingCompileTimeError
@@ -1301,7 +984,7 @@
mixin_supertype_subclass4_test/05: CompileTimeError
mixin_supertype_subclass4_test/none: CompileTimeError
mixin_type_parameters_super_test: RuntimeError
-modulo_test: RuntimeError
+modulo_test: RuntimeError # non JS number semantics
multiline_newline_test/04: MissingCompileTimeError
multiline_newline_test/04r: MissingCompileTimeError
multiline_newline_test/05: MissingCompileTimeError
@@ -1309,7 +992,7 @@
multiline_newline_test/06: MissingCompileTimeError
multiline_newline_test/06r: MissingCompileTimeError
named_parameters_default_eq_test/02: MissingCompileTimeError
-nan_identical_test: RuntimeError
+nan_identical_test: RuntimeError # Issue 11551
nested_generic_closure_test: Crash # Unsupported operation: Unsupported type parameter type node F.
no_main_test/01: CompileTimeError
no_such_method_test: RuntimeError
@@ -1323,7 +1006,7 @@
null_test/mirrors: RuntimeError
null_test/none: RuntimeError
number_identity2_test: RuntimeError
-numbers_test: RuntimeError
+numbers_test: RuntimeError, OK # non JS number semantics
overridden_no_such_method_test: RuntimeError
override_field_method1_negative_test: Fail
override_field_method2_negative_test: Fail
@@ -1345,7 +1028,7 @@
redirecting_factory_long_test: RuntimeError
redirecting_factory_reflection_test: RuntimeError
regress_20394_test/01: MissingCompileTimeError
-regress_24283_test: RuntimeError
+regress_24283_test: RuntimeError # non JS number semantics
regress_27617_test/1: Crash # Assertion failure: Unexpected constructor j:constructor(Foo._) in ConstructorDataImpl._getConstructorConstant
regress_28217_test/01: MissingCompileTimeError
regress_28217_test/none: MissingCompileTimeError
@@ -1357,9 +1040,9 @@
setter_override_test/00: MissingCompileTimeError
setter_override_test/03: MissingCompileTimeError
stacktrace_demangle_ctors_test: RuntimeError # Issue 12698
-stacktrace_rethrow_error_test/none: RuntimeError
-stacktrace_rethrow_error_test/withtraceparameter: RuntimeError
-stacktrace_rethrow_nonerror_test: RuntimeError
+stacktrace_rethrow_error_test/none: RuntimeError # Issue 12698
+stacktrace_rethrow_error_test/withtraceparameter: RuntimeError # Issue 12698
+stacktrace_rethrow_nonerror_test: RuntimeError # Issue 12698
stacktrace_test: RuntimeError # Issue 12698
super_call4_test: Crash # NoSuchMethodError: The getter 'thisLocal' was called on null.
switch_bad_case_test/01: MissingCompileTimeError
@@ -1375,13 +1058,78 @@
syntax_test/32: MissingCompileTimeError
syntax_test/33: MissingCompileTimeError
tearoff_dynamic_test: Crash # Unsupported operation: Unsupported type parameter type node T.
-truncdiv_test: RuntimeError
+truncdiv_test: RuntimeError # non JS number semantics - Issue 15246
try_catch_test/01: MissingCompileTimeError
type_literal_test: RuntimeError
type_variable_conflict2_test/02: MissingCompileTimeError
typevariable_substitution2_test/02: RuntimeError
-[ $compiler == dart2js && $dart2js_with_kernel && $host_checked && $strong ]
+[ $compiler == dart2js && $fasta ]
+async_error_timing_test: Crash
+bug31436_test: RuntimeError
+call_method_as_cast_test/01: RuntimeError
+call_method_as_cast_test/02: RuntimeError
+call_method_as_cast_test/04: RuntimeError
+call_method_as_cast_test/05: RuntimeError
+call_method_function_typed_value_test/02: RuntimeError
+call_method_function_typed_value_test/04: RuntimeError
+call_method_function_typed_value_test/06: RuntimeError
+call_method_function_typed_value_test/08: RuntimeError
+call_method_is_check_test/01: RuntimeError
+call_method_is_check_test/02: RuntimeError
+call_method_is_check_test/04: RuntimeError
+call_method_is_check_test/05: RuntimeError
+call_method_must_not_be_field_test/03: RuntimeError # Issue 32155
+call_method_must_not_be_getter_test/03: RuntimeError # Issue 32155
+call_with_no_such_method_test: RuntimeError
+callable_test/none: RuntimeError
+checked_setter2_test: RuntimeError # Issue 31128
+checked_setter_test: RuntimeError # Issue 31128
+const_dynamic_type_literal_test/03: Pass # but it shouldn't until we fix issue 17207
+extract_type_arguments_test: Crash # Issue 31371
+function_propagation_test: RuntimeError
+function_type_call_getter2_test/none: RuntimeError
+generic_test/01: MissingCompileTimeError # front end does not validate `extends`
+implicit_downcast_during_constructor_invocation_test: RuntimeError
+implicit_downcast_during_for_in_element_test: RuntimeError
+implicit_downcast_during_for_in_iterable_test: RuntimeError
+implicit_downcast_during_function_literal_arrow_test: RuntimeError
+implicit_downcast_during_function_literal_return_test: RuntimeError
+implicit_downcast_during_invocation_test: RuntimeError
+implicit_downcast_during_list_literal_test: RuntimeError
+implicit_downcast_during_redirecting_initializer_test: RuntimeError
+implicit_downcast_during_return_async_test: RuntimeError
+implicit_downcast_during_super_initializer_test: RuntimeError
+implicit_downcast_during_yield_star_test: RuntimeError
+implicit_downcast_during_yield_test: RuntimeError
+instantiate_tearoff_after_contravariance_check_test: RuntimeError
+instantiate_tearoff_of_call_test: RuntimeError
+instantiate_tearoff_test: RuntimeError
+mixin_type_parameter_inference_error_test/none: CompileTimeError
+mixin_type_parameter_inference_previous_mixin_test/01: CompileTimeError
+mixin_type_parameter_inference_previous_mixin_test/02: CompileTimeError
+mixin_type_parameter_inference_previous_mixin_test/05: CompileTimeError
+mixin_type_parameter_inference_previous_mixin_test/none: CompileTimeError
+mixin_type_parameter_inference_test/01: CompileTimeError
+mixin_type_parameter_inference_test/02: CompileTimeError
+mixin_type_parameter_inference_test/03: CompileTimeError
+mixin_type_parameter_inference_test/08: CompileTimeError
+mixin_type_parameter_inference_test/09: CompileTimeError
+mixin_type_parameter_inference_test/10: CompileTimeError
+mixin_type_parameter_inference_test/12: CompileTimeError
+mixin_type_parameter_inference_test/13: CompileTimeError
+mixin_type_parameter_inference_test/16: CompileTimeError
+mixin_type_parameter_inference_test/none: CompileTimeError
+partial_tearoff_instantiation_test/02: CompileTimeError
+partial_tearoff_instantiation_test/04: CompileTimeError
+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.
+partial_tearoff_instantiation_test/08: Pass # for the wrong reason.
+partial_tearoff_instantiation_test/none: CompileTimeError
+syntax_test/62: Crash
+
+[ $compiler == dart2js && $fasta && $host_checked && $strong ]
abstract_factory_constructor_test/00: MissingCompileTimeError
abstract_getter_test/01: MissingCompileTimeError
abstract_override_adds_optional_args_concrete_subclass_test: MissingCompileTimeError
@@ -1392,59 +1140,117 @@
argument_assignability_function_typed_test/03: RuntimeError
argument_assignability_function_typed_test/04: RuntimeError
argument_assignability_function_typed_test/05: RuntimeError
+assert_message_test: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
assertion_initializer_const_error2_test/none: CompileTimeError
assertion_initializer_test: CompileTimeError
assertion_test: RuntimeError
+async_and_or_test: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+async_await_catch_regression_test: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
async_await_foreign_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_await_syntax_test/a06a: RuntimeError
-async_await_syntax_test/b06a: RuntimeError
-async_await_syntax_test/c06a: RuntimeError
-async_await_syntax_test/c10a: MissingCompileTimeError
-async_await_syntax_test/d06a: RuntimeError
+async_await_syntax_test/a01a: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+async_await_syntax_test/a02a: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+async_await_syntax_test/a03a: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+async_await_syntax_test/a03b: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+async_await_syntax_test/a05a: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+async_await_syntax_test/a05b: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+async_await_syntax_test/a06a: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+async_await_syntax_test/a09a: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+async_await_syntax_test/a11c: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+async_await_syntax_test/a11d: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+async_await_syntax_test/a12g: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+async_await_syntax_test/b01a: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+async_await_syntax_test/b02a: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+async_await_syntax_test/b03a: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+async_await_syntax_test/b05a: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+async_await_syntax_test/b06a: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+async_await_syntax_test/b09a: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+async_await_syntax_test/b11c: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+async_await_syntax_test/b11d: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+async_await_syntax_test/b12g: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+async_await_syntax_test/c01a: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+async_await_syntax_test/c02a: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+async_await_syntax_test/c03a: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+async_await_syntax_test/c05a: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+async_await_syntax_test/c06a: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+async_await_syntax_test/c09a: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+async_await_syntax_test/c10a: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+async_await_syntax_test/d01a: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+async_await_syntax_test/d02a: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+async_await_syntax_test/d03a: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+async_await_syntax_test/d05a: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+async_await_syntax_test/d06a: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
async_await_syntax_test/d08b: MissingCompileTimeError
-async_await_syntax_test/d10a: MissingCompileTimeError
+async_await_syntax_test/d09a: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+async_await_syntax_test/d10a: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
async_await_test/02: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
async_await_test/03: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
async_await_test/none: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_congruence_local_test/none: RuntimeError
-async_congruence_method_test/none: RuntimeError
-async_congruence_top_level_test: RuntimeError
-async_congruence_unnamed_test/none: RuntimeError
+async_break_in_finally_test: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+async_call_test: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+async_cascade_test: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+async_congruence_local_test/none: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+async_congruence_method_test/none: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+async_congruence_top_level_test: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+async_congruence_unnamed_test/none: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+async_continue_label_test/await_in_body: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+async_continue_label_test/await_in_condition: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+async_continue_label_test/await_in_init: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+async_continue_label_test/await_in_update: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+async_continue_label_test/none: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+async_control_structures_test: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
async_error_timing_test: RuntimeError
+async_finally_rethrow_test: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
async_or_generator_return_type_stacktrace_test/01: MissingCompileTimeError
async_or_generator_return_type_stacktrace_test/02: MissingCompileTimeError
async_or_generator_return_type_stacktrace_test/03: MissingCompileTimeError
-async_return_types_test/nestedFuture: MissingCompileTimeError
-async_return_types_test/none: RuntimeError
-async_return_types_test/tooManyTypeParameters: MissingCompileTimeError
-async_return_types_test/wrongReturnType: MissingCompileTimeError
+async_regression_23058_test: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+async_rethrow_test: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+async_return_types_test/nestedFuture: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+async_return_types_test/none: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+async_return_types_test/tooManyTypeParameters: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+async_return_types_test/wrongReturnType: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
async_star_await_pauses_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_star_cancel_and_throw_in_finally_test: RuntimeError
-async_star_cancel_while_paused_test: RuntimeError
-async_star_no_cancel2_test: RuntimeError
-async_star_no_cancel_test: RuntimeError
-async_star_pause_test: RuntimeError
+async_star_cancel_and_throw_in_finally_test: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+async_star_cancel_while_paused_test: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+async_star_no_cancel2_test: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+async_star_no_cancel_test: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+async_star_pause_test: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
async_star_regression_2238_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_star_regression_23116_test: RuntimeError
-async_star_regression_fisk_test: RuntimeError
+async_star_regression_23116_test: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+async_star_regression_fisk_test: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
async_star_stream_take_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_star_take_reyield_test: RuntimeError
+async_star_take_reyield_test: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
async_star_test/01: Crash # Assertion failure: Unexpected arguments. Expected 1 argument, actual: [invoke dynamic method: selector=Selector(operator, *, arity=1), mask=[subclass=JSUInt32], HTypeInfoReadVariable(ListQueue.E)].
async_star_test/02: Crash # Assertion failure: Unexpected arguments. Expected 1 argument, actual: [invoke dynamic method: selector=Selector(operator, *, arity=1), mask=[subclass=JSUInt32], HTypeInfoReadVariable(ListQueue.E)].
async_star_test/03: Crash # Assertion failure: Unexpected arguments. Expected 1 argument, actual: [invoke dynamic method: selector=Selector(operator, *, arity=1), mask=[subclass=JSUInt32], HTypeInfoReadVariable(ListQueue.E)].
async_star_test/04: Crash # Assertion failure: Unexpected arguments. Expected 1 argument, actual: [invoke dynamic method: selector=Selector(operator, *, arity=1), mask=[subclass=JSUInt32], HTypeInfoReadVariable(ListQueue.E)].
async_star_test/05: Crash # Assertion failure: Unexpected arguments. Expected 1 argument, actual: [invoke dynamic method: selector=Selector(operator, *, arity=1), mask=[subclass=JSUInt32], HTypeInfoReadVariable(ListQueue.E)].
async_star_test/none: Crash # Assertion failure: Unexpected arguments. Expected 1 argument, actual: [invoke dynamic method: selector=Selector(operator, *, arity=1), mask=[subclass=JSUInt32], HTypeInfoReadVariable(ListQueue.E)].
+async_switch_test/none: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+async_switch_test/withDefault: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
async_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-asyncstar_concat_test: RuntimeError
+async_this_bound_test: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+async_throw_in_catch_test/forceAwait: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+async_throw_in_catch_test/none: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+asyncstar_concat_test: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
asyncstar_throw_in_catch_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-asyncstar_yield_test: RuntimeError
-asyncstar_yieldstar_test: RuntimeError
-await_for_cancel_test: RuntimeError
+asyncstar_yield_test: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+asyncstar_yieldstar_test: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+await_and_ifnull_test: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+await_backwards_compatibility_test/none: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+await_exceptions_test: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+await_for_cancel_test: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
await_for_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-await_for_use_local_test: RuntimeError
+await_for_use_local_test: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+await_future_test: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+await_in_cascade_test: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+await_nonfuture_test: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
await_not_started_immediately_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-await_test: RuntimeError
+await_null_aware_test: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+await_postfix_expr_test: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+await_regression_test: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+await_started_immediately_test: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+await_test: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
bad_override_test/01: MissingCompileTimeError
bad_override_test/02: MissingCompileTimeError
bad_override_test/03: MissingCompileTimeError
@@ -1456,9 +1262,13 @@
bool_test: RuntimeError
branch_canonicalization_test: RuntimeError
branches_test: Crash # 'package:front_end/src/fasta/kernel/kernel_shadow_ast.dart': Failed assertion: line 441 pos 16: 'identical(combiner.arguments.positional[0], rhs)': is not true.
+call_function_apply_test: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
call_non_method_field_test/01: MissingCompileTimeError
call_non_method_field_test/02: MissingCompileTimeError
-canonical_const2_test: RuntimeError
+canonical_const2_test: RuntimeError, OK # non JS number semantics
+cha_deopt1_test: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+cha_deopt2_test: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+cha_deopt3_test: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
check_member_static_test/01: MissingCompileTimeError
check_member_static_test/02: MissingCompileTimeError
class_cycle_test/02: MissingCompileTimeError
@@ -1466,10 +1276,14 @@
class_literal_static_test/01: MissingCompileTimeError
class_literal_static_test/03: MissingCompileTimeError
class_literal_static_test/07: MissingCompileTimeError
+classes_static_method_clash_test: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+closure_cycles_test: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
closure_invoked_through_interface_target_field_test: MissingCompileTimeError
closure_invoked_through_interface_target_getter_test: MissingCompileTimeError
closure_self_reference_test: Crash # 'file:*/pkg/compiler/lib/src/ssa/nodes.dart': Failed assertion: line 641 pos 12: 'isClosed()': is not true.
closure_type_test: RuntimeError
+compile_time_constant_a_test: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+compile_time_constant_b_test: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
compile_time_constant_d_test: CompileTimeError
compile_time_constant_e_test: CompileTimeError
compile_time_constant_k_test/01: MissingCompileTimeError
@@ -1498,10 +1312,11 @@
const_map2_test/00: MissingCompileTimeError
const_map3_test/00: MissingCompileTimeError
const_map4_test: RuntimeError
+const_map_test: RuntimeError
const_redirecting_factory_test: CompileTimeError
const_switch2_test/01: MissingCompileTimeError
-const_switch_test/02: RuntimeError
-const_switch_test/04: RuntimeError
+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/34: MissingCompileTimeError
const_types_test/39: MissingCompileTimeError
constants_test/05: MissingCompileTimeError
@@ -1524,7 +1339,9 @@
covariant_subtyping_unsafe_call2_test: RuntimeError
covariant_subtyping_unsafe_call3_test: RuntimeError
ct_const_test: CompileTimeError
+custom_await_stack_trace_test: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
cyclic_constructor_test/01: Crash # Issue 30856
+cyclic_default_values_test: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
cyclic_type_variable_test/01: MissingCompileTimeError
cyclic_type_variable_test/02: MissingCompileTimeError
cyclic_type_variable_test/03: MissingCompileTimeError
@@ -1533,18 +1350,45 @@
cyclic_typedef_test/11: Crash # Stack Overflow
default_factory2_test/01: MissingCompileTimeError
default_factory_test/01: MissingCompileTimeError
-deferred_constraints_constants_test/none: RuntimeError
-deferred_constraints_constants_test/reference_after_load: RuntimeError
+deferred_closurize_load_library_test: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+deferred_constant_list_test: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+deferred_constraints_constants_test/default_argument2: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+deferred_constraints_constants_test/none: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+deferred_constraints_constants_test/reference_after_load: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+deferred_constraints_type_annotation_test/new: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+deferred_constraints_type_annotation_test/new_generic1: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+deferred_constraints_type_annotation_test/none: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+deferred_constraints_type_annotation_test/static_method: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+deferred_constraints_type_annotation_test/type_annotation_non_deferred: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+deferred_function_type_test: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+deferred_global_test: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+deferred_import_core_test: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
deferred_inheritance_constraints_test/extends: MissingCompileTimeError
deferred_inheritance_constraints_test/implements: MissingCompileTimeError
deferred_inheritance_constraints_test/mixin: MissingCompileTimeError
deferred_inheritance_constraints_test/redirecting_constructor: MissingCompileTimeError
+deferred_inlined_test: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+deferred_load_constants_test/none: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+deferred_load_inval_code_test: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
deferred_load_library_wrong_args_test/01: CompileTimeError
-deferred_not_loaded_check_test: RuntimeError
-deferred_redirecting_factory_test: RuntimeError
+deferred_load_library_wrong_args_test/none: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+deferred_mixin_test: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+deferred_no_such_method_test: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+deferred_not_loaded_check_test: RuntimeError # Test out of date. Issue 31933
+deferred_only_constant_test: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+deferred_optimized_test: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+deferred_redirecting_factory_test: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+deferred_regression_22995_test: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+deferred_regression_28678_test: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+deferred_shadow_load_library_test: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
deferred_shared_and_unshared_classes_test: CompileTimeError
-deferred_type_dependency_test/type_annotation: RuntimeError
-double_int_to_string_test: RuntimeError
+deferred_static_seperate_test: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+deferred_super_dependency_test/none: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+deferred_type_dependency_test/as: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+deferred_type_dependency_test/is: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+deferred_type_dependency_test/none: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+deferred_type_dependency_test/type_annotation: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+double_int_to_string_test: RuntimeError, OK # non JS number semantics
duplicate_export_negative_test: Fail
duplicate_implements_test/01: MissingCompileTimeError
duplicate_implements_test/02: MissingCompileTimeError
@@ -1552,13 +1396,13 @@
emit_const_fields_test: CompileTimeError
enum_mirror_test: RuntimeError
example_constructor_test: RuntimeError
-expect_test: RuntimeError
+expect_test: RuntimeError, OK # Issue 13080
external_test/10: MissingRuntimeError
external_test/13: MissingRuntimeError
external_test/20: MissingRuntimeError
external_test/21: CompileTimeError
external_test/24: CompileTimeError
-extract_type_arguments_test: RuntimeError
+extract_type_arguments_test: RuntimeError # Issue 31371
f_bounded_quantification_test/01: MissingCompileTimeError
f_bounded_quantification_test/02: MissingCompileTimeError
factory2_test/03: MissingCompileTimeError
@@ -1577,14 +1421,23 @@
field_override4_test/02: MissingCompileTimeError
field_override_test/00: MissingCompileTimeError
field_override_test/01: MissingCompileTimeError
-flatten_test/05: MissingRuntimeError
-flatten_test/08: MissingRuntimeError
-flatten_test/09: MissingRuntimeError
-flatten_test/12: MissingRuntimeError
-full_stacktrace1_test: RuntimeError
-full_stacktrace2_test: RuntimeError
-full_stacktrace3_test: RuntimeError
-function_subtype2_test: RuntimeError
+flatten_test/01: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+flatten_test/02: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+flatten_test/03: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+flatten_test/04: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+flatten_test/05: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+flatten_test/06: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+flatten_test/07: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+flatten_test/08: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+flatten_test/09: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+flatten_test/10: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+flatten_test/11: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+flatten_test/12: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+flatten_test/none: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+full_stacktrace1_test: RuntimeError # Issue 12698
+full_stacktrace2_test: RuntimeError # Issue 12698
+full_stacktrace3_test: RuntimeError # Issue 12698
+function_subtype2_test: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
function_subtype3_test: RuntimeError
function_subtype_bound_closure2_test: RuntimeError
function_subtype_bound_closure3_test: RuntimeError
@@ -1592,7 +1445,7 @@
function_subtype_bound_closure5_test: RuntimeError
function_subtype_bound_closure5a_test: RuntimeError
function_subtype_bound_closure6_test: RuntimeError
-function_subtype_bound_closure7_test: Crash # Assertion failure: kind=special,memberName=instantiate,callStructure:CallStructure(arity=0, types=1)
+function_subtype_bound_closure7_test: RuntimeError
function_subtype_call1_test: RuntimeError
function_subtype_call2_test: RuntimeError
function_subtype_cast1_test: RuntimeError
@@ -1600,9 +1453,12 @@
function_subtype_closure0_test: RuntimeError
function_subtype_closure1_test: RuntimeError
function_subtype_factory1_test: RuntimeError
+function_subtype_inline0_test: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
function_subtype_inline1_test: RuntimeError
function_subtype_inline2_test: RuntimeError
function_subtype_local2_test: RuntimeError
+function_subtype_local3_test: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+function_subtype_local4_test: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
function_subtype_local5_test: RuntimeError
function_subtype_not1_test: RuntimeError
function_subtype_optional1_test: RuntimeError
@@ -1611,23 +1467,25 @@
function_subtype_setter0_test: RuntimeError
function_subtype_simple2_test: RuntimeError
function_subtype_typearg5_test: RuntimeError
-function_type2_test: RuntimeError
+function_type2_test: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
function_type_alias2_test: RuntimeError
function_type_alias4_test: RuntimeError
function_type_alias_test: RuntimeError
function_type_call_getter2_test/none: RuntimeError
function_type_test: RuntimeError
-generic_async_star_test: RuntimeError
+generic_async_star_test: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+generic_async_test: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
generic_closure_test/01: RuntimeError
-generic_closure_test/none: RuntimeError
+generic_closure_test/none: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
generic_field_mixin6_test/none: RuntimeError
generic_function_bounds_test: RuntimeError
-generic_function_dcall_test: Crash # Unsupported operation: Unsupported type parameter type node T.
+generic_function_dcall_test: RuntimeError
generic_function_type_as_type_argument_test/01: MissingCompileTimeError
generic_function_type_as_type_argument_test/02: MissingCompileTimeError
generic_function_type_as_type_argument_test/03: RuntimeError
generic_function_type_within_type_argument_test: RuntimeError
generic_function_typedef_test/01: RuntimeError
+generic_functions_test: Crash # Stack Overflow
generic_instanceof2_test: RuntimeError
generic_instanceof_test: RuntimeError
generic_is_check_test: RuntimeError
@@ -1643,14 +1501,15 @@
generic_methods_recursive_bound_test/02: MissingCompileTimeError
generic_methods_recursive_bound_test/03: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/metadata_collector.dart': Failed assertion: line 100 pos 12: 'isBound': is not true.
generic_methods_simple_as_expression_test/02: MissingRuntimeError
-generic_methods_tearoff_specialization_test: Crash # Assertion failure: kind=special,memberName=instantiate,callStructure:CallStructure(arity=0, types=1)
+generic_methods_tearoff_specialization_test: RuntimeError
+generic_methods_test: Crash # Stack Overflow
generic_methods_type_expression_test: RuntimeError
generic_methods_unused_parameter_test: Crash # Assertion failure: kind=special,memberName=instantiate,callStructure:CallStructure(arity=0, types=1)
generic_no_such_method_dispatcher_simple_test: CompileTimeError
generic_no_such_method_dispatcher_test: CompileTimeError
generic_tearoff_test: CompileTimeError
generic_test: RuntimeError
-generic_typedef_test: RuntimeError
+generic_typedef_test: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
getter_override2_test/02: MissingCompileTimeError
getter_override_test/00: MissingCompileTimeError
getter_override_test/01: MissingCompileTimeError
@@ -1658,7 +1517,7 @@
getter_override_test/03: MissingCompileTimeError
getters_setters2_test/01: RuntimeError
getters_setters2_test/none: RuntimeError
-identical_closure2_test: RuntimeError
+identical_closure2_test: RuntimeError # non JS number semantics
identical_const_test/01: MissingCompileTimeError
identical_const_test/02: MissingCompileTimeError
identical_const_test/03: MissingCompileTimeError
@@ -1670,7 +1529,7 @@
implicit_this_test/01: MissingCompileTimeError
implicit_this_test/04: MissingCompileTimeError
inferrer_synthesized_constructor_test: RuntimeError
-infinity_test: RuntimeError
+infinity_test: RuntimeError # non JS number semantics - Issue 4984
initializing_formal_type_annotation_test/01: MissingCompileTimeError
initializing_formal_type_annotation_test/02: MissingCompileTimeError
instance_creation_in_function_annotation_test: RuntimeError
@@ -1687,20 +1546,21 @@
int64_literal_test/30: MissingCompileTimeError
int64_literal_test/40: RuntimeError
int64_literal_test/none: RuntimeError
-integer_division_by_zero_test: RuntimeError
+integer_division_by_zero_test: RuntimeError # Issue 8301
internal_library_test/02: Crash # type 'DillLibraryBuilder' is not a subtype of type 'SourceLibraryBuilder<KernelTypeBuilder, Library>' of 'value' where
-invocation_mirror2_test: RuntimeError
+invocation_mirror2_test: RuntimeError # mirrors not supported
invocation_mirror_invoke_on2_test: RuntimeError
invocation_mirror_invoke_on_test: RuntimeError
issue18628_2_test/01: MissingCompileTimeError
issue21079_test: RuntimeError
-issue23244_test: RuntimeError
+issue23244_test: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
issue31596_override_test/07: MissingCompileTimeError
issue31596_override_test/08: MissingCompileTimeError
issue31596_super_test/01: CompileTimeError
issue31596_super_test/03: CompileTimeError
-known_identifier_usage_error_test/none: RuntimeError
-left_shift_test: RuntimeError
+issue_1751477_test: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+known_identifier_usage_error_test/none: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+left_shift_test: RuntimeError # non JS number semantics
library_env_test/has_mirror_support: RuntimeError
library_env_test/has_no_html_support: RuntimeError
library_env_test/has_no_io_support: RuntimeError
@@ -1708,10 +1568,19 @@
local_function2_test/none: RuntimeError
local_function3_test/none: RuntimeError
local_function_test/none: RuntimeError
-main_test/03: RuntimeError
-main_test/20: RuntimeError
-main_test/22: RuntimeError
-main_test/44: RuntimeError
+main_test/01: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+main_test/02: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+main_test/03: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+main_test/04: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+main_test/05: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+main_test/20: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+main_test/21: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+main_test/22: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+main_test/41: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+main_test/42: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+main_test/43: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+main_test/44: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+main_test/45: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
malbounded_instantiation_test/01: MissingCompileTimeError
malbounded_instantiation_test/02: MissingCompileTimeError
malbounded_instantiation_test/03: MissingCompileTimeError
@@ -1729,6 +1598,7 @@
malbounded_type_test_test/01: MissingCompileTimeError
malbounded_type_test_test/02: MissingCompileTimeError
many_generic_instanceof_test: RuntimeError
+many_named_arguments_test: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
many_overridden_no_such_method_test: RuntimeError
map_literal11_test/none: MissingRuntimeError
map_literal3_test/01: MissingCompileTimeError
@@ -1743,7 +1613,7 @@
method_override8_test/03: MissingCompileTimeError
method_override_test: CompileTimeError
minify_closure_variable_collision_test: CompileTimeError
-mint_arithmetic_test: RuntimeError
+mint_arithmetic_test: RuntimeError # non JS number semantics
mixin_forwarding_constructor4_test/01: MissingCompileTimeError
mixin_forwarding_constructor4_test/02: MissingCompileTimeError
mixin_forwarding_constructor4_test/03: MissingCompileTimeError
@@ -1841,7 +1711,7 @@
mixin_type_parameters_errors_test/03: MissingCompileTimeError
mixin_type_parameters_errors_test/04: MissingCompileTimeError
mixin_type_parameters_errors_test/05: MissingCompileTimeError
-modulo_test: RuntimeError
+modulo_test: RuntimeError # non JS number semantics
multiline_newline_test/04: MissingCompileTimeError
multiline_newline_test/04r: MissingCompileTimeError
multiline_newline_test/05: MissingCompileTimeError
@@ -1851,7 +1721,7 @@
named_constructor_test/01: MissingCompileTimeError
named_parameters_default_eq_test/02: MissingCompileTimeError
named_parameters_default_eq_test/none: RuntimeError
-nan_identical_test: RuntimeError
+nan_identical_test: RuntimeError # Issue 11551
nested_generic_closure_test: RuntimeError
no_main_test/01: CompileTimeError
no_such_method_mock_test: RuntimeError
@@ -1862,7 +1732,7 @@
null_test/mirrors: RuntimeError
null_test/none: RuntimeError
number_identity2_test: RuntimeError
-numbers_test: RuntimeError
+numbers_test: RuntimeError, OK # non JS number semantics
operator2_negative_test: Crash # 'file:*/pkg/compiler/lib/src/kernel/env.dart': Failed assertion: line 322 pos 16: '!name.contains('#')': is not true.
operator4_test: RuntimeError
operator_test: Crash # 'package:front_end/src/fasta/kernel/kernel_shadow_ast.dart': Failed assertion: line 441 pos 16: 'identical(combiner.arguments.positional[0], rhs)': is not true.
@@ -1936,16 +1806,31 @@
redirecting_factory_infinite_steps_test/01: MissingCompileTimeError
redirecting_factory_malbounded_test/01: MissingCompileTimeError
redirecting_factory_reflection_test: RuntimeError
+reg_exp_test: RuntimeError
regress_13462_1_test: RuntimeError
regress_18535_test: RuntimeError
+regress_22443_test: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+regress_22445_test: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+regress_22579_test: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+regress_22728_test: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+regress_22777_test: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
regress_23089_test: Crash # Stack Overflow
regress_23408_test: CompileTimeError
-regress_23996_test: RuntimeError
-regress_24283_test: RuntimeError
-regress_24935_test/none: RuntimeError
+regress_23498_test: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+regress_23500_test/01: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+regress_23500_test/02: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+regress_23500_test/none: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+regress_23996_test: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+regress_24283_test: RuntimeError # non JS number semantics
+regress_24935_test/01: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+regress_24935_test/none: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
regress_26175_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
+regress_26668_test: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+regress_26948_test: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
regress_27617_test/1: Crash # Assertion failure: Unexpected constructor j:constructor(Foo._) in ConstructorDataImpl._getConstructorConstant
+regress_27659_test: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
regress_28255_test: RuntimeError
+regress_28278_test: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
regress_29025_test: CompileTimeError
regress_29405_test: CompileTimeError
regress_29784_test/01: Crash # Assertion failure: Cannot find value Instance of 'ThisLocal' in () for j:constructor(A.ok).
@@ -1959,11 +1844,11 @@
setter_override_test/01: MissingCompileTimeError
setter_override_test/02: MissingCompileTimeError
setter_override_test/03: MissingCompileTimeError
-shadow_parameter_and_local_test: RuntimeError
+shadow_parameter_and_local_test: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
stacktrace_demangle_ctors_test: RuntimeError # Issue 12698
-stacktrace_rethrow_error_test/none: RuntimeError
-stacktrace_rethrow_error_test/withtraceparameter: RuntimeError
-stacktrace_rethrow_nonerror_test: RuntimeError
+stacktrace_rethrow_error_test/none: RuntimeError # Issue 12698
+stacktrace_rethrow_error_test/withtraceparameter: RuntimeError # Issue 12698
+stacktrace_rethrow_nonerror_test: RuntimeError # Issue 12698
stacktrace_test: RuntimeError # Issue 12698
string_interpolate_test: CompileTimeError
string_interpolation_and_buffer_test: RuntimeError
@@ -1972,6 +1857,12 @@
super_bound_closure_test/none: CompileTimeError
super_call4_test: CompileTimeError
super_getter_setter_test: CompileTimeError
+super_in_async1_test: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+super_in_async2_test: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+super_in_async3_test: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+super_in_async4_test: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+super_in_async5_test: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+super_in_async6_test: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
super_no_such_method1_test: CompileTimeError
super_no_such_method2_test: CompileTimeError
super_no_such_method3_test: CompileTimeError
@@ -1989,6 +1880,8 @@
switch_case_test/02: MissingCompileTimeError
sync_generator2_test/41: Crash # 'file:*/pkg/compiler/lib/src/kernel/element_map_impl.dart': Failed assertion: line 939 pos 18: 'asyncMarker == AsyncMarker.SYNC': is not true.
sync_generator2_test/52: Crash # 'file:*/pkg/compiler/lib/src/kernel/element_map_impl.dart': Failed assertion: line 939 pos 18: 'asyncMarker == AsyncMarker.SYNC': is not true.
+sync_generator2_test/none: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+syncstar_yieldstar_test: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
syntax_test/04: Crash # 'file:*/pkg/compiler/lib/src/kernel/env.dart': Failed assertion: line 322 pos 16: '!name.contains('#')': is not true.
syntax_test/05: Crash # 'file:*/pkg/compiler/lib/src/kernel/env.dart': Failed assertion: line 322 pos 16: '!name.contains('#')': is not true.
syntax_test/06: Crash # 'file:*/pkg/compiler/lib/src/kernel/env.dart': Failed assertion: line 322 pos 16: '!name.contains('#')': is not true.
@@ -2018,7 +1911,7 @@
syntax_test/32: MissingCompileTimeError
syntax_test/33: MissingCompileTimeError
tearoff_dynamic_test: RuntimeError
-truncdiv_test: RuntimeError
+truncdiv_test: RuntimeError # non JS number semantics - Issue 15246
try_catch_test/01: MissingCompileTimeError
type_error_test: RuntimeError
type_literal_prefix_call_test/00: MissingCompileTimeError
@@ -2045,9 +1938,12 @@
type_variable_bounds_test/06: MissingCompileTimeError
type_variable_bounds_test/08: MissingCompileTimeError
type_variable_bounds_test/11: MissingCompileTimeError
+type_variable_closure_test: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+type_variable_function_type_test: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
type_variable_promotion_test: RuntimeError
typedef_is_test: RuntimeError
typevariable_substitution2_test/02: RuntimeError
+unused_overridden_async_test: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
vm/async_await_catch_stacktrace_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
vm/await_synchronous_future_test: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
vm/causal_async_exception_stack2_test: Crash # Assertion failure: Unexpected arguments. Expected 1 argument, actual: [invoke dynamic method: selector=Selector(operator, *, arity=1), mask=[subclass=JSUInt32], HTypeInfoReadVariable(ListQueue.E)].
@@ -2055,18 +1951,22 @@
vm/debug_break_enabled_vm_test/01: CompileTimeError
vm/debug_break_enabled_vm_test/none: CompileTimeError
vm/integer_type_propagation_test: RuntimeError
+vm/load_to_load_forwarding_vm_test: RuntimeError
+vm/load_to_load_unaligned_forwarding_vm_test: RuntimeError
vm/math_vm_test: RuntimeError
vm/no_such_args_error_message_vm_test: RuntimeError
vm/no_such_method_error_message_callable_vm_test: RuntimeError
vm/no_such_method_error_message_vm_test: RuntimeError
vm/optimization_test: RuntimeError
+vm/optimized_await_regress_test: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
vm/optimized_guarded_field_isolates_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
vm/optimized_list_constructor_test: RuntimeError
vm/reflect_core_vm_test: RuntimeError
vm/regress_22480_test: RuntimeError
vm/regress_23238_test: RuntimeError
vm/regress_27201_test: CompileTimeError
-vm/regress_28325_test: RuntimeError
+vm/regress_28325_test: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
+vm/regress_29145_test: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
vm/store_to_load_forwarding_phis_vm_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
vm/type_cast_vm_test: RuntimeError
vm/type_vm_test/28: MissingRuntimeError
@@ -2116,9 +2016,9 @@
void_type_usage_test/paren_null_equals2: Crash # 'package:front_end/src/fasta/type_inference/type_schema_environment.dart': Failed assertion: line 214 pos 12: 'false': is not true.
wrong_number_type_arguments_test/01: MissingCompileTimeError
wrong_number_type_arguments_test/none: Pass
-yieldstar_pause_test: RuntimeError
+yieldstar_pause_test: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart': Failed assertion: line 208 pos 18: '!(_useKernel && _strongMode && !_disableRtiOptimization) ||
-[ $compiler == dart2js && $dart2js_with_kernel && $minified && $strong ]
+[ $compiler == dart2js && $fasta && $minified && $strong ]
abstract_factory_constructor_test/00: MissingCompileTimeError
abstract_getter_test/01: MissingCompileTimeError
abstract_override_adds_optional_args_concrete_subclass_test: MissingCompileTimeError
@@ -2132,56 +2032,113 @@
assertion_initializer_const_error2_test/none: CompileTimeError
assertion_initializer_test: CompileTimeError
assertion_test: RuntimeError
+async_and_or_test: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+async_await_catch_regression_test: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
async_await_foreign_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_await_syntax_test/a06a: RuntimeError
-async_await_syntax_test/b06a: RuntimeError
-async_await_syntax_test/c06a: RuntimeError
-async_await_syntax_test/c10a: MissingCompileTimeError
-async_await_syntax_test/d06a: RuntimeError
+async_await_syntax_test/a01a: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+async_await_syntax_test/a02a: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+async_await_syntax_test/a03a: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+async_await_syntax_test/a03b: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+async_await_syntax_test/a05a: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+async_await_syntax_test/a05b: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+async_await_syntax_test/a06a: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+async_await_syntax_test/a09a: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+async_await_syntax_test/a11c: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+async_await_syntax_test/a11d: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+async_await_syntax_test/a12g: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+async_await_syntax_test/b01a: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+async_await_syntax_test/b02a: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+async_await_syntax_test/b03a: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+async_await_syntax_test/b05a: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+async_await_syntax_test/b06a: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+async_await_syntax_test/b09a: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+async_await_syntax_test/b11c: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+async_await_syntax_test/b11d: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+async_await_syntax_test/b12g: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+async_await_syntax_test/c01a: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+async_await_syntax_test/c02a: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+async_await_syntax_test/c03a: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+async_await_syntax_test/c05a: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+async_await_syntax_test/c06a: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+async_await_syntax_test/c09a: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+async_await_syntax_test/c10a: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+async_await_syntax_test/d01a: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+async_await_syntax_test/d02a: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+async_await_syntax_test/d03a: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+async_await_syntax_test/d05a: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+async_await_syntax_test/d06a: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
async_await_syntax_test/d08b: MissingCompileTimeError
-async_await_syntax_test/d10a: MissingCompileTimeError
+async_await_syntax_test/d09a: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+async_await_syntax_test/d10a: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
async_await_test/02: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
async_await_test/03: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
async_await_test/none: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_congruence_local_test/none: RuntimeError
-async_congruence_method_test/none: RuntimeError
-async_congruence_top_level_test: RuntimeError
-async_congruence_unnamed_test/none: RuntimeError
+async_break_in_finally_test: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+async_call_test: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+async_cascade_test: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+async_congruence_local_test/none: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+async_congruence_method_test/none: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+async_congruence_top_level_test: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+async_congruence_unnamed_test/none: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+async_continue_label_test/await_in_body: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+async_continue_label_test/await_in_condition: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+async_continue_label_test/await_in_init: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+async_continue_label_test/await_in_update: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+async_continue_label_test/none: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+async_control_structures_test: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
async_error_timing_test: RuntimeError
+async_finally_rethrow_test: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
async_or_generator_return_type_stacktrace_test/01: MissingCompileTimeError
async_or_generator_return_type_stacktrace_test/02: MissingCompileTimeError
async_or_generator_return_type_stacktrace_test/03: MissingCompileTimeError
-async_return_types_test/nestedFuture: MissingCompileTimeError
-async_return_types_test/none: RuntimeError
-async_return_types_test/tooManyTypeParameters: MissingCompileTimeError
-async_return_types_test/wrongReturnType: MissingCompileTimeError
+async_regression_23058_test: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+async_rethrow_test: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+async_return_types_test/nestedFuture: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+async_return_types_test/none: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+async_return_types_test/tooManyTypeParameters: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+async_return_types_test/wrongReturnType: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
async_star_await_pauses_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_star_cancel_and_throw_in_finally_test: RuntimeError
-async_star_cancel_while_paused_test: RuntimeError
-async_star_no_cancel2_test: RuntimeError
-async_star_no_cancel_test: RuntimeError
-async_star_pause_test: RuntimeError
+async_star_cancel_and_throw_in_finally_test: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+async_star_cancel_while_paused_test: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+async_star_no_cancel2_test: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+async_star_no_cancel_test: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+async_star_pause_test: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
async_star_regression_2238_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_star_regression_23116_test: RuntimeError
-async_star_regression_fisk_test: RuntimeError
+async_star_regression_23116_test: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+async_star_regression_fisk_test: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
async_star_stream_take_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-async_star_take_reyield_test: RuntimeError
+async_star_take_reyield_test: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
async_star_test/01: Crash # Wrong number of template arguments, given 2, expected 1
async_star_test/02: Crash # Wrong number of template arguments, given 2, expected 1
async_star_test/03: Crash # Wrong number of template arguments, given 2, expected 1
async_star_test/04: Crash # Wrong number of template arguments, given 2, expected 1
async_star_test/05: Crash # Wrong number of template arguments, given 2, expected 1
async_star_test/none: Crash # Wrong number of template arguments, given 2, expected 1
+async_switch_test/none: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+async_switch_test/withDefault: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
async_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-asyncstar_concat_test: RuntimeError
+async_this_bound_test: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+async_throw_in_catch_test/forceAwait: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+async_throw_in_catch_test/none: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+asyncstar_concat_test: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
asyncstar_throw_in_catch_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-asyncstar_yield_test: RuntimeError
-asyncstar_yieldstar_test: RuntimeError
-await_for_cancel_test: RuntimeError
+asyncstar_yield_test: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+asyncstar_yieldstar_test: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+await_and_ifnull_test: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+await_backwards_compatibility_test/none: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+await_exceptions_test: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+await_for_cancel_test: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
await_for_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-await_for_use_local_test: RuntimeError
+await_for_use_local_test: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+await_future_test: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+await_in_cascade_test: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+await_nonfuture_test: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
await_not_started_immediately_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
-await_test: RuntimeError
+await_null_aware_test: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+await_postfix_expr_test: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+await_regression_test: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+await_started_immediately_test: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+await_test: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
bad_override_test/01: MissingCompileTimeError
bad_override_test/02: MissingCompileTimeError
bad_override_test/03: MissingCompileTimeError
@@ -2194,7 +2151,10 @@
branch_canonicalization_test: RuntimeError
call_non_method_field_test/01: MissingCompileTimeError
call_non_method_field_test/02: MissingCompileTimeError
-canonical_const2_test: RuntimeError
+canonical_const2_test: RuntimeError, OK # non JS number semantics
+cha_deopt1_test: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+cha_deopt2_test: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+cha_deopt3_test: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
check_member_static_test/01: MissingCompileTimeError
check_member_static_test/02: MissingCompileTimeError
class_cycle_test/02: MissingCompileTimeError
@@ -2233,10 +2193,11 @@
const_map2_test/00: MissingCompileTimeError
const_map3_test/00: MissingCompileTimeError
const_map4_test: RuntimeError
+const_map_test: RuntimeError
const_redirecting_factory_test: CompileTimeError
const_switch2_test/01: MissingCompileTimeError
-const_switch_test/02: RuntimeError
-const_switch_test/04: RuntimeError
+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/34: MissingCompileTimeError
const_types_test/39: MissingCompileTimeError
constants_test/05: MissingCompileTimeError
@@ -2259,6 +2220,7 @@
covariant_subtyping_unsafe_call2_test: RuntimeError
covariant_subtyping_unsafe_call3_test: RuntimeError
ct_const_test: CompileTimeError
+custom_await_stack_trace_test: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
cyclic_constructor_test/01: Crash # Issue 30856
cyclic_type_variable_test/01: MissingCompileTimeError
cyclic_type_variable_test/02: MissingCompileTimeError
@@ -2268,18 +2230,45 @@
cyclic_typedef_test/11: Crash # Stack Overflow
default_factory2_test/01: MissingCompileTimeError
default_factory_test/01: MissingCompileTimeError
-deferred_constraints_constants_test/none: RuntimeError
-deferred_constraints_constants_test/reference_after_load: RuntimeError
+deferred_closurize_load_library_test: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+deferred_constant_list_test: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+deferred_constraints_constants_test/default_argument2: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+deferred_constraints_constants_test/none: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+deferred_constraints_constants_test/reference_after_load: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+deferred_constraints_type_annotation_test/new: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+deferred_constraints_type_annotation_test/new_generic1: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+deferred_constraints_type_annotation_test/none: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+deferred_constraints_type_annotation_test/static_method: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+deferred_constraints_type_annotation_test/type_annotation_non_deferred: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+deferred_function_type_test: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+deferred_global_test: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+deferred_import_core_test: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
deferred_inheritance_constraints_test/extends: MissingCompileTimeError
deferred_inheritance_constraints_test/implements: MissingCompileTimeError
deferred_inheritance_constraints_test/mixin: MissingCompileTimeError
deferred_inheritance_constraints_test/redirecting_constructor: MissingCompileTimeError
+deferred_inlined_test: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+deferred_load_constants_test/none: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+deferred_load_inval_code_test: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
deferred_load_library_wrong_args_test/01: CompileTimeError
-deferred_not_loaded_check_test: RuntimeError
-deferred_redirecting_factory_test: RuntimeError
+deferred_load_library_wrong_args_test/none: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+deferred_mixin_test: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+deferred_no_such_method_test: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+deferred_not_loaded_check_test: RuntimeError # Test out of date. Issue 31933
+deferred_only_constant_test: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+deferred_optimized_test: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+deferred_redirecting_factory_test: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+deferred_regression_22995_test: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+deferred_regression_28678_test: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+deferred_shadow_load_library_test: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
deferred_shared_and_unshared_classes_test: CompileTimeError
-deferred_type_dependency_test/type_annotation: RuntimeError
-double_int_to_string_test: RuntimeError
+deferred_static_seperate_test: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+deferred_super_dependency_test/none: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+deferred_type_dependency_test/as: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+deferred_type_dependency_test/is: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+deferred_type_dependency_test/none: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+deferred_type_dependency_test/type_annotation: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+double_int_to_string_test: RuntimeError, OK # non JS number semantics
duplicate_export_negative_test: Fail
duplicate_implements_test/01: MissingCompileTimeError
duplicate_implements_test/02: MissingCompileTimeError
@@ -2287,14 +2276,14 @@
emit_const_fields_test: CompileTimeError
enum_mirror_test: RuntimeError
example_constructor_test: RuntimeError
-expect_test: RuntimeError
+expect_test: RuntimeError, OK # Issue 13080
external_test/10: MissingRuntimeError
external_test/13: MissingRuntimeError
external_test/20: MissingRuntimeError
external_test/21: CompileTimeError
external_test/24: CompileTimeError
-extract_type_arguments_test: RuntimeError
-f_bounded_quantification4_test: RuntimeError
+extract_type_arguments_test: RuntimeError # Issue 31371
+f_bounded_quantification4_test: RuntimeError # Issue 12605
f_bounded_quantification_test/01: MissingCompileTimeError
f_bounded_quantification_test/02: MissingCompileTimeError
factory2_test/03: MissingCompileTimeError
@@ -2313,10 +2302,19 @@
field_override4_test/02: MissingCompileTimeError
field_override_test/00: MissingCompileTimeError
field_override_test/01: MissingCompileTimeError
-flatten_test/05: MissingRuntimeError
-flatten_test/08: MissingRuntimeError
-flatten_test/09: MissingRuntimeError
-flatten_test/12: MissingRuntimeError
+flatten_test/01: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+flatten_test/02: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+flatten_test/03: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+flatten_test/04: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+flatten_test/05: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+flatten_test/06: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+flatten_test/07: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+flatten_test/08: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+flatten_test/09: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+flatten_test/10: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+flatten_test/11: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+flatten_test/12: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+flatten_test/none: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
full_stacktrace1_test: RuntimeError # Issue 12698
full_stacktrace2_test: RuntimeError # Issue 12698
full_stacktrace3_test: RuntimeError # Issue 12698
@@ -2353,7 +2351,8 @@
function_type_alias_test: RuntimeError
function_type_call_getter2_test/none: RuntimeError
function_type_test: RuntimeError
-generic_async_star_test: RuntimeError
+generic_async_star_test: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+generic_async_test: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
generic_field_mixin6_test/none: RuntimeError
generic_function_bounds_test: RuntimeError
generic_function_dcall_test: RuntimeError
@@ -2362,6 +2361,7 @@
generic_function_type_as_type_argument_test/03: RuntimeError
generic_function_type_within_type_argument_test: RuntimeError
generic_function_typedef_test/01: RuntimeError
+generic_functions_test: Crash # Stack Overflow
generic_instanceof2_test: RuntimeError
generic_instanceof_test: RuntimeError
generic_is_check_test: RuntimeError
@@ -2378,8 +2378,9 @@
generic_methods_recursive_bound_test/03: Crash # NoSuchMethodError: The method 'markSeen' was called on null.
generic_methods_simple_as_expression_test/02: MissingRuntimeError
generic_methods_tearoff_specialization_test: RuntimeError
+generic_methods_test: Crash # Stack Overflow
generic_methods_type_expression_test: RuntimeError
-generic_methods_unused_parameter_test: Crash # Interpolated value #1 is not an Expression or List of Expressions: [Instance of 'LiteralNull', null]
+generic_methods_unused_parameter_test: RuntimeError
generic_no_such_method_dispatcher_simple_test: CompileTimeError
generic_no_such_method_dispatcher_test: CompileTimeError
generic_tearoff_test: CompileTimeError
@@ -2391,7 +2392,7 @@
getter_override_test/03: MissingCompileTimeError
getters_setters2_test/01: RuntimeError
getters_setters2_test/none: RuntimeError
-identical_closure2_test: RuntimeError
+identical_closure2_test: RuntimeError # non JS number semantics
identical_const_test/01: MissingCompileTimeError
identical_const_test/02: MissingCompileTimeError
identical_const_test/03: MissingCompileTimeError
@@ -2403,7 +2404,7 @@
implicit_this_test/01: MissingCompileTimeError
implicit_this_test/04: MissingCompileTimeError
inferrer_synthesized_constructor_test: RuntimeError
-infinity_test: RuntimeError
+infinity_test: RuntimeError # non JS number semantics - Issue 4984
initializing_formal_type_annotation_test/01: MissingCompileTimeError
initializing_formal_type_annotation_test/02: MissingCompileTimeError
instance_creation_in_function_annotation_test: RuntimeError
@@ -2418,21 +2419,22 @@
int64_literal_test/30: MissingCompileTimeError
int64_literal_test/40: RuntimeError
int64_literal_test/none: RuntimeError
-integer_division_by_zero_test: RuntimeError
+integer_division_by_zero_test: RuntimeError # Issue 8301
internal_library_test/02: Crash # NoSuchMethodError: Class 'DillLibraryBuilder' has no instance getter 'mixinApplicationClasses'.
-invocation_mirror2_test: RuntimeError
+invocation_mirror2_test: RuntimeError # mirrors not supported
invocation_mirror_invoke_on2_test: RuntimeError
invocation_mirror_invoke_on_test: RuntimeError
invocation_mirror_test: RuntimeError
issue18628_2_test/01: MissingCompileTimeError
issue21079_test: RuntimeError
-issue23244_test: RuntimeError
+issue23244_test: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
issue31596_override_test/07: MissingCompileTimeError
issue31596_override_test/08: MissingCompileTimeError
issue31596_super_test/01: CompileTimeError
issue31596_super_test/03: CompileTimeError
-known_identifier_usage_error_test/none: RuntimeError
-left_shift_test: RuntimeError
+issue_1751477_test: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+known_identifier_usage_error_test/none: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+left_shift_test: RuntimeError # non JS number semantics
library_env_test/has_mirror_support: RuntimeError
library_env_test/has_no_html_support: RuntimeError
library_env_test/has_no_io_support: RuntimeError
@@ -2475,11 +2477,11 @@
method_override8_test/03: MissingCompileTimeError
method_override_test: CompileTimeError
minify_closure_variable_collision_test: CompileTimeError
-mint_arithmetic_test: RuntimeError
+mint_arithmetic_test: RuntimeError # non JS number semantics
mixin_forwarding_constructor4_test/01: MissingCompileTimeError
mixin_forwarding_constructor4_test/02: MissingCompileTimeError
mixin_forwarding_constructor4_test/03: MissingCompileTimeError
-mixin_generic_test: RuntimeError
+mixin_generic_test: RuntimeError # Issue 12605
mixin_illegal_super_use_test/01: MissingCompileTimeError
mixin_illegal_super_use_test/04: MissingCompileTimeError
mixin_illegal_super_use_test/07: MissingCompileTimeError
@@ -2576,8 +2578,8 @@
mixin_type_parameters_errors_test/04: MissingCompileTimeError
mixin_type_parameters_errors_test/05: MissingCompileTimeError
mock_writable_final_field_test: RuntimeError # Issue 30847
-mock_writable_final_private_field_test: RuntimeError # Issue 30847
-modulo_test: RuntimeError
+mock_writable_final_private_field_test: RuntimeError # Issue 17526, 30847
+modulo_test: RuntimeError # non JS number semantics
multiline_newline_test/04: MissingCompileTimeError
multiline_newline_test/04r: MissingCompileTimeError
multiline_newline_test/05: MissingCompileTimeError
@@ -2587,7 +2589,7 @@
named_constructor_test/01: MissingCompileTimeError
named_parameters_default_eq_test/02: MissingCompileTimeError
named_parameters_default_eq_test/none: RuntimeError
-nan_identical_test: RuntimeError
+nan_identical_test: RuntimeError # Issue 11551
nested_generic_closure_test: RuntimeError
no_main_test/01: CompileTimeError
no_such_method_mock_test: RuntimeError
@@ -2599,7 +2601,7 @@
null_test/mirrors: RuntimeError
null_test/none: RuntimeError
number_identity2_test: RuntimeError
-numbers_test: RuntimeError
+numbers_test: RuntimeError, OK # non JS number semantics
operator4_test: RuntimeError
overridden_no_such_method_test: RuntimeError
override_field_method1_negative_test: Fail
@@ -2664,17 +2666,32 @@
redirecting_factory_infinite_steps_test/01: MissingCompileTimeError
redirecting_factory_malbounded_test/01: MissingCompileTimeError
redirecting_factory_reflection_test: RuntimeError
+reg_exp_test: RuntimeError
regress_13462_1_test: RuntimeError
regress_18535_test: RuntimeError
-regress_21795_test: RuntimeError
+regress_21795_test: RuntimeError # Issue 12605
+regress_22443_test: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+regress_22445_test: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+regress_22579_test: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+regress_22728_test: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+regress_22777_test: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
regress_23089_test: Crash # Stack Overflow
regress_23408_test: CompileTimeError
-regress_23996_test: RuntimeError
+regress_23498_test: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+regress_23500_test/01: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+regress_23500_test/02: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+regress_23500_test/none: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+regress_23996_test: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
regress_24283_test: RuntimeError, OK # Requires 64 bit numbers.
-regress_24935_test/none: RuntimeError
+regress_24935_test/01: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+regress_24935_test/none: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
regress_26175_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
+regress_26668_test: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+regress_26948_test: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
regress_27617_test/1: Crash # Assertion failure: Unexpected constructor j:constructor(Foo._) in ConstructorDataImpl._getConstructorConstant
+regress_27659_test: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
regress_28255_test: RuntimeError
+regress_28278_test: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
regress_29025_test: CompileTimeError
regress_29405_test: CompileTimeError
regress_29784_test/01: Crash # Issue 29784
@@ -2688,8 +2705,8 @@
setter_override_test/01: MissingCompileTimeError
setter_override_test/02: MissingCompileTimeError
setter_override_test/03: MissingCompileTimeError
-shadow_parameter_and_local_test: RuntimeError
-stack_trace_test: RuntimeError
+shadow_parameter_and_local_test: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+stack_trace_test: RuntimeError, OK # Stack trace not preserved in minified code.
stacktrace_demangle_ctors_test: RuntimeError # Issue 12698
stacktrace_rethrow_error_test/none: RuntimeError # Issue 12698
stacktrace_rethrow_error_test/withtraceparameter: RuntimeError # Issue 12698
@@ -2702,6 +2719,12 @@
super_bound_closure_test/none: CompileTimeError
super_call4_test: CompileTimeError
super_getter_setter_test: CompileTimeError
+super_in_async1_test: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+super_in_async2_test: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+super_in_async3_test: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+super_in_async4_test: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+super_in_async5_test: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+super_in_async6_test: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
super_no_such_method1_test: CompileTimeError
super_no_such_method2_test: CompileTimeError
super_no_such_method3_test: CompileTimeError
@@ -2717,7 +2740,9 @@
switch_case_test/00: MissingCompileTimeError
switch_case_test/01: MissingCompileTimeError
switch_case_test/02: MissingCompileTimeError
-symbol_conflict_test: RuntimeError
+symbol_conflict_test: RuntimeError # Issue 23857
+sync_generator2_test/none: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+syncstar_yieldstar_test: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
syntax_test/28: MissingCompileTimeError
syntax_test/29: MissingCompileTimeError
syntax_test/30: MissingCompileTimeError
@@ -2725,7 +2750,7 @@
syntax_test/32: MissingCompileTimeError
syntax_test/33: MissingCompileTimeError
tearoff_dynamic_test: RuntimeError
-truncdiv_test: RuntimeError
+truncdiv_test: RuntimeError # non JS number semantics - Issue 15246
try_catch_test/01: MissingCompileTimeError
type_error_test: RuntimeError
type_literal_prefix_call_test/00: MissingCompileTimeError
@@ -2755,6 +2780,7 @@
type_variable_promotion_test: RuntimeError
typedef_is_test: RuntimeError
typevariable_substitution2_test/02: RuntimeError
+unused_overridden_async_test: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
vm/async_await_catch_stacktrace_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
vm/await_synchronous_future_test: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
vm/causal_async_exception_stack2_test: Crash # Wrong number of template arguments, given 2, expected 1
@@ -2762,18 +2788,22 @@
vm/debug_break_enabled_vm_test/01: CompileTimeError
vm/debug_break_enabled_vm_test/none: CompileTimeError
vm/integer_type_propagation_test: RuntimeError
+vm/load_to_load_forwarding_vm_test: RuntimeError
+vm/load_to_load_unaligned_forwarding_vm_test: RuntimeError
vm/math_vm_test: RuntimeError
vm/no_such_args_error_message_vm_test: RuntimeError
vm/no_such_method_error_message_callable_vm_test: RuntimeError
vm/no_such_method_error_message_vm_test: RuntimeError
vm/optimization_test: RuntimeError
+vm/optimized_await_regress_test: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
vm/optimized_guarded_field_isolates_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
vm/optimized_list_constructor_test: RuntimeError
vm/reflect_core_vm_test: RuntimeError
vm/regress_22480_test: RuntimeError
vm/regress_23238_test: RuntimeError
vm/regress_27201_test: CompileTimeError
-vm/regress_28325_test: RuntimeError
+vm/regress_28325_test: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
+vm/regress_29145_test: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
vm/store_to_load_forwarding_phis_vm_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
vm/type_cast_vm_test: RuntimeError
vm/type_vm_test/28: MissingRuntimeError
@@ -2787,1028 +2817,13 @@
void_type_usage_test/conditional_return_to_void: MissingCompileTimeError
wrong_number_type_arguments_test/01: MissingCompileTimeError
wrong_number_type_arguments_test/none: Pass
-yieldstar_pause_test: RuntimeError
+yieldstar_pause_test: Crash # Interpolated value #1 is not an Expression or List of Expressions: [VariableUse(f), Instance of 'LiteralNull', null]
-[ $compiler == dart2js && $dart2js_with_kernel && !$strong ]
+[ $compiler == dart2js && $fasta && !$strong ]
*: SkipByDesign
-[ $compiler == dart2js && !$dart2js_with_kernel ]
-abstract_beats_arguments_test: MissingCompileTimeError
-abstract_exact_selector_test/01: MissingCompileTimeError
-abstract_factory_constructor_test/00: MissingCompileTimeError
-abstract_getter_test/01: MissingCompileTimeError
-abstract_override_adds_optional_args_concrete_subclass_test: MissingCompileTimeError
-abstract_override_adds_optional_args_concrete_test: MissingCompileTimeError
-abstract_override_adds_optional_args_supercall_test: MissingCompileTimeError
-abstract_syntax_test/00: MissingCompileTimeError
-accessor_conflict_export2_test: Crash # Issue 25626
-accessor_conflict_export_test: Crash # Issue 25626
-additional_interface_adds_optional_args_concrete_subclass_test: MissingCompileTimeError
-additional_interface_adds_optional_args_concrete_test: MissingCompileTimeError
-additional_interface_adds_optional_args_supercall_test: MissingCompileTimeError
-argument_assignability_function_typed_test/01: MissingCompileTimeError
-argument_assignability_function_typed_test/02: MissingCompileTimeError
-argument_assignability_function_typed_test/03: RuntimeError
-argument_assignability_function_typed_test/04: RuntimeError
-argument_assignability_function_typed_test/05: RuntimeError
-assertion_initializer_const_error2_test/*: Crash # Issue 30038
-assertion_initializer_const_error2_test/none: Pass
-assertion_initializer_test: Crash
-assign_static_type_test/01: MissingCompileTimeError
-assign_static_type_test/02: MissingCompileTimeError
-assign_static_type_test/03: MissingCompileTimeError
-assign_static_type_test/04: MissingCompileTimeError
-assign_static_type_test/05: MissingCompileTimeError
-assign_static_type_test/06: MissingCompileTimeError
-assign_to_type_test/01: MissingCompileTimeError
-assign_to_type_test/02: MissingCompileTimeError
-assign_to_type_test/03: MissingCompileTimeError
-assign_to_type_test/04: MissingCompileTimeError
-assign_top_method_test: MissingCompileTimeError
-async_await_syntax_test/a10a: MissingCompileTimeError
-async_await_syntax_test/b10a: MissingCompileTimeError
-async_await_syntax_test/c10a: MissingCompileTimeError
-async_await_syntax_test/d08b: MissingCompileTimeError
-async_await_syntax_test/d10a: MissingCompileTimeError
-async_congruence_local_test/01: MissingCompileTimeError
-async_congruence_local_test/02: MissingCompileTimeError
-async_congruence_local_test/none: RuntimeError
-async_congruence_method_test/01: MissingCompileTimeError
-async_congruence_method_test/none: RuntimeError
-async_congruence_top_level_test: RuntimeError
-async_congruence_unnamed_test/01: MissingCompileTimeError
-async_congruence_unnamed_test/02: MissingCompileTimeError
-async_congruence_unnamed_test/none: RuntimeError
-async_or_generator_return_type_stacktrace_test/01: MissingCompileTimeError
-async_or_generator_return_type_stacktrace_test/02: MissingCompileTimeError
-async_or_generator_return_type_stacktrace_test/03: MissingCompileTimeError
-async_return_types_test/nestedFuture: MissingCompileTimeError
-async_return_types_test/tooManyTypeParameters: MissingCompileTimeError
-async_return_types_test/wrongReturnType: MissingCompileTimeError
-async_return_types_test/wrongTypeParameter: MissingCompileTimeError
-bad_constructor_test/05: CompileTimeError
-bad_named_parameters2_test/01: MissingCompileTimeError
-bad_named_parameters_test/01: MissingCompileTimeError
-bad_named_parameters_test/02: MissingCompileTimeError
-bad_named_parameters_test/03: MissingCompileTimeError
-bad_named_parameters_test/04: MissingCompileTimeError
-bad_named_parameters_test/05: MissingCompileTimeError
-bad_override_test/01: MissingCompileTimeError
-bad_override_test/02: MissingCompileTimeError
-bad_override_test/06: MissingCompileTimeError
-bad_typedef_test/00: Crash # Issue 28214
-bug31436_test: RuntimeError
-bug32353_test: CompileTimeError
-built_in_identifier_prefix_test: CompileTimeError
-built_in_identifier_type_annotation_test/22: MissingCompileTimeError # Error only in strong mode
-call_constructor_on_unresolvable_class_test/01: MissingCompileTimeError
-call_constructor_on_unresolvable_class_test/02: MissingCompileTimeError
-call_constructor_on_unresolvable_class_test/03: MissingCompileTimeError
-call_function_apply_test: RuntimeError # Issue 23873
-call_non_method_field_test/01: MissingCompileTimeError
-call_non_method_field_test/02: MissingCompileTimeError
-call_nonexistent_constructor_test/01: MissingCompileTimeError
-call_nonexistent_constructor_test/02: MissingCompileTimeError
-call_nonexistent_static_test/01: MissingCompileTimeError
-call_nonexistent_static_test/02: MissingCompileTimeError
-call_nonexistent_static_test/03: MissingCompileTimeError
-call_nonexistent_static_test/04: MissingCompileTimeError
-call_nonexistent_static_test/05: MissingCompileTimeError
-call_nonexistent_static_test/06: MissingCompileTimeError
-call_nonexistent_static_test/07: MissingCompileTimeError
-call_nonexistent_static_test/08: MissingCompileTimeError
-call_nonexistent_static_test/09: MissingCompileTimeError
-call_nonexistent_static_test/10: MissingCompileTimeError
-call_through_getter_test/01: MissingCompileTimeError
-call_through_getter_test/02: MissingCompileTimeError
-call_type_literal_test: RuntimeError
-call_type_literal_test/01: MissingCompileTimeError
-callable_test/00: MissingCompileTimeError
-callable_test/01: MissingCompileTimeError
-canonical_const2_test: RuntimeError, OK # Issue 1533
-cast_test/04: MissingCompileTimeError
-cast_test/05: MissingCompileTimeError
-check_member_static_test/01: MissingCompileTimeError
-check_method_override_test/01: MissingCompileTimeError
-check_method_override_test/02: MissingCompileTimeError
-checked_null_test/01: MissingCompileTimeError
-checked_setter3_test/01: MissingCompileTimeError
-checked_setter3_test/02: MissingCompileTimeError
-checked_setter3_test/03: MissingCompileTimeError
-class_literal_static_test/none: RuntimeError
-class_literal_test/01: MissingCompileTimeError
-class_literal_test/02: MissingCompileTimeError
-class_literal_test/03: MissingCompileTimeError
-class_literal_test/04: MissingCompileTimeError
-class_literal_test/05: MissingCompileTimeError
-class_literal_test/06: MissingCompileTimeError
-class_literal_test/07: MissingCompileTimeError
-class_literal_test/08: MissingCompileTimeError
-class_literal_test/09: MissingCompileTimeError
-class_literal_test/10: MissingCompileTimeError
-class_literal_test/11: MissingCompileTimeError
-class_literal_test/12: MissingCompileTimeError
-class_literal_test/13: MissingCompileTimeError
-class_literal_test/14: MissingCompileTimeError
-class_literal_test/15: MissingCompileTimeError
-class_literal_test/16: MissingCompileTimeError
-class_literal_test/17: MissingCompileTimeError
-class_literal_test/18: MissingCompileTimeError
-class_literal_test/19: MissingCompileTimeError
-class_literal_test/20: MissingCompileTimeError
-class_literal_test/21: MissingCompileTimeError
-class_literal_test/22: MissingCompileTimeError
-class_literal_test/23: MissingCompileTimeError
-class_literal_test/24: MissingCompileTimeError
-class_literal_test/25: MissingCompileTimeError
-class_literal_test/none: RuntimeError
-closure_param_null_to_object_test: RuntimeError
-compile_time_constant_o_test/01: MissingCompileTimeError
-compile_time_constant_o_test/02: MissingCompileTimeError
-conditional_method_invocation_test/05: MissingCompileTimeError
-conditional_method_invocation_test/06: MissingCompileTimeError
-conditional_method_invocation_test/07: MissingCompileTimeError
-conditional_method_invocation_test/08: MissingCompileTimeError
-conditional_method_invocation_test/12: MissingCompileTimeError
-conditional_method_invocation_test/13: MissingCompileTimeError
-conditional_method_invocation_test/18: MissingCompileTimeError
-conditional_method_invocation_test/19: MissingCompileTimeError
-conditional_property_access_test/04: MissingCompileTimeError
-conditional_property_access_test/05: MissingCompileTimeError
-conditional_property_access_test/06: MissingCompileTimeError
-conditional_property_access_test/10: MissingCompileTimeError
-conditional_property_access_test/11: MissingCompileTimeError
-conditional_property_access_test/16: MissingCompileTimeError
-conditional_property_access_test/17: MissingCompileTimeError
-conditional_property_assignment_test/04: MissingCompileTimeError
-conditional_property_assignment_test/05: MissingCompileTimeError
-conditional_property_assignment_test/06: MissingCompileTimeError
-conditional_property_assignment_test/10: MissingCompileTimeError
-conditional_property_assignment_test/11: MissingCompileTimeError
-conditional_property_assignment_test/12: MissingCompileTimeError
-conditional_property_assignment_test/13: MissingCompileTimeError
-conditional_property_assignment_test/27: MissingCompileTimeError
-conditional_property_assignment_test/28: MissingCompileTimeError
-conditional_property_assignment_test/32: MissingCompileTimeError
-conditional_property_assignment_test/33: MissingCompileTimeError
-conditional_property_assignment_test/34: MissingCompileTimeError
-conditional_property_assignment_test/35: MissingCompileTimeError
-conditional_property_increment_decrement_test/04: MissingCompileTimeError
-conditional_property_increment_decrement_test/08: MissingCompileTimeError
-conditional_property_increment_decrement_test/12: MissingCompileTimeError
-conditional_property_increment_decrement_test/16: MissingCompileTimeError
-conditional_property_increment_decrement_test/21: MissingCompileTimeError
-conditional_property_increment_decrement_test/22: MissingCompileTimeError
-conditional_property_increment_decrement_test/27: MissingCompileTimeError
-conditional_property_increment_decrement_test/28: MissingCompileTimeError
-conditional_property_increment_decrement_test/33: MissingCompileTimeError
-conditional_property_increment_decrement_test/34: MissingCompileTimeError
-conditional_property_increment_decrement_test/39: MissingCompileTimeError
-conditional_property_increment_decrement_test/40: MissingCompileTimeError
-const_constructor2_test/05: MissingCompileTimeError
-const_constructor2_test/06: MissingCompileTimeError
-const_dynamic_type_literal_test/03: CompileTimeError # Issue 23009
-const_switch_test/02: RuntimeError # Issue 17960
-const_switch_test/04: RuntimeError # Issue 17960
-const_types_test/01: MissingCompileTimeError
-const_types_test/02: MissingCompileTimeError
-const_types_test/03: MissingCompileTimeError
-const_types_test/04: MissingCompileTimeError
-const_types_test/05: MissingCompileTimeError
-const_types_test/06: MissingCompileTimeError
-const_types_test/13: MissingCompileTimeError
-const_types_test/34: MissingCompileTimeError
-const_types_test/35: MissingCompileTimeError
-const_types_test/39: MissingCompileTimeError
-const_types_test/40: MissingCompileTimeError
-constructor13_test/01: MissingCompileTimeError
-constructor13_test/02: MissingCompileTimeError
-constructor_call_as_function_test: RuntimeError
-constructor_call_as_function_test/01: MissingCompileTimeError
-covariance_type_parameter_test/01: RuntimeError
-covariance_type_parameter_test/02: RuntimeError
-covariance_type_parameter_test/03: RuntimeError
-create_unresolved_type_test/01: MissingCompileTimeError
-cyclic_type_variable_test/01: MissingCompileTimeError
-cyclic_type_variable_test/02: MissingCompileTimeError
-cyclic_type_variable_test/03: MissingCompileTimeError
-cyclic_type_variable_test/04: MissingCompileTimeError
-cyclic_typedef_test/13: MissingCompileTimeError
-default_factory2_test/01: MissingCompileTimeError
-default_factory_test/01: MissingCompileTimeError
-deferred_constraints_type_annotation_test/as_operation: MissingCompileTimeError
-deferred_constraints_type_annotation_test/catch_check: MissingCompileTimeError
-deferred_constraints_type_annotation_test/is_check: MissingCompileTimeError
-deferred_constraints_type_annotation_test/new_before_load: MissingCompileTimeError
-deferred_constraints_type_annotation_test/new_generic2: MissingCompileTimeError
-deferred_constraints_type_annotation_test/new_generic3: MissingCompileTimeError
-deferred_constraints_type_annotation_test/type_annotation1: MissingCompileTimeError
-deferred_constraints_type_annotation_test/type_annotation_generic1: MissingCompileTimeError
-deferred_constraints_type_annotation_test/type_annotation_generic2: MissingCompileTimeError
-deferred_constraints_type_annotation_test/type_annotation_generic3: MissingCompileTimeError
-deferred_constraints_type_annotation_test/type_annotation_generic4: MissingCompileTimeError
-deferred_constraints_type_annotation_test/type_annotation_null: MissingCompileTimeError
-deferred_constraints_type_annotation_test/type_annotation_top_level: MissingCompileTimeError
-deferred_inheritance_constraints_test/redirecting_constructor: MissingCompileTimeError
-deferred_not_loaded_check_test: Fail # Issue 27577
-double_int_to_string_test: RuntimeError # Issue 1533
-dynamic_field_test/01: MissingCompileTimeError
-dynamic_field_test/02: MissingCompileTimeError
-dynamic_prefix_core_test/01: MissingCompileTimeError
-empty_block_case_test: MissingCompileTimeError
-enum_private_test/02: MissingCompileTimeError
-enum_test: Fail # Issue 28340
-error_stacktrace_test/00: MissingCompileTimeError
-example_constructor_test: RuntimeError
-expect_test: RuntimeError, OK # Issue 13080
-external_test/10: CompileTimeError # Issue 12887
-external_test/13: CompileTimeError # Issue 12887
-external_test/20: CompileTimeError # Issue 12887
-external_test/21: CompileTimeError
-external_test/24: CompileTimeError
-extract_type_arguments_test: RuntimeError # Issue 31371
-f_bounded_quantification_test/01: MissingCompileTimeError
-f_bounded_quantification_test/02: MissingCompileTimeError
-factory1_test/00: MissingCompileTimeError
-factory1_test/01: MissingCompileTimeError
-factory2_test/03: MissingCompileTimeError
-factory2_test/none: MissingCompileTimeError
-factory3_test/none: MissingCompileTimeError
-factory4_test/00: MissingCompileTimeError
-factory5_test/00: MissingCompileTimeError
-factory6_test/00: MissingCompileTimeError
-factory_redirection_test/01: MissingCompileTimeError
-factory_redirection_test/02: MissingCompileTimeError
-factory_redirection_test/03: MissingCompileTimeError
-factory_redirection_test/05: MissingCompileTimeError
-factory_redirection_test/06: MissingCompileTimeError
-factory_redirection_test/08: MissingCompileTimeError
-factory_redirection_test/09: MissingCompileTimeError
-factory_redirection_test/10: MissingCompileTimeError
-factory_redirection_test/11: MissingCompileTimeError
-factory_redirection_test/12: MissingCompileTimeError
-factory_redirection_test/13: MissingCompileTimeError
-factory_redirection_test/14: MissingCompileTimeError
-factory_redirection_test/none: MissingCompileTimeError
-factory_return_type_checked_test/00: MissingCompileTimeError
-field3_test/01: MissingCompileTimeError
-field_initialization_order_test/01: MissingCompileTimeError
-field_initialization_order_test/none: RuntimeError
-field_method4_test: MissingCompileTimeError
-field_override2_test: MissingCompileTimeError
-field_override_test/00: MissingCompileTimeError
-field_override_test/01: MissingCompileTimeError
-field_override_test/02: MissingCompileTimeError
-field_override_test/none: MissingCompileTimeError
-field_type_check_test/01: MissingCompileTimeError
-final_attempt_reinitialization_test.dart: Skip # Issue 29659
-final_field_override_test: RuntimeError
-final_for_in_variable_test: MissingCompileTimeError
-final_param_test: MissingCompileTimeError
-final_super_field_set_test: MissingCompileTimeError
-final_syntax_test/10: MissingCompileTimeError
-final_variable_assignment_test/01: MissingCompileTimeError
-final_variable_assignment_test/02: MissingCompileTimeError
-final_variable_assignment_test/03: MissingCompileTimeError
-final_variable_assignment_test/04: MissingCompileTimeError
-first_class_types_literals_test/03: MissingCompileTimeError
-first_class_types_literals_test/04: MissingCompileTimeError
-first_class_types_literals_test/05: MissingCompileTimeError
-first_class_types_literals_test/06: MissingCompileTimeError
-first_class_types_literals_test/07: MissingCompileTimeError
-first_class_types_literals_test/08: MissingCompileTimeError
-first_class_types_literals_test/09: MissingCompileTimeError
-first_class_types_literals_test/10: MissingCompileTimeError
-first_class_types_literals_test/11: MissingCompileTimeError
-first_class_types_literals_test/12: MissingCompileTimeError
-flatten_test/05: MissingRuntimeError
-flatten_test/08: MissingRuntimeError
-flatten_test/09: MissingRuntimeError
-flatten_test/12: MissingRuntimeError
-for_in3_test: MissingCompileTimeError
-for_in_side_effects_test/01: MissingCompileTimeError
-full_stacktrace1_test: Pass, RuntimeError # Issue 12698
-full_stacktrace2_test: Pass, RuntimeError # Issue 12698
-full_stacktrace3_test: Pass, RuntimeError # Issue 12698
-function_malformed_result_type_test/00: MissingCompileTimeError
-function_type_call_getter2_test/00: MissingCompileTimeError
-function_type_call_getter2_test/01: MissingCompileTimeError
-function_type_call_getter2_test/02: MissingCompileTimeError
-function_type_call_getter2_test/03: MissingCompileTimeError
-function_type_call_getter2_test/04: MissingCompileTimeError
-function_type_call_getter2_test/05: MissingCompileTimeError
-fuzzy_arrows_test/01: MissingCompileTimeError
-fuzzy_arrows_test/03: RuntimeError
-generalized_void_syntax_test: CompileTimeError # Issue #30176.
-generic_constructor_mixin2_test/01: MissingCompileTimeError
-generic_constructor_mixin3_test/01: MissingCompileTimeError
-generic_constructor_mixin_test/01: MissingCompileTimeError
-generic_field_mixin4_test: Crash # Issue 18651
-generic_field_mixin5_test: Crash # Issue 18651
-generic_field_mixin6_test/01: MissingCompileTimeError
-generic_function_bounds_test: RuntimeError
-generic_function_dcall_test: RuntimeError
-generic_function_type_as_type_argument_test/01: MissingCompileTimeError # Issue 30930
-generic_function_type_as_type_argument_test/02: MissingCompileTimeError # Issue 30930
-generic_function_typedef2_test/00: MissingCompileTimeError # Issue 28214
-generic_function_typedef2_test/01: MissingCompileTimeError # Issue 28214
-generic_function_typedef2_test/02: MissingCompileTimeError # Issue 28214
-generic_function_typedef2_test/03: MissingCompileTimeError # Issue 28214
-generic_function_typedef2_test/04: MissingCompileTimeError
-generic_function_typedef2_test/05: Crash # Issue 28214
-generic_function_typedef2_test/06: Crash # Issue 28214
-generic_method_types_test/01: RuntimeError
-generic_method_types_test/02: RuntimeError
-generic_methods_bounds_test/01: MissingCompileTimeError
-generic_methods_bounds_test/02: MissingRuntimeError
-generic_methods_closure_test: RuntimeError
-generic_methods_dynamic_test/01: MissingCompileTimeError
-generic_methods_dynamic_test/02: MissingRuntimeError
-generic_methods_dynamic_test/03: MissingCompileTimeError
-generic_methods_dynamic_test/04: MissingRuntimeError
-generic_methods_generic_class_tearoff_test: RuntimeError
-generic_methods_generic_function_result_test/01: MissingCompileTimeError # Issue #30208
-generic_methods_local_variable_declaration_test: RuntimeError
-generic_methods_named_parameters_test: RuntimeError
-generic_methods_new_test: RuntimeError
-generic_methods_optional_parameters_test: RuntimeError
-generic_methods_overriding_test/01: MissingCompileTimeError
-generic_methods_overriding_test/03: MissingCompileTimeError
-generic_methods_recursive_bound_test/02: MissingCompileTimeError
-generic_methods_reuse_type_variables_test: RuntimeError
-generic_methods_shadowing_test: RuntimeError
-generic_methods_simple_as_expression_test/02: MissingRuntimeError
-generic_methods_simple_is_expression_test: RuntimeError
-generic_methods_tearoff_specialization_test: RuntimeError
-generic_methods_type_expression_test: RuntimeError
-generic_methods_unused_parameter_test: RuntimeError
-generic_no_such_method_dispatcher_simple_test: Skip # This test is just for kernel.
-generic_no_such_method_dispatcher_test: RuntimeError
-generic_tearoff_test: RuntimeError
-getter_no_setter2_test/00: MissingCompileTimeError
-getter_no_setter2_test/01: MissingCompileTimeError
-getter_no_setter2_test/03: MissingCompileTimeError
-getter_no_setter_test/00: MissingCompileTimeError
-getter_no_setter_test/01: MissingCompileTimeError
-getter_no_setter_test/03: MissingCompileTimeError
-getter_override_test/03: MissingCompileTimeError
-getter_setter_in_lib_test: Fail # Issue 23288
-getters_setters2_test/02: MissingCompileTimeError
-identical_closure2_test: RuntimeError # Issue 1533, Issue 12596
-identical_const_test/01: MissingCompileTimeError
-identical_const_test/02: MissingCompileTimeError
-identical_const_test/03: MissingCompileTimeError
-identical_const_test/04: MissingCompileTimeError
-if_null_assignment_behavior_test/03: MissingCompileTimeError
-if_null_assignment_behavior_test/13: MissingCompileTimeError, Crash # Issue 23491
-if_null_assignment_behavior_test/14: Crash # Issue 23491
-if_null_assignment_behavior_test/15: MissingCompileTimeError
-if_null_assignment_static_test/02: MissingCompileTimeError
-if_null_assignment_static_test/04: MissingCompileTimeError
-if_null_assignment_static_test/06: MissingCompileTimeError
-if_null_assignment_static_test/07: MissingCompileTimeError
-if_null_assignment_static_test/09: MissingCompileTimeError
-if_null_assignment_static_test/11: MissingCompileTimeError
-if_null_assignment_static_test/13: MissingCompileTimeError
-if_null_assignment_static_test/14: MissingCompileTimeError
-if_null_assignment_static_test/16: MissingCompileTimeError
-if_null_assignment_static_test/18: MissingCompileTimeError
-if_null_assignment_static_test/20: MissingCompileTimeError
-if_null_assignment_static_test/21: MissingCompileTimeError
-if_null_assignment_static_test/23: MissingCompileTimeError
-if_null_assignment_static_test/25: MissingCompileTimeError
-if_null_assignment_static_test/27: MissingCompileTimeError
-if_null_assignment_static_test/28: MissingCompileTimeError
-if_null_assignment_static_test/30: MissingCompileTimeError
-if_null_assignment_static_test/32: MissingCompileTimeError
-if_null_assignment_static_test/34: MissingCompileTimeError
-if_null_assignment_static_test/35: MissingCompileTimeError
-if_null_assignment_static_test/37: MissingCompileTimeError
-if_null_assignment_static_test/39: MissingCompileTimeError
-if_null_assignment_static_test/41: MissingCompileTimeError
-if_null_assignment_static_test/42: MissingCompileTimeError
-if_null_precedence_test/06: MissingCompileTimeError
-if_null_precedence_test/07: MissingCompileTimeError
-implicit_creation/implicit_new_constructor_generic_test: Crash
-implicit_creation/implicit_new_constructor_test: Crash
-implicit_creation/implicit_new_prefix_constructor_generic_test: Crash
-implicit_creation/implicit_new_prefix_constructor_test: Crash
-implicit_this_test/01: MissingCompileTimeError
-implicit_this_test/02: MissingCompileTimeError
-implicit_this_test/04: MissingCompileTimeError
-import_combinators2_test/00: MissingCompileTimeError
-import_self_test/01: MissingCompileTimeError
-inferrer_constructor5_test/01: MissingCompileTimeError
-infinity_test: RuntimeError # Issue 4984
-initializing_formal_final_test: MissingCompileTimeError
-initializing_formal_type_test: MissingCompileTimeError
-instantiate_tearoff_after_contravariance_check_test: RuntimeError
-instantiate_tearoff_of_call_test: RuntimeError
-instantiate_tearoff_test: RuntimeError
-instantiate_type_variable_test/01: MissingCompileTimeError
-int64_literal_test/*: Skip # This is testing Dart 2.0 int64 semantics.
-integer_division_by_zero_test: RuntimeError # Issue 8301
-interface_test/00: MissingCompileTimeError
-invalid_override_in_mixin_test/01: MissingCompileTimeError
-invalid_type_argument_count_test/01: MissingCompileTimeError
-invalid_type_argument_count_test/02: MissingCompileTimeError
-invalid_type_argument_count_test/03: MissingCompileTimeError
-invalid_type_argument_count_test/04: MissingCompileTimeError
-invocation_mirror2_test: RuntimeError # Issue 6490 (wrong retval).
-issue31596_override_test/05: MissingCompileTimeError
-issue31596_override_test/06: MissingCompileTimeError
-issue31596_override_test/07: MissingCompileTimeError
-issue31596_override_test/08: MissingCompileTimeError
-issue31596_super_test/02: MissingCompileTimeError
-issue31596_super_test/04: MissingCompileTimeError
-issue31596_tearoff_test: RuntimeError
-least_upper_bound_expansive_test/01: MissingCompileTimeError
-least_upper_bound_expansive_test/02: MissingCompileTimeError
-least_upper_bound_expansive_test/03: MissingCompileTimeError
-least_upper_bound_expansive_test/04: MissingCompileTimeError
-least_upper_bound_expansive_test/05: MissingCompileTimeError
-least_upper_bound_expansive_test/06: MissingCompileTimeError
-least_upper_bound_expansive_test/07: MissingCompileTimeError
-least_upper_bound_expansive_test/08: MissingCompileTimeError
-least_upper_bound_expansive_test/09: MissingCompileTimeError
-least_upper_bound_expansive_test/10: MissingCompileTimeError
-least_upper_bound_expansive_test/11: MissingCompileTimeError
-least_upper_bound_expansive_test/12: MissingCompileTimeError
-least_upper_bound_test/03: MissingCompileTimeError
-least_upper_bound_test/04: MissingCompileTimeError
-least_upper_bound_test/10: MissingCompileTimeError
-least_upper_bound_test/19: MissingCompileTimeError
-least_upper_bound_test/20: MissingCompileTimeError
-least_upper_bound_test/23: MissingCompileTimeError
-least_upper_bound_test/24: MissingCompileTimeError
-least_upper_bound_test/29: MissingCompileTimeError
-least_upper_bound_test/30: MissingCompileTimeError
-least_upper_bound_test/32: MissingCompileTimeError
-left_shift_test: RuntimeError # Issue 1533
-library_ambiguous_test/00: MissingCompileTimeError
-library_ambiguous_test/01: MissingCompileTimeError
-library_ambiguous_test/02: MissingCompileTimeError
-library_ambiguous_test/03: MissingCompileTimeError
-library_ambiguous_test/04: MissingCompileTimeError
-library_env_test/has_no_html_support: RuntimeError, OK
-library_env_test/has_no_io_support: RuntimeError, OK
-library_env_test/has_no_mirror_support: RuntimeError, OK
-list_is_test: RuntimeError
-list_literal4_test/00: MissingCompileTimeError
-list_literal4_test/01: MissingCompileTimeError
-list_literal4_test/03: MissingCompileTimeError
-list_literal4_test/04: MissingCompileTimeError
-list_literal4_test/05: MissingCompileTimeError
-list_literal_syntax_test/01: MissingCompileTimeError
-list_literal_syntax_test/02: MissingCompileTimeError
-list_literal_syntax_test/03: MissingCompileTimeError
-local_function2_test/01: MissingCompileTimeError
-local_function2_test/02: MissingCompileTimeError
-local_function2_test/none: RuntimeError
-local_function3_test/01: MissingCompileTimeError
-local_function3_test/none: RuntimeError
-local_function_test/01: MissingCompileTimeError
-local_function_test/02: MissingCompileTimeError
-local_function_test/03: MissingCompileTimeError
-local_function_test/04: MissingCompileTimeError
-local_function_test/none: RuntimeError
-logical_expression3_test: MissingCompileTimeError
-main_test/03: RuntimeError
-malbounded_instantiation_test/01: MissingCompileTimeError
-malbounded_instantiation_test/02: MissingCompileTimeError
-malbounded_instantiation_test/03: MissingCompileTimeError
-malbounded_redirecting_factory_test/02: MissingCompileTimeError
-malbounded_redirecting_factory_test/03: MissingCompileTimeError
-malbounded_redirecting_factory_test/04: MissingCompileTimeError
-malbounded_redirecting_factory_test/05: MissingCompileTimeError
-malbounded_type_cast2_test: MissingCompileTimeError
-malbounded_type_cast_test/00: MissingCompileTimeError
-malbounded_type_cast_test/01: MissingCompileTimeError
-malbounded_type_cast_test/02: MissingCompileTimeError
-malbounded_type_cast_test/none: RuntimeError
-malbounded_type_literal_test/00: MissingCompileTimeError
-malbounded_type_test2_test/00: MissingCompileTimeError
-malbounded_type_test_test/00: MissingCompileTimeError
-malbounded_type_test_test/01: MissingCompileTimeError
-malbounded_type_test_test/02: MissingCompileTimeError
-malbounded_type_test_test/none: RuntimeError
-malformed2_test/01: MissingCompileTimeError
-malformed2_test/02: MissingCompileTimeError
-malformed2_test/03: MissingCompileTimeError
-malformed2_test/04: MissingCompileTimeError
-malformed2_test/05: MissingCompileTimeError
-malformed2_test/06: MissingCompileTimeError
-malformed2_test/07: MissingCompileTimeError
-malformed2_test/08: MissingCompileTimeError
-malformed2_test/09: MissingCompileTimeError
-malformed2_test/10: MissingCompileTimeError
-malformed2_test/11: MissingCompileTimeError
-malformed2_test/12: MissingCompileTimeError
-malformed2_test/13: MissingCompileTimeError
-malformed_bound_test/00: MissingCompileTimeError
-malformed_bound_test/01: MissingCompileTimeError
-malformed_inheritance_test/01: MissingCompileTimeError
-malformed_inheritance_test/03: MissingCompileTimeError
-malformed_inheritance_test/05: MissingCompileTimeError
-malformed_test/00: MissingCompileTimeError
-malformed_test/01: MissingCompileTimeError
-malformed_test/02: MissingCompileTimeError
-malformed_test/03: MissingCompileTimeError
-malformed_test/04: MissingCompileTimeError
-malformed_test/05: MissingCompileTimeError
-malformed_test/06: MissingCompileTimeError
-malformed_test/07: MissingCompileTimeError
-malformed_test/08: MissingCompileTimeError
-malformed_test/09: MissingCompileTimeError
-malformed_test/10: MissingCompileTimeError
-malformed_test/11: MissingCompileTimeError
-malformed_test/12: MissingCompileTimeError
-malformed_test/13: MissingCompileTimeError
-malformed_test/14: MissingCompileTimeError
-malformed_test/15: MissingCompileTimeError
-malformed_test/16: MissingCompileTimeError
-malformed_test/17: MissingCompileTimeError
-malformed_test/18: MissingCompileTimeError
-malformed_test/19: MissingCompileTimeError
-malformed_test/20: MissingCompileTimeError
-malformed_test/21: MissingCompileTimeError
-malformed_test/22: MissingCompileTimeError
-malformed_test/23: MissingCompileTimeError
-malformed_test/24: MissingCompileTimeError
-malformed_type_test: MissingCompileTimeError
-method_override2_test/*: MissingCompileTimeError
-method_override2_test/none: Pass
-method_override3_test/*: MissingCompileTimeError
-method_override3_test/none: Pass
-method_override4_test/*: MissingCompileTimeError
-method_override4_test/none: Pass
-method_override5_test: RuntimeError # Issue 12809
-method_override5_test/*: MissingCompileTimeError
-method_override5_test/none: Pass
-method_override6_test/*: MissingCompileTimeError
-method_override6_test/none: Pass
-method_override7_test/03: MissingCompileTimeError
-method_override8_test/03: MissingCompileTimeError
-method_override_test: RuntimeError
-mint_arithmetic_test: RuntimeError # Issue 1533
-mixin_illegal_constructor_test/13: MissingCompileTimeError
-mixin_illegal_constructor_test/14: MissingCompileTimeError
-mixin_illegal_constructor_test/15: MissingCompileTimeError
-mixin_illegal_constructor_test/16: MissingCompileTimeError
-mixin_illegal_static_access_test/01: MissingCompileTimeError
-mixin_illegal_static_access_test/02: MissingCompileTimeError
-mixin_illegal_syntax_test/13: MissingCompileTimeError
-mixin_invalid_bound2_test/02: MissingCompileTimeError
-mixin_invalid_bound2_test/03: MissingCompileTimeError
-mixin_invalid_bound2_test/04: MissingCompileTimeError
-mixin_invalid_bound2_test/05: MissingCompileTimeError
-mixin_invalid_bound2_test/06: MissingCompileTimeError
-mixin_invalid_bound2_test/07: MissingCompileTimeError
-mixin_invalid_bound2_test/08: MissingCompileTimeError
-mixin_invalid_bound2_test/09: MissingCompileTimeError
-mixin_invalid_bound2_test/10: MissingCompileTimeError
-mixin_invalid_bound2_test/11: MissingCompileTimeError
-mixin_invalid_bound2_test/12: MissingCompileTimeError
-mixin_invalid_bound2_test/13: MissingCompileTimeError
-mixin_invalid_bound2_test/14: MissingCompileTimeError
-mixin_invalid_bound2_test/15: MissingCompileTimeError
-mixin_invalid_bound_test/02: MissingCompileTimeError
-mixin_invalid_bound_test/03: MissingCompileTimeError
-mixin_invalid_bound_test/04: MissingCompileTimeError
-mixin_invalid_bound_test/05: MissingCompileTimeError
-mixin_invalid_bound_test/06: MissingCompileTimeError
-mixin_invalid_bound_test/07: MissingCompileTimeError
-mixin_invalid_bound_test/08: MissingCompileTimeError
-mixin_invalid_bound_test/09: MissingCompileTimeError
-mixin_invalid_bound_test/10: MissingCompileTimeError
-mixin_of_mixin_test/none: CompileTimeError
-mixin_super_2_test/none: CompileTimeError
-mixin_super_bound2_test: CompileTimeError # Issue 23773
-mixin_super_bound_test/01: MissingCompileTimeError
-mixin_super_bound_test/02: MissingCompileTimeError
-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/01: CompileTimeError
-mixin_supertype_subclass_test/03: CompileTimeError
-mixin_supertype_subclass_test/04: CompileTimeError
-mixin_supertype_subclass_test/none: CompileTimeError
-mixin_type_parameters_errors_test/01: MissingCompileTimeError
-mixin_type_parameters_errors_test/02: MissingCompileTimeError
-mixin_type_parameters_errors_test/03: MissingCompileTimeError
-mixin_type_parameters_errors_test/04: MissingCompileTimeError
-mixin_type_parameters_errors_test/05: MissingCompileTimeError
-mixin_type_parameters_mixin_extends_test: RuntimeError
-mixin_type_parameters_mixin_test: RuntimeError
-mixin_type_parameters_super_extends_test: RuntimeError
-mixin_type_parameters_super_test: RuntimeError
-mixin_with_two_implicit_constructors_test: MissingCompileTimeError
-mock_writable_final_private_field_test: CompileTimeError # Issue 17526
-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: RuntimeError
-multiline_newline_test/03r: RuntimeError
-multiline_newline_test/04: MissingCompileTimeError # Issue 23888
-multiline_newline_test/04r: MissingCompileTimeError # Issue 23888
-multiline_newline_test/05: MissingCompileTimeError # Issue 23888
-multiline_newline_test/05r: MissingCompileTimeError # Issue 23888
-multiline_newline_test/none: RuntimeError # Issue 23888
-named_constructor_test/01: MissingCompileTimeError
-named_constructor_test/03: MissingCompileTimeError
-named_parameters2_test: MissingCompileTimeError
-named_parameters3_test: MissingCompileTimeError
-named_parameters4_test: MissingCompileTimeError
-named_parameters_aggregated_test/05: MissingCompileTimeError
-named_parameters_test/01: MissingCompileTimeError
-named_parameters_test/02: MissingCompileTimeError
-named_parameters_test/03: MissingCompileTimeError
-named_parameters_test/04: MissingCompileTimeError
-named_parameters_test/05: MissingCompileTimeError
-named_parameters_test/06: MissingCompileTimeError
-named_parameters_test/07: MissingCompileTimeError
-named_parameters_test/08: MissingCompileTimeError
-named_parameters_test/09: MissingCompileTimeError
-named_parameters_test/10: MissingCompileTimeError
-named_parameters_type_test/01: MissingCompileTimeError
-named_parameters_type_test/02: MissingCompileTimeError
-named_parameters_type_test/03: MissingCompileTimeError
-nan_identical_test: Fail # Issue 11551
-nested_generic_closure_test: RuntimeError
-new_expression_type_args_test/00: MissingCompileTimeError
-new_expression_type_args_test/01: MissingCompileTimeError
-new_expression_type_args_test/02: MissingCompileTimeError
-new_prefix_test/01: MissingCompileTimeError
-no_such_constructor_test/01: MissingCompileTimeError
-no_such_method_mock_test: RuntimeError
-number_identity2_test: RuntimeError # Issue 12596
-numbers_test: RuntimeError, OK # Issue 1533
-object_has_no_call_method_test/02: MissingCompileTimeError
-object_has_no_call_method_test/05: MissingCompileTimeError
-object_has_no_call_method_test/08: MissingCompileTimeError
-optional_named_parameters_test/01: MissingCompileTimeError
-optional_named_parameters_test/02: MissingCompileTimeError
-optional_named_parameters_test/03: MissingCompileTimeError
-optional_named_parameters_test/04: MissingCompileTimeError
-optional_named_parameters_test/05: MissingCompileTimeError
-optional_named_parameters_test/06: MissingCompileTimeError
-optional_named_parameters_test/07: MissingCompileTimeError
-optional_named_parameters_test/08: MissingCompileTimeError
-optional_named_parameters_test/09: MissingCompileTimeError
-override_field_test/02: MissingCompileTimeError
-override_field_test/03: MissingCompileTimeError
-override_inheritance_abstract_test/02: MissingCompileTimeError
-override_inheritance_abstract_test/03: MissingCompileTimeError
-override_inheritance_abstract_test/04: MissingCompileTimeError
-override_inheritance_abstract_test/08: MissingCompileTimeError
-override_inheritance_abstract_test/09: MissingCompileTimeError
-override_inheritance_abstract_test/10: MissingCompileTimeError
-override_inheritance_abstract_test/11: MissingCompileTimeError
-override_inheritance_abstract_test/12: MissingCompileTimeError
-override_inheritance_abstract_test/13: MissingCompileTimeError
-override_inheritance_abstract_test/14: MissingCompileTimeError
-override_inheritance_abstract_test/17: MissingCompileTimeError
-override_inheritance_abstract_test/19: MissingCompileTimeError
-override_inheritance_abstract_test/20: MissingCompileTimeError
-override_inheritance_abstract_test/21: MissingCompileTimeError
-override_inheritance_abstract_test/22: MissingCompileTimeError
-override_inheritance_abstract_test/23: MissingCompileTimeError
-override_inheritance_abstract_test/24: MissingCompileTimeError
-override_inheritance_abstract_test/25: MissingCompileTimeError
-override_inheritance_abstract_test/26: MissingCompileTimeError
-override_inheritance_abstract_test/28: MissingCompileTimeError
-override_inheritance_field_test/05: MissingCompileTimeError
-override_inheritance_field_test/07: MissingCompileTimeError
-override_inheritance_field_test/08: MissingCompileTimeError
-override_inheritance_field_test/09: MissingCompileTimeError
-override_inheritance_field_test/10: MissingCompileTimeError
-override_inheritance_field_test/11: MissingCompileTimeError
-override_inheritance_field_test/28: MissingCompileTimeError
-override_inheritance_field_test/30: MissingCompileTimeError
-override_inheritance_field_test/31: MissingCompileTimeError
-override_inheritance_field_test/32: MissingCompileTimeError
-override_inheritance_field_test/33: MissingCompileTimeError
-override_inheritance_field_test/33a: MissingCompileTimeError
-override_inheritance_field_test/34: MissingCompileTimeError
-override_inheritance_field_test/44: MissingCompileTimeError
-override_inheritance_field_test/47: MissingCompileTimeError
-override_inheritance_field_test/48: MissingCompileTimeError
-override_inheritance_field_test/53: MissingCompileTimeError
-override_inheritance_field_test/54: MissingCompileTimeError
-override_inheritance_generic_test/04: MissingCompileTimeError
-override_inheritance_generic_test/06: MissingCompileTimeError
-override_inheritance_generic_test/07: MissingCompileTimeError
-override_inheritance_generic_test/08: MissingCompileTimeError
-override_inheritance_generic_test/09: MissingCompileTimeError
-override_inheritance_generic_test/10: MissingCompileTimeError
-override_inheritance_method_test/04: MissingCompileTimeError
-override_inheritance_method_test/05: MissingCompileTimeError
-override_inheritance_method_test/06: MissingCompileTimeError
-override_inheritance_method_test/11: MissingCompileTimeError
-override_inheritance_method_test/12: MissingCompileTimeError
-override_inheritance_method_test/13: MissingCompileTimeError
-override_inheritance_method_test/14: MissingCompileTimeError
-override_inheritance_method_test/19: MissingCompileTimeError
-override_inheritance_method_test/20: MissingCompileTimeError
-override_inheritance_method_test/21: MissingCompileTimeError
-override_inheritance_method_test/27: MissingCompileTimeError
-override_inheritance_method_test/30: MissingCompileTimeError
-override_inheritance_method_test/31: MissingCompileTimeError
-override_inheritance_method_test/32: MissingCompileTimeError
-override_inheritance_method_test/33: MissingCompileTimeError
-override_inheritance_mixed_test/06: MissingCompileTimeError
-override_inheritance_mixed_test/07: MissingCompileTimeError
-override_inheritance_no_such_method_test/01: MissingCompileTimeError
-override_inheritance_no_such_method_test/02: MissingCompileTimeError
-override_inheritance_no_such_method_test/06: MissingCompileTimeError
-override_inheritance_no_such_method_test/07: MissingCompileTimeError
-override_inheritance_no_such_method_test/09: MissingCompileTimeError
-override_inheritance_no_such_method_test/10: MissingCompileTimeError
-override_inheritance_no_such_method_test/12: MissingCompileTimeError
-override_inheritance_no_such_method_test/13: MissingCompileTimeError
-override_method_with_field_test/02: MissingCompileTimeError
-part2_test/01: MissingCompileTimeError
-partial_tearoff_instantiation_test/01: MissingCompileTimeError
-partial_tearoff_instantiation_test/02: MissingRuntimeError
-partial_tearoff_instantiation_test/03: MissingCompileTimeError
-partial_tearoff_instantiation_test/04: MissingRuntimeError
-partial_tearoff_instantiation_test/05: MissingCompileTimeError
-partial_tearoff_instantiation_test/06: MissingCompileTimeError
-partial_tearoff_instantiation_test/07: MissingCompileTimeError
-partial_tearoff_instantiation_test/08: MissingCompileTimeError
-positional_parameters_type_test/01: MissingCompileTimeError
-positional_parameters_type_test/02: MissingCompileTimeError
-prefix16_test/00: MissingCompileTimeError
-prefix16_test/01: MissingCompileTimeError
-prefix22_test/00: MissingCompileTimeError
-prefix23_test/00: MissingCompileTimeError
-private_access_test/01: MissingCompileTimeError
-private_access_test/02: MissingCompileTimeError
-private_access_test/03: MissingCompileTimeError
-private_access_test/04: MissingCompileTimeError
-private_access_test/05: MissingCompileTimeError
-private_access_test/06: MissingCompileTimeError
-recursive_generic_test: RuntimeError
-regress_12561_test: MissingCompileTimeError
-regress_13494_test: MissingCompileTimeError
-regress_17382_test: MissingCompileTimeError
-regress_19413_test: MissingCompileTimeError
-regress_19728_test: MissingCompileTimeError
-regress_21793_test/01: MissingCompileTimeError
-regress_21912_test/01: MissingCompileTimeError
-regress_21912_test/02: MissingCompileTimeError
-regress_22438_test: MissingCompileTimeError
-regress_22936_test: MissingCompileTimeError
-regress_22976_test: CompileTimeError # Issue 23132
-regress_23089_test: MissingCompileTimeError
-regress_23408_test: RuntimeError
-regress_24283_test: RuntimeError # Issue 1533
-regress_26133_test: MissingCompileTimeError
-regress_27572_test: MissingCompileTimeError
-regress_31057_test: RuntimeError
-regress_31591_test: RuntimeError, OK # strong mode only
-return_type_test: MissingCompileTimeError
-rewrite_implicit_this_test/01: MissingCompileTimeError
-runtime_type_function_test: RuntimeError
-scope_variable_test/01: MissingCompileTimeError # Issue 13016
-setter4_test: CompileTimeError # issue 13639
-setter4_test: MissingCompileTimeError
-setter_no_getter_call_test/01: MissingCompileTimeError
-setter_override_test/01: MissingCompileTimeError
-setter_override_test/02: MissingCompileTimeError
-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
-static_field1_test/01: MissingCompileTimeError
-static_field1a_test/01: MissingCompileTimeError
-static_field3_test/01: MissingCompileTimeError
-static_field3_test/02: MissingCompileTimeError
-static_field3_test/03: MissingCompileTimeError
-static_field3_test/04: MissingCompileTimeError
-static_field_test/01: MissingCompileTimeError
-static_field_test/02: MissingCompileTimeError
-static_field_test/03: MissingCompileTimeError
-static_field_test/04: MissingCompileTimeError
-static_final_field2_test/01: MissingCompileTimeError
-static_getter_no_setter1_test/01: MissingCompileTimeError
-static_getter_no_setter2_test/01: MissingCompileTimeError
-static_initializer_type_error_test: MissingCompileTimeError
-static_setter_get_test/01: MissingCompileTimeError
-string_interpolation_test/01: MissingCompileTimeError
-string_no_operator_test/01: MissingCompileTimeError
-string_no_operator_test/02: MissingCompileTimeError
-string_no_operator_test/03: MissingCompileTimeError
-string_no_operator_test/04: MissingCompileTimeError
-string_no_operator_test/05: MissingCompileTimeError
-string_no_operator_test/06: MissingCompileTimeError
-string_no_operator_test/07: MissingCompileTimeError
-string_no_operator_test/08: MissingCompileTimeError
-string_no_operator_test/09: MissingCompileTimeError
-string_no_operator_test/10: MissingCompileTimeError
-string_no_operator_test/11: MissingCompileTimeError
-string_no_operator_test/12: MissingCompileTimeError
-string_no_operator_test/13: MissingCompileTimeError
-string_no_operator_test/14: MissingCompileTimeError
-string_no_operator_test/15: MissingCompileTimeError
-string_no_operator_test/16: MissingCompileTimeError
-string_test/01: MissingCompileTimeError
-substring_test/01: MissingCompileTimeError
-super_assign_test/01: MissingCompileTimeError
-super_bound_closure_test/01: MissingCompileTimeError
-super_operator_index_test/01: MissingCompileTimeError
-super_operator_index_test/02: MissingCompileTimeError
-super_operator_index_test/03: MissingCompileTimeError
-super_operator_index_test/04: MissingCompileTimeError
-super_operator_index_test/05: MissingCompileTimeError
-super_operator_index_test/06: MissingCompileTimeError
-super_operator_index_test/07: MissingCompileTimeError
-super_test: RuntimeError
-switch_fallthru_test/01: MissingCompileTimeError
-sync_generator1_test/01: MissingCompileTimeError
-syntax_test/60: MissingCompileTimeError
-syntax_test/61: MissingCompileTimeError
-syntax_test/62: MissingCompileTimeError, Crash
-top_level_getter_no_setter1_test: MissingCompileTimeError
-top_level_getter_no_setter2_test: MissingCompileTimeError
-transitive_private_library_access_test: MissingCompileTimeError
-truncdiv_test: RuntimeError # Issue 15246
-try_catch_on_syntax_test/07: MissingCompileTimeError
-try_catch_on_syntax_test/10: Fail # Issue 19823
-try_catch_on_syntax_test/10: MissingCompileTimeError
-try_catch_on_syntax_test/11: MissingCompileTimeError, Fail # Issue 19823
-try_catch_syntax_test/08: MissingCompileTimeError
-type_checks_in_factory_method_test/01: MissingCompileTimeError
-type_inference_accessor_ref_test/03: MissingCompileTimeError
-type_inference_accessor_ref_test/06: MissingCompileTimeError
-type_inference_circularity_test: MissingCompileTimeError
-type_inference_inconsistent_inheritance_test: MissingCompileTimeError
-type_literal_prefix_call_test: RuntimeError
-type_promotion_functions_test/01: MissingCompileTimeError
-type_promotion_functions_test/05: MissingCompileTimeError
-type_promotion_functions_test/06: MissingCompileTimeError
-type_promotion_functions_test/07: MissingCompileTimeError
-type_promotion_functions_test/08: MissingCompileTimeError
-type_promotion_functions_test/10: MissingCompileTimeError
-type_promotion_parameter_test/01: MissingCompileTimeError
-type_promotion_parameter_test/02: MissingCompileTimeError
-type_promotion_parameter_test/03: MissingCompileTimeError
-type_promotion_parameter_test/04: MissingCompileTimeError
-type_promotion_parameter_test/05: MissingCompileTimeError
-type_promotion_parameter_test/06: MissingCompileTimeError
-type_promotion_parameter_test/07: MissingCompileTimeError
-type_promotion_parameter_test/08: MissingCompileTimeError
-type_promotion_parameter_test/09: MissingCompileTimeError
-type_promotion_parameter_test/10: MissingCompileTimeError
-type_promotion_parameter_test/11: MissingCompileTimeError
-type_promotion_parameter_test/12: MissingCompileTimeError
-type_promotion_parameter_test/13: MissingCompileTimeError
-type_promotion_parameter_test/14: MissingCompileTimeError
-type_promotion_parameter_test/15: MissingCompileTimeError
-type_promotion_parameter_test/16: MissingCompileTimeError
-type_promotion_parameter_test/17: MissingCompileTimeError
-type_promotion_parameter_test/18: MissingCompileTimeError
-type_promotion_parameter_test/19: MissingCompileTimeError
-type_promotion_parameter_test/20: MissingCompileTimeError
-type_promotion_parameter_test/21: MissingCompileTimeError
-type_promotion_parameter_test/22: MissingCompileTimeError
-type_promotion_parameter_test/23: MissingCompileTimeError
-type_promotion_parameter_test/24: MissingCompileTimeError
-type_promotion_parameter_test/25: MissingCompileTimeError
-type_promotion_parameter_test/26: MissingCompileTimeError
-type_promotion_parameter_test/27: MissingCompileTimeError
-type_promotion_parameter_test/28: MissingCompileTimeError
-type_promotion_parameter_test/29: MissingCompileTimeError
-type_promotion_parameter_test/30: MissingCompileTimeError
-type_promotion_parameter_test/31: MissingCompileTimeError
-type_promotion_parameter_test/32: MissingCompileTimeError
-type_promotion_parameter_test/33: MissingCompileTimeError
-type_promotion_parameter_test/34: MissingCompileTimeError
-type_promotion_parameter_test/35: MissingCompileTimeError
-type_promotion_parameter_test/36: MissingCompileTimeError
-type_promotion_parameter_test/37: MissingCompileTimeError
-type_promotion_parameter_test/38: MissingCompileTimeError
-type_promotion_parameter_test/39: MissingCompileTimeError
-type_promotion_parameter_test/40: MissingCompileTimeError
-type_promotion_parameter_test/41: MissingCompileTimeError
-type_promotion_parameter_test/42: MissingCompileTimeError
-type_promotion_parameter_test/43: MissingCompileTimeError
-type_promotion_parameter_test/44: MissingCompileTimeError
-type_promotion_parameter_test/45: MissingCompileTimeError
-type_promotion_parameter_test/46: MissingCompileTimeError
-type_promotion_parameter_test/47: MissingCompileTimeError
-type_promotion_parameter_test/48: MissingCompileTimeError
-type_promotion_parameter_test/49: MissingCompileTimeError
-type_promotion_parameter_test/50: MissingCompileTimeError
-type_promotion_parameter_test/51: MissingCompileTimeError
-type_promotion_parameter_test/52: MissingCompileTimeError
-type_promotion_parameter_test/54: MissingCompileTimeError
-type_promotion_parameter_test/55: MissingCompileTimeError
-type_promotion_parameter_test/56: MissingCompileTimeError
-type_variable_bounds2_test: MissingCompileTimeError
-type_variable_bounds3_test/00: MissingCompileTimeError
-type_variable_bounds4_test/01: MissingCompileTimeError
-type_variable_bounds_test/00: MissingCompileTimeError
-type_variable_bounds_test/01: MissingCompileTimeError
-type_variable_bounds_test/02: MissingCompileTimeError
-type_variable_bounds_test/03: MissingCompileTimeError
-type_variable_bounds_test/04: MissingCompileTimeError
-type_variable_bounds_test/05: MissingCompileTimeError
-type_variable_bounds_test/06: MissingCompileTimeError
-type_variable_bounds_test/07: MissingCompileTimeError
-type_variable_bounds_test/08: MissingCompileTimeError
-type_variable_bounds_test/09: MissingCompileTimeError
-type_variable_bounds_test/10: MissingCompileTimeError
-type_variable_bounds_test/11: MissingCompileTimeError
-type_variable_conflict2_test/01: MissingCompileTimeError
-type_variable_conflict2_test/03: MissingCompileTimeError
-type_variable_conflict2_test/04: MissingCompileTimeError
-type_variable_conflict2_test/05: MissingCompileTimeError
-type_variable_conflict2_test/07: MissingCompileTimeError
-type_variable_conflict2_test/09: MissingCompileTimeError
-type_variable_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
-type_variable_identifier_expression_test: MissingCompileTimeError
-type_variable_nested_test/01: RuntimeError
-type_variable_promotion_test: RuntimeError
-type_variable_scope2_test: MissingCompileTimeError
-type_variable_scope_test/00: MissingCompileTimeError
-type_variable_scope_test/01: MissingCompileTimeError
-type_variable_scope_test/02: MissingCompileTimeError
-type_variable_scope_test/03: MissingCompileTimeError
-type_variable_scope_test/04: MissingCompileTimeError
-type_variable_scope_test/05: MissingCompileTimeError
-type_variable_static_context_test: MissingCompileTimeError
-typed_selector2_test: MissingCompileTimeError
-unbound_getter_test: MissingCompileTimeError
-unresolved_default_constructor_test/01: MissingCompileTimeError
-unresolved_in_factory_test: MissingCompileTimeError
-unresolved_top_level_method_test: MissingCompileTimeError
-unresolved_top_level_var_test: MissingCompileTimeError
-vm/*: SkipByDesign # Tests for the VM.
-void_block_return_test/00: MissingCompileTimeError
-wrong_number_type_arguments_test/*: MissingCompileTimeError
-
-[ $compiler == dart2js && !$dart2js_with_kernel && $fast_startup ]
-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: CompileTimeError
-vm/reflect_core_vm_test: Fail # mirrors not supported
-
-[ $compiler == dart2js && !$dart2js_with_kernel && $host_checked ]
-implicit_downcast_during_for_in_element_test: Crash
-implicit_downcast_during_for_in_iterable_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 && !$dart2js_with_kernel && $minified ]
-f_bounded_quantification4_test: Fail, Pass # Issue 12605
-mixin_generic_test: Fail # Issue 12605
-symbol_conflict_test: RuntimeError # Issue 23857
-
-[ $compiler == dart2js && !$dart2js_with_kernel && !$minified ]
-vm/async_await_catch_stacktrace_test: RuntimeError
-
-[ $compiler == dart2js && $fasta ]
-syntax_test/62: Crash
-
[ $compiler == dart2js && !$fasta ]
-syntax_test/59: MissingCompileTimeError
+*: SkipByDesign
[ $compiler == dart2js && $minified ]
cyclic_type2_test: RuntimeError # Issue 31054
@@ -3824,6 +2839,3 @@
mixin_mixin_bound_test: RuntimeError # Issue 31054
mixin_mixin_type_arguments_test: RuntimeError # Issue 31054
-[ $compiler == dart2js && !$strong ]
-dynamic_test: RuntimeError
-
diff --git a/tests/language_2/language_2_dartdevc.status b/tests/language_2/language_2_dartdevc.status
index 35e3b0a..fd6aff1 100644
--- a/tests/language_2/language_2_dartdevc.status
+++ b/tests/language_2/language_2_dartdevc.status
@@ -21,7 +21,8 @@
await_future_test: Pass, Timeout # Issue 29920
bit_operations_test: RuntimeError # No bigints on web.
black_listed_test/none: Fail # Issue 14228
-bug32353_test: RuntimeError
+bug32353_test: CompileTimeError
+bug32372_test: CompileTimeError
built_in_identifier_prefix_test: CompileTimeError
built_in_identifier_type_annotation_test/22: MissingCompileTimeError # Issue 28816
call_method_as_cast_test/01: RuntimeError
@@ -54,6 +55,7 @@
call_method_override_test/02: MissingCompileTimeError
cascaded_forwarding_stubs_generic_test: RuntimeError
cascaded_forwarding_stubs_test: CompileTimeError
+conflicting_generic_interfaces_hierarchy_loop_infinite_test: Skip # Crashes or times out
conflicting_type_variable_and_setter_test: CompileTimeError
const_evaluation_test/01: RuntimeError # Issue 29920
const_for_in_variable_test/01: MissingCompileTimeError
@@ -139,20 +141,19 @@
mixin_supertype_subclass_test/02: MissingCompileTimeError
mixin_supertype_subclass_test/05: MissingCompileTimeError
mixin_type_parameter_inference_previous_mixin_test/01: CompileTimeError
-mixin_type_parameter_inference_previous_mixin_test/02: RuntimeError # should be CompileTimeError, fuzzy arrows
-mixin_type_parameter_inference_previous_mixin_test/03: MissingCompileTimeError # fuzzy arrows
-mixin_type_parameter_inference_previous_mixin_test/04: MissingCompileTimeError
-mixin_type_parameter_inference_previous_mixin_test/05: RuntimeError
+mixin_type_parameter_inference_previous_mixin_test/02: CompileTimeError
+mixin_type_parameter_inference_previous_mixin_test/05: CompileTimeError
+mixin_type_parameter_inference_previous_mixin_test/none: CompileTimeError
mixin_type_parameter_inference_test/01: CompileTimeError
-mixin_type_parameter_inference_test/02: RuntimeError # CompileTimeError, except Fuzzy arrows
-mixin_type_parameter_inference_test/03: RuntimeError # CompileTimeError, except Fuzzy arrows
-mixin_type_parameter_inference_test/04: MissingCompileTimeError
-mixin_type_parameter_inference_test/05: MissingCompileTimeError
-mixin_type_parameter_inference_test/06: MissingCompileTimeError
-mixin_type_parameter_inference_test/07: MissingCompileTimeError
-mixin_type_parameter_inference_test/08: RuntimeError
-mixin_type_parameter_inference_test/09: RuntimeError
-mixin_type_parameter_inference_test/11: MissingCompileTimeError
+mixin_type_parameter_inference_test/02: CompileTimeError
+mixin_type_parameter_inference_test/03: CompileTimeError
+mixin_type_parameter_inference_test/08: CompileTimeError
+mixin_type_parameter_inference_test/09: CompileTimeError
+mixin_type_parameter_inference_test/10: CompileTimeError
+mixin_type_parameter_inference_test/12: CompileTimeError
+mixin_type_parameter_inference_test/13: CompileTimeError
+mixin_type_parameter_inference_test/16: CompileTimeError
+mixin_type_parameter_inference_test/none: CompileTimeError
mock_writable_final_private_field_test: CompileTimeError # Issue 30848
multiline_newline_test/01: CompileTimeError
multiline_newline_test/01r: CompileTimeError
@@ -178,7 +179,9 @@
parameter_initializer_test: CompileTimeError
part_refers_to_core_library_test/01: Crash
prefix10_negative_test: Fail # Issue 29920
-private_access_test/04: MissingCompileTimeError
+regress_22976_test/01: CompileTimeError
+regress_22976_test/02: CompileTimeError
+regress_22976_test/none: CompileTimeError
regress_23408_test: CompileTimeError
regress_24283_test: RuntimeError # Intended to fail, requires 64-bit numbers.
regress_29025_test: CompileTimeError # Issue 29081
@@ -731,6 +734,8 @@
branch_canonicalization_test: RuntimeError # Issue 29920; Expect.equals(expected: <0>, actual: <1>) fails.
built_in_identifier_prefix_test: CompileTimeError
call_closurization_test: RuntimeError # Issue 29920; TypeError: Cannot read property '0' of undefined
+call_operator_test/01: RuntimeError # Issue 32157
+call_operator_test/02: RuntimeError # Issue 32157
call_test: RuntimeError # Expect.throws(NoSuchMethodError) fails: Did not throw
canonical_const2_test: RuntimeError # Ints and doubles are unified.; Expect.isFalse(true) fails.
closure_call_wrong_argument_count_negative_test: Fail
diff --git a/tests/language_2/language_2_kernel.status b/tests/language_2/language_2_kernel.status
index 9b0ad47..94a1e0f 100644
--- a/tests/language_2/language_2_kernel.status
+++ b/tests/language_2/language_2_kernel.status
@@ -493,11 +493,6 @@
[ $compiler == dartk && $mode == debug && $runtime == vm && $strong ]
const_instance_field_test/01: Crash # Issue 32326.
-cyclic_type_variable_test/01: Crash
-cyclic_type_variable_test/02: Crash
-cyclic_type_variable_test/03: Crash
-cyclic_type_variable_test/04: Crash
-cyclic_type_variable_test/none: Crash
deopt_inlined_function_lazy_test: Skip
tearoff_dynamic_test: Crash
@@ -556,7 +551,6 @@
mixin_invalid_bound_test/06: Fail
mixin_invalid_bound_test/07: Fail
recursive_inheritance_test: RuntimeError
-recursive_mixin_test: Crash
redirecting_factory_infinite_steps_test/01: Fail
redirecting_factory_malbounded_test/01: Fail
regress_22728_test: Fail # Dartk Issue 28498
@@ -584,7 +578,6 @@
built_in_identifier_prefix_test: CompileTimeError
call_method_must_not_be_field_test/03: RuntimeError # Issue 32265
call_method_must_not_be_getter_test/03: RuntimeError # Issue 32265
-call_operator_test: RuntimeError, OK
call_with_no_such_method_test: RuntimeError
compile_time_constant_k_test/01: MissingCompileTimeError
compile_time_constant_k_test/02: MissingCompileTimeError
@@ -612,8 +605,8 @@
cyclic_type2_test: RuntimeError, CompileTimeError
cyclic_type_test/02: RuntimeError, CompileTimeError
cyclic_type_test/04: RuntimeError, CompileTimeError
-cyclic_typedef_test/10: Crash
-cyclic_typedef_test/11: Crash
+cyclic_typedef_test/10: Crash # Issue 32416.
+cyclic_typedef_test/11: Crash # Issue 32416.
deferred_call_empty_before_load_test: RuntimeError # KernelVM bug: Deferred loading kernel issue 30273.
deferred_load_constants_test/none: RuntimeError # KernelVM bug: Deferred loading kernel issue 30273.
deferred_load_library_wrong_args_test/01: Pass # Passes by mistake. KernelVM bug: Deferred loading kernel issue 30273.
@@ -702,7 +695,7 @@
redirecting_factory_infinite_steps_test/01: MissingCompileTimeError
redirecting_factory_malbounded_test/01: MissingCompileTimeError
regress_22443_test: RuntimeError # KernelVM bug: Deferred loading kernel issue 30273.
-regress_23089_test: Crash
+regress_23089_test: Crash # Issue 32417.
regress_23408_test: CompileTimeError # KernelVM bug: Deferred loading kernel issue 30273.
regress_23408_test: RuntimeError
regress_29025_test: CompileTimeError # Issue 31402 (Variable declaration)
@@ -763,7 +756,6 @@
assertion_initializer_const_error2_test/cc09: MissingCompileTimeError # Not reporting failed assert() at compile time.
assertion_initializer_const_error2_test/cc10: MissingCompileTimeError # Not reporting failed assert() at compile time.
assertion_initializer_const_error2_test/cc11: MissingCompileTimeError # Not reporting failed assert() at compile time.
-recursive_mixin_test: Crash
redirecting_factory_reflection_test: RuntimeError
# Enabling of dartk for sim{arm,arm64,dbc64} revelaed these test failures, which
@@ -774,13 +766,7 @@
[ $compiler == dartkp && $mode == debug && $runtime == dart_precompiled && $strong ]
const_instance_field_test/01: Crash # Issue 32326.
-cyclic_type_variable_test/01: Crash
-cyclic_type_variable_test/02: Crash
-cyclic_type_variable_test/03: Crash
-cyclic_type_variable_test/04: Crash
-cyclic_type_variable_test/none: Crash
external_test/13: Crash
-regress_29025_test: Crash
tearoff_dynamic_test: Crash
type_promotion_functions_test/05: Pass
type_promotion_functions_test/06: Pass
@@ -863,7 +849,6 @@
redirecting_factory_malbounded_test/01: Fail
regress_22728_test: Fail # Dartk Issue 28498
regress_22728_test: RuntimeError
-regress_30339_test: Crash
type_variable_bounds4_test/01: RuntimeError
[ $compiler == dartkp && $runtime == dart_precompiled && !$checked && $strong ]
@@ -909,7 +894,6 @@
built_in_identifier_prefix_test: CompileTimeError
call_method_must_not_be_field_test/03: RuntimeError # Issue 32265
call_method_must_not_be_getter_test/03: RuntimeError # Issue 32265
-call_operator_test: RuntimeError, OK
call_with_no_such_method_test: RuntimeError
checked_setter3_test/01: MissingCompileTimeError
checked_setter3_test/02: MissingCompileTimeError
@@ -939,8 +923,8 @@
cyclic_type2_test: Fail, OK
cyclic_type_test/02: Fail, OK # Non-contractive types are not supported in the vm.
cyclic_type_test/04: Fail, OK
-cyclic_typedef_test/10: Crash
-cyclic_typedef_test/11: Crash
+cyclic_typedef_test/10: Crash # Issue 32416.
+cyclic_typedef_test/11: Crash # Issue 32416.
deep_nesting1_negative_test: Skip # Issue 31158
deep_nesting2_negative_test: Skip # Issue 31158
deferred_call_empty_before_load_test: RuntimeError # Fasta/KernelVM bug: Deferred loading kernel issue 30273.
@@ -1073,7 +1057,6 @@
override_inheritance_method_test/29: CompileTimeError
override_inheritance_mixed_test/08: Pass # Correctly passes.
parser_quirks_test: CompileTimeError # Issue 31533
-recursive_mixin_test: Crash
redirecting_factory_infinite_steps_test/01: MissingCompileTimeError
redirecting_factory_malbounded_test/01: MissingCompileTimeError
redirecting_factory_reflection_test: SkipByDesign
@@ -1081,7 +1064,7 @@
regress_13462_1_test: SkipByDesign
regress_18535_test: SkipByDesign
regress_22443_test: RuntimeError # KernelVM bug: Deferred loading kernel issue 30273.
-regress_23089_test: Crash
+regress_23089_test: Crash # Issue 32417.
regress_23408_test: CompileTimeError # KernelVM bug: Deferred loading kernel issue 30273.
regress_23408_test: RuntimeError
regress_28255_test: SkipByDesign
@@ -1108,7 +1091,6 @@
super_operator_index8_test: CompileTimeError
super_test: Fail, OK
syntax_test/00: MissingCompileTimeError
-tearoff_dynamic_test: Crash
type_literal_test: RuntimeError
type_promotion_functions_test/02: CompileTimeError # Issue 31537
type_promotion_functions_test/03: CompileTimeError # Issue 31537
diff --git a/tests/language_2/language_2_precompiled.status b/tests/language_2/language_2_precompiled.status
index 57a932d..0144b00 100644
--- a/tests/language_2/language_2_precompiled.status
+++ b/tests/language_2/language_2_precompiled.status
@@ -88,6 +88,7 @@
bool_condition_check_test: RuntimeError
bug31436_test: RuntimeError
bug32353_test: RuntimeError
+bug32372_test: RuntimeError
built_in_identifier_prefix_test: CompileTimeError
call_constructor_on_unresolvable_class_test/01: MissingCompileTimeError
call_constructor_on_unresolvable_class_test/02: MissingCompileTimeError
@@ -219,6 +220,7 @@
conditional_property_increment_decrement_test/34: MissingCompileTimeError
conditional_property_increment_decrement_test/39: MissingCompileTimeError
conditional_property_increment_decrement_test/40: MissingCompileTimeError
+conflicting_generic_interfaces_simple_test: MissingCompileTimeError
const_constructor2_test/05: MissingCompileTimeError
const_constructor2_test/06: MissingCompileTimeError
const_constructor3_test/02: MissingCompileTimeError
diff --git a/tests/language_2/language_2_vm.status b/tests/language_2/language_2_vm.status
index 13af2f9..e24a1d3 100644
--- a/tests/language_2/language_2_vm.status
+++ b/tests/language_2/language_2_vm.status
@@ -178,6 +178,7 @@
bad_override_test/06: MissingCompileTimeError
bug31436_test: RuntimeError
bug32353_test: RuntimeError
+bug32372_test: RuntimeError
built_in_identifier_prefix_test: CompileTimeError
call_constructor_on_unresolvable_class_test/01: MissingCompileTimeError
call_constructor_on_unresolvable_class_test/02: MissingCompileTimeError
@@ -305,6 +306,7 @@
conditional_property_increment_decrement_test/34: MissingCompileTimeError
conditional_property_increment_decrement_test/39: MissingCompileTimeError
conditional_property_increment_decrement_test/40: MissingCompileTimeError
+conflicting_generic_interfaces_simple_test: MissingCompileTimeError
const_constructor2_test/05: MissingCompileTimeError
const_constructor2_test/06: MissingCompileTimeError
const_dynamic_type_literal_test/02: MissingCompileTimeError
@@ -855,7 +857,6 @@
private_access_test/04: MissingCompileTimeError
private_access_test/05: MissingCompileTimeError
private_access_test/06: MissingCompileTimeError
-recursive_mixin_test: RuntimeError
regress_12561_test: MissingCompileTimeError
regress_13494_test: MissingCompileTimeError
regress_17382_test: MissingCompileTimeError
@@ -1036,6 +1037,8 @@
unresolved_top_level_var_test: MissingCompileTimeError
[ $compiler != dartk && $runtime == vm && $checked ]
+call_operator_test/01: RuntimeError
+call_operator_test/02: RuntimeError
call_type_literal_test: RuntimeError
class_literal_static_test/none: RuntimeError
class_literal_test/none: RuntimeError
@@ -1117,7 +1120,6 @@
function_type/function_type9_test: RuntimeError # Issue 30475
function_type_alias2_test: RuntimeError
invalid_override_in_mixin_test/01: MissingCompileTimeError
-recursive_mixin_test: Crash
type_literal_prefix_call_test: RuntimeError
# The VM and does not implement the Dart 2.0 runtime checks yet unless
diff --git a/tests/lib/lib.status b/tests/lib/lib.status
index d55049b..68dbb6d 100644
--- a/tests/lib/lib.status
+++ b/tests/lib/lib.status
@@ -377,7 +377,7 @@
mirrors/native_class_test: Fail, OK # This test is meant to run in a browser.
typed_data/int32x4_bigint_test: CompileTimeError # Large integer literal
-[ $runtime == dart_precompiled || $runtime == flutter || $runtime == vm || $compiler == dart2js && $dart2js_with_kernel ]
+[ $runtime == dart_precompiled || $runtime == flutter || $runtime == vm || $compiler == dart2js && $fasta ]
convert/base64_test/01: CompileTimeError # Large integer literal
convert/utf82_test: CompileTimeError # Large integer literal
math/double_pow_test: CompileTimeError # Large integer literal
diff --git a/tests/lib_2/lib_2_dart2js.status b/tests/lib_2/lib_2_dart2js.status
index ca7739e..c83f291 100644
--- a/tests/lib_2/lib_2_dart2js.status
+++ b/tests/lib_2/lib_2_dart2js.status
@@ -308,10 +308,38 @@
html/mirrors_js_typed_interop_test: SkipByDesign
html/postmessage_structured_test: SkipByDesign
-[ $compiler == dart2js && $dart2js_with_kernel ]
+[ $compiler == dart2js && $fast_startup ]
+html/custom/constructor_calls_created_synchronously_test: Fail # mirrors not supported
+html/custom/document_register_basic_test: Pass, Slow, RuntimeError # Slow and sometimes times out
+html/custom/js_custom_test: Fail # mirrors not supported
+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
+isolate/browser/compute_this_script_browser_test: Fail # mirrors not supported
+isolate/browser/typed_data_message_test: Fail # mirrors not supported
+isolate/count_test: Fail # mirrors not supported
+isolate/cross_isolate_message_test: Fail # mirrors not supported
+isolate/illegal_msg_mirror_test: Fail # mirrors not supported
+isolate/mandel_isolate_test: Fail # mirrors not supported
+isolate/message2_test: Fail # mirrors not supported
+isolate/message_test: Fail # mirrors not supported
+isolate/mint_maker_test: Fail # mirrors not supported
+isolate/nested_spawn2_test: Fail # mirrors not supported
+isolate/nested_spawn_test: Fail # mirrors not supported
+isolate/raw_port_test: Fail # mirrors not supported
+isolate/remote_unittest_helper: Fail # mirrors not supported
+isolate/request_reply_test: Fail # mirrors not supported
+isolate/spawn_function_custom_class_test: Fail # mirrors not supported
+isolate/spawn_function_test: Fail # mirrors not supported
+isolate/stacktrace_message_test: Fail # mirrors not supported
+isolate/static_function_test: Fail # mirrors not supported
+isolate/unresolved_ports_test: Fail # mirrors not supported
+mirrors/regress_16321_test/01: Pass # expects failure, but if fails for the wrong reason
+
+[ $compiler == dart2js && $fasta ]
async/zone_run_unary_test: Crash
-[ $compiler == dart2js && $dart2js_with_kernel && $host_checked ]
+[ $compiler == dart2js && $fasta && $host_checked ]
html/async_spawnuri_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true.
html/async_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true.
html/audiobuffersourcenode_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true.
@@ -488,7 +516,7 @@
html/xhr_cross_origin_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true.
html/xhr_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true.
-[ $compiler == dart2js && $dart2js_with_kernel && $minified ]
+[ $compiler == dart2js && $fasta && $minified ]
html/async_spawnuri_test: RuntimeError
html/async_test: RuntimeError
html/audiobuffersourcenode_test: Crash # NoSuchMethodError: Class 'JMethod' has no instance getter 'implementation'.
@@ -722,34 +750,6 @@
html/window_mangling_test: RuntimeError
html/window_nosuchmethod_test: RuntimeError
-[ $compiler == dart2js && $fast_startup ]
-html/custom/constructor_calls_created_synchronously_test: Fail # mirrors not supported
-html/custom/document_register_basic_test: Pass, Slow, RuntimeError # Slow and sometimes times out
-html/custom/js_custom_test: Fail # mirrors not supported
-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
-isolate/browser/compute_this_script_browser_test: Fail # mirrors not supported
-isolate/browser/typed_data_message_test: Fail # mirrors not supported
-isolate/count_test: Fail # mirrors not supported
-isolate/cross_isolate_message_test: Fail # mirrors not supported
-isolate/illegal_msg_mirror_test: Fail # mirrors not supported
-isolate/mandel_isolate_test: Fail # mirrors not supported
-isolate/message2_test: Fail # mirrors not supported
-isolate/message_test: Fail # mirrors not supported
-isolate/mint_maker_test: Fail # mirrors not supported
-isolate/nested_spawn2_test: Fail # mirrors not supported
-isolate/nested_spawn_test: Fail # mirrors not supported
-isolate/raw_port_test: Fail # mirrors not supported
-isolate/remote_unittest_helper: Fail # mirrors not supported
-isolate/request_reply_test: Fail # mirrors not supported
-isolate/spawn_function_custom_class_test: Fail # mirrors not supported
-isolate/spawn_function_test: Fail # mirrors not supported
-isolate/stacktrace_message_test: Fail # mirrors not supported
-isolate/static_function_test: Fail # mirrors not supported
-isolate/unresolved_ports_test: Fail # mirrors not supported
-mirrors/regress_16321_test/01: Pass # expects failure, but if fails for the wrong reason
-
[ $compiler == dart2js && $jscl ]
isolate/spawn_uri_test: SkipByDesign # Loading another file is not supported in JS shell
@@ -771,3 +771,4 @@
html/custom/attribute_changed_callback_test/unsupported_on_polyfill: Fail # Polyfill does not support
html/custom/entered_left_view_test/viewless_document: Fail # Polyfill does not handle this
html/fontface_test: Fail # Fontface not supported on these.
+
diff --git a/tests/standalone_2/standalone_2_kernel.status b/tests/standalone_2/standalone_2_kernel.status
index 927f9a0..f830f84 100644
--- a/tests/standalone_2/standalone_2_kernel.status
+++ b/tests/standalone_2/standalone_2_kernel.status
@@ -53,7 +53,7 @@
io/wait_for_event_isolate_test: Skip # Issues 32137 and 32138.
[ $compiler == dartk && $system == windows && $strong ]
-io/compile_all_test: Fail
+io/compile_all_test: Pass,Fail # Possibly related to issue 32373
io/file_stream_test: RuntimeError # Issue 31904
io/platform_test: RuntimeError # Issue 31904
io/process_non_ascii_test: RuntimeError # Issue 31904
diff --git a/tools/VERSION b/tools/VERSION
index 862960b..4e562be 100644
--- a/tools/VERSION
+++ b/tools/VERSION
@@ -27,5 +27,5 @@
MAJOR 2
MINOR 0
PATCH 0
-PRERELEASE 32
+PRERELEASE 33
PRERELEASE_PATCH 0
diff --git a/tools/bots/test_matrix.json b/tools/bots/test_matrix.json
index 473c023..a8e1db2 100644
--- a/tools/bots/test_matrix.json
+++ b/tools/bots/test_matrix.json
@@ -99,6 +99,53 @@
"configurations": [
{
"builders": [
+ "front-end-linux-release-x64",
+ "front-end-mac-release-x64",
+ "front-end-win-release-x64"
+ ],
+ "meta": {
+ "description": "Runs the front-end unit tests, fasta tests and fasta legacy mode tests."
+ },
+ "steps": [
+ {
+ "name": "build dart",
+ "script": "tools/build.py",
+ "arguments": [
+ "create_sdk",
+ "dartdevc_test",
+ "kernel_platform_files",
+ "runtime_kernel"
+ ]
+ },
+ {
+ "name": "unit tests",
+ "arguments": [
+ "--checked",
+ "--compiler=none",
+ "--runtime=vm",
+ "--timeout=240",
+ "pkg/(kernel|front_end|fasta)"
+ ]
+ },
+ {
+ "name": "fasta sdk tests",
+ "arguments": [
+ "--compiler=fasta",
+ "--runtime=none",
+ "--strong"
+ ]
+ },
+ {
+ "name": "fasta legacy mode sdk tests",
+ "arguments": [
+ "--compiler=fasta",
+ "--runtime=none"
+ ]
+ }
+ ]
+ },
+ {
+ "builders": [
"vm-linux-debug-ia32",
"vm-linux-debug-simarm",
"vm-linux-debug-x64",
diff --git a/tools/buildtools/update.py b/tools/buildtools/update.py
index 8658059..1b38f4b 100755
--- a/tools/buildtools/update.py
+++ b/tools/buildtools/update.py
@@ -6,6 +6,7 @@
"""Pulls down tools required to build Dart."""
import os
+import platform
import subprocess
import shutil
import sys
@@ -28,7 +29,8 @@
def UpdateGNOnWindows():
- sha1_file = os.path.join(BUILDTOOLS, 'win', 'gn.exe.sha1')
+ sha1_file = os.path.join(TOOLS_BUILDTOOLS, 'win', 'gn.exe.sha1')
+ output_dir = os.path.join(BUILDTOOLS, 'win', 'gn.exe')
downloader_script = os.path.join(
DEPOT_PATH, 'download_from_google_storage.py')
download_cmd = [
@@ -41,7 +43,9 @@
'--bucket',
'chromium-gn',
'-s',
- sha1_file
+ sha1_file,
+ '-o',
+ output_dir
]
return subprocess.call(download_cmd)
@@ -68,8 +72,8 @@
return subprocess.call(download_cmd)
-# On Mac and Linux we copy clang-format to the place where git cl format
-# expects it to be.
+# On Mac and Linux we copy clang-format and gn to the place where git cl format
+# expects them to be.
def CopyClangFormat():
if sys.platform == 'darwin':
platform = 'darwin'
@@ -85,12 +89,23 @@
clang_format = os.path.join(
BUILDTOOLS, toolchain, 'clang', 'bin', 'clang-format')
- dest = os.path.join(BUILDTOOLS, tools, 'clang-format')
- shutil.copy2(clang_format, dest)
+ gn = os.path.join(BUILDTOOLS, toolchain, 'gn')
+ dest_dir = os.path.join(BUILDTOOLS, tools)
+ if not os.path.exists(dest_dir):
+ os.makedirs(dest_dir)
+ clang_format_dest = os.path.join(dest_dir, 'clang-format')
+ gn_dest = os.path.join(dest_dir, 'gn')
+ shutil.copy2(clang_format, clang_format_dest)
+ shutil.copy2(gn, gn_dest)
return 0
def main(argv):
+ arch_id = platform.machine()
+ # Don't try to download binaries if we're on an arm machine.
+ if arch_id.startswith('arm') or arch_id.startswith('aarch64'):
+ print('Not downloading buildtools binaries for ' + arch_id)
+ return 0
if sys.platform.startswith('win'):
result = UpdateGNOnWindows()
if result != 0:
diff --git a/tools/buildtools/win/gn.exe.sha1 b/tools/buildtools/win/gn.exe.sha1
new file mode 100644
index 0000000..0ef132f
--- /dev/null
+++ b/tools/buildtools/win/gn.exe.sha1
@@ -0,0 +1 @@
+e93779cab57d5f36100faa4d88524a1e33be7b0f
diff --git a/tools/dom/src/EventStreamProvider.dart b/tools/dom/src/EventStreamProvider.dart
index bc21bfd..9ca2cf9 100644
--- a/tools/dom/src/EventStreamProvider.dart
+++ b/tools/dom/src/EventStreamProvider.dart
@@ -136,6 +136,9 @@
this;
bool get isBroadcast => true;
+ // TODO(9757): Inlining should be smart and inline only when inlining would
+ // enable scalar replacement of an immediately allocated receiver.
+ @ForceInline()
StreamSubscription<T> listen(void onData(T event),
{Function onError, void onDone(), bool cancelOnError}) {
return new _EventStreamSubscription<T>(
diff --git a/tools/dom/templates/html/impl/impl_Document.darttemplate b/tools/dom/templates/html/impl/impl_Document.darttemplate
index a745435..d64e858 100644
--- a/tools/dom/templates/html/impl/impl_Document.darttemplate
+++ b/tools/dom/templates/html/impl/impl_Document.darttemplate
@@ -57,6 +57,7 @@
bool get supportsRegister => supportsRegisterElement;
@DomName('Document.createElement')
+ @ForceInline() // Almost all call sites have one argument.
Element createElement(String tagName, [String typeExtension]) {
return (typeExtension == null)
? _createElement_2(tagName)
diff --git a/tools/gn.py b/tools/gn.py
index d727fbc..7d37620 100755
--- a/tools/gn.py
+++ b/tools/gn.py
@@ -153,9 +153,12 @@
def DontUseClang(args, target_os, host_cpu, target_cpu):
# We don't have clang on Windows.
return (target_os == 'win'
- # TODO(zra): After we roll our clang toolchain to pick up the fix for
- # https://reviews.llvm.org/D34691 we should be able to use clang for
- # arm as well.
+ # TODO(infra): Clang cannot compile boringssl and tcmalloc in -mthumb
+ # mode.
+ # See dartbug.com/32363.
+ #
+ # We also can't compile the whole VM with clang in -marm mode
+ # See: dartbug.com/32362.
or (target_os == 'linux'
and target_cpu.startswith('arm')
and target_cpu != 'arm64'
@@ -478,9 +481,9 @@
if sys.platform.startswith(('cygwin', 'win')):
subdir = 'win'
elif sys.platform == 'darwin':
- subdir = 'mac'
+ subdir = 'mac-x64'
elif sys.platform.startswith('linux'):
- subdir = 'linux64'
+ subdir = 'linux-x64'
else:
print 'Unknown platform: ' + sys.platform
return 1
@@ -491,7 +494,10 @@
for mode in args.mode:
for arch in args.arch:
out_dir = GetOutDir(mode, arch, target_os)
- command = [gn, 'gen', out_dir, '--check']
+ # TODO(infra): Re-enable --check. Many targets fail to use
+ # public_deps to re-expose header files to their dependents.
+ # See dartbug.com/32364
+ command = [gn, 'gen', out_dir]
gn_args = ToCommandLine(ToGnArgs(args, mode, arch, target_os))
gn_args += GetGNArgs(args)
if args.verbose:
diff --git a/tools/infra/config/cq.cfg b/tools/infra/config/cq.cfg
index 0e116ef..4fd651a 100644
--- a/tools/infra/config/cq.cfg
+++ b/tools/infra/config/cq.cfg
@@ -33,6 +33,10 @@
builders { name: "dart-sdk-windows-try"}
builders { name: "vm-kernel-mac-release-x64-try"}
builders { name: "benchmark-linux-try"}
+ builders {
+ name: "front-end-linux-release-x64-try"
+ experiment_percentage: 100
+ }
}
try_job_retry_config {
try_job_retry_quota: 0
diff --git a/tools/testing/dart/test_suite.dart b/tools/testing/dart/test_suite.dart
index 71d70d4..5b26014 100644
--- a/tools/testing/dart/test_suite.dart
+++ b/tools/testing/dart/test_suite.dart
@@ -283,6 +283,7 @@
if (configuration.runtime == Runtime.none) {
expectations = expectations.toSet();
expectations.remove(Expectation.runtimeError);
+ expectations.remove(Expectation.ok);
expectations.remove(Expectation.missingRuntimeError);
expectations.remove(Expectation.timeout);
if (expectations.isEmpty) expectations.add(Expectation.pass);
diff --git a/utils/application_snapshot.gni b/utils/application_snapshot.gni
index 314139d..3441c84 100644
--- a/utils/application_snapshot.gni
+++ b/utils/application_snapshot.gni
@@ -41,16 +41,19 @@
} else {
dot_packages = rebase_path("$_dart_root/.packages")
}
+ output = "$root_gen_dir/$name.dart.snapshot"
+ if (defined(invoker.output)) {
+ output = invoker.output
+ }
compiled_action(target_name) {
tool = "$_dart_root/runtime/bin:dart"
deps = extra_deps
- depfile = "$root_gen_dir/$name.dart.snapshot.d"
+ depfile = "$output.d"
main_file = rebase_path(main_dart)
inputs = extra_inputs + [ main_file ]
- output = "$root_gen_dir/$name.dart.snapshot"
outputs = [
output,
]
diff --git a/utils/compiler/BUILD.gn b/utils/compiler/BUILD.gn
index 36ede78..c9eaf7a 100644
--- a/utils/compiler/BUILD.gn
+++ b/utils/compiler/BUILD.gn
@@ -85,3 +85,20 @@
"dart:core",
]
}
+
+compile_platform("compile_dart2js_platform_strong") {
+ sources = [
+ "../../sdk/lib/libraries.json",
+ ]
+
+ outputs = [
+ "$root_out_dir/dart2js_platform_strong.dill",
+ "$root_out_dir/dart2js_outline_strong.dill",
+ ]
+
+ args = [
+ "--target=dart2js",
+ "--strong",
+ "dart:core",
+ ]
+}
diff --git a/utils/kernel-service/BUILD.gn b/utils/kernel-service/BUILD.gn
index 6f539d9..ad61e49 100644
--- a/utils/kernel-service/BUILD.gn
+++ b/utils/kernel-service/BUILD.gn
@@ -31,6 +31,20 @@
]
}
+application_snapshot("frontend_server") {
+ main_dart = "../../pkg/vm/bin/frontend_server_starter.dart"
+ deps = [
+ "../../runtime/vm:kernel_platform_files($dart_host_toolchain)",
+ ]
+ sdk_root = rebase_path("$root_out_dir")
+ training_args = [
+ "--train",
+ "--sdk-root=$sdk_root/",
+ "--platform=$sdk_root/vm_platform.dill",
+ ]
+ output = "$root_out_dir/frontend_server.dart.snapshot"
+}
+
dart_action("kernel_service_dill") {
deps = [
"../../runtime/vm:vm_legacy_platform",